**** BEGIN LOGGING AT Fri Nov 13 02:59:59 2015 Nov 13 03:11:38 I've searched Google but am unsure of up to date resources. Does anyone know where to find information for a beginner on creating lock screens and launchers? Nov 13 03:45:06 lock screens and launchers are not a beginner project Nov 13 03:45:14 if you want to create a launcher, start by modifying the aosp launcher Nov 13 03:45:25 g00s, how unfortunate, support saf anyway, and drive your users to upgrade Nov 13 04:56:55 hey Nov 13 04:56:59 Hello Nov 13 05:35:15 I've gotten two emails about a Google Merchant survey. The email looks legit but the URL doesn't. Here is the URL for the survey: https://googlesurvey.ipsosloyalty.com/Gtech/Page50.aspx Nov 13 05:35:37 Has anyone else gotten this? I looked up the company. I just doubt Google would be using them for a real survey. Nov 13 05:36:08 surf2b1, are you typing your credentials in? Who really cares about surveys anyways Nov 13 05:36:47 poutine, no. I didn't take it. I don't really care about them but I spam is annoying. Just wondering... Nov 13 06:00:23 surf2b1: Please don't paste malware links here Nov 13 06:00:52 i got a malware wanting going to the androidplot downloads page Nov 13 06:00:59 s/wanting/warning Nov 13 06:03:34 so it's for sure malware? I guess I'll mark it as spam. Nov 13 06:04:44 here is not the place to do that research Nov 13 06:08:15 i say this every time new AS version is eminent; but i hope the next one is better than this one - 1.4 has been cursing me with the damn beachball on a daily basis Nov 13 06:08:53 canvs2321, okey dokey (╭ರ_⊙) Nov 13 06:11:10 g00s: 1.4.1 works for me just fine Nov 13 06:11:13 (on linux) Nov 13 06:16:21 gordon_ it has to do with adb somehow, this just started in 1.4 on mac. i have to keep killing adb, that gigantic piece of crap Nov 13 06:20:49 adb and android studio are seperate things, are both giving you grief independently? Nov 13 06:21:16 AS uses adb Nov 13 06:21:26 they work fine independently Nov 13 06:22:13 AS utilizes adb, if your adb binary is faulty it may affect users(AS) Nov 13 06:23:07 what version of adb are you using Nov 13 06:23:13 AS and adb work fine most of the time, just several times per day AS hangs and the only remedy seems to be to kill adb Nov 13 06:23:16 the newest Nov 13 06:24:01 once i kill adb, AS UI becomes unfrozen Nov 13 06:24:34 this is been a recent thing, i don't recall 1.3 ever doing this ;) Nov 13 06:24:59 *they did something on the ui thread" :P Nov 13 06:27:29 I want to use the Material Theme. So I set this "@android:style/Theme.Material.Light.DarkActionBar" as the parent of "AppTheme" in the res/values-v21/styles.xml Nov 13 06:27:36 So I have to set the MainActivity to extend the Activity class. Nov 13 06:27:46 Now for API<21, I want to use the AppCompatTheme. So I set this "Theme.AppCompat.Light.DarkActionBar" as the parent of "AppTheme" in the res/values/styles.xml Nov 13 06:27:51 But then I have to set the MainActivity to extend the AppCompatActivity class instead and then it shows an error with the Material Theme Nov 13 06:29:01 well if you want to use an appcompat theme you need to use appcompatactivity...? Nov 13 06:30:24 hm i'll try ADB_TRACE Nov 13 06:30:34 mbtamuli12, just use appcompat theme for all Nov 13 06:31:08 pfn: That works. Nov 13 06:31:35 g00s, you need to get a non crappy computer Nov 13 06:31:55 I don't have problems with adb in Windows or mac Nov 13 06:32:09 pfn: But isn't AppCompat just a support library? Wouldn't it be better if we could use the actual Material Theme? Or are they same? Nov 13 06:32:11 yes indeed, but this just started with AS 1.4.x ... Nov 13 06:32:20 mbtamuli12, same Nov 13 06:32:43 pfn: Oh. Okay. Nov 13 06:32:56 pfn: Thanks Nov 13 06:33:08 g00s, I remember you complaining about this long before Nov 13 06:33:21 AS 1.4 has been out for a while :) Nov 13 06:33:24 issues with adb all the time Nov 13 06:33:34 oh yes but a lot of people have issues with adb Nov 13 06:33:53 not really Nov 13 06:34:58 i dont Nov 13 06:35:03 I dont Nov 13 06:35:24 my only problem is gradle being slow Nov 13 06:36:24 eh this might be it https://code.google.com/p/android/issues/detail?id=82425 Nov 13 06:38:42 gordon_, already gave you solution to Gradle being slow Nov 13 06:38:59 yes I know ;) Nov 13 06:39:18 for now I'm looking at bazel, just because it's fun Nov 13 06:39:45 You should look at Kobalt too :) Nov 13 06:40:07 ... Nov 13 06:40:29 but kobalt can't build android Nov 13 06:40:34 and why look at bazel... Nov 13 06:40:42 It can, partially so far Nov 13 06:41:06 http://beust.com/weblog/2015/11/04/the-kobalt-diaries-android/ Nov 13 06:44:23 pfn: it's nice, fast and isolated Nov 13 06:44:30 got also support for many languages Nov 13 06:45:00 gordon_, it can't build android either Nov 13 06:45:06 it. can only do rudimentary Nov 13 06:45:19 it can build android Nov 13 06:45:40 at least it can for me Nov 13 06:46:20 it barely does android Nov 13 06:46:25 might as well use ant Nov 13 06:46:43 anyway, I give up on you :p Nov 13 06:46:44 what do you mean by barely Nov 13 06:46:46 haha Nov 13 06:47:33 by barely, I mean bazel builds android about as well as ant does Nov 13 06:47:54 can ant downlod dependencies from maven ? Nov 13 06:48:12 bazel can't Nov 13 06:48:24 ant can if you use ivy Nov 13 06:48:27 bazel can Nov 13 06:48:33 and yes, ant. can Nov 13 06:48:37 Also, build flavors? Manifest merging? Nov 13 06:48:48 bazel does none of those Nov 13 06:51:14 I think you can specify many android_binaries http://bazel.io/docs/tutorial/android-app.html Nov 13 06:51:21 so you will get flavours Nov 13 06:51:44 as for manifest, on this site you have two manifests - one for android_binary and one for android_library Nov 13 06:51:49 flavors implies directory overlays Nov 13 06:52:03 and manifest merging is much more flexible than two distinct manifests Nov 13 06:52:44 has anyone been playing around with gradle-ng ? Nov 13 06:52:50 yeah, that's practically no parts of the android build Nov 13 06:53:06 g00s: Gradle-ng? Nov 13 06:53:12 just bare minimum Nov 13 06:53:38 CedricBeust whatever is supposed to come after 1.5.0 or 1.6.0, xav mentioned it at I/O Nov 13 06:53:57 CedricBeust: directory overlays? Maybe I dont see a problem, but why dont specify different library dependencies and put them into folders like flavours Nov 13 06:54:03 CedricBeust http://tools.android.com/tech-docs/new-build-system/gradle-experimental Nov 13 06:54:09 Maybe I dont see the whole picutre Nov 13 06:54:11 *picture Nov 13 06:54:46 gordon_, you don't, that's why you think bazel implements all the features in Android builds Nov 13 06:55:02 it does as much as ant Nov 13 06:55:06 not much more Nov 13 06:55:27 gordon_: Are you familiar with build variants? Types and flavors? Nov 13 06:55:32 yes Nov 13 06:55:42 They work with directory overlays Nov 13 06:55:55 That's done before the compilation phase Nov 13 06:56:20 not quite Nov 13 06:56:31 they're just added to source paths Nov 13 06:56:49 ... in a specific order Nov 13 06:58:00 I don't believe they're added to the source paths by the way, they are all copied in a temporary directory in the order specified, for the overlay effect Nov 13 06:58:06 prepended Nov 13 06:58:12 and not really Nov 13 06:58:30 sources don't get copied, or they shouldn't, resources get merged though Nov 13 06:59:55 I don't recall seeing intermediates sources in gradle builds Nov 13 07:00:28 I'm just speculating how it can be done, haven't looked at the implementation. There are various ways to obtain this effect Nov 13 07:00:46 basically just adding to source paths Nov 13 07:01:31 but yes, that's true. bazel is not advanced now Nov 13 07:02:01 The problem I see with bazel is twofold: it doesn't support Android well and it doesn't seem to be designed in a flexible enough fashion to Nov 13 07:02:32 bazel is just a toy for android builds at the moment Nov 13 07:02:51 wonder if they will replace gradle with bazel in the future Nov 13 07:02:58 nope Nov 13 07:03:00 gradle-experimental is 0.4.0 - oh that brings back the memories of existing gradle-plugin 0.4.0 - will wait for stable :D Nov 13 07:03:17 they plan for android-studio integration Nov 13 07:04:12 that's easy, write a plugin Nov 13 07:04:17 As long as they don't get rid of Groovy, there's only so fast they can make gradle Nov 13 07:04:17 doesn't mean much Nov 13 07:05:28 CedricBeust, it's really not. the groovy processing that makes gradle slow Nov 13 07:05:42 it's all the auxiliary processing in Android builds Nov 13 07:06:02 I don't think so, I'm seeing similar slowness in non android builds Nov 13 07:06:10 I find maven and gradle have very similar build times Nov 13 07:06:15 multiple projects, reading multiple settings.gradle and incuding build files, etc... Nov 13 07:07:22 Which is why I'm trying to start from a clean slate with kobalt Nov 13 07:07:46 klean slate Nov 13 07:08:24 only thing I like about gradle is that it has a somewhat reasonable tooling api Nov 13 07:08:50 It works but it's very arcane and the plug-in architecture is... well, eight years old. We know better today. Nov 13 07:09:48 I'm building Kobalt's plug-in architecture based on IDEA and Eclipse's own plug-in architecture, it's working pretty well so far Nov 13 07:11:35 is it fast ? Nov 13 07:11:39 ;) Nov 13 07:12:00 gordon_: Did you read the blog post I linked above? Nov 13 07:12:22 CedricBeust, 5 seconds for a trivial build is hard to say is fast Nov 13 07:12:26 CedricBeust so you have an OSGi container already ? :P Nov 13 07:12:32 oh, no Nov 13 07:12:34 Well, gradle takes 30 seconds so I'd say it's encouraging Nov 13 07:12:44 will take a look Nov 13 07:12:50 http://beust.com/weblog/2015/11/04/the-kobalt-diaries-android/ Nov 13 07:13:06 nice, 4 sec Nov 13 07:13:09 CedricBeust, how complicated is your example project? Nov 13 07:13:28 Simplest application you can compile Nov 13 07:14:05 build flavors and manifest merging will add close to zero overhead to that Nov 13 07:14:29 My goal is to build u2020, it will be a good example Nov 13 07:14:38 true that Nov 13 07:14:58 what about ndk ? Nov 13 07:15:15 googleClient aint getting connected on Marshmallow :| Nov 13 07:15:30 has anyone expeirenced this ? Nov 13 07:15:36 ndk is a secondary goal but hoping to get there too eventually Nov 13 07:15:57 ndk seems to be secondary goal for everyone ... :) Nov 13 07:16:10 or tertiary, etc Nov 13 07:16:11 unless it's needed :P Nov 13 07:17:37 https://gist.github.com/pfn/cb87676183d6a77bd4b3 Nov 13 07:17:43 for a comparison Nov 13 07:18:07 See, that's the kind of ballpark that's normal Nov 13 07:18:11 gradle is just beyond help Nov 13 07:18:33 pfn: with scala or without? Nov 13 07:18:36 Even 5 seconds is long if you time each phase individually. aapt, dx and javac run in an instant Nov 13 07:18:38 is it gradle or is it jvm Nov 13 07:18:46 gordon_, most trivial possible app Nov 13 07:19:05 CedricBeust, dx is extremely long for large appa Nov 13 07:19:31 That's fine, as long as the build tool adds very little to these incompressible delays. gradle completely fails at that Nov 13 07:21:39 CedricBeust have you benchmarked kobalt against gradle-experimental ? Nov 13 07:21:51 No. Nov 13 07:22:25 I would be very surprised if even gradle-experimental comes close to the times pfn and I have shown Nov 13 07:29:31 guess I'm loosing Nov 13 07:29:41 but ugh.. I got appcompat and support-v4 Nov 13 07:43:23 Intel_x86_Atom_System Image is right image selection OSX, right ? Nov 13 07:44:30 pfn: did you have something like plugin to sbt which could start with gradle project quickly / Nov 13 07:44:40 yes Nov 13 07:44:53 What is required for sbt ? Nov 13 07:44:57 requirement* Nov 13 07:45:06 gradle is also a build tool, right ? Nov 13 07:45:19 pfn: does it support kotlin ? (got kotlin project in gradle) Nov 13 07:45:26 yes Nov 13 07:45:30 https://github.com/pfn/android-sdk-plugin/blob/master/GRADLE.md Nov 13 07:45:45 thank you Nov 13 07:46:02 https://github.com/pfn/kotlin-plugin Nov 13 08:04:10 aww, my gradle. build plugin can't do u2020 Nov 13 08:04:44 It doesn't grok doing flavorBuildtype source directories Nov 13 08:05:22 Maybe I'll have to hack it in Nov 13 08:19:52 why when now creating a new project, it creates a .DarkActionBar theme, but then does a NoActionBar theme and sets windowActionBar to false? http://prntscr.com/927oqy Nov 13 08:20:09 doesnt that make using the .DarkActionBar theme redundant? Nov 13 08:21:16 Permissions will be enabled by default in Masrhmallow right ? Nov 13 08:24:31 orbyt_, they want you to use your own Toolbar, set it as Actionbar and apply the DarkActionBar style to it. Nov 13 08:25:40 danijoo: well a toolbar is already created and set as actionbar by default. Im just saying, couldnt they do something like Light.NoActionBar, and then omit the rest of that style? Nov 13 08:26:48 what rest ? the "DarkActionBar" ? Nov 13 08:27:39 no the AppTheme.NoActionBar part Nov 13 08:28:10 if you dont add NoActionbar, the system will display a default Actionbar for you, and you cant use a custom toolbar Nov 13 08:28:23 I know.... Nov 13 08:28:45 thats not what you usually want Nov 13 08:28:53 because you cant do the fancy material things with that Nov 13 08:28:58 like hiding it on scroll etc Nov 13 08:29:00 Again, im asking why use DarkActionBar, when it then uses .NoActionBar Nov 13 08:29:16 Instead of using .NoActionBar in the first place Nov 13 08:29:35 because the DarkActionBar is then applied to the custom Toolbar Nov 13 08:30:04 NoActionBar = "Dont show the default actionbar" + DarkActionBar = "If I add one myself, make it dark" Nov 13 08:30:14 https://blog.xamarin.com/wp-content/uploads/2014/08/Themes.png Nov 13 08:30:36 try to remove the DarkActionbar and see what happens :) Nov 13 08:31:32 Changing from Light.DarkActionBar to Light.NoActionBar results in the exact same thing. Thats my point Nov 13 08:33:05 DarkActionBar should give you darker Toolbars if you apply the theme to them Nov 13 08:35:09 ah i had colors overriding it -.-. I see what your saying now Nov 13 08:35:14 ty Nov 13 08:37:36 if you change the default colors, it indeed doesnt matter (beside it also changes the textcolor from black to white Nov 13 08:38:21 well thats what i was looking at, the text color, but it wasnt changing which was confusing me Nov 13 09:02:01 Anyone know of a library that will do some simple syntax highlighting for a TextView? Nov 13 09:11:10 should I use android-ndk x86 or x64? Nov 13 09:32:03 Pfn does it work with crashlytics and stuff like that ? Nov 13 09:39:41 hey guys, I can't get my phone to be recognized in Eclipse as a device to build my application to. I have USB debugging enabled, and it's plugged in. It's a Samsung Galaxy S5. Does anyone have any suggestions? Nov 13 09:47:16 is SO down for anyone else? Nov 13 09:47:30 Rush2112: what's your OS Nov 13 09:48:01 Windows 8 Nov 13 09:48:22 the device does show up on my computer, i just cant find it in eclipse Nov 13 09:52:51 Rush2112, can you find it with "adb devices" ? Nov 13 09:53:45 where would i find adb devices at? Nov 13 10:00:12 Rush2112, what does your app do? Nov 13 10:02:56 it's just a thing for school where we have to build a tip calculator. i just cant get it to run on my phone since eclipse isnt picking up the device Nov 13 10:04:07 how have you been testing, using emulator? Nov 13 10:04:48 do you have usb debugging enabled on your device? Nov 13 10:06:21 Hello Nov 13 10:08:05 I'm wondering if the memory between the graphic card and the CPU is shared Nov 13 10:08:22 I have a memory issue, and I want to know where I can look for it Nov 13 10:08:53 start with your code Nov 13 10:11:07 yes i have been using Genymotion for an emulator Nov 13 10:11:12 and yse i have usb debugging enabled Nov 13 10:11:30 do adb devices in command prompt Nov 13 10:11:43 show adb devices output Nov 13 10:12:07 gordon_: where do i go to do that? Nov 13 10:12:15 command prompt Nov 13 10:12:31 where do you have your sdk installed in ? Nov 13 10:12:46 i'm not really sure how to check that Nov 13 10:13:36 oh its in users/username Nov 13 10:14:10 what command do i need to actually input in command line? i dont use it often Nov 13 10:14:19 "adb devices" Nov 13 10:14:25 it'll list any devices it finds Nov 13 10:14:36 adb is the program, devices is the argument you are passing it Nov 13 10:14:47 "adb devices" is not recognized as an internal or external command Nov 13 10:15:05 no bueno, how did you install the sdk Nov 13 10:15:18 i dont remember Nov 13 10:15:29 im looking at my android sdk manager and im in the right directory Nov 13 10:15:36 you need to add the path of the sdk tools to the windows path, otherwise you'll need to run adb from the folder it is in Nov 13 10:16:09 i dont quite understand. i have my command prompt navigated to the correct directory. is there something else i have to do? Nov 13 10:16:24 you need to read "how to install and use android sdk" Nov 13 10:16:46 i have it installed, i know that. im looking at all the files Nov 13 10:17:17 i also have the android sdk manager program open Nov 13 10:17:28 show a screen shot Nov 13 10:18:04 of the failed adb devices with the dir of the cwd Nov 13 10:18:10 http://imgur.com/eA5KFlg Nov 13 10:18:52 you need to go into the platform-tools folder in the sdk Nov 13 10:20:02 ok, adb devices gives me a blank list of devices Nov 13 10:20:12 the phones plugged in and i have usb debugging enabled Nov 13 10:20:21 plus you are gonna need to add the sdk to your windows path, and make sure eclipse is pointed to your sdk folders and it can run adb Nov 13 10:20:32 the phone shows up in WINDOWS as Galaxy S5 as well Nov 13 10:21:15 what version of windows, and have you installed any drivers for your s5? Nov 13 10:21:44 ive already made sure eclipse is pointed to my sdk folders Nov 13 10:21:45 Windows 8 Nov 13 10:21:51 and no but i think some installed automatically? Nov 13 10:23:18 you may need to install additional. not 100% though Nov 13 10:23:19 http://www.technobuzz.net/install-galaxy-s5-samsung-android-usb-drivers-pc/ Nov 13 10:24:54 wow that looks incredibly sketchy Nov 13 10:25:00 have you unplugged the device and replugged since enabled usb debugging, or always been plugged in? Nov 13 10:25:08 yeah but ill do it again Nov 13 10:25:43 can always install the driver thing i believe koush released. Nov 13 10:26:17 when ever it does find your device you'll have to accept a rsa confirmation to allow your pc to use your device through adb Nov 13 10:26:47 ok like Nov 13 10:26:48 and different drivers are used for usb debugging and just having the s5 show up in explorer as a mass data storage device Nov 13 10:26:49 my computer recognizes the device Nov 13 10:26:59 it knows its a galaxy s5 Nov 13 10:27:02 how Nov 13 10:27:10 like you can see the sdcard contents in explorer? Nov 13 10:27:13 yeah Nov 13 10:27:17 that isn't the same Nov 13 10:27:38 you'll have a different driver for usb debugging than the device showing in explorer Nov 13 10:28:25 you'll need to google setting up s5 for usb debugging on windows. there are just too many variables for me to try to decipher Nov 13 10:29:43 check out stuff like this http://stackoverflow.com/questions/24264562/adb-is-not-recognizing-my-device Nov 13 10:30:23 http://developer.samsung.com/technical-doc/view.do?v=T000000117 etc... Nov 13 10:30:28 im hunting for the drivers right now Nov 13 10:30:31 just gotta get the right driver to work with usb debugging Nov 13 10:35:02 awesome that fixed it Nov 13 10:36:35 cool Nov 13 10:37:32 hello can anyone help me with this? Nov 13 10:37:33 http://stackoverflow.com/questions/33690777/unreachable-statement-on-android-studio Nov 13 10:39:10 racoonfox12, that return; doesn't help Nov 13 10:39:39 it exits your method Nov 13 10:40:58 also a question. i cant really like edit the buttons in my xml file to be the right size or proportion i want; its really irritating but i can either make them be fucking huge or fucking tiny Nov 13 10:42:05 Rush2112, gotta learn layouts and how they each allow sizing, or you can use dimen.xml and have some "Xdp" values based on device buckets Nov 13 11:02:35 hithere Nov 13 11:07:52 What is the lowest API you are developing for? Nov 13 11:08:52 4.0 Nov 13 11:24:31 xcrimson, u mean API 14 Nov 13 11:25:21 xcrimson, do you use compatibility classes? android.support.v4.app..., android.support.v7.app... ? Nov 13 11:25:39 or anybody else - do you use compatibility classes? Nov 13 11:25:56 yes people do, what is your question Nov 13 11:29:03 I am using them and my minSdkVersion is 16 - should I use them in such case? Nov 13 11:43:58 bolovanos, won't hurt you Nov 13 11:55:13 vegetablesalad19, thank you for opinion - this is the way how you develop your app? Nov 13 11:58:30 bolovanos your question is strange, what did you expect how should others know if you want to support lower phones or not, did you google for what compatibility classes are for? Nov 13 11:58:40 should be pretty straightforward if you should use them or not Nov 13 11:59:40 bolovanos, my app is API 9+ Nov 13 11:59:43 so yes Nov 13 12:03:06 ktwo, right now it is not about me, but common approach to app dev. As a "developer" what API should I aim. In my case I have minSdkVersion 16, but it is due to some animation I have used Nov 13 12:04:28 question is - what is common in 2015 to use as minSdkVersion, is it <= API 10, or >=15 (considering https://developer.android.com/about/dashboards/index.html?utm_source=ausdroid.net#Platform) Nov 13 12:06:28 vegetablesalad19, why that low? what API ver was out when you started developing this app? do you u use animation? Nov 13 12:09:09 Using otto Whats the best thing to do in a case where the user leaves the activity, but I really need a method to be called by the eventbus. Or else they're stuck on that screen. Nov 13 12:09:54 use service Nov 13 12:10:22 activity is not guaranteed to persist after user leaves it Nov 13 12:12:47 xcrimson: So I'm using a service, and when it's done it tells the activity via otto to put its progress bar away and show text on the screen. Nov 13 12:13:40 so when the user leaves, idk. Should I just do a conditional in onResume to see if the service completed? (when the service completes it persists something in the db). Nov 13 12:14:33 seems ok to me. better than storing a special flag just for that. Nov 13 12:15:13 I have a web services developed and few apis. They use some advanced algorithms and etc. I want to make an android application based on those apis Nov 13 12:15:19 So, is it good idea to use those api? I know Android is not capable of such complex algorithms, etc. Nov 13 12:15:25 I was wondering to start getting the data in json format... Nov 13 12:15:32 Am i allowed to post such applications on the Google Play store? Nov 13 12:15:38 Such applications == applications that use external apis Nov 13 12:15:42 bolovanos, it depends, probably 14 or 16~. If you're developing some high-end 3d game for example you might raise even higher since newer phones have new apis etc.. so its always a decision to make based on your app Nov 13 12:16:10 xcrimson: Okay, I just wasn't sure if there was a good way to call back to an activity when it was in the background or something Nov 13 12:16:59 there is no good way for that. u just assume worst. that there is no activity at all. Nov 13 12:17:00 also note if you're raising the api just for one specific call or feature, you can also check the api of the device in your code and enable it or do a fallback Nov 13 12:18:13 vol4ko so your app is basically is an interface for your online servic Nov 13 12:18:14 e Nov 13 12:18:26 donno why anyone would ban that Nov 13 12:18:40 but isn't it easier just to make an mobile friendly site? Nov 13 12:19:09 bolovanos, But really why not go as low as you can ? I have mobile payment app (City parking, train tickets, buss tickets, taxi), so we get couple thousand more users. In my case it is worth it Nov 13 12:20:00 i know but the implementation all my codebase in Java and complexity of the code i assume it would take at least 3-4 months. I can't be sure if that all can run smoothly on android Nov 13 12:20:19 A lot of users are not tech savvy, and use older phones, and my app targets people who use public transportation Nov 13 12:20:27 so we get more clients Nov 13 12:21:05 If you have some app that targets generaly tech savvy (read young audiences) then perhaps it's not worth it Nov 13 12:21:18 xcrimson: So, this will be only a call to my server and the server will do that job and return just the results. Just internet connection limit here. Nov 13 12:21:22 vegetablesalad19, seems reasonable - what about animations Nov 13 12:21:53 vol4ko: nothing criminal here. a lot of apps use external API's and services just fine. Nov 13 12:22:56 I don't use much animations, practicly only default "animateLayoutChanges" so thats api 11+ Nov 13 12:23:19 that's good to hear. I am very new to Android. Thanks xcrimson Nov 13 12:23:59 imo good UX > beautiful animations Nov 13 12:25:52 IMO beautiful animations can easily become annoying after X repeats. Nov 13 12:27:49 exactly, I only use animateLayoutChanges and default animation for Activity, so that lets system decide what to do Nov 13 12:28:23 and no hassle for me Nov 13 12:31:06 bolovanos, so my advice is to leave "special" animations the last thing on your todo list. Just make smooth and intuitive UX Nov 13 12:32:55 vegetablesalad19, I have already implemented animation to my listview - but it uses some functions from API16 and thats why I had to rais API number Nov 13 12:33:20 vegetablesalad19, animation for removing items from listview Nov 13 12:33:47 vegetablesalad19, ktwo thank you for now guys! Nov 13 12:35:08 imo it's not worth it to limit your api just for few special animations (you can disable them if it's < API16). Nov 13 12:36:20 vegetablesalad19, i have implemented delete on swipe - how would this disabling work in my case? Nov 13 12:37:54 bolovanos, ok in that case bit harder. You could add X to delete on but anyway depends on if you want those I probably would not even figured out that you can remove items by swiping. Nov 13 12:40:20 vegetablesalad19, first of all >=16 and than changes for others Nov 13 12:41:06 xcrimson, https://www.youtube.com/watch?v=YCHNAi9kJI4 Nov 13 12:41:41 ye. i've seen this. Nov 13 12:41:48 not convinced it is the way to go. Nov 13 12:42:33 Chet Haase is just an amazing UI programmer. Nov 13 12:42:44 think he just shows off a little here. Nov 13 12:43:17 I have implemented it, and will be probably changing it for something else - because it Nov 13 12:43:49 it is causing more pain than utility Nov 13 12:44:38 1) dirty display - unintentional removal (will delete affirmation) Nov 13 12:45:41 2) that implementation he had shown is bad - deleting last item from list when all items are visible -> scrolling freeze Nov 13 12:46:21 those 2 points are very bad and that's why I have to reimplement it in later app version Nov 13 12:48:00 btw - until now - he did not replied to point 2 at all and it is 5 month I have asked him about his opinion Nov 13 12:51:35 hello everyone! Hope everyone is fine. I need some help to use custom fonts in an Android App, any articles or tips about that considering best practices? Nov 13 12:52:59 best practice is using system fonts Nov 13 12:53:30 otherwise u need to specify your custom font for every textview Nov 13 12:53:35 doable but bothersome Nov 13 12:54:40 xcrimson: Yes, but some app create personaly and respecting the client's brand has to change the fonts.. the performance doesn't change that much, right? Nov 13 12:54:56 it should not. Nov 13 12:55:18 fonts are rendered as bitmaps via openGL anyways. Nov 13 12:55:58 rafagomes, this works well for me : https://github.com/chrisjenx/Calligraphy Nov 13 12:56:22 but best practice is using material design with brand colors/images. Nov 13 12:56:40 vegetablesalad19: Sorry man, I need some "native way" Nov 13 12:57:35 xcrimson: Unfortunately we can't win always :) Nov 13 12:57:54 xcrimson: do u think that covers? http://code.tutsplus.com/tutorials/customize-android-fonts--mobile-1601/ Nov 13 12:58:33 I saw so many ways that I'm kind of lost in witch way is the best lol Nov 13 12:58:42 which** Nov 13 12:59:41 yes. setTypeface is a way I used with my client Nov 13 13:00:20 xcrimson: nice!!! Thank you so much...Let's get hands dirty than. Have a nice day/night Nov 13 13:18:14 morning Nov 13 13:19:24 i need to create custom button which on touch show three more buttons (views) near it. It must be animated. So what is the best way to do it? Nov 13 13:35:08 ondroed, add all buttons, set visibilty:GONE to all of them, then show them inside onclick. Put buttons inside LinearLayout and add animateLayoutChanges for simple animation Nov 13 13:35:23 just google everything step-by-step Nov 13 13:35:35 pretty easy stuff Nov 13 13:37:27 java.lang.RuntimeException: Failed to resolve attribute at index 24 at android.content.res.TypedArray.getColor(TypedArray.java:401) at android.content.res.XResources$XTypedArray.getColor(XResources.java:1028) Nov 13 13:37:48 When trying to TextInputLayout.setError("text") Nov 13 13:37:55 vegetablesalad19: thanks Nov 13 13:40:06 any way to run traceview while not connected to a device? Nov 13 13:41:13 yoavst, your error doesn't seem to match that line of code, plus it's your own custom class, so no way anyone could know what is under the hood Nov 13 13:41:29 TextInputLayout is from design support library :) Nov 13 13:42:26 Found the bug, was using android:theme instead of style. Nov 13 13:42:54 yoavst, oh, indeed it is Nov 13 13:43:24 is it possible that two instances of a Service can run at a given time? Some times I am experiencing so. What can be the cause? Nov 13 13:46:54 sounds strange. Nov 13 13:47:07 mostly services are implemented as singletons Nov 13 13:47:15 yes Nov 13 13:47:18 singletons does not coexist Nov 13 13:47:28 system can restart ur service sometimes Nov 13 13:47:47 when it decides to Nov 13 13:48:05 t2mkn, When you call startService only one service will be created at a given time. If the service already exists it will be reused. However, each time you call startService the code in onStartCommand() will be run no matter what. Nov 13 13:48:05 but restart should not make a new instance Nov 13 13:48:23 why? Nov 13 13:48:26 old one dies Nov 13 13:48:49 vegetablesalad19: yes thats right. Nov 13 13:48:59 If you bind it to Activity lifecycle it will die with it Nov 13 13:50:26 t2mkn, IntentService or Service ? Nov 13 13:50:59 Service only STICKY one Nov 13 13:51:03 ok consider one more option. if there is a listener added to service. now system restarts the service for any reasun. here the onDestroy should be called always. but say if its not called, and the listener exists. now again the listener got registered to service on onCreate. I hope the object should be garbagecollected earlier. but is this possible that it's not happening? Nov 13 13:52:10 i mean a sensor listener Nov 13 13:53:36 when u set new listener to ur service old one is free to be collected yes Nov 13 13:54:08 if they are binded to same variable of course. Nov 13 13:56:00 s = new Sensor() is their in onCreate. now if onDestroy is not called and s=null never happens. now if s= new Sensor() is called again in onCrate then can the sensor event gets fired 2 times here. Nov 13 13:56:18 note that "s" is not a static variable Nov 13 13:57:35 if it belongs to singleton it kind of acts almost like one Nov 13 13:58:08 the issue is not happening always. sometimes. I am unable to reproduce it with any specific steeps. Nov 13 13:58:28 which issue? Nov 13 13:59:04 multiple events in a service. or multiple instance of a single service. Nov 13 14:01:27 multiple event listeners? Nov 13 14:01:42 in a singleton, binded to the same variable? Nov 13 14:02:04 sounds like nonsense Nov 13 14:02:38 something is not true Nov 13 14:02:45 single listener like addListener(this). but its receiving multiple events on some unusal or unknow conditions. Nov 13 14:04:12 restarting the devices solves the issue. but restarting the service is not clearning it. Nov 13 14:04:26 whats wrong with receiving multiple events? Nov 13 14:05:07 one more thing. i just expeienced. if i stop the service, the service is still running in background. where as its not visible as running in Apps->Running activity. Nov 13 14:06:36 that means the event is not not multiple, the service instance is multiple. which should not happen in any condition. Nov 13 14:07:07 strange Nov 13 14:07:48 poorly implemented singleton? Nov 13 14:08:26 no Nov 13 14:08:45 no metter you define a service as singleton or not, it will be singleton right? Nov 13 14:08:51 no Nov 13 14:08:53 gordon_, crashlytics is a single resource entry Nov 13 14:09:12 you have to make it a singleton Nov 13 14:09:28 in Manifest right? Nov 13 14:09:42 Yes, a service is always a singleton Nov 13 14:09:43 in java Nov 13 14:10:05 And you will not have two instances of a Service running at the same time Nov 13 14:11:23 SimonVT: yes thats right. It should not happen. but it's happening sometimes. Nov 13 14:11:54 Nah, it doesn't Nov 13 14:14:27 i think i should go out for a drive :P after returning, I may find the issue. Need a break i guess. Nov 13 14:20:48 you have a reference leak Nov 13 14:21:06 not a problem of service not being singleton Nov 13 14:46:36 How do I create an IntentService that just prints out a Log every 5 seconds? Should I just make an IntentService with a while(){Thread.sleep Log} or should I use a java Timer to go off every 5 seconds? Or alarm inside, or handler post delayed? I DO NOT want this on the UI thread Thats why I'm using IntentService Nov 13 14:49:59 wouldn't use intent service for a periodic task Nov 13 14:50:13 eghdk: threads can get frozen during device sleep, but if that's ok, i'd go with a HandlerThread Nov 13 14:50:50 Hello everyone! I'm dealing with android/BLE (bluetooth Low Energy) since a couple of weeks now, and I'm having troubles with bluetooth stability. Had been testing in android 4.4.2, 4.4.4 and 5.1.1 (all on samsung galaxy tab devices)... Researching I found several issues (and workarounds), but I'm trying to find a current android/BLE wiki or list of known issues; just to know what I have to expect... does anyone here can give me a clue on this topic? Nov 13 14:51:16 pfn and squirrel well let me explain it to you. It's not really periodic, it's mostly something that I need to run just every 5 seconds while my activity is up. Nov 13 14:52:10 eghdk, then there's no need for service or intent service. Nov 13 14:52:16 HandlerThread + postDelayed Nov 13 14:52:26 eghdk, that's the definition of periodic Nov 13 14:52:45 Yotta92: Well it has to work across all of my activities Nov 13 14:53:59 nobody dealing with BLE? :( Nov 13 14:54:31 I wish sensors were common, I can't find any ble devices. I. want to use Nov 13 14:54:57 It's a task that I need working across all of my activities as a service. It has to be a service, but I'm not sure what to use in order to have it actually happen every X seconds. Nov 13 14:56:01 it has to be a service, but it only is to do work when your “activity is up”? Nov 13 14:57:15 eghdk, I'd go for HandlerThread+Post delay or just timer task. Just make sure they run on separate thread. That's enough if you need something only while you app is on. Nov 13 14:58:19 squirrel: While my activities are up. I can't do it in start and stop of my activities because those lifecycles overlap. Nov 13 14:59:18 Yotta92: HandlerThread+Post in an Intent service? IntentService has it's own thread. Nov 13 14:59:20 uh well then onResume/onPause? Nov 13 14:59:59 use a regular service if you must Nov 13 15:00:45 eghdk, create your own thread when you start the app. And make callbacks to the activity that is currently on. Nov 13 15:01:30 Services are meant to perform tasks while your actual app is not running. Nov 13 15:02:05 eghdk, http://stackoverflow.com/questions/21726055/android-loop-part-of-the-code-every-5-seconds Nov 13 15:03:47 I'm stuck with using an IntentService, so I guess I'll try seeing whether a Timer Task or a Thread.sleep will be better. Nov 13 15:04:07 k. Nov 13 15:12:15 https://code.google.com/p/android/issues/detail?id=78377 << it only took them 1 year to finally fix this. Nov 13 15:14:22 And now we wait for samsung to accidentally add another class to the classpath Nov 13 15:15:38 danijoo, wasn't it actually Samsung's issue? They did something there. ( ͡° ͜ʖ ͡°) Nov 13 15:15:46 Yotta92, yes. Nov 13 15:16:12 SimonVT, https://code.google.com/p/android/issues/detail?id=78377#c270 :) Nov 13 15:16:50 Wont necessarily be a support library Nov 13 15:16:58 Maybe okhttp or rxjava, that would be fun Nov 13 15:17:10 SimonVT, they already messed up rxjava :D Nov 13 15:17:24 Oh? Nov 13 15:17:27 let me find it... Nov 13 15:17:33 g00s posted it yesterday Nov 13 15:20:05 SimonVT, there you go: https://github.com/ReactiveX/RxJava/issues/3459 Nov 13 15:20:56 danijoo, Samsung fault, and cts catches that now Nov 13 15:21:10 pfn, yes. Its sad it has to be done this way Nov 13 15:21:26 Hah, amazing Nov 13 15:21:32 but better than having this issue for another year until 4.x becomes irrelevant Nov 13 15:25:43 lol, also https://code.google.com/p/android/issues/detail?id=189614 except all wear device are OEM, no such thing as AOSP Nov 13 15:37:15 danijoo, interestingly, we don't seem to have any crashes like that... Nov 13 15:41:09 Zharf, maybe you proguard them out? Nov 13 15:44:28 which crashes? the appcompat or rx? Nov 13 15:44:41 appcompat Nov 13 15:44:43 and it's amazing that samsung finds it necessary to change /everything/ Nov 13 15:45:04 danijoo, iirc we don't run proguard, but I'll have to check Nov 13 15:45:05 on appcompat 21-23.0 it doesn't crash if you proguard/obfuscate Nov 13 15:45:15 on 20 it won't crash at all Nov 13 15:45:23 on 23.1.0, it crashes even if you obfuscate Nov 13 15:45:27 and 23.1.1 allegedly fixes it Nov 13 15:45:48 I'm updating one of my client apps to 23.1.1 today Nov 13 15:45:57 I'm not excited Nov 13 15:46:01 since it always breaks shit... Nov 13 15:46:06 we're using 22.something Nov 13 15:46:21 Zharf, are you using toolbar at all? Nov 13 15:46:39 it crashes even if you don't use toolbar Nov 13 15:46:39 I think it only happens if you use toolbar and set it as actionbar or something like that Nov 13 15:46:41 actionbar, no toolbar Nov 13 15:46:45 ah ok Nov 13 15:46:47 supportactionbar still crashes Nov 13 15:46:52 if you set menu items Nov 13 15:46:53 or something Nov 13 15:46:59 I don't use toolbar in our app, but it crashes Nov 13 15:48:02 other than casting getSupportActionBar to toolbar Nov 13 15:52:51 does it depend on samsung's android version? Nov 13 15:53:09 yeah it only happens for some samsungs on 4.1 Nov 13 15:53:14 we have very few prekitkat users Nov 13 15:53:20 but also not all samsung models with 4.1 Nov 13 15:53:52 also our app is restricted to finland Nov 13 15:54:14 device base might exclude those devices Nov 13 15:54:59 when the bug occured first, it was too many devices Nov 13 15:55:13 excluding them would have hit lots of users Nov 13 15:55:36 I didn't mean that they would be excluded in google play Nov 13 15:55:49 just that those devices might not exist at all in finland Nov 13 15:56:08 ah yeah. Nov 13 15:56:09 maybe :) Nov 13 15:57:16 in our previous project I had to make a couple of samsung specific hacks to avoid crashes and incorrect behaviour Nov 13 15:57:31 Zharf, only happens on samsung 4.2.2 Nov 13 15:57:47 Zharf, no other version Nov 13 16:08:45 is there a way to know if an android.hardware.Camera is open, WITHOUT testing a method and trying for a RuntimeException ? Nov 13 16:14:45 blehblah, if you successfully opened a Camera, it stays open for you until you unlock or release Nov 13 16:14:56 but no, there's no way to tell, really Nov 13 16:25:45 Hi Nov 13 16:26:48 Recently I was watching a video on some topic of android dev. The tutor was showing the source code of phone and browser apps of android. How do I get that source code?? Nov 13 16:28:22 its in aosp Nov 13 16:28:40 https://android.googlesource.com/platform/ Nov 13 16:28:53 hey look, an external/chromium Nov 13 16:29:09 packages/apps/Phone! Nov 13 16:30:04 Ok..thanks a lot :) Nov 13 16:53:52 Hello Nov 13 16:54:02 When I have this kind of backtrace : http://pastebin.com/K7jNC2hG Nov 13 16:54:16 Is it on GPU side or on CPU side the program has crashed ? Nov 13 16:55:31 The full backtrace : http://pastebin.com/ZCT0Lp92 Nov 13 17:13:10 Zharf: sure. how about if someone else opened a camera and passed you a reference to the object? Nov 13 17:14:01 You can wrap your WeakReference all over it but it won't mean squat Nov 13 17:14:21 since the object doesn't get deleted in this specific case Nov 13 17:16:13 someone else? Nov 13 17:16:15 how? Nov 13 17:28:15 any recommendation for small but powerful android phones? Nov 13 17:30:13 z5c Nov 13 17:45:57 anyone ever tried linking ndk stuff statically with bionic or maybe even musl? Nov 13 17:50:18 blehblah, not really a usecase it's designed for Nov 13 17:54:48 Zharf: if we'd only stick to intended use-cases... :P Nov 13 18:11:14 Zharf: alright, thanks! Nov 13 18:16:13 how stable is it to install x86 version of android? Nov 13 18:16:27 and is it worth the effort? Nov 13 18:19:58 horny-sama, use genymotion Nov 13 18:20:06 its x86 with no effort Nov 13 18:20:35 have been reading up on http://developer.android.com but I am still a shit dev Nov 13 18:22:26 I have one quick question I want to develop for java 8 and android at the same time on a window machine but the issues is AS only supports up to 7 Nov 13 18:23:48 yup Nov 13 18:24:13 you can have both Java 7 and Java 8 installed on your machine. And you can run AS with Java 8 Nov 13 18:25:45 s73v3r: I thought AS only supports up to java 7 Nov 13 18:26:12 Java Development Kit (JDK) 7 Nov 13 18:26:17 https://developer.android.com/sdk/index.html#Requirements Nov 13 18:28:10 you can run it on Java 8, but it’s only going to use Java 7 to compile the code Nov 13 18:28:55 and Javas are backwards compatible Nov 13 18:29:16 Hi Nov 13 18:29:36 however, are you wanting to just develop for both, in separate projects, or do both in the same project? Nov 13 18:29:45 Why I am not able to see the gen folder. In the tutorial video, he has got that folder. Nov 13 18:29:55 I am using android studio. Nov 13 18:30:27 1, there are infinity billion tutorial videos out there Nov 13 18:30:53 2, the generated folder is under the build folder, and probably won’t show up until after you’ve built Nov 13 18:31:00 rud0lf_: You probably have the Android perspective, not the Project perspective, selected. Nov 13 18:31:33 that would also do it Nov 13 18:32:11 s73v3r, I have done the built. Nov 13 18:32:13 Yeah, I guess it could be a bunch of things. Hard to make these guesses sometimes. Nov 13 18:32:54 what’re you looking for in the gen folder? Nov 13 18:33:05 I wanted to look the R.java file. Nov 13 18:33:05 "As of API 21, GridLayout's distribution of excess space accomodates the principle of weigh" meeehhh, they probably should have put this in the support lib too Nov 13 18:33:24 and did your build finish successfully? or did it end with error? Nov 13 18:33:49 s73v3r, No errors. I ran it in the emulator also. Nov 13 18:33:55 It is working fine. Nov 13 18:34:08 ok. so what do you need in the gen folder? Nov 13 18:34:59 I want to figure out "grey 950" (from ). Anyone know how? Nov 13 18:35:15 I've noticed that AppCompat has `material_blue_grey_950`, and I think an 850 one. Nov 13 18:35:17 s73v3r, the R.java file. I wanted to have a look at all the references that are created there. Nov 13 18:35:21 Can't find a pattern at all. Nov 13 18:35:35 rud0lf_: tselect "Project" where it says " Nov 13 18:35:39 Try selecting* Nov 13 18:35:46 where it says "Android" * Nov 13 18:35:54 if you’re on the Project perspective, should be under build/generated/source/r/ Nov 13 18:36:16 Does port forwarding work in adb? Nov 13 18:36:26 TacticalJoke, it is already in project perspective, I think. It is showing "Project" in the studio window. Nov 13 18:36:39 Ah..got it. Nov 13 18:36:49 Sorry...was looking at the wrong place. Nov 13 18:36:54 Selected project now. Nov 13 18:40:22 There is so much of text in my R.java :| Nov 13 18:41:10 that’s why it’s generated Nov 13 18:41:21 Does port forwarding work in adb? Nov 13 18:41:55 s73v3r, is it normal to have resValues and rs inside build instead of R? Nov 13 18:42:25 the generated folder is full of voodoo black magic Nov 13 18:42:56 I have an R.java, I have a directory named rs Nov 13 18:45:59 s73v3r, see my tree : http://tinypic.com/r/303gy7l/9 Nov 13 18:46:10 it really doesn’t matter Nov 13 18:46:12 The R.java file is somewhere else :| Nov 13 18:46:47 s73v3r, so we have no use of that file? I mean we never need to look into the file? Nov 13 18:46:53 no. Nov 13 18:47:16 it’s occasionally useful to look at it, but you should NEVER go trouncing around in it. Nov 13 18:47:31 the build system knows where it is, because it put it there. Nov 13 18:47:45 as long as the build system knows where it is, you’re fine Nov 13 18:48:18 Ok...and I keep using findViewById() Nov 13 18:48:21 Does port forwarding work in adb? Nov 13 18:48:35 overseer: we clearly do not know Nov 13 18:49:32 s73v3r, and I think the tutorial is outdated lol. A lot of things are changed in my android studio. Nov 13 18:49:40 it’s close enough Nov 13 18:49:59 Yeah Nov 13 18:52:33 Hi guys, I'm trying to figure out how to get to the page of a bug referenced in the gerrit of aosp Nov 13 18:52:37 like this one https://android-review.googlesource.com/#/c/175863/ Nov 13 18:52:51 the link to the bug doesn't point to a valid url Nov 13 18:59:07 It doesn't work Nov 13 18:59:46 Google has an internal bug tracker, that's probably what it points to Nov 13 19:00:32 It opens a port but it isn't forwarding. Nov 13 19:02:36 android studio - how do i reload a file from its saved version? Nov 13 19:02:45 just, get rid of all changes since last save Nov 13 19:03:25 Simonvt looks like they broke it. Nov 13 19:03:39 How so? Nov 13 19:03:43 chars6: It saves all the time. Nov 13 19:03:57 But you can go to the Local History thing. Nov 13 19:04:10 Personally, I just use version control for that stuff (`hg rev -aC` reverts everything). Nov 13 19:04:20 TacticalJoke: where is local history? Nov 13 19:05:14 i installed ideavim too, the vimish plugin, but i don't see any settings for it Nov 13 19:05:25 Try right-clicking the file in the list on the left (or right-clicking the editor) and choosing Local History > Show History. Nov 13 19:05:36 chars6: Honestly, though, it's better to use version control. Nov 13 19:06:01 chars6 if your last time updating git was before this session of using android studio, just update from git Nov 13 19:06:19 * wordsToLiveBy low fives TacticalJoke Nov 13 19:06:44 hmm, local history is kinda cool, gives me a diff Nov 13 19:07:18 i use git, i just rely on reverting to a staged, but unocmmited file a lot normally Nov 13 19:07:47 git is a sham Nov 13 19:07:48 ideavim seems to be missing vim modes Nov 13 19:07:55 How do I make sure an IntentService doesn't get started again if it's currently running? Like I start it, I may call to start it again, but when I start it again, I don't want it to be queued up if it's running currently. Nov 13 19:07:58 hamsterr huh? Nov 13 19:08:09 hamsterr: Mercurial mas Nov 13 19:08:10 i want to be able to click the screen and not have the cursor move Nov 13 19:08:12 with an ever booming tech community git is a tool, its not about open source and sharing Nov 13 19:08:13 master race* Nov 13 19:08:17 My gawd, this keyboard. Nov 13 19:08:22 its about having ur code easily usuable Nov 13 19:08:24 to resell Nov 13 19:08:34 i want editing and command modes Nov 13 19:08:36 sham Nov 13 19:08:38 eghdk: Sounds like you want to just use a regular Service Nov 13 19:08:48 And ignore onStartCommand Nov 13 19:10:12 Okay, what's the best way to have something run every 5 seconds in a service then...? Using java timer/timertask? I don't want to run on ui thread. Nov 13 19:10:25 So start a Thread Nov 13 19:10:44 You're allowed to handle threads yourself, you don't have to use IntentService/AsyncTask/whatever Nov 13 19:11:36 writing a line and then typing :w is so automatic i do it in notes, emails, etc Nov 13 19:12:03 SimonVT: Would I just do a while(shouldIStop) Thread.sleep(5000) //do my thing? Nov 13 19:13:03 chars6: I broke free from vim years ago. It was like getting out of a bad relationship. Nov 13 19:13:08 Sure, that would loop every 5 seconds Nov 13 19:15:31 Simonvt it is broke. Nov 13 19:16:44 SimonVT: Cool. I guess I was overthinking it. Thanks man Nov 13 19:16:50 i would use some stopwatch, using sleep() is imo ugly Nov 13 19:18:43 Another simple solution would be a HandlerThread and postDelayer Nov 13 19:20:24 somebody knows how to add an Observable when I add an element to a List? Nov 13 19:21:12 Simonvt it looks like they broke it with no warning. Nov 13 19:21:36 No manual. No documentation. Nov 13 19:21:43 "Just a heads up, next week we're going to break " Nov 13 19:22:19 They keep adfing beast ports. Nov 13 19:22:52 Checked the firmware it has version three sixs. Nov 13 19:23:31 And the loop mtu has an arbitrary value ending in 36. Nov 13 19:23:39 ah, overseer = guardian-project = troll. Nov 13 19:24:24 SimonVT: I think I might go for HandlerThread. Any opinion on that vs Thread.sleep()? Nov 13 19:24:25 No not really trolling. Nov 13 19:24:32 everytime Nov 13 19:24:45 Just use the right thing for the job Nov 13 19:24:47 You don't know much about fishing. Nov 13 19:25:14 Trolling is slow and relaxed. Nov 13 19:25:34 SimonVT: Well both things work for this job it seems. So I don't know if one is better than another. Nov 13 19:25:47 This is murder warning. Nov 13 19:26:01 So use whatever is easiest Nov 13 19:26:05 Nothing slow and relaxed. Nov 13 19:27:55 SimonVT: will do. thanks Nov 13 19:28:06 As soon as I mention where to get sim chips they sell out in less than a wesk. Nov 13 19:34:46 Week. Nov 13 19:35:34 Avoid going into public they only argue. Nov 13 19:38:55 They don't comprehend domain. Nov 13 19:39:13 overseer: Try #android-offtopic for your random messages Nov 13 19:39:51 It isn't random. Nov 13 19:40:14 Ok, for your offtopic messages Nov 13 19:40:25 You play with garbage simonvt so you can experience the idiocy of what is going on. Nov 13 19:42:42 Yeah, no idea what you're on about. If you have any questions about app dev, feel free to stay. Otherwise there are probably better channels for you to be in Nov 13 19:43:29 Simonvt marxism is a bunch of bugs. Nov 13 19:43:45 Chasing free money. Nov 13 19:44:03 Simonvt are you a marxist? Nov 13 19:44:29 permanent or temp ban? Nov 13 19:44:31 Wow... what an asshat -.- Nov 13 19:44:52 Undecided Nov 13 19:45:15 What would you have it be? Nov 13 19:46:02 People like that ruin IRC channels... it's better without him Nov 13 19:46:42 pfn: chanserv says I'm not authorized to akick :( Nov 13 19:48:00 i recall that garbage statement - overseer must be a bot Nov 13 19:49:16 Hey guys, I want to detect when a punch is thrown with a device in hand. What would be the best way to go about doing this? Just some general directions Nov 13 19:49:18 is using accountmanager for password stuff more secure than simply storing password in shared preferenes? if so, how? Nov 13 19:49:39 accountmanager apis are so .. wtf Nov 13 19:49:51 Would a simple measure of velocity work? Nov 13 19:49:52 they are :/ Nov 13 19:50:14 Are accelerometers accurate enough? Nov 13 19:51:34 i mean, while you usually don't have access neither to accountmanager nor sharedpreferences files, you can alaways modify the app to, say, just print the password into logcat Nov 13 19:51:52 Ahraz: Yeah. We used it on one app a while back Nov 13 19:52:16 SimonVT, that's weird, you should have that with chanop Nov 13 19:52:27 SimonVT, I guess it's a separate permission Nov 13 19:52:47 basically, you’re looking for a sudden burst of movement in one axis Nov 13 19:52:55 Yeah, there's like 10 different flags you can have Nov 13 19:53:21 meh. leave it temp for now. if he comes back, we can figure out what to do Nov 13 20:17:04 I'm looking for a way to store data I get as a json from server. The data is read all in, with no filtering. Should I store this as json file, or do you have a database to suggest? Nov 13 20:18:03 the built in sqlite database is fine. Realm is pretty awesome, too Nov 13 20:18:24 i don’t know if i would store it as raw json, though Nov 13 20:18:29 Make sure you actually need what real databases provide Nov 13 20:18:41 I've used realm before, it is nice. But isn't it overkill for that? I'm not sure I need database. Nov 13 20:18:50 If there's no real downside to storing it as plain json, do that Nov 13 20:19:04 There are no advance queries in this case. Nov 13 20:19:29 just refresh -> write data. loading -> read all data. Nov 13 20:19:36 start with the built in stuff, then Nov 13 20:19:46 Yeah, just do json then Nov 13 20:20:09 what the hell is play-services-measurement ? Nov 13 20:20:28 thats how you measure things with chickens Nov 13 20:20:35 the json I get come with extra data I don't need (some fields I ignore). Should I parse the json to remove them, or save it as is? Nov 13 20:21:15 just got an error about "could not find com.google.android.gms:play-services-measurment" Nov 13 20:21:31 IntelliJ's spell checking is really useful. Nov 13 20:21:32 I assume you use a library like gson, so just omit the fields you don't need Nov 13 20:21:33 Said nobody ever. Nov 13 20:21:49 And save the resulting object afterwards Nov 13 20:22:07 So I should parse and then serialize? Nov 13 20:22:08 yoavst there are so many ways to skin this cat ... Nov 13 20:23:02 I mean, you don't have to Nov 13 20:23:10 Either way works Nov 13 20:27:02 suggests using opacity values for text. However, I've found that using the "grey" values (with 100% opacity) works well in various cases. Am I committing a faux pas if I use the grey values rather than white/black with opacity? Nov 13 20:27:54 For text, I mean. Nov 13 20:31:51 TacticalJoke sure, i guess if the text is over a colored background Nov 13 20:32:05 like the account switcher in the nav drawer, the bg bleeds through Nov 13 20:32:08 is there a changelog for the play services libs? Nov 13 20:32:11 Ah, yeah, good point. Nov 13 20:32:30 alexfu yeah "fixed bugs" Nov 13 20:32:51 other than the announcement itself :) Nov 13 20:35:14 so is AS 15 based on ... intellij 15 :) Nov 13 20:35:33 if so i guess that means i can use jvm 8 to run it with subpixel AA now Nov 13 20:36:03 http://tools.android.com/build/studio/idea-tags Nov 13 20:36:16 just a quick google, didn't vet it all yet :) Nov 13 20:36:23 Where did you read that it was based on IntelliJ 15? Nov 13 20:36:32 I wasn't expecting IJ 15 support for a long time. ;o Nov 13 20:37:21 thats a handy page, hm Nov 13 20:37:58 14.1.4 2015-06-19 12:05:36 MSK 141.1532.4 Nov 13 20:38:08 141.1532.4 2015-06-19 12:05:36 MSK 141.1532.4 Nov 13 20:38:52 hm, crap oh well Nov 13 20:39:29 whee Nov 13 20:39:36 stinky i'm guessin Nov 13 20:39:46 anybody familiar with notifications + google cloud messaging? Nov 13 20:40:05 some probably are, you have any specific questions/issues Nov 13 20:40:15 i've got them being sent to my device Nov 13 20:40:25 coo Nov 13 20:40:26 TacticalJoke IJ 15 had that no-latency typing --- which i'm really looking forward to :D Nov 13 20:40:30 but when i click on them it won't launch the app Nov 13 20:40:40 i feel like there's something with the manifests + intents i'm not understanding Nov 13 20:40:55 show some code if you can with intents Nov 13 20:41:10 have you guys run into this execption "java.lang.ClassNotFoundException: com.google.android.gms.measurement.AppMeasurementContentProvider" after updating the tools gradle plugin? Nov 13 20:41:34 alexfu what version are you using ? Nov 13 20:41:52 am i supposed to use match_parent or fill_parent ? Nov 13 20:42:10 chars6 thats pretty googleable Nov 13 20:42:11 `match_parent` Nov 13 20:42:12 alexfu, this similiar? https://code.google.com/p/android/issues/detail?id=189221 Nov 13 20:42:25 g00s: updated to 1.5.0-beta1 Nov 13 20:42:37 alexfu isn't 1.5.0 final out ? Nov 13 20:42:49 yeah they fixed that Nov 13 20:42:58 no-latency typing huh? Nov 13 20:43:16 g00s: is it? Nov 13 20:43:42 of the tools plugin? or the play services plugin? Nov 13 20:44:40 i really do hate using proguard Nov 13 20:44:44 plugin has been 1.5.0, not sure about 'google-services plugin' ... what is that? Nov 13 20:47:18 never heard of this before https://bintray.com/android/android-tools/com.google.gms.google-services/view Nov 13 20:47:26 why does play services have anything to do with tools Nov 13 20:48:55 it honestly causes more trouble than it's worth. maybe there's a bigger picture i'm not seeing but i think it's kinda pointless Nov 13 20:50:38 g00s: from my experience so far, it allows you to use things like Google Analytics without having to do the boiler plate setting up of things like tracker id or stuff like that Nov 13 20:51:07 what's wrong with proguard Nov 13 20:51:59 g00s, probably to automatically insert google_play_services_version into manifest Nov 13 20:54:26 Is it a possible/good idea to use abstarct class of an interface in case a listener has many methods and in most cases user might want to use only one of those methods? How common is it to do this? Nov 13 20:55:48 You mean "instead of an interface"? Nov 13 21:00:49 TacticalJoke: yes, oops Nov 13 21:01:55 Playing around with the NavigationView (drawer) and wondering if there's an easy way to set gravity to one of the menu-groups within (I want one to have layout bottom and the main one to be from the top)? Nov 13 21:02:21 I'm not sure it's a great idea in general because only one can be extended (while multiple interfaces can be implemented). Nov 13 21:02:37 A lot of people like to use some existing class for a listener implementation. Nov 13 21:04:43 only one class* Nov 13 21:05:21 Hi!! Nov 13 21:05:43 you a cop? Nov 13 21:05:45 What is the best emulator for Android development? My I'm using Genymotion Nov 13 21:06:03 Is genymotion working for you? Nov 13 21:06:12 hey guys, I have my app in the play store, but its not available for tablets to download, my guess is becuase i have permission phone. Is there a way to make it available to android devices without phone? Nov 13 21:06:57 jareddlc, maybe set the flag that says the permission isn't required Nov 13 21:07:23 canvs2321: today it's not, then I go here to ask Nov 13 21:07:43 canvs2321: let me look it up Nov 13 21:07:46 canvs2321: which other emulator is good Nov 13 21:08:09 larfen, no physical devices to use? emulators that use x86 and HAXM i've seen suggested Nov 13 21:08:38 g00s: are announcements for new tools plugin versions posted somewhere? Nov 13 21:08:46 canvs2321: i dont see any flag: http://developer.android.com/guide/topics/manifest/permission-element.html Nov 13 21:08:59 canvs2321: Me I have a phone that is not compatible. Searching for an emulator. Have AMD then HAXM is giving problems Nov 13 21:09:25 on tools.android.com but sometimes out of date Nov 13 21:09:31 Iarfen: What is wrong with Genymotion? Nov 13 21:09:31 i would have expected http://developer.android.com/tools/revisions/gradle-plugin.html to have it but it doesnt :( Nov 13 21:09:32 alexfu ^^ Nov 13 21:09:33 canvs2321: nvm found it, wrong one Nov 13 21:10:00 TacticalJoke: The plugin doesn't appear on the repository to be installed Nov 13 21:10:07 g00s: yeah, it still on 1.5.0-beta1 Nov 13 21:10:15 according to the site Nov 13 21:10:22 ? Nov 13 21:10:58 What plugin? And you said above that you were using Genymotion before; what changed? Nov 13 21:10:58 jareddlc, i was about to retract my statement, cuz i was guessin, and thought maybe it was the uses-features that had the required flag Nov 13 21:11:00 did you get it Nov 13 21:11:09 canvs2321: i linked to wrong article correct article was uses-permissiions which ways android:required="false" Nov 13 21:11:13 TacticalJoke: that now I can configure it good, don't know why Nov 13 21:11:15 ignore that "?" damn keyboard Nov 13 21:11:18 http://developer.android.com/guide/topics/manifest/uses-permission-element.html big side menu :) Nov 13 21:12:20 now to look how the uses-feature works Nov 13 21:13:06 http://stackoverflow.com/questions/7882955/android-permission-call-phone-for-tablets Nov 13 21:13:15 so seems like my permissions are untouched but just add: Nov 13 21:13:26 si Nov 13 21:13:50 and make sure the code that uses the phone permission isn't executed on tablets or crash, unless you catch it Nov 13 21:13:59 thank you sir, yep Nov 13 21:14:04 :) Nov 13 21:14:33 anyone here has experience with pandora android app? Nov 13 21:14:47 i just added spotify support by using intents, but no luck with pandora Nov 13 21:16:36 jareddlc: Pandora doesn't necessarily have to support "external" intents Nov 13 21:17:13 alexfu: correct, im just wondering if anyone has experience. I see some apps on the play store that claim to control it via widgets Nov 13 21:17:23 wasnt sure how they were doing it Nov 13 21:18:07 possible reflection from reversing pandora or finding the classes etc Nov 13 21:19:17 thanks canvs2321 is that legal? Nov 13 21:19:39 depends, but i'd say if pandora isn't releasing any kind of api i'd say no haha Nov 13 21:19:40 if i decompile an apk to look how it works, and if i find the class Nov 13 21:19:50 gets touchy Nov 13 21:21:12 can maybe read logcat/dmesg or whatnot to see what intents are being broadcasted when using pandora, then research their availability Nov 13 21:22:52 hmm dmesg? Nov 13 21:22:55 im familiar with logcat Nov 13 21:23:16 it's been awhile, i thought i remember a logging system you could read that showed intent actions Nov 13 21:23:22 dmesg maybe incorrect Nov 13 21:23:45 usually logcat shows most though Nov 13 21:25:25 but again, if they aren't providing a public list of what you can do, you are gonna have to hack something Nov 13 21:26:19 yup, thanks Nov 13 21:26:28 thanks again Nov 13 21:26:28 gl :) Nov 13 21:26:31 back to working on it Nov 13 21:50:48 hello Nov 13 21:50:54 can anyone help me again? Nov 13 21:51:07 :o Nov 13 21:53:03 I hope google adds rippledrawable to appcompat soon Nov 13 21:53:17 I nominate d-skull to help (name randomly picked). Nov 13 21:53:35 I second that^ Nov 13 21:55:42 We could do a Russian Roulette thing: every now and then, somebody has to answer an Android-dev question correctly or be banned. Nov 13 21:56:54 racoonfox12, it's always best to have your question prepared and to the point, so you can just shoot it at the channel, and those that can, will Nov 13 21:57:33 yeah. racoonfox12, just ask the question. don’t bother asking if anyone can help Nov 13 21:57:49 if they don't, don't feel bad, irc isn't usually so immediate. can just check back and while waiting keep researching google/so/etc... Nov 13 21:57:51 if someone knows the answer, they’ll say something. if no one knows, then no one will answer Nov 13 22:02:04 i cannot figure out how to change my app's theme Nov 13 22:02:12 manifests Nov 13 22:02:18 my manifest and styles.xml are here http://pastebin.com/L7dKg01H Nov 13 22:02:41 change on the fly, or change upon updates? Nov 13 22:02:44 but whatever i change the theme to my app crashes in the emulator Nov 13 22:02:53 show the crash Nov 13 22:03:36 guys can you help me again? Nov 13 22:03:39 http://stackoverflow.com/questions/33690777/unreachable-statement-on-android-studio/33702488#33702488 Nov 13 22:04:03 chars6: How are you changing it? Nov 13 22:04:06 it still give me an error for bindinglist, it say there aren't length Nov 13 22:04:13 racoonfox12, index out of bounds, fix that Nov 13 22:04:30 canvs2321 : how? Nov 13 22:04:39 of list is empty, and you are trying to access index 0, it'll fail Nov 13 22:04:47 so fix the list, or check it for empty Nov 13 22:04:57 of list = if list Nov 13 22:05:12 s73v3r: first i was trying to change it in the manifest (line 11), then i started trying to change the parent theme in styles.xml (line 2) Nov 13 22:05:17 racoonfox12: It's bad form to ask two questions in one SO question. Nov 13 22:05:17 index 0 of a list assumes the list has atleast a size of 1 Nov 13 22:05:17 line 28* Nov 13 22:05:32 and i agree with TacticalJoke Nov 13 22:05:33 And to ask a question in comments. Nov 13 22:05:56 chars6: What are you trying to change? Nov 13 22:06:10 zomg it started working Nov 13 22:06:12 hmmmmmmm Nov 13 22:06:18 oke i'm trying it Nov 13 22:06:28 s73v3r: I want to use a different theme. I was thinking Manifest, but i can't change from the default Nov 13 22:06:40 do you have the theme created? Nov 13 22:07:03 s73v3r: i was trying to look for a list of themes online to compare too, but didn't find much Nov 13 22:07:14 never implemented search before. I have a List, each Message has .getText(). How would I make this searchable. I know android has search views or something, but I'm fairly certain I can't hook into that stuff with just a List Nov 13 22:07:25 chars6: There really isn’t one Nov 13 22:07:37 s73v3r: no, do i have to install it somehow? how is that done? there are a few premade ones to choose from, right? Nov 13 22:07:43 nope Nov 13 22:07:46 you have to create it yourself Nov 13 22:08:24 s73v3r: then what is Holo.Dark, Holo.Light, etc? Nov 13 22:08:32 those are base themes Nov 13 22:08:42 are you trying to extend one of those? Nov 13 22:08:44 s73v3r: yes, how do I apply those Nov 13 22:09:27 in your style, you’d have AppTheme extend Theme.Holo.Dark Nov 13 22:09:36 although I’d have to advise against using Holo themes Nov 13 22:10:27 you might have to look at the item attributes you’re using, to make sure those exist in the theme you’re extending Nov 13 22:11:02 s73v3r: do you just not like holo themes or you think they are too common, or is there some functional problem with them? Nov 13 22:11:10 they’re outdated Nov 13 22:12:08 s73v3r: do I extend a base theme in styles.xml? Nov 13 22:12:24 yup Nov 13 22:12:43 s73v3r: what is the syntax? i guess that's really what my question boils down to Nov 13 22:12:50 it’s already there Nov 13 22:13:04 you have it, you just need to change the theme it’s extending Nov 13 22:13:48 s73v3r: yeah, but whever i change "