**** BEGIN LOGGING AT Fri Jan 08 02:59:58 2016 Jan 08 02:59:58 Pyuruku: Rendering problems Missing styles. Is the correct theme chosen for this layout? (etc etc) Jan 08 03:00:14 choose the correct theme then lol Jan 08 03:00:32 Pyuruku: If only I had thought of that. :P Jan 08 03:01:15 Pyuruku: Alas, it happens *every* option I choose when ver set to 23. Jan 08 03:02:01 what style is missing? Jan 08 03:02:02 one you made? Jan 08 03:02:14 If my targetSdkVersion is set to 23, does it matter that my minSdkVersion is 21? Jan 08 03:02:22 yes Jan 08 03:03:03 Pyuruku: Nah. Haven't got that fancy to create my own. I'm choosing things Halo light. AppTheme. Black notitle bar. Jan 08 03:03:18 ok, but what style is it complaining about? Jan 08 03:06:35 Pyuruku: It doesn't specify a style. It indicates several classes cannot be instantiated: AppBarLayout, CoordiantorLayout, WIndowDecorActionBar for a few. (I see I can put in an if with View.isInEditMode() to perhaps eliminate the errors. Again, the tutorials and references I'm trying to follow don't suggest I need to. Why did it work for them and not me?) Jan 08 03:07:11 sounds like you need to build your project or update your support library versions Jan 08 03:07:15 probably both Jan 08 03:08:03 I have support library, rev 23.1.1 which I think is the latest. Jan 08 03:08:42 I do a lot of building and rebuilding. It sometimes makes the error go away. But then it returns. Jan 08 03:15:07 i've got this structure CardView > LinearLayout > ListView (a list in a lineary layout in a card). What's a common way to allow the size of the containers to grow (height) w/ the list to a certain limit? Jan 08 03:17:46 perhaps wrap_content and maxheight on the container? Not sure if thatll work or not Jan 08 03:21:01 orbyt_: I've got the parent containers set to wrap_content on the height in the layout file. it works in the designer, but not at runtime Jan 08 04:07:50 good list of books for starting out? Jan 08 04:08:54 how can you lock the phone in the emulator? Jan 08 04:10:00 or resources in general... Jan 08 04:11:34 mozzarella: same way as you do with a phone, hit the "power" button ( i think there's a hot key and an option for this ) Jan 08 04:11:49 bankai_: doesn't do anything Jan 08 04:27:52 sup with my android nerds? Jan 08 04:36:20 Making a custom view where i want to handle long clicks on the view. how would I notify the activity that the custom view has been long clicked? Jan 08 04:51:40 orbyt_: implement View.OnLongClickListener? Jan 08 04:55:47 how can you lock the phone in the emulator? Jan 08 04:59:51 orbiting: i guess i was trying to capture the gesture in the view and notify a listener in the acitivity. I need the x/y coords on the press, which i cant get with just View.OnLongClick Jan 08 05:00:42 mozzarella: double tap F7? Jan 08 05:03:58 orbyt_: You have the view... so shouldn't you be able to access the InputEvent? Jan 08 05:04:52 orbiting: it just closes the emulator Jan 08 05:08:21 orbiting: dont think so. cant find anything to get the coords with just the view Jan 08 05:09:30 orbyt_: public boolean onTouchEvent (MotionEvent event) from the view... you should be able to get the info from the MotionEvent Jan 08 05:13:08 come on guys Jan 08 05:16:14 orbiting: that doesnt return the event though, it just takes one as a parameter correct? Not sure how your suggesting to use that Jan 08 05:22:43 mozzarella: did you go into settings and set up the lock screen??? Jan 08 05:23:10 It is set up for swipe unlock only, then double F7 locks it Jan 08 05:24:45 orbiting: let me try Jan 08 05:24:58 orbyt_: confirmed that it works on 23 Jan 08 05:25:26 orbiting: ? how Jan 08 05:25:44 go into settings, security Jan 08 05:26:19 screen lock -> pattern / pin / password (take your pick) Jan 08 05:26:45 orbiting: I've set it to PIN Jan 08 05:26:47 still doestn't work Jan 08 05:27:02 what sdk version is the emulator running? Jan 08 05:28:10 orbiting: 23 Jan 08 05:28:35 weird shot in the dark... HP laptop? Jan 08 05:29:54 orbyt_: ? HP Laptop by chance? Jan 08 05:30:17 orbiting: ? your messaging the wrong person Jan 08 05:30:27 sorry! Jan 08 05:30:52 uh, me? Jan 08 05:31:10 yeah... Jan 08 05:31:17 it's a desktop computer Jan 08 05:31:37 I'm on fedora Jan 08 05:32:41 is your emulator getting any hotkeys? try ctrl-f12 to rotate Jan 08 05:33:11 it closes the emulator when I press f7… or maybe it crashes, I don't know Jan 08 05:33:28 let me try Jan 08 05:34:11 well other than messaging the wrong person, I'm not crazy, tried it one more time and it worked. Jan 08 05:36:09 mozzarella: the only other thing I can suggest is to go into your AVD config, show the advanced settings, make sure you have a device frame skin enabled (if you don't) and also enable the checkbox for enable keyboard input.... Jan 08 05:36:12 orbiting: yeah, ctrl+f12 does work Jan 08 05:38:00 orbiting: this is what I have: http://i.imgur.com/be8Ub38.png Jan 08 05:40:13 so what happens when you double tap F7? Jan 08 05:40:17 does it crash? Jan 08 05:40:37 orbiting: it disappears after a few seconds, I think it does crash Jan 08 05:41:30 also, when I try to run it again it says "file /tmp/android-sam/emulator-somegibberish already exists" Jan 08 05:42:36 there is also a (default) setting "power button instantly locks" in the security section of the settings as well. If you untoggled that.... Jan 08 05:43:42 it's turned on Jan 08 05:43:59 http://i.imgur.com/21aHtbb.png Jan 08 05:44:52 obvious question, got an app running with smartlock? Jan 08 05:45:39 orbiting: no idea, but I don't think so, as I don't launch any app Jan 08 05:48:39 well mess with that setting... mine didn't have the smartlock in the sub-text like yours Jan 08 05:48:51 i'm out. have a good night. Jan 08 06:01:15 "Keep in mind that same adapter may be observed by multiple RecyclerViews." .. why would anyone want to do that .... Jan 08 06:01:43 RecyclerView.Adapter#onAttachedToRecyclerView Jan 08 06:12:20 sigh, looks like motorola brand is to be phased out Jan 08 06:12:28 goodbye moto Jan 08 06:17:31 I got me a moto G 3rd gen. It betterbe phased out. They aren't good anymore anyways. Jan 08 06:18:19 They even let seller pre-install its app on the device. Jan 08 06:25:42 ideas? http://stackoverflow.com/questions/34670553/detecting-long-clicks-on-a-custom-view Jan 08 10:50:32 I Jan 08 10:53:22 I'm trying to get started with Apache Cordova, but "cordorva run android" (cmd) gives me, "ERROR: Error: Please install Android target: "android-22". AFAIK, I've got API 22 installed: http://snag.gy/ENeoh.jpg Jan 08 10:53:41 Is this something to do with Windows environment variables? Jan 08 10:56:35 ... trying to install packages, Tools > Android SDK Build-tools 22.0.1. Could that be it? Jan 08 10:57:29 <_3mpty> I would also bet env Jan 08 10:59:03 <_3mpty> or you can have 2 or more android sdk installations Jan 08 11:00:07 _3mpty: but what do I check, wrt. env. variables? Jan 08 11:07:09 <_3mpty> run android command it will execute sdk manager avail from your path Jan 08 11:07:12 <_3mpty> check if 22 is there Jan 08 11:10:43 _3mpty: The error suggests running C:\Users\joakimk\...\Android\sdk\tools\android.bat, which brings up the SDK Manager. Suddenly, now, I see all the API 22 packages are "not installed"! That's strange, because I just installed those earlier today -- although, then I started the SDK Manager from the Start menu... Jan 08 11:10:59 so maybe there are several android setups on my PC? Jan 08 11:11:32 Note: I've also got Android Studio set up, and working. I actually would've thought that would be sufficient environment for Cordova also, but apparently not Jan 08 11:13:09 _3mpty: well, anyway, now -- after installing the 22 packages, from this SDK manager -- the command executes (cordova run android) :-) Jan 08 11:13:33 So presumably it's working :) It's downloading some ZIP files from gradle.org Jan 08 11:14:03 <_3mpty> as you said, you have multiple sdk dirs Jan 08 11:14:03 Hehe, hope this all won't mess up my Android Studio setup ;) Jan 08 11:14:29 <_3mpty> try to track them down, usually it's not good to have more than one :) Jan 08 11:14:40 Can it be that I've got one for Android Studio, and one for Cordova? Jan 08 11:14:48 Does that sound sensible? Jan 08 11:15:17 <_3mpty> i don't know cordova, so i don't know if it's installs own android sdk, rather not Jan 08 11:15:51 <_3mpty> AS could not detect your sdk and downloaded own Jan 08 11:15:56 The one I started from cmd, as a BAT file, was in AppData\Local\Android\sdk. I guess maybe Android Studio will put "its" SDK somewhere else? Jan 08 11:16:49 <_3mpty> i think that it should be in your home dir, but I don't remember particular dir on windows Jan 08 11:17:14 Normally, though, I'd have *one* SDK, and both Android Studio and Cordova should use this? Jan 08 11:17:23 <_3mpty> yup Jan 08 11:17:46 Each SDK will eat up lots of disk space, right... Especially with images Jan 08 11:18:05 <_3mpty> in AS prefs, check System Settings/Android SDK Jan 08 11:18:16 <_3mpty> you should have sdk location there Jan 08 11:18:57 <_3mpty> just edit it and path to point into same sdk dir - remove other Jan 08 11:20:10 AS tells me, Android SDK Location: C:\Users\joakimk\AppData\Local\Android\sdk Jan 08 11:20:59 <_3mpty> same as one in PATH? Jan 08 11:21:07 how do I check? Jan 08 11:21:14 echo %PATH% ? Jan 08 11:22:13 <_3mpty> i guess so Jan 08 11:22:20 <_3mpty> or under sys. env menu Jan 08 11:23:10 echo %PATH% gives me a semi-colon separated list of... paths, but nothing containing "sdk" or "android" :-/ Jan 08 11:23:37 maybe this has become more of a #windows problem? ;) Jan 08 11:24:04 <_3mpty> maybe there is sub variable that points to sdk/tools, you accessed android.bat somehow Jan 08 11:24:18 in any case, C:\Users\joakimk\AppData\Local\Android\ contains *two* sdk's, it seems: sdk\ and android-sdk\ Jan 08 11:24:30 <_3mpty> oh, cleanup :) Jan 08 11:24:45 I accessed android.bat via the full path: C:\Users\joakimk\AppData\Local\Android\sdk\tools\android.bat Jan 08 11:24:57 and then things started to work Jan 08 11:25:13 so sdk\ seems to be the dir used by Cordova *and* also AS, apparently Jan 08 11:25:52 <_3mpty> this screen from before was from AS sdk manager? Jan 08 11:25:59 yes Jan 08 11:26:05 the snaggy paste? Jan 08 11:26:12 <_3mpty> yup Jan 08 11:26:13 <_3mpty> strange :D Jan 08 11:26:26 well, from AS I don't know; it was SDK Manager as per the Start menu Jan 08 11:26:51 <_3mpty> oh, so it could be android-sdk directory Jan 08 11:26:56 running "from" the BAT-file, I got an SDK manager which *didn't* have the 22 stuff installed... Jan 08 11:26:59 yeah... Jan 08 11:27:01 <_3mpty> try to check for what are you using it Jan 08 11:27:08 <_3mpty> maybe some nvidia ndk Jan 08 11:27:16 <_3mpty> or other stuff, if don't need it - remove Jan 08 11:27:23 <_3mpty> less confussion Jan 08 11:27:23 What is NDK? Jan 08 11:27:34 <_3mpty> native dev kit Jan 08 11:27:43 <_3mpty> for C, magic and unicorns Jan 08 11:27:46 hehe Jan 08 11:28:13 so, what about this: If I simply ZIP down the android-sdk\ dir, I'll see if Cordova and/or Android Studio "stops working"? Jan 08 11:28:14 hehe Jan 08 11:28:25 better than deleting it Jan 08 11:29:10 <_3mpty> if AS and cordova points to other one it will crash something else (or not :P) Jan 08 11:29:17 yep Jan 08 11:29:18 <_3mpty> anyway it's good idea Jan 08 11:30:56 eh he heee... ZIP tells me, "About 3 Hours and 45 Minutes remaining" ;) Jan 08 11:31:20 well, it dropped to 7 min Jan 08 11:31:26 thanks for your help! Jan 08 11:31:55 As I said, I'm replacing my SSD next week, with a fresh OS and everything, so I hope this all goes smoothly from there Jan 08 11:32:19 at least I've managed to get the Cordova tutorial app running now on my phone :) Jan 08 11:32:24 ... with your help Jan 08 11:32:25 so thanks! Jan 08 11:43:42 Does google provide a NLP toolkit? I tried to play with voice recognition before, but was only able to get sentences with probabilities. Jan 08 12:42:06 Hey so I am dealing with an app that caches some images into memory, but if you run out of memory the app crashes, whats the best way (if any) to check that the memory is available before trying to cache it to avoid crashes? :x Jan 08 12:44:54 pokEarl, you're interested in your available heap size Jan 08 12:48:05 ook will look into it thanks Mavrik , this is totally doable though right? Jan 08 12:48:22 Yes, it's even described in Android documentation under bitmaps :) Jan 08 12:50:34 pokEarl: check out Fresco library, it working with android's equivalent of shared memory instead of heap Jan 08 12:52:12 Which is horrible. Jan 08 12:52:19 why is that? Jan 08 12:52:22 Not to mention Fresco is bloates as heck for what it does. Jan 08 12:52:34 vigilancer, because it pins down memory which will slow down phone of the user. Jan 08 12:52:41 but I kinda like the idea Jan 08 12:52:49 Since that memory cannot be freed as opposed to stuff kept on heap. Jan 08 12:53:13 but you are not limited by heap size Jan 08 12:53:17 Pretty much typical shitass Facebook practice - fuck up all other apps on the phone so you can store a few pictures. Jan 08 12:57:13 I'm out of arguments) Jan 08 13:02:16 Android Studio and resource renaming of resources in raw folder... Why is it so stubborn ? Jan 08 13:02:35 Invalidate and Restart everytime you change something ? Or is there a better way ? Jan 08 13:02:42 ( taking less time etc ) Jan 08 13:29:10 How is everyone doing today? Jan 08 13:30:25 I am not too bad perlsyntax Jan 08 13:30:42 things are happening Jan 08 13:30:53 that good to hear. Jan 08 13:31:37 Only thing that suck i can't test my app on the phone yet have to wait to see if gogole cloud test lab come out soon. Jan 08 13:31:48 chattin', watching a TV ep and blowing up tanks Jan 08 13:31:54 wyoung,that good Jan 08 13:31:55 (three screens <3) Jan 08 13:32:32 wyorng,I got 2 moniters setup. Jan 08 13:32:34 you can't test your app on your phone? are you using android studio? it have a debugger and profiler Jan 08 13:32:38 oh no i bad Jan 08 13:33:08 perlsyntax: well, I cheated, two computers, one has two screens :) Jan 08 14:15:00 hi, does anyone know how TrafficStats.getTotalTxBytes work? Jan 08 14:15:04 check this out Jan 08 14:15:27 [1416704, 96140, 5329671, 696762, 165638, 73163] Jan 08 14:15:27 [2659893, 842360, 7989564, 1539122, -615878, -707987] Jan 08 14:16:29 the last 2 numbers are expected to remain fixed because it's the difference between me keeping track of mobile bytes and what comes from getMobileBytes() Jan 08 14:17:34 for some reason the those 842360 tx bytes did not end up in getMobileTXBytes, hence the big diference on the last columns Jan 08 14:18:25 so if the phone was on 3d and wifi and bluetooth are off, where the heck these 842360 came from, if not from 3g network Jan 08 14:38:08 loopback? Jan 08 15:18:02 Hi, I have a ListView, with an image and a clickbox within it. However, I want the items aligned to the far left. How do I do that? Jan 08 15:18:35 depends on what viewgroup your items are using Jan 08 15:19:33 what is a viewgroup? Jan 08 15:20:58 linearlayout is a viewgroup Jan 08 15:21:10 every view that holds other views basically Jan 08 15:22:19 its linearlayout Jan 08 15:22:51 and you dont know how to align icons in a linearlayout? Jan 08 15:23:39 layout_gravity Jan 08 15:24:48 putting the icon on the left side in xml should be enough if the orientation is horizontal Jan 08 16:05:38 hi there, did any of you guys run into the following problem already: I'm accessing my sqlite db through a singleton in my main activities onCreate method. I'm accessing it on background thread. And once in a while my app crashes while doing so saying "no such table exists". Jan 08 16:06:13 so I'm assuming that somehow the sqlite hasn't been initialized yet and therefore crashes with that message. Jan 08 16:06:21 any idea on how I can fix that crash? Jan 08 16:07:42 MrMaffen, are you using a content provider to access your database? Jan 08 16:07:54 danijoo: no I'm not Jan 08 16:08:11 I'm directly accessing my db and working with the returned cursor objects Jan 08 16:08:13 maybe its thread A is creating database, meanwhile thread B tries to access the not yet created one because it thinks its already created? Jan 08 16:08:40 hard to tell without seeing code :/ Jan 08 16:08:51 danijoo: ah yea that's a good idea. I'll check that Jan 08 16:08:51 i tend to stay away from that db stuff and use libraries :p Jan 08 16:08:55 :D Jan 08 16:09:01 danijoo: which one can you recommend? Jan 08 16:09:10 I had good experience with ormlite Jan 08 16:09:32 right now Im working with SimpleSQLProvider library because I need to export a contentProvider Jan 08 16:11:37 danijoo: yea it's probably not worth it for me to change to a library. everything's working as it should so far... except for this nasty crash I can hardly reproduce :S Jan 08 16:17:03 http://imgur.com/q9f4nyy Jan 08 16:17:05 yum Jan 08 16:17:39 experience tells me that best is to implement my own DB helper class Jan 08 16:19:16 and me to not do what others have done for me already :) Jan 08 16:19:18 MrMaffen: no such table means the table was not created. The table just sits there in your device memory, or not, if you didnt explictly created it. I mean like run a command db.execSQL("create table blablabla") Jan 08 16:19:42 MrMaffen, you have a race condition since you do it in the background from a singleton Jan 08 16:20:11 thats my guess too Jan 08 16:20:25 one creates the table and the other wants to access it before its finished Jan 08 16:20:30 yup I think so too. thanks for your input guys :) Jan 08 16:20:38 currently investigating what is going on exactly Jan 08 16:20:51 maybe synchronize it if you can Jan 08 16:20:53 but why do you create the table each time Jan 08 16:21:02 I don't Jan 08 16:21:46 well i guess then yeah, it is being accessed before creation was finished... Jan 08 16:40:11 MrMaffen, if you use something like rx or promises, the problem gets cvnsiderably easier Jan 08 16:41:04 pfn: I am using promises in most places but haven't gotten around to refactoring everything yet :/ Jan 08 16:41:26 pfn: I think I found the problem though. there was one method which wasn't synchronized for whatever reason which most likely caused the crash Jan 08 16:41:59 now I'll just wait and see if another crash report comes in :D Jan 08 16:42:18 btw if someone's interested: this is the project I'm working on https://github.com/tomahawk-player/tomahawk-android Jan 08 16:44:25 u should put some screenshot in the readme :) Jan 08 16:47:09 danijoo: yea you're right. wanted to do this months ago but I somehow never actually did it :( Jan 08 16:47:13 I'll do that now :D Jan 08 16:47:35 MrMaffen, ah, using jdeferred, good on you, yes, use promises everywhere instead of synchronized primitives Jan 08 16:48:19 pfn: only problem I have is that promises in java feel much more clunky than in js :/ Jan 08 16:48:29 MrMaffen, they are, use retrolambda to make it better Jan 08 16:49:59 pfn: oh nice that looks "promising" :P Jan 08 17:03:33 any idea what could cause a ClassNotFoundException for RecyclerView? It's throwing an error for android.view.RecyclerView, but that string doesn't even exist anywhere in my project Jan 08 17:03:54 so far as I can tell I'm using android.support.v7.widget.RecyclerView correctly, not sure if there's some namespace issue that's causing it to try and import the wrong one Jan 08 17:04:08 check your imports Jan 08 17:04:16 somewhere you use the wrong one Jan 08 17:05:29 i don't have the android.view.RecyclerView string anywhere in my project at all -- could it be getting auto-generated? Jan 08 17:08:16 its somewhere in your app and/or a lib Jan 08 17:08:45 pfn: after upgrading android-sdk-plugin from 1.5.12 to .13 I get project/build.scala:1: type AutoBuild is not a member of package android Jan 08 17:08:58 object Build extends android.AutoBuild Jan 08 17:10:11 this is rapidly turning into one of those "throw it all away and start over" problems Jan 08 17:18:08 gordon_, exit sbt and start again? Jan 08 17:18:21 gordon_, I'm assuming you did a 'reload' instead of restart of sbt Jan 08 17:18:29 i did that, but will try to clean project Jan 08 17:19:05 kommunicate: maybe the class is obfuscated by proguard Jan 08 17:19:11 still the same Jan 08 17:19:12 gordon_, shouldn't have to clean project Jan 08 17:19:28 I checked the commits but didnt find any 'breaking' changes Jan 08 17:21:11 rm ~/.ivy2/cache/scala_2.10/sbt_0.13/com.hanhuy.sbt/android-sdk-plugin/jars/android-sdk-plugin-1.5.13.jar Jan 08 17:21:15 your download probably got corrupted Jan 08 17:21:26 i will give it a try Jan 08 17:21:39 thanks lxknvlk, i'll take a look Jan 08 17:21:53 alternatively, jar tf ~/.ivy2/cache/scala_2.10/sbt_0.13/com.hanhuy.sbt/android-sdk-plugin/jars/android-sdk-plugin-1.5.13.jar | grep AutoBuild Jan 08 17:21:56 it should turn up a bunch Jan 08 17:23:16 gordon_, also, md5sum that file first before deleting, it should be 0eba83f2dc496db9274b9d84cb1d1a89 Jan 08 17:23:28 pfn: it works after deleteing it from cache Jan 08 17:23:32 thank you Jan 08 17:23:43 weird, it should have detected that the file was corrupted... Jan 08 17:23:52 they really should replace ivy with their own solution.. Jan 08 17:24:14 some day Jan 08 17:24:20 I hope so too Jan 08 17:24:46 how do you usually developing ? ~android:compile in one terminal and when launching android:run ? Jan 08 17:25:47 hey, is it possible to embed a hangouts video call in another app? i don't want to rewrite the whole streaming videoconferencing thing myself, but i want to have some control over it Jan 08 17:26:12 basically i want to mirror the camera to the screen of another device and vice versa; i figured using hangouts would be more efficient than rolling my own Jan 08 17:26:20 gordon_, I usually just tie 'protify' to 'run' in IDE Jan 08 17:26:20 I dont think so Jan 08 17:26:37 gordon_, https://github.com/pfn/protify#full-intellij-idea--android-studio-integration Jan 08 17:26:43 pfn: got it, I will check it too Jan 08 17:26:56 so I just hit ctrl-r (my hotkey for run) Jan 08 17:27:05 ok Jan 08 17:27:08 ~protify is just too much Jan 08 17:27:12 but if you want, yes ~android:package Jan 08 17:27:18 not ~android:compile, that's something else Jan 08 17:27:40 understand Jan 08 17:27:57 btw, what is better, run proguard, or multidex and put minimal sdk to 21 / Jan 08 17:28:00 better = faster Jan 08 17:28:36 turn off proguard if using protify Jan 08 17:28:56 actually, the devices will always be on the same local network, so if there's a way to take advantage of that that'd be optimal Jan 08 17:29:05 gordon_, minimum sdk doens't matter for protify Jan 08 17:29:05 in general multidex with sdk 21 is faster than proguard Jan 08 17:29:11 gordon_, protify handles minsdk down to 4 Jan 08 17:29:21 pfn: ok, thanks Jan 08 17:29:25 danijoo: for gradle, yes Jan 08 17:29:31 (but @annotations on Application will cause it to fail...[ not common though]) Jan 08 17:33:12 Hi I have two quick question - 1. Does it matter what JDK I use? I am on Windows 10 and using JDK8u66 64-bit, will this work fine for Android dev? Also is there any benefit to using Android Studio over IntelliJ IDEA 15 community? Jan 08 17:34:44 kozukumi, it doesn't matter, but you'll have to set -source and -target properly Jan 08 17:34:51 ok Jan 08 17:35:00 kozukumi, and most documentation references android studio, so it's easier Jan 08 17:35:31 I'm planning on building a demo app that will play a video, listen for voice commands & using the front-facing camera, look for gestures. All at the same time. Would something like a kindle fire hd be up for that task or would I need a higher-end tablet? Jan 08 17:39:49 Hi, I have these 2 views [http://i.imgur.com/RXN8YuI.png] & [http://i.imgur.com/EKS9Gx1.png]. Now when someone clicks `Login` I want to animate the logo up and, make form appear and animate login button under it and hide register button. I can do this by writing all animations and doing opposite of those when user presses back, but that is a lot of messed up code, is there a cleaner way? Jan 08 17:41:47 Thanks pfn Jan 08 17:42:05 * pfn uses intellij Jan 08 17:42:30 I have a lot of projects in a variety of languages and platforms and can't be bothered to run multiple ID Jan 08 17:42:31 E Jan 08 17:44:02 astroduck, if its only changing visiblity of form + moving icon up, this is possible to do with view lines of code Jan 08 17:44:24 another option is to use a viewswitcher and toggle between two views instead of animating them Jan 08 17:45:04 pfn yeah that was my reasons for wanting to use Idea over AS tbh Jan 08 17:45:46 Will just use both I guess Jan 08 17:45:58 probably makes the most sense to have AS arround for whatever reason Jan 08 17:46:12 There's also a delay in AS features being available in intellij (and vice versa) Jan 08 17:47:52 for me, I don't care about any features in android studio Jan 08 17:48:05 only killer feature would be if they integrated monitor into android studio Jan 08 17:48:13 (might be done already for all I know) Jan 08 17:48:45 pfn monitor for what? Jan 08 17:49:01 theres a memory, CPU, GPU network monitor right now Jan 08 17:49:15 Just android device monitor Jan 08 17:49:38 danijoo, I mean ddms Jan 08 17:49:46 that's all available in intellij Jan 08 17:49:50 danijoo: I can animate views in viewswitcher, but I need to animate the button up as well, so the whole form is in center of its container, I wish there was a way to animate between centerInParent and alignParentBottom :P Jan 08 17:49:54 well, except gpu Jan 08 17:50:01 and network maybe... hmm Jan 08 17:50:12 not sure but i think GPU is also only in canary right now Jan 08 17:50:31 I use hierarchy viewer/pixel perfect, etc. Jan 08 17:50:42 and systrace, systrace in intellij sucks (dunno if it's better in studio) Jan 08 17:50:49 and those all run better from monitor Jan 08 17:50:56 (or only from) Jan 08 17:57:27 hm.. how would you go about snackbars and adbanners? Jan 08 17:57:38 where should the snackbar be? below, above, overlaying? Jan 08 18:00:58 yuck either way, it looks like ass Jan 08 18:01:07 indeed Jan 08 18:01:10 probably above the banner, though Jan 08 18:01:20 rather than interrupt your content, unless that's your goal Jan 08 18:02:15 its just a classical ¨FooBar deleted. Undo?¨ Jan 08 18:02:29 I guess I go with above Jan 08 18:02:35 thats easier to implement anyways Jan 08 18:07:00 I have the same fragment layout thats inflated for multiple fragments in a viewpager. I'm trying to click on a button, in that fragment with the id of button, but it tells me there are multiple of them in the view heircachy. how can this be? only one of my fragments is visible? Jan 08 18:08:51 because a viewpager may create views for multiple fragments at once Jan 08 18:12:24 Hm. If I put in an artificial delay, everything works. I have all my animator scales set to 0. So how do I wait for a tab swipe to be completed in espresso? Jan 08 18:16:46 shouldnt ctx.getSharedPreferences("com.company.someapp", Context.MODE_WORLD_READABLE); allow other app using the same code to load the sharedpreference? Jan 08 18:17:11 or is there something more to do Jan 08 18:18:40 something more to do Jan 08 18:18:51 any clues? Jan 08 18:20:59 https://www.google.com/search?q=android+sharedpreferences+of+other+apps Jan 08 18:22:37 i was able to do that myself... i was more wondering if someone here had narrower information Jan 08 18:22:50 hi, how do i get a list of applications that are in the 'downloaded' section and not all the apps on the device with PackageManager? Jan 08 18:22:56 (meanwhile that i'm going through the different google links) Jan 08 18:24:03 you obviously weren't able to do that yourself Jan 08 18:24:07 the answer was in the first link Jan 08 18:25:43 q=sharedpreferences%20android%20multiple%20applications <-- i was googling this Jan 08 18:25:48 maybe the results are different Jan 08 18:25:56 (im still in the process of reading the first page) Jan 08 18:26:44 and it's not necessarily clear to me what they're saying Jan 08 18:26:48 maybe i just don't know enough about android Jan 08 18:26:59 So I'm trying to set up a ViewPagerIdlingResource in espresso. I need to pass in my actual ViewPager into my idling resource. Any idea how to do that? Jan 08 18:27:01 point is... if you knew, why not just say it Jan 08 18:28:58 why? because fish give fishing, blah blah Jan 08 18:31:23 that totally make sense Jan 08 18:31:27 may as well close this channel Jan 08 18:31:35 since everything is on stackoverflow Jan 08 18:31:38 no? Jan 08 18:31:51 good bye then Jan 08 18:32:40 DrBenway: I ask bad questions too, but your question is super straight forward, you'd see that the solution is littered all over those search results Jan 08 18:33:08 somewhat i'm not inteligent enough to fully comprehend it Jan 08 18:33:20 or whatever i think i'm understanding from it isn't reflected when i try it in code Jan 08 18:33:24 Trivial and easily googlable questions are not interesting Jan 08 18:33:29 Hand holding is not interesting Jan 08 18:33:31 (sometime you need people to read the documentation for others...) Jan 08 18:34:25 It'd help if you say whats not working. Better yet, what you tried Jan 08 18:35:14 ok, i store a value from appA using what i showed above and am able to retrieve it from appA. but when i go to appB trying to retrieve that same value using the same code... the value isn't there Jan 08 18:35:18 what could be the cause? Jan 08 18:35:32 Back to ViewPagerIdlingResource I'm trying to implement. I have to pass it a ViewPager. Is there any easy way in espresso to just findViewById() to pass in a view? Jan 08 18:35:58 DrBenway, shared preferences are stored in the apps private directory. If you enter the package name to receive some shared prefs this does only change the name of the file in that directory Jan 08 18:35:58 DrBenway: Might have to do with everything besides PRIVATE has been deprecated? Jan 08 18:36:37 (my guess is that i'm missing something... it seems to be along the line that the package name needs to be the same? but there's also something about android:sharedUserId= in the manifest?) Jan 08 18:36:41 i'm not using private Jan 08 18:36:45 so you are still in the directory of the requesting activity with what you are doing now Jan 08 18:37:10 danijoo: your english is hard to read Jan 08 18:37:25 DrBenway, im sorry. I dont answer then. Jan 08 18:37:41 doesn't mean that you can't try to rephrase Jan 08 18:39:02 DrBenway, in App nr 1 you save the shared prefs with the package name as filename. this means the shared pref will be stored in /data/data/packagename/shared_prefs/packagename.xml Jan 08 18:39:26 The shared preferences getters take a file name, not a package/path/whatever. The Context infers the path Jan 08 18:39:41 from app B you try to access it, but with your current code it doesnt work because app B is looking for it in /data/data/package2/shared_prefs/package1.xml Jan 08 18:39:55 MODE_WORLD_WRITEABLE doesnt mean app B magically knows the directory Jan 08 18:40:04 Context.MODE_WORLD_READABLE is deppracated I'm pretty sure. Jan 08 18:40:07 its just for giving app B the permission to read it when it tries Jan 08 18:40:08 right, so thats why they're creating a context from a context? Jan 08 18:40:11 I start a new activity from my current one with startActivity() in which I need to dynamically create some views. How can I animate the views I create when the transition happens? Jan 08 18:40:27 and doing so will allow me to read the sharedpref from packagaA Jan 08 18:41:20 <_genuser_> contexts are androids way of complicating somethign that didn't need to be complicated. Jan 08 18:41:39 <_genuser_> if you're in teh same app, always try to shoot for getApplicationContext(). Jan 08 18:41:48 im still not sure to understand what are contexts Jan 08 18:41:54 they're the same as Activity? Jan 08 18:42:02 _genuser_, thats dangerous Jan 08 18:42:06 <_genuser_> there are some good articles on contexts Jan 08 18:42:09 you dont want app context always Jan 08 18:42:19 i keep seeing code that casts current activity to context Jan 08 18:42:20 <_genuser_> danijoo: I've heard it both ways. that you do and you do'nt always want app context. Jan 08 18:42:39 hurray for contradicting info Jan 08 18:42:42 :) Jan 08 18:42:42 _genuser_, If you want to create a view, dont use appcontext for example Jan 08 18:42:52 <_genuser_> I"ve settled on always using application context due to one overriding argument: resource leak. If you hold references to contexts in activities, etc. that are released, youthink they're gone, but they're not. Jan 08 18:43:03 <_genuser_> or if they're forcefully closed, then you start throwing exceptions. Jan 08 18:43:07 Ehm maybe I missed something obvious here, but how do I get the event when the user click on "OK" in a MultiSelectListPreference? Jan 08 18:43:17 What's the listener? Jan 08 18:43:33 <_genuser_> danijoo: yeah, I think in the onCreate if it gives you a context, I'd just use that one for view inflation. Jan 08 18:43:53 <_genuser_> danijoo: but for example for storing contexts in myown objects, etc. etc. I pass it app context vs. calling activity context. Jan 08 18:44:29 _genuser_, no. I mean if you are in an activity and you do `new ImageView(this)`, its a bad idea to change that into `new ImageView(this.getApplicationContext())` Jan 08 18:44:53 it all depends on if your object belongs to the activity or to the app Jan 08 18:45:11 everything else is just working arround leaks that shouldnt be there and will obfuscate the real problem in your code Jan 08 18:45:15 <_genuser_> danijoo: for that, I'd use activity, sure. image is bound to that activity. so easier to use that. Jan 08 18:45:45 if something should GC with the activity and it doesnt because you of the held context, the problem is somewhere else Jan 08 18:45:51 its better to fix it instead of using appContext Jan 08 18:46:09 <_genuser_> danijoo: I think, my always use app context comment should have been qualified. When you have objects, (non UI especially) that need to hold a reference and they're outside any specific activity, then app context is the easiest to use. Jan 08 18:46:11 ofc a global datrabase singelton should be appcontext in contract Jan 08 18:46:23 <_genuser_> danijoo: otherwise, you endup writing bunch of code to keep track of contexts. Jan 08 18:46:52 <_genuser_> singleton!! there shoudl never be a singleton in your code anywhere. Jan 08 18:47:38 _genuser_, tell that the application which is a singelton by definition :p Jan 08 18:47:45 I have an issue in the AVD Manager, when I select x86_64 for the system image ABI it says "repair image" but doesnt explain what is wrong?? Jan 08 18:48:08 singeltons are absolutly fine if you use them correctly Jan 08 18:48:14 <_genuser_> danijoo: it's really by android design. Jan 08 18:48:30 <_genuser_> danijoo: if you could launch multiple copies of the same app, it'd just be another object. Jan 08 18:48:45 rule of thumb - the more singletons you use the easier it is to reason about your software Jan 08 18:48:52 and saves on memory Jan 08 18:48:57 <_genuser_> danijoo: inside the application, there would be only one instance of the object to refer to itself. But there could be rereferences to other apps too. Jan 08 18:49:08 _genuser_, thats not a problem Jan 08 18:49:20 w4ffles_: uhm, and the more catch (Throwable t) you use, the less chance it will crash Jan 08 18:49:21 <_genuser_> singleton is pretty much never needed. and half the java devs would have a nervous breakdown if you say it to them. Jan 08 18:49:45 i dont care about what other java devs think Jan 08 18:49:55 I actually dont write much java code anymore Jan 08 18:50:11 <_genuser_> java and jdevs popularized singletons along with gurus with their blogs. for no reason other than to make it look like they were design patterning. Jan 08 18:50:31 singeltons are fine if you know how to use them. Jan 08 18:50:41 if you use them wrong, thats not a reason against singeltons Jan 08 18:50:57 <_genuser_> I have used quite a lot of singletons in ActiveX/COM because they helped share data between apps. intra process communication was much easier that way. Jan 08 18:51:09 messy baskets of state Jan 08 18:51:15 where I dont mean you with you, but 'people' Jan 08 18:51:20 <_genuser_> I think the question is: when is a singleton really need. Because "using them correctly" is subjective. Jan 08 18:51:44 <_genuser_> danijoo: haha, you don't have to clarify "you". I wasn't thinking you're talking about me. Jan 08 18:51:55 _genuser_, ok :) Jan 08 18:52:18 in most cases it doesnt matter if I store a global object in my application singelton or as a real singelton as static field Jan 08 18:52:29 you just have to know when this could cause problems and avoid those Jan 08 18:53:09 <_genuser_> mostly I disliked singletons because they're taught as a "design pattern" by a lot of people. and new devs feel like they're doing advanced programming as soon as they create a singleton. Jan 08 18:53:10 for example I have a class called Preferences that holds an application Context and has some wrapper methods arround sharedprefs. Jan 08 18:53:28 So I can do stuff like Preferences.getInstance().getBoolean(...) Jan 08 18:53:30 <_genuser_> this sort of led to a ton of singletons in the programming community when they weren't necessarily needed. Jan 08 18:53:59 <_genuser_> I dislike the entire getInstance() paradigm. Jan 08 18:54:01 could .getBoolean(...) just be static though? Jan 08 18:54:20 w4ffles_, then I need to pass a context to access the shared prefs Jan 08 18:54:23 <_genuser_> but I also disliked camelCase but have now just moved to using camelCase so my android/java code is visually similar to what's out there Jan 08 18:54:41 <_genuser_> that's the kinda stuff I don't care for. why need a context at all. Jan 08 18:54:43 w4ffles_, with a singelton i can pass it once in apps onCreate and then use it Jan 08 18:55:58 Ehm maybe I missed something obvious here, but how do I get the event when the user click on "OK" in a MultiSelectListPreference? Jan 08 18:56:19 <_genuser_> should your setonitemclicklistener handle your clicks? Jan 08 18:56:40 I would imagine an OnPreferenceChangeListener Jan 08 18:59:47 OnPreferenceChangeListener is used to validate what the user selected every time he selecs something Jan 08 19:00:05 I want to do something when the preference actual value changes Jan 08 19:01:08 Ribesg, iirc the value `actually changes` every time the user selects something Jan 08 19:01:22 danijoo, but there's a cancel button Jan 08 19:01:28 So it's not possible Jan 08 19:01:41 The value held by the Preference object, yes, but it's not "saved", right? Jan 08 19:01:43 <_genuser_> ^ that's my understanding too, that on SharePrefs as soon as you tap it, the item's stored. Jan 08 19:01:55 Ribesg, you should check that, im not sure Jan 08 19:01:58 Then what does the cancel button do Jan 08 19:02:08 <_genuser_> lol, make you feel better. Jan 08 19:02:18 Ribesg, dont assume it, check it :) Jan 08 19:02:18 <_genuser_> that you have control over your prefs. Jan 08 19:03:29 danijoo, _genuser_, looks like changes are only saved when you hit ok Jan 08 19:03:58 Found this https://gist.github.com/Ribesg/f1f026091f3e050665d5 Jan 08 19:04:06 Ribesg, then a preferencechangelistener should only be fired when ok is hit Jan 08 19:04:21 <_genuser_> getOnPreferenceChangeListener() - Returns the callback to be invoked when this Preference is changed by the user (but before the internal state has been updated). Jan 08 19:04:42 I thought it was called every time the user interacted Jan 08 19:04:45 Checking this now Jan 08 19:05:00 <_genuser_> there's a Preference.OnPreferenceClickListener too. Jan 08 19:05:09 <_genuser_> one is a click listener and the other a changelistener. Jan 08 19:06:14 <_genuser_> danijoo: what are you using for displaying preferences in your code. Jan 08 19:06:28 <_genuser_> PreferenceActivity or something? Jan 08 19:06:44 _genuser_, In my latest project PreferenceFragment Jan 08 19:06:51 in a normal activity Jan 08 19:07:07 <_genuser_> danijoo: I see. nice. I see the same in mine. Altho, I'm hosting it in a FragmentActivity. Jan 08 19:07:28 _genuser_, AppCompatActivity it is for me to be exact :) Jan 08 19:07:37 <_genuser_> so A extends FragmentActivity, then internal class PrefFragment extends PreferenceFragment. Jan 08 19:07:48 yeah pretty much the same im doing Jan 08 19:08:09 <_genuser_> danijoo: ah, most of mine are still activity because of imported code from Eclipse. But I think teh new projects that I"ve started for testing are AppCompatActivity Jan 08 19:08:38 For some reason I can select a system image with google apis but it does not actually save that config, it goes back to a non-google api one? Jan 08 19:08:55 <_genuser_> some boring work up ahead. I have a bunch of IntentServices doing work and Broadcasting status. I have to verify is now and to fix the bugs. Jan 08 19:10:25 Ok I'm still trying to test it but the dialog is empty ._. Jan 08 19:18:09 Oh, ok. seetDialogMessage actually replaces the whole content with your text. Weird. Jan 08 19:23:46 danijoo, you were right. PreferenceChangeListener is only called when Ok is hit. Jan 08 19:31:18 I finally released (sort of) the app I have been working on since June Jan 08 19:32:00 I think I will chill out for a few days Jan 08 19:59:41 Hey guys... I can not get this WebView to stick to the Layout I give it. It insists taking the entire screen as if I am using chrome Jan 08 19:59:42 http://pastebin.com/yPt46hkY Jan 08 20:00:04 I have been trying for quite a while to make it stick to the RelativeLayout I put it in but no luck Jan 08 20:06:42 Is there a way to find what height of a view will be with wrap_content without setting height to that value? Jan 08 20:08:11 cart_man: Any reason why you have RelativeLayout & FrameLayout in your XML? They are pretty useless Jan 08 20:14:27 astroduck: Well I tried using them in an attempt to solve my WebView problem Jan 08 20:14:44 astroduck: No matter what I do the WebView goes full screen Jan 08 20:16:38 put it in a dialog Jan 08 20:18:23 cart_man: So you mean this[http://pastebin.com/UfdqVPSM] doesn't work? Jan 08 20:19:16 astroduck: Would that not make my buttons disappear ? Jan 08 20:19:47 I'm downloading a set of resources with an async http library and I need to do something after each resource is downloaded, how can I synchronize this? Jan 08 20:19:49 cart_man: No, why would it? weight 1 means takes whatever's left, not take all of it Jan 08 20:20:58 frig: You lib probably has a callback or broadcast when a request completes, which lib is it? Jan 08 20:22:05 astroduck: but yea just tried it and still it took everything Jan 08 20:22:22 astroduck: I will paste the class code... and also a solution that I do not completely know how to call Jan 08 20:22:32 astroduck, Yes it does, it's loopj. I'm using it in an utility class, can I pass the activity's instance and call a method on that instance? Jan 08 20:23:41 but I need it to be synchronized in the sense that I'm doing some work, calling another activity for result etc. Jan 08 20:23:57 frig: NO!! Never pass activity instance to any async task, you'll cause memory leak Jan 08 20:24:24 astroduck: http://pastebin.com/VkSQ4b7d ...pretty basic stuff... the function in the "onBackClicked" it the one I do not know how to actually use Jan 08 20:24:32 at the moment it just loads google.com Jan 08 20:24:41 astroduck, ok, yeah I wasn't sure about that Jan 08 20:27:35 frig: Make your utility class take instance of AsyncHttpResponseHandler and put your code to start the activity inside it? Jan 08 20:28:23 Be sure to check if your activity hasn't finishes already in that AsyncHttpResponseHandler instance Jan 08 20:28:33 finished* Jan 08 20:28:38 astroduck: me ? Jan 08 20:28:51 cart_man: no, frig Jan 08 20:29:11 oh ok... could you please help me to understand how I should call this function ? - > http://pastebin.com/hyHG5qzr Jan 08 20:33:45 cart_man: I am still confused why your button is not visible, It should work, Jan 08 20:34:37 astroduck, Ok, I was using the approach from the website, implementing the callback inside the utility class method. But after how do I synchronize the results? Say I start a new activity for result for each resources and must wait until the user comes back to this activity. Jan 08 20:34:50 astroduck: You are not the only one... if the website havent loaded yet then you can clearly see the button which means it works BUT as soon as it loads it seems like its opening up another intent with the fullscreen browser Jan 08 20:35:05 and I guess shouldOverrideUrlLoading is for http links in your webview, ie, if you want system to use your webview to open new url or default browser Jan 08 20:37:09 astroduck: Yes that is what I want.. I want to open up a new URL inside my apps layout Jan 08 20:39:19 cart_man: maybe it's redirecting to another page? Try returning false from shouldOverrideUrlLoading, set this before loading the url Jan 08 20:39:39 As it says in docs "f WebViewClient is provided, return true means the host application handles the url, while return false means the current WebView handles the url." Jan 08 20:41:19 frig: So you want to start next request after user comes back to this activity? Jan 08 20:41:56 astroduck, Basically yes, or more generically after I'm done with some work to process the result. Jan 08 20:43:33 frig: You can pass activity instance to callback, thats safe, or to the utility class, but don't use that in the async part, use startActivityForResult to start the new activity and in onActivityResult start next HTTP request Jan 08 20:45:05 astroduck, What if I just need to do some work that is not starting a new activity for result? Where do I start the new request? Jan 08 20:45:37 can I do it in the callback? Jan 08 20:45:42 Yes Jan 08 20:46:23 Alright guys, its getting pretty late. So good night ZZZzzzZZZ Jan 08 20:46:40 Kinda all over the place Jan 08 20:46:46 thanks Jan 08 20:47:25 astroduck: this code is sufficient to load a URL ? -> http://pastebin.com/30MWRA8E Jan 08 20:48:18 Hi guys! I'm trying to get auth token using GoogleAuthUtil.getToken() method and it always throws com.google.android.gms.auth.GoogleAuthException: Unknown \ at com.google.android.gms.auth.GoogleAuthUtil.getToken(Unknown Source) Jan 08 20:48:18 I have registered OAuth 2.0 IDs in the developer console but whenever I'm tring to use it in the scope parameter in getToken() method it diesn't work and returns mentioned exception. Jan 08 20:48:41 Has anybody faced this problem? Jan 08 21:13:00 is it necessary to implement a fragment's listener on the activity itself? Jan 08 21:13:59 I know they're usually designed to throw exceptions if the activity doesn't implement it but what I'm asking is if it's possible to encapsulate that listener instead of implementing it on the activity Jan 08 21:15:38 how do I add an icon to my app? Jan 08 21:36:51 how to add a library to project on Eclipse ? Jan 08 21:39:46 Does anyone know of any SDK aggregation services where you can easily try a number of different monetization SDKs in your games? Jan 08 21:40:26 Has anyone ever encountered a "logcat read failure: No such file or directory" error when trying to run logcat in an adb shell? Jan 08 21:41:24 You don't run logcat in adb shell Jan 08 21:41:29 Just adb logcat Jan 08 21:42:46 It ends up doing the same thing either way with the same error, I just can't find anything different about this android image vs. the one I based it on that is working properly Jan 08 21:43:00 permssions, files system, etc all seem the same Jan 08 21:51:13 how can you create a drawable that animates like a marquee? Jan 08 21:51:45 for example if you want to define a drawable for indeterminate progress Jan 08 21:55:15 http://arstechnica.com/gadgets/2016/01/2016-google-tracker-everything-google-is-working-on-for-the-new-year/3/#h1 Jan 08 21:55:24 when i compile project on eclipse, it tries to install my app to emulator. How can i install it directly to connected to usb device ? Jan 08 22:00:24 choose as running device from adb list Jan 08 22:00:26 How can I fade the background colour of a view? Jan 08 22:01:03 AKK9: Have you tried backgroundTint property ? Jan 08 22:01:06 just a guess though Jan 08 22:01:26 I found lot of answers that change the colour bit by bit in a loop every 10ms Jan 08 22:01:33 But that can't be right. Jan 08 22:01:45 cart_man: I mean fade from white to yellow for example. Jan 08 22:01:56 Fade from one colour to another. Animated. Jan 08 22:03:16 AKK9: Well I cant imagen how you will handle the colours though Jan 08 22:03:28 I can but I think the effort to make it work will be quite heavy Jan 08 22:07:10 cart_man: As in, I could change the background by incrementing each RGBA int in a loop. Jan 08 22:07:15 But that seems like a bad solution Jan 08 22:07:56 I found a thing called ValueAnimator, I think I can use this Jan 08 22:10:00 um Jan 08 22:10:23 what do I do when it can't find my R.java... the editor thinks it doesn't exist but it does. The code compiles and runs but it says I have errors Jan 08 22:30:49 what does that means: no rule for build target AssertManager.cpp needed for AssertManager.o ? Jan 08 22:31:40 it means precisely that Jan 08 22:31:45 your makefile or sources are busted Jan 08 22:45:20 hi, just bought my first android phone. What is a good book to buy for android app development? Simple apps, not games. And no, I don't need a "learn how to program" type book. Jan 08 22:46:04 d.android.com is always the best place to start Jan 08 22:46:10 books arent needed Jan 08 22:46:15 assuming you know java to begin with Jan 08 22:46:51 the Big Nerd Ranch book is pretty good Jan 08 23:08:05 pfn: that site looks pretty good Jan 08 23:29:36 how to add plain test dir in IDEA? Jan 08 23:31:20 can't recall Jan 08 23:40:00 sourceSets.test.java.srcDirs += 'src/test/kotlin' Jan 08 23:40:02 makes no good Jan 08 23:43:41 * pfn shrugs Jan 08 23:44:09 ah, forgot to switch from instrumentation tests to unit tests in idea Jan 08 23:44:20 in build variants Jan 08 23:45:02 * vigilancer need to make a sticker or something Jan 08 23:52:55 s73v3r: isn't it outdated? Jan 08 23:53:18 no. they released a second version this summer Jan 09 00:00:19 ... Jan 09 00:01:06 I want to be able to launch an intent from my app that allows the user to use the camera to take pictures, take video or select media from the gallery Jan 09 00:01:11 is that possible? Jan 09 00:01:27 bascially the camera app that is installed on everyone android phone Jan 09 00:01:47 however I only see examples for doing video capture only or image capture only Jan 09 00:03:21 usually apps have 'take picture' or 'pick file' as two options Jan 09 00:03:46 and yes, you can send an intent to camera to take a photo. I don't recall what it is offhand, internet can tell you tho it's pretty simple Jan 09 00:13:36 I've tried searching, couldn't find anything Jan 09 00:14:37 basically I need to be able to select the built in camera app, that has everything I'm looking for Jan 09 00:16:56 http://developer.android.com/guide/topics/media/camera.html specifically the parts about camera intent Jan 09 00:17:04 why not have separate buttons for taking pictures, taking video, or gallery? Jan 09 00:17:21 but yes, if you're picking from the gallery, that's a separate action Jan 09 00:18:16 interface requires a FAB button to launch all three functions Jan 09 00:18:37 I might have to build it all out instead Jan 09 00:18:39 so pop a popup after clicking it to allow the user to choose Jan 09 00:19:02 and tell them tough shit; the platform doesn’t support exactly what they want it to do Jan 09 00:19:32 s73v3r that's another option too Jan 09 00:19:54 Untapped does that with their app Jan 09 00:20:24 you click the “Add Photo” button, and then there’s a picker dialog that offers “Use the Camera” and “Pick from Gallery" Jan 09 00:20:58 s73v3r can you point me to a url that has the code for that? Jan 09 00:21:12 no Jan 09 00:21:20 i just opened the app and looked at it Jan 09 00:21:25 don't copy people's code Jan 09 00:21:26 but it should be simple enough to write on your own Jan 09 00:21:56 ok I'll do some research, I gotta catch a train now.... Jan 09 00:29:19 * vigilancer abandoned Textual for Weechat Jan 09 00:29:37 vigilancer what happened? Jan 09 00:30:05 found out former is js based Jan 09 00:30:10 ) Jan 09 00:30:22 lol, it uses webkit ... Jan 09 00:30:30 but its not 'js based' Jan 09 00:30:37 themes are Jan 09 00:30:53 so what? Jan 09 00:31:05 did you actually have any problems with it? Jan 09 00:31:09 just kidding. was trying to reduce memory footprint Jan 09 00:31:25 no, no problem at all Jan 09 00:31:29 and was it a significant contributor? And does your new alternative help that? Jan 09 00:31:44 my textual instance is taking 65mb Jan 09 00:32:00 i guess weechat is probably ~5mb ? Jan 09 00:32:06 yeah, but interface freezing some time on huge logs Jan 09 00:32:16 thats like one web page in chrome :D Jan 09 00:32:31 no idea honestly about weechat footprint Jan 09 00:33:10 vigilancer our of curiosity, can you check ? Jan 09 00:33:35 hm.. I can try. sec.. Jan 09 00:34:19 i was going to try it, but don't use brew. if they had osx binaries i'd give it a try Jan 09 00:34:43 just for fun ;) Jan 09 00:37:49 private mem - 3,8 | memory - 12,8 | in Activity Monitor in os x Jan 09 00:38:17 was about 60 - 500 for textual I believe Jan 09 00:39:34 g00s: you can look at brew package to see if there are any quirks about os compilation for package Jan 09 00:40:03 i think i needed libgcrypt and libicu or something Jan 09 00:40:12 was just too lazy to build by hand Jan 09 00:40:56 i've never had had textual go over 65mb, if it was 500mb i'd probably be looking for something else too Jan 09 00:41:08 g00s: cmake, gnutls, libgcrypt, gettext Jan 09 00:41:35 no a fan of brew? Jan 09 00:41:56 i already use gnu stow to manager /usr/local ... i'd have to figure out someplace else for brew to put things Jan 09 00:42:15 also don't really like that it changes permissions of /usr/local too ... or at least used to Jan 09 00:42:39 and .. how do you trust anything you get from brew ? Jan 09 00:42:55 if it pulls in gnutls, how do i know it wasn't fucked with :D Jan 09 00:43:12 how you trust stuff from any package manager? :) Jan 09 00:43:21 i fail to see how that’s any more of a concern than anything from Apt Jan 09 00:43:23 or MacPorts **** BEGIN LOGGING AT Sat Jan 09 00:45:35 2016 Jan 09 00:46:06 well for server, i'll bet it will come to desktop cometime Jan 09 00:46:25 they said the same for package manager Jan 09 00:46:37 theres still no good one for windows Jan 09 00:46:44 (beside choco niche) Jan 09 00:46:58 but noone uses choco Jan 09 00:47:33 failing to understand how windows can be good for development Jan 09 00:48:03 C# and visual studio Jan 09 00:48:16 C++ and Visual Studio Jan 09 00:48:22 vigilancer, its the Jan 09 00:48:22 lowest common denominator for me ;) Jan 09 00:48:29 if you’re not doing one of those, then yeah, you’re pretty right Jan 09 00:48:39 s73v3r: even without visual studio there's a lot of stuff Jan 09 00:48:59 though a lot of it is *usually* packaged together, even if it's freely available outside of VS Jan 09 00:49:08 not as good as there is on OS X or Linux Jan 09 00:49:39 yes, besides visual studio) Jan 09 00:50:14 danijoo: what do you mean? Jan 09 00:50:36 some is IMO actually better, but a lot of stuff is undocumented and undiscovered and people who barely know *nix tools usually can't be arsed to learn wildly different stuff... Jan 09 00:50:36 vigilancer, its my home machine Im developing on. I need to do other stuff there too. thats why its windows Jan 09 00:50:45 yes, I could dual boot Jan 09 00:50:49 but no, I wont Jan 09 00:51:41 Has anyone an idea what a `novel view` is in android? my english fails me here :( Jan 09 00:52:28 novel view ... special view ? weird Jan 09 00:52:34 maybe just maybe it's about orienttion Jan 09 00:52:53 thats the context (udacity cource) : http://prntscr.com/9nrx1r Jan 09 00:53:16 I first thought they mean custom view group. But thats already the point #1 Jan 09 00:53:28 maybe something with custom onDraw? Jan 09 00:54:25 seems like some "specific to this course custom view" to me Jan 09 00:54:59 its one of the points how they 'rate' the project you send in to get rated Jan 09 00:56:06 novel = "new, fresh, unorthodox" Jan 09 00:56:28 yeah but isnt that the same as the custom view mentioned above? Oo Jan 09 00:56:34 "such a fancy view", they said) Jan 09 00:58:52 yeah, maybe you are right and it's about onDraw Jan 09 01:02:38 s73v3r i would trust apt , on a distro like ubuntu. somebody has to maintain packages , so we trust them implicitly. but for brew, i have no idea who's maintaining those Jan 09 01:02:50 (trust canonical) Jan 09 01:02:58 you have no idea who is maintaining the packages on apt, either Jan 09 01:03:18 if i'm using the canonical repos, isn't it just them ? Jan 09 01:03:26 i would expect canonical to build all the packages Jan 09 01:04:18 if i'm adding a PPA from some random place, then yeah Jan 09 01:04:37 * g00s hasn't done this in years, terminology may be a bit rusty Jan 09 01:07:44 g00s: --build-from-source is passed, compile from source even if a bottle is provided for formula. Jan 09 01:07:55 from #man brew Jan 09 01:09:11 can be tricky with some dependencies I suppose. but you get the idea Jan 09 01:21:56 why would my AndroidManifest.xml have and tools:overrideLibrary tag in it, in my apk, when it doesnt in my source code? Jan 09 01:22:14 also, its for a library i am not using, but one of my dependencies is? Jan 09 01:27:54 dr_infernoo, the resulting manifest is a merged one from yours and the ones of the included library projects Jan 09 01:28:00 so some other might have added that Jan 09 01:29:58 ok thats kind of what i thought, its just weird Jan 09 01:30:44 i cant get my project running, because of a NoClassDefFoundError, but i know the class its talking about is included in the dex file(s), so im looking at everything Jan 09 01:31:30 are you using proguard? Jan 09 01:31:52 nope Jan 09 01:32:01 multidex? Jan 09 01:32:11 yep Jan 09 01:33:03 hm. I thought the ClassDef errors are all patched now and it does that automagically. Jan 09 01:33:42 and in my apk, i definitely have multiple dex files (like 50), and i cracked them open, and inside classes.dex (the first one?), i see my BaseActivity Jan 09 01:33:50 how would i go about fixing it manually? Jan 09 01:39:10 is that multidex.keep? Jan 09 01:44:05 50? Jan 09 01:44:13 oh, that's normal on min=21 Jan 09 01:44:45 does TextureView still not work on the emulator? I thought that might have gotten better, but I still get a black box. Jan 09 01:48:06 yeah, pfn, i wasnt surprised by how many, just giving a reference of what i was seeing Jan 09 02:17:12 Hey I am getting Error:(21, 27) No resource found that matches the given name (at 'textSize' with value '@dimen/abc_action_bar_title_text_size') Any way to find or replace it with the correct dimen Im assuming from app compat library? Jan 09 02:21:35 Eh maybe ill have to ask later when channel more active. Ill formulate a better question too. ty **** ENDING LOGGING AT Sat Jan 09 02:59:58 2016