**** BEGIN LOGGING AT Sat Jun 20 02:59:58 2015 Jun 20 03:10:10 Odaym: use android:listSelector="@android:color/transparent" Jun 20 03:10:21 ahhh yea, true Jun 20 03:10:23 Odaym: its all because your using ListView.. Jun 20 03:10:39 I did that before but it made no selector at all because I hadnt provided such a drawable Jun 20 03:10:41 let me see one sec Jun 20 03:10:58 Odaym: are you using the onItemClickListener for the ListView? Jun 20 03:11:06 yes Jun 20 03:11:12 thats another problem then Jun 20 03:11:25 you'll need a click listener on each view if you want the ripples to work Jun 20 03:11:25 well its a..perfectly valid use case! Jun 20 03:11:32 its all problems caused by ListView Jun 20 03:13:57 worked just fine with transparent listselector color Jun 20 03:14:05 shouldve known, I tried this before Jun 20 03:14:24 but your drawable wasnt right Jun 20 03:14:28 it is Jun 20 03:14:31 now Jun 20 03:14:32 :P Jun 20 03:14:44 haha Jun 20 03:14:47 also you'll notice the ripples do not ripple out from where you touch now Jun 20 03:14:54 that whole chunk of course would not have solved anything if no proper drawable Jun 20 03:14:55 of course Jun 20 03:15:02 yes they do Jun 20 03:15:14 well a little to the left actually Jun 20 03:15:31 nope, its just right Jun 20 03:15:40 no they dont Jun 20 03:15:41 :P Jun 20 03:15:49 if you use the item click listener they dont Jun 20 03:15:52 but im looking at it.. Jun 20 03:15:53 trust me on that Jun 20 03:15:54 lol Jun 20 03:16:01 you see a ripple from the center Jun 20 03:16:08 I see where my finger landed.. Jun 20 03:16:10 g00s: I've tried rewriting it to connect with the 'spiritual-minded' http://pastebin.com/MufaKxkx Jun 20 03:16:12 even at the far right Jun 20 03:16:13 still think its trash Jun 20 03:16:14 then you dont use the item click listener Jun 20 03:16:19 you use your own click listener on top Jun 20 03:16:29 desmin88 i'd ask them for a description Jun 20 03:16:34 sure do Jun 20 03:16:41 huh? Jun 20 03:16:45 listView.setOnItemClickListener ... Jun 20 03:16:48 yeah i did Jun 20 03:16:54 this is the drag list view right? Jun 20 03:16:59 yes Jun 20 03:17:04 that is setting a click listener then Jun 20 03:17:09 nice Jun 20 03:17:13 so it overrides the onItem Jun 20 03:17:20 must be Jun 20 03:17:22 return true Jun 20 03:17:23 desmin88 that isn't bad (what i just read) Jun 20 03:17:24 only way that can happen Jun 20 03:17:24 does its own thing Jun 20 03:17:44 thanks! Jun 20 03:17:53 well thanks for sticking it out Napalm Jun 20 03:18:07 issue since June 2 Jun 20 03:18:14 "Search for posts on any topic you would like, you are able to [...]" is a comma splice. Jun 20 03:18:22 but went back and forth a lot with it and then later saw that link I showed you by mistake Jun 20 03:19:05 And "helps your strengthen" has a typo. Jun 20 03:19:15 TacticalJoke: yeah that part is awkward but i was trying not to 'and' to much Jun 20 03:21:23 You can use a colon, dash, or semicolon there. This is the colon version: "Search for posts on any topic you would like: you can read and share your thoughts with thousands around the world" Jun 20 03:22:57 A comma is a mistake, but for some reason it's a common mistake nowadays. Jun 20 03:23:28 The comma in the previous sentence isn't so bad as it's a list of two items. Jun 20 03:23:41 well good thing im still drafting the description Jun 20 03:24:13 my favorite thing is the semi colon list of items Jun 20 03:24:19 Yeah, I like that. Jun 20 03:35:18 Q: "Experienced developers -- what is your biggest regret?" A: "use version control" Jun 20 03:35:19 Wat. Jun 20 03:35:39 I wish I could test my glassware without having to put on the physical hardware Jun 20 03:35:56 TacticalJoke: that reddit comment confused me as well Jun 20 03:36:23 I mean, I get it, but who is srsly not using version control. Jun 20 03:51:28 well, gn! Jun 20 04:28:41 yeah thats funny, if you aren't using VC you aren't experienced :P Jun 20 04:36:44 interesting, DxO came out with a camera, 1" sensor, but attaches to iphone Jun 20 04:37:40 ugh $600 Jun 20 04:48:59 * wakelock is happily not using version control Jun 20 04:49:59 I'm only ever using github for ease of publishing/download, if I even want it public Jun 20 04:52:06 * g00s guessing wakelock is also happily not backing up his system :D Jun 20 04:52:44 actually I am, all my systems, in a few copies Jun 20 04:52:46 wakelock: bintray would be better for that, but you should really, really look into source control Jun 20 04:52:58 did a full backup just a week ago Jun 20 04:53:06 It's not about backup Jun 20 04:53:19 if anything, VC lets me 'not be blocked'. i can put down something if stalled and work on something else Jun 20 04:53:29 CedricBeust, I *am* using version control at work ;) Jun 20 04:53:32 You can be one of the rare software developers who won't learn this lesson the hard way Jun 20 04:53:37 android is not my work Jun 20 04:54:12 g00s, I use rsync and my home server for that :p Jun 20 04:54:18 well, ide all some form of rudimentary history Jun 20 04:54:29 If you write code, use source control, period. Doesn't matter what kind of code it is Jun 20 04:54:43 so version control isn't absolutely necessary for the hobbiest Jun 20 04:54:52 CedricBeust, dully noted ;) Jun 20 04:55:07 hobbyist Jun 20 04:55:15 yeah, but branches are still <3 even when working solo Jun 20 04:55:36 I mostly hate branches Jun 20 04:55:52 though I'd probably like something like Etherpad for code Jun 20 04:58:26 one thing i wish though is if git could let me switch branches without stashing or half baked commits Jun 20 04:58:37 when working copy is dirty Jun 20 04:58:48 i think thats the only thing i liked about clearcase :D Jun 20 04:59:57 g00s: you can, I forget the proceedure, though. Jun 20 05:00:09 its...not intuative. probably because they consider it a "bad idea" Jun 20 05:00:19 I mean I'm just saying. TJ apparently can't even imagine successful development without VC, I say it's fully and completely possible. Jun 20 05:00:21 #git should know. Jun 20 05:00:43 Textmode yeah maybe i'll ask them sometime Jun 20 05:01:00 probably involves commit, and then resetting O.o Jun 20 05:01:20 I think its some god-forsaken set of flags, actually. Jun 20 05:01:47 in some cases and for some people, VC is just more hassle than it's worth Jun 20 05:02:05 wakelock i can't either. without VC, there is no easy way to put things down, branch, and experiment ... Jun 20 05:02:36 gah i guess you can copy your project to another location and fusge with it there Jun 20 05:03:29 just depends on what you're used to Jun 20 05:03:35 but often i ask, hmm, what happens if we go this direction. make a refactor, change, whatever - and it doesn't pan out. delete branch Jun 20 05:04:28 otoh, svn sucked enough i stopped using it (before git) Jun 20 05:04:40 tbf, thats the recommended workflow, branch and drop if it doesn't work out. Jun 20 05:04:41 i think there is a tool that could fit your workflow nicely :) Jun 20 05:04:44 I pretty much never have more than 2-3 copies of a project - stable/release, development/experimental, and maybe some intermediary Jun 20 05:05:00 g00s, easy, create a wip branch Jun 20 05:05:04 delete when done Jun 20 05:05:28 pfn yeah thats what i do. i can't imagine not being able to branch & experiment Jun 20 05:05:36 wakelock, vc never more hasslr Jun 20 05:05:58 git init and commit periodically Jun 20 05:06:01 no hassle Jun 20 05:06:48 anyone used hg before? Jun 20 05:06:59 wakelock tacticaljoke does, he likes it Jun 20 05:07:22 I thought he's just another git devotee Jun 20 05:07:26 i thought a few weeks ago was reading google & fb were migrating to it Jun 20 05:07:29 g00s: git lets you do that unless switching branch will make you lose work. Surely you don't want that Jun 20 05:08:44 Very much doubt fb would switch to hg, especially at their scale Jun 20 05:09:01 CedricBeust yeah .. maybe i just not smart enough, but seems like it auto merges dirty bits into new branch. which can result in merge conflicts, that i never wanted to deal with Jun 20 05:09:33 knowing fb it won't be hg but a heavily modified something that will have its own name Jun 20 05:09:42 if it even happens that is Jun 20 05:10:19 CedricBeust https://code.facebook.com/posts/218678814984400/scaling-mercurial-at-facebook/ Jun 20 05:11:06 from what i read google and fb are investing heavily (resources) to hg dev Jun 20 05:11:17 Well, I stand corrected. What a bizarre decision. Jun 20 05:11:48 i'm happy with git. maybe i'll try hg someday Jun 20 05:12:05 Trying to make your infrastructure scale and choosing a software written in Python instead of one written in C... Jun 20 05:12:13 i decided git because thats the most popular one, i thought if i worked on a team it would be safe bet ;) Jun 20 05:12:31 Definitely a safe choice, Mercurial has lost that war Jun 20 05:12:38 CedricBeust maybe the algorithms > language Jun 20 05:12:43 but it's like FB likes to choose hard paths just for the fun of it Jun 20 05:12:50 see their recent crazy Android optimizations Jun 20 05:13:21 Nah, git is way, way faster than hg, and it's obviously proportional to the size of your code base Jun 20 05:13:41 CedricBeust, which opts? Jun 20 05:13:54 CedricBeust how do they compare storing binary blobs ? (space efficiency) Jun 20 05:14:06 The crazy things they did by calling direct offsets in native libs, etc... Let me see if I can dig it out Jun 20 05:14:12 CedricBeust, the device year lib? Jun 20 05:14:21 CedricBeust, that's not recent Jun 20 05:14:26 i thought git was going to improve that , but it would require making a change to the otherwise elegant object model Jun 20 05:14:37 CedricBeust, that's the linear alloc workaround for 2.x Jun 20 05:14:38 No, Fresco Jun 20 05:14:46 pinning images in ashmem, ... Jun 20 05:15:05 actually that's just the latest, they have been doing others for a while, related to dex limit too Jun 20 05:17:00 well they did their own phone :) ... weren't they thinking one time of making their own OS ? Jun 20 05:17:12 probably android based of course Jun 20 05:17:17 hi Jun 20 05:17:25 can I make a question on Facebook SDK? Jun 20 05:22:08 Facebook employs some extremely intelligent people, but they seem to primarily be working to make their horde of mediocres able to build an OK product without accidentally imploding too much. which is an amazing feat, but it seems like a waste at times :| Jun 20 05:26:00 Gandalf84: you might get someone who knows, yeah :) but just ask, it might trigger someone's highlights. asking about asking pretty much never does. Jun 20 05:26:50 I’ve followed all the steps for let it work….Using a wrong key hash, when i click on the button a view is displayed saying there is a mismatch Jun 20 05:27:04 using the correct key hash, clicking on the button, nothing happen Jun 20 05:27:18 I see the animation of the loading….then it ends Jun 20 05:27:20 nothing happen Jun 20 05:27:29 IRC rule in general: you're not dealing with experts in all things X, you're dealing with 100 people who all know different bits of X. Jun 20 05:28:05 Gandalf84: for... logging in? Jun 20 05:28:14 yes Jun 20 05:28:17 Login button Jun 20 05:31:43 Gandalf84: make sure you've done everything on https://developers.facebook.com/docs/android/getting-started#login_share - individual pieces are sometimes easy to miss. Jun 20 05:32:24 checked 2 times…. Jun 20 05:32:29 what I’ve notived is Jun 20 05:32:51 if I remove the theme part….I see after the loading animation the new windows open and than suddenly close itself Jun 20 05:36:22 not sure :/ their instructions tend to be accurate, but it has changed since I've done fb integration work Jun 20 05:42:07 wtf, i just went to click on stats in the dev console ... Jun 20 05:42:12 and i get "You do not have the rights to perform the requested action." Jun 20 05:49:21 CedricBeust i found that blog on hg Jun 20 05:49:26 http://gregoryszorc.com/blog/2015/03/28/notes-from-facebook%27s-developer-infrastructure-at-scale-f8-talk/ Jun 20 05:49:44 Quote from Google: "We're excited about the work Facebook is doing with Mercurial and glad to be collaborating with Facebook on Mercurial development. Jun 20 05:54:02 that seems really weirdly phrased. Jun 20 05:54:14 I/ActivityManager﹕ START u0 {act=SSO_WITH_FALLBACK cmp=com.my.myapp/com.facebook.FacebookActivity (has extras)} from uid 10127 on display 0 Jun 20 05:55:04 I/ActivityManager﹕ Displayed com.my.myapp/com.facebook.FacebookActivity: +270ms Jun 20 05:55:32 I/Timeline﹕ Timeline: Activity_windows_visible id: ActivityRecord{3575fd30 u0 com.my.myapp/com.facebook.FacebookActivity t565} time:122652316 Jun 20 06:06:52 interesting ... http://techcrunch.com/2015/06/18/report-last-year-google-secretly-acquired-agawi-a-specialist-in-streaming-native-mobile-apps Jun 20 06:07:05 not sure i quite understand how this works though Jun 20 06:07:53 'Android servers running in the cloud' .. Jun 20 06:09:04 I'm just waiting for cloud servers to run on your Android. Jun 20 06:12:23 i've always had that feeling, that whatever happens to android, chrome, the web is google's platform ... and native apps aren't the future with them Jun 20 06:12:42 a) remember Amazon's (now shuttered) service for trying apps on the web before you bought them? Jun 20 06:13:22 b) remember that Google is doing more and more scanning of apps before they get published? Jun 20 06:14:37 c) remember that ps4 (I think) allows you to play games before they're 100% downloaded? Jun 20 06:22:55 d) remember that rabbit, the one with the pancake on its head? Jun 20 06:31:02 groxx lol http://dailydoseofcute.net/wp-content/uploads/pancake-bunny1.jpg Jun 20 06:37:02 I have a question regarding the API level necessary to work with the SDK. If I choose only to install API level 22, that is Android 5.1.x, would I be able to do proper testing on Android devices that run lower APIs and platforms like Android JellyBean/4.x provided that I don't use features exclusive to the current API that I'm using being Android 5.1.x? Jun 20 06:38:36 woohoo, personal ramen control http://digg.com/video/theres-something-suspicious-about-this-ramen-making-machine Jun 20 06:39:00 whoa, digg link? Jun 20 06:39:02 grabbizle: yes Jun 20 06:39:17 desmin88: Alright thank you! Jun 20 06:39:27 Happy fathers day to the fathers here btw. Jun 20 06:59:10 How does the screen height qualifer work? Trying to get three separate xml file for height <400, >= 400 && <720, and >720 Jun 20 07:13:45 Also, say for example I have dimens-v21 and dimens-h720dp. My current device is both of these, what happens then Jun 20 07:16:22 did i read in one of your blog posts you prefix interfaces with 'I' ? Jun 20 07:16:25 CedricBeust ^^ Jun 20 08:13:00 hey anyone know how to go about this issue http://stackoverflow.com/questions/30951794/issues-with-a-tagging-system-using-autocomplete-android Jun 20 08:13:23 I am trying to make something similar to facebook;s search where they show suggestion based on letters Jun 20 08:20:21 How do I see in ADB every intent called? I did it something like a year ago but can't find it again. Jun 20 08:27:40 should be shown in the logcat if you dont have a filter Jun 20 08:32:18 START u0 {flg=0x14000000 cmp=com.google.android.music/com.android.music.activitymanagement.TopLevelActivity (has extras)} from uid 10078 on display 0 Jun 20 08:32:30 so google now hardcoded play music? Jun 20 08:34:10 If I uninstalls Play Music and Youtube it says "No music app installed" Jun 20 08:42:29 http://stackoverflow.com/questions/30937370/play-song-on-default-music-player-android Jun 20 09:43:12 I have a two tabbed activity, that has two fragments associated, when I click on a tab the fragment shows the correct items with the userId being passed through, however on initial load, of the activity the tab does not have the userId passed in and therefore nothing is grabbed from the server, if I try to pass the userId through the interface on initial load I keep getting null pointer on the sharedPreferences, even if I d Jun 20 09:43:12 o create a new sharedprefrenece in the passed interface for the userId Jun 20 09:43:42 bam! I'm back Jun 20 09:43:53 what is happening? Jun 20 09:45:21 apple bankrupt Jun 20 09:45:54 dream on :) Jun 20 09:46:20 * JFlash is (nearly) bankrupt Jun 20 09:46:39 save on food by taking longer naps Jun 20 09:47:16 good advice, I have actually done that in my life a few times Jun 20 09:48:02 you can find a plenty of food in nature, this time of the year Jun 20 09:48:08 food is not so expensive if you can cook thou. but I can't Jun 20 09:48:25 -a Jun 20 09:48:31 how do i get link for review when i code my apk? Jun 20 09:48:32 hi Jun 20 09:48:33 then eat raw food Jun 20 09:48:40 sushi Jun 20 09:48:58 I live in one of the 5 largest cities in the world. so there's no much nature around me right now Jun 20 09:49:00 and steak tartare Jun 20 09:49:07 central park Jun 20 09:49:50 ah, rio Jun 20 09:49:59 ocean. fish Jun 20 09:50:00 Sao Paulo, actually Jun 20 09:50:02 ok Jun 20 09:50:18 still, ocean, fish Jun 20 09:50:53 JFlash, our U21 guys just beat your guys Jun 20 09:50:58 we are the world champions Jun 20 09:51:16 http://www.espnfc.com/u-20-world-cup/match/421190/brazil-u20-serbia-u20/report Jun 20 09:51:26 congratz, i dont follow sports thou. which sport is that? Jun 20 09:51:39 football Jun 20 09:51:46 only the greatest sport in brazil Jun 20 09:51:51 some call it: soccer Jun 20 09:51:53 i'm prolly the only brazilian who doesnt follow football. Jun 20 09:51:56 heh Jun 20 09:52:06 this is guys 20yo or younger Jun 20 09:52:17 i see Jun 20 09:52:22 if only their older counterparts played that way Jun 20 09:52:43 yeah serbians are good, I been told Jun 20 09:52:51 http://stackoverflow.com/questions/30952620/nullpointer-exception-on-tabs-in-activity this is the code and issue and error Jun 20 09:53:30 Sculptor, do you android for a living? Jun 20 09:53:39 dev* Jun 20 09:53:39 JFlash, pele has chosen to play his last game vs yugoslavia Jun 20 09:53:42 JFlash, nah Jun 20 09:54:10 luckily, or i'd starve to death Jun 20 09:54:13 interesting, i did not know that. you seem to be a soccer buff Jun 20 09:54:24 nah, i don't like football very much Jun 20 09:54:25 http://pastebin.com/RVEqGajQ Jun 20 09:54:39 I'm starting on my first Android job on monday, so I'm very excited Jun 20 09:54:39 That is the issue I am having in terms of null pointer exception Jun 20 09:54:49 you know what comes to my mind when i hear 'brazil'? lua Jun 20 09:54:53 congrats Jun 20 09:55:44 Lonesoldier728, I'm reading it, but I'm a newbie Jun 20 09:56:26 yeah lua is nice. played with it for a few weeks earlier this year Jun 20 09:56:50 it's actually used in a few mobile frameworks Jun 20 09:57:15 it's heavily used as a scripting language in a games Jun 20 09:57:19 Corona SDK, Gideros Mobile and Love2D, to name a few Jun 20 10:00:19 ohai Jun 20 10:00:23 Lonesoldier728, but the error is on the isTest method of the SessionManager, no? Jun 20 10:01:28 JFlash, today coding jobs are easy, when you have #android-dev, google and stack overflow Jun 20 10:02:20 yes, there's a lot of info out there indeed Jun 20 10:02:38 but the amount of complexity has increased a lot, too Jun 20 10:03:22 also the fact that more ppl have access to the knowledge increases the supply, which affects market prices Jun 20 10:03:38 so it's a moving target Jun 20 10:04:53 Also the demand for Android is increasing, which affects market prices. Jun 20 10:07:40 For someone like me, who is just coming into the Android platform , the fact that I have to learn most of what has been released in the past at the same time that I have to cope with what is being released now, it's almost a unsurmountable task Jun 20 10:09:03 my new boss told me that around here it's harder to find android ppl than ios ppl Jun 20 10:09:15 is this true where you guys are? Jun 20 10:13:19 do you guys use communication libs such as EventBus and Otto? Jun 20 10:13:25 yes Jun 20 10:13:45 can they be a replacement for startActivityForResult? Jun 20 10:14:10 omg Jun 20 10:14:34 JFlash: its really simple.. if you have to do two way communication an event bus is not for you Jun 20 10:14:40 so no, you shouldnt be Jun 20 10:15:00 hmm Jun 20 10:15:16 why do you ask? what are you doing? Jun 20 10:15:27 is startActivityForResult necessarely a 2 way comm scenario? Jun 20 10:15:54 you are asking for a result Jun 20 10:16:04 not doing anything specific, trying to get a sense of what stuff I need and need not learn. Jun 20 10:16:21 O.o Jun 20 10:16:44 well you need to learn everything Jun 20 10:16:48 yes you are asking for a result but you may not be passing params to the activity you are starting Jun 20 10:16:52 the real question is what order to learn it in Jun 20 10:17:53 Napalm, yes eventually but I can't do it all at once, so I need o prioritize Jun 20 10:18:38 Napalm, there are more than one way to skin a cat, so when you are sort of time, you may learn one and skip the others for a while Jun 20 10:18:52 short* on time Jun 20 10:19:46 see my problem is that, comming into the platform late... Jun 20 10:20:18 ... it's hard for me to have a picture of what is the best choice right now vs what has been the best choice in the past Jun 20 10:21:00 so it happens that you spend a lot of time learning stuff that you later found out few ppl are using just because something simpler and better came along Jun 20 10:21:33 Learn what you actually need for your project then. Jun 20 10:22:13 good point but I don't have a project yet. I'm starting on Monday Jun 20 10:22:39 this kind of stuff is useful for virtually evry project thou Jun 20 10:23:45 do you guys happen to know any open source app that I download and read thru the code? Jun 20 10:24:48 I already found out about the Series Guide which is a super awesome open source app Jun 20 10:27:54 How can I change the language of a project in Android Studio such that typo errors are not falsely detected? In Preferences, Editor, Inspections, Spelling, Typo I can only enable or disable this inspection. How can I change the language? Jun 20 10:37:08 You don't write comments in english? O.o Jun 20 10:42:12 lol how can you trust the internet these days Jun 20 10:42:52 all sites are reporting that about a dramatic episode of a parachutist saving a friend whose parachute did not open Jun 20 10:43:32 but then on youtube you can clearly see that what happen was a collision and they got entangled Jun 20 10:43:40 Mavrik: It also marks typos in class names. Jun 20 10:44:33 And if the customer is non-English it might be helpful for them to have native names? Maybe something to think about, though. Jun 20 10:46:56 barq, i disabled spell check entirely, but you have options for "process code, literals and comments". Just type "spell" in search box of settings and find that Jun 20 10:47:55 JFlash yeah but the isTest is fine the error is station that the session is null Jun 20 10:47:55 Thanks. Jun 20 10:48:23 http://pastebin.com/RVEqGajQ Anyone else have a clue why if I set session it still shows up as null Jun 20 10:49:58 how can i redraw layout after returning back to main activity from child activity? if orientation changes into child activity, main activity drawer not appers in the correct way (it seems open also if it is closed: may be it keeps position of original orientation) Jun 20 10:50:32 invalidate() and requestLayout() into resume not works Jun 20 10:50:53 barq, pretty much every project out there that didn't have strict english-language requirement I've seen had huge reasons to regret it :) Jun 20 10:50:58 Lonesoldier728, your error is in "isTest" with sharedpref, you did not show us its code Jun 20 10:51:18 Mavrik, even with english, you can get annoying typo warning Jun 20 10:51:42 that's true Jun 20 10:51:48 (we have it disabled) Jun 20 10:51:48 Lonesoldier728, too many lines, point me to the exact line there Jun 20 10:51:56 i wrote fully in english, it was so annoying i disabled entirely the thing (and it saves some cpu lol) Jun 20 10:52:31 http://pastebin.com/mVACAzhz there the is test Jun 20 10:53:29 Lonesoldier728, pref is null, you have to initialize it prior to using it Jun 20 10:54:08 how so... I am initializing it with the constructor... Jun 20 10:54:20 it seems it is skipped, maybe when context is null Jun 20 10:54:22 lol, there are 14 calls to passDataToFrament there! Jun 20 10:54:32 14 calls ??? Jun 20 10:55:30 ah ok, pastebin doubles it Jun 20 10:55:36 Lonesoldier728, debug your constructor or add some log to understand what is happening and why the initialization of pref is bypassed Jun 20 10:55:43 so actually it's more like 6 calls Jun 20 10:56:54 well I just took out the != null Jun 20 10:57:05 and apparently the context is coming back as null does that make sense Jun 20 10:57:08 that's should fail too, since context was null Jun 20 10:57:21 dammit you are only creating the pref inside an IF Jun 20 10:57:23 lol Jun 20 10:57:26 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference Jun 20 10:57:33 and you have no else with a trace Jun 20 10:57:36 dude Jun 20 10:58:00 sorry to say that, but you gotta work on those debugging skills :P Jun 20 10:58:18 trace = Log Jun 20 10:58:21 I remember that is why I added the != null because I kept having the context passed in as null... Jun 20 10:59:25 hi all, I have a few questions about the Android UI stack. Jun 20 10:59:36 varad, me too Jun 20 10:59:42 you're almost there Lonesoldier728, you just need to understand what is a context (there are different contexts, applicationContext, activity context, etc), when the context is valid, and when to pass it to initialize your sharedpref Jun 20 11:00:02 it's up to you now, good luck Jun 20 11:00:20 I see that there is a Canvas.cpp that's a wrapper over SkCanvas, and there is the hw accelerated android_view_GLES20Canvas.cpp. An app can decide if it wants hw acceleration with a manifest flag. Jun 20 11:00:28 JFlash: cool :) Jun 20 11:00:39 Is there a way I can force pick the GLES canvas during boot and have all my views drawn without involving skia? Specifically, I want android.ui to use GLES. Jun 20 11:00:56 I have USE_OPENGL_RENDERER defined, but UI still seems to go through SkCanvas::draw*() layer. Jun 20 11:01:31 ouch. this low level talk makes me shiver Jun 20 11:02:36 JFlash: been stuck at skia segfaulting during drawPaint(), want to see if I can avoid it entirely Jun 20 11:02:38 varad. no you cant force a view to be hardware rendered Jun 20 11:02:39 i think the most low level I can go in app development is instanciate a ViewPager. :D Jun 20 11:02:55 varad. they always have an option to go use software for backwards compatibility Jun 20 11:03:12 the real question is.. why are yo trying to do this Jun 20 11:03:19 what exactly is the problem you are tryin to solve Jun 20 11:04:06 varad, Napalm always try to get into your mind and make you see your own true soul Jun 20 11:04:49 * Napalm shrugs and says, "its just the way of things" Jun 20 11:05:48 Napalm: Skia throws http://fpaste.org/233474/14346184/ while boot. I assume it's a bad bitmap being passed around. Jun 20 11:07:34 where does bitmap creation take memory from? Jun 20 11:07:44 is it gralloced? Jun 20 11:11:15 yeah adq trying to figure it out but I am confused what I am doing wrong exactly... am I not passing getActivity() in correctly? Jun 20 11:11:52 varad: gralloc i believe is now used for graphics allocations.. but I believe they are gfx hardware backed memory mapped blocks Jun 20 11:12:12 varad: check the process memory map where the crash occured Jun 20 11:12:21 it could be an alignment issue Jun 20 11:12:45 varad: I assume you are compiling AOSP yourself? Jun 20 11:13:22 varad: still with me? Jun 20 11:13:23 Napalm: yes, I am Jun 20 11:13:29 "skia (android-4.4.4_r2) with kitkat-x86 (armv7-a-neon) on ifc6410" Jun 20 11:13:49 i am to get this right.. you have compiled kitkat-x86 and running it on armv7-neon? Jun 20 11:13:50 lol Jun 20 11:13:58 please tell me I am wrong Jun 20 11:14:15 yeah, an arm config Jun 20 11:14:51 well what makes you think code design for x86 will run on arm? Jun 20 11:15:03 libc's memset/memcpy use emit assembler code for x86 Jun 20 11:15:13 for it to run this far you must be compiling for arm Jun 20 11:15:21 but who knows what has its wires crossed Jun 20 11:15:34 yeah, I was referring to the branch 'kitkat-x86' Jun 20 11:15:47 compiled with aosp_arm-eng lunch combo :) Jun 20 11:15:50 ah, but same difference Jun 20 11:16:03 what happens if a makefile has parameters someplace to force x86 Jun 20 11:16:06 just saying Jun 20 11:16:19 well Jun 20 11:16:30 hmm, right. could be a possibility Jun 20 11:16:42 back to my point.. if your compiling this for some hardware I would assume this is a config issue Jun 20 11:17:02 this is probably the first time __memset_large_copy has been called Jun 20 11:17:55 I see. I'll check if this is the case. Jun 20 11:18:11 http://stackoverflow.com/questions/30953358/null-pointer-error-on-context-when-calling-sharedpref-from-fragment Jun 20 11:18:23 Confused what I am doing wrong exactly with the context Jun 20 11:18:33 Napalm: but the same happens with using skia's portable memset() Jun 20 11:19:05 varad: that or, some native code has allocated a AndroidBitmap and has freed it and some other code is trying to use it. Jun 20 11:19:15 varad: this i doubt since I assume you know this branch works. Jun 20 11:19:51 varad: since other people have compiled this branch and have it working.. I would presume that its your config or hardware that makes the difference here and not the original code. Jun 20 11:20:41 Lonesoldier728: t c.c.modular.SessionManager.(SessionManager.java:68) < this is not your constructor Jun 20 11:20:53 Napalm: hmm, alright Jun 20 11:20:57 thanks :) Jun 20 11:21:44 ah ok, then my initialization Jun 20 11:21:46 Lonesoldier728: someplace in private variables you have something = _context.getSharedPreferences(... Jun 20 11:22:43 ok... not sure I understand Jun 20 11:22:46 getActivity returns null because the Fragment has not been attached to an Activity Jun 20 11:22:53 Remember fragment transactions are async Jun 20 11:23:21 that too Jun 20 11:23:36 ah, then how do they attach... because when switching tabs getActivity is not null anymore Jun 20 11:23:43 :| Jun 20 11:23:47 lol Jun 20 11:23:53 sorry a newbie : / Jun 20 11:28:23 varad: hey Jun 20 11:34:33 If I have an AsyncTask which loads some data from the web, is it bad to update the UI in onProgressUpdate? I am having some concurrency problems that the UI sometimes does not update properly and I think this might be the reason. The docs say the timing of execution for onProgressUpdate is undefined. I guess this means I should move that code to onPostExecute instead. Is that right? Jun 20 11:37:40 Or is it more likely the error is arising from calling executeOnExecutor, since the order is not defined here? Jun 20 11:40:55 SimonVT can you help explain how I can attach it, I see some things on fragmentManager but it supports for fragments of libv4 and I am not using those type Jun 20 11:42:36 barq, define concurrency problems Jun 20 11:45:04 JFlash: I select an entry from a list in Activity A. Activity B is then started, does a getRequest for that entry and updates the UI. Sometimes the UI updates, sometimes it does not. Jun 20 11:46:19 does the lifetime state of activity a change in the process? Jun 20 11:46:53 cause one limitation of asynctask is that it's execution is tied to the lifecycle of your activity Jun 20 11:47:08 JFlash: The AsyncTask is triggered by onCreate from ActivityB. Jun 20 11:47:59 but the execution itself works flawlessly and the problem is only on the update Jun 20 11:48:08 or both can fail Jun 20 11:48:28 The executions runs fine, the problem is the update, yes. Jun 20 11:48:56 but which ui are u updateing, a or b? Jun 20 11:49:17 B Jun 20 11:49:36 and what ui update are you ref to. a progress bar? Jun 20 11:50:33 A bunch of Views are set to the values retrieved from the get Request in the AsyncTask. Jun 20 11:52:25 hm.. so you are making multiple requests or what.. I don't really get why you do it on the progress handler Jun 20 11:53:05 also, the progress handler always get called as expected but fails to update the view or it doesnt get called as it should Jun 20 11:53:27 JFlash: Maybe it is the wrong approach. I am debugging code someone else wrote. Jun 20 11:53:38 I think it is a timing problem. Jun 20 11:53:52 The updateUI is called from onProgressUpdate, which I think can lead to problems. Jun 20 11:54:01 And should maybe be done in onPostExecute instead. Jun 20 11:54:13 Also, executeOnExecutor is used, which might be a source of bugs. Jun 20 11:54:57 How would you do this if not using a progress handler? Jun 20 11:55:06 im' not familiar with executeOnExector. what sick mind would create such a method name in the first place? Jun 20 11:55:21 AOSP Jun 20 11:55:37 the whole point of onProgressUpdate is that it runs on main thread Jun 20 11:55:40 and you can update UI Jun 20 11:55:49 http://developer.android.com/reference/android/os/AsyncTask.html#executeOnExecutor%28java.util.concurrent.Executor,%20Params...%29 Jun 20 11:55:58 barq, i dont know because it would depend on what data is being loaded etc. it's a case by case scenario Jun 20 11:56:03 So doInBackground has definitely completed by then? Jun 20 11:56:20 also, I'm a newbie, so, teoretically you should not even be asking me Jun 20 11:56:20 by when_ Jun 20 11:56:25 ? Jun 20 11:56:25 A bunch of Strings are loaded, nothing fancy. Jun 20 11:56:51 By the time onProgressUpdate is called Jun 20 11:57:12 of course not, the point of onProgressUpdate is to update progress WHILE the doInBackground code is running Jun 20 11:57:14 that's a possibility, who knows Jun 20 11:57:26 That's waht I thought. Jun 20 11:57:36 So instead I would want to update the UI in onPostExecute. Jun 20 11:57:40 barq, the onProgressUpdate is triggered by "publishProgress" from doInBackground Jun 20 11:57:44 yeah, maybe, I would not know, sorry Jun 20 11:57:47 and the whole point of it is Jun 20 11:57:58 that you can update UI while the task is running and update progress bars or whatnot Jun 20 11:58:40 OK, so progress bars is one thing, but partially updating the entries such as strings displayed in Views is then probably not good practice. Jun 20 11:58:45 doesnt look like something u'd even use in such case, but still, hard to tell without knowing what you are doing Jun 20 11:59:38 I should pass the result of the doInBackground back to the Activity, that would make sure the whole things completes, rather than using Progress. Jun 20 12:01:48 barq, I'm just not sure where executors come into play in your code Jun 20 12:01:54 seems like bad mixing of abstractions Jun 20 12:02:13 What do you mean by executors exactly? The AsyncTask? Jun 20 12:02:21 how can I put a FragmentActivity into an Activity? Jun 20 12:03:53 Mavrik: This is what I am doing to trigger the AsyncTask: http://pastie.org/private/7xq4tnciplodpifngfbzg Jun 20 12:05:40 Also, executeOnExecutor is used, which might be a source of bugs. Jun 20 12:05:55 Yes. Jun 20 12:06:08 So use execute for any API version then? Jun 20 12:07:00 No, that's fine. Jun 20 12:07:10 executeOnExecutor is fine? Jun 20 12:09:04 can a FragmentActivity work with an Activity? or I should choose one or the other? Jun 20 12:10:45 So what is the best way to get the result of my AsyncTask back to the Activity? I had http://pastie.org/private/ua51ahlrmvrhnkpmz6pqw calling Activity.updateUI, but if I move to onPostExecute should I use the same or get the result to the activity differently? Mavrik Jun 20 12:18:33 It works now. Thank you. Jun 20 12:18:47 ProgressBar takes a little longer, but the result is displayed every time. Jun 20 12:25:59 Gandalf84, FragmentActivity is a replacement for activity. Jun 20 12:26:20 is it possible to use the NDK makefile scripts outside the NDK? or is there some other make framework similar to it? Jun 20 13:09:45 The update dialog of Android Studio says that the latest beta 1.3 is not compatible with Kotlin. Is it completely unusable with Kotlin or is there just some bug? Does anyone what is the issue that makes it incompatible. Jun 20 13:10:54 pokkeli, #kotlin Jun 20 13:11:36 alrighty Jun 20 13:11:43 i can tell you that gralde-plugin 1.3-beta2 is compatible with kotlin Jun 20 13:11:51 but i didnt upgrade AS yet Jun 20 13:22:04 I'm doing a lollipop transition to textview, the enter works, but when it returns, it flash on the place it should be Jun 20 13:36:16 As an exercise to grok RxJava better, can someone show me a way to convert an activity result into an Observable [stream]? Jun 20 13:37:02 claint, you mean onactivityResult? Jun 20 13:38:14 danijoo_: right. I want an activity call and result to be inside an observable chain. Is it possible? Jun 20 13:45:43 claint, i would do something like this: http://pastebin.com/z43rRGFe but im pretty new to Rx, too Jun 20 14:01:18 how would you chain that resultSubj to another observable, considering you want resultSubj results to be processed somewhere in the middle of that chain? Jun 20 14:01:39 I dont understand Jun 20 14:02:04 think of resultSubj. as an observable emitting activityResults Jun 20 14:03:29 ok like I have an API call isSubscriber(), if the user is not a subscriber, i can get observable from that, now I want to open an activity to get the result from the user, to see if he wants to subscribe, which I want to chain to that first call. And if the user subscribes, I will go on and do the API call which I actually want. Jun 20 14:04:15 I can see what resultSubj does. But it is created at the caller activity level, and it is not chained to anything, I think. Jun 20 14:04:30 claint, that honestly sounds like a terrible idea Jun 20 14:04:36 chaining as in do something .flatMap Jun 20 14:04:47 (converting activity chain into an observable) Jun 20 14:04:59 thats not how you should do it.. Jun 20 14:05:00 Mavrik: I never said if it was a good idea. :/ Jun 20 14:05:15 since you'll have serious issues with lifecycle chain updates Jun 20 14:06:54 that's true. But I wanted to see if I could treat Observables as Promise/Futures, since that's also what they are. Jun 20 14:08:26 yes. but never work across activities Jun 20 14:10:07 But I guess I am also looking for a solution to a problem, so I should maybe mention that a bit. The user can unsubscribe from the service by an SMS, outside my app. But at the same time, she can be inside a fragment/activity inside the app that requires subscription, or even make an API call that requires subscription. Jun 20 14:10:55 In that case, I should offer her to renew her subscription, and continue where she left off. The continuation being the hard part. There are multiple API calls that might require a subscription. Jun 20 14:11:32 And I really don't want to get into some callback hell. Jun 20 14:23:17 how should I go about downloading data like json and pictures from somwhere to application? Jun 20 14:23:36 what is even the best way to store such information that will be used by app Jun 20 14:25:03 abs25, just download? why not via http Jun 20 14:25:07 anyone know of a tut of populating data from databse into listview through asynctask Jun 20 14:25:17 you could also use your google drive account Jun 20 14:25:29 tried to do it myself.. but keeps crashing since im doing it wrong Jun 20 14:25:50 ktwo, use google drive acc to host data for application? Jun 20 14:26:18 if its read-only why not Jun 20 14:27:10 ktwo, can you tell how to google about this issue? Jun 20 14:27:54 you can just share a file in google drive and use that http link to read it with java Jun 20 14:28:05 abs25, http://square.github.io/retrofit/ Jun 20 14:28:07 maybe search for "how to read from http" Jun 20 14:28:15 anyone know of a tut of populating data from databse into listview through asynctask? Jun 20 14:31:09 Hi guys I am trying to find lib for splitting audio file. Basicly I want to be able to split mp3 files into two files . I looked around but all libs seems to be low quality Jun 20 14:33:42 Trudko, use ffmpeg Jun 20 14:33:54 probably the best would be to do it without re-encoding but dont know if this can be done Jun 20 14:34:41 it cannot be done without reencoding, mp3 is a compressed format Jun 20 14:35:52 of course it can be done :) Jun 20 14:35:59 you need to remux, not reencode Jun 20 14:36:52 Trudko, did you google it? Checked out https://code.google.com/p/mp3fenge/ ? Jun 20 14:41:39 oops, my bad if so Jun 20 14:43:55 Hi Guys, anyone know any android NFC p2p tutorial? Video tutorial better but any tutorial will do as long as it's good, please help, thanks! Jun 20 15:11:59 I have very little experience with Gradle... so, to use the latest version of Gradle with Android Studio, I simply open the "project settings" and change the "2.2.1. to "2.4"? Jun 20 15:12:14 pokkeli: yse Jun 20 15:12:15 yes Jun 20 15:12:19 alrighty, thanks Jun 20 16:19:10 Hey, button.getBackground().setColorFilter() works fine, but when I change the text on that button, the filter is removed and setting it back again does not work... any idea? Android 4 Jun 20 16:38:47 viran: are you sure its the background color filter? Jun 20 16:39:04 yes Jun 20 16:39:05 100% Jun 20 16:39:31 so you call setText() and the background changes? Jun 20 16:40:04 viran: oohhh Jun 20 16:40:10 viran: your using compat library? Jun 20 16:40:29 Napalm: yes Jun 20 16:40:50 sounds like a bug in that Jun 20 16:40:51 one moment Jun 20 16:41:35 http://developer.android.com/reference/android/support/v7/widget/AppCompatButton.html Jun 20 16:41:48 do you set the background in code? Jun 20 16:42:23 yes, but I'm using the Button class not AppCompatButton Jun 20 16:43:44 lol Jun 20 16:43:49 Same result with AppCompatButton Jun 20 16:43:53 viran: read what it says at the top of that page Jun 20 16:44:15 of ok :) Jun 20 16:45:57 how are you setting the background drawable? Jun 20 16:48:06 Hi, everyone. Jun 20 16:48:11 viran: ^ Jun 20 16:48:25 Napalm: I'm not setting one, i get the one that's created by the OS. button.getBackground().setColorFilter() - is that wrong? Jun 20 16:48:39 viran: in this case it is Jun 20 16:48:59 viran: want background is the view assigned in XML? Jun 20 16:49:07 none Jun 20 16:49:18 so what background are you getting :P Jun 20 16:49:32 the default gray one Jun 20 16:49:43 viran: are you just trying to tint the button to a different color? Jun 20 16:49:49 yes Jun 20 16:49:52 Quick question: where can I download a stand-alone charset for my input stream reader? "IBM437" isn't working on older API levels of Android. Jun 20 16:50:03 viran: use the AppCompat method for doing that Jun 20 16:50:20 hello Jun 20 16:50:23 why can't I do String message = new String(buffer, "UTF_8");? Jun 20 16:50:44 Isn't it "UTF-8"? Jun 20 16:51:00 TacticalJoke: yeah. Jun 20 16:51:41 viran: ViewCompat.setBackgroundTintLink(yourview, getResources.getColorStateList(R.color.yourcolor)); Jun 20 16:52:06 viran: and if you like ViewCompat.setBackgroundTintMode(yourview, PorterDuff.Mode.SRC_IN); // or whatever Jun 20 16:52:15 Thanks a lot Napalm Jun 20 16:53:00 paulo_: its UTF-8 Jun 20 16:53:05 ah.. TacticalJoke got there first Jun 20 16:53:52 LordRatte: I assume you've look at these http://developer.android.com/reference/java/nio/charset/package-summary.html Jun 20 16:54:06 LordRatte: http://developer.android.com/reference/java/nio/charset/Charset.html#availableCharsets() Jun 20 16:54:35 LordRatte: check out the resulting list from that API. Jun 20 16:55:28 hopefully android studio will work well with java 8 and fedora Jun 20 16:56:18 Napalm: I see but I can't use the default charsets. Jun 20 16:59:17 LordRatte: looks like java provides CharsetProvider for this. Jun 20 16:59:56 LordRatte: http://docs.oracle.com/javase/7/docs/api/java/nio/charset/spi/CharsetProvider.html explains you should use configuration file called META-INF/services/java.nio.charset.spi.CharsetProvider in your APK Jun 20 17:01:00 this should contain the canonical package.class.your.own.charsetprovider Jun 20 17:02:10 LordRatte: do you have a provider for the 437 codepage? Jun 20 17:02:38 What's that? Jun 20 17:03:31 omg Jun 20 17:03:36 read what i just said before Jun 20 17:05:04 I don't understand. Is it a library to build custom charsets? Jun 20 17:05:11 no Jun 20 17:05:13 its a class Jun 20 17:05:21 you make one Jun 20 17:05:29 to provide the Charset to java Jun 20 17:05:35 and register it in your package Jun 20 17:06:24 Ok, thanks, I'll give it a try. Jun 20 17:06:53 create a blank file here src/main/resources/META-INF/services/java.nio.charset.spi.CharsetProvider in your project Jun 20 17:07:07 now create a class that extends CharsetProvider Jun 20 17:07:19 and place its full path on a line in that new blank file Jun 20 17:12:40 Napalm: again with the button color thing, it does not work on Android 5 (although it works fine on android 2 and 4) ... Jun 20 17:14:49 viran: did you try calling the method directly on v21 ? http://developer.android.com/reference/android/view/View.html#setBackgroundTintList(android.content.res.ColorStateList) Jun 20 17:17:18 I know java yet I am having a hard time learning android dev Jun 20 17:28:26 horny-sama, Most of Android dev is learning the SDK. Jun 20 17:28:57 DLSteve: I wish android dev has bookz like absolute java Jun 20 17:29:02 nice and simple to follow Jun 20 17:30:32 horny-sama, Little outdated now but this book helped me https://www.bignerdranch.com/we-write/android-programming/ Jun 20 17:31:22 DLSteve: the problem with dated book is it does not feature on developing in android studio Jun 20 17:32:10 horny-sama, Yah I have not seen any Android books using AS yet. (I haven't looked too hard though) Jun 20 17:32:45 DLSteve: bookzz that do is not priateable :< Jun 20 17:32:58 I find that strange as I can find 50 iOS 8 books using swift... Jun 20 17:33:22 DLSteve: may be making ios apps are more profitable :P Jun 20 17:33:45 well basically AS is just IntelliJ so if you are familiar with it with plain java development learning curve is minimal Jun 20 17:33:56 then you can just follow any eclipse based guide Jun 20 17:34:09 i think android books are harder to write; often the docs just aren't there, so the author - needs to delve into source code to figure things out themselves Jun 20 17:34:26 of course basics are there on d.android.com, but books don't need to rehash the basics Jun 20 17:34:39 ktwo: I generally don't use eclipse for java dev Jun 20 17:34:41 also the info on official site is outdated Jun 20 17:34:45 mainly geany Jun 20 17:35:17 anyhow this is up to date https://pragprog.com/book/eband4/hello-android Jun 20 17:43:44 A kind of design thing that irritates me: Callbacks and even Events with an EventBus, if you mix any of these with mutable state, what you basically get becomes GOTOs of our age, which makes real spagetti code. What can you do to avoid such a state? Jun 20 17:44:30 LordRatte: still here? Jun 20 17:44:51 Napalm: yeah. Jun 20 17:45:07 I found a template that did what you suggested. Jun 20 17:45:22 I think. Jun 20 17:45:24 http://www.javased.com/?source_dir=Sage-Mobile-Calc/src/org/apache/harmony/niochar/charset/additional/IBM437.java Jun 20 17:45:34 claint i use rxjava to confine the events to a defined pipeline Jun 20 17:45:36 LordRatte: https://gist.github.com/slightfoot/734e2af36d8a98af0d97 Jun 20 17:45:38 tada Jun 20 17:45:41 all working and tested Jun 20 17:45:47 tada indeed :D Jun 20 17:45:55 hey Napalm Jun 20 17:46:22 herro Jun 20 17:46:56 Swell. Jun 20 17:47:08 no thanks? Jun 20 17:47:09 :P Jun 20 17:51:40 g00s, so how do you map multi-activity pipelines to rxjava? Jun 20 17:51:55 multi-activity pipeline ... Jun 20 17:52:17 startActivityForResult and all that jazz Jun 20 17:53:16 Seriously, I really appreciate it, Napalm. Thank you :] Jun 20 17:53:19 Mavrik do you mean a sequence of events which needs to be comprehended across several activities ? Jun 20 17:53:24 g00s, well, let's imagine a simple use-case Jun 20 17:53:39 Retrofit request to an API endpoint that might require re-authentication for OAuth Jun 20 17:54:03 Or even Google OAuth2 which has 2 or 3 paths Jun 20 17:55:30 ah, ok. i haven't done that specifically, but my bluetooth related state machine must - you know, coordinating connecting, bonding, ensuring BT adapter is enabled any maybe going to settings, finally connection, service discovery, and then real work Jun 20 17:56:01 Hey guys, I am trying to push a library to JCenter() and got problems with that. Can anybody help me ? Jun 20 17:56:07 i keep those things in the model, which exposes state. my UIs tend to be very thin. model sits in a service Jun 20 17:56:49 g00s, yeah, but that doesn't have to talk to Android managed activities and fragments Jun 20 17:56:51 Mavrik: i used an okhttp interceptor to re-authenticate inside my http request Jun 20 17:57:26 and yes +1 for rxjava Jun 20 17:57:33 it's the tits Jun 20 17:57:37 And somehow everyone selling RxJava as a magic bullet suddenly starts avoiding an answer of how do you manage states where you need to actually do UI chains Jun 20 17:57:40 or can someone tell me how to downgrade the gradlewrapper? Jun 20 17:58:01 And that will get a bit more relevant now that we'll have to deal with UI and reauth for premission system Jun 20 17:58:02 mrfreemanblack: make a wrapper task and run it Jun 20 17:58:10 Mavrik the fragments initiate commands to the service / rx stuff , and then observe the results in some shared state mailbox. so if i understand your question, most of the rx pipelines are below the UI Jun 20 17:58:24 osxorgate: in the library build.gradle? Jun 20 17:58:31 i also haven't used any of the rxandroid things Jun 20 17:58:39 RxAndroid things are useless for that usecase Jun 20 17:58:40 mrfreemanblack: go into the wrapper directory and edit the properties file? Jun 20 17:58:42 like binding to widget properties or whatnot Jun 20 17:58:49 mrfreemanblack: http://stackoverflow.com/questions/25769536/how-when-to-generate-gradle-wrapper-files Jun 20 17:59:40 Mavrik this is what closely approximates my approach. its not pure to any school, but works best on android imho Jun 20 17:59:42 https://github.com/tehmou/rx-android-architecture Jun 20 18:01:17 i think its good to segregate commands, queries, and events Jun 20 18:01:36 Yeah, that's not useful when you want to transparently add UI layers to Rx chain Jun 20 18:02:08 So you need to do fuckery with Subjects around the onActivityResult calls and other callbacks Jun 20 18:02:29 i guess somehow i haven't had to do that yet :( Jun 20 18:02:35 maybe i just avoided your scenario Jun 20 18:02:55 by mistake Jun 20 18:03:01 or got lucky :) Jun 20 18:03:08 Well, Android M is coming ;) Jun 20 18:03:53 g00s, what do you do when user has BT off? Do you take him to the BT switch activity Jun 20 18:03:57 ? Jun 20 18:03:58 Mavrik but if you look at that article above, the viewmodels map to multiple fragments Jun 20 18:04:15 Mavrik sure Jun 20 18:04:33 Mavrik also airplane mode :D Jun 20 18:04:33 How do you map/handle continuation of Rx chain later? Jun 20 18:04:44 g00s: is that an issue? Jun 20 18:04:50 using okhttp, do i need to do it inside an asynctask? Jun 20 18:05:42 aaearon: no Jun 20 18:05:55 hmm ok ive been doing it wrong then Jun 20 18:06:06 aaearon: you need to do it off th main thread though Jun 20 18:06:12 +1 Jun 20 18:06:27 NetworkOnMainThreadException is a bitch Jun 20 18:06:32 aaearon: so yes, AsyncTask will work.. but there are other methods Jun 20 18:06:42 StrictMode FTW! Jun 20 18:06:50 Mavrik one thing i don't do is have any cold observable spanning android components. because then yeah, if you need to unsubscribe to it that impacts the computation Jun 20 18:07:06 Yeah Jun 20 18:07:20 so either that subscriber needs to be tucked away in a viewmodel which outlives any activity Jun 20 18:07:27 I honestly don't really like having to create my own underlying view layer under android view layer Jun 20 18:07:48 Reminds me back on J2EE factoryoffactoryoffactory abstraction days -_- Jun 20 18:07:50 android does make this such a pita :( Jun 20 18:08:01 On 11+, you don't need to use StrictMode for NetworkOnMainThreadExceptions. Jun 20 18:08:35 Just avoid doing IO on main thread at all times Jun 20 18:08:53 TacticalJoke: running on strictmode is a good idea anyway Jun 20 18:08:56 Even if you don't get a strictmode warning... users will appreciate the performance. Jun 20 18:09:42 true dat Jun 20 18:10:37 To be fair, though, I don't think we can avoid it in all cases. For example, if you need to read something in MainActivity.onCreate from SharedPreferences, you need to do IO on the main thread. Jun 20 18:10:50 I think the rule should be "avoid it as much as possible". Jun 20 18:11:01 yeah sometimes i'm lazy. i'll read a row from sqlite if i have too ;) Jun 20 18:11:23 *gasp* Jun 20 18:11:27 one row Jun 20 18:11:29 one Jun 20 18:11:29 :D Jun 20 18:11:33 *gaasp* Jun 20 18:11:37 lol Jun 20 18:12:11 dont think it would be much different than reading a preference; same neighborhood at least Jun 20 18:12:42 well before that map is cached anyhow Jun 20 18:13:41 TacticalJoke: SharedPreferences is not *really* IO Jun 20 18:13:46 it gets cached Jun 20 18:13:49 The first read is. Jun 20 18:13:57 yep. Jun 20 18:14:21 Pretty sure StrictMode crashes on it if you enable one of the options Jun 20 18:14:23 the great thing is the game the framework plays to ensure the in flight writes are saved before onStop Jun 20 18:14:36 when using prefrences Jun 20 18:14:41 don't think it crashes on that Jun 20 18:14:47 but I'll check Jun 20 18:14:50 I think StrictMode does flag that. Jun 20 18:14:53 basically it just blocks in onStop and waits for the queue of writes to drain Jun 20 18:16:50 It did at one point at least, I had to add permitDiskReads after detectAll at one point Jun 20 18:17:38 Yeah, still does Jun 20 18:21:50 aaearon: One recommended pattern is to use Call.enqueue (in which case OkHttp takes care of the thread pool and stuff). This could replace your AsyncTask. Jun 20 18:22:01 hey guys I m new to android development trying to create a camera app... couldn't figure out how I can flip camera from front to back Jun 20 18:22:03 Though you'd have to take care of coming back to the main thread (via Handler.post or whatever). Jun 20 18:22:14 I have been following this tut - https://github.com/googlesamples/android-Camera2Basic Jun 20 18:22:27 i think android would be better, if instead of these lifecyles that are forced upon you - it was simply just some event you listened to (on rotation) Jun 20 18:23:01 after all there are plenty other events you have to listen to, like changes in the database. then it all just becomes streams of events Jun 20 18:23:07 not corrdinating events across lifecycles Jun 20 18:23:25 Hi guys I am trying to find lib for splitting audio file. Basicly I want to be able to split mp3 files into two files . I looked around but all libs seems to be low quality Jun 20 18:23:43 Add configChanges and have just that Jun 20 18:24:21 SimonVT right but - across the board simplification of all activity / fragment lifecycle. maybe start and stop only Jun 20 18:24:39 and then just delagates for all the other things Jun 20 18:25:25 Hmm, what about the fact that Android kills the process (to reclaim memory) when running in the background? It seems to me that configuration changes are just a part of the things we have to worry about. Jun 20 18:25:56 TacticalJoke yeah you are right Jun 20 18:26:03 Sure, you save nothing by having those kinds of callbacks.. You still have to implement the same kind of state saving, etc Jun 20 18:26:35 You'd probably have more callbacks to worry about Jun 20 18:28:15 Lots of callbacks to orientation changes, language changes, .. Jun 20 18:28:56 hmm .. i think a lot of these things stem from the fact android does not use virtual memory for swapping state the way we normally think, instead its "up to use" to save in bundles Jun 20 18:29:00 so that needs to go to Jun 20 18:29:24 up to use? Jun 20 18:29:39 up to us Jun 20 18:29:46 Well, yeah Jun 20 18:29:55 You don't want to save everything kept in memory Jun 20 18:32:04 I still haven't figured out where that onSaveInstanceState bundle gets stored. Is it persisted to hard disk? Jun 20 18:32:29 Kept in memory afaik Jun 20 18:32:36 And now you have a persisted bundle that's saved to disk Jun 20 18:33:38 Yah. Jun 20 18:38:44 what is this called in java when you say Foo Jun 20 18:39:02 some form of generic wildcard Jun 20 18:39:11 google fu is failing Jun 20 18:39:59 Is it "multiple bounds"? Jun 20 18:40:20 It's at the bottom of here: https://docs.oracle.com/javase/tutorial/java/generics/bounded.html Jun 20 18:41:12 thanks TacticalJoke Jun 20 18:43:42 How can I install Android Screenshot Library (https://code.google.com/p/android-screenshot-library/)? Jun 20 18:54:37 Guys I've uploaded file into emulator into data/media but I am not sure how to load it now. Is it even good place to place file into Jun 20 18:59:27 weird, google thinks every question I ask it is dev related now Jun 20 19:02:34 hey guys, i'm using switch (compat) and sometimes when i perform a click action it changes the color but not the position of the knob/button or it make the inverse .-. Jun 20 19:05:14 If my app uses Google Play Services for location APIs (instead of Android.Location) and a user does not have the Play Services APK..... what will happen? Jun 20 19:05:54 viran it would crash, you have to check if they have play services - should even check version Jun 20 19:06:00 viran, you'll get a connection error. Jun 20 19:06:07 android punts the package management to you :D Jun 20 19:06:09 when you connect to play services client Jun 20 19:06:18 g00s, it won't crash. Jun 20 19:06:18 what i missed .-. Jun 20 19:06:23 g00s, there's a callback. Jun 20 19:06:30 all other calls will not return values. Jun 20 19:06:51 i think the last play services improved something in that area Jun 20 19:07:34 So should I use Android.Location instead? I want to support as much users as possible Jun 20 19:08:07 viran, where are you going to distribute the app? Jun 20 19:08:37 globaly, no specific country in mind Jun 20 19:09:17 with "where", means, how are your users going to download the app? Jun 20 19:09:50 Google Play mostly... but there are other options (samsung store for example) Jun 20 19:10:11 All devices with google play store will have play services. Jun 20 19:12:27 viran some new changes "Connecting to Google Play services" might make things easier http://android-developers.blogspot.com/2015/04/theres-lot-to-explore-with-google-play.html Jun 20 19:12:51 thanks Jun 20 19:12:52 g00s, there was no change in tha trespect Jun 20 19:13:03 g00s, from the start you got a very clear callback when services weren't available Jun 20 19:13:17 which you always had to handle Jun 20 19:14:23 Mavrik but addApiIfAvailable is new right ? Jun 20 19:14:33 yes Jun 20 19:14:43 however location API was always there, it's not conditional Jun 20 19:15:02 but you could always get a failure callback if your play services didn't match up with the device ones Jun 20 19:15:10 and you even get a pre-canned intent to launch to handle that Jun 20 19:16:03 ok good to know, thanks Jun 20 19:16:43 atm just using GA - i think thats bundled with Play Services at compile time but doesn't depend on GMS on device, kinda weird Jun 20 19:17:16 The annoying issue is of course if you don't have a Play device, the user will always get an update prompt Jun 20 19:17:21 And he won't be able to do anything about it Jun 20 19:22:38 lol http://www.amazon.com/review/R2XV0DBIL2KQU4 Jun 20 19:23:54 banana slicer http://recode.net/2015/06/20/amazon-upgrades-its-review-software-keeps-banana-slicer-reviews-intact/ Jun 20 19:49:57 I might buy the book hello android Jun 20 19:50:04 since a used 4th edition is only 18 bucks Jun 20 19:50:05 :P Jun 20 19:58:44 dont Jun 20 19:58:51 why not? Jun 20 20:01:39 Does the "horny" in your name mean what I think it means? :S Jun 20 20:01:58 TacticalJoke: probably unless you are a liberal Jun 20 20:01:59 :P Jun 20 20:03:18 http://developer.android.com/reference/android/hardware/GeomagneticField.html Is there a way to get the x,y,z microteslas from said class without having geo coordinates ? Jun 20 20:03:40 Can this still work if you do not have location/wifi/3g on ? Jun 20 20:26:23 Could anyone recommend a good video tutorial series on android programming? Jun 20 20:27:47 neredsenvy: that class is to get estimates of earth magnetic field in giving point Jun 20 20:28:18 neredsenvy: x, y, z is different in every location Jun 20 20:28:20 Sawbones: Which ones have you considered so far? Jun 20 20:28:27 neredsenvy: do you want to get reading of magnetometer? Jun 20 20:29:26 icedp, What's the difference between GeomagneticField x,y,z and SensorEvent .values x,y,z from TYPE_MAGNETIC_FIELD ? Jun 20 20:29:56 neredsenvy: "Estimates magnetic field at a given point on Earth, and in particular, to compute the magnetic declination from true north. " Jun 20 20:30:17 neredsenvy: "This uses the World Magnetic Model produced by the United States National Geospatial-Intelligence Agency." Jun 20 20:30:30 it's not sensor data. it's model data Jun 20 20:30:55 So one is sensor one is model ? Jun 20 20:32:02 Man this is confusing Jun 20 20:32:34 no, just read it Jun 20 20:33:12 Is there a page where I can get info on Magnetic Sensor ? Jun 20 20:33:43 sure, on d.android.com Jun 20 20:35:16 So values from Sensors.values on MAGNETIC_FIELD are microteslas for current room? And when combined with ACCELERATOR you can match those values to a world magnetic model ? Jun 20 20:36:20 barq: None, they all look sort of ok Jun 20 20:38:32 Sawbones: How do you know they look sort of ok if you have not looked at any? Jun 20 20:43:58 neredsenvy: IIRC you don't have to use magnetic model, just get magnetic sensor readings and gravity Jun 20 20:44:00 neredsenvy: http://developer.android.com/reference/android/hardware/SensorManager.html#getRotationMatrix%28float[],%20float[],%20float[],%20float[]%29 Jun 20 20:45:29 neredsenvy: docs doesn't mention that here but if device has TYPE_GRAVITY it's better to use it since it's more filtered Jun 20 20:46:25 icedp, I'm have not dealt with sensors before. I noticed from another app that GeomagneticField sensor seems to give a unique x,y,z location for well any location on the planet? So I was thinking of using it as a tool to improve my wifi indoor navigation app percision. Jun 20 20:46:56 Are values from SensorEvent.values from TYPE_MAGNETIC_FIELD unique for each location ? Jun 20 20:52:22 neredsenvy: magnetic field looks like this http://gravmag.ou.edu/mag_earth/magnetic_field_a.gif Jun 20 20:52:24 neredsenvy: but it's not that smooth because there are local anomalies, also things like buildings, etc, even laptop speakers affect it Jun 20 20:52:29 neredsenvy: magnetic field model tries to estimate it Jun 20 20:55:01 how to get Android SDK source code for a particular API level? Jun 20 20:59:10 dgeary2: I use grepcode https://www.google.com.ua/search?hl=en&q=grepcode%20android Jun 20 20:59:17 maybe there are better tools Jun 20 21:02:05 icedp, i don't understand. how do i use those to build an android app? Jun 20 21:03:21 dgeary2: I though you'd like to view Android source Jun 20 21:03:31 dgeary2: you don't need source to build android app Jun 20 21:03:41 dgeary2: you need sdk Jun 20 21:04:24 how to get Android SDK source code for a particular API level? Jun 20 21:09:07 dgeary2: -b https://source.android.com/source/build-numbers.html#source-code-tags-and-builds Jun 20 21:17:30 surf2b1, is that the SDK source code? Jun 20 21:19:48 dgeary2: What do you need to do? Build Android? There are tons of tutorials. Browse source: http://grepcode.com/project/repository.grepcode.com/java/ext/com.google.android/android or github.com/android, select a branch and search. Jun 20 21:20:04 surf2b1, no, i need to build an android app Jun 20 21:20:48 dgeary2: http://developer.android.com/training/index.html Jun 20 21:21:54 surf2b1, but the android binary SDK license is non-free . so it seems i need to build the SDK from source first. Jun 20 21:22:23 dgeary2: no you don't Jun 20 21:22:39 hey Napalm, you were right about the ripple appearing in the middle. sometimes it does and sometimes it doesnt Jun 20 21:22:48 but on most time it appears in the middle Jun 20 21:23:11 surf2b1, i do not agree with clauses 3.1, 3.3, 3.4, and 3.5 of the android binary SDK license Jun 20 21:25:58 dgeary2: I feel like I'm being trolled. Go build for another platform then. Jun 20 21:27:23 surf2b1, i'm sorry you feel that way. i'm trying to build the fdroid client Jun 20 21:28:48 is there any way of Jun 20 21:28:57 i want to make some changes to the fdroid client, but the first step is to build it first. it needs several different API levels: 7, 15, 16, 17, 19, 21 Jun 20 21:29:07 fixing html5 player to work as background process Jun 20 21:30:00 I mean, when I start html5 video it stops on changing app or locking screen Jun 20 21:30:42 dgeary2: you should be able to download all you need with the SDK Manager. The read-me has build instructions. Jun 20 21:32:20 surf2b1, thanks for at least trying to help Jun 20 21:34:58 so I download sdk, generate .apk with a bunch of code Jun 20 21:35:12 make it run webview widget or something Jun 20 21:35:14 become millionaire Jun 20 21:35:17 ez Jun 20 21:35:17 and it will work? Jun 20 21:35:53 what could possibly go wrong.. Jun 20 21:36:02 I mean html5 player in apk Jun 20 21:36:19 wut Jun 20 21:36:49 I am trying to get accelerometer readings at 100times/sec. Any ideas on how i can do this? Jun 20 21:37:48 dgeary2, the SDK source is included in the main android source tree available from https://source.android.com Jun 20 21:38:55 I think you can post to a handler every 10 milliseconds Jun 20 21:39:07 cause 1 second = 1000 milliseconds, 100 10's is 1000 Jun 20 21:39:10 yea Jun 20 21:41:37 Odaym post to a handler? how Jun 20 21:42:41 by posting to a handler Jun 20 21:42:45 mind.blow(); Jun 20 21:43:03 Odaym, uhm, how will that help him get sensor readings_ Jun 20 21:43:04 ? Jun 20 21:43:13 whatever line he uses to read, he runs that in the handler, again and again Jun 20 21:47:34 he gets "his operation" 100 times per second Jun 20 21:47:34 Odaym, what do you mean "read"? :) Jun 20 21:47:36 He's getting accelerometer sensor callbacks. Jun 20 21:47:43 that's what HE means, I was sure he meant about hte duration not the ability to read Jun 20 21:47:43 but he can trigger them, whether that will throttle or give him old data because of no synch, that's his problem Jun 20 21:50:43 ctrlshftn, you pass "SENSOR_DELAY_FASTEST" as the sensor rate when you're registering for update Jun 20 21:50:43 ctrlshftn, and that's pretty much all you can do - the rate is whatever the hardware and the device driver can provide you Jun 20 21:50:43 Mavrik but that rate is very unreliable Jun 20 21:50:43 unreliable Jun 20 21:50:43 good word bro Jun 20 21:50:43 you tested it? Jun 20 21:50:43 I need a constant rate Jun 20 21:50:43 I did Jun 20 21:50:43 ctrlshftn, yes, that's the reality of sensors I'm afraid :/ Jun 20 21:50:43 that integer is there for a reason I think Jun 20 21:50:43 ctrlshftn, you'll have to do throttling / debouncing logic yourself :/ Jun 20 21:50:58 you know what you can do? you can get all the data from the sensor into an array and read from that Jun 20 21:50:58 so the array will have the stuff you really want to take into consideration as valid data, not just spewing over from the sensor into your receiving code Jun 20 21:50:58 usually people do a lowpass filter Jun 20 21:50:58 http://www.amazon.ca/gp/product/1680500376/ref=olp_product_details?ie=UTF8&me= <---worth buying? Jun 20 21:50:58 rx can do temporal operators like debouncing, sampling Jun 20 21:50:58 considering used is only 18 cad Jun 20 21:50:58 :P Jun 20 21:50:58 good thing you are not working with audio, man Jun 20 21:50:58 you have it easy Jun 20 21:50:58 Ok what Im doing right now is whenever the sensorevent is triggered I update the value of an object. And from an Async task I add the data to an ArrayList Jun 20 21:50:58 at a constant rate Jun 20 21:50:58 but that will give you old data .. Jun 20 21:50:58 ctrlshftn: you set data whenever sensor event occurs, you read whenever you need to render/display/calculate Jun 20 21:50:58 yes Jun 20 21:50:58 icedp thats what im doing but the Async task takes more than the set interval to complete Jun 20 21:50:59 go figure Jun 20 21:50:59 ctrlshftn, a lot of people do a smoothing lowpass filter to make accelerometer response less twitchy - see http://stackoverflow.com/a/24600534 Jun 20 21:50:59 horny-sama: I don't think it's worth it. You'll get better tutorials for free online Jun 20 21:50:59 note that the tip about using the GRAVITY sensor, which does preprocessing, is also very good Jun 20 21:50:59 I want it running 100times/sec for 5 secs but it runs for more than 12 Jun 20 21:50:59 surf2b1: okay Jun 20 21:50:59 I wish 4th edition is up for torrenting Jun 20 21:50:59 :P Jun 20 21:50:59 is your running code depdendant on whether the array is filled yet? Jun 20 21:50:59 should i not use Thread.sllep? Jun 20 21:50:59 ctrlshftn: ah, you need a game loop Jun 20 21:50:59 haha! Jun 20 21:50:59 you just shot yourself in the existence Jun 20 21:50:59 icedp game loop? Jun 20 21:50:59 ctrlshftn, no, don't use Thread.sleep for exact timing Jun 20 21:50:59 never use that man Jun 20 21:50:59 never Jun 20 21:50:59 ;_: what else do i do? Jun 20 21:50:59 since you have no guarantee for exact interval (e.g. Thread.sleep(10) can sleep anywhere between 10 and 1000 ms or more :) ) Jun 20 21:50:59 you have to learn about locking Jun 20 21:50:59 ctrlshftn, yeah, the rate will vary depending on the device, i can confirm that on another sensor (but using SENSOR_DELAY_FASTEST): http://i.imgur.com/rXAnc3P.png see the green line, it's a device flipping around an axis. It's like a samplerate issue with nyquist, on most device I tested it's often each 40ms i got a probe Jun 20 21:51:20 welcome to hell Jun 20 21:51:20 it became problematic to recognize a flip (it's a sinusoid) when the rate is slower Jun 20 21:51:20 hmmm Jun 20 21:51:20 because there is not enough sample to describe properly the curve Jun 20 21:51:20 ohh Jun 20 21:51:20 adq, what are the other colors? Jun 20 21:51:20 other axis and some formula ;) Jun 20 21:51:26 the blue one looks rather useless :D Jun 20 21:51:49 what other alternative to Thread.sleep do i have? Jun 20 21:51:49 eheh the blue one is something i use to detect different phase Jun 20 21:51:49 phases* Jun 20 21:51:52 I was able to get very precise reading of audio that passed through a long fft process to get exact frequency and it was exactly precise down to 2 cents Jun 20 21:51:53 ctrlshftn, run the loop and check for wall clock time Jun 20 21:51:58 all because I fixed the threads Jun 20 21:52:07 I really believe this is the only problem Jun 20 21:52:16 Mavrik wall clock time? Jun 20 21:52:38 adq, I've never worked with accel processing before, is the accuracy between devices noticably different? Jun 20 21:52:45 ctrlshftn, yeah, actual time Jun 20 21:52:52 yes i saw from around 20ms to 100ms iirc Jun 20 21:53:02 at 100ms, it's impossible to detect a fast flip Jun 20 21:53:06 Mavrik 100times/sec for 5 secs takes nearly 12 secs to complete Jun 20 21:53:09 mhm, how about actual values returned? Jun 20 21:53:11 (litteraly, i throw the device in the air, flipping) Jun 20 21:53:17 Mavrik 500 Jun 20 21:53:18 any broken sensors? Jun 20 21:53:27 the value are corrects though Jun 20 21:53:36 ctrlshftn, I don't understand what you're telling me Jun 20 21:53:42 just, the frequency of getting values from sensor is too slow Jun 20 21:53:50 you're getting a drift because you're using Thread.sleep and are probably not counting in the actual code runtime Jun 20 21:53:51 on some device Jun 20 21:53:59 which can be significant at 100Hz Jun 20 21:55:15 working with sensors is fun anyway, i recommend it :p Jun 20 21:55:29 Mavrik wait ill show u the code Jun 20 21:55:30 man, if you use sleep, you are done Jun 20 21:55:35 you will NOT get correct data Jun 20 21:55:41 this is final Jun 20 21:55:46 I challenge you Jun 20 21:56:06 http://pastebin.com/5Q4mfVAV Jun 20 21:56:20 you will get correct data, but delayed in time with the amount of sleep it waited + some minor overhead Jun 20 21:56:20 Mavrik ^^ Jun 20 21:56:35 what about the new data that comes up?! Jun 20 21:56:40 are you insane Jun 20 21:56:41 yeah, we already explained to you why that's wrong. Jun 20 21:56:45 its so wrong Jun 20 21:56:46 Odaym, dude, chill. Jun 20 21:56:53 ok Jun 20 21:57:02 lol Jun 20 21:57:12 ctrlshftn, Thread.sleep() will sleep for more than your set time, so you're getting a drift Jun 20 21:57:13 SOMEONE ON THE INTERNET IS WRONG!! Jun 20 21:57:15 haha Jun 20 21:57:27 instead of 10ms + 10ms + 10 ms Jun 20 21:57:32 Mavrik thats why ive been asking you for an alternative Jun 20 21:57:52 you're getting list.add(ms) + 10 ms + thread.sleep jitter ms Jun 20 21:58:04 ctrlshftn, and I told you to run a loop without sleep and measure actual time passed. Jun 20 21:58:07 ctrlshftn, you should just record sensor event in the regular way (with the callback and some SENSOR_DELAY_something), and process it elsewhere Jun 20 21:58:19 if (lastexecutonms - currenttimems) >= 10ms { do shit Jun 20 21:58:29 or use a flag? Jun 20 21:58:52 wait up. Ill be back. Sorry im a retard Jun 20 21:58:58 thank you! Jun 20 21:59:04 jk Jun 20 22:00:13 like if (lastFrameTime - timeNow < FRAME_TIME /* ~16 ms */) { timeToSleep += 5 } else if ( ... > FRAME_TIME ) { timeToSleep -= 5 } ; Jun 20 22:00:20 eh the text in my button disappears when its padding is >= 14dp. the text is actually 'pushed' down. the button's height is wrap_content Jun 20 22:00:28 where FRAME_TIME is ~16ms Jun 20 22:00:45 padding means space from the inside, saapas Jun 20 22:00:50 so yea it will push the text Jun 20 22:01:27 Odaym, I know. why won't the bottom of the button go down ? Jun 20 22:01:33 another old screenshot i found (for the curious): http://i.imgur.com/FxKPJqf.png note the warm-up/calibration phase Jun 20 22:01:35 hm? Jun 20 22:01:44 the bottom of the button? Jun 20 22:01:52 you cant push from inside to outside to make the view bigger Jun 20 22:01:54 actually, that doesn't matter. I just want some room around the text while having wrap_content. how? Jun 20 22:02:02 bigger button Jun 20 22:02:06 or smaller text Jun 20 22:02:43 I have a small sample app that has a button to which I have not set any styles, and it looks the way I want to Jun 20 22:02:53 cool Jun 20 22:02:59 but I can't find out what makes it so Jun 20 22:03:00 saapas, hmm, padding should push the button down, is there some other constraint preventing the button from being larger_ Jun 20 22:03:01 ? Jun 20 22:03:17 what do you mean padding should push the button down.. Jun 20 22:03:47 *should make the button larger Jun 20 22:04:02 really? Jun 20 22:04:52 Mavrik, the parent layout does not constrain it. the neighboring buttons are larger with fixed height Jun 20 22:05:10 hmm Jun 20 22:05:18 can you show a pic of what you want to achieve? Jun 20 22:05:24 saapas, can you pastebin the layout + screenshot of the screen with debug/show view bounds enabled? Jun 20 22:05:49 that's not right, Mavrik , I just tried it Jun 20 22:05:50 bounds enabled? Jun 20 22:06:20 ok yes it is right Jun 20 22:06:30 I had fixed width and height, writh wrap_content it does push it down Jun 20 22:06:36 I should just be quiet for a while Jun 20 22:06:40 :) Jun 20 22:06:45 like a year Jun 20 22:07:08 saapas, yes, the very useful option in debug options on the device ;) Jun 20 22:07:12 that shows view bounds Jun 20 22:07:36 oh ok Jun 20 22:08:10 in developer options? Jun 20 22:08:42 yea Jun 20 22:08:43 Guys, is there any way to make a screenshot of currently visible activity programatically? Jun 20 22:08:58 I know this one Jun 20 22:09:00 I don't see such an option in my S4 mini with kitkat Jun 20 22:09:10 Mavrik ! Works! Thanks Man! Jun 20 22:09:39 Mavrik, thanks, the android source download link seems well hidden. i was not able to find it. Jun 20 22:09:43 its called Show Layout Bounds, saapas Jun 20 22:09:50 http://pastebin.com/uPP0mHDC Mavrik this is what I did Jun 20 22:10:06 https://camo.githubusercontent.com/ac54eef9b1aa262078cbe101c359e6ad824a134b/687474703a2f2f706172736575692d616e64726f69642e70617273656170702e636f6d2f696d616765732f70617273655f6c6f67696e5f73616d706c655f73637265656e732e706e67 here the buttons have room around the text Jun 20 22:10:17 dgeary2, you couldn't find Source -> Downloading and Building -> Downloading the source? Jun 20 22:10:21 Really? Jun 20 22:10:36 looks cool saapas Jun 20 22:10:44 uhm no can't see that option either Jun 20 22:10:47 building a parse app? Jun 20 22:10:50 saapas, "Show layouts bounds" Jun 20 22:10:54 it's in there since frigging android 2.x Jun 20 22:11:05 oh no there it is. show layout boundaries ;) Jun 20 22:11:11 boundaries? Jun 20 22:11:13 * Mavrik takes a stick. ;) Jun 20 22:11:14 lol, fucking samsung Jun 20 22:11:28 there is only samsung Jun 20 22:12:27 Mavrik, i did find this page: https://source.android.com/source/building.html, which has a list of build dependencies, but i can't see 'download the source' anywhere on the page Jun 20 22:14:43 I can't paste an image in pastebin ._. Jun 20 22:14:55 saapas ul to imgur Jun 20 22:16:02 so what's that you're building saapas ? Jun 20 22:16:15 a project time tracking app Jun 20 22:16:27 its name is Parse? Jun 20 22:16:39 no Jun 20 22:16:48 ok Jun 20 22:17:02 dgeary2, left hand side, "Downloading the source" in a submenu Jun 20 22:18:24 so here's my problem http://imgur.com/WBxrHDH Jun 20 22:18:46 where Jun 20 22:18:48 Mavrik, need to enable javascript to see it. not the best ux. Jun 20 22:19:02 Odaym, the button with the lowest height Jun 20 22:19:09 do the same for it as you did the ones next to it? Jun 20 22:19:22 Odaym, but I'm trying to use wrap_content Jun 20 22:19:33 but that will...wrap content.. Jun 20 22:19:46 so increase content height :) Jun 20 22:19:51 but why.. Jun 20 22:19:55 just use fixed height Jun 20 22:19:56 saapas, do you want to make all the buttons the same height? Jun 20 22:19:59 Mavrik, yes Jun 20 22:20:12 saapas, how bout the width? Jun 20 22:20:28 Mavrik, wrap_content with room too Jun 20 22:20:46 saapas, you have them in LinearLayout I guess? Jun 20 22:20:52 the buttons yes Jun 20 22:21:03 saapas, ok, set all the buttons to "match_parent" Jun 20 22:21:09 and then set the linearlayout to "wrap_content" Jun 20 22:21:28 and you'll get them all the same size with the height being taken from the largest one content-wise Jun 20 22:21:33 that's probably what you want Jun 20 22:21:34 yeap Jun 20 22:21:37 let's see Jun 20 22:21:53 which would be the largest one content-wise there? Jun 20 22:21:57 "Now" Jun 20 22:21:58 ? Jun 20 22:22:39 all have same text size Jun 20 22:22:42 yea Jun 20 22:22:48 so what would be the largest he's referring ot Jun 20 22:25:24 the one with the most padding / glyphs that are the largest Jun 20 22:25:30 remember, people can change font size on their devices :) Jun 20 22:25:43 not if you set the font size to dp instead of sp Jun 20 22:25:54 Yeah, don't ever do that. Jun 20 22:25:59 why not Jun 20 22:26:10 Preventing people from reading text on their screen is a dickass thing to do. Jun 20 22:26:20 try it with Gmail or other google apps Jun 20 22:26:31 I don't care about GMail. Jun 20 22:26:37 I care about not being an ass to older people or people with sight problems. Jun 20 22:26:39 ok, I think I'm fine with this. the layout with the gray border has weightSum, and the heights of the button layouts and spaces between the layouts then dictate the the button heights Jun 20 22:26:40 you seriously expect to cater for all the cases where the font is so large it busts out of the boxes? Jun 20 22:26:49 I do cater to that. Jun 20 22:26:58 I do too, with the layout Jun 20 22:27:07 but how high up Jun 20 22:27:22 your UI will break Jun 20 22:27:24 Odaym, also both GMail and Inbox support that very well. Jun 20 22:27:24 thanks Mavrik Jun 20 22:27:30 let's try that Jun 20 22:27:32 like most of system apps Jun 20 22:27:59 ah, see, the N5 has "Large Text" Jun 20 22:28:01 1 setting, that Google can cater for Jun 20 22:28:10 but with Samsung devices, you can set it to insane size Jun 20 22:28:19 somehow I remembered that setting padding has previously solved an equal problem Jun 20 22:28:20 and it will not take effect over a certain limit, with Gmail and others Jun 20 22:29:19 another thing I tried today, was to have a background fade out animation on click without writing any java Jun 20 22:29:59 code without code... Jun 20 22:30:01 surreal Jun 20 22:30:08 xml is code, too Jun 20 22:30:16 but you said onclick Jun 20 22:30:20 so? :) Jun 20 22:30:24 saapas, well, you still need to set padding so you'll have some space around the text Jun 20 22:30:33 and you should set it on all buttons Jun 20 22:30:35 anybody use volley to upload images? Jun 20 22:30:43 but this way the largest content-wise button dictates the layout Jun 20 22:30:48 ah, ok you want a selector as a background for some button, saapas Jun 20 22:30:50 yea,, ok Jun 20 22:30:58 asparagui, hmm, not sure if volley is the right API for upload? Jun 20 22:31:02 Odaym, didn't you know that when you're defining a layout in xml, you can set an onClick attribute to a Button in the layout. Jun 20 22:31:11 Odaym, I thought you wanted to be quiet for a while :) Jun 20 22:31:12 but you have..to write the code that onclick will do.. Jun 20 22:31:19 where you gonna write that code Jun 20 22:31:26 Mavrik: well that's sort of what i've been discovering, lol Jun 20 22:31:29 naa android has that code. I'm sure. Jun 20 22:31:34 hm? Jun 20 22:31:49 if you say onClick="someMethod", your class has to have that method defined I think Jun 20 22:31:57 Mavrik: everybody seems to be adding an apache multipart encoder and using that, is that the best approach? Jun 20 22:31:57 you shouldnt use that onClick by the way Jun 20 22:32:06 Odaym, yes. I shouldn't? Jun 20 22:32:13 asparagui, I usually just use OkHttp Jun 20 22:32:19 k Jun 20 22:32:20 yes you shouldn't Jun 20 22:32:29 why? Jun 20 22:32:34 asparagui, but thatćs because I include it anyway for downloads Jun 20 22:32:49 hmm Jun 20 22:33:02 clarity really Jun 20 22:33:11 http://stackoverflow.com/a/12203794 here's one fade in/out (that I haven't tried out) Jun 20 22:33:14 Odaym, at least argue for your position, "dont do x" is fairly worthless. Jun 20 22:33:20 "clarity" doesnt actually mean anything Jun 20 22:33:27 sure it does Jun 20 22:33:32 say you dont have a switch case Jun 20 22:33:47 and only one button that responds to "someMethod" defined inside the XML for a button Jun 20 22:33:58 you have no idea who is going to be listening to that method if you look at the code Jun 20 22:34:13 saapas, i prefer, like Odaym, to not setup click listeners in XML, because you dont get any type safety. You just write a string that may or may not work at run-time, whereas an error in a clicklistener registered in code will show itself already at compile-time Jun 20 22:34:31 what do you mean by type safety? Jun 20 22:34:42 and not getting any of it Jun 20 22:34:51 stop trying to argue with me, and read the rest of the sentence :P Jun 20 22:34:54 I did Jun 20 22:34:59 I just believe you dropped a keyword Jun 20 22:35:15 errors will be handled either way, that is not valid Jun 20 22:35:31 the error in that method will not hide if it happens, and the error in the listener will not "show itself" Jun 20 22:35:38 you will get an exact line number of where the error happened Jun 20 22:35:53 its at that point that YOU get lost with what this method is catering for, which button is it listening to Jun 20 22:35:58 so no, you're wrong Jun 20 22:36:02 it's clarity Jun 20 22:36:08 http://android-er.blogspot.in/2012/02/animate-fade-infade-out-by-changing.html Jun 20 22:36:14 maybe I'll try this out tomorro Jun 20 22:38:44 Odaym, such a black/white view of the world. "No, ur wrong". Okay then :) Jun 20 22:38:53 0daym did you see my code? Jun 20 22:39:01 plus, why mix logic with UI! Jun 20 22:39:15 XML is XML and should have nothing to do with business logic Jun 20 22:39:28 yea ctrlshftn Jun 20 22:39:39 Mavrik will definitely give you working answers :P Jun 20 22:39:43 but still, not how I'd do it Jun 20 22:39:47 Odaym good enough Jun 20 22:39:50 ? Jun 20 22:39:52 or how he would, its simply a fix to what you asked Jun 20 22:39:57 You dont *actually* need to have this mentality of wanting to argue with everyone. Dont get so emotionally involved... Jun 20 22:40:17 Odaym how would you do it? Jun 20 22:40:31 Once you start making bigger apps, having compile-time errors instead of runtime is a big deal. You dont want to introduce runtime-only bugs 15 navigation steps into your app Jun 20 22:40:35 well I used a shared object when I was trying to read audio frequency and then do something with it in the UI Jun 20 22:40:55 the thread that got the audio was working all the time, and the thread that did something with the audio was also running all the time Jun 20 22:41:11 Odaym im making this app as a data collection tool in a ML research project Jun 20 22:41:26 so I make the 2nd thread wait for real results from the first one Jun 20 22:41:52 I let it be left up to the pure delay that will be decided by the IO of when the audio is heard and when the DSP is done Jun 20 22:42:01 i dont try to make it run any faster or I will lose packets for sure Jun 20 22:42:09 cause I send that data to a hardware device Jun 20 22:42:20 if it sees incoherence it performs wrong Jun 20 22:42:21 But nice rhetoric, i will start using "clarity" as an argument for all my irrational beliefs :) thank you for the tip Jun 20 22:42:38 good point honestly liefer Jun 20 22:42:40 thanks Jun 20 22:42:59 so I had to read about locking ctrlshftn Jun 20 22:43:11 Its very nice, actually, you dont have to prove or ground your opinion at all. I like it. Jun 20 22:43:21 in iOS its very easy to declare a shared variable between threads, they decide who to run based on who is done with the variable Jun 20 22:44:31 i still dont understand how you can use async though, you are already at the mercy of the callback Jun 20 22:44:39 so you sort of put yourself in this situation Jun 20 22:44:54 wait! you do DSP Odaym ? :) Jun 20 22:45:14 present continous? no Jun 20 22:45:17 i did before Jun 20 22:45:39 you? Jun 20 22:45:44 yup Jun 20 22:45:51 can you get frequency? :P Jun 20 22:46:09 of course Jun 20 22:46:16 myFFTlib.realforward()? :P Jun 20 22:46:34 how accurate can you get it? Jun 20 22:46:50 depends on the window of FFT you choose, but it's sufficient in my case Jun 20 22:46:59 how accurate Jun 20 22:47:00 but i'm more doing the contrary, generating frequencies Jun 20 22:47:02 just cruous Jun 20 22:47:14 curious* Jun 20 22:47:45 i have no idea how accurate, but when i output in a spectrometer-like it matches the frequency Jun 20 22:47:59 i just noticed a weird drift of 1000Hz in the high freq range Jun 20 22:48:00 ah you dont have to overkill I guess with the buffer Jun 20 22:48:02 ok Jun 20 22:48:06 but haven't investigate a lot since it's not important in my case Jun 20 22:48:19 how much drift :) Jun 20 22:48:21 it's crazy what i have to do for performance, concerning buffer, thread and computations Jun 20 22:48:24 what does it come out as? Jun 20 22:48:29 (thank you renderscript) Jun 20 22:48:57 what do you mean for your last question?? Jun 20 22:49:06 you said drift on 1000hz Jun 20 22:49:09 what did you mean Jun 20 22:49:20 ah yeah, it's accurate up from 20Hz to 4000Hz iirc Jun 20 22:49:41 this is hearing, yea? Jun 20 22:49:50 then i suddenly jump/offset of +1000Hz for freq beyond 4000, so when i generate a freq of 5000 per xample, i will see that it is detected as 6000Hz Jun 20 22:49:51 very weird Jun 20 22:50:06 this is when hearing? Jun 20 22:50:30 d'oh Jun 20 22:50:32 imagine i generate a sin of 5000Hz, i run FFt against the audio Jun 20 22:50:35 i detect 6000 Hz Jun 20 22:50:37 to put it simply Jun 20 22:50:46 ah Jun 20 22:50:51 there is harmonics maybe? Jun 20 22:50:52 but this is not happening on low freq/mid-range Jun 20 22:51:02 could be aliasing, but i'm far from nyquist Jun 20 22:51:06 since samplerate is pretty high Jun 20 22:51:16 i think it's the FFT lib i'm using, simply ;) Jun 20 22:51:20 harmonics usually means double Jun 20 22:51:28 there are not many harmonic in a simple sin Jun 20 22:51:35 that you generate Jun 20 22:51:37 oh, ok Jun 20 22:51:38 other waveforms got odd and even harmonic Jun 20 22:51:43 there are so many levels though after the FFT Jun 20 22:51:44 and are more rich Jun 20 22:52:02 yeah, my goal was simply to add an accurate spectrometer but it's not accurate Jun 20 22:52:12 it isnt easy to do that Jun 20 22:52:26 let me tell you one sec Jun 20 22:52:53 i've got a sentence read to paste about DSP (not from me) Jun 20 22:52:55 "There is really no shortage of challenges to deal with in digital audio" Jun 20 22:53:01 ready* Jun 20 22:53:18 well that's everything Jun 20 22:53:35 fft.realForward(doubleBuffer); Jun 20 22:53:45 that's the first line I do Jun 20 22:53:56 lol Jun 20 22:54:01 tip of the iceberg Jun 20 22:54:42 after that enhance low frequencies Jun 20 22:54:53 after getting signal power Jun 20 22:55:01 I hope someday I will be capable of creating an ai that behaves like 8chan and with a female body Jun 20 22:55:06 perfect wife Jun 20 22:55:06 :P Jun 20 22:55:14 then HPS, and calculate HPS Peaks and enhance those Jun 20 22:55:52 after that its just custom stuff for the use case, but those are what get a good mountain graph in Numbers Jun 20 22:55:55 very clean Jun 20 22:56:04 nice to know Jun 20 22:56:39 its accurate up to 2 cents Jun 20 22:56:44 very accurate Jun 20 22:57:02 cause it was for a guitar tuner Jun 20 22:57:15 1200 cents == one octave, 12 semitones Jun 20 22:57:33 it used to jump too Jun 20 22:57:43 because of old data in how I was reading from the audio thread Jun 20 22:57:55 guitar tuner has to be tough. i'd imagine non-integer harmonics relative to the displacement of the non-ideal spring Jun 20 22:57:59 is it you who made the android wear guitar tuner? Jun 20 22:58:11 whats it called Jun 20 22:58:30 there are a few, i don't recall the name, but one is good Jun 20 22:58:36 no I made roadie tuner Jun 20 22:58:51 you can try the manual tuner part of it if you download it, you dont need the device Jun 20 22:59:20 looks nice Jun 20 22:59:28 its really neat Jun 20 22:59:40 the hardware guy is insane Jun 20 22:59:51 yeah while you were talking i saw the kickstarter project Jun 20 22:59:53 and the android app Jun 20 22:59:57 - Frequency detection range 55Hz-2200Hz (A1-C7) Jun 20 22:59:57 - Precision up to 1 cent, 0.1 Hz Jun 20 23:00:00 <3 Jun 20 23:00:02 2 cents :P Jun 20 23:00:06 ah maybe they kept working Jun 20 23:00:09 i left some time ago Jun 20 23:00:16 try the manaul tuner really Jun 20 23:00:32 with this kind of thing you get either users who want to kill you, or users who want to marry you Jun 20 23:01:23 and there's that thing where the signal power is not hte same on all androids! Jun 20 23:01:26 that is really so shit Jun 20 23:02:14 hey guys, I switched my theme from Theme.Material.Light.DarkActionBar to Theme.AppCompat.Light.DarkActionBar and now my ActionBar is gone, is this correct behavior? Jun 20 23:02:19 oh yeah, i got something for that, i'm normalizing the signal based on user wish, otherwise in a calm room, with max accuracy, the signal is very low Jun 20 23:02:27 but they can make it as it would be louder Jun 20 23:02:30 nah we tested on all Jun 20 23:02:33 and got an average :P Jun 20 23:02:42 plus the ability to change of course Jun 20 23:03:41 I know some projects are using the audio jack output to trigger thing (cause it output some mVolts), and they had this issue too Jun 20 23:03:53 yep, it has that too Jun 20 23:03:53 despite, it's not the input, but the ouput Jun 20 23:03:58 so they force the volume to be maxed Jun 20 23:04:10 but still, depending on the device, it's not the same (of course) Jun 20 23:04:23 if you have only few states to detect, it's ok Jun 20 23:04:30 sometimes you get the jack not responding on some androids too Jun 20 23:04:35 but if you want more granularity, you're pretty screwed or need to calibrate per device in advance Jun 20 23:05:00 android plateform is <3, from the dev to the user via the hardware Jun 20 23:05:04 so many issues lol Jun 20 23:06:14 oh man, rookie mistake. forgot to inherit from AppCompatActivity. Jun 20 23:06:43 adq you must use vectorScalarMultiply on the fft data Jun 20 23:06:47 at least Jun 20 23:07:00 then you can look at HPS how it works and apply that, you will get so much better results Jun 20 23:07:27 noted, though i'm not there yet Jun 20 23:07:51 its the first step right after fft Jun 20 23:08:05 no, this one is http://pastie.org/10250831 Jun 20 23:08:32 the realForward populates your buffer Jun 20 23:08:53 you run that on your buffer to new fftdata buffer that has that applied to it Jun 20 23:09:37 looks pretty expensive, but no choice Jun 20 23:09:52 each hit of the audio code im pasting from is ~3 seconds Jun 20 23:09:55 :D Jun 20 23:10:07 someone should be shot for it, but thats what it takes Jun 20 23:10:12 for the curious, about aliasing: http://imgur.com/a/SMbQA (top is with aliasing, below is without, each part is one octave higher) ;) Jun 20 23:10:35 you can see the mirroring of frequencies when there is aliasing Jun 20 23:10:41 (which is very badddd) Jun 20 23:11:08 all you need is better data im sure Jun 20 23:11:15 then you can rely on it completely Jun 20 23:11:42 i'm generating everything Jun 20 23:11:51 virtual analog synth-like Jun 20 23:11:54 girls will start to like you Jun 20 23:12:00 lol Jun 20 23:12:02 people will start giving you money Jun 20 23:12:08 just..as they walk by, they just throw it at you Jun 20 23:12:19 yea man, that's the life Jun 20 23:12:28 ok my bullshit meter has ran out today Jun 20 23:12:30 good night Jun 20 23:12:38 lol Jun 20 23:12:47 crazy Odaym Jun 20 23:15:29 Hello Jun 20 23:20:19 I have a Volley request in my Activity i want to trigger a method in attached Fragment after the request finished, Any Idea how can i do this ? Thank you Jun 20 23:23:37 Rachid_: Is your question "From an Activity, how do I call the method of an attached Fragment?"? If so, a common solution is to call FragmentManager.findFragmentById, cast the result, and call the method. Jun 20 23:24:09 There's also FragmentManager.findFragmentByTag. **** BEGIN LOGGING AT Sat Jun 20 23:28:01 2015 Jun 20 23:28:10 TacticalJoke Actually wath i did so far is: Jun 20 23:30:51 after Volley request i parse json and store the data in database to make it easy to get from the fragment: The problem is in onActivitycreated of the fragment when i read the data i get the previous data not the actual data Jun 20 23:40:24 Rachid_: Step 1: Isolate the problem. Jun 20 23:41:10 Steps 2 and 3 are not interesting enough to mention. Jun 20 23:46:53 anyone able to help with this Jun 20 23:47:12 i want Fragment:Method to be executed after Activity:method finished executing Jun 20 23:47:15 http://stackoverflow.com/questions/30959905/cannot-get-correct-x-y-points-on-bitmap-because-of-actionbar Jun 20 23:49:28 Rachid_: Didn't I answer that? Jun 20 23:51:05 lol £12,000 worth of biscuits stolen from Cwmbran factory Jun 20 23:51:34 .. to be sold on the biscuit black market Jun 20 23:52:17 Trying to imagine that amount of biscuits. Jun 21 00:11:55 finding a way to pirate hello android 4th edition has proven to be hard Jun 21 00:13:14 horny-sama good. buy it. Jun 21 00:13:43 g00s_: it is funny how the ebook version on the official site is more expensive than a used 4th on amazon Jun 21 00:13:43 TacticalJoke i think the buscuits went to Kim Jong Un, from the looks of him lately Jun 21 00:13:50 :D Jun 21 00:14:09 h****-sama: Why even read a book? It's not needed. Jun 21 00:14:09 g00s_: maybe I should buy the kindle version then crack it then refund it Jun 21 00:14:13 didn't he use them to cure aids recently? Jun 21 00:14:16 TacticalJoke: I hate videos Jun 21 00:14:21 I want readings Jun 21 00:14:22 Videos? Jun 21 00:14:30 TacticalJoke: like youtube tutorial Jun 21 00:14:35 I want readings Jun 21 00:14:38 yes readings Jun 21 00:14:58 I've only ever read the official documentation. Jun 21 00:14:59 And sourc.e Jun 21 00:15:15 TacticalJoke: never a fan of official documentation Jun 21 00:15:25 I always prefer third party stuff Jun 21 00:15:34 and yes I ahte K&R for learning c too Jun 21 00:15:37 don't judge m Jun 21 00:15:38 e Jun 21 00:15:43 or I call you bigot :P Jun 21 00:15:50 Kim looks like the Stay Puffed Marshmallow man https://www.youtube.com/watch?v=d-sALU_hveA Jun 21 00:16:09 g00s_: our great leader just found cure for aids Jun 21 00:16:17 you see north korea much advance in tech Jun 21 00:16:23 :P Jun 21 00:21:39 g00s_: fine I will buy it Jun 21 00:21:47 since my uni library does not have it Jun 21 00:22:02 horny-sama its not really a good time to buy any android book Jun 21 00:22:17 thats the only one up to date along with commonsware Jun 21 00:22:27 big nerd and reto are ... coming soon i guess Jun 21 00:23:25 g00s_: is 45 usd Jun 21 00:23:29 double the price Jun 21 00:23:39 I want to pirate that book too Jun 21 00:23:50 big nerd is august, reto is november Jun 21 00:24:34 i'd just use the web for now Jun 21 00:25:08 I wish android has better bookz on it Jun 21 00:25:15 like java or swift Jun 21 00:25:16 :P Jun 21 00:26:13 for whatever reason, maybe not as much money in writing android books Jun 21 00:26:21 maybe because they get pirated :P Jun 21 00:26:53 you want good books but don't want to pay for them, thats the problem Jun 21 00:27:18 hopefully you won't be sad when your app gets pirated too Jun 21 00:29:17 g00s_: I try the library route but it is dated Jun 21 00:29:32 g00s_: I mean in canada profs get money just writing books Jun 21 00:29:42 so they should not be allowed to double dip me Jun 21 00:30:20 and 40usd for a book. That book better be gold plated Jun 21 00:30:32 20usd is the reasonable price for bookz Jun 21 00:30:55 other than dictionary and encyclopedia Jun 21 00:32:11 Why "bookz" and not "books"? Jun 21 00:32:23 TacticalJoke: is a canadian joke Jun 21 00:32:35 like I pronounce book as boot Jun 21 00:32:40 and about as aboot Jun 21 00:32:41 :P Jun 21 00:32:53 usually z is warez Jun 21 00:33:04 what is this aboot :P Jun 21 00:33:20 you can't do hello world in canada we do eh world Jun 21 00:33:21 :P Jun 21 00:36:48 wtf Jun 21 01:27:40 hey boys Jun 21 01:27:42 i need some help Jun 21 01:28:09 im trying to take a camera photo and display the photo taken in a imagebutton Jun 21 01:29:38 http://hastebin.com/uyayofuciw.avrasm im getting the exceptions java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { }} to activity {com.parse.starter/com.parse.starter.CreatePollActivity}: java.lang.NullPointerException: Attempt to get length of null array Jun 21 01:29:50 and Caused by: java.lang.NullPointerException: Attempt to get length of null array Jun 21 01:29:50 at com.parse.starter.CreatePollActivity.onActivityResult(CreatePollActivity.java:144) Jun 21 01:29:58 can anyone provide some support?? Jun 21 01:30:32 liftedbronco: The NPE will show you exactly where in your code the bug is, read the stack trace Jun 21 01:31:07 its here Jun 21 01:31:07 File f = new File(Environment.getExternalStorageDirectory().toString()); Jun 21 01:31:07 for (File temp : f.listFiles()) { Jun 21 01:31:23 but i'm not very familiar with what im doing :*( Jun 21 01:31:41 One of these things is null, find out which one Jun 21 01:32:19 Good opportunity to learn how to use a debugger Jun 21 01:32:49 If at the start of my code I have something like String[] currentPlayer and I then create and populate the array player1, can I do currentPlayer = player1 ? Because if I run this: http://pastebin.com/WfDFWQM9 I just get the two textviews but If I run it with player1 in the place of currentPlayer, everything displays as it should. I'm not getting any errors. Jun 21 01:32:52 Can someone please help me out https://gist.github.com/anonymous/b8549232fe32e0bf9119 When my activity is fullscreen I get proper Bitmap x&y calculated however when I have a ActionBarActivity or similar I do not get correct coordinates. Jun 21 01:33:31 Only when ImageView spans across whole screen do I get the correct coordinates Jun 21 01:35:24 listFiles returning null is such a shitty corner case Jun 21 01:36:15 Yeah, unforgivable today, but back then, we didn't really know better Jun 21 01:38:36 I guessed that was what was happening, I just don't know why. Jun 21 01:46:20 hola muchachos Jun 21 01:47:13 hola chica Jun 21 01:47:36 :[ Jun 21 01:56:56 hola goat :) Jun 21 01:58:04 I wish android supports java 1 Jun 21 01:58:05 :P Jun 21 01:59:24 I'm curious if anyone here can make a solid argument for instrumentation testing with the SDK integrated testing suite than using Robolectric Jun 21 01:59:44 does anyone here actually use it? Jun 21 02:00:39 Do you mean the mocked up Android runtime where you can override all the methods? Jun 21 02:01:13 I mean "the android testing framework" Jun 21 02:01:23 looking for logic in this mad world (logic please) Jun 21 02:01:34 First order logic? Jun 21 02:01:57 logic vs madness Jun 21 02:02:04 madness for the win Jun 21 02:02:10 use madness to program instead of logic Jun 21 02:02:22 logic: I can program computers but not female Jun 21 02:02:23 :< Jun 21 02:03:30 Is anyone here familiar with RxAndroid? I'm trying to update a view in a subscriber and running into a thread exception even though I am using observeOn(AndroidSchedulers.mainThread()) Jun 21 02:03:35 the code is here http://pastebin.com/fnbbTmrc Jun 21 02:04:08 mmarklar: chart.invalidate() should indeed be running on the main thread, are you seeing something different? Jun 21 02:04:23 CedricBeust: yup Jun 21 02:04:36 let me get the exact exception Jun 21 02:04:36 Print the thread name, what do you see? Jun 21 02:04:45 should be main-1 or something like that Jun 21 02:04:50 its in a library so that w ill take a minute Jun 21 02:05:44 Also you don't really need Subscribers.create(new Action1<>()), you can just declare your subscriber to be an Action1, but that's probably unrelated to your problem Jun 21 02:06:05 i.e. .subscribe(new Action1() { ... }) Jun 21 02:07:33 CedricBeust: ok thanks didn't know that Jun 21 02:19:50 CedricBeust: thread name is 'RxCachedThreadScheduler-1'. I'm guessing I'm doing something wrong, I'm pretty tired Jun 21 02:19:56 gonna look at it tomorrow, thanks though Jun 21 02:36:25 CedricBeust Jun 21 02:36:39 I am still having the same issue i cant figure it out Jun 21 02:36:45 i tried debugging and everything Jun 21 02:38:39 goddang it Jun 21 02:38:40 Isn't it File.listFiles? Jun 21 02:39:20 thats what i have now Jun 21 02:39:20 for (File temp : f.listFiles()) { Jun 21 02:39:50 i have the right permissions and everything Jun 21 02:39:57 Check the documentation. Jun 21 02:41:10 custom duration for Snackbar doesn't work Jun 21 02:41:21 renders it pretty much useless Jun 21 02:41:49 icedp nispok works well Jun 21 02:42:05 documentation for what Jun 21 02:42:18 File.listFiles. Jun 21 02:43:15 ok so Jun 21 02:43:27 File.listFiles will return null if the directory doesnt exist Jun 21 02:43:40 what directory should i use Jun 21 02:45:01 ok this is actually getting me somewhere :P Jun 21 02:46:28 g00s_: thx Jun 21 02:48:23 anyway how do handle that snackbar undo? suppose I'm deleting something a row from database. Do I hide that item and post delayed message of to really delete it? Jun 21 02:49:19 (sorry for mistakes, need to rest probably) Jun 21 02:51:01 icedp i'd probably do a soft delete (mark a column isDeleted). if they undo it, set it false Jun 21 02:51:14 then sometime later, maybe every 30 days, you nuke the soft deleted things Jun 21 02:51:22 then garbage collect ) Jun 21 02:51:30 or put them in archive like gapps do **** ENDING LOGGING AT Sun Jun 21 02:59:58 2015