**** BEGIN LOGGING AT Tue Apr 21 02:59:58 2015 Apr 21 03:04:26 So to get a file from a Uri I have to go from Uri->bitmap->outputStream->byteStream->file Apr 21 03:04:30 is that correct? Apr 21 03:18:47 hi Apr 21 03:18:54 made a web app for use in Chrome for Android Apr 21 03:19:02 if i just run it in chrome - it's fine Apr 21 03:19:13 if i add it to homescreen, thus Chrome treats it as a full screen web app Apr 21 03:19:19 when I try and send some data it says net::ERR_ADDRESS_UNREACHABLE Apr 21 03:22:06 Can anybody help me out how to use .p21 file Apr 21 03:22:12 .p12 Apr 21 03:25:56 Anyone here have experience working with smali code? I'm trying to figure out if I can somehow log to either logcat or a file or SOMETHING to help me understand this obfuscated code I'm working with... I'm trying to find a method that I can write a hook for with Xposed framework. Apr 21 03:30:18 t0astt: JesusFreke would be the man for smali Apr 21 03:30:58 Leeds: do you have any experience with Chrome for Android? Apr 21 03:31:59 I've used it a lot... Apr 21 03:32:17 JesusFreke are you there? Also, IIRC JesusFreke wrote Metamorph, right? That was awesome. Apr 21 03:32:50 Do you know why in "web app" mode an ajax request would be failing? Apr 21 03:32:58 but in normal browser mode it runs fine Apr 21 03:33:40 i suspect maybe some caching is going on Apr 21 03:33:46 but it's just a gut feeling Apr 21 03:33:56 maybe it's being cached, not allowing a cross origin ajax call? Apr 21 03:35:47 t0astt: no, I wrote smali/baksmali, but not metamorph Apr 21 03:35:53 also #smali :) Apr 21 03:35:56 ahhh Apr 21 03:36:30 JesusFreke I'll hop on #smali and continue my question there :) Apr 21 03:36:39 Didn't even know that channel existed! Apr 21 03:37:27 ok quick question before i leave Apr 21 03:37:33 i dont think it was answered earlier when i asked it Apr 21 03:37:38 listfragment for list of notes or nah? Apr 21 03:38:10 my notes activity looks very similar to http://i.ytimg.com/vi/OoCySqneJno/maxresdefault.jpg Apr 21 03:38:25 well, it will look very familiar to that Apr 21 03:39:09 CedricBeust thoughts? Apr 21 03:42:03 i decided to tempt fate and see if my n7 would restart - it did \o/ Apr 21 03:42:12 aspire: just use a fragment or activity, your choosing with a recyclerview in it Apr 21 03:43:18 mhmm ok thanks Apr 21 03:58:03 cool http://www.wired.com/2015/04/minis-working-augmented-reality-driving-goggles/ Apr 21 04:18:11 That's a nice idea, g00s. Apr 21 04:18:20 Would be kinda fun driving with a HUD, too. Apr 21 04:18:38 i'd be happy with just blocking oncoming headlights though Apr 21 04:43:43 hi Apr 21 04:44:19 I have a java.net.SocketException: sendto failed: EPERM (Operation not permitted) when trying to send on a MulticastSocket (UDP) however I can receive just fine Apr 21 04:44:36 there isn't much documentation about it Apr 21 04:46:43 Marlinski did you see this http://www.reddit.com/r/androiddev/comments/338322/abandoning_my_mobile_app_to_focus_on_desktop_need/ Apr 21 04:48:52 g00s: no but at first view it doesn't seem to use multicastsocket, just normal udp socket Apr 21 04:50:01 seems he gave up trying to get it working Apr 21 04:50:57 Marlinski: to get the basics out of the way, because I don't know any more about multicasting: do you have the multicast permission? Apr 21 04:51:46 yes :) Apr 21 04:51:49 I can receive fine Apr 21 04:52:18 I acquired the lock, can receive but when it comes to sending it just doesn't want to hear anything ^^ Apr 21 04:52:22 groxx you multicast to irc every day :D Apr 21 04:52:37 damn the networking on android is a mess, I thought I was out of the wood now that bluetooth works fine Apr 21 04:52:47 heh Apr 21 04:52:48 it just looks like it never ends :] Apr 21 04:53:04 Marlinski ... its just the beginning Apr 21 04:53:07 I gather multicast is a bit flaky on android. most multicast apps have issues. Apr 21 04:53:12 brace yourself Apr 21 04:53:20 braced! Apr 21 04:53:39 ... packets are coming Apr 21 04:53:44 haha Apr 21 04:54:03 looks like I am going to implement multicast by hand by managing tcp connection set Apr 21 04:54:04 lol Apr 21 04:54:07 erf Apr 21 04:54:16 sounds like fun Apr 21 04:54:22 O.o Apr 21 04:54:48 did android ever get multipath tcp ? Apr 21 04:55:20 I mean Apr 21 04:55:27 if I cannot send multicast packet Apr 21 04:55:34 I will have to manage individual connection Apr 21 04:55:39 to "simulate" multicast Apr 21 04:55:51 doesn't look like it, only iOS 7 and a few others Apr 21 04:56:38 hey guise, what's does the future of android programming look like? Apr 21 04:56:50 buggy Apr 21 04:56:53 hah Apr 21 04:57:21 that is a verifiable prediction ! Apr 21 04:57:21 A lot like today Apr 21 04:57:50 what're the most cutting-edge and evolving libraries? Apr 21 04:58:11 i'm waiting for the testdroid data to see how 5.x is faring Apr 21 04:59:21 idk, I guess what i'm trying to say is: what can a new developer learn that would impress veteran developers Apr 21 04:59:26 Pwnies one library that is becoming a fixture is rxjava Apr 21 05:02:19 Pwnies then if you do http / rest, usual suspect is retrofit. maybe you can learn dagger too Apr 21 05:02:53 Pwnies: RxJava is pretty hot right now Apr 21 05:05:40 does rxjava seek to replace retrofit and dagger? it seems like the all kinda do the same thing Apr 21 05:05:47 no Apr 21 05:05:47 Pwnies lol Apr 21 05:06:03 pffffffft Apr 21 05:06:06 how did you come to that conclusion Apr 21 05:06:06 i see. Apr 21 05:06:07 Pwnies: You might want to do some research Apr 21 05:06:08 none of those three things overlap at all Apr 21 05:06:50 welp, i just read some of their docs and it seems like they all want to get rid of asynctask Apr 21 05:07:37 because asynctask is an abomination Apr 21 05:07:37 rxjava wants to fiddle with the lifecycles Apr 21 05:07:44 mmmm Apr 21 05:08:27 rxjava has nothing to do with lifecycles Apr 21 05:11:10 where do you guys learn to work with libraries? straight from the docs? Apr 21 05:11:41 docs, examples, samples, tinkering, open source libraries/apps Apr 21 05:11:52 read a lot, code a lot Apr 21 05:12:31 i feel like i get lost while reading honestly. i'll run into descriptions that i find vague, and it'll just layer up Apr 21 05:12:52 for instance: "reactive components in android applications" Apr 21 05:13:10 I love that you were telling me what outdated rubbish the BNR guide is just yesterday, mister Pwnies :P Apr 21 05:13:18 what? Apr 21 05:13:45 i said some parts were outdated Apr 21 05:14:10 and i linked to the tweet i sent bill that cleared up what was outdated and what was relevant Apr 21 05:14:25 this is true. i rescind :) Apr 21 05:14:26 i just said i learned more through coding than the bnr Apr 21 05:16:59 how long did it take you guys to get acquainted with rxjava & dagger? Apr 21 05:18:04 honestly, i wouldn't mess with dagger until you have a firm grasp on the stuff it abstracts away, like services Apr 21 05:18:20 wat Apr 21 05:18:29 it took me a few months with rxjava, to get the concepts. but architecting an app rx-like is quite a different thing - much longer ... still working on it Apr 21 05:19:04 oh ok. maybe i was setting myself up to fail when i expected to learn it in a day or two Apr 21 05:19:33 Learning and understanding are two very different things Apr 21 05:20:40 hmm maybe I am the problem, even normal UDP packets aren't sent Apr 21 05:20:52 even though I copy pasted the code you pointed me to g00s Apr 21 05:34:00 ok so Apr 21 05:34:07 sending udp packet works from one phone Apr 21 05:34:09 but not the other Apr 21 05:34:11 dayum Apr 21 05:34:52 lol Apr 21 05:35:05 if you want 2 phones to behave the same, use iOS Apr 21 05:35:22 hah no my bad Apr 21 05:35:24 it was my fault Apr 21 05:35:27 boo ! Apr 21 05:35:34 I had AFWall+ blocking it Apr 21 05:35:41 * g00s sends bad packet to Marlinski Apr 21 05:35:53 i am surprised that it throws an exception Apr 21 05:36:15 somehow it was able to detect that iptable drop the packet while there is no ACK in UDP Apr 21 05:36:23 ( '-_-) Apr 21 05:39:26 ACK is to let the other side know it received it Apr 21 05:39:51 hello Apr 21 05:40:01 yes and from the sender perspective is to know that the other side received it Apr 21 05:40:06 there is no ack in UDP Apr 21 05:40:07 it probably still has to confirm it is receiving UDP packet or not Apr 21 05:40:29 not unless you implement a acknowledgement mechanism Apr 21 05:40:31 just not with the sender Apr 21 05:41:24 i'm trying to send a message to my moto 360 using the GoogleApiClient in response to a push notification. However, in my onPushRecieve (i'm using parse.com) the callbacks in my googleapiclient never get called Apr 21 05:42:01 this is my broadcast reciever https://gist.github.com/hayksaakian/5c7c4d400d66ef12a3ea Apr 21 05:42:43 i think what might be happening is the bradcast reciever object instance gets garbage collected or something before the connection callbacks fire on the google api client Apr 21 05:42:54 so i'm wondering how to go about this. Apr 21 05:42:55 yeah finally it all works fine multicast Apr 21 05:43:05 android is not so bad after all :) Apr 21 05:43:14 the problem is often between the chair and the keyboard Apr 21 05:43:16 my use for this is sending data to a watch face Apr 21 05:43:45 Marlinski, udp has no ack, but there is a port unreach error Apr 21 05:45:12 pfnQ: this is ICMP and it assumes that the packet reach an equipment while in my case it never left my device Apr 21 05:45:34 so I assume that the kernel sent back an error Apr 21 05:45:43 when iptable dropped the packet Apr 21 05:46:08 your usual port unreach icmp response Apr 21 05:47:08 let me put my question another way: how can i send data to my android wear device in response to a push notification? Apr 21 05:47:23 do i need a separate service that's initialized by my broadcast reciever? Apr 21 05:48:54 <_genuser_> hey d00ds, what do you guys do if someone mails you an offer to interview with them on linkedin? take it seriously or just write it off and recruiters mass mailing? Apr 21 05:49:14 No harm in responding is therE? Apr 21 05:49:40 <_genuser_> CedricBeust: I was thinking the same. and an offer would be nice. but I thought I'd check to see if anyone's heard of this just being a mass mailing. Apr 21 05:50:07 <_genuser_> I should add android n00b to my linkedin. Apr 21 05:50:33 It's pretty common and usually not spam Apr 21 05:50:47 <_genuser_> nice, thank. :) Apr 21 05:51:04 <_genuser_> now do you also know how to get them to give you 120K? Apr 21 05:51:07 <_genuser_> lol Apr 21 05:51:43 Sure, be good at what you do Apr 21 05:51:49 hmm looks like i should start an intentservice from my broadcastreciever Apr 21 05:52:07 ooo Android Studio release candidate :O Apr 21 05:52:37 <_genuser_> CedricBeust: true taht. I find if you try to jump more than 10k in salary, most hiring people will not take you too seriously. Apr 21 05:52:56 What you were making at your previous job is irrelevant Apr 21 05:52:58 <_genuser_> CedricBeust: staying at the same place for too many years really does hold you back Apr 21 05:53:59 <_genuser_> I think it should be. But I've had recruiters ask me point blank. Now, I know part of hiring process tends to have a requirement of previous paychecks. Apr 21 05:54:52 Again, irrelevant. "This is what I was making then, this is what I think I'm worth now" Apr 21 05:55:49 <_genuser_> does it work? I think it will take some work to be able to say, I believe I'm work 120k. call shyness or whatever. Apr 21 05:56:19 It works if you're ready to lose that opportunity if they don't give you what you want Apr 21 05:56:21 supply/demand Apr 21 05:56:40 <_genuser_> yeah, that's true. Apr 21 05:56:55 <_genuser_> you really do have the upper hand if you're willing to walk away. Apr 21 05:56:57 It helps if you have another offer on the side. Start seeking second choices, get offers from then, then go interview to your 1st choices Apr 21 05:57:45 Never forget that the best time to interview is when you're happy at your current job Apr 21 05:58:00 <_genuser_> I'm comfortable and satisfired with current one. Apr 21 05:58:37 <_genuser_> haven't seen my teammates in years. YEARS!! saw my boss over a year ago. work with ppl all over the country over the phone, webex, blah blah, you know the drill. Apr 21 05:59:02 <_genuser_> kinda bored tho. wouldn't mind going into an office, have a schedule. Apr 21 05:59:17 If you're happy with your current job, all the more reason to interview somewhere else. You have maximal leverage, nothing to lose, you can make crazy demands Apr 21 06:00:06 <_genuser_> agreed. might be worth a shot to not only respond to this one but also update my linkedin to list all the work experience. currently it's a minimal profile Apr 21 06:00:16 I make crazy demands, then they go away Apr 21 06:00:17 heh Apr 21 06:00:31 <_genuser_> pfnQ: such as? asking for secretary? Apr 21 06:00:34 Always keep your LinkedIn profile updated Apr 21 06:00:35 <_genuser_> personal assistant? Apr 21 06:00:51 <_genuser_> question: would you interview via technologies like HireVue? Apr 21 06:01:23 <_genuser_> Kinda find it insulting and demeaning. Other may disagree. Apr 21 06:01:36 _genuser_, asking for a salary that's about equal to what I charge hourly Apr 21 06:02:51 <_genuser_> I was interview by Amazon last year. Recruiter reaches out. Then interviews me over the phone. Apr 21 06:03:05 _genuser_, that's always the first step Apr 21 06:03:27 what's HireVue? Apr 21 06:03:30 'you must migrate all systems to scala' Apr 21 06:03:37 g00s: :D Apr 21 06:03:38 <_genuser_> I told her about helping create a product for my team that sells for 250,000 to 750,000+ per customer. Apr 21 06:03:44 I am totally gonna make my app in scala Apr 21 06:03:56 g00s, nah, I just narrow shops I interview at to scala shops Apr 21 06:04:16 if HireVue involves downloading client software on my end, I'd tell them to shove off unless I reeeeally wanted the job Apr 21 06:04:28 back in 2000, I had two companies wanting to employ me... one had made an offer, the other said they couldn't really beat the salary, but they could offer a company car on top - which could be taken as a cash equivalent instead Apr 21 06:04:33 <_genuser_> told her about helping manage the product, updating major updates, being lead architect on the thing. Apr 21 06:04:53 I already had a car, didn't want another one :) Apr 21 06:04:54 <_genuser_> she was super impressed and happy from her tone. then tells me to interview a second interview via hirevue. Apr 21 06:05:28 <_genuser_> lizzie: http://learn.hirevue.com/ Apr 21 06:05:32 and what's wrong with that Apr 21 06:05:48 <_genuser_> pfnQ: you're asking me or Leeds ? Apr 21 06:06:16 unless you're seriously qualified, and I'm assuming you're not local, a video conference interview sounds perfectly reasonable Apr 21 06:06:25 agreed Apr 21 06:06:37 <_genuser_> here's the problem. hirevue allows you to divide an interview into segments. Apr 21 06:06:49 _genuser_: worthless marketing website that's aimed at the HR end anyways Apr 21 06:06:50 <_genuser_> then you can watch 20 candidates, segment 1. Apr 21 06:07:02 _genuser_: can you just tell me what it's like for the candidate? Apr 21 06:07:04 PhD friend of mine did several interviews with nec via Skype prior to coming locally to interview Apr 21 06:07:10 <_genuser_> if you do'nt like a candidate in segment 1, you don't have to listen to the rest of the interview. Apr 21 06:07:14 oh lol Apr 21 06:07:26 <_genuser_> so they can have 4 segments. and you're written off in the first. Apr 21 06:07:35 <_genuser_> they can also watch the interview at 1.5x or 2x the speed. Apr 21 06:07:39 that can make sense if segment 1 is a basic idiot-test Apr 21 06:07:49 <_genuser_> in other words their time is more important Apr 21 06:07:59 _genuser_: so do you still get interviewed by a real person to be reviewed later? Apr 21 06:08:04 or is it a mechanized review? Apr 21 06:08:10 <_genuser_> you wear a tie and jacket and sit infront of your webcam doing the interview from a pre-printed document. Apr 21 06:08:17 oh god Apr 21 06:08:29 yeah if someone tries to hirevue me I'll tell them off then. Apr 21 06:08:32 a tie? a jacket? Apr 21 06:08:37 they'll be lucky to get trousers Apr 21 06:08:37 yeah, no Apr 21 06:08:44 <_genuser_> amazon one had an "exam" that you were supposed to do in front of your webcam while runnign hirevue. Apr 21 06:09:03 i never hear good things about amazon Apr 21 06:09:06 So what? You don't care, you have a job you like, take this as an opportunity to practice and who knows, it might land somewhere good, If not, it's not going to have any effect on you Apr 21 06:09:14 so it is client software you need to run? Apr 21 06:09:25 You have leverage, this kind of thing shows while you interview Apr 21 06:09:26 Probably Web flash crap Apr 21 06:09:35 <_genuser_> CedricBeust: only that I sit in front of the camera for 2hours. they can fast foward and watch it at 2x times the speed. Apr 21 06:09:41 <_genuser_> my times if worth half as much as theirs. Apr 21 06:09:43 So... what...? Apr 21 06:10:02 Your time is free when you are not looking. You're not looking. Apr 21 06:10:10 <_genuser_> right off the bat, that's annoying. they may not even go past segment 1. which is arbitrarily decided by them. Apr 21 06:10:13 CedricBeust, that system does sound pretty shitty, it's not a video conference Apr 21 06:10:22 Can you spare a few hours to jump through their hoops? Do it now that you can do so without any pressure. Apr 21 06:10:35 I disagree with CedricBeust Apr 21 06:10:36 <_genuser_> CedricBeust: you're right in that "when I'm not looking it's all free job opportunities" Apr 21 06:10:52 a company that treats candidates like shit will probably treat employees like shit Apr 21 06:10:53 CedricBeust, I'd jump through hoops if the opportunity were the least bit interesting Apr 21 06:10:57 <_genuser_> CedricBeust: I told her, I'd do her programming exercises, but I do'nt do hirevue. Apr 21 06:11:11 CedricBeust, not if it's a position I couldn't care less for Apr 21 06:11:16 <_genuser_> she said it was fine. but later she said their developers didn't feel that they wanted to go any further at this point. Apr 21 06:11:22 Of course there needs to be a little bit of potential for a good ending but even that you usually don'tknow when you start the process Apr 21 06:11:36 <_genuser_> I solved their programming exercises, however, they didn't watch me do it realtime, so they couldn't be sure who did them. I udnerstand that. Apr 21 06:11:49 now i'm curious about this hirevue thing Apr 21 06:11:51 <_genuser_> but then again, if I can't really manage on the job, they'll find out pretty fast too. Apr 21 06:12:10 _genuser_, firing is a complicated procedure Apr 21 06:12:18 <_genuser_> pfnQ: I'll give you that. Apr 21 06:12:18 CedricBeust: the difference is in a real interview, if you're not worth interviewing anymore after the first segment, you get to stop and go home Apr 21 06:12:26 not in a startup, but most anywhere remotely not small Apr 21 06:12:46 <_genuser_> my problem is this, in an interview you're always nervous upfront but calm down as you interact with a few people. Apr 21 06:12:51 <_genuser_> you might even win them over by the end. Apr 21 06:13:04 _genuser_, interview when you don't need the job Apr 21 06:13:07 <_genuser_> but if they stop your interview after segment one (arbitrary point in the video), you might not get a chance. Apr 21 06:13:19 instant confidence, as CedricBeust has mentioned Apr 21 06:13:20 <_genuser_> pfnQ: yeah, that's what CedricBeust is saying too. interview when you're not needing it. Apr 21 06:13:55 <_genuser_> my very first job, was like that. I was nervous. I didn't know Delphi at all. they said they only interview me because I scored the highest ever on their written test which I did in c++. Apr 21 06:14:02 reminds me of Office Space after he gets hypnotized by the shrink Apr 21 06:14:28 <_genuser_> but then I told them I learnt VB on my own and had an app out there with 30,000 downloads and it made them relax. etc. etc. Apr 21 06:14:59 <_genuser_> they paid me to learn Delphi. Apr 21 06:17:47 _genuser_: you are the flappy bird developer Apr 21 06:19:24 <_genuser_> ForTheWin: eh, how? Apr 21 06:19:40 <_genuser_> his app was making like 80k per month and he took it offline. Apr 21 06:21:10 what a waste. what's his real story anyways Apr 21 06:21:20 Hello Apr 21 06:21:38 <_genuser_> he said he was tired people being glued to their phone and didn't want to contribute to it. Apr 21 06:24:37 looking at this hirevue thing, it reminds me of this https://www.youtube.com/watch?v=flLoSxd2nNY Apr 21 06:27:22 <_genuser_> g00s: at least, now that I know about it, I'll be ready to tell them I don't do hirevue. and if they have a problem with it, I'd have to politely decline their offer to interview. Apr 21 06:31:31 <_genuser_> dang how long does gcc take to compile. Apr 21 06:31:52 Don't compile it, use the prebuilt binary Apr 21 06:32:43 <_genuser_> ugh 2hrs based on previous history. It's only been 30min so far. it will be busy for another 1.5hrs. Apr 21 06:38:10 hey im' still here Apr 21 06:38:47 g00s: ? Apr 21 06:38:56 thepoosh ! Apr 21 06:39:01 <_genuser_> lol g00s you may go home now. Apr 21 06:39:01 sup dude? Apr 21 06:39:08 any idea why my intentservice isn;t starting? https://gist.github.com/hayksaakian/5c7c4d400d66ef12a3ea Apr 21 06:39:29 hephaestus_rg: is it declared in your manifest? Apr 21 06:39:29 thepoosh working hard :) any more news from google ? Apr 21 06:39:36 thepoosh: yes Apr 21 06:39:40 yeah, they gave us some feedback Apr 21 06:39:45 released a new update last night Apr 21 06:39:45 good right ? Apr 21 06:39:49 should be Apr 21 06:39:50 yes Apr 21 06:39:52 ok Apr 21 06:40:02 <_genuser_> is onPushReceive being triggered? Apr 21 06:40:09 hephaestus_rg: can you check if it's already running? Apr 21 06:40:19 IntentService is synchronized Apr 21 06:44:33 hmm Apr 21 06:44:52 oh boy, when i have to change my ragel grammar i get nervous; 'to refresh yourself, read this 70 page pdf' Apr 21 06:44:53 so if it's already running then calling this won't start a new intentservice? https://gist.github.com/hayksaakian/5c7c4d400d66ef12a3ea#file-pushnotificationbroadcastreceiver-java-L45 Apr 21 06:45:42 hephaestus_rg: if it's already in the middle of handling an onHandledIntent, you won't be able to start this again Apr 21 06:46:02 <_genuser_> the subsequent request will queue up. Apr 21 06:46:05 thepoosh: hmm! good point. is there any way to check? Apr 21 06:57:49 hephaestus_rg: put your app in debug mode (via the devices tab) and then pause the app Apr 21 07:00:48 ok so i'm running a debug session Apr 21 07:00:54 where do i pause from Apr 21 07:01:27 oh i found it Apr 21 07:10:24 morning everyone Apr 21 07:16:16 hi there gischy Apr 21 07:16:20 hi i have a few questions about sync adapter any experienced here ? Apr 21 07:16:47 so i moved my code all into the broadcastreciever and now i can't get the list of nodes because .await() can't be called from the UI thread Apr 21 07:26:10 now from the broadcastreciever i need to know if my intentservice is doing things, if it's alive, dead etc. Apr 21 07:29:11 lol gischy. good midnight to you too Apr 21 07:31:00 hephaestus_rg: I would keep an AtomicBoolean Apr 21 07:31:02 if needed Apr 21 07:37:23 hmm i'm trying to use GoogleApiClient from an intentservice Apr 21 07:37:40 but i can't because in order to get the nodes from the wearable api Apr 21 07:37:58 I use NodeApi.GetConnectedNodesResult nodes = Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await(); Apr 21 07:55:47 so, when trying to get my android project to build on jenkins, it is setting the sdk dir to the wrong location during the build... Jenkins is on a linux machine, so the sdk.dir=C\:\\Users... isnt working for the jenkins builder. Obviously, when I upload my files to jenkins, that file is going to go with the rest of the files. So, my question is, how can I eliminate the need for local.properties, such as having a variable in Apr 21 07:55:48 IntelliJ (my IDE) Apr 21 07:56:40 Can I just delete local.properties and let IntelliJ kind of just take care of itself? Apr 21 07:57:23 you must be mad Apr 21 07:57:43 why yes, indeed Apr 21 07:58:18 the local.properties must reflect the path of the SDK inside it Apr 21 07:58:20 I have a ListView populate by a SimpleAdapter. I want to store a field on each row that is not displayed but that can be accessed in my OnListItemClickListener (the ID of that row on my server's database). How can I do this? Apr 21 07:58:25 populated* Apr 21 07:58:31 you have to change it when you get to the new machine with your project Apr 21 07:58:57 jenkins takes care of the SDK dir... so, do I just make Git ignore it? Apr 21 07:59:24 it takes care of it as in it pastes its path into the local.properties file of the newly copied project? Apr 21 07:59:30 nice Apr 21 07:59:38 then you have nothing to worry about Apr 21 08:00:02 well, it doesn't paste it into the local.properties.... Apr 21 08:00:11 but jenkins has settings for the SDK Apr 21 08:00:17 then that will still be looked at and give an error, right? Apr 21 08:00:18 I assume it has some way of injecting that data Apr 21 08:00:31 yeah... idk Apr 21 08:00:44 ima try removing the local.properties from vcs. doesnt belong in there anyway Apr 21 08:01:26 its in my gitignore Apr 21 08:08:22 <_genuser_> jenkins? sounds like a butler. Apr 21 08:10:39 works quite like one. for a programmer, that is. Apr 21 08:10:42 alright so as far as i've gotten, everything looks good on the phone side Apr 21 08:10:51 but now I am having more issues with gradle... Apr 21 08:10:56 Could not resolve all dependencies for configuration ':app:_debugCompile'. Apr 21 08:11:06 i'm getting isSuccess() == true Apr 21 08:11:19 but i don't see the message on my watch Apr 21 08:15:19 ohhhhhhh i see the code example conveniently excluded the fact that i need to have a googleapiclient on the watch too Apr 21 08:47:47 having an issue with Android Studio after moving to a new PC. Project depends on AAR in my local Maven repo. I have verified the package exists there. The Project cleans and rebuilts fine. However, AS itself gives a "failed to resolve " when editing Java files that reference that library Apr 21 08:49:29 synced gradle? Apr 21 08:50:26 ? Apr 21 08:51:00 have you synced gradle and made sure its fetching your lib correctly? or how did you verified that the package exists in your local maven Apr 21 08:51:16 I just look in the directory of the local maven repo and its there Apr 21 08:51:38 check if gradle fetches it correctly Apr 21 08:51:49 how? Apr 21 08:53:59 there is a button in AS Apr 21 08:54:34 in the menu bar the green gradle dot with arrow down Apr 21 08:54:52 or tools -> android -> sync project with gradle files Apr 21 08:56:19 that did it, thanks! Apr 21 08:56:54 so what exactly was the problem then? Apr 21 08:57:28 AS has some sort of internal cache for this that doesn't get cleaned with the "invalidate caches" option/ Apr 21 08:58:09 the cache is not related to gradle repositories Apr 21 08:58:29 you simply didnt "download" the repositories into your project Apr 21 08:58:39 is it possible to have a 3 position switch ? Apr 21 08:58:43 but building via gradle itself worked fine? Apr 21 08:59:49 hey, im using that for progresswheel https://github.com/Todd-Davies/ProgressWheel Apr 21 09:00:11 and it gives me an error, attribute "radius" already defined. Apr 21 09:00:35 and there is no radius the path it show me Apr 21 09:00:44 Chainfire, im not that much into it so dont quote me on that: although gradle does all the work, AS needs to be synced with gradle. so when gradle has fetched the libs, it needs to tell AS "hey! all libs are here and ready!". With the sync button you tell gradle to download all needed libs and then tell AS that everything is fine Apr 21 09:01:18 well, it'll have to do then :) Apr 21 09:01:25 never had to use this button before Apr 21 09:02:50 Chainfire, after editing build.gradle there usually appears a yellow bar on top of the file telling you that it needs to sync or that its currently syncing Apr 21 09:02:52 ever noticed that? Apr 21 09:03:20 yeah Apr 21 09:03:29 then a normal file->synchronize works Apr 21 09:04:34 in future, you sound use the gradle sync button instead of file-sync Apr 21 09:05:14 they maybe do the same, but the gradle sync button is the one dedicated for that (might be than a file sync) Apr 21 09:06:42 Marlinski, you could use radiobuttons Apr 21 09:08:05 Hi all... I'm developing VR app using Google Cardboard SDK... cool stuff but I'm having a hard time debugging, I was hoping I could get some help here Apr 21 09:08:29 I first try to import a project I've built in Unity 4.6 Apr 21 09:11:34 danijoo thanks, I'll use that button from now on Apr 21 09:12:44 is it necessary to define maxSdk if i have 2 apk files in the play store? Apr 21 09:13:07 thepoosh, no Apr 21 09:13:21 even if I want them for different api levels? Apr 21 09:13:31 play store checks what apks are available for the phone, and then use the one with the latest versionCode Apr 21 09:13:54 i want to have one apk for api < 15 and one for api > 16 Apr 21 09:14:34 thepoosh, that makes no sense. you want to serve everything but NOT 15 and 16? Apr 21 09:14:46 :S Apr 21 09:14:54 i meant one until 15 and one starting 16 Apr 21 09:16:18 you can either set maxSDK on the <=15 apk, or just upload both and always be sure that versionCode of the apk>=16 is higher than versincode of the 15-apk Apr 21 09:16:54 what is the best way to get current location only not the last knows or etc.. ? Apr 21 09:16:57 so I am allowed to ignore the maxSdk instead of setting it for the lower target apk? Apr 21 09:17:08 yep Apr 21 09:17:12 yay! Apr 21 09:17:26 if more than one apk is available, google will just serve the one with the latest versioncode Apr 21 09:17:50 you could for example start with versioncode 10000 for the 15-apk and versioncode 50000 for the 16-apk Apr 21 09:17:58 yes Apr 21 09:18:02 fine, thanks Apr 21 09:18:05 when you increment your build, this will make sure the 16th apk is always bigger than 15 Apr 21 09:18:22 http://developer.android.com/google/play/publishing/multiple-apks.html Apr 21 09:19:37 what is the best way to get current location only not the last knows or etc.. ? Apr 21 09:20:35 i dont understand that sentence :/ Apr 21 09:27:34 danijoo: is there a way to update just one of those apks? Apr 21 09:27:42 or do i have to upload 2 every time? Apr 21 09:27:57 can i upload 2 apks to beta and then promote them to production? Apr 21 09:28:04 what about staged rollout? Apr 21 09:29:32 do any of you guys have any idea on how to validate linkedin token and secret from the old api on server side? Apr 21 09:29:39 the one retrieved in android Apr 21 09:29:43 linkedin-j library Apr 21 09:29:44 thepoosh, you can do that all for a single apk Apr 21 09:30:33 i don't understand the answer Apr 21 09:30:43 thepoosh, the answer is yes :P Apr 21 09:30:47 oh Apr 21 09:30:49 thanks Apr 21 09:30:52 :P Apr 21 09:46:38 I'm using Timber for logging so that it automatically inserts the TAG and automatically disables logging in the release APK. However the log messages are appearing ten times. Has anyone had this problem? Apr 21 09:52:06 all of them? Apr 21 09:53:38 hey Apr 21 09:53:45 anyone using Gradle here ? #gradle is silent. Apr 21 09:53:55 people Apr 21 09:54:20 Is it possible, using one Gradle project, to generate a .jar (PC version) and an .apk (Android version) ? Apr 21 09:54:43 i can't pass bytes array to intet and get in back. Here is code: http://privatepaste.com/45f55fbde5 Apr 21 09:56:07 can you tell me why commented code is working, but code with byte array - not? Apr 21 09:56:17 ans shit Apr 21 09:59:41 ondroed, http://imgur.com/jacoj Apr 21 10:00:58 your onNewIntent seems to be wrong. Apr 21 10:01:12 try final byte[] bytes = intent.getByteArrayExtra(Timer.EXTRA_TIMERDATA); Apr 21 10:02:09 you get a new intent in onNewIntent, and you must use this intent to get your data from Apr 21 10:02:30 you are currently creating a new empty intent with Intent.parseUri and try to get the bytes from this empty one Apr 21 10:03:34 timerIntent.getByteArrayExtra Apr 21 10:03:48 which create from Intent.parseUri(intent.getData().toString(), Intent.URI_INTENT_SCHEME); Apr 21 10:04:23 *created Apr 21 10:06:07 use intent.getByteArrayExtra, not timerIntent Apr 21 10:06:19 you must use the one you get from the method params Apr 21 10:06:37 onNewIntent(Intent intent) <<<< this one Apr 21 10:08:14 danijoo: :* Apr 21 10:08:36 i thought that i must recreate intent from uri.. Apr 21 10:09:03 i mean from data Apr 21 10:09:03 nope. the intent you receive is a copy of the one you you send Apr 21 10:09:09 it has all extras and stuff in it Apr 21 10:09:39 Attribute "radius" has already been defined, how can i fix this conflict ? Apr 21 10:19:29 I have button with width match_parent and the button text is aligned center. If i use drawableLeft attribute on button, the text is moved to the right. But i want to keep my button text aligned center. How can I do that Apr 21 10:25:17 anyone ? Attribute "radius" has already been defined, how can i fix this conflict ? Apr 21 10:27:30 sci-fic: don't define it twice Apr 21 10:27:41 thats the problem i didnt Apr 21 10:29:58 is it possible to rotate a menuitem (rtl) icon without a custom view? Apr 21 10:49:47 what would be the best approach to run query to backend every a few second? Timer, Handler? TimerTask? Apr 21 10:51:17 ScheduleExecutor? Apr 21 10:52:22 ondroed: isnt too heavy? Apr 21 10:52:44 but reliable Apr 21 10:53:29 so something like http://stackoverflow.com/questions/10059335/android-repeating-task-does-not-work ? Apr 21 11:04:25 Attribute "radius" has already been defined,how can i override one of them ? it is not giving a path Apr 21 11:08:04 SneakerXZ: http://developer.android.com/reference/java/util/concurrent/ScheduledExecutorService.html Apr 21 11:08:21 ondroed: but it will not run on main thread? Apr 21 11:08:44 you need it on main thread? Apr 21 11:08:47 yes Apr 21 11:12:08 ScheduledFuture task = executor.scheduleAtFixedRate(new Runnable(){ mainThreadHandler.sendEmptuMessage(TICK_MESSAGE); }); Apr 21 11:14:11 then you can use task.cancel() to stop tath task to repeat Apr 21 11:22:55 Hello Apr 21 11:23:02 Is there any easy way to simple but pretty UIs? Apr 21 11:23:17 That's the thing I struggle most with and I was wondering if there is some simple library that can help take over the UI Apr 21 11:24:14 you mean design or coding ? Apr 21 11:24:30 dvass, there is no tool for instant awesome UI, it's hard work Apr 21 11:24:46 njcomsec: design Apr 21 11:24:52 darken: well is there something to assist me in that Apr 21 11:24:59 yes material design guidelines Apr 21 11:25:06 every UI should be custom buit to suit your app's functionality Apr 21 11:25:12 built* Apr 21 11:25:23 in my opinion Apr 21 11:25:43 njcomsec: Yeah, like I get that. It's just I wish there was a tool to assist Apr 21 11:25:46 like I have a simple requirement Apr 21 11:25:55 a list, each list item to have x, y and z Apr 21 11:26:08 in order to make it look nice it seems to be quite a challenge Apr 21 11:26:17 use paint.net or something Apr 21 11:26:28 you should design the UI in a graphics program before trying to code it Apr 21 11:26:49 dvass, there are some libraries with styled listviews, just using all premade libraries will not automatically make a good looking app Apr 21 11:29:47 seems like you need to eperate the UI design into more stages than you do now Apr 21 11:29:59 like wireframe -design -coding Apr 21 11:31:21 njcomsec, well for a nice listview that may be a bit overkill ;) Apr 21 11:31:43 follow MD guidelines, moar whitespace, padding, alignment and it already looks pretty good Apr 21 11:36:04 hmm okay, I'll look up the guidelines and attempt to stick to them. Apr 21 11:59:53 camera.takePicture() always seems to return an unrotated jpeg picture, even if I set the display orientation. How am I supposed to make the jpeg correctly rotated? Apr 21 12:00:16 I have a byte array containing the jpeg data, I don't want to store any files. Apr 21 12:00:45 in camera parameters you have setRotation Apr 21 12:00:50 displayRotation is for display only Apr 21 12:01:08 i guess it takes the same arguments Apr 21 12:02:07 wow Ashiren I hope it's that easy :) Apr 21 12:02:08 * Chetic tries it Apr 21 12:03:20 didn't really seem to do anything Apr 21 12:03:48 did you do camera.setParameters() afterwards Apr 21 12:04:11 yes Apr 21 12:05:00 hmm then try to provide some random values in setRotation and see if it reacts Apr 21 12:05:08 added it to the bottom of this file: https://github.com/Chetic/Phishpic/blob/master/app/src/main/java/com/phishcave/phishpic/CameraPreview.java Apr 21 12:05:11 or.. how do you know jpeg image is not rotated? Apr 21 12:05:23 I upload it to a web page and display it Apr 21 12:05:48 what am I doing wrong when getting sensors? https://gist.github.com/mlatu/0fec760087c20725ba2e And still I've got crash on line https://gist.github.com/mlatu/5d54a354198534e8377a#file-getdefaultsensor-L9 Apr 21 12:06:19 (1 crash reported, not on every device) Apr 21 12:07:58 [14:05:15] Message(474): ##java Cannot join channel (+b) - you are banned... Reason: I accidentally posted code when I though I copied the link. That you even get banned for this shit, please just kick me while my flood control is flipping the fuck out. Apr 21 12:07:59 and where is setRotation :? Apr 21 12:08:31 I haven't pushed that to github yet since it's not working Apr 21 12:08:39 but it's at the very bottom of the last function Apr 21 12:08:45 Camera.Parameters params = mCamera.getParameters(); Apr 21 12:08:45 params.setRotation(result); Apr 21 12:08:46 mCamera.setParameters(params); Apr 21 12:09:29 see the jpeg exif Apr 21 12:09:36 maybe browser doesnt respect that Apr 21 12:10:04 aah Ashiren that's it! Apr 21 12:11:19 I'll just ask the guy writing the server code to start caring about exif orientation data :D Apr 21 12:15:18 icedp: well what kind of error. maybe the device has neither of both Apr 21 12:16:32 Ashiren: if it has both surely it will return at least one. If it has neither doesn't it respect manifest? Apr 21 12:16:56 if i wanted to i would install app that requires BLE on nonBLE device Apr 21 12:19:22 Hello Apr 21 12:19:27 good afternoon Apr 21 12:19:42 When will the Android runtime have, at long last, the JSR 203 API? Apr 21 12:21:39 i am more and more disappointed with subsequent android studio updates... Apr 21 12:24:37 Seriously, though; JSR 203 has been there since 2011 and it's so much better than java.io.File that it's just laughable nowadays to use File unless you are _forced_ to; and the latest Android SDKs do force you to Apr 21 12:25:31 Hi Apr 21 12:26:04 in my app I catch when there is no internet connection, that works fine Apr 21 12:26:28 welcome to android world Apr 21 12:26:48 but how can I catch a error, when a json dowload is incomplete Apr 21 12:28:20 Ashiren: it's some nonamish device that states it has accelerometer. Looking at the sources, getDefaultSensor(type) return null iff getSensorList(type) return an empty list Apr 21 12:29:03 so I get a file, it exist, but it is not complete, cause some data are missing... Apr 21 12:29:07 Ashiren: so it looks like it's on manufacture's side Apr 21 12:29:57 if (!json.isNull("standings") || json != null) { Apr 21 12:29:59 does not work, the application dies Apr 21 12:30:11 and what exception it throws Apr 21 12:30:41 npe Apr 21 12:31:15 well why you check is json is null in second statement Apr 21 12:31:19 it should always be first Apr 21 12:32:14 the the npe is for something like that: e.getString("3") Apr 21 12:32:14 he serach it, but did not found Apr 21 12:32:17 ok I try it Apr 21 12:34:14 what happens to services which are in middle for their execution, when someone quits the apps? Apr 21 12:35:07 Venus_Mars, read this page: http://developer.android.com/guide/components/services.html Apr 21 12:36:16 Venus_Mars: if started by start, service keeps running Apr 21 12:36:48 Venus_Mars: if started by bind, service would stop, or would stop after it finishes the execution Apr 21 12:36:56 getActivity().startService(); Apr 21 12:37:06 I am starting the service by ^^ Apr 21 12:37:17 ^^ Apr 21 12:37:29 thanks adq and Ashiren Apr 21 12:42:17 "Caution: A services runs in the same process as the application in which it is declared and in the main thread of that application, by default. So, if your service performs intensive or blocking operations while the user interacts with an activity from the same application, the service will slow down activity performance. To avoid impacting application performance, you should start a new thread inside the service." Apr 21 12:42:32 if the service is running under the same process Apr 21 12:42:38 and if we exit the app Apr 21 12:42:45 doesn't the process gets killed Apr 21 12:42:54 and eventually the service also gets killed? Apr 21 12:43:00 finally my app is not crashing after connecting debugger since I upgraded to 5.1 Apr 21 12:43:16 ok just a: if (json != null){ Apr 21 12:43:17 catch the error, thx Apr 21 12:50:11 Venus_Mars: app doesnt exit until all activities or services are gone Apr 21 12:50:30 if service still alive, so is the app Apr 21 12:54:30 Can someone show me an example of a ListView considered to be well designed? Apr 21 12:54:46 the code + design preferably so that I have something to base mine off Apr 21 12:57:06 too simple to give it to you like that, dvass Apr 21 12:57:08 do it yourself Apr 21 12:57:13 you can get help here Apr 21 13:09:24 Dam it. Keep DCing Apr 21 13:09:32 Odaym: I have but it looks terrible. Apr 21 13:09:48 Odaym: The layout of each item is literally a string and a button Apr 21 13:10:02 but it just doesn't look very nice. Apr 21 13:10:16 then change the design Apr 21 13:10:25 there's no standard with these things Apr 21 13:12:03 mm guys I'm discovering a strange behavior on my nexus 4 lollipop I got serveral google play services crashes and this: http://pastebin.com/7CNxT663 Apr 21 13:18:05 Would you recommend using vanilla Android for development? Apr 21 13:19:00 Odaym: Yes but that's why I wish to see someone with brilliant design Apr 21 13:19:02 for testing you mean Apr 21 13:19:12 there's tons of apps with good looking listviews, dvass Apr 21 13:19:20 open source ones/ Apr 21 13:19:25 why open source? Apr 21 13:19:41 to look at the code? it's easy to replicate them Apr 21 13:27:07 Odaym: Yes to replicate. Apr 21 13:27:12 Maybe for you but not for me Apr 21 13:27:22 I'll help, pick anything Apr 21 13:27:24 I am very inexperienced with designing UIs on android Apr 21 13:27:27 2ez4me Apr 21 13:27:30 Okay Apr 21 13:28:59 http://36.media.tumblr.com/5c830f62fcfbdcc2934017130ac1f3b2/tumblr_ndz7nqlRBE1r2wjwko2_1280.png Apr 21 13:29:21 Odaym: Just the top half, above yesterday Apr 21 13:29:29 you can tell what that is man Apr 21 13:29:34 what do you see in each row? Apr 21 13:29:54 ListViwe Apr 21 13:30:05 but the design of each List Item is what I struggle with Apr 21 13:30:09 no, you see a picture with two textviews to the right of it Apr 21 13:30:14 that's what you see in each row Apr 21 13:30:18 of the listview Apr 21 13:30:20 yes Apr 21 13:30:24 but getting the spacing right Apr 21 13:30:36 how do you do that? I end up having tons of problems over different screen sizes Apr 21 13:30:49 you use dp next to the numbers you give to the spacing parameters Apr 21 13:31:00 paddingRight/Left/Top/Bottom/etc... = "20dp" Apr 21 13:31:02 I do use dp Apr 21 13:31:15 which is why I'm confused as to why it'd happen Apr 21 13:31:20 or you can place those dp's in a dimens.xml file Apr 21 13:31:28 that items will clash on different screens Apr 21 13:31:35 that will guarantee that they are the exact same amounts wherever you go Apr 21 13:31:37 and what's the today thing with the filter button? Apr 21 13:31:49 listview header Apr 21 13:32:00 most probably Apr 21 14:03:42 can someone help me understand why com.android.systemui would be getting OutOfMemoryExceptions when I have Free RAM: 497138 kB (141618 cached pss + 278036 cached + 77484 free)? Apr 21 14:04:25 dalvikvm-heap﹕ Clamp target GC heap from 48.305MB to 48.000MB Apr 21 14:04:29 dalvikvm-heap﹕ Forcing collection of SoftReferences for 2073616-byte allocation Apr 21 14:04:34 dalvikvm-heap﹕ Clamp target GC heap from 48.168MB to 48.000MB Apr 21 14:04:40 dalvikvm-heap﹕ Out of memory on a 2073616-byte allocation. Apr 21 14:05:01 are processes limited to 48MB? Apr 21 14:05:18 lhunath: depends on device Apr 21 14:05:55 it's showing the PSS for com.android.systemui at 81483 Apr 21 14:06:23 is there any kind of decent manual to how memory management works on android? Apr 21 14:10:47 lhunath: no idea what you consider decent, but here's something https://developer.android.com/training/articles/memory.html Apr 21 14:10:52 Odaym: Are you still around? Apr 21 14:11:01 yea Apr 21 14:11:02 Odaym: If you go here http://www.google.com/design/spec/components/lists.html#lists-specs and look for "Avater with text" Apr 21 14:11:06 there is some specs there given Apr 21 14:11:29 it says tile height is Tile height: 72dp Apr 21 14:11:30 alright Apr 21 14:11:33 I see them Apr 21 14:11:40 what is that referring too? Apr 21 14:11:47 as in, where do I set that? Apr 21 14:11:51 Is it a property of ListView Apr 21 14:11:54 or in my Item layout Apr 21 14:12:02 do I set the RelativeLayout height to that? Apr 21 14:13:15 tile height? Apr 21 14:13:21 what's a tile? a row? Apr 21 14:13:27 I believe so Apr 21 14:13:32 I'll confirm, sec Apr 21 14:13:39 then yes that's the height of the relative layout that will include those elements Apr 21 14:13:49 people follow that stuff? Apr 21 14:13:56 A list consists of a single continuous column of tessellated sub-divisions of equal width called rows that function as containers for tiles. Apr 21 14:13:56 Tiles hold content, and can vary in height within a list. Apr 21 14:14:06 it's called a row Apr 21 14:14:38 that document seems so useless Apr 21 14:14:44 how come? Apr 21 14:14:57 cause I havent used it Apr 21 14:15:01 so I just dismiss it as useless Apr 21 14:15:07 flawless logic bro Apr 21 14:15:24 guys im creating a progress bar, and it should be incremented like there is a animation Apr 21 14:15:32 how can i do that ? Apr 21 14:16:08 i made some research , async task or threads but i didnt do it yet Apr 21 14:16:22 Depends what you're doing Apr 21 14:16:36 downloading images Apr 21 14:16:43 and showing total progress Apr 21 14:17:13 When you download it do you keep track of progress in any wawy? Apr 21 14:17:24 yes Apr 21 14:17:26 if so, just set the progress bar in any callback events for the updater Apr 21 14:17:45 then it'll continually update the progress bar as it downlaods Apr 21 14:18:29 something like this,eg there are 5 images 360/5 is my unit (360 degree circle) Apr 21 14:18:41 i wait for a photo downloaded Apr 21 14:19:47 i make a loop i = 0 and i < unit (which is 72 now) Apr 21 14:20:14 it puts 72 too fast, i need to make it a bit slowly Apr 21 14:20:46 sci-fic: why not use something like ObjectAnimator? :) Apr 21 14:21:02 idk what it is :D let me check Apr 21 14:21:35 http://developer.android.com/guide/topics/graphics/prop-animation.html#object-animator Apr 21 14:22:13 sorry back Apr 21 14:22:27 sci-fic: maybe then just make it track from 72 to 100 Apr 21 14:23:40 so 72 corresponds to 0 Apr 21 14:23:42 100 to 100 Apr 21 14:23:50 just you need to adjust the scale now Apr 21 14:27:53 i didnt get it :D Apr 21 14:32:03 @all: hello community. If i have a ListView mapped to a ContentProvider using a CursorAdapter, should I have to explicitly call getLoaderManager().restartLoader when the database is modified? Apr 21 14:32:30 cause without doing so, my list view is not being updated Apr 21 14:33:45 appel1:object animator not what i need i guess Apr 21 14:34:29 btw, my ContentProvider insert calls "getContext().getContentResolver().notifyChange(uri, null);" after every "db.insert" Apr 21 14:37:03 You need to make sure your ContentProvider sets a notificationUri on the Cursor when querying Apr 21 14:39:30 SimonVT, cursor.setNotificationUri(getContext().getContentResolver(), uri); Apr 21 14:39:38 SimonVT, thx Apr 21 14:40:58 Hello Apr 21 14:44:27 I have some troubles with TableLayout Apr 21 14:44:34 i could i do that : http://snag.gy/lU2Nt.jpg Apr 21 14:45:05 the yellow that regroup 2 cells, but i dont know the size of the cells cause they are on wrap_content Apr 21 14:45:18 so i dont know what size assign to yellow Apr 21 14:45:37 mtR_: What Apr 21 14:45:42 is going in it Apr 21 14:45:48 pictures? Apr 21 14:46:38 sorry got dced Apr 21 14:46:42 its text values Apr 21 14:47:30 sounds fun: https://github.com/davityle/ngAndroid, did any one already tried it ? Apr 21 14:47:43 mtR__: what's wrong with wrap_content Apr 21 14:47:57 nothing Apr 21 14:48:10 the white cells are on wrap_content Apr 21 14:48:27 but i want the yellow cells to align to the white Apr 21 14:48:44 like in the picture Apr 21 14:49:02 but what size assign to yellow ? Apr 21 14:49:09 what width* Apr 21 14:57:15 mtR__: Same as the white cells below it Apr 21 14:58:09 yiati: what? Apr 21 14:59:19 TableLayout makes all columns equal width Apr 21 14:59:27 If that doesn't happen, you're probably using it wrong Apr 21 15:00:27 SimonVT: yes it does, but i want a column to have the width of 2 Apr 21 15:01:02 like on this picture : http://snag.gy/lU2Nt.jpg, the yellow cell has a width of 2 white cells Apr 21 15:01:07 It lets you define how many columns a cell spans Apr 21 15:01:15 I don't remember the attribute Apr 21 15:01:26 mtR_: "The width of a column is defined by the row with the widest cell in that column" - http://developer.android.com/reference/android/widget/TableLayout.html Apr 21 15:02:10 SimonVT: span seems to be what im looking for Apr 21 15:02:35 thx ill try to find a way :) Apr 21 15:05:27 wonderfullllllllllllllllllllllll Apr 21 15:05:40 i love this channel so much Apr 21 15:07:20 mtR_: figure it out? Apr 21 15:08:27 yiati: i just had to put span = 2 if i want a cell to have size of 2 cells Apr 21 15:08:38 yawkat: instead of tryharding with width manually Apr 21 15:09:03 mtR_: nice Apr 21 15:09:18 =) Apr 21 15:21:58 i'm using Theme.AppCompat and i've set my colorPrimary, colorPrimaryDark but the statusbar on my L device is still black... Apr 21 15:22:39 alexfu: did you set the attributes without the android: prefix.. and make sure you inherit from ActionBarActivity Apr 21 15:23:09 Napalm: Yes to both Apr 21 15:23:32 well you have another issue then Apr 21 15:23:45 verify your activity is using the right theme at runtime Apr 21 15:23:53 in onResume add a getTheme Apr 21 15:24:58 use Resources.getResourceName and dump the result to Logcat Apr 21 15:28:46 Napalm: using the theme res id for getResourceName ? Apr 21 15:32:23 yes so you can see which theme your activity is using Apr 21 15:35:15 Napalm: how do I get the current theme res ID through getTheme? Apr 21 15:37:40 alexfu: sorry, i assume you could get the ID.. damn it. you can override setTheme() on your Activity and log in there the parameter Apr 21 15:37:42 what are some good mockup tools that I can use to create an app design with a remote team? Apr 21 15:38:06 other than that.. go though all the places in your code where you might alter/change the theme and also check the manifest is refererring to the correct theme Apr 21 15:38:51 Napalm: good idea. Apr 21 15:39:00 on the override set theme Apr 21 16:01:12 x86+arm hybrid CPUs are on the horizon Apr 21 16:01:35 it cannot come soon enough.. been a real pain in the ass to run emulator64-arm on an x86 Apr 21 16:03:23 If you have the position in the adapter of a child view inside of a RecyclerView, how do you know what child number it is because childCount is constant if your screen is full. You could be scrolling down and the child at position 0 of the RecyclerView could be position 5 of the adapter. Apr 21 16:04:16 Oh getChildAdapterPosition... Apr 21 16:07:09 cybrNaut: why not run emulator-x86 or if you use arm libs then just real device? Apr 21 16:08:15 Muchoz: there is a function you need to overwrite: onBindViewHolder(). Second parameter of that function is an int which is the position. Apr 21 16:08:22 hi Apr 21 16:08:34 anyone alive? Apr 21 16:08:52 claint, I'm not doing this from within an adapter. Apr 21 16:09:09 Muchoz: your question is not clear to me, then. Apr 21 16:09:46 anjumkaiser: nope Apr 21 16:09:50 Muchoz: Do you have a RecyclerView as an element inside another adapter, or is another adapter inside each view of your RecyclerView? Apr 21 16:09:57 I'm creating a ClickListener that detects what section it is in (I have sections in my RecyclerView adapter) and fires an event if so. Apr 21 16:10:19 icedp: from a security researching standpoint, most apps are impure java, only for arm, and yet there is a need to run them in an emulator to sniff the traffic on a desktop, for example Apr 21 16:11:09 folks, I have a question regarding ussd functionality Apr 21 16:11:52 icedp: perhaps it's rare to run someone elses android apps in an emulator Apr 21 16:11:59 anjumkaiser: it's unlikely that anyone will be able to answer your question unless you ask it... Apr 21 16:12:04 but for me, it's normal Apr 21 16:12:11 my android is old, and non-rooted Apr 21 16:12:53 cybrNaut: can't you just sniff traffic on your wi-fi? Apr 21 16:13:40 Muchoz: I don't know the correct way, but I am guessing you are supposed to set your listeners in your viewHolder class? then you probably need to pass the position to it from the onBindViewHolder() again somehow? Apr 21 16:14:56 icedp: my device is capped on Android 2.3. So many apps will not run on it. But even if I had a current droid, I would prefer to keep the dodgy/untrustworthy bits sandboxed in a VM Apr 21 16:15:08 cybrNaut: still, I'm not arguing against hybrid CPUs, of course. would be cool Apr 21 16:15:45 yes, I hope it gains some ground, and particularly on the linux side of things Apr 21 16:15:46 Muchoz: I just used RecyclerView first time today, so that is my take on it. Apr 21 16:16:41 there are also apps which exist for android but not the desktop Apr 21 16:16:46 e.g. most banking apps Apr 21 16:17:48 banking websites suck-ass, so I run their apps in an android emulator on my desktop (I can also force them to go over tor that way, which is impossible on a non-rooted droid) Apr 21 16:19:22 I have a project regarding USSD, where I am supposed to dial a ussd sequence and build a wrapper over the menu that is provided, the only thing I can find is the ussdinterceptor and even that is not working due to IExtendedNetworkService being disabled on android 4.2.2 and above, I have tried with a sony phone with android 4.1.2 and it also doesn't work there Apr 21 16:20:28 I have read on many places that community has built up solutions around for this, but I don't seem to find anything, I was wondering if someone can help me on this Apr 21 16:28:34 Napalm: figured it out... targetSdkVersion was not set. I set it to 22 and it works now Apr 21 16:30:03 i wonder if this is expected behavior Apr 21 16:30:07 can anyone point me to tips on linking a precompiled static library with .o dependent files into an NDK project? Apr 21 16:42:52 Parcelable support coming to an @AutoValue near you, https://github.com/google/auto/pull/87 Apr 21 17:05:25 claint, I've got it working! AAAAHAHH FINALLY Apr 21 17:05:30 And he left Apr 21 17:06:03 onSectionClick event works! Apr 21 17:13:19 new one https://www.youtube.com/watch?v=Pd49vTkvu0U Apr 21 17:13:29 Im gonna be on there some day Apr 21 17:13:34 you just wait Apr 21 17:13:38 a 100 years Apr 21 17:13:39 and you'll see Apr 21 17:17:07 Odaym: GL Apr 21 17:17:18 ez bro Apr 21 17:17:27 just need 4 more developers and a great idea Apr 21 17:18:04 I don't knew the game. seems to be very engadging Apr 21 17:18:28 it's more about the company, that's just one of their games Apr 21 17:18:37 oh maybe I think they highlight also their hit game, not just any game Apr 21 17:19:39 I'm trying to implement a camera preview as shown here: http://developer.android.com/guide/topics/media/camera.html however, as soon as I add any linear layouts to my layout(demo only includes a framelayout and button) then a white background is overlayed over my camera preview. any ideas for how to fix? Apr 21 17:20:40 what you linked to is a huge page, man Apr 21 17:21:24 Odaym: it is the "Creating a preview class" section, and the layout I'm talking about is in "Placing preview in a layout" Apr 21 17:23:20 https://code.google.com/p/android/issues/detail?id=169369 Apr 21 17:23:26 screw it, submitted the bug I ran into from yesterday Apr 21 17:24:05 more like a 0day Apr 21 17:24:12 like ME! Apr 21 17:27:05 Anyone have any suggestions on above issue? Apr 21 17:28:32 mendozao: post your layout file? I suspect it's just a layout problem Apr 21 17:32:11 groxx: https://gist.github.com/anonymous/01b3344c2d24467bb1fd Apr 21 17:33:12 groxx: in the first version i've tried, my content is a child of the camera_preview frame layout. In the second version that I tried, the content is a not a child of the framelayout Apr 21 17:34:43 ah. it depends heavily where the preview is actually going :| fwiw there's a lot of unnecessary nested-layouts in there, and you're misusing layout_weight and weightSum Apr 21 17:35:14 what are you trying to make? Apr 21 17:36:01 groxx: Basically the app has a custom camera skin to it that i am trying to apply: http://screencast.com/t/YAXsEIgtKt Apr 21 17:38:15 groxx: can you elaborate on it depends heavily where the preview is actually going Apr 21 17:39:30 to put it bluntly, because the layout doesn't make much sense :) and something is drawing over the preview, so you're either adding it to something earlier in the xml layout, or it's not going where you expect. Apr 21 17:42:18 groxx: can you explain why in google's example the button was not a child of the framelayout? https://gist.github.com/anonymous/2fedf42633d62c0f8ed9 Apr 21 17:43:00 because if you put it in the camera_preview, then used addView(surfaceView) like they show, the surface view would be drawn over the button Apr 21 17:46:32 mendozao: try something like this: https://gist.github.com/Groxx/f69193745550f00d75ab Apr 21 17:47:47 layouts don't _usually_ let you overlap views, so there's a framelayout at the root. then the preview is displayed under the linearlayout overlay. in the overlay the first entry stretches to fill all available space, while the second wraps to the content (so your button-bar will always be the height it needs, and the brackets will use the rest of the Apr 21 17:47:47 space) Apr 21 17:48:53 groxx: interesting Apr 21 17:49:33 groxx: sorry for asking a dumb question, but what is a nine-patch Apr 21 17:49:36 image? Apr 21 17:49:53 it's a stretchable image http://developer.android.com/tools/help/draw9patch.html Apr 21 17:50:35 you define the sections that stretch and the ones that don't, and then it resizes to fill the available space. so you'd have a single image with those 4 corners, separated from each other by a single stretchable transparent pixel. Apr 21 17:51:58 since I'm guessing you're new to android dev: a custom camera is a hard place to start. Lots of complex parts, lots of bugs on some devices, lots of non-standard problems for starters. Apr 21 17:51:59 groxx: that's very interesting Apr 21 17:52:23 groxx: yes i'm starting to see that Apr 21 17:53:50 Anyone know the android podcast not androiddevs Apr 21 17:53:51 groxx: do you know of any articles/books that explain layouts well? I guess my understanding of them isn't very good Apr 21 17:53:54 its something else i cant recall Apr 21 17:54:27 lasserix: "android developers backstage"? not sure what you mean by "not androiddevs" Apr 21 17:54:31 no Apr 21 17:54:38 there's another one that newer Apr 21 17:54:48 mendozao: http://developer.android.com/guide/topics/ui/declaring-layout.html Apr 21 17:54:50 it has a word that is like a pun as the title Apr 21 17:55:55 Hi all, I'm trying to work with GCM Push notifications. How long does a registration last? I ran a test yesterday that successfully completed but I use the same registration ID today without uninstalling the app or unregistering the device, but I get the message that the ID is not registered. Apr 21 17:55:58 lasserix: http://twit.tv/show/all-about-android Apr 21 17:55:59 lasserix: dunno. I've been looking for a decent one though, so let me know if you remember/find it Apr 21 17:56:13 f-ck it was really good actually Apr 21 17:56:18 had two shows devoted to rxjava Apr 21 17:56:28 the name is like glitch or something to do with bug Apr 21 17:56:52 http://fragmentedpodcast.com/ Apr 21 17:56:55 *fragmented Apr 21 17:57:02 snowinferno|work: there's no stated lifespan, but typically "until they uninstall the app for a while", or "until they upgrade the OS", or "until Google feels like it". Usually it's on the order of months or longer. Apr 21 17:57:56 lasserix: that's the one? thanks for the link :) Apr 21 17:58:12 groxx: then I must be doing something wrong with my registration... or maybe there is some detection that what is registering is not yet a signed apk but a dev build Apr 21 17:58:24 snowinferno|work: https://blog.pushbullet.com/2014/02/12/keeping-google-cloud-messaging-for-android-working-reliably-techincal-post/ might be relevant, though it's not really an overview Apr 21 17:59:52 groxx: thanks, I'll see if that helps Apr 21 18:00:23 lasserix: for general Android news I prefer AndroidPolice.com podcast. All About Android aren't very technologically sound they are one of the many professional TWIT network podcasters. Apr 21 18:03:14 lasserix: thanks, now I'm gonna spend all day listening to those 5 episodes Apr 21 18:05:36 the seekbar is buggy , it doesn't update image for thumb or progress line until you do a setBounds on those images which was some trick I had to dig around for Apr 21 18:06:02 "Register a callback to be invoked when a touch event is sent to this view." What does it mean by when a touch event is sent to this view? The view being a ListView. Apr 21 18:07:20 it means any touch event. you get everything, down/move/up/cancel/for each finger. Apr 21 18:07:24 like onTouch onClick onLongPress ... are touch events, so you'd normally setup a listener for them Apr 21 18:08:09 argh i hate when ilose commits Apr 21 18:08:47 thanks donniezazen Apr 21 18:10:44 groxx: thanks makes sense. Apr 21 18:12:04 "Register a callback to be invoked when this view is clicked." When you click anywhere in a ListView isn't it like selecting a list item. Apr 21 18:14:25 by default, yeah. listview has an onItemClick callback for that purpose. Apr 21 18:14:32 setOnItemClickListener and setOnItemSelectedListener both of these in context of a ListView sound very similar. Apr 21 18:15:02 ah. no, clicks don't imply selection. you have to be in selection-mode, or mimic it by hand. Apr 21 18:15:13 donniezazen: http://stackoverflow.com/questions/13634259/explanation-of-state-activated-state-selected-state-pressed-state-focused-for Apr 21 18:15:21 e.g. if you long-press on an email in gmail, you'll get selectable rows. Apr 21 18:16:17 or maybe yiati's is right, for listview. not sure, check the docs. Apr 21 18:16:40 groxx: there is already a setOnItemLongClickListener which is click and hold. Apr 21 18:17:11 with which you can enter the selecting action-mode, or do something else, yeah. Apr 21 18:17:24 different levels of abstraction Apr 21 18:19:05 ah, choice mode, that's the term. so many slightly-varying names in android :| Apr 21 18:19:21 * donniezazen is reading the ui-events. Apr 21 18:30:58 Any thoughts on Facebook's React Native? Apr 21 18:38:11 I want to pass a message from one activity to another through a BroadcastReceiver. How would I do that? Right now I'm doing putExtra in my first activity which I can then receive in my BroadcastReceiver Apr 21 18:38:33 But what's the nicest way to pass that off to the intent I'm using to start my second activity from BroadcastReceiver? Apr 21 18:39:56 oh. Just i2.putExtras(i1.getExtras()); I guess Apr 21 18:40:37 why not just start the activity directly? Apr 21 18:40:57 It sounds weird to be going through a broadcast receiver for that Apr 21 18:41:09 It's for coursework and yes it does, indeed. Apr 21 18:41:27 I had initially done that but upon rereading the description, it says I'm supposed to do that Apr 21 18:41:38 "When the alarm is triggered, a BroadcastReceiver must be notified. When the BroadcastReceiver receives the notification, it must start Activity B." Apr 21 18:41:50 oh, for an alarm, ok. Apr 21 18:42:12 Does it make more sense because it's an alarm? Why so? I still find it odd myself Apr 21 18:42:40 kba, coursera? Apr 21 18:42:59 No, a real-life course Apr 21 18:43:13 lol Apr 21 18:43:23 ? Apr 21 18:43:34 doesn't make any more or less sense, examples with alarms are just common in courses Apr 21 18:43:45 I see Apr 21 18:44:11 well, it makes a bit less sense, since you're generally not supposed to start activities in response to alarms (the user may not be in your app any more). but it should work. Apr 21 18:44:13 kba: yeah, I think you have to use a broadcast receiver with AlarmManager Apr 21 18:44:27 Yeah, that ^ Apr 21 18:44:55 "it will function, but don't do it outside of homework" basically Apr 21 18:45:00 groxx, what's wrong with random "popup" apps? :p Apr 21 18:45:12 Although, you could get around that by using a dynamically registered receiver Apr 21 18:45:14 JesusFreke, the caller application would work like this? Apr 21 18:45:15 nothing! they're cathartic, I love uninstalling them <3 Apr 21 18:45:15 That doesn't seem to be a problem. I'm just creating a PendingIntent and passing it to AlarmManager.set Apr 21 18:45:26 so that PendingIntent could be created from either an Activity something else Apr 21 18:45:45 or something else* Apr 21 18:45:55 and making sure the receiver is unregistered when the activity goes away, so the alarm would basically just be a no-op, since there's nothing to receive it Apr 21 18:46:21 still tricky to get right though Apr 21 18:48:19 Not sure what you're telling me Apr 21 18:48:42 android dev is so stressful Apr 21 18:49:04 I think he's saying "good luck" or some such Apr 21 18:49:19 ;) Apr 21 18:49:59 Also, can anybody tell me where I find the Editor/Appearance preferences in Android Studio on Mac? Apr 21 18:50:22 Disregard that, too. Found it. Apr 21 18:51:29 aspire: For shizzle. Apr 21 18:51:53 laying things out is just infinitely annoying Apr 21 18:51:56 and frustrating Apr 21 18:52:10 what is the difference between gravity and layout:gravity? Apr 21 18:52:17 also is weight similar to gravity? Apr 21 18:53:17 afaik, weight is z-axis while gravity refers to x/y Apr 21 18:53:22 or something Apr 21 18:54:12 Can anyone figure out why String position = "x19"; then later Log.i("tag", "position is " + position); would show "position is x" Apr 21 18:55:13 it changes in the meantime? Apr 21 18:55:21 position, that is Apr 21 18:55:42 is anyone here familiar with the google play developer API? trying to figure out if a GET Purchases.subscriptions with an old token will return information about the subscription in it's most current state Apr 21 18:56:32 lasserix: looks like whatever is displaying it is getting clipped, or the string position is getting changed to "x" Apr 21 18:56:49 TacticalJoke Apr 21 18:57:17 so i have a listview and when you swipe left = a delete button appears on the right hand side and when you swipe right = an edit button appears on the left hand side Apr 21 18:57:20 of the list view item Apr 21 18:57:20 aspire: http://stackoverflow.com/questions/3482742/gravity-and-layout-gravity-on-android Apr 21 18:57:29 derp Apr 21 18:57:35 so what i did was inside my list_row.xml Apr 21 18:57:40 i have the list and i have the 2 buttons on both sides Apr 21 18:57:46 but their visibility is both gone Apr 21 18:57:48 I'm having trouble decompiling what something is in a decompiled app Apr 21 18:58:03 a link to the code: http://pastebin.com/4k5ygVUi Apr 21 18:58:05 and then i have a touch listener which checks if you swipe wide enough for the button to appear Apr 21 18:58:16 so considering the button widths are 56dp Apr 21 18:58:45 this.b(-16777216); is the part I'm focusing on since it controls the text color I am trying to change Apr 21 18:58:59 i have something like if(touchEvent.getX() - touchDownX < -56) Apr 21 18:59:10 and then: deleteButton.setVisibility(View.VISIBLE) Apr 21 18:59:16 what would b be considerd? Apr 21 18:59:19 but my app force closes Apr 21 18:59:26 Akkord93, what is your actual question? Apr 21 18:59:27 no stacktrace in logcat Apr 21 18:59:46 aspire: what is your actual question? Apr 21 19:00:15 my question is what is wrong with what im trying to do Apr 21 19:00:22 I'm making an xposed module to change the text color in a part of the app Apr 21 19:00:23 -16777216 is #FF000000 Apr 21 19:00:29 correct Apr 21 19:00:58 I'm trying to change this with xposed Apr 21 19:01:30 you should probably ask elsewhere, #android-root seems like a good place (don't be confused by the name) Apr 21 19:01:42 do you want to see my touch listener coe Apr 21 19:01:43 code Apr 21 19:01:55 what my question is, what would b be considered there? Apr 21 19:02:04 aspire: What's one specific thing that is doing something different than what you expect, best to break up the problem rather than list of everything and says :O it doesn't work! why! Apr 21 19:02:05 my app force closes when i try setting the button to visible Apr 21 19:02:08 do you want to see my... wait what? Apr 21 19:02:34 aspire: I doubt it's that line specifically that force closes your app Apr 21 19:02:43 it is Apr 21 19:02:46 When an activity is called, onCreate(Bundle savedInstanceState) is called. However, if I putExtras() on the intent used to call my activity, in the onCreate method, I won't find the data I put by using savedInstanceState.getExtras(). Instead, I have to use getIntent().getExtras(). Why is thaT? When is savedInstanceState.getExtras() used then? Apr 21 19:02:46 ill show you my touch listener hold on Apr 21 19:02:51 I'm a little new to java so a little confused there Apr 21 19:03:25 I still don't understand what you're asking Apr 21 19:03:25 Once I'm done with my project and I have some time on my hands, I'm gonna open source these events, listeners and adapters. Apr 21 19:03:49 Not sure about that one adapter though which has generic mindfuck written all over it. Apr 21 19:04:15 I deserve a break. Apr 21 19:04:20 yiati https://gist.github.com/anonymous/9f1ab7f94d090a8258bc Apr 21 19:04:38 Yay! https://i.imgur.com/zu2hRzf.png Apr 21 19:04:39 just a note: the buttons have an initial visibility of gone Apr 21 19:05:00 when i swipe to the left, the delete button is supposed to be displayed Apr 21 19:05:14 but my app just force closes instead Apr 21 19:05:24 anything noticeably wrong? Apr 21 19:05:41 aspire: A note is that for that line to specifically force close your app then the code that exists in Android to setVisibility of a View would have to be different than what it is Apr 21 19:05:43 http://grepcode.com/file/repo1.maven.org/maven2/org.robolectric/android-all/5.0.0_r2-robolectric-0/android/view/View.java#View.setVisibility%28int%29 Apr 21 19:05:44 aspire, stack trace. Apr 21 19:06:01 dragorn there is no stack trace Apr 21 19:06:14 yiati mhm? Apr 21 19:06:19 aspire: normally I expect swiping right to start the delete action Apr 21 19:06:29 if there's a crash, there's a stack trace. unless you're crashing in native code somehow, which i doubt. Apr 21 19:06:44 shmooz semantics i suppose Apr 21 19:06:46 can be fixed later :p Apr 21 19:08:24 aspire: Are you running any native code, any jni? Apr 21 19:08:40 nope, im going to restart my emulator Apr 21 19:10:00 aspire: Okay then like dragorn said, there is going to be a stack trace "if there's a crash" Apr 21 19:11:00 * ravilov emulates aspire's restarting Apr 21 19:11:32 Does Picasso have some bug when setting an imageview immediatly after it is added to view hierarchy? Apr 21 19:11:41 mhmmmm ill figure something out Apr 21 19:11:50 but based on that code do you see anything that would cause it to crash Apr 21 19:12:34 AHH Apr 21 19:12:35 I SEE IT Apr 21 19:12:50 has anybody made a class that you tend to reuse in other projects? if so how do you version control it? Im working with BLE and i have made a class for it, but when i want to use in a different project and make corections, I want those to get fixed in all other projects as well Apr 21 19:13:19 i got an npe Apr 21 19:13:28 'attempt to invoke virtual metod setVisibility(int) on a null object reference) Apr 21 19:13:32 cant imagine y it is null Apr 21 19:13:51 lasserix: no Apr 21 19:14:27 Hmm for some reason it is not loading the image from url Apr 21 19:14:30 aspire: it's the same naming convention as other xml stuff. "gravity" = "gravity of the content of this view" (e.g. right-align a paragraph of text), "layout_gravity" = "this view's position in its parent" (e.g. "put this button on the top left") Apr 21 19:14:56 why are my buttons null Apr 21 19:15:03 they exist within the layout they just have a visibility of 'gone' Apr 21 19:15:07 because you have angered the gods Apr 21 19:15:08 Picasso.with(getContext()).load(previewImageSourceUrl).fit().centerCrop().into(previewImage) Apr 21 19:15:20 lol Apr 21 19:15:23 oh groxx i see Apr 21 19:15:24 Would it fail if its still being measured? Apr 21 19:15:28 no Apr 21 19:15:41 is the view attached to a hierarchy? Apr 21 19:15:51 mhmm i will try setting their visibility to invisible Apr 21 19:15:52 instead of gone Apr 21 19:16:33 Yeah Apr 21 19:16:37 JakeWharton: Yeah Apr 21 19:17:07 aspire: and "weight" is "layout_weight" because it's a hint to the parent, not the view it's on. two children with layout_weight=1 = they each get 50% of the view. one with layout_weight=1 and the other with wrap_content = wrap_content uses whatever it needs, the weighted-view uses the rest. Apr 21 19:17:16 aspire: weights stretch to fill available space. non-weights do not. Apr 21 19:17:25 OH Apr 21 19:17:27 i understand Apr 21 19:17:43 o... ya groxx i was fiddling around with all 3 Apr 21 19:17:57 also: ignore weightSum. Apr 21 19:18:50 oh wait Apr 21 19:19:41 When I do PendingIntetn.getService(...), why doesn't the compiler complain when the class I'm giving it isn't an IntentService? Apr 21 19:20:28 ah works Apr 21 19:20:38 kba: because it can't tell. it's just given an Intent Apr 21 19:20:52 why doesn't it complain on runtime either, then? Apr 21 19:21:13 kba: the Intent could be for a Service class in your package, or it could be "action='abc'" that launches _any service_ in the device that has an action-filter on their service. Apr 21 19:21:25 when it tries to instantiate the class I gave it and cast it as a Service, that should spell trouble, no? Apr 21 19:21:32 it doesn't even have to exist when the pendingintent is created, just when it's actually used. Apr 21 19:21:54 and no, it doesn't instantiate it. it just gets the name of the class. Apr 21 19:22:06 JakeWharton: by bad, picasso works fine Apr 21 19:22:59 But I'm not getting any errors when it's calling the class Apr 21 19:23:00 then it kicks back to the OS, the OS looks for a service in your manifest that matches the name, and starts it. or if it's a broadcast, it looks for a broadcastreceiver in your manifest _or_ registered dynamically, and starts & sends the intent to it if it exists. Apr 21 19:23:17 I pass my PI to AlarmManager, but when it's firing, nothing happens Apr 21 19:23:28 I'd assume it'd throw an exception Apr 21 19:23:38 is your receiver / service in your manifest? Apr 21 19:23:43 or maybe I'm just screwing something up, so it isn't getting so far Apr 21 19:23:49 No Apr 21 19:23:59 probably should be Apr 21 19:24:00 But it worked with my Receiver before, I know that one was called at least Apr 21 19:24:16 When doing PendingIntent.getBroadcast(...) and creating a PI from that, that got called Apr 21 19:24:18 the intent did, or the alarm manager with the pendingintent did? Apr 21 19:25:34 Ah, never mind. I think the problem is the PI was never used. I just tried the same with my BrocastReceiver before, and it did (as I expected) give me a ClassCastException Apr 21 19:26:01 Problem seems to be that my intent is never used/resolved/whateverwecallit Apr 21 19:26:08 how come the layout looks different on the ui designer s the emulator Apr 21 19:26:38 the UI designer has limitations. it's usually close, but it's not perfect. Apr 21 19:27:05 im trying to make the list rows take up the entire width Apr 21 19:27:22 so i set layout:width to fill_parent Apr 21 19:27:31 and on the ui designer it looks fine Apr 21 19:27:44 but when i run it on the emulator the width is content wrapped Apr 21 19:28:11 is it a listview or a linearlayout? and is it vertical or horizontal? Apr 21 19:28:18 its a listview Apr 21 19:28:39 i can show you my note_row.xml if you'd like? Apr 21 19:29:07 sure. also: what's your getView? Apr 21 19:29:24 and! use match_parent, not fill_parent. (they're not actually different, but you should be getting warnings, because fill_parent is deprecated) Apr 21 19:29:51 but if i use match parent Apr 21 19:29:56 the buttons (on the ui designer) appear off screen Apr 21 19:30:16 mhm ill try that Apr 21 19:30:27 lol, 2015 and people are still using match_parent Apr 21 19:30:29 never tried fill_parent with the designer :| it's possible it doesn't interpret it correctly Apr 21 19:30:36 i mean fill_parent :D Apr 21 19:31:19 huh. android studio isn't warning me about it. Eclipse is so much faster at showing warnings / errors :'( Apr 21 19:31:27 using match_parent and it still wraps content Apr 21 19:31:53 wait Apr 21 19:31:54 fuck Apr 21 19:32:04 that's usually the cause, yeah Apr 21 19:32:24 ffs lol Apr 21 19:32:55 i was using match_parent on the list view row Apr 21 19:33:02 while my list view had a width of wrap_content Apr 21 19:33:13 ah. that would do it :) Apr 21 19:33:24 i can feel my blood pressure rising!! Apr 21 19:33:33 * groxx tries to remember to ask that question next time something like this happens Apr 21 19:34:02 ok now im running into a diff type of problem Apr 21 19:34:08 ok actually just a question Apr 21 19:34:32 so i have a list view row with 2 buttons on either side Apr 21 19:34:40 the swiping to change the visibility of these buttons work fine Apr 21 19:34:49 but it only works for the first row Apr 21 19:35:00 do i add the touch listener to the notes list or does row item? Apr 21 19:35:52 oh wait, i cant even add a touch listener to the row Apr 21 19:36:06 you can, not sure how it'll behave though. never tried. Apr 21 19:36:18 and sadness. no onItemTouchListener for ListView, just RecyclerView Apr 21 19:36:30 _that_ would probably be the right choice, but it's not an option Apr 21 19:36:51 o.. Apr 21 19:37:02 i dont see a recycler view in the ui designer Apr 21 19:37:23 the work isn't done yet to display a recycler view in AS ui designer Apr 21 19:38:37 mhm well i am stuck Apr 21 19:38:42 why does it only work or te first row Apr 21 19:38:52 if i swipe te other rows itll still apply only to the first row Apr 21 19:44:03 aspire: It gets easier. Apr 21 19:46:52 mhmm Apr 21 19:47:55 pfn, this is boring, in a channel in can't see what I write Apr 21 19:55:11 what does everyone think of the android studio navigation editor tool? Apr 21 19:55:40 i dont think i ever saw it Apr 21 19:55:50 is that the thing that works with activities but not fragments ? Apr 21 19:58:35 not sure Apr 21 19:58:43 but that could be problematic Apr 21 19:59:44 looks like it works with fragments Apr 21 19:59:56 http://tools.android.com/navigation-editor Apr 21 19:59:57 hmm, so what's a good way of rendering a listview that appears in a scrolling card :( Apr 21 20:00:36 I guess I can just add the items one line at a time, but that sucks Apr 21 20:03:11 pfn: This is pretty much the sentiment you'll find trying to put a listview in a scrollview, http://stackoverflow.com/a/3496042/1229735 Apr 21 20:04:10 pfn: MergeAdapter can work nicely, https://github.com/commonsguy/cwac-merge Apr 21 20:05:20 pfn: dunno. is it not working? you might have to tweak the touch handling, but I don't see why it wouldn't work Apr 21 20:07:13 hey guys, looking for a little light reading. can anyone recommend any books for someone who didn't study coding at school? something for code design, or agile, or whatever Apr 21 20:07:43 satt: Clean Code by Robert Martin is good. Apr 21 20:07:52 For general "How to write good code" lessons. Apr 21 20:08:22 Awesome, appreciate it TacticalJoke, thanks Apr 21 20:10:16 I also liked Test Driven Development by Kent Beck (although I almost never practise TDD). Apr 21 20:10:19 Just the idea is good. Apr 21 20:12:16 Solid, thanks again Apr 21 20:13:47 I have created a full screen app I put the android:windowSoftInputMode="adjustResize" in the xml but this is not resizing my app when the soft keyboard is avaliable Apr 21 20:15:31 groxx, it's terrible Apr 21 20:16:13 where should I go for help with google maps api Apr 21 20:18:04 DarkGhost - what exactly do you need help with? Apr 21 20:18:41 what about the google play developer api? :) Apr 21 20:18:48 (that's what i'm looking for help with) Apr 21 20:19:01 It's best just to ask, really. Apr 21 20:19:06 Who has encountered the "Authentication is required. Your need to sign into your Google Account" issue with the IAB api? Apr 21 20:19:08 The likelihood of getting an answer shoots up by just asking. Apr 21 20:19:59 i'll give it another shot, then Apr 21 20:19:59 I've tried multiple devices w/ multiple google accounts and I cant get the damn IAP to work. Apr 21 20:20:03 is anyone here familiar with the google play developer API? trying to figure out if a GET Purchases.subscriptions with an old token will return information about the subscription in it's most current state Apr 21 20:21:14 I'm wondering if it's possible to put a completely black overlay on google maps and then only light up places that you have been... Apr 21 20:23:35 pfn: well, I think that was assumed. Apr 21 20:23:41 this _is_ android dev, after all Apr 21 20:24:05 TacticalJoke I just didnt' want to ask and then get redirected to like #googlemaps api or something Apr 21 20:24:05 lol Apr 21 20:25:53 DarkGhost: honestly, I doubt it. you don't really control the map, so it would have to be something through their styling interface, which isn't _that_ flexible afaik. Apr 21 20:26:05 so theres no way to do that?! Apr 21 20:27:00 unrelated, but wat: http://cl.ly/image/473q0y3p0Y3D Apr 21 20:27:25 heh, yeah Apr 21 20:27:51 I heard u like browser histories... Apr 21 20:28:18 I hate being tracked. Apr 21 20:28:49 DarkGhost: ah, cool. looks like there may be a way, by drawing polygons over the map: https://developers.google.com/maps/documentation/android/shapes#create_a_hollow_polygon Apr 21 20:29:46 DarkGhost: sounds like civilization :) Apr 21 20:29:56 no idea how well that'll perform, but cool. Apr 21 20:31:43 so I found out that the no resize in fullscreen is a bug, but found a valid work around (finally) at http://stackoverflow.com/a/19494006/4808210 Apr 21 20:32:13 Oh, this is refreshing: http://notaverb.com/login Apr 21 20:32:32 They need a "layout" one for Android programmers. :D Apr 21 20:32:34 Talow: ha, I just ran across that bug/feature on Friday. and then discovered that some devices don't resize the layout _at all_ in landscape. Apr 21 20:33:34 Right now I'll take what I can get, this works for what I need currently. if it becomes worse I'll force portrait Apr 21 20:33:40 ty for info :D Apr 21 20:35:16 Greetings fellow humans Apr 21 20:35:33 Talow: fwiw the offending device is an HTC Incredible running 2.3.4. probably Sense UI or something that's to blame for this. Apr 21 20:35:49 Sometimes I don't feel like a human. Apr 21 20:36:00 my coworker thinks he remembers something like that with an HTC Desire of about the same age, too Apr 21 20:36:08 I'll have to check it with an EMU I don't own one :( Apr 21 20:36:10 ty tho Apr 21 20:36:43 I don't want to bug everyone, but I'm a .net and Java developer who has been asked to develop an android app that can 'talk' to a postgresql backend.. would anyone have 5 mins to point me in the right direction? Apr 21 20:38:10 dont all you guys help at once :D Apr 21 20:38:25 everyone is wondering, hmm should i go for the CRUD + db question for $200 Apr 21 20:39:46 I started looking at xamarin, just because of my backround in vistual studio Apr 21 20:40:00 Guardian2010 either (1) just do a mobile web app for it or (2) create a web service ontop the db, and then communicate with that Apr 21 20:40:27 but I'd really like a nice native solution.. I wanted to get node.js running in android studio, but it keeps complaining that the javascrip plugin doesn't exist Apr 21 20:40:57 g00s, that's a good idea Apr 21 20:41:11 postgresql, android, node.js - nothing here sounds like MS, so maybe use another IDE Apr 21 20:41:32 I suggested just a mobile site, that the user could connect to do do the work, but it has to be able to cache the data locally, in case the user is out of cell/wifi coverage Apr 21 20:42:16 who cares about backend database? Apr 21 20:42:26 Guardian2010: google's advice is to put the database behind a web service, and set up a background task in the android app to talk to the web service Apr 21 20:42:38 something about unreliable transport something something Apr 21 20:42:46 anyway, you can do it. Apr 21 20:42:46 Anyone ever have this issue with Google Play IAP? Game crashes a sec after making a test purchase. java.lang.ClassNotFoundException: com.google.android.finsky.billing.lightpurchase.PurchaseParams. Is it only related to _Testing_? Apr 21 20:43:08 i mean, if there is an jdbc or java api for postgres, you can use that too Apr 21 20:43:24 but it has to run in a background thread or background service, not in the UI Apr 21 20:43:37 I have my app published to alpha, the testing google account added to license testing, using my license key and i still get the authentication error when testing IAP. Apr 21 20:43:37 That's actually a really good idea Apr 21 20:43:45 just offload the work to a service on a web server Apr 21 20:44:23 I assume tcp connections from android is failry simple? Apr 21 20:44:33 fairly* Apr 21 20:44:40 yes Apr 21 20:44:42 it was obvious you need to create a web server Apr 21 20:44:54 Android Studio and android in general, is it Java or JavaScript? I know the interface is XML Apr 21 20:44:55 tcp connections are the same as with any other platform Apr 21 20:44:58 java Apr 21 20:45:02 android is all java Apr 21 20:45:05 oh that's easy then Apr 21 20:45:21 theres the ndk too Apr 21 20:45:31 thanks guys, this is my first mobile app, so its' a bit of a shift in methodology for me Apr 21 20:46:03 Guardian2010, if the questions are really these, please get a book / follow a basic tutorial Apr 21 20:47:19 Guardian2010 don't use jdbc over the wan Apr 21 20:53:03 hi all. I'm just getting started in android dev. Is the official tutorial on the android site considered the best way to get into it? I found the udacity tutorials skipped over explanations of things too much for my liking Apr 21 20:53:49 that's generally what I'd recommend, yeah. for the exact same reasons. Apr 21 20:54:01 new support lib is out Apr 21 20:54:43 groxx some stuff for nested scrolling Apr 21 20:54:57 alright, thanks :) I've done a lot of java so I'm really comfortable in eclipse... is it worth switching over to android studio? Apr 21 20:55:32 MattDs17: depends. AS is a bit more power-hungry, and you'll sorely miss the "problems" view, and the logcat display is slower and mostly worthless. Apr 21 20:55:34 MattDs17: Yeah, Android Studio is better for Android development. Apr 21 20:55:37 Doh! Apr 21 20:55:58 AppCompatDialog :) Apr 21 20:55:59 My reasoning is that ADT doesn't seem to have a future anymore (outside of the unofficial effort). Apr 21 20:56:00 MattDs17: but it does considerably better inspections, better autocomplete, etc. Apr 21 20:56:05 g00s: Zomg. Apr 21 20:56:25 i'll take it, but man code is ugly with all this compat stuff Apr 21 20:56:34 makes sense. If everything's going the way of AS then I might as well get started in it from the get-go Apr 21 20:56:42 "Deprecated use of app:theme for styling Toolbar." dog Apr 21 20:56:46 *doh Apr 21 20:56:47 AppCompatButton! Apr 21 20:56:50 MattDs17: also, Gradle has a couple big annoyances, but once you're past those it's like a gajillion times nicer for normal use. e.g. appcompat is a one-liner rather than importing an entire project. Apr 21 20:56:50 is there a way to figure out how long the user has been touching something for Apr 21 20:56:52 using a touch listener Apr 21 20:57:03 http://developer.android.com/reference/android/support/v7/widget/AppCompatButton.html Apr 21 20:57:08 That is awesome Apr 21 20:57:13 i thought motionEvent.getDownTime() would return how long they have been touching it for Apr 21 20:57:18 but it is something totally different Apr 21 20:57:38 im trying to see if the user has been touching down for more than 1 second Apr 21 20:57:39 still no FAB though hahaha Apr 21 20:57:41 event.getTime() - event.getDownTime() = time touching Apr 21 20:57:47 o Apr 21 20:57:48 oh, this is a good release Apr 21 20:58:05 there is no getTime Apr 21 20:58:12 getEentTime() i suppose? Apr 21 20:58:13 event*+ Apr 21 20:58:28 aspire: you probably want to do what the framework does for long-press. fire a "long press timeout" runnable X ms later, cancel it in "onMove > slop || up || cancel". Apr 21 20:58:34 groxx: gradle is essentially a tool to manage dependencies and write build paths and stuff, right? Apr 21 20:59:05 o Apr 21 20:59:28 MattDs17: in principle it's a build tool. Android Studio blends it into a "configure your IDE" tool, and plugins add in (downright trivial) maven helpers, an infinitely-superior-to-manifest-merged-projects "flavors" system, and other fancy stuff. Apr 21 20:59:50 with a touch of magic Apr 21 20:59:50 gah Apr 21 21:00:42 if Eclipse got Gradle integration, I'd probably switch back to Eclipse. though I'd miss some of Android Studio's nice additions. Apr 21 21:01:01 I know some of those words :-) Apr 21 21:01:11 Yeah, but as things are Eclipse is just worse for 99% of Android developers. Apr 21 21:01:21 I think almost everyone who does Android programming every day would recommend Android Studio now. Apr 21 21:01:30 huh, i could update through sdk manager "Download interrupted: peer not authenticated" Apr 21 21:01:36 the remaining 1% being Eclipse-NDK users and people without at least 4gb of ram to burn Apr 21 21:02:22 groxx: yeah, I have 8 GB on my machine and I am regularly running out of ram while running emulation Apr 21 21:02:26 g00s: whup. you hit bureaucracy. better find the peer and have them start doing the paperwork. Apr 21 21:02:38 heh Apr 21 21:02:47 g00s: This release looks awesome. Apr 21 21:02:51 Bet it's full of bugs, though. Apr 21 21:03:04 actually as with all of these, i wait a bit to really use it - gotta get a feel for how many bugs are there Apr 21 21:03:10 zerowaitstate: heh. I'd believe it. 16gb here and it's pretty happy. Apr 21 21:03:11 groxx: Yeah, I'd hate to use it with less than 4GB RAM. Apr 21 21:03:30 4 might be a hard-minimum :| 8 is probably what I'd label "recommended" Apr 21 21:03:50 I hope my Toolbar Spinner shows the dropdown on top of it now, on <21. Apr 21 21:04:27 "You can now use android:theme for toolbars on all API level 7 and higher devices and android:theme support for all widgets on API level 11 and higher devices." < Nice. Apr 21 21:04:33 I'm getting a little ahead of myself here, but once I get the hang of making mobile apps, is chromecast development much different? Apr 21 21:05:16 you have to find the 1 or 2 people doing chromecast dev to ask Apr 21 21:05:19 TacticalJoke: have you seen this gfycat API ? http://blog.danlew.net/2014/06/30/gfycat-for-android/ Apr 21 21:05:44 hahah, got it Apr 21 21:06:00 shmooz: nice :) I was wondering if that would end up being the easiest way to do gifs on android :) Apr 21 21:06:18 MattDs17: yes, Chromecast is different Apr 21 21:06:40 Chromecast is mostly JS Apr 21 21:06:51 Looks good, shmooz. Didn't know they had an API. Apr 21 21:06:55 Thanks for the link. Apr 21 21:07:04 however, you can write the Chromecast "controller" in Java Apr 21 21:07:08 I guess I can use something like VideoView to play the MP4? Apr 21 21:07:16 groxx: I was listening to that podcast that lasserix posted and the author was talking about it, sounds neat, it compresses the large gif file into a much smaller mp4 file Apr 21 21:07:34 TacticalJoke: yes VideoView works fine with mp4's Apr 21 21:07:46 Cool. I'll probably end up doing that (at least for gfycat links), Apr 21 21:07:55 I see. I'm mainly just looking to beef up a portfolio before I have to apply for coop's in uni Apr 21 21:07:55 BTW, I can't help but read 'gfy' as a rude initialism. :D Apr 21 21:08:00 TacticalJoke: that's how you can display .gif's on your app Apr 21 21:08:05 It's always meant "Go Fuck Yourself". Apr 21 21:08:25 even better :) Apr 21 21:08:45 I could do it for *all* GIFs, yeah. But then my depends on gfycat being around. Hmm. Apr 21 21:09:18 well it's just another lib, but I think it would make your app lighter Apr 21 21:09:36 because of the compression Apr 21 21:09:37 I suppose one solution would be an option (just in case I die and gfycat dies and people are still using my app). Apr 21 21:09:49 "Use gfycat service for animated GIFs" or something. Apr 21 21:10:28 TacticalJoke: you can later make your own API that is similar, if you're that worried Apr 21 21:10:34 use it for now Apr 21 21:11:17 I wonder whether other reddit apps use it. Hmm. Apr 21 21:11:23 I mean for all GIFs. Apr 21 21:11:31 yeah. gyfcat is pretty awesome. I don't know if I've seen apps use it, but I have seen LOTS of websites use it. Apr 21 21:11:40 Then again, "What would a typical Android reddit app do?" is really bad reasoning. Apr 21 21:11:57 oh, lol, it is gfycat Apr 21 21:13:33 does anyone know if there is a way to force some code to be run before any other code in a process? In my manifest, I register providers, services, receivers, etc. that run in a separate process. The problem is that I need to run some code before ANY of those have an opportunity to run Apr 21 21:13:38 within that new process Apr 21 21:14:09 i think Activity.onCreate is your first choice Apr 21 21:14:14 i mean Application Apr 21 21:15:03 thanks g00s . yeah I was thinking about Application and that works fine for my main process Apr 21 21:15:12 but how do I register a separate Application object for the separate process Apr 21 21:15:52 hmm Apr 21 21:16:04 i haven't tried that scenario, sorry Apr 21 21:16:19 yeah kind of a weird one Apr 21 21:16:20 I know Apr 21 21:16:50 sleepster maybe the old fashioned-way - a lock file ? Apr 21 21:16:59 sleepster: you probably need to create a singleton object with the code you need to run, and run its instantiation in every oncreate call Apr 21 21:17:15 I like the new name AppCompatActivity. Way more appropriate. Apr 21 21:17:22 ActionBarActivity was just a baggage-name. Apr 21 21:17:26 zerowaitstate: Thanks -- actually that's the way my code looks like right now Apr 21 21:17:38 zerowaitstate: for every component, I have a singleton call for "initialize" Apr 21 21:17:51 sleepster: the tag has android:process attribute, so maybe should try that Apr 21 21:18:05 icedp: oh interesting :) Apr 21 21:18:08 didn't even see that Apr 21 21:19:44 Damn, I'm not even targeting API 22 yet. Been so busy with my own changes. Apr 21 21:20:38 TacticalJoke: just wanted to say love the nam Apr 21 21:20:40 name* Apr 21 21:21:22 Oh, thanks. It's an old chess username. I kinda hate it now, to be honest, because it makes little sense out of context. :D Apr 21 21:21:49 :D Apr 21 21:22:42 sleepster: there probably isn't an easy way, since your other-process could be started without your main-process. Apr 21 21:23:15 ah, d'oh. my connection lagged or something. interesting ideas anyway :) Apr 21 21:23:19 groxx: yeah, that's what I am learning :) Apr 21 21:24:06 groxx, sleepster: yeah, services can be configured (and usually are), to run out-of-process Apr 21 21:24:51 I am srsly surprised about AppCompat. Apr 21 21:25:08 And it seems they moved the tintable widgets out of the 'internal' package, too. Apr 21 21:25:33 is there a post about the appcompat changes, by any chance? Apr 21 21:25:44 I wonder if there is a way to force the order of components in an application? that might solve my problem. I just need all my ContentProviders to load after my Service Apr 21 21:25:47 I've seen only this so far: http://developer.android.com/tools/support-library/index.html Apr 21 21:26:02 I know I can determine order of ContentProvider with respect to each other Apr 21 21:26:06 but not with respect to other components Apr 21 21:26:16 Oh, there's this: http://android-developers.blogspot.co.uk/2015/04/android-support-library-221.html Apr 21 21:26:22 Someone posted on /r/androiddev. Apr 21 21:26:26 oh wow, lots of changes Apr 21 21:26:39 thanks Apr 21 21:27:40 Just in case nobody visits that subreddit: http://www.reddit.com/r/androiddev/comments/33ebv1/support_library_221_released/ Apr 21 21:30:26 thats good news : " DrawableCompat now brings drawable tinting back to API 4" Apr 21 21:31:07 I'm still not seeing release notes for the AS 1.3 RC: http://tools.android.com/recent Apr 21 21:31:16 1.2* Apr 21 21:31:33 1.3RC0 is giving me significantly more problems than any of the versions before it :S Apr 21 21:31:59 Hmm, this is interesting: http://developer.android.com/reference/android/support/v4/widget/Space.html Apr 21 21:32:04 groxx: Ah, damn. Apr 21 21:32:14 The other thing: "Space is a lightweight View subclass that may be used to create gaps between components in general purpose layouts." Apr 21 21:33:07 woah, space backport? Apr 21 21:34:22 I'm not seeing it here: https://android.googlesource.com/platform/frameworks/support/+/refs/heads/master/v4/java/android/support/v4/widget/ Weird. Apr 21 21:34:25 Same with the v7 stuff. Apr 21 21:35:44 isn't Space just an invisible View? Apr 21 21:35:54 woohoo tinted compat drawables!! Apr 21 21:36:13 Path interpolator compat! Apr 21 21:36:29 deprecated ActionBarActivity :( Apr 21 21:36:35 Afzal: AppCompatActivity. Apr 21 21:36:37 aaaargh! my android studio keeps launching another emulator, for nothing! how to stop this behaviour? Apr 21 21:36:40 yeah Apr 21 21:36:43 Or AppCompatDelegate with normal Activity, I think. Apr 21 21:36:49 I love deprecation. :D Apr 21 21:36:54 Deprecate everything! Apr 21 21:36:56 TacticalJoke: probably awfully similar to http://androidxref.com/5.1.0_r1/xref/frameworks/support/v7/gridlayout/src/android/support/v7/widget/Space.java Apr 21 21:37:01 Yeah. Apr 21 21:37:24 Is it really much different from a basic View? Hmm. Apr 21 21:37:25 more AppCompat widgets! Apr 21 21:37:27 this is good Apr 21 21:37:29 I would've used View before. Apr 21 21:37:35 I've never used space before :/ Apr 21 21:37:37 Oh, it auto-sets invisible. Apr 21 21:37:45 I suppose it's nice to have such abstractions. Apr 21 21:39:01 Still no AppCompat ProgressBar, though. Doh. (But maybe we'll get it eventually.) Apr 21 21:39:08 hello Apr 21 21:39:42 I want to give my friends a beta apk, but I want it pro-guarded, and all other protections a release build gives Apr 21 21:39:50 hi all. Is there a style/conventions guide for android that most people use? Apr 21 21:39:52 Do I just give them a release build? Apr 21 21:39:58 paulo_: yes Apr 21 21:40:09 Ah. They bring android:theme support to all views. Wonder whether that means that Spinners now show correctly. Apr 21 21:40:20 (On 11+, anyway.) Apr 21 21:40:33 zinx: is there no special requirements for that? like google dev account, a signing key, etc? Apr 21 21:40:40 paulo_: nope Apr 21 21:41:14 paulo_: this is not iOS :) Apr 21 21:41:40 paulo_: you may want to sign it w/ your key anyway though, because any data will be lost if a version with a different signature is installed Apr 21 21:41:40 zinx: do they just check the "Allow installation from unknown sources" in the settings? Apr 21 21:41:48 paulo_: yeah Apr 21 21:42:02 ok nice. thank you Apr 21 21:44:51 anyone know of a way to validate email for EditTexts? Apr 21 21:45:17 It's still appcompat-v7:22.0.0 correct? Apr 21 21:45:27 or do I need to change something in Gradle? Apr 21 21:45:53 nevermind. It's 22.1.0 Apr 21 21:46:58 I know im supposed to use patterns to check the string to see if it's the right format, but I don't understand how the ontextchanged event works Apr 21 21:47:45 Hmm, could you even do this in onTextChanged? Wouldn't the whole string need to be processed *after* complete entry? Apr 21 21:47:54 Oh, actually, never mind. Apr 21 21:49:36 I guess you could validate the text at every key stroke and notify the user of whether it's a valid e-mail address yet. Apr 21 21:49:47 TacticalJoke : that's what i was curious about, the onTextChanged event only fires AFTER the text has changed, so it's not of much use to me if I want to prevent the user from entering invalid characters, but I can't prevent the user from entering invalid characters through beforeTextChanged, because it doesn't allow for it Apr 21 21:50:52 Palette.Builder supports both synchronous and asynchronous generation. Why add a synchronous option too? Isn't it considered bad practice ? Just asking, maybe I'm mistaken Apr 21 21:52:03 lonewaft: Wouldn't that be extremely complex, though? I start entering 'a', and presumable it's valid. Then '@'. Then 'a'. Then '.'. That seems to get really complex really fast, as far as I can imagine. Apr 21 21:52:10 It seems that you'd be writing a context-sensitive e-mail address parser. Apr 21 21:52:45 For example, if the '@' already exists, certain things are allowed or not allowed. But what if they delete the '@'? Then the context changes and parsing has to happen all over again. Apr 21 21:52:56 TacticalJoke : Oh i just realized that yeah.. Apr 21 21:53:12 when you create a ContentProvider URI matcher, what is the difference between using "#" and "*" ? Apr 21 21:53:14 Probably the simplest method is to wait till they've pressed a button or something (and then use regex validation). Apr 21 21:53:20 so I guess the only practical option is to check if the email is valid whenever the form is submitted? Apr 21 21:53:22 Or maybe when the EditText loses focus. Apr 21 21:53:31 anyone here use libgdx? Apr 21 21:53:33 I think so. Apr 21 21:53:37 so what do we do now for out menu xmls & appcompat 22.1 : do they still need app:xxx prefix ? Apr 21 21:53:49 how come i don't see any android apps that were made using libgdx Apr 21 21:53:52 TacticalJoke : Thank you, I guess it'd be best to validate after the EditText loses focus. Apr 21 21:54:38 csst0111: because if it's synchronous, it's easier to control the thread it runs on. Apr 21 21:54:43 g00s: I'm guessing so. I haven't tried yet, though. Apr 21 21:55:17 "I'm sending APKs for every update to beta testers via email. If you store your last sent mail it's easy to do, just update the attachment/subject (and the message body if you like)." Apr 21 21:55:34 reall, that works? so i just keep adding people to the email even after its sent? Apr 21 21:56:08 * g00s realized, maybe i don't even know how to use email Apr 21 21:56:39 Doesn't he mean "send a new e-mail that's basically a duplicate of the last one"? Apr 21 21:56:52 Or she. Apr 21 21:56:56 yeah ... sounds too good to be true Apr 21 21:56:57 Or they, I guess. :D Apr 21 21:58:23 Your /r/androiddev post is bringing in the points. Apr 21 21:58:29 lol Apr 21 21:59:00 I think that 95% upvote ratio is actually around 100%. Many of the votes are faked. Apr 21 21:59:04 I have an AdapterView.OnItemSelectedListener set to an AutoCompleteTextView, and when I select an item on the list, shouldn't the said Listener fire? I'm debugging and it's not fired. Apr 21 21:59:07 s/Many/Some/ Apr 21 21:59:09 i was susrpised that they did a largish release before I/O Apr 21 21:59:22 @all: what is the difference between using "#" and "*" in a URI matcher? Apr 21 21:59:33 usually they wait until I/O so they have some more thunder ;) Apr 21 22:00:00 Imagine if they announced a Kotlin commitment. It'd be awesome to be an Android developer then. :D Apr 21 22:00:07 As well as a commitment to make everything AppCompat material. Apr 21 22:00:20 ventura you must read answer w/14 points here http://stackoverflow.com/questions/5030094/problems-with-androids-urimatcher Apr 21 22:00:43 # is for id, * is for anything (i think) but there are corner cases Apr 21 22:00:49 saapas: Don't you want OnItemClickListener? Apr 21 22:01:04 g00s++ Apr 21 22:01:05 thx Apr 21 22:01:34 TacticalJoke, Im trying that out next. I want one that fires when I choose an item. Apr 21 22:01:52 also one that fires when I enter a new string Apr 21 22:02:14 yaay OnItemClickListener it was. Apr 21 22:04:55 Hmm, I'm thinking of not even having a light theme in my app. Apr 21 22:05:06 * g00s has both Apr 21 22:05:11 such a pita Apr 21 22:05:16 Yeah. Apr 21 22:05:28 I think I'm gonna try to have just dark themes, but I'll probably give in and make at least one light one. Apr 21 22:06:04 TacticalJoke: blasphemy! themes are life! Apr 21 22:06:35 Yeah, for some apps themes are a big deal. :) Apr 21 22:06:51 Certain apps are kinda like IDEs in regard to how much time people will spend with them. Apr 21 22:07:14 also: custom fonts. if I can't use comic sans, I don't even care. Apr 21 22:07:15 TacticalJoke: dark solarized theme? :D Apr 21 22:08:14 I guess my main dark theme is a tiny bit like that. Apr 21 22:08:17 TacticalJoke is libgdx wise to use for android development? Apr 21 22:08:36 I've never used it, and I know almost nothing about it, but I've heard a few people talking about it. Apr 21 22:08:59 mhm.. i'm kind of on the fence about it considering there are literally no android apps on the market that use libgdx Apr 21 22:09:05 but suppose i am writing a blackjack game Apr 21 22:09:17 i want it to be available for desktop, web and android and i figure libgdx would be the simplest way Apr 21 22:09:28 unity lawlz Apr 21 22:10:36 i haven't done a project with libgdx yet Apr 21 22:10:54 Hi all. quick question. I upgrade to the new appcompat version and testing my device on Android 4.1.1 (api 16). After the update, my toolbar no longer shows at all below api 21. Any ideas? I'm using android:theme="@style/ThemeOverlay.AppCompat.Dark" Apr 21 22:11:02 but i did spend a few hours looking at and compiling samples of various game/gfx frameworks for android Apr 21 22:11:12 and libgdx seemed the best one Apr 21 22:11:18 Here seems to be a list: http://libgdx.badlogicgames.com/gallery.html Apr 21 22:11:37 if you're not going whole-hog with unity then i'd pick libgdx myself Apr 21 22:11:50 liuwenhao: Oh, gawd, doesn't sound promising. Apr 21 22:12:14 Though if it's a bug I guess it'll be fixed. Apr 21 22:12:39 I don't think it's a bug. My toolbar wasn't working before (under api 21) but I didn't have time to fix it until now. But now it's just not showing at all Apr 21 22:12:54 it was showing before, just not clickable Apr 21 22:13:55 What if you try "@style/ThemeOverlay.AppCompat.Dark.ActionBar"? Apr 21 22:14:19 Otherwise maybe post your XML stuff. Apr 21 22:14:21 Same thing, doesn't show at all Apr 21 22:14:34 And Java stuff. Apr 21 22:16:35 I'll try a few more things and if it still doesn't work I'll post. Hopefully it's a problem with my xml and not a bug in appcompat Apr 21 22:17:02 mhm Apr 21 22:18:02 liuwenhao are you using the new Activity ? Apr 21 22:18:15 i can't believe you can make stuff like http://libgdx.badlogicgames.com/showentry.html?id=b6cd76f2-5756-47e9-aede-ea70767a1ad0 Apr 21 22:18:18 kinda unfamiliar with xml. what's the difference between the property "id" and the property "name" ? Apr 21 22:19:41 g00d, i didn't change anything other than updating the gradle file for the new appcompat verison. I have to restart my pc then will start debugging Apr 21 22:19:44 g00s* Apr 21 22:20:35 lol - I just figured out how to fix AS's lame logcat. switch to the terminal tab and use pidcat. Apr 21 22:20:40 well, might have to use AppCompatActivity Apr 21 22:28:31 ActionBarActivity Apr 21 22:28:41 hm. how do you get the system's default animation time? or something equivalent? ideally I'd like to skip animations when the animation-scaling is turned off... Apr 21 22:28:49 pfn it changed Apr 21 22:30:39 groxx: animation scaling is in developer options only, right? Apr 21 22:31:25 icedp: it is, yeah. but e.g. activity transitions have a default animation length - where's that value stored? or is it entirely system-defined? Apr 21 22:31:35 s/default/they all share the same value/ Apr 21 22:33:13 groxx: perhaps android.R.integer.config* Apr 21 22:33:46 icedp: ah, bingo, that looks right. thanks :) Apr 21 22:36:28 groxx: however https://github.com/android/platform_frameworks_base/blob/jb-mr1.1-dev/core/res/res/values/config.xml#L104 Apr 21 22:37:05 ffffffff... Apr 21 22:38:37 groxx: can't access those values for some reason but they seem not to have been changed since ICS Apr 21 22:39:23 MattDs17: if 'name' is a valid property, it'll typically be the class-name to instantiate (e.g. I think the tag uses this). 'id' is for R.id.the_name use, it's a way to find views without saying "the third child of the second view". Apr 21 22:42:33 if i wanted a user to enter input without a certain ammount of time could I use Handler.postDelayed? Apr 21 22:42:48 and if not whats a better way of doing it? Apr 21 22:43:09 Is it like a count-down thing? "X seconds to enter an answer"? Apr 21 22:43:32 well yes but it doesnt show the user the time Apr 21 22:44:00 I'm guessing that Handler.postDelayed is the simplest way to do that. Apr 21 22:44:10 Then I guess you could disable the EditText, update the UI in other ways, etc. Apr 21 22:44:25 grr. does anyone have an idea as to why i can't actually stop a remote service without calling System.exit Apr 21 22:45:51 ie onDestroy is never called. i'm starting it from application and then binding to it. it runs in foreground and should exit via a received broadcast from the notification Apr 21 22:46:09 masterjeff, System.exit doesn't do anything Apr 21 22:46:17 it does Apr 21 22:46:18 masterjeff, you cannot exit a bound service until it is unbound Apr 21 22:46:28 no, system.exit doesn't do anything Apr 21 22:46:32 i unbind from it in ondestroy Apr 21 22:47:03 well, it seems to because it's the only thing that causes it to quit Apr 21 22:47:42 But the system restarts it (correctly) since I return start_sticky from onStartCommand Apr 21 22:47:51 System.exit will not exit a service Apr 21 22:47:57 if it did anything, your whole app would exit Apr 21 22:48:28 it does do something. I encourage you to try it. And the service is running in a separate process so it doesn't affect the app Apr 21 22:48:36 afaik, it kills the process Apr 21 22:48:42 correct Apr 21 22:49:12 but, no. you *really* shouldn't be using system.exit at all. especially not to stop/close/exit a service. Apr 21 22:49:13 The problem i'm trying to solve is how to properly stop it from a notification interaction. Apr 21 22:49:39 right, i just tried it to see what happened if i forced it to quit. Apr 21 22:49:43 the only reason a service will remain running is if there is something still bound to it, or if it's started and not stopped yet. Apr 21 22:49:56 interesting, for some reason, I recall System.exit being no-oped in libcore Apr 21 22:49:59 maybe not Apr 21 22:50:16 I don't think so Apr 21 22:50:18 anyway, unbind it, and stop service Apr 21 22:50:22 problem solved Apr 21 22:51:07 not entirely, i need the service to run independently of the application. the app should only start it if it's not running and then bind to it Apr 21 22:51:37 startService and bindService are orthogonal and not dependent upon one another Apr 21 22:51:49 i know Apr 21 22:51:54 then unbind it and stop service Apr 21 22:51:56 problem solved Apr 21 22:52:13 i need to be able to stop it from it's foreground notification Apr 21 22:52:20 whether the application is running or not Apr 21 22:52:58 if the application is not running, the process can't be either - and the notification should go away Apr 21 22:53:33 masterjeff, then don't bind service Apr 21 22:53:52 g00s, the service is a remote Apr 21 22:53:58 in different process Apr 21 22:54:03 ah, k Apr 21 22:54:11 foreground notification -> sendBroadcast Apr 21 22:54:16 there are lots of weird things when you use multiple processes on android Apr 21 22:54:16 any activities receive broadcast, unbind Apr 21 22:54:23 service receives broadcast, stopforeground, stopself Apr 21 22:54:25 problem solved Apr 21 22:54:55 except that when the service receives the broadcast and calls those methods, it doesn't do anything. Apr 21 22:55:01 Must you publish an alpha apk to test IAB, because thats what I'm starting to believe Apr 21 22:55:05 stopSelfWithResult returns false Apr 21 22:55:07 because your activities didn't unbind Apr 21 22:55:14 your service can't stop until all activities unbind Apr 21 22:56:20 there is no stopSelfWithResult Apr 21 22:56:36 and stopSelf doesn't return anything Apr 21 22:56:39 yes there is Apr 21 22:56:43 stopSelfResult Apr 21 22:56:49 hah Apr 21 22:56:52 ah Apr 21 22:56:53 yeah that, sorry Apr 21 22:57:02 and why are you passing the startId? Apr 21 22:57:06 are you sure it was the same? Apr 21 22:57:26 pfn, i'll verify that the app is calling onDestroy (where I unbind from service) Apr 21 22:57:33 I have an IntentService and a BroadcastReceiver and they're both being launched by the same event, namely a timer going off from AlarmManager. However, the IntentService doesn't seem to be firing at all. In onHandleIntent and onCreate, I just have some Log.d's, but nothing gets output. The receiver's Log.d's show up fine. Apr 21 22:57:37 Any idea what may be wrong? Apr 21 22:57:38 the app? Apr 21 22:57:42 and yes sure it was the same Apr 21 22:57:43 the service calls ondestroy Apr 21 22:57:48 yeah, if you want to stop unconditionally, use stopSelf, not stopSelfResult Apr 21 22:57:57 but you'll still need to unbind too, of course Apr 21 22:58:01 yes, but you suggested that the app may not be unbinding Apr 21 22:58:04 kba, broadcast receiver doesn't get "launched" Apr 21 22:58:07 which could be the case Apr 21 22:58:17 the app not unbinding won't cause stopSelfResult to return false though Apr 21 22:58:18 pfn: onReceive gets called, then Apr 21 22:58:34 JesusFreke, stopSelf() has no effect Apr 21 22:58:48 masterjeff, because your service is bound Apr 21 22:58:54 ill go double check that the application is unbinding, brb Apr 21 22:58:54 I give up :) Apr 21 22:58:56 kba, because IntentService is not a broadcast receiver Apr 21 23:00:01 pfn i owe you a six pack of beer Apr 21 23:00:34 pfn: Yes, I know, it extends IntentService not BroadcastReceiver, but what's your point? Apr 21 23:00:46 kba, how do you expect a broadcast to start your intent service then Apr 21 23:00:50 Making an IAP with "android.test.purchased" works successfully, so i Apr 21 23:00:52 don Apr 21 23:00:55 ffs. sorry. Apr 21 23:01:10 pfn: I don't, I'm creating a PendingIntent and passing it off to AlarmManager.set Apr 21 23:01:22 so I'm not sure why using my own product id is telling me to sign it and authenticate Apr 21 23:01:23 kba, thanks for expecting us to have ESP Apr 21 23:01:56 I thought using an PendingIntent was given when passing anything off to AlarmManager. That's the only way I know of doing it. Apr 21 23:03:22 why do we have to play 20 questions? Apr 21 23:03:53 JesusFreke they need one for unicycles :D http://www.gizmag.com/pedalist-velomobile-kickstarter/37108/ Apr 21 23:03:54 You see that pendingintent has multiple variants of getXXX for intents, yes? which one did you use, why would you expect a broadcastreceiver and a service to start off of the same getXXX? Apr 21 23:04:01 Because I don't have ESP either, so I don't know what you need to know ;) Apr 21 23:04:47 Right, so I have very similar code, then. I have a PendingIntent.getService(...) with an Intent created from my service Apr 21 23:05:04 kba, you're the one with the problem and all the information Apr 21 23:05:08 then I have an equal PendingIntent.getBroadcast Apr 21 23:05:16 anytime you ask a question, the people you're asking need to know everything Apr 21 23:05:28 you didn't register your service in manifest Apr 21 23:05:35 I'm creating the PendingIntents the same way (except obviously one is getBroadcast, the other getService) Apr 21 23:05:49 and I'm using the set AlarmManager.set Apr 21 23:05:54 No, I didn't register anything in my manifest Apr 21 23:06:10 Well, I was hoping this was some common problem or misunderstanding Apr 21 23:06:29 since it seems curious to me that the BroadcastReceiver works, but the very similar IntentService doesnt' Apr 21 23:06:32 No, I didn't register anything in my manifest Apr 21 23:06:42 you just said so Apr 21 23:06:46 you didn't register your service in manifest Apr 21 23:06:53 I have to register my IntentService I take it? So why don't I have to register a broadcastreceiver? Apr 21 23:07:08 of course you have to register a broadcast receiver Apr 21 23:07:25 The broadcast receiver works without being registered Apr 21 23:08:02 pfn, JesusFreke, thanks for the help. Got it fixed. Apr 21 23:08:21 kba, no, it doesn't Apr 21 23:09:00 Ah, I see it now. The other ones were automatically registered or whatever. I've never touched the AndroidManifest.xml myself Apr 21 23:09:06 oh oh pfn is firing with 2 guns at once now Apr 21 23:09:14 and after refactoring, Android Studio apparently failed to rename the service in the manifest Apr 21 23:09:25 Thanks, pfn Apr 21 23:11:20 JesusFreke the way i see it working, is 3 people on unicicles = 3 wheels :D mass transit ftw Apr 21 23:11:48 g00s, I switch clients like this all the time, usually my bnc makes it transparent Apr 21 23:12:53 I normally switch between hexchat, irssi and qicr Apr 21 23:19:20 what's the standard list item background resource in framework? Apr 21 23:19:56 selector, whatever Apr 21 23:25:06 "Fatbergs – formed when fat clumps together with other household waste – are becoming an increasing problem for London’s sewers." .. i think i found one of those in my app Apr 21 23:28:05 lol, wow Apr 21 23:28:41 Hi all, I'm having a problem using Google Cloud Messaging for push notifications. The registration ID I get from the device seems to last less than 12 hours. After something like 4 hours (didn't actually time it or check regularly) the registration id I got on the device this morning is coming back "Not Registered". Has anybody encountered something like this before? Apr 21 23:29:48 hmm, android.R.list_selector_background isn't it, at least it doesn't include the ripple... Apr 21 23:41:38 Hi all. I was posting before about how my toolbar wasn't showing with the new appcompat version below Api 21. I still can't get it to work so I'll post my XML, perhaps one of you has an idea. http://pastebin.com/9fE3WVzL Apr 21 23:41:55 This works perfectly fine on API 21+. But 4.1.1 nothing is shown where the toolbar should be Apr 21 23:43:15 It was showing but not working properly with appcompat v7:22.0.0. But with v7:22.1.0 it doesn't show at all Apr 21 23:43:36 So I assume it's a problem in my XML Apr 21 23:43:49 What is the superclass of MainActivity? Apr 21 23:44:01 public class MainActivity extends ActionBarActivity { Apr 21 23:44:18 I think you have to use AppCompatActivity in 22.1. Apr 21 23:44:32 Or maybe it works either way but the former is just deprecated. Apr 21 23:44:52 ActionBarActivity is correct Apr 21 23:47:23 Okay. I switched to ActionBarActivity. But it's still not showing Apr 21 23:47:40 4.1.1? samsung? Apr 21 23:47:53 nexus 4, emulator Apr 21 23:47:55 liuwenhao: "In this release, ActionBarActivity has been deprecated in favor of the new AppCompatActivity. However, this wasn’t just a rename." Apr 21 23:48:10 whoops. I meant I switched to AppCompatActivity Apr 21 23:48:15 Okay. Apr 21 23:49:03 there's really an AppCompatActivity now? Apr 21 23:49:07 yech Apr 21 23:49:51 liuwenhao: You might as well go ahead and post all relevant Java and XML code. :) Apr 21 23:50:14 Though I guess it could be a 22.1 bug affecting the emulator in particular. Apr 21 23:50:33 I'll try it on a different below api 21 version first Apr 21 23:50:37 just to see if its a bug Apr 21 23:50:54 Hi, I have a recyclerview, i have an adapter and there is a viewholder with every element of the row, one of this element is a textview that can contain a phonenumber, in my xml recyclerview_row.xml I use clickable="true" and autoLink="phone" but the app is crashing, I was making some research and found that its because im trying to start a new activity from something else than an activity Apr 21 23:52:01 Alevsk: What is the stack trace (in LogCat) for the crash? And how are you trying to start the Activity? Apr 21 23:52:21 then I tried to solve the problem invoking a method of the activity from the adapter when the user press the textView (OnClickListener), but its not working Apr 21 23:53:05 give me a second, and I show you Apr 21 23:53:09 Alevsk: LogCat is your go-to guy for this kinda thing. Apr 21 23:54:46 TacticalJoke: here it is Apr 21 23:54:46 https://gist.github.com/Alevsk/04babfa1eb173b79c4e2 Apr 21 23:55:06 I was looking at the log and doing research Apr 21 23:57:16 Im filling the recyclerview with data from a ws but I think this have nothing to do Apr 21 23:58:07 I'm creating an PendingIntent IntentService and doing alarmManager.setRepeating(AlarmManager.RTC, System.currentTimeMillis(), 1000, servicePI);, hoping it'd get triggered every second. Apr 21 23:58:23 Now that I'm testing, I see that it works on API 17, API 19, but not API 22. Apr 21 23:58:41 Any idea what might be wrong? I feel like what I'm doing is very basic stuff Apr 21 23:58:49 Alevsk: The problem is how you're calling startActivity. Apr 21 23:58:59 Everything else you mentioned is irrelevant. Apr 21 23:59:44 I'm doing something very similar with a BroadcastReceiver and that just seems to work Apr 22 00:01:46 kba: strange, should not work on 19 included Apr 22 00:02:09 TacticalJoke: but im not explicitly calling startActivity, I think is android that is handling the textView click with the autoLink="phone" Apr 22 00:02:40 icedp: I'll just try API 19 again... and why shouldn't it work? Apr 22 00:03:04 kba: https://developer.android.com/reference/android/app/AlarmManager.html#setRepeating%28int,%20long,%20long,%20android.app.PendingIntent%29 read the note. maybe this Apr 22 00:03:27 You're right, it doesn't work on 19 Apr 22 00:04:00 TacticalJoke: fixed my problem. It was my activity_main.xml, for whatever reason below api 21 the listview was getting drawn over the toolbar. Not exactly sure why it was working in API 21 but whatever, at least it works now Apr 22 00:05:13 I still have a lot to learn about Android XML. it seems so wonky sometimes Apr 22 00:05:54 Alevsk: Oh, you're right. I was thinking along a different direction. I just saw this: http://stackoverflow.com/questions/13438473/clicking-html-link-in-textview-fires-weird-androidruntimeexception I wonder whether that's the same issue. Apr 22 00:06:13 liuwenhao: Ah, weird. Apr 22 00:06:34 icedp: Not sure how that applies here. It's inexact, but why does that matter? The message should still be delivered according to what's said just above Apr 22 00:06:50 Alevsk: If that is the same issue then the problem may be related to the Context the TextView is instantiated with. Apr 22 00:06:50 The events don't happen at all, it's not that they happen late or anything Apr 22 00:08:00 liuwenhao: If you still have that activity_main.xml I'd be curious of what it was. If it's gone don't worry. :) Apr 22 00:08:08 I mean that I'd be curious to look at it. Apr 22 00:08:37 You don't have a different v21 layout, I guess. Apr 22 00:09:52 Not at the moment, but I want to add it. Sorry I didn't do a push in a while so I don't have the broken xml. Here's what it looks like now: http://pastebin.com/jHMwCrnr Apr 22 00:10:09 TacticalJoke: thanks, Im looking at the answers now Apr 22 00:10:27 Before I had the toolbar outside of the inner relative layout, which worked fine for api 21+ but not with the new appcompat Apr 22 00:10:47 icedp: Also, when I do: alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + timer * 1000, receiverPI); Apr 22 00:11:09 with receiverPI, that works fine. receiverPI is a PendingIntent wrapping a BroadcastReceiver Apr 22 00:11:15 It's confusing to me too, because I don't quite understand why it was broken Apr 22 00:11:21 whereas if I use the exact same code with a ServiceIntent, it deosn't work Apr 22 00:12:28 Ah, no, wait. It is in fact the setRepeating that's fucing with me Apr 22 00:14:12 And... not it's working again on API 19... Apr 22 00:14:13 kba: perhaps it has some minimum period now Apr 22 00:14:24 kba: anyway you shouldn't be using it for one second interval Apr 22 00:14:31 kba: use Handler Apr 22 00:14:51 It's for course work, I'm forced to use it Apr 22 00:16:08 kba: then use sensible interval like half an hour Apr 22 00:16:45 It's for a timer that's being set for a few seconds Apr 22 00:17:02 I want to continuously update a progress bar Apr 22 00:18:23 Yup, using alarmManager.set on API 22 now. Doesn't work. Works with a BroadcastReceiver Apr 22 00:18:48 kba: do what is right and point whoever is disagree to documentation Apr 22 00:18:57 kba icedp https://commonsware.com/blog/2015/03/23/alarmmanager-regression-android-5p1.html Apr 22 00:19:23 They tend to put in problems that we're then supposed to justify. Apr 22 00:19:46 And I don't think this is a problem per se Apr 22 00:19:49 for now Apr 22 00:19:52 ok Apr 22 00:20:04 g00s: yeah, read it, now remember. and it's not in the docs. argh Apr 22 00:21:40 Thanks, g00s, but the problem persists with .set Apr 22 00:21:50 The odd thing is: alarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis() + timer * 1000, servicePI); Apr 22 00:22:03 This doesn't work. But if I replace servicePI with receiverPI (which is very similar!) it works. Apr 22 00:22:29 yay, new release of keepshare going up Apr 22 00:23:31 God, this is some periodic crap error. Now I'm starting to think it is setRepeating again. Apr 22 00:24:36 kba: setRepeating won't work on 19+ for intervals < 60 sec (because you shouldn't use it anyway) Apr 22 00:24:44 I see Apr 22 00:24:57 kba, why even use an alarm manager if it's so frequent Apr 22 00:25:09 alarm manager should *only* be used for instances where your app is not running Apr 22 00:25:29 er, emphasis on *not* Apr 22 00:28:43 Again the word is coursework Apr 22 00:30:11 I have my app published as an alpha, I'm in the testing G+ community, and my google account is listed under license testing. If I attempt to make an IAP, I still get an "Authentication is required. Please sign into your account" error. Apr 22 00:30:32 Anyone have a clue why? Apr 22 00:30:43 desmin88 they want you using advertisements instead Apr 22 00:31:00 the iap actually removes the ads ;) Apr 22 00:31:12 i hope i never have to use IAP apis Apr 22 00:31:17 sound terrible Apr 22 00:31:35 ive cried myself to sleep at night over them Apr 22 00:33:49 otoh, plain paid doesn't sound like the way to go either ... Apr 22 00:34:04 so i'm torn :( Apr 22 00:34:59 I'm using this - makes it a bit easier Apr 22 00:35:00 https://github.com/anjlab/android-inapp-billing-v3 Apr 22 00:39:02 omfg. I have successfully animated a semi-complex thing across APIs 10-22, and the code isn't an eyesore. Apr 22 00:49:52 source or it didn't happen Apr 22 00:51:11 grats groxx Apr 22 00:52:56 is it possible to override app theme style in activity Apr 22 00:53:25 eg i am using translucent status bar, but fking app sdk has an inapp browser that shouldn't use translucent Apr 22 00:56:03 How would i set the listner for this in a activity? http://stackoverflow.com/a/26387629/4280362 Apr 22 00:56:13 I can't just insantiate that class can i? Apr 22 00:57:44 DadFoundMy: it says right there Apr 22 00:57:49 "To use simply extend the OnSwipeListener and override the onSwipe method" Apr 22 00:57:56 DadFoundMy: GestureDetectorCompat accepts it as a constructor argument, I think Apr 22 00:58:24 groxx: thanks Apr 22 00:58:57 you cant instantiate just that class Apr 22 00:59:02 you have to extend it Apr 22 00:59:22 desmin88: why not? im just going to add an implementation for onswipe Apr 22 00:59:29 rather than override it Apr 22 01:00:01 then you have an unreusable swipedirectionlistener Apr 22 01:00:22 its such a simple app that it doesnt even matter Apr 22 01:00:31 im trying to make it in under an hour Apr 22 01:05:12 groxx: im still a little confused. I send the OnSwipeListener in as a parameter, but now what do I do with the GestureDetectorCompact object? Apr 22 01:05:35 I assume do a .onTouchEvent but i am not sure what to send it Apr 22 01:05:40 feed it everything you get from inside onTouchEvent (either in the view, or in an onTouchListener) Apr 22 01:05:49 and return whatever it returns Apr 22 01:06:20 but doesnt onTouchEvent return a boolean? Apr 22 01:06:41 yep Apr 22 01:06:48 so does gestureDetectorCompat.onTouchEvent Apr 22 01:07:08 for me its showing up as taking in a MotionEvent Apr 22 01:07:17 which is the parameter for onTouchEvent() Apr 22 01:07:53 or should i have that call in my onTouchEvent method? Apr 22 01:09:06 onTouchEvent(MotionEvent e) { return detector.onTouchEvent(e); } basically. Apr 22 01:09:51 ahh that makes sense thanks Apr 22 01:09:59 i need to touch up on my interfaces Apr 22 01:10:06 Funny how people do AMAs only when they want something. Apr 22 01:10:11 Most of the people, anyway. Apr 22 01:10:27 "Hay guise, I suddenly care all about you because my new film is coming out!" Apr 22 01:10:51 "Isn't that awesome." Apr 22 01:11:03 Though I think Arnie does them regardless. Apr 22 01:11:19 Cant we just talk about Rampart? Apr 22 01:12:37 Oh, it's Seann William Scott. I was thinking Ray William Johnson. Apr 22 01:19:16 Has anyone taken the plunge with AppCompat 22.1? Apr 22 01:19:29 If so, does it all work? Apr 22 01:22:02 * g00s waiting for TacticalJoke Apr 22 01:22:09 :D Apr 22 01:23:30 DadFoundMy: Do you feel that UnexpectedThugLife has become really awful lately? Apr 22 01:23:48 * groxx automatically added "Exception" to the end of that Apr 22 01:23:49 Like "12 year old humour" awful. Apr 22 01:23:57 groxx: Haha. Apr 22 01:25:14 i read /r/politics once in a while, but its infuriating Apr 22 01:28:41 TacticalJoke: yeah it used to be really good Apr 22 01:32:21 One of the worst subreddits for comments seems to be /r/SubredditDrama. They all share the same opinion about a load of different topics, and if anyone disagrees they get downvoted badly. It'd be so fun trolling those guys, but I'm too lazy. :D Apr 22 01:44:14 A quick bank robbery: https://www.youtube.com/watch?v=8lAoSxiurvE Apr 22 01:51:34 groxx: that code this isnt working. this is what im doing http://pastebin.com/iupkhw7r Apr 22 01:51:43 the onTouchEvent is being called Apr 22 01:51:56 but the OnSwipeListener isnt Apr 22 01:52:19 DadFoundMy: don't make a new one each time Apr 22 01:52:41 DadFoundMy: they're reusable, you just need one per activity or whatever Apr 22 01:53:33 also it's a stateful object, so it won't work unless the same object receives an entire "gesture" (down ... up|cancel) Apr 22 01:55:24 so how do i call that? through the GestureDetector? Apr 22 01:56:10 not sure what you mean Apr 22 01:56:41 how do i pass the gesture. isnt that just the parameter from onTouchEvent Apr 22 01:57:01 right now the OnSwipeListener isnt being called at all Apr 22 02:01:52 DadFoundMy: same way you're doing now. but only use a single instance of GestureDetectorCompat, don't make a new one each time. Apr 22 02:02:22 ohhh ill try that Apr 22 02:04:31 groxx: that worked, thanks Apr 22 02:04:40 think im going to read a chapter on a interfaces now lol Apr 22 02:05:36 interfaces just define "methods instances must implement". when you make "new ()" you make an instance of the thing that implements the interface. if it's just "new Interface() { }" it's just an anonymous class. Apr 22 02:06:34 the interface itself is just a constraint, so you know method X exists. you're still creating and using instances. Apr 22 02:07:41 TacticalJoke: i totalyl agree with you on SRD Apr 22 02:08:16 TacticalJoke: they all follow the circlejerk so hard that it doesnt matter if their view is just simply wrong or narrow sighted Apr 22 02:08:58 middle of the work Apr 22 02:09:02 Let's update Android Studio Apr 22 02:09:19 What's the worst that could happen, it's RC Apr 22 02:09:23 implodes Apr 22 02:09:34 Afzal, oh no, you fell into the trap Apr 22 02:09:40 implodes Apr 22 02:09:43 implodes Apr 22 02:09:55 I am already deeply annoyed by the fact that AS isn't letting me look at android sources >_< Apr 22 02:10:14 hm. that's working for me, fwiw Apr 22 02:10:15 heh, but its Shinny! Apr 22 02:10:36 groxx are you on 1.2? Apr 22 02:10:42 RC0, yeah Apr 22 02:11:05 It's always trying to decompile the class from android.jar and I don't know how to attach sources since that link isn't there Apr 22 02:11:17 I've had other problems though. gradle sync that never completes being the most annoying one so far. Apr 22 02:11:19 Used to work fine before this decompiler came along Apr 22 02:11:38 Afzal: have you installed "sources for sdk" from the sdk manager? Apr 22 02:11:59 yup api 22 Apr 22 02:12:09 which matches your target SDK? Apr 22 02:12:33 ah Apr 22 02:12:39 well . f me Apr 22 02:13:10 my target sdk is indeed api 21 and I have a habit of removing things related to older api (except the SDK platform) Apr 22 02:13:29 DadFoundMy: Yah. Apr 22 02:13:31 :) Apr 22 02:13:37 thanks groxx Apr 22 02:13:45 Has anyone managed to get JVM unit testing working in AS 1.2 ? Apr 22 02:13:45 it's the stupid questions that are hardest to ask yourself. Apr 22 02:13:57 now I see that infinite ync Apr 22 02:13:59 it sucks Apr 22 02:14:09 TacticalJoke like pure java junit? Apr 22 02:14:12 Yeah. Apr 22 02:14:15 I have! Apr 22 02:14:17 What is 'ync'? Apr 22 02:14:20 sync* Apr 22 02:14:23 Okay. lol Apr 22 02:14:50 I might waste hours tomorrow trying AS 1.2, AppCompat 22.1, etc. Apr 22 02:15:01 And then complain tomorrow night that I've just wasted N hours. Apr 22 02:15:05 anyway, yeah I run junit tests in AS 1.2, no issues Apr 22 02:15:08 Okay, cool. Apr 22 02:17:26 groxx it didn't work :( Apr 22 02:18:37 weird, it works on another project but not this one. That other project has targeted to api 22 though. Apr 22 02:21:23 screw it, target 22 it is Apr 22 02:21:59 Afzal: odd. my work project is still targeted at 19, and that works Apr 22 02:22:40 maybe there's something cached. clearing cache/restart Apr 22 02:23:38 yup, that worked :) Apr 22 02:23:45 is there someplace that has a list of the basic attributes i should set for almost every app, like primaryColor, etc Apr 22 02:24:04 like attribute cheatsheet :D Apr 22 02:24:15 g00s: ¯\_(ツ)_/¯ let me know if you find one, that would be handy Apr 22 02:25:30 g00s https://developer.android.com/training/material/theme.html that little graphic halfway through Apr 22 02:25:46 there are probably more properties though Apr 22 02:26:35 Afzal yeah - something like that but much more extensive Apr 22 02:26:38 is it possible to only let a user put in once gesture every certian ammount of time? Apr 22 02:26:39 thanks Apr 22 02:27:56 DadFoundMy: sure. `enabled = false; postDelayed({ enabled = true; }, 1000);` + `onTouchEvent { if (enabled) { detector.onTouchEvent(e); } }` Apr 22 02:38:01 one day, you refactor code and next thing you know, your ServiceHandler's handleMessage isn't being called >_< Apr 22 02:39:25 Hey guys, I am new to android dev, and somewhat of a noob in java. I am making an app to learn to use the different features, I made a button to show gps location and it worked well on my phone. Today I wanted to learn the accelerometer, so I tried just displaying the values for each axis but when I run it the screen is gray then turns black, not even the button shows up anymore. Could anyone take a look at my code and ste Apr 22 02:39:25 er me the right way? Here is my accelerometer class and my Main. http://pastebin.com/h5xEXQtC Apr 22 02:41:08 ironpusher: that's a lot of code to look at, how about reverting back to when it worked and figuring out what you added that caused it to not work any more? Apr 22 02:41:56 ironpusher: you're blocking the UI thread inside onCreate - don't do that. you probably want to run that on a different thread, and send results back to the main thread when they're ready. Apr 22 02:43:00 ... or you could get the solution spoon fed to you, that works too Apr 22 02:43:28 :) Apr 22 02:45:30 CedricBeust: yeah it's alot of code, sorry. Most of it has been added or altered since it worked tho. Apr 22 02:46:04 groxx: Thanks I am reading on threads right now as I don't know what it is. Apr 22 02:46:52 ironpusher: You have a lot of fascinating learning ahead of you :) Apr 22 02:47:20 heh. yeah, good luck :) Apr 22 02:49:55 ~~ironpusher jcip Apr 22 02:50:00 ah right no bot here Apr 22 02:50:56 i tried using a lambda in android development and i got 41 errors Apr 22 02:51:28 :| why does gingerbread hate me? my edittext's focus is going nutso. tap -> focus. tap outside -> clearfocus -> no callback. tap inside again -> is focused -> is not focused called immediately after. Apr 22 02:51:30 aspire: If you want to go down that route, retrolambda Apr 22 02:51:54 CedricBeust gah doesn't bother me that much Apr 22 02:52:07 i thought itd be acceptable because intellij wasn't complaining about it or anything Apr 22 02:52:15 if i wanted a postDelayed to keep running would the best way to do it be by putting it in a while loop? Apr 22 02:52:23 Or Kotlin. Then you have stuff like this: whatever { whateverElse() } :D Apr 22 02:52:34 DadFoundMy: define "keep running"? it's inherently a one-shot event Apr 22 02:52:50 Anyone ever used phonegap Apr 22 02:52:51 DadFoundMy: No. Battery killer. What are you trying to do? Apr 22 02:52:57 groxx: Gingerbread sounds like a nightmare. Apr 22 02:53:14 You talking to me CedricBeust ? Apr 22 02:53:18 lol, with stuff like GB its amazing android went anywhere at all Apr 22 02:53:20 im making a simple game that requires a user to enter input every half second Apr 22 02:53:23 probably because it is. I dream of cameras that lie about their orientation D: Apr 22 02:53:24 Oops, neverMind :) Apr 22 02:53:33 drose379: yes, I think one person has Apr 22 02:53:37 DadFoundMy: You wouldn't loop. The runnable would get called after some time. Apr 22 02:53:45 You could post the runnable all over again to "loop". Apr 22 02:53:50 oh quick question Apr 22 02:53:56 Sup TacticalJoke Apr 22 02:53:59 Hay. Apr 22 02:54:06 TacticalJoke: uhh how do i that lol? Apr 22 02:54:07 is there anything i should avoid or refrain from using that would drain battery Apr 22 02:54:23 aspire there are a few I/O videos for that Apr 22 02:54:24 1) Never use sleep() (well there are exceptions but if you don't know what they are, you should not be calling sleep() 2) consider ScheduledExecutor Apr 22 02:54:35 TacticalJoke: i can just do runnable.run? Apr 22 02:54:36 I think you could say "whatever.postDelayed(this, 5000);" or something. Apr 22 02:54:43 How you been? Apr 22 02:54:45 mhmm ok Apr 22 02:54:49 Though that could be totally wrong. Going on a six-month-old memory of something. Apr 22 02:54:54 do not use the phone as a vibrator Apr 22 02:54:59 ScheduledExecutors are your friends. Do keep track of them, though, and always offer a way to cancel them Apr 22 02:55:08 aspire: never ever start an infinite loop of any kind without a 100% reliable "kill this loop" system Apr 22 02:55:19 btw whenever i try SQLiteDatabase.openOrCreate(...) on my emulator it doesn't work Apr 22 02:55:24 it's not supposed to, right? Apr 22 02:55:29 drose379: Pretty good. I'm happy that the new AppCompat version came out (with material buttons, dialogs, etc.) today. Apr 22 02:55:31 mhmm Apr 22 02:55:53 the only while loop in my app is when im loading the notes from the database haha Apr 22 02:55:57 while (random.nextInt() != 1000) { // we'll stop eventually!! } Apr 22 02:55:58 Oh did it? So I dont have to use 3rd party Libs anymore? Apr 22 02:56:05 Haha, JesusFreke. Apr 22 02:56:16 CedricBeust: i cant find that, do you mean SceduledExecutrerService? Apr 22 02:56:22 drose379: I've not tried it yet, but for buttons and dialogs (and so on) I guess not. Apr 22 02:56:37 drose379: http://www.reddit.com/r/androiddev/comments/33ebv1/support_library_221_released/ Apr 22 02:57:08 Cool Apr 22 02:58:10 TacticalJoke one reason why this is good, is so that iosched will hopefully demonstrate those things when its released Apr 22 02:58:33 last year, i think they did a second release a few months afterwards when that appcompat was released Apr 22 02:59:02 Yeah. Apr 22 02:59:18 i/o / iosched --> months -> appcompat released -> iosched again **** ENDING LOGGING AT Wed Apr 22 02:59:58 2015