**** BEGIN LOGGING AT Sat Feb 27 02:59:58 2016 Feb 27 03:04:48 wambulance Feb 27 03:05:44 napalm Feb 27 03:05:48 crack Feb 27 03:05:53 that'll do it for you Feb 27 03:44:50 anybody use Timber? Feb 27 03:44:53 I'm logging the lifecycle methods in BaseActivity. It would be nice if the tag was my subclass instead of BaseActivity Feb 27 03:48:43 At some point today, Android Studio started throwing an error when building my app for debug with a TransformException during :app:tranformClassesWithDexForDebug. I can still build my integration tests and unit tests, just not the app. Feb 27 04:04:52 joshkovach: try File -> Restart/Invalidate Caches Feb 27 04:17:44 RustyShackleford: I use timber Feb 27 04:27:52 gordon_: So I overrode the lifecycle methods like onCreate() and so on Feb 27 04:28:14 in BaseActivity. Then I created MainActivity extends BaseActivity Feb 27 04:28:31 RustyShackleford: you'll have to do something like call getTag() Feb 27 04:28:34 the tag is BaseActivity when I'd like it to be MainActivity Feb 27 04:28:41 then override getTag() in your subclass Feb 27 04:29:09 I'm not seeing any StackTraceElement methods that help me Feb 27 04:29:10 (just to be clear: you're defining getTag() ) Feb 27 04:30:04 kommunicate: no I haven't. Which class overrides that? Feb 27 04:30:28 I was looking at overriding Timber.DebugTree.createStackElementTag Feb 27 04:30:55 seems easier to just do this.. Feb 27 04:31:42 in your base activity, write a method like: protected getTag() { return "BaseActivity"; } Feb 27 04:31:50 then override it in your subclasses Feb 27 04:32:40 when you call it in your baseactivity it should use the subclassed method Feb 27 04:33:14 unless you explicitly cast the object to the supertype, in which case it'll use the BaseActivity version Feb 27 04:33:26 no need to mess around with a library Feb 27 04:34:19 well it seems like getClass().getSimpleName() does exactly what I want Feb 27 04:34:35 I suppose I could just ditch Timber and used android.util.Log Feb 27 04:34:41 that.. should also work! Feb 27 04:35:11 careful with that one though -- max character length for android.util.Log is something like 23 char Feb 27 04:35:33 i kinda figured you were already using android.util.Log actually -- I misunderstood what you were trying to do a bit Feb 27 04:35:53 yeah I was trying to change the way Timber generates the tag Feb 27 04:36:03 its super easy to add line numbers for example Feb 27 04:36:09 but apparantly not so easy to do this Feb 27 04:37:24 Timber is nice though because you can disable all the logging for a release build Feb 27 04:57:57 any thoughts on what to do about my package name if my domain begins with a digit? Feb 27 04:58:07 AS won't take an _ or a number as the first part of a segment Feb 27 04:59:13 spell it out or get different domain Feb 27 05:01:18 haha Feb 27 05:01:46 spelling it out is an existing domain that's already taken Feb 27 05:01:56 removing the number is also an existing domain Feb 27 05:02:25 why don't you use a packagename in relation to a domain you really own? Feb 27 05:02:43 that's the domain for the product Feb 27 05:02:57 and the product name has a number in it Feb 27 05:03:03 as the first character Feb 27 05:03:14 tell the company to change their product name Feb 27 05:03:19 hahaha Feb 27 05:03:27 i'm sure they won't object Feb 27 05:03:36 I think they're already sold on it, plus the ios version is already out Feb 27 05:04:24 and it really is a good name for what it is Feb 27 05:04:48 a good name is like 90% of a sucessful mobile app Feb 27 05:06:05 yeah I think the name is good the way it is, to be honest Feb 27 05:06:13 kind of explains what the app is in the name of it Feb 27 05:07:49 does the company have another domain? Feb 27 05:09:04 nope Feb 27 05:09:26 the company name is the name of the product Feb 27 05:09:31 or the name of the app I should say Feb 27 05:11:26 com.grekkos.companydomain Feb 27 05:11:46 ? Feb 27 05:11:48 er wait the problem is the .1companydomain Feb 27 05:11:51 yeah Feb 27 05:11:52 lol Feb 27 05:12:12 just add something to it somewhere so its unique haha Feb 27 05:12:23 I did some quick searching to see about android and it seems they're more restrictive about package names because anything that begins with _ won't install Feb 27 05:12:37 .onecompanydomain Feb 27 05:12:54 yeah Feb 27 05:12:59 I think I'll go with spelling it out for now Feb 27 05:13:09 and worry about trying to fix it if we need to when it's released Feb 27 05:13:12 well spelling it out is another registered domain right? Feb 27 05:13:20 yeah :| Feb 27 05:13:20 just find some way to make it unique Feb 27 05:13:27 and putting the number at the end is also taken hah Feb 27 05:13:30 .onecompanymobile Feb 27 05:13:41 that's not a bad idea Feb 27 05:14:00 as long as you aren't using onecompanymobile.mobile anywhere Feb 27 05:15:32 are statements before a super.method() call bad? Feb 27 05:16:10 I'm just logging the shit out of these Activity/Fragment methods until I know it off the top of my head Feb 27 05:16:10 depends on what you're calling Feb 27 05:16:33 in some cases you need to call super after, some cases before Feb 27 05:16:48 Timber.v("MainActivity.onCreate()") for example Feb 27 05:16:51 sometimes it doesn't matter Feb 27 05:17:03 what's Timber? some kind of log? Feb 27 05:17:04 oh Feb 27 05:17:05 hah Feb 27 05:17:12 i get it Feb 27 05:17:14 clever name right? Feb 27 05:17:15 it should be fine Feb 27 05:17:20 wish I thought of that myself Feb 27 05:17:23 hahaha Feb 27 05:17:28 there is a Timber.log() method Feb 27 05:17:40 it would make sense to me to put it after the oncreate though Feb 27 05:17:49 when you know the super method is done executing Feb 27 05:18:06 I think in general I call super first unless I know for sure I need to call it after Feb 27 05:18:14 except in constructors Feb 27 05:18:18 well onCreateView() returns a view Feb 27 05:18:19 constructors it *has* to be first Feb 27 05:18:24 it won't compile otherwise Feb 27 05:18:24 everywhere else could have it afterwards Feb 27 05:18:39 you can still sneak it in before the return ;) Feb 27 05:18:58 but I think you only care that the method is being hit so it probably doesn't make a difference Feb 27 05:19:18 wouldn't knowing when the lifecycle method starts be a good idea? If you see onResume() is logged and then your app crashes, that would clue you into the problem Feb 27 05:19:26 I suppose you'd also get a stack trace Feb 27 05:19:39 i mean it could be kind of useful but might be overkill Feb 27 05:19:46 I wouldn't put it on every activity Feb 27 05:19:56 i'm putting it in a baseactivity Feb 27 05:20:07 in one of the apps i'm working on I have a TrackingActivity Feb 27 05:20:10 so all my activities have it. But yeah, overkill Feb 27 05:20:17 which makes use of an abstract tracking wrapper (for things like google analytics) Feb 27 05:20:27 in my onResume() I log the screen view hit Feb 27 05:20:39 like I said, I want to master the lifecycle methods Feb 27 05:20:40 which is kind of useful Feb 27 05:20:47 oh for that purpose Feb 27 05:20:48 hmm Feb 27 05:20:51 especially when you throw fragments into the mix Feb 27 05:20:55 I mean if you want to Feb 27 05:21:20 but I'd also put the actual class name so it works for the child classes Feb 27 05:21:21 i'm not entirely sure what goes on ha. I can always delete all the logging later. And Timber will disable logging on a release build automatically Feb 27 05:21:32 you could also put some logic around it Feb 27 05:21:37 so that you can shut it up when you don't need it Feb 27 05:21:46 without having to comment/delete things Feb 27 05:22:16 I think in general you should get a good idea of the lifecycle after a while even without the logging Feb 27 05:22:19 grekkos: yeah I was trying to override the tag. I'm settling with getClass().getSimpleName() which will show a subclass name Feb 27 05:22:29 yeah Feb 27 05:22:36 that should be fine Feb 27 05:22:55 welp, I've burned a good 2 hours figuring out my logging situation Feb 27 05:23:05 maybe I should work on like, the UI Feb 27 05:23:07 haha Feb 27 05:23:09 does anyone know if it's difficult at all to rename a package later if I need to? Feb 27 05:23:13 ahaha Feb 27 05:23:14 yeah Feb 27 05:23:18 I need to get more into UI Feb 27 05:23:26 I've been stuck doing so much services stuff Feb 27 05:23:29 I forget how UI works often Feb 27 05:23:30 not too hard. Android studio will let you rename packages easily Feb 27 05:23:44 alright i'll stick with one thing for now and fix it later Feb 27 05:24:03 it will change all the usages/imports too Feb 27 05:24:13 The problem with renaming a package is more about whether it changes the id of your app Feb 27 05:24:20 I think you'll have to edit the manifest yourself Feb 27 05:24:35 oh yeah, definitely don't change it after you release Feb 27 05:24:40 or updates will not work Feb 27 05:25:36 you will be fine developing the app for now. Just decide on the package name before you release Feb 27 05:25:46 CedricBeust: yeah I guess that's what I'm concerned about most... but I see some other people have done some unconventional things to get their package names right Feb 27 05:25:54 CedricBeust: the original problem is my domain name begins with a number Feb 27 05:26:19 Yes I got that Feb 27 05:26:47 Note that you can always get a new domain right now and use that, unless you're very attached to your number domain Feb 27 05:27:05 it's not mine heh Feb 27 05:27:08 so I can't do anything right now Feb 27 05:27:14 I have to wait for the CEO Feb 27 05:27:17 :p Feb 27 05:27:21 Oh it's for your company Feb 27 05:27:34 complete noob here, I downloaded Android Studio and tried to open a gradle file and it is asking for 'Gradle home:' do I need to install that or find it on my computer? Note I am using a Mac Feb 27 05:27:34 yeah Feb 27 05:28:00 i actually forgot how I set u gradle on my machine Feb 27 05:28:09 depends on the OS Feb 27 05:28:17 hm, is there an easy SANE way to limit EditText ime / characters to 0-9 A-Z ? do i really have to implement an InputFilter that disregards autosuggestions ? Feb 27 05:28:26 on windows, make an environment variable Feb 27 05:28:41 well either way its an environment variable I guess Feb 27 05:28:43 RustyShackleford: I'm on OSX Feb 27 05:28:57 theres a bash file you need to edit Feb 27 05:29:04 ahh ok Feb 27 05:29:12 i thought there was something in android studio Feb 27 05:29:17 to let it use its own bundled gradle Feb 27 05:29:20 or did they stop bundling gradle Feb 27 05:29:42 I think you want to set ANDROID_HOME Feb 27 05:29:48 and from there it can find gradle Feb 27 05:29:56 or you can use gradle wrapper Feb 27 05:30:22 ahh there is a folder with that I guess I need to point it to that Feb 27 05:30:52 yup point it to the root of the android sdk Feb 27 05:30:54 I downloaded some library on github and opened a gradle file in the sample folder Feb 27 05:32:24 what do you guys reccommend for minimum supported version? 4.0? Feb 27 05:32:43 16 at least Feb 27 05:33:01 grekkos new app ? Feb 27 05:33:11 g00s: yeah Feb 27 05:33:12 like, just getting started now ? Feb 27 05:33:17 i'd do 19 :D Feb 27 05:33:19 haha Feb 27 05:33:47 assuming it will take you a few months Feb 27 05:34:00 yeah it might Feb 27 05:34:19 quickest would be 1 month but I don't think i have enough time to dedicate to actually get it in 1 calendar month from now Feb 27 05:34:22 actually i would say minSdk=21 to build it, and then decide when you are done how low to go Feb 27 05:34:23 is API 15 to 19 that much of a difference? Feb 27 05:34:37 i think so Feb 27 05:34:58 not sure actually I think most of the things i usually want are in 20 or 21 Feb 27 05:35:01 21* Feb 27 05:35:05 so like, what would be different? Feb 27 05:35:07 I'd recommend to target 23, so you start thinking about flexible permissions right now. These things are a bitch to revisit later. Feb 27 05:35:22 yeah Feb 27 05:35:33 my only dev device is 23 Feb 27 05:35:53 I think I'm going to buy this 6P already Feb 27 05:35:59 hrm android:digits="0123456789......yourcharcters" didn't work for me Feb 27 05:36:00 if starting now, I'd go 21 Feb 27 05:36:02 i have the 5x I like it quite a bit Feb 27 05:36:13 pfn: yeah? you think it's not too restrictive? Feb 27 05:36:15 someone here bought one and hated it Feb 27 05:36:23 pfn: because 21 would be lovely lol Feb 27 05:36:31 I was also eyeing that one. Price tag and size are definitely appealing Feb 27 05:36:47 I write a lot of wrapper code around 21 features at work Feb 27 05:36:57 I've tried the 6p too Feb 27 05:37:03 which features? Feb 27 05:37:16 if you don't mind the size of the 6p it's pretty nice (it's thinner than the 5x) Feb 27 05:37:31 some phone number features I think actually Feb 27 05:37:33 I think it might be too huge. Or it could be awesome Feb 27 05:37:41 PhoneNumberUtil got a refactor Feb 27 05:37:52 use it for a while and the size melts away Feb 27 05:38:08 the 6p is noticeably thinner than the 5x Feb 27 05:38:09 I wonder if it will fit in my pocket Feb 27 05:38:17 or if i'll need to get my pants tailored Feb 27 05:38:19 not that the 5x is super thick Feb 27 05:38:30 grekkos, for personal stuff, go with what's best and current and if it gets better, expand support Feb 27 05:38:32 yeah the 5x doesn't fit so nicely in my jeans :| Feb 27 05:38:37 I usually put a case on phones, so that adds to the size too Feb 27 05:38:51 pfn: "gets better?" like more widespread? Feb 27 05:39:07 sure, if there's actual user demand Feb 27 05:39:07 RustyShackleford: I had to remove the case on my 5x actually cause it didn't fit in my pants Feb 27 05:39:16 pfn: yeah I think I like that approach Feb 27 05:39:35 pfn: because right now I can't even test on those models (without the emulator which is slower than I'd like to deal with) Feb 27 05:40:23 how tight are your pants dude? Feb 27 05:40:41 my galaxy s5 is just a little smaller Feb 27 05:40:49 its not THAT bad hah Feb 27 05:40:58 Two words for you: belt pouch Feb 27 05:41:02 they're not that tight but the pockets in these pants are super short for some reason Feb 27 05:41:10 yeah, my devices are all api 21 or 23 Feb 27 05:41:21 RustyShackleford: i mean they're not very deep Feb 27 05:41:33 pfn: I like where your head's at Feb 27 06:03:48 my apps are all min sdk 9, or 14 or whatever depending on when I started them Feb 27 06:07:11 do you test directly from a REST api? Feb 27 06:07:16 or do you mock that out? Feb 27 06:07:40 our PA environments at work are a pain in the ass. It would be best if we could mock it out Feb 27 06:09:32 ugh wth; its like none of the EditText attributes are working on EditTextPreference Feb 27 06:16:27 Retrofit + mocking the interface Feb 27 06:17:54 we do use retrofit already Feb 27 06:18:06 Then you already have interfaces Feb 27 06:18:12 yeah they want us to write unit tests for every method we touch in a month Feb 27 06:18:26 Tell them functional tests are much more important Feb 27 06:18:43 which seems tough. All of our business logic is in Activities and Fragments Feb 27 06:19:01 RustyShackleford nooooooooo Feb 27 06:19:35 yup Feb 27 06:20:17 it is a complete trainwreck honestly. We need a massive refactoring Feb 27 06:22:47 its fucked man. This is not what I was expecting at my first job Feb 27 06:24:58 it's possible to use C or C++ native code in android java, right? Feb 27 06:25:38 heh Feb 27 06:25:43 RustyShackleford: you'd be shocked :) Feb 27 06:25:50 :') Feb 27 06:27:59 eeyup Feb 27 06:28:06 RustyShackleford next time pick field with higher bar to entry :P Feb 27 06:28:14 hah Feb 27 06:28:24 g00s: depending on where you are that bar is fairly high Feb 27 06:29:36 RustyShackleford also, if the state of things at this company is a surprise to you - need to ask yourself how that slipped through. didn't ask the right questions, etc Feb 27 06:32:15 there was a red flag when they told me that there are no automated unit tests Feb 27 06:32:33 RustyShackleford: automated testing is a luxury anywhere, from my experience Feb 27 06:32:36 they were interested in what I new about unit tests/testing Feb 27 06:32:47 RustyShackleford: good class design is almost unheard of in most cases for me Feb 27 06:33:08 I dunno, they think a few college grads can fix everything. On one hand its a great oppurtunity to look good Feb 27 06:33:21 RustyShackleford: well if they don't mind you refactoring and breaking up that business logic I'd say go for it, you'll feel good once it's all cleaned up Feb 27 06:33:25 yeah Feb 27 06:33:59 well i'm definitely still learning. Yeah I'm trying but a major refactoring is a little beyond my ability Feb 27 06:37:30 RustyShackleford: are you using intellij? Feb 27 06:38:02 RustyShackleford: also it will probably be very very painful, but it will make you stronger Feb 27 06:48:12 is ther a way to make android studio use my git username in the template? Feb 27 06:48:16 the file header template Feb 27 06:48:37 grekkos: we are using android studio Feb 27 06:48:56 I got there in october, they were still using eclipse Feb 27 06:51:11 RustyShackleford: AS will help heavily with those refactors Feb 27 06:51:21 RustyShackleford: I'm also ripping things apart where I am now and reconstructing it Feb 27 06:56:34 refactoring is hard Feb 27 06:56:42 I can't change anything without breaking something else Feb 27 06:58:43 yep Feb 27 06:58:59 that's a sign that the code was too tightly coupled, too fragile maybe Feb 27 06:59:13 and as you probably know, bad for testing Feb 27 06:59:30 it's taken me months but I've slowly broken things down here and I'm still chuggin along Feb 27 07:13:41 what's the use of having different levels of context: activity, base and application? Feb 27 07:18:10 context for each component Feb 27 07:18:48 what do you get out of that though? Feb 27 07:19:05 i'm missing something obvious about this Feb 27 07:19:27 you have different types.. and the context holds specifics about those types Feb 27 07:19:41 oh, is there extra functionality in some of the contexts? Feb 27 07:19:46 cat , dogs.. context holds specifics about the cat and the dog Feb 27 07:19:58 cat context.. might differ from dog context Feb 27 07:20:09 ya, different types Feb 27 07:20:34 container, components, .. you get the idea Feb 27 07:20:34 ok, that makes sense Feb 27 07:20:38 thanks muthu Feb 27 07:20:42 sure Feb 27 07:23:51 cats dogs ? Feb 27 07:23:57 kommunicate https://possiblemobile.com/2013/06/context/ Feb 27 07:24:00 cat dog, cat dog Feb 27 07:24:06 something something something with a little cat dog Feb 27 07:24:52 haha Feb 27 07:24:58 kommunicate got it Feb 27 07:28:46 RustyShackleford: I have no idea what you're talking about :) Feb 27 07:30:23 me neither Feb 27 07:33:28 woohoo posted a simple NDK example to github Feb 27 07:33:38 instead of explaining things i can just point to it from now on Feb 27 07:39:39 ashiren, nice Feb 27 07:39:49 nothing like a sample Feb 27 07:42:06 also happy Caturday Feb 27 07:44:21 haha.. thank u happy :)aturday Feb 27 08:31:05 Do you see any problems with using gradle 2.0 beta and AS 1.5.1 or should i use 2.x ? Feb 27 08:31:35 no Feb 27 08:34:04 for example my gradle file now is completely "yellow" with the warning buildTypes cannot be applied to (groovy.lang.Closure) Feb 27 09:38:48 does anyone have any example on how to send packets to a socket on android Feb 27 09:56:43 If a parent knows what sizes all the children views are, does it need to call measure on the child in onMeasure? Feb 27 09:57:58 ie if the parent was a table view with 3 columns and 2 rows, based on some static AR and the device width, what's the proper way to pass the width and height to the child from the parent (which can be computed in the constructor)? Feb 27 10:12:35 lasserix: that goes on the child onMeasure I believe Feb 27 10:29:15 Anyone have a clever way of handling extra pixels, ie: you divide a width by 3 to split evenly, but you are left with 1 or 2 pixels excess: just center it? Feb 27 10:29:29 ie treat excess as center-about gravity? Feb 27 10:32:25 ohai! I am trying to get ADB to work wit an ouya (an android based game console). ADB works on my laptop with my phone and other devices, but not the ouya. I run Ubuntu 14.04 and I have created the udev rules and I have enabled USB debugging the the settings menu on the device Feb 27 10:32:31 it also does not work when I boot the device in recovery mode Feb 27 10:36:04 lasserix, I just did Math.ceil for the calculation and it worked for me Feb 27 10:36:51 but you can also center the whole thing and you'll be left with very small borders on each side Feb 27 10:38:07 Hello, i want to open a file for reading in android, what is the current path? how do i get to res directory? Feb 27 10:38:25 antilogic, res isn't a directory Feb 27 10:38:28 you need to use assests or res/raw Feb 27 10:38:35 but then you use context, getAssests Feb 27 10:39:25 http://stackoverflow.com/questions/9544737/read-file-from-assets Feb 27 10:39:51 thank you Feb 27 11:16:48 Hi, I'm fairly new to programming Android. And I'm trying to find a suitable way to connect to several wifis and get a ping response back. This would have to take place in the background for obvious reasons. So, I'm a bit confused about AsyncTask, Service, IntentService, Runnable etc.. where would be a good place to start? I think the pinging would take up to 5 minutes Feb 27 11:17:37 is it consider Good or Bad practice to put two very related code lines in one ... e.g. btS.connect(); btSStatus = true; which is connecting a socket and changing its flag variable. Feb 27 11:24:59 opius.. all of them would do the job Feb 27 11:25:35 asynctask should be good enough Feb 27 11:29:06 Hello! How do you create a back press behaviour like with the Gmail app on Android 4.4.x and above? When you click on an e-mail is it a new activity? Feb 27 11:29:22 The default behaviour for the Toolbar widget is not like that Feb 27 11:29:49 I'm just confused :). Because AsyncTask says it's for shorter work like a couple of seconds at the most Feb 27 11:32:48 opius an async task is just a thread with a callback to the UI thread Feb 27 11:33:08 a service is a different android component, but not at all a thread, Feb 27 11:33:31 threads can run in a service, just as they can run in activities Feb 27 11:33:58 you probably want to put your wifi awareness code in a service, so that it is not coupled to the activity (current screen) directly Feb 27 11:34:03 *coupled to the life cycle Feb 27 11:34:39 and intent service is a particular kind of service where the "async task" is integrated into it, that is, anything that runs in the intent service is already running in a background thread Feb 27 11:35:06 a runnable is just a wrapper object for passing whatever code is in the runnable to some thread Feb 27 11:36:24 so for instance, you could when your app starts, kick off a service, in that service, use a thread (wheter it be executor that you pass a runnable to, or async task) Feb 27 11:36:52 to do wifi awareness stuff, upon successful ping back, let the activity know Feb 27 11:37:00 which you could use a local broadcast manager Feb 27 11:37:16 or if you bind the thread you can you the binder Feb 27 11:44:38 lasserix thanks for the explanation. I'm gonna read it a few time until I understand it fully :) Feb 27 11:53:56 Hey. Iam going through http://developer.android.com/training/basics/firstapp and when trying to compile i always get "aapt finished with non-zero exit value 1" error. after looking into this i got to error "Unknown source file : invalid resource directory name: .../MyFirstApp/app/build/intermediates/res/merged/debug/drawable-anydpi-v21" Feb 27 11:55:20 i only get though this by changing the min sdk version (the tutorial says API8) to something higher, i tried API15 Feb 27 11:56:02 can someone explain me what happens? Feb 27 11:58:02 err, API15 does not work either, only 23 for now Feb 27 12:03:12 where did anydpi come from? Feb 27 12:04:17 http://stackoverflow.com/questions/19746319/how-to-solve-invalid-resource-directory-name-resource-crunch Feb 27 12:04:29 looks like you can just delete the /bin directory Feb 27 12:05:12 http://pastebin.com/Q3J3QUpr this is the stacktrace Feb 27 12:05:27 did you try cleaning? Feb 27 12:05:40 yea, i found that too.. but that does not help Feb 27 12:05:52 did you try deleting any gen folders? Feb 27 12:06:09 and anydpi was your way of saying or does it literally say anydpi? Feb 27 12:06:45 i just copy pasted stuff. i did not try to delete folders Feb 27 12:07:26 try and delete what's in build Feb 27 12:08:11 "generated intermediates outputs" all these? Feb 27 12:08:40 yeah Feb 27 12:09:15 same error remains Feb 27 12:09:21 umm Feb 27 12:09:26 what tutorial are you following? Feb 27 12:09:49 http://developer.android.com/training/basics/firstapp/creating-project.html Feb 27 12:10:39 are you using android studio? Feb 27 12:10:42 yep Feb 27 12:11:07 if you create a new project with a blank activity will it compile? Feb 27 12:11:29 i guess if i set the min sdk version to API8 no. but i can give it a go Feb 27 12:11:35 (thats what i did before..) Feb 27 12:12:14 can you take a screenshot of your project view? Feb 27 12:12:25 sure. mompl. just creating a new project.. Feb 27 12:12:56 hum. no error now. lemme have a look.. Feb 27 12:14:00 did you add a folder to res? Feb 27 12:14:01 yea, its building successfully now. is android studio dependend on moon phases? Feb 27 12:14:07 no Feb 27 12:14:08 nopes Feb 27 12:14:11 hmm Feb 27 12:14:40 eclipse was but as is fairly stable Feb 27 12:14:41 i did not change anything after creating the project (just like i did now, but now it works) Feb 27 12:16:29 does the version of the "Minimum SDK" has to be installed? Feb 27 12:16:38 or just the target SDK? Feb 27 12:19:15 for my understanding i only have to have the target SDK version installied. thats the only thing i changed between creating the projects, i installed API8 SDK Feb 27 12:27:00 anyhow. thanks for your help lasserix Feb 27 12:28:28 when is android studio 2 comming out? Feb 27 12:28:30 oh Feb 27 12:28:33 that makes sense Feb 27 12:28:44 if you didn't have the target on your machine, it couldn't compile it Feb 27 12:28:52 open sdk mananger and verify which ones you have? Feb 27 12:29:42 lasserix: i had the target all the time. iam talking about the "min sdk" version.. Feb 27 12:29:55 oh Feb 27 12:30:11 i dunno maybe it wasn't done doing something Feb 27 12:30:20 but if works now it probably (?) wont happen again :) Feb 27 12:30:53 yea :) Feb 27 12:33:22 if i override onMeasure in a subclasses viewgroup i have to call measure on the children or can i just set the width/height? Feb 27 12:33:35 or can i call super to take care of the children then set the width/height? Feb 27 13:50:33 Is there any simple tutorials about how to parse XML from URL? Feb 27 13:53:27 mentazoom look into simpleframework Feb 27 13:53:33 and retrofit Feb 27 13:55:13 jvrodrigues: Any link? Feb 27 13:55:55 http://simple.sourceforge.net/download/stream/doc/tutorial/tutorial.php Feb 27 13:56:14 once you have a string with the xml in it Feb 27 13:56:16 ah sourceforge.. Feb 27 13:56:17 just pares it using that Feb 27 13:58:09 Hey is there a way to get the Pan/Tilt state of an Android device...Is it Horizontal or Vertical at this moment? Feb 27 13:58:38 yep Feb 27 13:58:43 just use the accelerometer ;) Feb 27 13:59:47 you want to know if its portrait or landscape? Feb 27 13:59:57 or what? Feb 27 14:00:43 that's even easier! Feb 27 14:04:01 jvrodrigues: A library would probably be overkill for my one small xml file parsing, i'm trying this http://pastebin.com/chDJvBXU , the arraylist tasks is always empty Feb 27 14:05:02 well does the xml have stuff on it? Feb 27 14:05:35 yes Feb 27 14:06:55 :/ Feb 27 14:06:56 dunno Feb 27 15:11:24 guys Feb 27 15:11:33 how can I split packets using net.Socket? Feb 27 15:25:48 btAdapter = BluetoothAdapter.getDefaultAdapter(); the I try btAdapter Ctril Space it give the possibility to .enable(); which is suppose it turns on the default adapter but then it keep crashing without compile time error Feb 27 15:26:42 so what is btA.enable();? does it turn on the default bluetooth adapter on android device? Feb 27 15:27:09 could be done without ueser's interaction? Feb 27 15:53:06 hmm, I'm still pretty impressed by google play services vision Feb 27 15:53:12 really nice library Feb 27 16:17:41 I need to fetch some data from a web server, some data from local storage, and then combine it to objects Feb 27 16:17:53 My plan is to implement a helper class that does this Feb 27 16:18:27 What is the correct way to communicate with this helper? Should I have all views that need to fetch objects implement interfaces with functions the helper could call? Feb 27 16:18:28 good for you Feb 27 16:19:08 Or should the views handle the asynchronicity themselves, calling a synchronous helper function in a separate thread? Feb 27 16:19:14 Or are there yet another way? Feb 27 16:19:17 s/are/is Feb 27 16:19:26 i would use the callback Feb 27 16:19:34 get things asynchronously Feb 27 16:20:45 Ashiren: you are the first to answer, so your way is probably the way to go, I'll do that. Thanks! Feb 27 16:21:10 probably there is no one correct way to do this Feb 27 16:23:57 you're probably right. That's what is so new to me about android development, I actually have to figure some stuff out myself Feb 27 16:25:47 What is a good way to store your shaders? im using gles 2.0 and ndk. currently im using just strings but that is very inconvenient to edit. Feb 27 16:46:09 Does the android system broadcast an intent when an SMS is *sent* ? Feb 27 16:48:04 it does yes Feb 27 16:50:37 jvrodrigues: awesome; do you have a link for more details ? Feb 27 16:52:03 read up on "android.provider.Telephony.SMS_RECEIVED" intent filter Feb 27 16:52:05 google is ur friend Feb 27 16:52:17 cant search righ tnow Feb 27 16:53:11 SMS_RECEIVED is for receiving SMS. I'm looking to handle an event when the phone *sends* an SMS. Feb 27 16:55:37 OH Feb 27 16:55:42 that I dont think s Feb 27 16:55:46 at least not htat I know Feb 27 17:01:23 hmm Feb 27 17:08:26 antilogic, you can add them as assests Feb 27 17:12:30 w0bni, it depends on complexity, if its encapsulatable in the view, it'll make your life easier Feb 27 17:13:18 but if for instance you are loading images in a listview, then externalizing it will probably help since there can be an class dedicated to fetching/loading/caching the images for the listview Feb 27 17:24:53 Should I have .gradle/ in my gitignore for an Android Studio project? Feb 27 17:25:36 I'm trying to use RXJava Feb 27 17:25:48 where do I subscribe/unsubscribe? Feb 27 17:26:12 in onCreate() and onDestroy() Feb 27 17:26:21 there are a few more fragment lifecycle methods Feb 27 17:30:53 RustyShackleford, wherever makes sense for the problem you're solving Feb 27 17:31:12 RustyShackleford ... i think you are making a huge mistake; taking on too many things at once in this project which is apparently, a disaster. Feb 27 17:31:24 one new shiny thing at a time ! :D Feb 27 17:31:55 first, refactor shit so not everything is in the Activity Feb 27 17:32:08 then worry about bs libraries later Feb 27 17:33:01 RxJava has a steep learning curve, at least knowing how to apply it in Android with all the lolcycle stuff Feb 27 17:36:29 g00s: this is a personal project I'm using these libraries on Feb 27 17:36:44 rx java is the one shiny thing I'm adding for now Feb 27 17:37:41 I'm gonna try it. If it becomes a disaster I can always rewrite lol. This is a prototyle Feb 27 17:38:08 i've been thinking, what would be the strategy to build a persistent job queue with rxjava? Feb 27 17:39:07 so in the template i'm following, they subscribe to the Observable in Activity.onCreate and unsubscribe in onDestroy Feb 27 17:39:29 bitkiller i think tape does something with queue, maybe write a rx wrapper for it ... Feb 27 17:39:44 i'm looking for the same behavior. Observe while the Fragment is alive, unsubscribe before it dies Feb 27 17:39:46 https://github.com/square/tape Feb 27 17:39:53 i haven't used it, so i'm just guessing Feb 27 17:40:04 bitkiller also there is Goro, which i think has Rx wrappers Feb 27 17:40:20 bitkiller and https://github.com/path/android-priority-jobqueue Feb 27 17:40:38 oops https://github.com/yigit/android-priority-jobqueue Feb 27 17:40:45 which is one of yigit boyars creations Feb 27 17:41:10 g00s, i was thinking of something in the path/... line, but 'reactive' from the start Feb 27 17:41:47 hey mates! good afternoon Feb 27 17:43:03 i tested the path/goyars' and it had some issue with my use case, if i remember well Feb 27 17:43:30 i didn't realize he was doing 2.0 , i'll have to watch out for it Feb 27 17:43:55 bitkiller i've just put my jobs in sqlite for now Feb 27 17:44:01 i have to do sequential dependent jobs, and i think it doesn't handle that Feb 27 17:44:03 but would like to see what you come up with ... Feb 27 17:44:14 g00s, yes, i took the same road Feb 27 17:44:15 oh so task dependencies etc Feb 27 17:44:16 question here: i want to migrate some attributes from my layouts to the styles.xml but one of the atttributes/values are relate to the [xmlns:app="http://schemas.android.com/apk/res-auto"] app domain. which throws a error at the build time: "No resource found that matches the given name: attr 'app:switch_font_size'.". Is it possible to set app:[attrs] on style? Feb 27 17:44:40 and used the Bolts lib Feb 27 17:46:11 bitkiller how was Bolts? i think at this point i automatically tune out fb stuff (maybe prematurely) Feb 27 17:46:30 is anyone else a fan of MVP? Feb 27 17:46:41 I still need to see how it works out in practice Feb 27 17:46:54 but the example I saw looks so beautiful and organized Feb 27 17:46:59 RustyShackleford you can read the original paper from Taligent Feb 27 17:47:04 simple stuff .. Feb 27 17:47:15 well, as the app in question uses Parse, i decided to use Bolts Feb 27 17:47:26 sure Feb 27 17:47:30 thanks for your time mates. Feb 27 17:47:41 and it has its pain, but i managed to do what was needed Feb 27 17:48:06 RustyShackleford most questions are around how to allocate the M, V, and P in terms of android components Feb 27 17:48:07 but i only implemented the queue for one entity only, thus it's not generic enough Feb 27 17:48:55 enough for what it should be for me to use in other projects without having to go through the copy/paste/test pains Feb 27 17:49:15 oh vyscold left Feb 27 17:49:30 i think he just had to remove the app: prefix in the style lol Feb 27 17:52:05 g00s: here's the design I'm copying https://github.com/ribot/android-boilerplate Feb 27 17:52:43 maybe it's a little overarchitected. Seems like it would scale well though Feb 27 17:53:08 plus its an excuse to learn rxjava and dagger2 Feb 27 17:53:17 i guess if it helps, i don't like libraries for what are basically design patterns Feb 27 17:53:37 maybe as source of ideas Feb 27 17:53:42 yep lots of design patterns going on Feb 27 17:54:16 is it possible to change the default color for all buttons in my app? Feb 27 17:54:30 grekkos sure, theme Feb 27 17:54:51 g00s: is that different from a style? I tried creating a