**** BEGIN LOGGING AT Wed Apr 08 02:59:59 2015 Apr 08 03:00:03 surf2b1: my understanding which could be wrong is: if the advertiser chooses to pay per impression, you get paid per impression. if the advertiser chooses to pay per click, you get paid per click. Apr 08 03:00:41 <_genuser_> do you select the category of what users see? Apr 08 03:00:53 <_genuser_> games always have ads of busty women or all together naked women. Apr 08 03:01:07 _genuser_: yeah you can allow and block categories Apr 08 03:01:36 the only one I've blocked is "Black Magic, Astrology & Esoteric" because I hate psuedoscience Apr 08 03:01:43 <_genuser_> as unobtrusive as google's browser ads are, that obtrusive and annoying admob ads are. I wonder why google hasn't addressed that. Apr 08 03:02:38 maybe I should look into different networks Apr 08 03:13:45 The more I learn about Kotlin, the more I think Android programmers would be crazy not to use it post 1.0. Apr 08 03:14:05 need a whole new paradigm...ads don't really work, people hate them...yet people like products, how to get the word out in a better way? Apr 08 03:14:40 myke: also how to monetize apps and websites? users are now used to free and this probably won't change Apr 08 03:14:44 dunno if ads are _inherently_ bad. the massive bombardment approach we're in right now, however, is. Apr 08 03:15:01 also "ads don't really work" needs a source, afaik they work really well Apr 08 03:15:02 duncannz: well i'm talking about a whole step above all that Apr 08 03:15:16 yeah? Apr 08 03:15:16 what would that be Apr 08 03:15:33 duncannz: they *can* work...but it's certainly not as easy as set up an AdWords campaign (or whatever) then kick back and watch the dollars roll in Apr 08 03:15:44 duncannz: if it was that easy ... ! Apr 08 03:16:09 people hate ads, whether they are influenced by them or not Apr 08 03:16:29 yes I use an ad blocker on my computer and phone. which feels hypocritical now that I'm making money from them Apr 08 03:16:35 <_genuser_> TacticalJoke: wth is kotlin? Apr 08 03:16:55 and ads for things like soap Apr 08 03:17:48 anyone make any innovated useful stuff? Apr 08 03:18:04 VirgoSun: working on it!!! Apr 08 03:18:13 besides of earnings each others Apr 08 03:18:31 VirgoSun: sorry you're losing me a bit, can you say it another way? Apr 08 03:18:32 myke; tell me your Apr 08 03:18:46 troll bot ... Apr 08 03:18:49 In Kotlin, even Android programmers can (today) say stuff like this: val loggedInUsers = users.filter { user -> user.isLoggedIn() } Apr 08 03:18:51 bankai_: thanks Apr 08 03:19:12 (Or "users.filter { it.isLoggedIn() }".) Apr 08 03:19:33 all in here i see, just digged in how to earn as much from games, ads, .... Apr 08 03:19:42 TacticalJoke: i like that, i'm still going to give scala the old college try Apr 08 03:20:02 From what I've read, Scala is a good fit for Android. Apr 08 03:20:07 Kotlin looks way better here. Apr 08 03:20:13 I think Scala is kinda heavyweight. Apr 08 03:20:19 s/is/isn't/ Apr 08 03:20:23 Scala isn't* Apr 08 03:20:56 Clarification: Scala isn't a good fit. Scala is kinda heavyweight. Apr 08 03:21:01 you had 1 problem, then you used a regex Apr 08 03:21:05 lol Apr 08 03:21:28 now you've got at least 98 Apr 08 03:22:21 can somebody help me get my Floating action button placed correctly. I have a map view at the top and a linearlayout with some text views under it. I would like for the FAB to be split between the layouts Apr 08 03:22:44 TacticalJoke lol i'm reading these 2 /r/androiddev posts Apr 08 03:22:50 Also, Kotlin allows awesome stuff such as this: when { foo -> handleFoo(); bar -> handleBar() } Apr 08 03:22:56 Way nicer than if..else if..else. Apr 08 03:23:15 The top two? Apr 08 03:23:47 (Actually, Kotlin has way better stuff than that. I just have a thing about 'when' statements.) Apr 08 03:23:47 something like this http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0Bx4BSt6jniD7T0hfM01sSmRyTG8/layout_structure_regions_mobile.png but with a mapview on top Apr 08 03:23:59 android market have billion apps , almost all are crappy Apr 08 03:24:02 the future of android dev, and teh 2nd one Apr 08 03:24:17 "The code quality and end product is bad because the platform itself is very un-developer friendly" a men brotha Apr 08 03:24:29 Yah. Apr 08 03:27:11 VirgoSun: yep! isn't it awesome? that's why there's ratings, and websites that list "curated" apps Apr 08 03:27:40 not a new concept...anyone here remember Stroud's (?) consumate collection of winsock apps (or something) ? Apr 08 03:28:02 myke: it is not awaresome, it is a waste of human resources Apr 08 03:28:44 VirgoSun: that's how life works. consider a typical plant, how many seeds does it produce, and how many of those seeds go on to even become a seedling, let alone a successful adult plant that reproduces again? Apr 08 03:28:56 Google Play is kinda like Twitter. 99.997% awful. Apr 08 03:29:13 you can't create (in general) without a lot of waste Apr 08 03:29:36 it is like employed but no assignment.... hehe Apr 08 03:29:47 It's amazing how buggy even huge "Zomg best app evar" apps are. Apr 08 03:29:51 besides "waste" is only a concept where resources are scarce and there's an explicit goal Apr 08 03:30:08 anyone have good tips to increase your apps rating without doing anything against TOS? Right now I have 46 5star, 26 1star and 28 inbetween. Only one of the 1 star raters has written a review, heaps of the 5 star raters write a positive review. I am using this atm: https://github.com/PomepuyN/discreet-app-rate Apr 08 03:30:13 TacticalJoke: i kind of like that, because it implies opportunity Apr 08 03:30:15 I use a bus-timetable app that has a gazillion downloads and stars. I can consistently make it crash just by tapping Back quickly after starting an activity. Apr 08 03:31:06 i think my current work-in-progress still crashes if the phone is offline Apr 08 03:31:10 * myke hides in shame Apr 08 03:33:15 myke: I kind imagine It must be more productive if 3/4 of all mobile and media developers switch to fashion or industrial design LOL Apr 08 03:33:47 myke: But would you release your app in such a state? Apr 08 03:34:07 A lot of developers don't seem to care very much. Some apps have basic bugs for *years*. Apr 08 03:34:13 Or they're just incompetent. Apr 08 03:34:36 when snapchat first released discover it would use literally gigabytes of background data downloading them Apr 08 03:35:18 oh and skype I have cyanogenmod privacy guard and every time I boot up my phone skype requests the camera straight away Apr 08 03:35:30 lots of popular android apps are buggy Apr 08 03:38:05 duncannz: well in all fairness, it's probably checking to see if the cam is available for use, so it knows if it can offer video calls Apr 08 03:38:07 <_genuser_> ah, microsoft has released another surface. Apr 08 03:38:20 myke: can't it at least wait until I open the app? Apr 08 03:40:10 duncannz: is it doing that thing where it preloads the app at boot so it comes up right away when (if) the user runs it? Apr 08 03:41:00 off the top of my head openoffice and chrome do the same thing, on windows anyway Apr 08 03:41:09 that sounds like a horrible thing for mobile devices Apr 08 03:41:15 imagine if every app did that Apr 08 03:41:34 also skype takes the longest of all my apps to open so yeah.. it's just an all round buggy app Apr 08 03:41:37 From what I've seen, Skype is pretty awful. Slow, buggy, etc. Apr 08 03:41:49 Are there *any* good Android apps? :D Apr 08 03:41:55 I guess Google Chrome isn't bad. Apr 08 03:42:02 I can't think of many, though. Apr 08 03:42:12 <_genuser_> the best android app: naughty kitties. Apr 08 03:42:20 the fitbit app is great Apr 08 03:42:29 awesome material design, very fast Apr 08 03:42:38 <_genuser_> oh wait, no naughty kitties. Apr 08 03:42:42 <_genuser_> FIFA UT 2015 Apr 08 03:42:46 ankidroid is great too Apr 08 03:43:57 https://play.google.com/store/apps/details?id=com.kauf.talking.baum.TalkingBabsyBaby&hl=en Apr 08 03:43:59 skype on desktops is ok, skype on android was awful for a long time Apr 08 03:48:18 duncannz: went SDK - will see how it goes Apr 08 03:49:08 Are there any other android/java IRC channels worth idleing in? This is the only one I ever use Apr 08 03:49:20 ##java Apr 08 03:49:46 Also, #kotlin if you're interested in a good programming language for Android. Apr 08 03:50:41 Thank you. I will check them out Apr 08 04:06:54 JesusFreke see this ? http://www.gizmag.com/halfbike-ii/36889/ Apr 08 04:08:02 heh, nope Apr 08 04:08:09 I did get my lunicycle though :D Apr 08 04:10:23 g00s: I do have that tire though :D Apr 08 04:10:29 although, I actually prefer the hookworm Apr 08 04:13:18 g00s: it looks like you might actually get some of the "leaning" feeling of a unicycle with it (which is one of the things I love :D) Apr 08 04:13:34 :D Apr 08 04:15:37 i'm looking forward to a mountain bike with something like this http://www.gizmag.com/nuvinci-n330/36610/ Apr 08 04:15:41 JesusFreke ^ Apr 08 04:16:14 looks heavy :) Apr 08 04:16:23 (but awesome) Apr 08 04:16:27 seems like its pretty heavy, but the derailer and dropout are always the first victims in a big wreck :) Apr 08 04:17:13 yeah i dont care much about weight. my last mountainbike had aerospokes on it, just because they were so bomb-proof Apr 08 04:17:23 the planetary gear hub on my uni is pretty hefty - I can definitely tell a difference between in and a normal hub Apr 08 04:17:32 and that one looks quite a bit bigger Apr 08 04:18:05 and air shocks are for pansies, coil-over ftw! Apr 08 04:18:29 http://krisholm.com/en/gear/component/kh-schlumpf Apr 08 04:19:13 site down, you ddos'd them from irc ! Apr 08 04:19:29 clocks in at 3lbs. heh Apr 08 04:19:55 works for me - I must have consumed their one available host slot. :p Apr 08 04:20:09 if your app is running as a service in the background, is it still possible to alter functionality of buttons on a phone? Apr 08 04:22:33 JesusFreke hand made in switzerland Apr 08 04:27:51 g00s: and priced accordingly :p Apr 08 04:28:13 let's just say, economies of scale don't quite kick in :p Apr 08 04:32:43 meh i think i am screwed; GA dashboard still not receiving any hits; asked in forums nobody could help Apr 08 04:33:32 i wonder if there are any roll-your-own analytics setups built on spark or something i could plunk down on a server Apr 08 04:34:55 actually this is probably a good opportunity to make money; hosted & open source if you want to stand up your own analytics Apr 08 04:43:45 JesusFreke this is missing unicycles http://digg.com/video/the-running-of-the-balls Apr 08 04:44:32 g00s: +1 Apr 08 04:47:21 g00s: I think that's true of most things in life Apr 08 04:48:23 and I want a "Needs more didgeridoo" shirt, that I can wear to concerts :p Apr 08 04:48:38 except, I guess, didgeridoo concerts. Apr 08 04:51:48 hehe, well to the didgeridoo concerts you can wear the 'needs more unicycle' shirt Apr 08 04:52:50 amusingly, I'm known as the "unicycle guy" at the didgeridoo festival I go to :p Apr 08 05:20:46 how should I stop my imagebuttons from overlapping each other (in RelativeLayout Apr 08 05:20:49 ) Apr 08 05:21:27 can set leftOf rightOf above below, margins, padding Apr 08 05:22:52 so if I want them to be vertically aligned ima have to use margins/padding eh? Apr 08 05:23:23 are they the same size? can you show a screen shot or post your layout Apr 08 05:23:52 or post a mockup image of what you desire Apr 08 05:23:57 yes they are the same size Apr 08 05:24:50 http://puu.sh/h5JXI/4406150978.png this whatitis Apr 08 05:25:08 so ive got them in the right area, they're just stacked on top of each other Apr 08 05:25:36 you want that? if so you can set location on top image, then the ones below can use layout_below="@id/topImageButton" and do that again with 3 button below 2nd Apr 08 05:25:57 tyvm Apr 08 05:26:04 yep :) Apr 08 05:43:40 wow, thats pretty amazing http://www.theverge.com/2015/4/7/8359109/surface-pen-best-app-yet Apr 08 05:45:57 g00s: hah, that is pretty cool Apr 08 05:58:37 sorry to bother again whatitis but my imagebutton is really tiny (image fits in just fine) http://puu.sh/h5Lq5/9d7e44799f.png mine telling me what looks wrong? Apr 08 06:02:27 Where should I save my files in Android, so they appear under the Movies folder when I plug my phone in Ubuntu? Apr 08 06:03:44 I've tried Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES) but I can't see the files I save -- not even after I unplug and plugin the phone (remount). Apr 08 06:08:27 cbot`, can you show a screen shot of the app in action. is it hitting the height&width, or is it scaling and adding padding? Apr 08 06:09:23 mornig people Apr 08 06:09:27 Zta, are you rescanning the media? Apr 08 06:11:31 how would you save countdown timer if main activity was stoped? Apr 08 06:11:33 people Apr 08 06:11:59 what are you doing? activity stopped cause closed, or orientation change etc? Apr 08 06:13:09 i want to write countdown timers app with many timers. So when main activity is closed (stoped or destroyed), i need to keep timers count down Apr 08 06:13:25 use alarm or service? Apr 08 06:14:00 keep them running, or just keep their state? Apr 08 06:14:02 i though about alarm but i did not find how to get back timer info from alarm backl Apr 08 06:14:11 keep them running Apr 08 06:14:24 if app is closed they wouldnt run Apr 08 06:14:35 Think there is a TimerTask or CountDownTask possibly Apr 08 06:14:42 simply save the times in sharedPreferences onStop and load them onStart Apr 08 06:14:51 they can be run in service Apr 08 06:15:21 ah so you want them to be running in background Apr 08 06:15:33 no, i need to alarm when timer is finished and when main activity is active, watch how seconds count down Apr 08 06:16:08 then save the time in sharedPreferences Apr 08 06:17:00 and how will they alarm if user switch to another app? Apr 08 06:17:31 so you want them running in background, then service is neccessary Apr 08 06:17:46 ok Apr 08 06:17:57 or during onStop set alarm for the remaining time Apr 08 06:18:16 and if activity is run, in onStart cancel the alarm and start the countdown Apr 08 06:19:20 but still you would need to store the time somewhere Apr 08 06:19:38 how can i cancel alarm on start? Apr 08 06:20:57 https://developer.android.com/reference/android/app/AlarmManager.html#cancel%28android.app.PendingIntent%29 Apr 08 06:24:01 and keep pending intents in service or file? Apr 08 06:25:28 whatitis: What do you mean by "rescanning the media"? Apr 08 06:26:15 when you update media on sdcard there is a scanner that you can run to update pictures,movies etc so android knows about them Apr 08 06:26:40 whatitis: I 1) unplug my phone from the computer, 2) record a movie on the phone and save it, 3) plug the phone in my computer (ie. mount it), 4) Look in the Movies folder to find nothing. Apr 08 06:26:40 are you checking with your app that the files are successfully being written there? Apr 08 06:26:58 yeah you have to do a media scan Apr 08 06:27:04 can't remember the name of it off hand Apr 08 06:27:06 I check on the computer. Apr 08 06:27:18 my galaxy nexus sometime won't update for 10mins of new files on sdcard Apr 08 06:27:44 but my apps can read them, they just don't show up til it updates Apr 08 06:27:47 I don't understand why a scan is necessary; either the file is saved to storage or is isn't (?) Apr 08 06:27:53 hm. Apr 08 06:28:39 Actually I saved this movie yesterday, so the phone should have had time to scan. It's a Nexus 5 btw, so it's internal storage if that makes any difference; not an external SD card. Apr 08 06:29:02 Am I saving in the correct place? Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES) Apr 08 06:42:18 Android Studio Beta 1.2: Default Activity not found. Any one experiencing this issue? Apr 08 06:43:07 where is it saying that Apr 08 06:44:22 hello Apr 08 06:44:27 olleh Apr 08 06:45:00 hmm I am coding a simple ActionBar activity with a navigation mode TAB, and for some reason it disappear as soon as it is created Apr 08 06:45:25 app -> Edit configuration Apr 08 06:45:35 what could be the reason that tabs could disappear ? Apr 08 06:45:39 upon selecting "Launch default activity" Apr 08 06:45:51 how can i properly remove alarm from alarm manager i am using alarmmanager.cancel(pendingintent) but it is causing nullpointer exception. ? Apr 08 06:46:04 t2mkn, do you have your activities declared in manifest? Apr 08 06:46:33 yes, its declared. also it has MAIN + LAUNCHER Apr 08 06:47:31 t2mkn, not sure without seeing some screen shots, maybe your manifest and gradle Apr 08 06:47:36 someone else may know more Apr 08 06:48:04 http://pastebin.com/1REKBS8v manifest Apr 08 06:49:06 ANDROID.INTENT.ACTION.MAIN should that all be capitalized? Apr 08 06:51:10 what the. the new beta release is make all capital !!! i did not notised. Apr 08 06:51:33 it did that to me adding permissions Apr 08 06:51:41 think a bug with autocomplete Apr 08 06:51:56 did you type it, or was it like that default? Apr 08 06:52:40 t2mkn it was shouting, trying to get your attention Apr 08 06:52:42 i just typed MAIN, then it got highlited then I seleected. all get in capital. its a but. Apr 08 06:53:07 yeah, the auto complete is a bit off in the manifest Apr 08 06:53:18 so be careful when adding permissions or intents etc Apr 08 06:53:29 maybe file a bug report? i'm not sure where off hand Apr 08 06:54:14 whatitis: the android bug tracker. the tools teams seem to be pretty good at keeping track of issues reported there Apr 08 06:54:15 (https://code.google.com/p/android/issues/list) Apr 08 06:54:19 ya but should be reported. its a but in new beta 1.2 release. Apr 08 06:54:27 *bug Apr 08 06:54:52 whatitis: you might want to search for an existing bug first :) Apr 08 06:55:23 the less time they have to spend triaging bugs, the more time they can spend fixing them Apr 08 06:56:06 checkin now Apr 08 06:56:23 this new release has lots of bug. emulator not getting detected, need to restart adb server again and again, the memory monitor is talking too much of cpu etc. etc. Apr 08 06:56:46 https://code.google.com/p/android/issues/detail?id=157123&q=autocomplete%20manifest&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars Apr 08 06:58:56 ya similar thing with MAIN Apr 08 06:59:08 it explains it in that post Apr 08 07:01:51 All in all, i'm having good response from the beta, only issue i've noticed is that capitalizing thing. I'm a bit short on RAM on my machine, so with firefox/chome open it can get sluggish with all the intellisense stuff, but it's working pretty good Apr 08 07:01:52 earlier it was better, just type MAIN and select. this should be revorced. its time consuming. Apr 08 07:02:27 it's not something that is touched alot after setup, but just remember to double check Apr 08 07:02:44 hm, dagger 2 released ? Apr 08 07:03:02 its working find, at time of creating a new project, indexing files and initial works are taking a lot of cpu and memory. Apr 08 07:03:36 yeah, intial scanning/indexing of sdk is a bit time consuming, but is just a headache for a second Apr 08 07:04:10 gradle builds being all over the place are what bug me Apr 08 07:04:13 Macbook Pro, 16G ram, can u expect it going hot !!! never had experienced so. Apr 08 07:04:33 ya gradle is Apr 08 07:05:40 i like AS though, I like the fullscreen/distraction free modes, just noticed them, gotta start using em more Apr 08 07:06:05 dunno if intelli j 14.whatever just added those, think the distraction one is new Apr 08 07:06:57 ya thats good. Apr 08 07:07:51 this time they have fixed a lot of thing in coding, but some unwanted bugs got activated also Apr 08 07:08:06 yeah, but i'm still a fan Apr 08 07:08:13 me too Apr 08 07:10:48 Can someone please explain to me what's going on here: I'm saving a file to new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES), "myfile"). When I "adb shell" to my device I find this file under "shell@hammerhead:/storage/emulated/legacy/Movies". When I plugin the phone to my computer, and navigate to the Movies folder, I do *NOT* see the file. What's going on? Apr 08 07:10:53 @ Nexus 5 Apr 08 07:12:42 Zta, it's that issue i'm talking about, where there can be a delay between what the computer sees and what is actually there Apr 08 07:13:11 google that, there is probably a fix, but i'm still thinking you need to run the Media Scanner or whatever it's called to update media Apr 08 07:14:01 So the computer doesn't actually access /storage/emulated/legacy/Movies? But files are moved to another location? Apr 08 07:14:16 hey Apr 08 07:14:34 how to have a drawer (left and right) that takes the entire heigh ? Apr 08 07:14:37 like twidere Apr 08 07:15:20 editing styles.xml is also buggy. popup bugs. Apr 08 07:15:54 whatitis: I see there are all sorts of Media Scanner apps. But I'd still like to know what's really going on under the hood to understand the problem. I'll search further.. Apr 08 07:16:07 Marlinski, let its content be match_parent? Apr 08 07:16:15 Zta, http://android.stackexchange.com/a/46321 Apr 08 07:16:31 just a quick glance at it, might shed some light Apr 08 07:18:16 whatitis: So it's a bug. That figures. Thanks =) Apr 08 07:18:25 :) Apr 08 07:18:36 adb pull should work though Apr 08 07:18:51 or setup some kind of server/client stuff Apr 08 07:19:28 iprime: hmm no because I use ActionBar Apr 08 07:19:41 but still thinking best solution is to do a media scan, i can google it if you don't find what i'm talking about Apr 08 07:19:45 iprime: so drawer appear below the Tabs Apr 08 07:19:59 I would like it to "push" the main window to the right Apr 08 07:20:54 Marlinski, oh, why? that's not very android-y, more ios-y Apr 08 07:21:12 whatitis: there's a work-around explained here: https://code.google.com/p/android/issues/detail?id=38282#c139 I'll try it. Apr 08 07:21:32 iprime: I found it, it's called SlidingMenu Apr 08 07:21:47 iprime: yeah maybe, but I love the cool and feel of sliding Apr 08 07:21:54 pushing the content to the right instead of having the bar appear sliding over the content? Apr 08 07:22:01 ez Apr 08 07:22:07 Zta, that's probably the media scanner i was talking about Apr 08 07:22:19 oh well, i personally try to avoid my own preference and go the platform way Apr 08 07:22:24 Zta, hahah i like #140 Apr 08 07:22:44 whatitis: I just wrote that ;) Apr 08 07:22:48 hahahah Apr 08 07:23:02 when you're at home iprime, sure Apr 08 07:23:09 Oh, I just noticed that i'm actually on 5.0.1 =\ Apr 08 07:23:10 but at work you have to do 1, 2, 3 sometimes :P Apr 08 07:23:16 I better test this on my 5.1 Apr 08 07:23:21 not 1.2, 4.2, 5.9 Apr 08 07:23:39 Odaym, oh? Apr 08 07:23:44 no 3.14 ;) Apr 08 07:23:49 lel Apr 08 07:23:55 :) Apr 08 07:24:03 well, tau is a lot more popular now..:) Apr 08 07:24:20 I havent read any news today Apr 08 07:24:21 Zta, share results Apr 08 07:24:25 this part of the day is always very exciting Apr 08 07:24:38 Odaym, as long as the news is good Apr 08 07:24:54 well Im in Lebanon, cant get worse for us here Apr 08 07:25:01 I mostly read about how the west is doing Apr 08 07:25:02 lol Apr 08 07:26:24 ohh Apr 08 08:07:24 looks like lollipop will be over 5% before I/O http://developer.android.com/about/dashboards/index.html Apr 08 08:07:50 well its 5.4% now, that would have been pretty embarassing though Apr 08 08:08:24 whatitis: seems to work. Apr 08 08:08:45 why i still see activity label in my toolbar ? http://paste.ubuntu.com/10770898/ Apr 08 08:24:54 LOLLIPOP_MR1 .. what does "MR" mean? Apr 08 08:25:17 Maintenance Release Apr 08 08:26:17 * Zta . o O (And why the hell not just call it ANDROID_5_1_LOLLIPOP to make it 100% explicit?) Apr 08 08:26:28 /join #otto Apr 08 08:27:35 mr is for maintenance release Apr 08 08:27:47 oh.. cheers p_l Apr 08 08:28:02 How do I override attr/textAppearanceButton ? Apr 08 08:30:59 anyone know if EventBus honors class hierarchy while catching events? Seems like Otto doesn't. (Can't write a superclass which catches events and use them in a subclass) Apr 08 08:31:32 Oh, I see @android:style/TextAppearance.Widget.Button Apr 08 08:31:55 if I return to an activity after setResult(int, Intent);, can I retrieve this intent through getIntent();? Apr 08 08:34:04 claint, i doubt it would, unless the subclass calls a super method that'd register to the bus Apr 08 08:35:27 So much for trying to get rid of code duplication by writing an abstract super class to register to common events then.... Apr 08 08:35:48 claint, it doesnt because that would be bad for performance Apr 08 08:35:58 yeah, that makes sense. Apr 08 08:38:14 guys my toolbar has transparency,how can i disable it ? with xml Apr 08 08:38:23 sci-fic, set a color? Apr 08 08:38:42 yup thats the problem it has a color but i cant see bcs of transparency Apr 08 08:38:54 show your xml Apr 08 08:38:59 and theme Apr 08 08:39:37 can I do getIntent() if the intent was recieved through setResult(int, Intent);? Apr 08 08:40:35 danijoo_:http://paste.ubuntu.com/10771078/ Apr 08 08:41:11 there is no color set for your toolbar Apr 08 08:41:49 color primary isnt that ? Apr 08 08:42:30 Oh, this is exactly article that I wanted about styles http://www.therealjoshua.com/2012/01/styling-android-with-defaults/ Apr 08 08:44:42 sci-fic, colorPrimary does not work for toolbars Apr 08 08:44:53 you have to set it manually in the xml with background="..." Apr 08 08:45:07 thanks xd Apr 08 08:50:08 Guys, i have an intent that came to the activity through setResult(int, Intent); How do I retrieve the intent now? getIntent(); doesn't seem to work, can that be? Apr 08 08:50:38 I do know I can do onActivityResult(), but that's not what I want to do, I want to be able to call Extras of that intent in other methods Apr 08 08:50:51 Lorenz9, you cant Apr 08 08:51:14 you can only get them in onActivityResultr Apr 08 08:52:04 Okay thanks, change of plans then Apr 08 08:52:29 Lorenz9, alternatively you can finish the frist activity and start it again from the second with your special intent, but that gets messy and is bad :) Apr 08 08:52:51 Lorenz9, in onActivityResult you can always do setIntent and access it via getIntent(if you got code that does that) Apr 08 08:53:56 or just use a variable to store the intent ... :o Apr 08 08:54:05 Oh I could actually do that, but what do you mean "if I got code that does that"? Apr 08 08:54:21 yeah I might use some global variable Apr 08 08:54:31 but something tells me it's wrong haha Apr 08 08:54:41 Lorenz9, it is Apr 08 08:54:59 Phew Apr 08 08:55:28 you can work against system callbacks or together with them ;) Apr 08 08:55:39 Please can anyone help me on how to install android sdk on ubuntu? Apr 08 08:56:15 Don't ask if somebody can help, ask the question directly Apr 08 08:56:48 Please how Do I install android sdk on ubuntu? Apr 08 08:56:51 bepolite, what have you tried so far? Apr 08 08:57:02 http://www.unixmen.com/install-android-sdk-ubuntu-14-04/ Apr 08 08:57:28 All the links I've searched for so far have have pointed me to manuall installations Apr 08 08:57:42 I am wondering if I can use "apt-get" to install the SDK Apr 08 08:58:01 bepolite, have you searched ubuntu packages for an android sdk package? Apr 08 08:59:42 if you cant find one, you cant use apk. but its not hard to do it manually Apr 08 09:00:17 iprime sorry I forgot to mention you, I said 'Oh I could actually do that, but what do you mean "if I got code that does that"?' Apr 08 09:00:49 Lorenz9, it seemed to me that you use getIntent multiple times in other activity methods, only then it'd make sense to do setIntent Apr 08 09:00:57 Hmm Apr 08 09:01:05 instead of keeping a ref to it Apr 08 09:01:05 I'll just try installing android studio Apr 08 09:01:23 Hello ! Is there any way to restart an application ? Apr 08 09:01:35 fully restart, not reload Apr 08 09:01:59 set an alarm to start it Apr 08 09:02:02 and quit it before that Apr 08 09:02:11 iprime, that does not wort ^^ Apr 08 09:02:15 work Apr 08 09:02:19 Thanks for the info prime Apr 08 09:02:24 is it possible that the service that my remoteview binds to via the remoteview factory gets killed/unloaded? I am having problems with the widget showing nothing from time to time? Apr 08 09:02:28 at least if you want it to start immediatly Apr 08 09:02:34 danijoo_, oh, the alarm intnet is cancelled or smth? Apr 08 09:02:50 well not immedietly of course, in a few hundred ms Apr 08 09:03:25 iprime, with lollipop there is a minumum alarm interval of 60 seconds to prevent those abuse Apr 08 09:03:42 oh, i wasn't aware of that Apr 08 09:03:55 they didnt annouce it anywhere Apr 08 09:03:57 where is that documented? Apr 08 09:04:02 ok, how did you find that out Apr 08 09:04:06 it must be in the source Apr 08 09:04:17 reading blogs, twitter and stuff Apr 08 09:04:18 so you mean you cannot set an alarm 500 ms from "now" Apr 08 09:04:27 that doesn't make sense Apr 08 09:04:32 also there is a logcat message Apr 08 09:04:35 oh Apr 08 09:04:36 correct Apr 08 09:04:38 what's the msg say? Apr 08 09:04:41 woah... Apr 08 09:04:42 Suspiciously short interval 5000 millis; expanding to 60 seconds Apr 08 09:05:01 what if you set at particular time rather than use an interval? Apr 08 09:05:02 see https://code.google.com/p/android/issues/detail?id=161244 Apr 08 09:05:14 maybe you can spawn another process Apr 08 09:05:27 iprime, alarm manager is not made for that. pretty simple Apr 08 09:05:28 and start your main process from it Apr 08 09:05:42 why would an app need to restart anyways. Apr 08 09:05:44 danijoo_, we're not talking about repeating Apr 08 09:05:50 just finish all activities Apr 08 09:06:04 iprime, it doesnt matter if its repeating or one time Apr 08 09:07:02 its a build in "dont fuck with users battery and abuse alarm manager" Apr 08 09:07:55 oh come on, like there aren't other ways to fuck with users ;) Apr 08 09:08:07 one way less :) Apr 08 09:08:49 isnt that good news? :P Apr 08 09:09:02 the only thing that sucked is that they didnt notice anyone ^^ Apr 08 09:09:02 private static final long MIN_INTERVAL = 60 * 1000; // one minute, in millis Apr 08 09:09:15 well the behavior might be different for fixed time alarms: Apr 08 09:09:15 private static final long MIN_FUTURITY = 5 * 1000; // 5 seconds, in millis Apr 08 09:09:38 didnt checked the source and didnt use it since then Apr 08 09:09:46 i can only tell you what i heard Apr 08 09:09:50 you might be true Apr 08 09:10:00 yeah i think it's different for fixed time alarms, but still 5 sec min Apr 08 09:10:21 so the other option is to spawn another process and issue an intent from there, wonder if that'd work Apr 08 09:10:32 mtR, why don't you test ) Apr 08 09:10:49 the other option is to design the app in a way that dont require a restart ^^ Apr 08 09:11:01 iprime: ill try with alarm see how it goes Apr 08 09:11:28 mtR, it will work on <5.1 but 5.1+ will require at least 5 sec futurity Apr 08 09:11:31 mtR, did you follow the conversation? alarm wont work for 5.1 Apr 08 09:11:40 as we discussed, if i were you i'd try if it's possible to do that with another process Apr 08 09:12:08 danijoo_: :( Apr 08 09:12:22 yeah if you really need it, clear the backstack and start a new intent in a new task Apr 08 09:12:24 that should work Apr 08 09:13:09 maybe he has a lot of logic in a subclassed Application Apr 08 09:13:27 then he should make a method to reset that Apr 08 09:14:18 well we can only speculate Apr 08 09:14:43 why do you need a restart mtR ? Apr 08 09:14:53 it might be a "client requirement" :) Apr 08 09:15:08 when user want to change langage Apr 08 09:15:18 mtR, you dont need a restart for that Apr 08 09:15:33 you'll be prolly good with restarting a/the activities Apr 08 09:15:46 i have many dynamicvalue that i have to reload, and lots of things to reset Apr 08 09:15:46 just set the new language in configuration and reopen activity 1 in new task Apr 08 09:15:58 a restart was clear and fast ;) Apr 08 09:16:04 How do you specify what means wrap size in my custom view? Apr 08 09:16:21 wrap size? whats that? Apr 08 09:16:35 you do stuff in onMeasure Apr 08 09:16:53 ultimately calling setMeasuredDims Apr 08 09:18:16 Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage( getBaseContext().getPackageName() ); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(i); Apr 08 09:18:23 iprime: Do you have an example? Apr 08 09:18:24 seems to do the job :) Apr 08 09:18:45 mtR, yeah that should work Apr 08 09:19:15 dont forget to do the configuration change trick or your language will reset randomly when changing activities/orientation Apr 08 09:19:38 i dont use the value-langage thing Apr 08 09:19:46 ah ok Apr 08 09:19:49 i load dictionnary from external files Apr 08 09:21:22 SneakerXZ, i could write one, but there's probably plenty of info online, just google "android onMeasure" Apr 08 09:22:12 iprime: ok, thanks Apr 08 09:23:49 How to send a push notification for specific android app version using parse? Apr 08 09:26:43 I wish all numbers in code were interpreted as dp… converting px to dp is annoying Apr 08 09:27:16 that would be very anooying once you work with onDraw Apr 08 09:27:45 on iOS we have that Apr 08 09:27:47 and it works well Apr 08 09:27:57 you can always divide dp by density to get px Apr 08 09:28:00 most of time you need dp Apr 08 09:28:05 and you need px in rare cases Apr 08 09:28:15 or you can always multiply by density Apr 08 09:28:19 :p Apr 08 09:28:22 I do that Apr 08 09:28:29 but I always need to include the multiplication Apr 08 09:28:45 because I almost never care about px Apr 08 09:29:12 others might do Apr 08 09:30:09 and you dont need to do that if you specify the value in dimens.xml btw Apr 08 09:31:10 SneakerXZ, that is why i like scala :) i have implicit conversions that handle that for me :) Apr 08 09:31:44 danijoo_: that is true but if I am doing that in code... Apr 08 09:31:44 i just go (32 dp) that will convert it to px Apr 08 09:32:14 lemonxah: true that, I like Scala and used it for backend development but I do not think it is suitable for Android, it has too much overhead Apr 08 09:32:32 you really need to know what you do if using scala Apr 08 09:32:34 not that much overhead Apr 08 09:32:43 been using scala on android for a while now Apr 08 09:32:46 or gc will kill u Apr 08 09:34:33 kotlin is pretty nice too :) Apr 08 09:34:41 and less overhead Apr 08 09:35:39 lemonxah: runtime library is quite big, it has a lot of objects and consume class limit, plus it is not really performant Apr 08 09:36:02 danijoo_: It is hard to use kotlin when it is not even final Apr 08 09:36:07 scala is as performant as java afaik Apr 08 09:37:15 SneakerXZ, i disagree Apr 08 09:37:26 danijoo_: not on memory level Apr 08 09:37:36 and you need to care about memory on Android Apr 08 09:37:48 SneakerXZ, as i said, you need to know what you do. there are methods that do a lot in the background in scala Apr 08 09:37:55 at the end you need to think really if you can afford to use that feature Apr 08 09:37:58 if you know what happens under the hood, its fine Apr 08 09:38:21 danijoo_: exactly, so it brings overhead to my brain because I need to make more choices and limit myself from options that Scala offers Apr 08 09:38:57 you could use the same argument for any language that goes beyond assembler lol Apr 08 09:39:19 but think is I can use these Scala features on backend but on mobile Apr 08 09:39:25 it is not same for Java Apr 08 09:39:36 everything that is in Java I can use on Android Apr 08 09:39:41 except of rare cases Apr 08 09:41:17 if you get confortable with it, its quite fine. yes, you need to know what you do, but in most cases it the memory overhead does not matter at all Apr 08 09:42:46 what is the difference between fresco and picasso ? is one supposed to replace the other ? Apr 08 09:43:18 blusky, no. one is just an alternative :) Apr 08 09:43:22 each having it pros and cons Apr 08 09:43:29 When I call layout on children view, should I specify absolute position? Apr 08 09:44:09 blusky, theres also glide if you dont like picasso and fresco Apr 08 09:44:40 danijoo_: is there any comparative table ? Apr 08 09:44:49 i dont think so Apr 08 09:44:53 Is there any external tool to see view hiearchy? I have custom view and I am positiong my children views and I do not see them on screen Apr 08 09:45:09 there was a nice blog about glide vs picasso recently, but fresco is pretty new Apr 08 09:45:15 hard to find something about it Apr 08 09:49:06 Hi Apr 08 09:49:35 When consuming a REST API while having a local cache, how do you solve getting the latest items and not leaving a gap between those and the ones already on the local cache? Apr 08 09:50:07 hey folks can anyone guide me on how to add in-app purchases to an already existing free application that is published? Apr 08 09:51:36 SneakerXZ, how big do you think it is cause it only adds about 200k to the apk Apr 08 09:51:50 and as to performant it is as performant as java Apr 08 09:52:02 since its the same byte code Apr 08 09:52:12 lemonxah: it might change since last I have used, when I have used it last time it added 5MBs Apr 08 09:52:25 SneakerXZ, of course you have to proguard. Apr 08 09:52:39 you have to proguard your app Apr 08 09:52:45 papipo, you want to update the whole cache (multiple web requests) before applying the updates to local cache and to user? Apr 08 09:52:49 my current apk is only ... let me check Apr 08 09:53:22 600k Apr 08 09:53:23 the ideal scenario would be to first, get the latest items, so I can show them to the user Apr 08 09:53:35 and somehow fill in the gap that those leave in the local cache Apr 08 09:53:49 you have to know what you are doing with scala to not get memory issues but that is not inherently scala Apr 08 09:53:56 otherwise, since I always load first from the local cache, the user might never see the items in the gap Apr 08 09:54:05 its not scala's fault if you run into issues its how you use it Apr 08 09:54:12 ^ this Apr 08 09:54:35 papipo, so you have a list and some sort of paging API? Apr 08 09:54:43 let's say I have that Apr 08 09:54:49 it performs as fast java and some cases a little better but not alot Apr 08 09:54:52 but its not slower Apr 08 09:55:01 I can get items from a given timestamp or before a given timestamp Apr 08 09:55:03 again if your app is slower its not inherently cause of scala but how you use it Apr 08 09:56:08 but scala is not as easy to get into as java so its not something that beginners should do but i still prefer scala over java cause its a personal preference Apr 08 09:56:43 not badmouthing java or saying scala is better cause of x y an z because all of those reasons will all be biased Apr 08 09:58:01 true Apr 08 09:58:26 nice quote from the kotlin channel yesterday: java is like assembler for the jvm. if you want a high level language, use kotlin or scala :) Apr 08 09:58:52 nice Apr 08 09:59:03 I'd look into kotlin, there's enough hype around it now to do that Apr 08 09:59:14 maybe even THIS WEEKEND! Apr 08 09:59:26 the best think is its one click to use it in android Apr 08 09:59:38 yea I've been meaning to see jake's post about that but haven't yet Apr 08 09:59:43 because no idea what kotlin is yet Apr 08 09:59:43 I found scala setup to be a pain when i did it in the past Apr 08 09:59:56 but that was a year ago Apr 08 10:00:38 yeah it is a pain pfn made a plugin but i am struggling to get it to work propper .. i keep defaulting back to the gradle plugin someone else did Apr 08 10:00:56 so you leave project as is and use the gradle android plugin and sorted :) Apr 08 10:02:22 Zharf: do you know about any example of that way of syncing? Apr 08 10:03:44 papipo, I don't really have anything more than note your latest date on local cache and last day in the most recent request response and request more from between those dates Apr 08 10:05:08 Morning All Apr 08 10:08:41 Good morning Ankh Apr 08 10:20:06 So guys Apr 08 10:20:23 so guy Apr 08 10:20:33 Im having a ACTION_MOVE being called after an ACTION_CANCEL without an extra ACTION_DOWN Apr 08 10:21:03 as soon as I saw this behaviour happen i though "I must share this in a semi-anonymous internet chatroom" Apr 08 10:21:08 so here I am Apr 08 10:22:38 lol Apr 08 10:22:56 I wouldn't know, I am not friends with MotionEvent Apr 08 10:24:37 Hello Apr 08 10:24:48 what are default colors in an android app? Apr 08 10:24:51 Any ideas? Apr 08 10:25:07 you mean default theme? Apr 08 10:25:42 danijoo_, yes Apr 08 10:25:52 I'm seeing a black background Apr 08 10:26:04 I don't see text messages in textview Apr 08 10:26:09 depends on what theme you've chosen and on the android version Apr 08 10:26:12 maybe they are black messages Apr 08 10:26:41 change the textcolor to test Apr 08 10:26:42 danijoo_, 4.2.2 Apr 08 10:26:47 danijoo_, ok Apr 08 10:27:19 danijoo_, main.xml? Apr 08 10:27:37 in /res/layout directory Apr 08 10:28:41 I've got strings.xml in /res/values Apr 08 10:29:10 there should be styles.xml too Apr 08 10:29:18 that one has the app theme Apr 08 10:31:02 danijoo_, Button in appactivity is correctly displayer, anyway Apr 08 10:31:25 Hi ! Can my app be informed when background data turns on (and then set it off) ? Apr 08 10:31:57 black text on white/grey background, for the button Apr 08 10:32:05 I'm using API 18 Apr 08 10:32:36 zebu1er, manipulating data setting requires root Apr 08 10:33:54 So there is really no way to prevent background datas to turn on ? Apr 08 10:34:05 not without root Apr 08 10:34:41 Cause when I set it to off it always turn a week later... without any action of me ! Apr 08 10:35:19 sounds like a weird manufacurer setting Apr 08 10:35:27 What reason could be that the phone turns it on without my agrement ? Apr 08 10:35:46 Yes this is an Alcatel ! Apr 08 10:35:59 weird manufacurer, as I said ^^ Apr 08 10:36:04 :D Apr 08 10:36:05 maybe there is an optio for that Apr 08 10:36:09 _somewhere_ Apr 08 10:36:56 I was happy with my cheap ZTE, but this isn't the same quality ! :-( Apr 08 10:37:15 buy cheap and youll buy twice :p Apr 08 10:37:30 not quite true Apr 08 10:37:47 I have this 90 dollar EStar phone Apr 08 10:37:48 Brandeds can be sometimes anyoing also... Apr 08 10:38:03 anoying Apr 08 10:38:06 and I swear its as fast a reliable as the S4 we have in here Apr 08 10:38:14 only a lot less features Apr 08 10:38:27 and the custom OS looks ugly Apr 08 10:38:31 jvrodrigues, https://medium.com/matter/shitphone-a-love-story-a44e66434807 Apr 08 10:38:37 awesome blog entry about that Apr 08 10:39:06 Yes pay to have "manufacturer" undesired features that's hard ! :-P Apr 08 10:39:43 what's the difference of the sensor: TYPE_ORIENTATION and TYPE_ROTATION_VECTOR? Apr 08 10:40:07 That's ok that I can't root my phone if it's uptodate and there are no custom roms ? Apr 08 10:41:00 it depends on manufacturer again zebu1er Apr 08 10:41:06 if you are able to unlock bootloader etc Apr 08 10:42:48 No I've found no specific boot image... :-( Apr 08 10:43:44 make your own ;) Apr 08 10:43:49 wrong channel for that, though Apr 08 10:44:02 yes Apr 08 10:48:19 danijoo_ that post is very cool Apr 08 10:48:38 yes! Apr 08 10:51:55 danijoo_ : Can I at least know about the status of background data or be informed of its change ? Apr 08 10:52:30 It could be a good thing just that ! Apr 08 10:52:57 zebu1er, im pretty sure there is a braodcast for that, yeah Apr 08 10:53:20 http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html Apr 08 10:54:33 Ok thanks. Its lunch time but I'll instruct that way after ! Apr 08 10:54:42 Thank you all ! Apr 08 11:00:45 Is it possible to do top shadow with layer-list ? Apr 08 11:04:03 SneakerXZ, you can use gradient Apr 08 11:04:11 this looks shadowish Apr 08 11:04:52 is there a way how view can ovedraw a little bit? so shadow is casted on top of the other view? Apr 08 11:05:11 no Apr 08 11:05:33 for android 5 u can use elevation to manage shadow Apr 08 11:06:04 can I specify elevation in styles? Apr 08 11:06:13 yup Apr 08 11:06:25 at least for cards Apr 08 11:06:30 im not that familiar with it Apr 08 11:06:59 danijoo_: ok, good, in that case I can have shitty shadow on all android before lollipop and proper on lollipop Apr 08 11:07:08 yep Apr 08 11:07:43 but gradients dont look that bad :) Apr 08 11:08:30 if it is 1dp gradient Apr 08 11:08:36 it does not look good Apr 08 11:10:43 of course it doesnt Apr 08 11:10:54 you need enough space to make if fade out nicely Apr 08 11:11:01 then it is too wide Apr 08 11:11:17 how do you want to make a fade out with a width of 1 pixel (for mdpi devices) Apr 08 11:11:23 that would result in a solid line Apr 08 11:11:48 that is fine Apr 08 11:15:22 is there a guide that would explain which color is used where in system by default? I see components got some colors and I want to change these in my theme but I do not know names Apr 08 11:16:55 http://developer.android.com/reference/android/R.style.html Apr 08 11:17:33 it does not talk about attribute colors and so on Apr 08 11:17:44 what attributes are you talking about Apr 08 11:17:52 eg. scroll view has some bouncing color Apr 08 11:18:01 how do I know what color is used there? Apr 08 11:18:26 you cant, because there is no default for that. it depends on the theme your theme is basing on Apr 08 11:19:03 For example if its Theme.Material or Theme.Material.Light Apr 08 11:19:05 I know but I want to know the name of attribute Apr 08 11:19:08 that is changing that Apr 08 11:19:16 so I can change eg. primaryColor to my color Apr 08 11:19:21 and it will also affect the scroll view Apr 08 11:19:28 but I do not know what color scroll view is using Apr 08 11:20:13 in this case you would go to the link i posted, look up whats the attribute for scrollviewstyle Apr 08 11:20:21 and change primaryColor for that style Apr 08 11:20:28 or whatever attribute you want to change Apr 08 11:21:24 ok Apr 08 11:21:46 but that link does not contain list of attributes Apr 08 11:21:49 where should I look for that Apr 08 11:21:53 in Android source? Apr 08 11:21:55 in theme.xml? Apr 08 11:22:45 that depends on the class Apr 08 11:23:06 for example, you can look at the docs of android listview: http://developer.android.com/reference/android/widget/ListView.html Apr 08 11:23:17 there is a section "XML attributes" Apr 08 11:24:43 right, but it does not list what is system using for that on default Apr 08 11:25:16 again: this is not systems choice, its yours and depends on the theme you are using as base Apr 08 11:25:24 Theme.Material for example Apr 08 11:25:34 but Theme.Material is only in Lollipop Apr 08 11:25:40 no? Apr 08 11:25:42 yes. Apr 08 11:25:47 thats why I say it depends Apr 08 11:25:57 I know my to change theme default Apr 08 11:25:57 you have a list to choose from Apr 08 11:26:02 I need to know which attribute to change Apr 08 11:26:21 because I do not like default themes Apr 08 11:26:34 you dont need to know what the default value is if you change it anyways, do you :) Apr 08 11:26:54 yes, but I need to know the name of attribute that has the value Apr 08 11:26:58 so I know what I am changing Apr 08 11:27:08 thats in the class definition Apr 08 11:27:08 if I see blue on screen and I can change blue to red, I know it will be red Apr 08 11:27:10 (i showed u) Apr 08 11:27:22 if I change randoma attribute I do not know that Apr 08 11:27:26 ok :) Apr 08 11:27:42 lets say you want to change the color of the divider in a listview Apr 08 11:27:56 you open: http://developer.android.com/reference/android/widget/ListView.html Apr 08 11:28:05 scroll down to xml attributes Apr 08 11:28:15 it says: Attribute Name android:divider Apr 08 11:28:19 Drawable or color to draw between list items. Apr 08 11:28:30 how is called the bouncing color? Apr 08 11:28:35 now you know: to change that, i have to override android:divider Apr 08 11:28:36 when you try scroll too much Apr 08 11:28:41 ok Apr 08 11:28:43 thanks :) Apr 08 11:28:50 hello :) Apr 08 11:28:58 SneakerXZ, dont know how this is called, sorry Apr 08 11:29:15 but it should change by default to secondaryColor if you use material compat Apr 08 11:29:33 which type of timer is the best to use, if i want it to be triggering a bit of code only if device is out of sleep every 2 minuts Apr 08 11:30:04 Ok, I should swithc to material compat I guess :) Apr 08 11:30:42 actually, I am using that Apr 08 11:30:43 Theme.AppCompat.Light.NoActionBar Apr 08 11:33:26 a-russo: depends on purpose. handler.postDelayed or AlarmManager or SyncAdapter Apr 08 11:53:41 a-russo: to trigger code every two minutes your best bet is the AlarmManager with setRepeating and set the interval to 2 minutes Apr 08 11:57:15 icedp: tried timertask, it kinda works on emu and nexus 7, but on my phone (moto g )it kinda doesn't, may need to debug better Apr 08 11:58:37 jvrodrigues: i don't want the event to bring the phone from sleep, or to catch up all the events missed because of the sleep, as i've read it may be with timertask Apr 08 12:01:54 a-russo: hmm TimerTask is just a Runnable. It says nothing about how you schedule it Apr 08 12:02:36 Timertask will shutdown when your app gets destroyed Apr 08 12:02:41 icedp: scheduleAtFixedRate(t_s, 1, 120000); Apr 08 12:03:25 a-russo, do you want that to run until infinity? Apr 08 12:03:43 danijoo_: am running it from inside widget class Apr 08 12:04:14 danijoo_: basicaly i want widget to update certain data via internet every 2 mins, while phone is not asleep Apr 08 12:04:28 a-russo, tell me the name of the app once its released Apr 08 12:04:28 a-russo: you mean Timer then Apr 08 12:04:35 so i can blacklist it q.q Apr 08 12:04:56 icedp: ues Apr 08 12:05:02 this will drain battery life and data as hell Apr 08 12:05:05 icedp: yes Apr 08 12:05:23 danijoo_: i guess, you mean timer ? Apr 08 12:05:38 i mean dowing something over network every 2 minutes Apr 08 12:06:03 a-russo: what do you mean by widget? Apr 08 12:06:10 danijoo_: it is tiny, ~ 10 bytes Apr 08 12:06:27 a-russo, its bad even if its only a bit Apr 08 12:07:08 icedp: danijoo_: why ? things like facebook, probably update via wifi more often with bigger traffic Apr 08 12:08:18 they dont Apr 08 12:08:31 they use gcm Apr 08 12:08:37 and other things Apr 08 12:08:44 danijoo_: i was thinking about it Apr 08 12:08:48 not a network request every few minutes Apr 08 12:09:21 what you are trying to do will kill every smartphones battery in a few hours as well most peoples monthly free data Apr 08 12:09:47 but if phone is not in sleep and it has wifi connection, how a bit of data is going to drain the battery ? gcm doesn't work via sms Apr 08 12:09:51 a-russo: AppWidgetProvider won't update more often then every 30 minutes unless you request it manually. But it's a bad idea as danijoo_ mentioned Apr 08 12:09:53 Hi! Apr 08 12:10:10 Is there a "safe place" to get older .apk (that would work with Android 2.3) ? Apr 08 12:10:19 I'm looking for Dropbox app for Andr 2.3 Apr 08 12:10:23 a-russo, because not being asleep is no indicator for battery drain Apr 08 12:10:33 if you do a webrequest or some cpu work, it drains battery Apr 08 12:10:41 I'm not sure if this is "safe" : http://dropbox.en.uptodown.com/android/old Apr 08 12:10:46 danijoo_: but gcm does use wifi, not sms or infrared :) Apr 08 12:10:51 if my phone is not a sleep, and i dont do network, less battery is drained Apr 08 12:11:04 gcm is completly different from doing a webrequest via http Apr 08 12:11:49 Sorry to talk about this here, but you are the only that I know who might be able to know Apr 08 12:12:07 danijoo_: it is less, but if wifi is locked on ap and phone is not asleep, 1kb of data sent is not going to kill the battery. imho, while phone is not asleep, stuff in bg, kill battery more then 1kb of connected wifi Apr 08 12:12:35 a-russo, most people dont have unlimited data. Apr 08 12:12:42 and please believe me it will kill battery Apr 08 12:13:05 danijoo_: non-unlimited data, thats a diffirent argument, whith which a agree Apr 08 12:14:17 use gcm to notify the phone about a change on servers data Apr 08 12:14:24 lets assume, my phone is always connected to ac, question how to run a pice of code once every two minutes, only when phone is not asleep ? Apr 08 12:14:24 and only do a webrequest if something changed Apr 08 12:14:29 a-russo: Anyway you can implement it and test before production. So go ahead. Apr 08 12:14:38 a-russo: AlarManager will help you. Apr 08 12:14:48 danijoo_: i don't plan going google market direction, gcm may not be an option Apr 08 12:15:00 a-russo: loop at the difference between ELAPSED_REALTIME and ELAPSED_REALTIME_WAKEUP Apr 08 12:15:23 a-russo, then use Apr 08 12:15:29 icedp: can i catch an "event", when the widget is shown to viewer ? Apr 08 12:15:51 Why does it say that it cannot resolve LayoutParams? Do I have to import something I don't know? Apr 08 12:16:32 The variable declaration looks like this http://i.gyazo.com/2aee096ba40943ae2bf2270075887ca0.png Apr 08 12:17:12 a-russo: not easily no, unfortunately Apr 08 12:17:27 Lorenz9, you have to import it Apr 08 12:17:37 but it doesn't tell me to import anything Apr 08 12:17:51 icedp: is that right, that timer will try to catch all "missed" triggers during sleep ? Apr 08 12:17:51 whats *it* Apr 08 12:17:53 a-russo: you can get list of tasks and detect weather current activity is launcher, but there are many launchers and you need a permission. Kinda hackish Apr 08 12:18:03 I also tried the the reference Apr 08 12:18:06 well LayoutParams Apr 08 12:18:29 Lorenz9, there are several different implementations on layout params (one for every viewgroup) Apr 08 12:18:34 you have to import the correct one Apr 08 12:18:38 aaaah Apr 08 12:18:47 for example LinearLayout.LayoutParams Apr 08 12:18:48 That's why there's this long ass list, okay Apr 08 12:18:56 thanks Apr 08 12:19:00 yw Apr 08 12:21:45 a-russo: if it's so you can use FLAG_UPDATE_CURRENT Apr 08 12:26:13 hi guys. How to copy build apk file to another folder? in gradle Apr 08 12:27:41 I've got path error when trying to Run project on device... (because I changed filenames of apk, like appName-version.apk). Version parsed from manifest file and when I try to Run new version (changed in manifest), it tries to deploy older version and I need to click Sync gradle everytime when I changed app version :(( Apr 08 12:27:53 And I want to copy builded apk with fixed name Apr 08 12:27:56 and deploy it Apr 08 12:29:19 woozly, dont change version in manifest Apr 08 12:29:24 thats kinda deprecated Apr 08 12:29:49 danijoo_: If I change it in gradle, then it will be ok? Apr 08 12:30:08 I mean, it will changed in application as well? Apr 08 12:30:15 mm.. gonna check it, thank you! Apr 08 12:30:20 yes Apr 08 12:30:26 gradle overrides manifest Apr 08 12:30:40 ohhh.... didn't know! Apr 08 12:30:41 thank you! Apr 08 12:30:44 icedp: will look into it, thanks Apr 08 12:33:53 a-russo: or better FLAG_CANCEL_CURRENT Apr 08 12:46:45 icedp: can I pm you ? Apr 08 12:54:29 a-russo: Sure, but I'm going off for few hours now. My nick is always online though. If it's about Android you can ask question on channel ) Apr 08 13:38:42 any easy way to check if a view has a certain layout? Apr 08 13:38:52 ?? Apr 08 13:39:05 i don't understand the question Apr 08 13:39:29 I have 3 layouts, I want to check which one my view implements Apr 08 13:41:56 I've gone with a different approach :P was just looking for a quick way to check :) Apr 08 13:42:03 ok Apr 08 13:45:28 Is there a clean way to implement a header for a RecyclerView/ListView? Apr 08 13:45:56 With clean I mean not too much boilerplate code. Apr 08 13:46:07 Or workaround stuff. Apr 08 13:47:01 Hi, I'm having problems with fragments on 4.0.3 (API 15). The fragment works on newer version. The problem is that the content of the fragment is empty. But I can force a redraw with the hierarchyviewer(Profile node), then it is shown as normal. Apr 08 13:50:13 is there anyone with experience of using Kotlin for Android? Apr 08 13:50:15 how does it feel? Apr 08 13:53:26 Muchoz, addHeaderView() on ListView. Apr 08 13:54:54 Mavrik, I found that out. But there seems to be that you need to add that functionality yourself in RecyclerView. When is it beneficial to use a RecyclerView instead of a ListView? Only when there is a lot of data or is it just better to always use RecyclerView? Apr 08 13:59:02 Muchoz, recyclerview is just a new more flexible API Apr 08 13:59:24 it provides much better user experience because it's easier to make animations and complex layouts with it Apr 08 13:59:38 but of course because of that it provides less static pre-built stuff for you to use Apr 08 14:04:53 Hello everyone, can i avoid that my activity calls onpause() when it changes screen orientation ? Apr 08 14:05:09 Well I have quite a tight deadline and probably don't have time to do pretty animations first go. Should I use RecyclerView and add the animation stuff later on or should I go with ListView? Apr 08 14:08:10 How would you call/make tabs that do not change the entire screen, but only a part of the screen? You see these tabs with dots sometimes Apr 08 14:08:28 id still call them tabs Apr 08 14:08:38 and make them like tabs Apr 08 14:08:42 ye but what view would you use? Apr 08 14:09:15 there is no dedicated view for tabs anymore Apr 08 14:09:25 so your best bet is to use a library Apr 08 14:09:34 or use a horizontal scrollview and put textviews in it Apr 08 14:10:30 ah ok Apr 08 14:10:48 you can find libraries for that at https://android-arsenal.com/ Apr 08 14:11:19 for example https://android-arsenal.com/details/1/1683 Apr 08 14:12:38 Muchoz: if you don't care about animations and need some of ListView's handy features just use ListView Apr 08 14:12:53 RecyclerView is not a total replacement for ListView despite what Google may say Apr 08 14:13:10 MooGoo, I don't care right now. I want them later on though, definitely. This is something that I want to achieve: https://developer.android.com/design/material/videos/ContactsAnim.mp4 Apr 08 14:13:58 MooGoo, huh, why wouldn't it be? Apr 08 14:14:21 It's just way more flexible which means you don't get as many hard-coded stuff int here Apr 08 14:14:42 it's not because it does not replace all the features ListView provides Apr 08 14:15:54 you can still do animations with ListView, it is just not as baked in as with RecyclerView Apr 08 14:16:17 Is it hard to do the animation in that video? Apr 08 14:16:31 and that animation you posted looks more like a transition between two fragments or something rather than an add/remove operation on a list Apr 08 14:17:02 MooGoo, I'm not really talking about editing the list. I'm talking about transition animations. Apr 08 14:18:58 I'm guessing that that transition would not really use much of RecyclerView features since that's mostly for add/remove item animations I think Apr 08 14:20:00 yeah, you just need to get location of the view for that trick Apr 08 14:20:03 so either works Apr 08 14:20:30 there's a new fragment transition api that does that animation for you Apr 08 14:20:53 activity transition you mean? :) Apr 08 14:21:09 something like that, I don't recall exactly Apr 08 14:21:30 should work with fragment transition thougj Apr 08 14:21:52 activity transition isn't as robust Apr 08 14:27:41 ioioioioiioi Apr 08 14:28:11 Mavrik, http://developer.android.com/reference/android/widget/ListView.html#addHeaderView%28android.view.View%29 it says the views will appear in the order they were added. Does this mean I can have header, item, item, header, item, item, header? Apr 08 14:29:00 no. Apr 08 14:45:41 http://assistly-production.s3.amazonaws.com/91626/kb_article_attachments/38350/RTCOAWiFIAPIV1_3_original.pdf?AWSAccessKeyId=AKIAJNSFWOZ6ZS23BMKQ&Expires=1428504426&Signature=%2FHu4oI1VQZUABecvUes9UXBvgV4%3D&response-content-disposition=filename%3D%22RTCOAWiFIAPIV1_3.pdf%22&response-content-type=application%2Fpdf Apr 08 14:45:41 sweet! Apr 08 14:45:52 now imma write an app for my thermostat Apr 08 14:46:07 pfn, tl;dr? Apr 08 14:46:49 wifi thermostat api Apr 08 14:47:14 for thermostats that use the radio thermostat interface (most wifi thermostats except for nest) Apr 08 14:50:18 Pardon the vague question: What would be some bad uses of build flavors? Apr 08 14:50:58 *bad* uses? I think bad really depends on your environment / other devs on your team / etc Apr 08 14:51:11 like anything you could end up with something unmaintainable Apr 08 14:52:13 there are just about no bad uses of build flavors Apr 08 14:53:09 assuming you have a use-case for the different flavors Apr 08 14:53:30 dev/staging/production is a good flavor split, etc. Apr 08 14:53:42 pfn, challenge accepted Apr 08 14:53:57 biggest problem is testability of all flavors Apr 08 14:54:03 depending on how different you make shit Apr 08 14:57:47 pfn, I use flavors specifically FOR testing, but I work on a lot of system apps where I can't (safely) gen a debuggable package of the same name, etc Apr 08 14:58:12 dragorn, yeah, I understand Apr 08 14:58:31 pfn, but yeah; every flavor w/ code change is another debug path Apr 08 14:58:51 Thanks for the responses. Apr 08 14:59:16 ironmarx, i think it comes down to - it's a tool. you can screw yourself up if you really try, but there's nothing innately terrible about it. Apr 08 15:04:41 any idea what might ause an error like this: "Crunching Cruncher some_image.png failed, see logs". Unfortunately I can't access the logs atm. Apr 08 15:07:40 Hello, I'm new to android development Apr 08 15:07:59 Hello Apr 08 15:08:04 In Hangouts there are 2 lists. One for 'popular contacts' (probably isn't the right translation) and 'contacts'. Is there a way to make on RecyclerView/ListView to keep track of multiple headers? I was planning on doing this myself if it isn't already out there or if someone of you has a better way? Apr 08 15:08:06 welcoem to hell then :> Apr 08 15:08:08 Whats a good option for getting button icons Apr 08 15:08:21 in web dev I used to get these css and svg based glyphicons Apr 08 15:08:25 Drawing them yourself? Apr 08 15:08:29 I wonder whats an alternative for android Apr 08 15:10:05 technically you can use almost any kind of view as a button. set a drawable (image or xml) as background and set an on click listener on the view. Apr 08 15:10:07 It's quite a hassle probably to get it to use your own font. I have never tried it, but I wouldn't do it and just use images that you create yourself. Apr 08 15:10:44 We actually use a font for most of our icons and it's working fairly well.. Apr 08 15:11:04 The Android SDK has quite a bit of icons in the SDK I thought or there was a pack you can download in the design guidelines. Apr 08 15:11:59 diegoaguilar, here seems to be a way: http://stackoverflow.com/questions/15210548/how-to-use-a-icons-and-symbols-from-font-awesome-on-native-android-application Apr 08 15:12:48 But I didn't implement it, it seems like kind of a hassle. We use a custom edittext/textview that supports custom fonts, set the font via styles. Apr 08 15:14:33 So should I just create an abstract RecyclerView.Adapter subclass that supports multiple headers? Apr 08 15:15:45 what do you mean headers....like a ListView header/footer that does not get its data from the main list? Apr 08 15:16:31 <_genuser_> ok AS users: auto complete only works (pressing ctrl-space) if you start with the correct case. has anyone found a way to disable this? Apr 08 15:16:43 MooGoo, well what I had in mind is let's say we use an ArrayList as the source of the data. Based on the value of the index it would generate a HeaderView or ItemView. Apr 08 15:17:01 Then there would be simple methods to determine whether it's a header or item view of course. Apr 08 15:17:10 <_genuser_> I want to type in color and do ctrl-spae and have it update it to Color. Apr 08 15:17:23 <_genuser_> when I press . and type in bla, I want it to select .BLACK. Apr 08 15:17:44 that would probably be the best way to support multiple arbitrary headers especily in ReclycerView since it has no built in support for that Apr 08 15:19:15 but then you'd need a list that combines the data you want plus the header elements in the same list which might be a bit hairy Apr 08 15:20:30 anyone got a relyable method of closing a softkeyboard? I tried doing it via the inputmethodmanager, but couldn't do it. Apr 08 15:21:09 Basically, when I open a new activity, the focus jumps into the only textview and opens the softkeyboard. Apr 08 15:21:27 MooGoo, can't I just make an ArrayList of objects and check whether the object is an instance of something? Apr 08 15:21:40 I use InputMethodManager.hideSoftInputFromWindow() Apr 08 15:21:46 seems to work Apr 08 15:21:58 It didn't work for me yesterday, but I might as well try it again. Apr 08 15:22:24 Syzygy, the soft keyboard is horrible in Android. Apr 08 15:22:33 You can't detect or barely control it. Apr 08 15:22:46 It's a pain in the fucking ass for designing imo. Apr 08 15:23:08 That f-word was necessary because that's how bad it is imo. Apr 08 15:23:14 yeah, i agree Apr 08 15:23:42 I just gave up on it and said "Fuck it, it's a testing period, I'll deal with it later." Apr 08 15:23:57 fixed it for now by setting the edittext to focusable false in xml... let's see what happens when I set it to true in code Apr 08 15:24:05 Muchoz: I guess in ArrayList if X inherits from the same class you could check each class with instanceof in onBindView or something Apr 08 15:24:11 This is something that really needs to get added. how come this still hasn't been added yet? Apr 08 15:24:16 later = never usually Apr 08 15:24:16 Muchoz, are you by any chance looking for this when talking about "headers"? https://github.com/timehop/sticky-headers-recyclerview Apr 08 15:24:46 <_genuser_> Syzygy: how about ((InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE)).showSoftInput(myEditText, InputMethodManager.HIDE_NOT_ALWAYS); Apr 08 15:24:47 Mavrik, ooohh.. That doesn't look bad. Apr 08 15:25:19 there's also a version of listview with that support Apr 08 15:25:20 I tried this or at least something very similar like it yesterday and it didn't work. Apr 08 15:25:38 Mavrik, that 60fps <3 https://www.youtube.com/watch?v=zluBwbf3aew Apr 08 15:27:30 TextView does not support text selection. Action mode cancelled. Apr 08 15:27:31 nice Apr 08 15:27:43 I get the best error messages today. Apr 08 15:29:23 Almost as good as the "Crunching cruncher some_image.png"-error I got on my build server tonight. Apr 08 15:30:18 Syzygy: try InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(textView.getWindowToken(),0); Apr 08 15:30:54 How many dependencies does everyone here have for their apps btw? Just curious. Apr 08 15:31:08 In the onTouchEvent method of a ScrollView I am running some logic when "getY() == 0". The thing that prevents this from hitting ocassionally is if I scroll fast enough y seems to jump around 0, but never hit it, so my code in the if never gets run Apr 08 15:31:19 shmooz, I tried that yesterday and it didn't work. I'll try again. Apr 08 15:31:28 Is there some view code that helps deal with this? Apr 08 15:31:32 I'm currently at 6 for this project, and the sms verification has only been implemented together with a guideactivity. Apr 08 15:31:45 Syzygy: it works for me on my gingerbread phone and nexus 7 Apr 08 15:32:13 muchoz: I'm at around 20. Apr 08 15:32:33 yiati, getY() <= 0 or (getY() - scrollAmount) <= 0 Apr 08 15:32:37 Solarnum, do they add a lot of bulk? Apr 08 15:33:19 muchoz: My apps 11MB, but they definitely can Apr 08 15:33:28 Syzygy: Ah yep just caught that, that seems like it, I will try it now Apr 08 15:33:30 thanks Apr 08 15:33:45 I think I'm slightly below 20. app 14mb, hit the dex limit a few times. Apr 08 15:34:01 Solarnum, that's surprisingly light. I thought it would add more bulk. Apr 08 15:34:02 syzgy: Me too Apr 08 15:34:12 syzygy: Thank god for MultiDex Apr 08 15:34:30 I'm far away from it now though. Apr 08 15:34:34 we managed to scrub some stuff, so we're still below it. Apr 08 15:35:00 Solarnum, glad I don't have to worry about that yet. Apr 08 15:35:33 shmooz, not working on this nexus 4 running 4.4.2 Apr 08 15:35:52 it should, because that is basically the same hardware as my Nexus 7 Apr 08 15:36:03 it works on the emulator for me too Apr 08 15:37:32 Muchoz: most of the dependencies are pretty small so it's pretty contained Apr 08 15:37:48 muchoz: rest apis and stuff Apr 08 15:38:18 shmooz, I think i'm using that somewhere else and it works, but in this specific activitiy it doesn't. Apr 08 15:38:40 weird Apr 08 15:38:47 I'm doing it in onCreate btw, maybe that's the issue? Apr 08 15:40:32 yep, works Apr 08 15:41:05 Syzygy: maybe try wrapping that inside textView.post(new Runnable() { public void run() { ... } }); Apr 08 15:41:12 that's what I just tried Apr 08 15:41:35 (postDelayed though, let's see if it works better with just post Apr 08 15:41:59 Muchoz, just use proguard smartly Apr 08 15:42:04 and it'll strip crap you don't need anyway Apr 08 15:42:11 also enable resource and language stripping Apr 08 15:44:50 How can I make a fragment get a height of a percetange of size screen Apr 08 15:46:04 So now that that issue is fixed, any idea how I can deal with "Crunching cruncher some_image.png, see logs"? It's happening on the nightly build server and the current solution is, "try to build again" ... and that works. Apr 08 15:49:47 diegoaguilar, weight usually works fairly well. Apr 08 15:50:13 why would getSystemService(Context.WINDOW_SERVICE).getDefaultDisplay().getRotation() return -1 Apr 08 15:50:40 Syzygy: the post fixed it ? Apr 08 15:51:27 shmooz, well, editText.postDelayed(new Runnable(){thatstuff}, 300 ); fixed it Apr 08 15:51:43 cool Apr 08 15:52:03 MooGoo: because there's an error. break it down into individual method calls and see which one fails. Apr 08 15:52:09 post alone doesn't work. and 300 isn't quite satisfactory. since something like 10 doesn't work either, I assume 300 might not work on slow devices Apr 08 15:53:22 myke: it's getRotation() that fails and returns -1, the docs don't say anything about returning -1 Apr 08 15:53:35 it's supposed to return a Surface.ROTATION_X constant Apr 08 15:53:47 wait Apr 08 15:54:01 what are those constants? check the docs Apr 08 15:54:10 0-3 Apr 08 15:54:12 maybe -1 is a valid rotation, counterclockwise? Apr 08 15:54:17 o Apr 08 15:54:25 well i'm out... Apr 08 15:54:40 yea I thought it might be but apparently not Apr 08 15:54:53 myke, rotations go from 0 to 3 Apr 08 15:55:04 the constants are just ROTATION_0, ROTATION_90, ROTATION_180, ROTATION_270, and go from 0 to 3 Apr 08 15:56:43 MooGoo, http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.2_r1/android/view/Display.java/ Apr 08 15:56:45 have fun ;) Apr 08 15:59:21 Hi, is there a standard way to pre-process a resource file? I have a resource file with a set of constants that need to be encrypted and merged with values.xml Apr 08 15:59:53 well, great, now the keyboard doesn't open anymore at all when I click my edit text. Apr 08 15:59:57 My initial thought was to add a dependency to the variant's 'mergeResource' task Apr 08 16:01:00 tantalum: write your own LayoutInflater Apr 08 16:01:47 tantalum: or LayoutInflater.Factory Apr 08 16:02:12 icedp: Why LayoutInflater? These are string constants, not a layout Apr 08 16:04:54 tantalum: ah not layout but resources. okay, then I would try getResorces().getXml(). Though I'm not entirely sure what you want to archieve Apr 08 16:05:44 nice, didn't realize my av receiver has an http interface Apr 08 16:05:46 that's kinda funny Apr 08 16:06:48 I have some strings that are plaintext in the repo (This is an internal repo) but should be encrypted on the device. The strings are later decrypted and used by a web service Apr 08 16:07:29 so encrypt them as a build step Apr 08 16:07:41 tantalum: oh, then you should look into gradle I guess Apr 08 16:08:16 weird, my thermostat should be discoverable on my network but I can't find it :( Apr 08 16:08:27 pfn, That is what I'm asking about... My plan was to add a dependency to the variant's 'mergeResources' task that would encrypt the values before they get merged Apr 08 16:10:17 But the question is how do I access the intermediate representation of the file and prevent the original (unencrypted) version from being merged into the resource set Apr 08 16:10:18 and my printer has a user name and password and I don't know it, heh Apr 08 16:10:43 How can I change a color of menu item in Toolbar when it is disabled_ Apr 08 16:10:44 ? Apr 08 16:16:34 SneakerXZ, Toolbar = ActionBar? Apr 08 16:16:45 fancy42: Toolbar from support library Apr 08 16:17:07 android.support.v7.widget.Toolbar Apr 08 16:17:37 Realm.io says there are restrictions like only private instance fields and static methods. Does it mean I can't add static methods? This is quite vague... Apr 08 16:17:56 What can I do if my editText.clearFocus() doesn't work? :( Apr 08 16:18:24 Syzygy, cry in a corner is your only option from now on. Apr 08 16:18:32 apperently. Apr 08 16:18:44 I guess it's time for stupid hacks! Apr 08 16:18:46 best time Apr 08 16:19:31 tantalum, yeah, I'm not a gradle user, wouldn't know Apr 08 16:19:55 can I push focus to a view that's gone? Apr 08 16:20:12 SneakerXZ, I tried that once for the ActionBar, but without success. Apr 08 16:20:23 fancy42: I have found a solution already Apr 08 16:20:50 pfn, Thanks man... I'm sure I'll figure it out Apr 08 16:20:55 fancy42: using custom selector with drawables Apr 08 16:21:05 tantalum, if you were using sbt though... ;-) Apr 08 16:22:33 sbt to build android projects? I didn't know that was a thing! Apr 08 16:23:09 SneakerXZ, thanks, I'll have a look at it Apr 08 16:23:45 In my LocationManager the method 'onLocationChanged' is _always_ called twice with the exact same values. Any ideas? Apr 08 16:25:32 tantalum, it is Apr 08 16:25:40 tantalum, pretty niche though Apr 08 16:27:34 Can it hadle encrypting string constants? Apr 08 16:27:53 Ick. I'm having a problem with PendingIntent. I'm setting a unique action and unique data string for each intent, but the PendingIntent is setting the extras to the same value for all PendingIntents with the same class. Apr 08 16:28:19 and it only breaks on API 15 :s Apr 08 16:29:12 Hey can anyone help in translating views http://redd.it/31w0j6 Apr 08 16:33:31 WantToCode: I haven't done this, but checkout the transition animations in Android 5.x http://www.androiduipatterns.com/2014/09/material-design-activity-transition.html Apr 08 16:34:49 I'm obviously doing something wrong here... Apr 08 16:35:15 but I think I almost coded so many workarounds that I got expected behaviour back... Apr 08 16:35:22 @gauthierm Thanks for the link, but aren't these for activity transitions? Apr 08 16:35:32 tantalum, it would be doable, sure Apr 08 16:35:45 gauthierm, tagging Apr 08 16:35:46 WantToCode: sure, isn't that's what's happening in the demo you linked? Apr 08 16:36:07 ugh, my wifi thermostat is protected :( Apr 08 16:36:18 The activity is same, only the views are moved. I used the Device monitor to see that Apr 08 16:37:44 oh, rth6580wf has no api :( Apr 08 16:38:05 I also tried to see what's happening by using the "Show Layout Bounds" option but everything was very messy to understand Apr 08 16:38:38 I got a an activity which got a fragment at a layour Apr 08 16:38:55 at the fragment layout, I want to set onClick to a button ... Apr 08 16:38:57 WantToCode: did you try turning on hte slow animations option too? Apr 08 16:39:04 but such function is at fragments class Apr 08 16:39:13 how can I relate the fragment layout with its class? Apr 08 16:39:40 diegoaguilar: the onClick attribute doesn't work automatically with fragments. You should add a click handler in your fragment code onViewCreated method. Apr 08 16:40:02 definitely ? Apr 08 16:40:05 any workaround? Apr 08 16:40:32 gauthierm, can you guide me to this option? Those in developers options? Those didn't help Apr 08 16:42:09 diegoaguilar: It might call a method in the containing activity but the fragment might get added to other activities that don't have the method. The best way to do it is in Java code in the fragment. Apr 08 16:42:16 WantToCode: sorry, that was my best guess Apr 08 16:42:28 http://pastebin.com/UR7upXBE Apr 08 16:42:32 this seems wrong, but it works for me. Apr 08 16:42:34 Thanks for your time! Apr 08 16:43:37 Syzygy: I'm not sure exactly what you're doing, but you might have better luck with a ViewTreeListener than a hard-coded delay. Apr 08 16:44:38 The delay will be different for different devices so your workaround may work on your phone but not on customer's phone. Apr 08 16:46:45 gauthierm, basically, when I open my activity customLocationText catches focus and opens the keyboard, can't close the keyboard reliably for ... reasons, for that i need the postDelayed (just post won't work). this way I force the keyboard close, pass the focus to another edittext (which I then hide) - but that way the keyboard won't open anymore, so I set it in the touch listener (touch because if the user closes the keyboard he can't open it Apr 08 16:46:45 anymore otherwise since he can't focus other things). but the first touch won't register so i need a focus changed listener as well... Apr 08 16:48:38 Sounds horrifying. Apr 08 16:49:02 gauthierm, any reason why a setOnClickListener wouldnt work Apr 08 16:49:03 :S Apr 08 16:49:06 then again, I don't actually mind if the view has focus, I just don't want the keyboard open at activity start, so I might be able to implement it without the focus catching edit text and just a touch listener Apr 08 16:49:10 Im assigning it at fragment class Apr 08 16:49:13 when onCreateView Apr 08 16:49:16 but its not working :S Apr 08 16:49:28 I mean, when clicking, nothing happens Apr 08 16:50:41 diegoaguilar: can you pastebin your code? Apr 08 16:54:36 yep, wait Apr 08 16:54:38 thanks Apr 08 16:59:00 gauthierm, I found the issue Apr 08 16:59:01 thanks Apr 08 16:59:01 ! Apr 08 16:59:08 huzzah! Apr 08 17:12:53 if I want to include a ListView inside a fragment Apr 08 17:12:59 and control all its logic Apr 08 17:13:36 should I get an array adapter or try to adapt to the approach in here http://developer.android.com/guide/topics/ui/layout/listview.html Apr 08 17:22:38 now all I need is a drone strong enough to carry my new mobile phone for me ... http://forgifs.com/gallery/d/213896-1/80s-cellular-phone-commercial.gif Apr 08 17:24:29 Hi Apr 08 17:24:30 I'm trying to add a method onclick for a button that will send json request with the volley library Apr 08 17:24:39 however I don't see the button when I add it to the main activity Apr 08 17:24:49 I'm not sure what I'm doing wrong Apr 08 17:24:59 I’m having an issue with a listview where one of the views is drawn incorrectly, but as soon as the list get touched/scrolled (even by 0-1px) the issue immediately corrects itself Apr 08 17:25:10 anyone have any ideas where I can start with debugging this? Apr 08 17:26:03 zambo, what does 'drawn incorrectly' mean? you could debug in the getView(...) method and see which parameters are wrong the first time around Apr 08 17:26:56 well, it’s actually a view in a mergeadapter. One of the subviews (an imageview) disappears until the listview is focused/scrolled Apr 08 17:27:10 it literally gets corrected on the next draw of the listview Apr 08 17:37:23 diegoaguilar: both approaches are fine in different circumstances. If you have a large dataset, an array in memory may be inefficient. If you have column headings or other custom stuff, a cursor loader might not work. Apr 08 17:38:20 xpheres: Neither am I :] Can you paste some code? Apr 08 17:40:33 sure Apr 08 17:40:37 gauthierm: http://pastebin.com/sRbypzfT Apr 08 17:41:17 this is the project I'm working on: https://github.com/xpheres/androidanalyticaltranslator Apr 08 17:41:52 xpheres: you added onClick="onclickactivity" but there is no method by that name in MainActivity. Apr 08 17:42:02 ah right Apr 08 17:42:11 yes I have to add the method yet Apr 08 17:45:02 why when I run the project I don't see the button? Apr 08 17:45:16 there is any parameter I have to activate to see the button? Apr 08 17:45:45 or is it because the method is not yet declared? Apr 08 17:49:25 does anyone why I don't see the button I declared in the main xml? Apr 08 17:51:32 xpheres, xml not set as content view maybe? Apr 08 17:51:34 xpheres: there's a lot of stuff in your linear layout. Is it getting pushed off the screen? Apr 08 17:53:07 everything shows gauthierm except the button Apr 08 17:57:24 I plan to do an app messing with gpg. Should I bundle a few gpg binaries (to cover the different architectures) with my app or should I just use gpg java libraries? Apr 08 17:57:31 I tried seting up the parameter visibility to "visible" Apr 08 17:57:35 but that didn't work Apr 08 17:57:44 Try putting it at the top of the layout instead of the bottom and see if it appears. Apr 08 17:58:07 ok Apr 08 17:58:19 ExeciN: afaik, there's no library for GPG core. A Java library is probably a wrapper around binaries already. Apr 08 17:58:52 uhm Apr 08 17:59:05 yes Apr 08 17:59:08 now it appears Apr 08 17:59:12 it seems there are too many things Apr 08 17:59:13 ExeciN: although I recommend using the libraries. GnuPG's IPC stuff is poorly documented and difficult to get right. Apr 08 17:59:14 gpg does in fact have a libarry Apr 08 17:59:36 and some wrapper libraries to make it easier to use Apr 08 17:59:39 xpheres: A RelativeLayout might allow your UI to scale with the screensize in a sensible way. Apr 08 17:59:52 zinx: the library GPG provides calls the binary. Apr 08 17:59:59 i see Apr 08 18:00:05 'lo. anyone familiar with CWM and/or ro.product.device build.prop? Apr 08 18:00:11 that seems silly, but oh well :P Apr 08 18:00:21 I am ok by just using the gpg binary but how can I bundle it and use it within my app? Apr 08 18:00:37 you can include precompiled binaries, just make sure to compile for armv6 + x86 + mipsel at minimum Apr 08 18:00:42 zinx: they're parinoid about security so in some ways it makes sense. Apr 08 18:00:45 apparently flashing a CWM recovery.img somehow changes my device id and I can no longer install roms Apr 08 18:00:49 oh, you probably need that 64-bit arm now too Apr 08 18:01:20 /build.prop seem to contain the correct ro.product.device value Apr 08 18:01:38 I think I'll compile a universal binary for arm, another for x86 etc Apr 08 18:02:04 ExeciN: there's some info on developer.android.com for JNI stuff wrt selecting the correct library for the architecture that probably applies to binaries too Apr 08 18:02:17 ExeciN: sadly i do not have a direct link to it Apr 08 18:02:32 Hi, im having a problem with recyclerview. Im not able to see the items that i receive on my view the first time that fragment its load. If the onResume function its executed then i can see the data, cause of notifyDataSetChanged but if i add it in constructor take no effect. U can the relevant code here: http://paste.ideaslabs.com/show/gLc7aeKnxW appreciate help and ask for more info Apr 08 18:04:29 I'm getting weird issues where an indeterminate spinner freezes when I use them in fragments in a viewpager Apr 08 18:05:53 interesting, did you guys see this? http://blog.jetbrains.com/kotlin/2015/04/announcing-anko-for-android/ Apr 08 18:06:14 "Anko is not just a DSL but a library which facilitates Android development in different areas. It has many methods covering dialogs, asynchronous tasks, services, intents and even SQLite database access." Apr 08 18:06:33 but when you embed the UI DSL in the activity, how are resource changes handled Apr 08 18:06:47 g00s, if/else Apr 08 18:07:07 they say that in the comments Apr 08 18:07:16 codekK: is your recyclerview adapter populated by data loaded in a background thread? Apr 08 18:07:38 orientation change leads to recreation of activity -> if(portraitMode) inflate this else inflate something else Apr 08 18:07:40 MooGoo, yes Apr 08 18:07:44 danijoo yeah dunno if i like that Apr 08 18:07:49 i dont Apr 08 18:08:03 I think that bloats activity code way to much Apr 08 18:08:27 MooGoo, but the callback function will be run in the UI threadh Apr 08 18:08:30 but the other features are pretty nice Apr 08 18:08:36 so the dataset is not ready when onCreate fires, so calling notifyDataSetChanged() would do nothing, but by the time onResume is called it is ready Apr 08 18:08:38 like toast("hello android"!) Apr 08 18:09:36 MooGoo, and what i should do? Apr 08 18:10:31 also I dont like to recompile the dex for a simple layout change Apr 08 18:12:37 MooGoo, should i not use the background thread? Apr 08 18:13:25 g00s: old idea, looks cool. a little bit hard to read but I guess it's just a matter of habbit Apr 08 18:13:33 you can use a background thread, just hold off seting the recyclerview adapter until the list is loaded Apr 08 18:13:42 icedp i didn't realize this was koan renamed Apr 08 18:14:09 you get the list in findInBackground(), so create the adapter there and set it to the recyclerview Apr 08 18:16:49 MooGoo, but for do it i have to send the adapter to my getAllByUser method from categoria. And im not sure that i can handle it on the call back Apr 08 18:19:04 I think you should have a callback parameter on getAllByUser(), as a way to return the list to the caller when it is ready Apr 08 18:19:11 else you are just returning an emtpy list every time Apr 08 18:19:50 *empty Apr 08 18:20:59 wow, the android-developers google group is pretty dead these days Apr 08 18:21:11 compared to the traffic it used to get Apr 08 18:21:16 I'm surprised Google Groups is sitll going. Apr 08 18:21:24 still* Apr 08 18:22:37 at least one thing i prefer about it ove google+ is that its just a list, i hate that google+ staggered grid crap Apr 08 18:22:40 google groups is used by a ton of people Apr 08 18:23:40 g00s is l00s Apr 08 18:23:46 because google forces them Apr 08 18:23:52 yo mikedg Apr 08 18:23:55 g00s: I wish this became a mainstream. So convenient for Android :) https://gist.github.com/mlatu/5bca895cc297585da8eb Apr 08 18:24:18 icedp clojure ! Apr 08 18:24:27 that looks like a bunch of ass Apr 08 18:24:34 use some exammle Apr 08 18:24:35 and i'm sure mikedg knows ass Apr 08 18:24:43 :) Apr 08 18:24:58 mikedg what are yo doing lately ? Apr 08 18:25:00 i know ass like i know i/o tickets Apr 08 18:25:07 im going to i/o thats what! Apr 08 18:25:25 haha are you going to cause some trouble ? Apr 08 18:25:25 i'm working on a variety of wearables stuff Apr 08 18:25:29 cool Apr 08 18:25:39 you'll see them by the bunches there Apr 08 18:25:44 Hi - I'm just wondering if I need java 1.7.0_71 rather than 8 for android studio Apr 08 18:25:47 javac 1.8.0_31 Apr 08 18:25:47 somebody said the smaller the screens get, the mode code required to do anything ... heh Apr 08 18:26:09 baxx: You can use 7 or 8. Apr 08 18:26:19 mikedg when google glass 2 comes out, will you check that out again ? Apr 08 18:26:25 TacticalJoke: cheers, the tut said 7 but I thought it should be cool, nice one :) Apr 08 18:26:26 yes Apr 08 18:26:34 I will absolutely buy whatever the next google glass is Apr 08 18:26:55 i want to stop asynctask as user press home button.. how can i do that.. Apr 08 18:26:57 ? Apr 08 18:27:11 mikedg have you given any talks lately ? Apr 08 18:27:27 g00s: gave an apple watch vs android wear talk last month Apr 08 18:27:48 My niece is diappointed because some Crayola app isn't working on her parents' devices. I looked at the site and it runs on like 10 very specific Android devices. Apr 08 18:27:52 but other than that i think im retiring from major talks, ill probably just stick to small local talks at the nyc gdg Apr 08 18:27:52 apple watch isn't out yet though right? and they are only giving a few top devs access to them i thought Apr 08 18:27:56 Does any one know any decent recent 'hello world' android app tutorials? Apr 08 18:28:09 when apple watch didn't even exist Apr 08 18:28:12 g00s: yeah the sdk has been out for a while and is being updated "frequently" Apr 08 18:28:38 mikedg what was your favorite topic to talk about, wearables ? Apr 08 18:28:39 s9iper1: just the home button or whenever htey leave your app? Apr 08 18:28:43 man.. google disabled ads in one of my apps with the following reason: GOOGLE PRODUCT ABUSE: Publishers are not permitted to abuse or promote the abuse of any Google product, such as YouTube, Google Play, or Blogger. This includes circumventing, or providing the means to circumvent, the policies or terms of these or other Google products, such as by allowing users to download YouTube videos. Apr 08 18:29:02 g00s: i like talking about glass, people still dont get it, it always seems like an eye opening talk Apr 08 18:29:18 mikedg what do you think about MS hololens ? Apr 08 18:29:29 i need to experience it for myself first Apr 08 18:29:34 and I have no idea why Apr 08 18:29:40 should be out pretty soon Apr 08 18:29:47 its intriguing Apr 08 18:30:04 Quacked my GA dashboard says pending verification, i have no idea wth is going on - still not seeing anything Apr 08 18:30:04 since it shines directly on your eyeball, it probably literally is something you have to see for yourself Apr 08 18:30:14 g00s, odd Apr 08 18:31:16 Quacked "Notification archived while verifying. Most checks verified within 24 hours. Tagging verification can take much longer." Apr 08 18:31:23 i asked about it in the forums, nobody knew anything Apr 08 18:31:46 "much longer" lol wut Apr 08 18:32:06 s9iper1: detect when user leaves your up then cancel AsyncTask ) Apr 08 18:32:09 swatch is doing smartwatches, I wonder if rayban is doing smartglasses Apr 08 18:32:15 just the home button like when activity is paused mikedg Apr 08 18:32:36 what about if another app starts in front of yours? Apr 08 18:32:58 what about if a user clicks the back button? Apr 08 18:32:58 onpause still called Apr 08 18:35:42 I'm not sure how I feel about Anko. I agree with that top reddit comment -- I like separate presentation data from logic (where possible, anyway). Apr 08 18:35:46 separating* Apr 08 18:36:28 same TacticalJoke Apr 08 18:37:06 also think about the size of an activity with /layout, /layout-land and maybe a seperate layout for tablet Apr 08 18:39:34 icedp, scala works reasonably well in relation to the snippet you pasted, scala + macroid Apr 08 18:40:10 danijoo: Yeah, conditional statements look like a step back. Apr 08 18:40:34 the other features of it are pretty nice though Apr 08 18:40:37 Though I guess there are some cases where they'd be preferable. Apr 08 18:40:43 Yeah. Apr 08 18:40:53 it all depends on the size of your xml i guess Apr 08 18:41:05 baxx, hello world android = "android create project -g -v 1.1.3" Apr 08 18:41:09 baxx, instant hello world app Apr 08 18:41:20 if i just want to make a loading screen with a textview and background for example, its nice to be able to do that inline Apr 08 18:41:28 pfn: General Protection Fault Apr 08 18:41:30 while ill still use xml for bigger things Apr 08 18:42:36 * pfn ditched all xml out of qicr Apr 08 18:42:49 'cept for appwidget and notifications and menus Apr 08 18:42:57 s/all/layout/ Apr 08 18:44:53 hm, the santa tracker puts deps in gradle.properties, i forgot you could do that https://github.com/google/santa-tracker-android/blob/master/app/gradle.properties Apr 08 18:45:23 either there or ext { } block Apr 08 18:48:20 pfn: checked it out. yeah, seems exactly as powerful. yet looks more cluttered, but maybe that's subjective Apr 08 18:51:37 mikedg seems apple watch is the next minor gold rush among devs Apr 08 18:51:52 apple devs Apr 08 18:52:03 i agree Apr 08 18:52:51 mikedg have you been doing any iOS ? Apr 08 18:54:39 oh cool apple photos is out. comes with 10.10.3 Apr 08 18:54:42 yuo Apr 08 18:54:49 i got an iphone in december in prep for apple watch Apr 08 18:54:57 mikedg yuo ? :) Apr 08 18:55:07 been using it since, and been doing some ios dev for convenience Apr 08 18:55:12 yup Apr 08 18:55:23 using swift then ? Apr 08 18:55:33 obj c still Apr 08 18:55:51 when i was doing ios, it was pre - ARC Apr 08 18:56:03 i didn't enjoy that part ( alloc / init ) Apr 08 18:57:34 yeah me neither, going back was mucher nicer than i expected Apr 08 18:57:42 i hadnt done ios dev in a few years Apr 08 19:01:15 mikedg i noticed apple was hiring a position involving preparing apple watch for enterprise O.o not sure what they had in mind there Apr 08 19:01:37 seems like apple is pretty agressive going after verticals, like medical Apr 08 19:01:43 icedp, the language is a bit more verbose than lisp Apr 08 19:02:42 mikedg saw this the other day, pretty cool http://www.slate.com/blogs/future_tense/2015/03/27/apple_watch_could_make_you_a_walking_weather_station.html Apr 08 19:05:07 all these big corps trying to take over the world pisses me off Apr 08 19:05:09 icedp, but just about/more powerful Apr 08 19:06:41 apple watch sure is a good looking piece of hardware Apr 08 19:06:59 it's too thick and puffy like a pillow Apr 08 19:07:19 shmooz thats good for when you snooz in class Apr 08 19:07:29 put your head down on your apple watch Apr 08 19:07:30 they should have made a slim round one without a flat tire to compete with the Moto 360 Apr 08 19:07:34 does the "Application" (android.app.Application) instance of my app can be deleted by the GC ? Apr 08 19:09:42 one thing i dont like about the apple watch is that little wheel. sure, looks very traditional. and its functional for scrolling, but i'd rather scroll by just using the side of the watch as a touch surface or something. i think apple should hire me Apr 08 19:09:58 :D Apr 08 19:10:01 g00s, good for you, you don't like it, everyone else does Apr 08 19:10:09 blusky, no Apr 08 19:10:30 too thick? apple watch looks like a reasonably-sized tank case Apr 08 19:10:35 unlike the way the moto 360 looks Apr 08 19:10:40 looks like some tower jutting off your wrist Apr 08 19:12:07 they would do better if they had just made some watch bands for their existing ipod nano's Apr 08 19:12:14 What's general consensus on targeting >= 16? versus 15/14? Apr 08 19:12:19 *minimum Apr 08 19:13:33 the consensus is you should support gingerbread phones and up Apr 08 19:13:41 because I still have one Apr 08 19:13:41 if you don't want me to use your app Apr 08 19:13:55 lasserix, <****> 8=100%, 10=100%, 15=93%, 16=88%, 17=71%, 18=52%, 19=47%, 21=5%, 22=0% Apr 08 19:14:28 API=percent exemple, for API 15 (and below) it represents 93% Apr 08 19:14:30 yeah i am aware of the stats, but the problem is i might have to use exoplayer, guess can just not do streaming for Apr 08 19:14:34 15 and below Apr 08 19:15:10 lasserix: what format are you streaming ? Apr 08 19:15:11 tralamazza i noticed on the bug tracker, somebody was able to get long writes working Apr 08 19:15:25 if you have already a user base, i would look at their number there Apr 08 19:15:59 shmooz: i have rtsp and hls, but problem is rtsp is not set up correctly or something because it doesn't work. hence i am using exoplayer to get HLS working Apr 08 19:17:08 what measure is used for paint.setTextSize(float textSize), is it dpi related? or pixels width or height from origin point? Apr 08 19:17:16 px Apr 08 19:17:33 from top left unless you specify paint.alignment Apr 08 19:17:44 I had problems finding rtsp streams that worked with mediaplayer/videoview as well, the youtube mobile rtsp's work but they are super low res Apr 08 19:17:57 ok thanks Apr 08 19:18:24 shmooz yeah exactly that problem, even used wireshark to dig into it and compare a working rtsp with what i have to work with but to no avail. Apr 08 19:19:14 yeah you need to use 3rd party something Apr 08 19:19:16 maaan.. how can I find out what google really thinks Im doing wrong. I get this e-mail when I appeal: GOOGLE PLAY REMOVAL: AdMob publishers are not permitted to abuse or promote the abuse of any Google product, such as Google Play, YouTube, or Blogger. This includes circumventing, or providing the means to circumvent, the policies or terms of these or other Google products, such as by allowing users to download YouTube videos. Apr 08 19:19:46 Hi guys. I'm trying to implement saving of a Bitmap in DiskLruCache (JakeWharton). There's a method for getting a Snaphot object from which I can get InputStream of the cached object and there's Editor object through I should save the object. But as I see Editor's set(String value) method accept String so... I don't quite understand how to save Bitmap or other binary data when it accepts String? Apr 08 19:20:21 shmooz: just the developer not my call, all third parties require $$$ Apr 08 19:20:33 not ffmpeg Apr 08 19:20:56 When I have an activity that implements a LocationListener, do I need to worry about removing the updates from the LocationManager? Currently I'm removing them in my onDestroy() but that generates an error saying 'this' is null when removing the updates from it. Apr 08 19:20:59 or some other libs use ffmpeg like Vitamio Apr 08 19:21:26 Here's the doc of Editor object. http://jakewharton.github.io/DiskLruCache/com/jakewharton/disklrucache/DiskLruCache.Editor.html Apr 08 19:21:38 Did anyone work with that? Apr 08 19:22:12 AlexBerdnikov: So you are trying to use DiskLruCache to cache bitmaps correct? Apr 08 19:22:24 Well, yes Apr 08 19:23:16 Bitmap.compress or DiskLruCache.Editor.newOutputStream. Apr 08 19:23:56 Actually, I guess it's both. Apr 08 19:24:11 what is the best way to detect whether or not an activity is running? Apr 08 19:24:41 AlexBerdnikov: Look at what DiskLruCache.Editor.set does: https://github.com/JakeWharton/DiskLruCache/blob/master/src/main/java/com/jakewharton/disklrucache/DiskLruCache.java#L807-L816 Apr 08 19:24:42 t0astt, in what context? Apr 08 19:24:57 It just calls newOutputStream and does basic stuff around that. Apr 08 19:25:06 A UML(ish) view of the Spannable classes in my presentation tomorrow... wow. http://uppix.com/f-classes5525700d0018b424.png Apr 08 19:25:27 MikeWallaceDev omg Apr 08 19:25:31 i hope thats not a slide Apr 08 19:25:51 unless the purpose it to demonstrate how confusing a mess it is Apr 08 19:25:52 nah, it's the beginning of many slides... I guess :D Apr 08 19:26:18 danijoo: i have an activity that launches when a user clicks a notification they receive. that activity has a back arrow that finish()es the activity. If the user was in the app (meaning mainactivity was running) then the finish() drops them into the mainactivity. this is not the case if they launch the notification activity by clicking a notification with the app not "running". I would like for the finish() in the notification activity to launch th Apr 08 19:26:18 It's actually not THAT messy... there's just a lot of them Apr 08 19:26:25 I remember the MFC overview that used to come with MS Visual C++. It looked simpler than that. :D Apr 08 19:26:51 g00s, some are classes with a few lines, some are even empty interfaces. Apr 08 19:26:57 TacticalJoke, YEAH! :D Apr 08 19:27:19 MikeWallaceDev when i see that slide, its too unorganized. can you group things more meaningfuly ? Apr 08 19:27:34 that's what I'm doing now g00s Apr 08 19:27:38 one of the tricks of uml is eliding the diagram to the useful bits ;) Apr 08 19:27:50 All I see is that MetricAffectingSpan appears to be The Man. Apr 08 19:27:57 UML yes, yEd no. Apr 08 19:28:06 TacticalJoke, yes but Writer.write() method accepts String... I don't understand how can I pass Stream there Apr 08 19:28:45 yEd doesn't support having copy of a node (class) so I can't have the same node in two diagrams... Apr 08 19:28:47 That's just an OutputStreamWriter. Apr 08 19:29:17 AlexBerdnikov: I'm not sure, but I think the answer is to pass the result of DiskLruCache.Editor.newOutputStream to Bitmap.compress. Apr 08 19:29:21 how to have http request made from the broadcastreceiver ? Apr 08 19:29:26 AlexBerdnikov: You can do it like this OutputStream os = editor.newOutputStream(0); Apr 08 19:29:29 bitmap.compress(compressFormat, compressQuality, os); Apr 08 19:29:31 os.flush(); Apr 08 19:29:32 a-russo you dont ;) Apr 08 19:29:40 see ya later guys, back to the presentation :) Apr 08 19:29:46 good luck MikeWallaceDev Apr 08 19:29:51 g00s: i kinda got in a form of fatal error :D Apr 08 19:30:14 g00s: but i still need it :) Apr 08 19:30:16 thanks a lot g00s :) Apr 08 19:30:29 Solarnum, thank you, I'll try that. I think that's the way it works. Apr 08 19:30:46 a-russo you can make your receiver start an IntentService to do the http request Apr 08 19:30:46 t0astt, you can use static booleans Apr 08 19:30:59 set them in onStart to true and to false in onStop Apr 08 19:31:17 not elegant, but working Apr 08 19:31:23 Alright, I'll give that a try. I saw that earlier but wasn't sure if it was a "nice" way to do it Apr 08 19:31:32 g00s: thanks will look into it Apr 08 19:31:56 AlexBerdnikov: There are some wrappers for DiskLruCache too for working with bitmap that might be worth looking into. Apr 08 19:32:04 t0astt, you should look into stacks for Intents. Apr 08 19:32:12 The name escapes me right now... Apr 08 19:32:31 Solarnum, thank you mate, I'll totally seek for them! Apr 08 19:34:07 t0astt, this is a start : http://developer.android.com/reference/android/support/v4/app/TaskStackBuilder.html Apr 08 19:34:31 i'll give it a look, mikewallacedev. thanks! Apr 08 19:34:41 no problemo :) Apr 08 19:35:29 t0astt, this is a start before the other start : http://developer.android.com/training/implementing-navigation/temporal.html Apr 08 19:35:45 :) Apr 08 19:39:35 I'm trying to get my MediaRouteSelector to show both Chromecast and MiraCast devices that are available. I've added control categories for live video and then one for my cast app, but only the chromecast ever shows up. Apr 08 19:39:57 Anyone know what I might be missing? Apr 08 19:48:39 guys. I have an awkward question. Were there android 4 smartphones which still used resolutions smaller than 800x600? Apr 08 19:49:51 Solarnum, thank you again! It worked. It works exactly like that - first you get OutputStream, write there what you want and then call commit(). Apr 08 19:49:54 Thank you Apr 08 19:50:37 AlexBerdnikov: Glad you got it to work! Apr 08 19:53:22 a new git book for teams http://shop.oreilly.com/product/0636920034520.do Apr 08 19:54:15 * pfn really doesn't like git flow Apr 08 19:55:19 the concept sounds good on paper, but it just ads so much work Apr 08 19:55:21 add Apr 08 19:55:31 pfn: Not that git flow is perfect, what do you like better? Apr 08 19:56:22 I'm trying to detect when the back button is used to go back to a certain fragment. I'm implementing onBackStackChangedListener on the fragment and declared public void onBackStackChangedListener(), but the Log.i() I placed within the function isn't executing. Am I doing this wrong? Apr 08 19:56:45 yiati, keeping most work on develop/master except for destabilizing changes Apr 08 19:57:05 t0astt: any reason to no just override the back button directly? Apr 08 19:58:37 pfn: Do you try to keep develop stable? Apr 08 19:59:17 t0astt: also did you add the onbackstackchangedlistener to your fragment manager? Apr 08 20:00:10 satt: would that be done in the previous fragment/activity? Or in the fragment that gets brought to focus from the back? Apr 08 20:00:19 and satt: I did not add the onbackstackchangedlistener to my fragment manager Apr 08 20:00:55 t0astt: it would be on the previous fragment/activity...so maybe not what you're looking for. Apr 08 20:01:17 and I think you need to add it to your fragment manager... http://stackoverflow.com/questions/23599519/android-onbackstackchanged-not-called Apr 08 20:02:08 ah yeah, I think i need to implement on my activity, not my fragment. I'll give it a try. thanks! Apr 08 20:03:51 no worries :) Apr 08 20:04:38 i'm trying to use androidsvg or svg-android and none seems to be working to me, I followed each of their tutorial and used the same sample svg file, but none were able to draw the image to the imageView, the result on both is a blank ImageView Apr 08 20:05:11 I'm almost putting a browser inside my app to render svg into a html5 canvas Apr 08 20:08:52 WeissLehrer: Just load Chrome in, or hell even ChromeOS. After that, you can even run your Android apps through ChromeOS! You'll be set Apr 08 20:10:02 yiati, anything that is pushed should compile. and pass tests Apr 08 20:10:19 DrSmiles: What I want is to render and manipulate svg paths inside my app, not to run my app in a particular enviroment Apr 08 20:11:05 Wouldn't be having Chrome OS running somewhere be a good tablet 'emulator'? Apr 08 20:12:08 pfn: It seems like a good idea to keep incremental work that you may not necessarily want to push into develop in some separate branch for backup sake, and for being able to go back to checkpoints. I like git-flow because it formalizes that process for me Apr 08 20:12:47 pfn: I do try to stay away from the git flow plugin though. I use my own interpretation of git flow Apr 08 20:13:13 I am trying to make an app with a profile. When you open an app you need to fill the name, last name, etc. What would be the best way to keep this information ? Database, etc ? Apr 08 20:14:04 WeissLehrer - are you on Lollipop? Apr 08 20:14:31 Nightwalkerkg: will there be multiple users stored on the same device? Apr 08 20:14:50 is there any way to get the actual buffering amount of mediaplayer?> Apr 08 20:14:51 satt, no, just one. And this will only occur on the first start. Apr 08 20:15:03 onBufferingUpdate just goes 53% 100%x1000 Apr 08 20:15:37 Does anyone know when Realm.io might support null values? Apr 08 20:16:02 Nightwalkerkg: I'd just use JSON then probably, keep it simple. Save a bundle of the data to a JSON file Apr 08 20:21:30 satt, i see that they use name.put(); in order to give info to json. But how do i get info from it ? I would like to display name and last name inside another fragment ? Apr 08 20:22:49 satt, nevermind, found it. Apr 08 20:23:50 How do I get an activity reference from a nativeactivity in c++? Apr 08 20:25:01 Nightwalkerkg: Store the data you want to use/display later in a bundle (or in seperate vars if you want). Here's some code I use to save bundles to json and back: http://pastebin.com/6kQz7J8J Apr 08 20:25:37 ah nvm Apr 08 20:27:27 To clarify: I am writing some c++ code that is cross-platform. I've exposed C++ and Java (wrapper) APIs for end-users. One of my functions requires a reference to a java Activity. It's easy to ensure that a reference to said Activity exists when the end-user develops in the Java API. but I want to make sure that I can get that activity reference from c++ as well Apr 08 20:28:41 It doesn't appear as though nativeActivity exposes any reference to a java activit Apr 08 20:32:28 hi, is there a way of using a single Surface in multiple SurfaceViews? Apr 08 20:33:13 Hi all Apr 08 20:33:35 How big is the jitter on AlarmManager.setInexactRepeating() ? Apr 08 20:33:47 I'm trying to install Android Studio on Ubuntu - getting this error - http://tinyurl.com/osqfbt9 , is the SDK manager separate to this install? Apr 08 20:34:41 I want to set up an alarm for like 11:30pm and i'm afraid it could fire the next morning which would mess with what i'm trying to do since it depends on the day and should be executed late in the evening Apr 08 20:36:54 Anticom: docs say max jitter is almost the interval so probably you should set new alarm every time with setWindow or setExact Apr 08 20:38:57 satt: I'm using API 16, I've been able right now to render it using the SVGImageView but I figured I can't use this librery to modify the svg image (dragging the nodes etc.) Apr 08 20:39:42 icedp: i thought setRepeating() was the way to go. I'm new to this API. Also in the docs of setRepeating() it say's "Note: for timing operations (ticks, timeouts, etc) it is easier and much more efficient to use Handler." Any recommendations? Apr 08 20:39:47 maybe the best way to do that is using a webview with an javascript implementation? Apr 08 20:42:34 WeissLehrer: I'm afraid I've never used those libs, so I'm not sure I can help you. SVGImageView doesn't let you modify, and the others aren't working for you at all, right? Apr 08 20:42:58 if the webvew with javascript does what you want ok, I'd say just go for it Apr 08 20:45:27 Anyone dealt with resizing EditTexts? I'm getting inconsistent results, trying to make the edittexts smaller in height and the text gets cut off, so I changed the padding and it looks ok on Lollipop but my users are reporting that the text is still cut off pre-Lollipop Apr 08 20:45:44 Anticom: in setRepeating read note for API 19+. it would be exact for those devices Apr 08 20:45:54 Anticom: *inexact Apr 08 20:46:44 So, I have a RESTful API being pulled by Retrofit and it's pulling in the data just fine and instantiating a series of objects. However, I want to create a (shared) list amongst all these objects that contains ALL of the items for a certain attribute. Any suggestions? I basically want a static variable, but since the data is received over HTTP, that ain't gonna fly Apr 08 20:47:13 Anticom: so I think setWindow fits perfectly you task. just define a range of hour or so Apr 08 20:47:39 Anticom: by timing operations they mean something like every second or minute Apr 08 20:48:54 icedp: But setWindow() doesn't set a repeating alarm or does it? So I guess i'd have to re-schedule the task at the end of the task itself to achive periodic execution? Apr 08 20:49:13 Or are [all] alarms repeating and just the API is confusing? Apr 08 20:49:52 Anticom: that what I meant by "new alarm every time" Apr 08 20:50:32 icedp: And what's the best practise for that? Just as I said? Apr 08 20:50:49 DrSmiles - you want to create a list of objects that fit a certain criteria? Why not just make a singleton that stores that in an arraylist? Apr 08 20:51:34 what do you think about xamarin? Apr 08 20:52:09 gdrc you may want to read https://news.ycombinator.com/item?id=9320929 Apr 08 20:52:27 thanks man Apr 08 20:52:36 yw Apr 08 20:52:48 Anticom: I guess. Just as you receive intent schedule the next one. Also you can check if you have it scheduled when your activity/service gets run Apr 08 20:53:12 Okay, thanks Apr 08 20:53:38 Is there any reason to pick C#/Xamarin over Kotlin/Dalvik? Apr 08 20:54:00 you know c# like the back of your hand Apr 08 20:54:03 I wouldn't spend the $1000/yr for it when better alternatives exists Apr 08 20:54:20 lasserix_: For anyone who knows C#, learning Kotlin would take maybe a few hours. Apr 08 20:54:26 TacticalJoke: cross platform? Apr 08 20:54:29 unless you really enjoy working with c# Apr 08 20:54:34 that's what i meant Apr 08 20:54:38 Then again, I guess I'm assuming they know the JDK pretty well. Apr 08 20:54:42 because a lot of people really do enjoy c# Apr 08 20:55:28 s/the JDK/Java/ Apr 08 20:56:21 TacticalJoke, visual studio? c#? Apr 08 20:56:37 g00s, lol xamarin CEO in comments Apr 08 20:56:45 nat , yeah Apr 08 20:56:48 How does C# compare to Kotlin now? Apr 08 20:58:26 c# has no rivals at all imho Apr 08 20:58:36 c# has no rivals? Apr 08 20:58:38 * pfn headscratches Apr 08 20:59:41 Xamarin is just bad. Apr 08 20:59:53 Don't use it if you want a decent app imo. Apr 08 21:00:20 It is never ever going to look as good or function as well as native applications on either iOS or Android. Apr 08 21:00:38 you can use the native apis for creating controls with xamarin Apr 08 21:02:54 All I've ever read from Xamarin users is that is unstable. Apr 08 21:03:06 That it is immature and that they regret it. Apr 08 21:04:11 Imho these cross platform solutions are always done badly. Doesn't matter whether it's a mobile application or on a desktop OS. They never look as good as native ones. Apr 08 21:04:28 then again, I don't care for xamarin either Apr 08 21:04:34 not worth the $1000/yr Apr 08 21:04:46 Who would even pay that Apr 08 21:04:56 It's attractive for cheap managers, that's all imo. Apr 08 21:04:59 well, when all you have is a shop of c# developers Apr 08 21:05:14 $1000 is pretty cheap Apr 08 21:05:19 Muchoz, for a company 1k is nothing Apr 08 21:05:29 gdrc, that's why I say 'cheap'. Apr 08 21:05:52 it's fair Apr 08 21:05:56 Hiring other developers is expensive so they go with the cheap solution: Xamarin. Apr 08 21:06:34 anyway, considering the quality of some apps, I'm sure xamarin creates a much better end result Apr 08 21:06:59 https://play.google.com/store/apps/details?id=com.honeywell.mobile.android.totalComfort Apr 08 21:07:04 that stupid pos is a 100% direct-from-ios port Apr 08 21:07:40 those are the worst Apr 08 21:08:13 10k 5 star reviews tho Apr 08 21:08:24 what you might call "exponetially well recieved" Apr 08 21:08:28 lasserix_, yeah, so clearly, users really don't give that much of a shit about non-native ui Apr 08 21:08:32 hehe Apr 08 21:08:46 users are clueless, who cares about them Apr 08 21:08:59 but yeah, turns out my thermostat doesn't have a local api :( Apr 08 21:09:01 I'm kinda sad Apr 08 21:09:12 $60 though... I'll stick with it Apr 08 21:09:16 i like the fact the tablet in the screenshot has so low battery Apr 08 21:09:35 Alright guys, my app presentation is tomorrow for a contest. Two questions: What is the best way to present my app (live demo) WITHOUT genymotion or an emulator? Second: I need to come up with documentation for my app. There are a lot of classes... is there a fast way to do come up with documentation using ANdroid Studio or another tool? Apr 08 21:10:12 I've been wanting to find the specs for widi, I would love to write a miracast app to receive widi on a pc Apr 08 21:10:14 t0asst find a device with a HDMI output Apr 08 21:10:22 i think my n7 might have one? Apr 08 21:10:23 not sure Apr 08 21:10:27 t0astt, could you take a video? Apr 08 21:10:33 anyways, find a device with a hdmi output, Apr 08 21:10:34 lasserix_, all recent android devices support mhl output Apr 08 21:10:45 quinnjn: nope, has to be live. pfn: mhl? Apr 08 21:10:49 pfn do you know what libs were used for that honeywell thing? is it something like cordova Apr 08 21:10:50 or whatever, but just don't use screencapture Apr 08 21:10:51 t0astt, use google Apr 08 21:10:54 t0astt: either take a video, or get an adapter with mhl or the other hdmi adapter thing Apr 08 21:11:12 slimport Apr 08 21:11:15 but yeah, I've been wanting a widi app forever Apr 08 21:11:16 g00s, buy google thermostat Apr 08 21:11:19 toastt there is a uml plugin you can drag and drop classes into and it'll diagram for you Apr 08 21:11:36 i'm not buying a thermostat , nm a google one Apr 08 21:11:39 lasserix_: sweet, do you know the name off hand? Apr 08 21:11:45 t0astt: Visual Paradigm ? Apr 08 21:11:57 dont remember Apr 08 21:12:00 you still run eclipse? Apr 08 21:12:07 i'm on android studio Apr 08 21:12:12 t0astt: http://stackoverflow.com/questions/17123384/how-to-generate-class-diagram-uml-on-android-studio Apr 08 21:12:30 I used to want a nest, then some stupid college kid was the no vote in my interview, so I said fuck them, never buying a product from them Apr 08 21:13:03 fair enough Apr 08 21:13:37 t0astt just goto preferences->plugins->browse and search uml or class diagram Apr 08 21:13:40 at this point, all these 'smart things' oems have a really crappy security record. i'll pass Apr 08 21:13:50 you might try Code Iris Apr 08 21:13:51 pfn, which interview? Apr 08 21:13:59 gdrc, job interview, of course Apr 08 21:14:08 presumably at nest.. Apr 08 21:14:15 you wanted to work for nest? Apr 08 21:14:34 yeah, they were something cool that I wanted to work on, and they had mega bonus points for being a scala shop Apr 08 21:14:44 basically ticked off all the right checkboxes for me Apr 08 21:14:53 pfn: "then some stupid college kid was the no vote"? Apr 08 21:15:10 lasserix_, is it not clear? Apr 08 21:15:11 lasserix_: thank you!! Apr 08 21:15:15 where are they placed? sf area? Apr 08 21:15:24 lol he did just say exactly that lasserix_ Apr 08 21:15:26 mountain view somewhere, I don't remember Apr 08 21:16:36 woulda been a nice bonus to get some money when google bought them out, too Apr 08 21:17:09 nest is like one of the few places I'm pissed about when it comes to interviews Apr 08 21:19:09 sorry i have major head cold can barely concentrate atm Apr 08 21:19:23 :( now are you indie? Apr 08 21:19:59 more or less Apr 08 21:20:55 Hi guys Apr 08 21:21:47 Little problem here : I try to change the actionbar color, but it turn gray instead Apr 08 21:22:11 t0astt: what doyou win? Apr 08 21:22:18 It's extended from Theme.AppCompat.Light.DarkActionBar Apr 08 21:22:26 lasserix_: I think some android wearables and potential job offers Apr 08 21:22:29 plus fame Apr 08 21:22:30 xD Apr 08 21:22:55 plus potential entrepeneurship opportunity, since there is an entrepeneur contest at my school that involves this contest Apr 08 21:23:25 xDevol are you changing it in xml or code? Apr 08 21:23:53 is there a way to persist all/certain UI component's states automatically in a key-value store? Apr 08 21:24:21 Anticom, no Apr 08 21:24:34 Like toggle buttons, switches, pickers etc. Apr 08 21:24:37 well, there's a way if you write it Apr 08 21:24:39 :( Apr 08 21:24:51 Code Apr 08 21:24:52 actionBar.setBackgroundDrawable(new ColorDrawable(R.color.alizarin)); Apr 08 21:24:52 pfn: which is not automatic :p Apr 08 21:24:59 it is automatic once you write it Apr 08 21:25:06 that's what all of development is, automation, to an extent Apr 08 21:25:33 my app only has one activity which acts kind of the settings page for the background service Apr 08 21:25:54 i just thought it would be a common case to do that Apr 08 21:27:30 PreferenceActivity/PreferenceFragment? Anticom Apr 08 21:27:55 icedp: I just started android development two days ago. Could you please be a bit more verbose? Apr 08 21:29:05 Anticom: http://developer.android.com/guide/topics/ui/settings.html Apr 08 21:29:08 satt saw my message ? Apr 08 21:29:52 icedp: And a PreferenceActivity can be the App's main activity? Apr 08 21:30:53 Anticom: yes but for modern APIs you use just an Activity with PreferenceFragment (according to the docs anyway) Apr 08 21:31:34 Okay I see. Just read about Fragments very briefly but I wanted to dig deeper into them anyway Apr 08 21:31:54 Luckily my learning curve is still pretty steep Apr 08 21:32:10 xDevol - saw it now. Try using this instead of R.color.whatever. context.getResources().getColor(R.color.MusicPercent); Apr 08 21:32:31 so for your case context.getResources().getColor(R.color.alizarin); Apr 08 21:33:30 Think I've got some reading to do. Thank's for the hints Apr 08 21:33:55 satt well done Apr 08 21:34:03 It was that Apr 08 21:34:13 Thanks Apr 08 21:34:15 xDevol happy to help :) Apr 08 21:34:49 dang, Visual Paradigm is erroring when trying to integrate with Android Studio Apr 08 21:47:30 startService doesn't fire intentservice ? Apr 08 21:51:05 anyone else using Kotlin have a total meltdown after the M11 update? I had worked around this by sticking with M10.1, but now I’m getting an incompatible plugin error. Fun times. Apr 08 21:52:25 a-russo: did you declare the service in the manifest? Apr 08 21:53:09 i did, http://pastebin.com/yTQM2mx0 Apr 08 21:54:15 and what does logcat spit out when you debug the startService() line/ Apr 08 21:54:17 ? Apr 08 21:55:53 I hope this is the correct place to ask, but does anyone know why this code: v.getHolder().unlockCanvasAndPost(v.getHolder().lockCanvas()) could possibly throw this? java.lang.IllegalArgumentException: canvas object must be the same instance that was previously returned by lockCanvas Apr 08 21:56:09 oh and v extends surfaceview Apr 08 21:57:39 treelzebub: Finishing failed broadcast to ... Apr 08 21:58:08 Unable to instantiate receiver Apr 08 21:59:36 treelzebub: this is how I call the thing , http://pastebin.com/2Q7HdFBk Apr 08 21:59:52 let me see your service Apr 08 21:59:54 pls Apr 08 22:01:54 my guess is you need a public constructor matching the super Apr 08 22:02:06 http://pastebin.com/yvTW38mu Apr 08 22:02:21 I seem to have it done, i'd say Apr 08 22:04:32 do you guys also get android studio suddenly not responding to keyboard commands/ Apr 08 22:04:35 under ubuntu Apr 08 22:04:37 ? Apr 08 22:04:59 and more than that, do you guys have a fix for this very annoying issue? Apr 08 22:06:10 topic refers to Android 5.1 Lollipop SDK is out, but 5.1.1 been out for several days! Apr 08 22:06:38 I don't get this crashing on debian Apr 08 22:06:58 or freezing rather Apr 08 22:07:43 jesus, its impossible to work Apr 08 22:07:51 ever since i updated it this afternoon Apr 08 22:07:56 this new update is just crap too Apr 08 22:08:18 1.1 > 1.2 contrary to what your math teacher might have told you Apr 08 22:08:29 jvrodrigues: it’s a known issue [ https://code.google.com/p/android/issues/detail?id=68530 ] Apr 08 22:09:24 $ ibus-daemon -rd will either fix your issue or freeze your machine completely :D Apr 08 22:10:14 ah Apr 08 22:10:26 treelzebub: any thoughts ? Apr 08 22:10:49 treelzebub, are you some kind of wizard? Apr 08 22:11:15 nah, mate, just a linux user ;) Apr 08 22:11:19 a-r Apr 08 22:11:34 oops.. a-russo: looking through your code now :) Apr 08 22:12:59 a-russo: i’d put some logging in your catch blocks so we can see where exactly things are going wrong Apr 08 22:14:23 i have a breakpoint inside the service, startservice seems to pass :\ Apr 08 22:16:43 still, your catch blocks are empty, so we don’t know if those exceptions are being thrown Apr 08 22:17:40 breakpoint is before catch, may try to put startservice into try catch Apr 08 22:19:39 you have set uses-permission…internet, right? Apr 08 22:19:47 yep Apr 08 22:19:53 shouldn’t have to put startService in a try block Apr 08 22:24:00 a-russo: just debug line by line and see where it goes/break. don't Apr 08 22:24:48 agreed. Apr 08 22:25:57 icedp: thats the problem, goes thru with no errors, but service doesnt fire. ps thnx 4 d alarmservice advice. Apr 08 22:26:25 a-russo: np. goes thru till what line? Apr 08 22:27:36 all the way thru the method in which startservice is Apr 08 22:30:01 a-russo: where's your code with startService? Apr 08 22:31:52 http://pastebin.com/xE64jnUW Apr 08 22:40:20 Hello. I want to implement loading spinner directly into my ImageLoader asynctask class, so it could replace image with spinner onPreExecute and put the image there onPostExecute. However, the only solution SO brought me is to add a progressbar to layout and switch their visibility. I don't want to alter layout, is there a better way to do it only from the loader? Apr 08 22:41:22 a-russo: strange, nothing seems wrong on the first look Apr 08 22:42:32 Anyone move to gradle 1.1.3 and attempt JUnit tests? Apr 08 22:46:00 a-russo: double-check it's not really firing. with a Log.d Apr 08 22:58:29 Anyone knows if it's normal for my database to "update" to a new database in the middle of the app running.. Apr 08 22:59:30 I changed the int from 2 to 3, after adding 1 new field to one of my tables, started the app in debug (on my phone via USB), and it didn't update, but I got the "updating database ..." suddenly after it had been running for 2-3 minutes.. Apr 08 23:07:20 Vercinger: sql update or ? Apr 08 23:07:47 Yep Apr 08 23:08:02 It was the log message that told me it was updating Apr 08 23:10:54 Vercinger: not sure about sqlite internals but updates may be lazy/delayed if nothing else is accessimg the updated table(s) Apr 08 23:11:11 How do i take the text from TextEdit i wrote and put it in TextView on button click ? Apr 08 23:13:01 getText() Apr 08 23:13:03 2 sec Apr 08 23:14:46 String text = editText.getText().toString Apr 08 23:14:50 (); Apr 08 23:15:01 what you were looking for, nightwalkerkg? :) Apr 08 23:15:40 nightwalkerkg: also, this part of the beginner tutorial shows it: https://developer.android.com/training/basics/firstapp/starting-activity.html Apr 08 23:15:45 Yeah, got it already. Apr 08 23:16:03 Thanks. Apr 08 23:16:21 myke - I thought it would execute immediately on startup.. Apr 08 23:19:45 Vercinger: myke update or upgrade? Apr 08 23:20:19 custom video playback is a foober activity Apr 08 23:21:16 Vercinger: onUpdate onCreate are called lazily -- ie the firsttime dbCreateReadable/Writable is called Apr 08 23:21:47 creitve: no Apr 08 23:22:17 its much simpler to use two image views or an imageview and a indeterine progress bar Apr 08 23:22:25 then to swap the imageview functions Apr 08 23:24:00 It was onUpdate.. so if as lasserix says it is just called lazily, then I should expect that.. okay :) Apr 08 23:24:32 Vercinger: you can forceit to do it early by just throwing it into bg thread and calling it from application class oncreate Apr 08 23:30:15 Does anyone know if it is possible to use a custom media controller layout by just implementing some kind of like IMediaController? Apr 08 23:30:16 lasserix: Vercinger what is OnUpdate? Apr 08 23:30:37 It's okay icedp - just wanted to know if it was normal or something.. :) Apr 08 23:31:30 Vercinger, i have this : http://pastebin.com/8Hq6Qwkh . How can i, onButtonClick open another activity and inside it display String rezultat and rezultat2 ? Apr 08 23:31:42 I know onUpgrade, but what onUpdate you keep talking about? Apr 08 23:32:55 nightwalkerkg: Protip You can make buttons as a method of its own if u want to, instead of having it in "on create" and on click listener :) Apr 08 23:33:08 icecube45 Apr 08 23:33:16 icedp: it's onUpgrade, my baddies Apr 08 23:33:59 and nightwalkerkg, this link should actually show you how to pass string to another activity :) https://developer.android.com/training/basics/firstapp/starting-activity.html Apr 08 23:34:54 lasserix: thank you. I already gave in and used the way mentioned previously. Apr 08 23:35:43 Vercinger, ok, thanks Apr 08 23:43:44 have a started service that gets destroyed (onDestroy is called) right after onStartCommand returns. the system does not seem to be in low mem condition Apr 08 23:44:28 and i'd expect onDestroy be called only when the service is explicitly stopped Apr 08 23:46:50 anyone else have issues with google maps and the android api 22 emulator? Apr 08 23:51:20 onStartCommand starts a thread, but as the service is destroyed without an apparent reason, state is lost Apr 08 23:52:22 Anyone got any advice on handling code with multiple states that are fairly non-linear? Apr 08 23:53:38 lasserix: What do you mean? Apr 08 23:54:54 i have a video playback, it has an initial state of just preview (imageview from jpg) with play button. then play buttonis clicked, if ad account, it shows a spinning animation till ad takes over, and the ad plays in its own video view (sandboxed because i have to give up controlof the UI to the ad sdk), Apr 08 23:55:11 a user can click while the spinning animation goes which shows a pause button which sets it back to the initial state Apr 08 23:55:37 once the ad finishes, then it either shows overlay with buffering scrubber / media controller, or if buffering finishes just the video Apr 08 23:55:54 once the video is playing, if the overlay with controls is nto visible, it shows the overlay, otherwise hides the overlay Apr 08 23:56:03 in the overlay it has play.pause toggle button, plus seek Apr 08 23:56:03 bitkiller: it gets killed after onStartCommand? or onHandleIntent? Apr 08 23:56:06 etc etc Apr 08 23:56:20 JesusFreke, onStartCommand Apr 08 23:56:41 it's not every time Apr 08 23:57:05 but what is strange is that onDestroy is called Apr 08 23:57:09 bitkiller: well, the service will normally stop itself after onHandleIntent, unless there is more pending work Apr 08 23:57:46 and TacticalJoke thats not including fullscreen toggle, if the user swips away from that current page of the view player, or hits the home button Apr 08 23:57:57 bitkiller: https://android.googlesource.com/platform/frameworks/base.git/+/master/core/java/android/app/IntentService.java#64 Apr 08 23:58:07 but onHandleIntent is only IntentService no? Apr 08 23:58:13 i'm extending service Apr 08 23:58:25 bitkiller: oh, sorry Apr 08 23:58:39 not sure where I got the idea you were using IntentService :) Apr 09 00:01:18 bitkiller, well, if onDestroy gets called, then it's because you either stopped the service, or unbound the service Apr 09 00:01:49 bitkiller: how are you starting the service? Apr 09 00:02:06 startService Apr 09 00:02:29 lasserix: sound like state machine Apr 09 00:02:38 JakeWharton: think you could help me figure out why pidcat isn't outputting anything? Apr 09 00:02:42 is the app open when it dies? Apr 09 00:02:54 I think it stopped working when I upgraded to 5.1 Apr 09 00:04:04 groxx, should be relatively easy to debug, it's python... Apr 09 00:04:09 groxx, add gratuitous prints Apr 09 00:04:29 * groxx attempts to find the source Apr 09 00:04:42 it's python, you have the source :-p Apr 09 00:05:05 bitkiller: basically, your service may die in a couple different scenarios, either externally you called stopService(), stopSelf(), or you were low on memory and since it is a service, it may be killed Apr 09 00:05:17 bitkiller: so if you need to save state on progress, you need to post it back to the UI thread Apr 09 00:05:47 pfn: yeah, just have to hunt it down :) found, reading, attempting to understand. Apr 09 00:06:15 herriojr, well, but onDestroy would not be called in case of the system killing it, would it? Apr 09 00:07:24 bitkiller, onDestroy will only get called if you stop the service yourself, or started via binding the service and subsequently unbinding Apr 09 00:07:27 lasserix: Is there a way to represent this in an enum, and then use the enum in onSaveInstanceState or whatever? Apr 09 00:07:48 bitkiller: again, if you need to save state, save state while you're running Apr 09 00:08:09 lasserix: so I would draw a state diagram which shows all possible transition and introduce a state variable which is changed by events and method that do what is needed depending on that variable after each change Apr 09 00:08:44 pfn, that's what i always thought, but onDestroy is getting called and i'm not explicitly stopping the service Apr 09 00:09:05 but you are Apr 09 00:09:09 only reason Apr 09 00:10:03 icedp/tactial yeah, the thing is how do you handle view visibility? like assume the flow works (ie you can set something to visible and assume it'll turn off in the right places, or just do a bunch of "if (v.getVisibility() != target) v.setVisibility(target) Apr 09 00:10:31 bitkiller: show us a grep for stopService and stopSelf Apr 09 00:12:39 there's only one stopservice in the app, and it's in the subclass of Thread.UncaughtExceptionHandler, which is not called, as the app is not crashing Apr 09 00:12:46 lasserix: I'd draw a diagram and look at the number of states from which a particular state can be changed to. And it should be seen then for what to check with ifs Apr 09 00:14:08 Hi guys! I added admob to my app, but the ads really suck. based on the kind of app I know that game ads would work best, but how? Apr 09 00:14:21 I can't ask admob to only send game ads Apr 09 00:14:32 do you know any ads company for that? what work best for you? Apr 09 00:16:46 pfn: ;_; the "start proc" message changed in 5.1 or something Apr 09 00:16:52 Mattx: https://developer.android.com/reference/com/google/android/gms/ads/AdRequest.Builder.html#addKeyword%28java.lang.String%29 Apr 09 00:17:41 icedp, I added 10 keywords and none of them have anything to do with ecommerce or travel Apr 09 00:18:05 it seems admob is ignoring my keywords in fact Apr 09 00:19:12 I have a TableLayout with a whole lot of rows etc and I want to show an ImageView above everything (similar to "position: absolute; z-index: 2;" in CSS). How can I achieve this? Apr 09 00:19:33 "Upgrade your zip lock bag", seriously? Apr 09 00:20:16 JakeWharton: ah, looks like you have a fix for the 5.1 'start proc' change already committed. will pull and enjoy. Apr 09 00:20:47 Mattx: you can block ad categories in admob, so you could block all of theme except for games Apr 09 00:21:03 duncannz, no, I only can block 50 categories Apr 09 00:21:11 (there are probably 200 or more) Apr 09 00:21:32 ah I see it says 50 remaining Apr 09 00:21:36 as in you can only block 50 Apr 09 00:21:40 never mind then Apr 09 00:30:14 any other idea guys? Apr 09 00:30:36 I'm looking for another ads site with games or appealing ads *only* Apr 09 00:37:31 one thing i've noticed is that the service is destroyed if startService is called multiple times Apr 09 00:39:26 bitkiller: are you sure you don't have a crash in your service or something? Apr 09 00:39:34 and that you're not calling stopSelf? Apr 09 00:45:04 duncannz: easiest way is to put it later in the XML file. views are drawn in order. Apr 09 00:46:45 groxx: so like ? Apr 09 00:47:00 what I want is absolute positioning, so it's above the TableRows Apr 09 00:47:10 JesusFreke, crash: sure it's not crashing; stopSelf: sure it's not called Apr 09 00:47:30 duncannz: try ... Apr 09 00:47:37 groxx: awesome thanks Apr 09 00:47:57 duncannz: and you can "float" the image view around however you like with gravity, move it away from edges with margin, etc. Apr 09 00:48:06 well, the day is over. thank you all that tried to help me Apr 09 00:48:18 perfect thank you Apr 09 00:59:44 g00s: https://speakerdeck.com/benjchristensen/applying-rxjava-to-existing-applications-at-philly-ete-2015 Apr 09 01:00:20 nice bankai_ thanks Apr 09 01:00:38 no vid yet from what i can see :( Apr 09 01:02:44 yeah i'd like to see the vid, wonder what he's saying around Observable.defer - never used that one Apr 09 01:02:54 don't think i get it either Apr 09 01:07:47 This is good: What's a pirate's least favourite letter? http://www.reddit.com/r/Jokes/comments/31w4s1/whats_a_pirates_least_favourite_letter/ Apr 09 01:07:52 "So how did it go adding reactive to an existing code base?...First attempt took 3 tries.." hahah i'm in that situation now ::) Apr 09 01:08:06 there's also been many "What the ****' moments Apr 09 01:15:47 Good evening all, to those who use android wear (specifically the LG G Watch): Have you noticed with after market watch faces that the first notification comes halfway up the screen while with any of the stock watch faces, the first notification stays in the lower 1/4 or 1/5 of the screen? Apr 09 01:25:43 * g00s wonders how many here use android wear Apr 09 01:27:15 * bankai_ wonders if any of these wearable devices are popular Apr 09 01:29:47 * genex drops head into hand... Apr 09 01:32:38 bankai_ apparently apple is trying to convince people to buy online because they don't want everyone sleeping outside the previous night just so they run out of stock at the store and wind up empty handed heh Apr 09 01:33:13 the android wear numbers were pretty meh, i call them 'channel stuffed' metrics because they weren't even actual sales Apr 09 01:33:17 Totally off-topic, but this is the best unexpected-thug-life I've seen: https://youtu.be/bFQ9NcMIgWU Apr 09 01:34:43 TacticalJoke: I thought your message was completely irrelavent and stupid Apr 09 01:34:48 TacticalJoke: until I watched the video Apr 09 01:34:55 Thats awesome Apr 09 01:35:53 g00s: good to know, thanyou Apr 09 01:35:57 *thank you Apr 09 01:39:20 bankai_ lead time for some of the apple watches is 4-6 weeks Apr 09 01:40:20 the apple watch sport looks pretty nice, but i'll wait to see how it handles getting sweat logged for a while before considering it Apr 09 01:40:53 nobody mentions pebble Apr 09 01:43:18 meh, looks like apple watch has to use the GPS of the phone; makes sense probably being all alimunum Apr 09 01:43:28 not replacing my forerunner any time soon ;) Apr 09 01:44:42 if they wanted, they could have put the antenna in the band close to the body of the watch, maybe first inch, that part on either side is usually facing upwards Apr 09 01:45:24 thats apple watch 2 :D Apr 09 01:48:18 g00s: /me votes for the Apple II Watch instead https://www.youtube.com/watch?v=tCYn9drHx2E Apr 09 01:49:19 haha thats great Apr 09 02:27:37 What is a method for "execute Runnable x 5 times with a 200 ms delay inbetween each execution"? Apr 09 02:28:37 create a handler thread, and post 5 runnables to it using postDelayed, at the times you want them to run Apr 09 02:29:27 or postAtTime Apr 09 02:29:35 Do any of your have a favorite article/tutorial on fragments you sugest? Apr 09 02:29:41 i guess its time i learn them Apr 09 02:30:02 duncannz maybe also look at CountDownTimer Apr 09 02:30:38 g00s: thanks that looks right Apr 09 02:33:38 DadFoundMy: I disliked the official guide. I actually found slidenerd's Fragment videos (on YouTube, which I stumbled upon almost at random) way more informative and entertaining. Apr 09 02:34:01 Not sure how knowledgeable he is; I think they were the only videos of his I watched. Apr 09 02:34:10 TacticalJoke: thanks ill check them out Apr 09 02:34:34 I think this is the first one: https://youtu.be/6GyGtCMoR_U Apr 09 02:34:36 i think i totally have the wrong idea of fragments. i picture them as adding like a different ui element to a screen Apr 09 02:34:40 hehe, slidenerd Apr 09 02:34:49 His accent is brilliant. :D Apr 09 02:34:49 that guy sounds like a goofball Apr 09 02:34:51 but they seem to be for adding more sstuff with space Apr 09 02:35:20 would a screen like this be made with fragments? http://imgur.com/qsawQpj Apr 09 02:35:24 TacticalJoke i thought it was funny too Apr 09 02:39:22 DadFoundMy: Maybe, but AFAIK it doesn't need to be. As far as I know, Fragments were created mainly to facilitate creating tablet UIs. Apr 09 02:40:15 TacticalJoke: i guess i just need to learn how to create more complex ui. My next project im about to start working on may be more work than i originally thought :/ Apr 09 02:40:20 Though I guess they're useful for other stuff, such as ViewPager stuff. Apr 09 02:40:37 DadFoundMy: For what it's worth, some people *never* use Fragments. Apr 09 02:40:51 You don't need them for a complex UI. (Though I personally think they're sometimes useful.) Apr 09 02:41:17 Wait, they almost never do. I guess they might use PreferenceFragment or something. Apr 09 02:41:49 What is the next project? Apr 09 02:42:07 If you can say. **** ENDING LOGGING AT Thu Apr 09 02:59:58 2015