**** BEGIN LOGGING AT Thu Apr 16 02:59:59 2015 Apr 16 03:00:02 the highest is generally supported automagically, with a small amount of work here and there (or a complete redesign, whatever you please) Apr 16 03:00:50 JesusFreke: this background is quite trippy. thanks for reminding me :) Apr 16 03:01:07 groxx: haha, glad you like! Apr 16 03:01:14 that one was a fun one to make Apr 16 03:01:39 it was pretty challenging figuring out how to generate the tiling in such a way that you could continuously scroll in any direction Apr 16 03:01:49 it's so smooth. your eyes are kinda forced to follow it, it's disorienting :D Apr 16 03:02:06 groxx: I love the multi-touch stuff too Apr 16 03:02:21 just something about the way it follows your fingers as you rotate, etc. Apr 16 03:02:51 yeah. so few backgrounds do anything like that :| Apr 16 03:06:35 if you're irc'ing on your device, you can click penroser://preference?left_skinny_color=0x586e75&right_skinny_color=0x73642&left_fat_color=0x73642&right_fat_color=0x586e75&scale=1.9639553 for my current (dark solarized inspired) color scheme Apr 16 03:06:59 hmm, maybe. my (non-device) irc client didn't want to linkify that. Apr 16 03:07:01 * JesusFreke shrugs Apr 16 03:17:38 Hey guys! Apr 16 03:18:45 I've got an app suspended for a stupid reason, and they won't bring it back. the account is ok, but now I want to upload a new app but I'm afraid that the whole account gets suspended in the future Apr 16 03:19:03 should I create a new account with the same credit card? is that even possible? Apr 16 03:19:34 what's your expirience? maybe if I have two accounts with the same CC only one of them gets suspended, but I'm not sure how it works Apr 16 03:20:48 gets suspended because of the first or because of the new app? Apr 16 03:21:16 the first app Apr 16 03:21:51 I updated it and they didn't like a screenshot, it was my fault though because I didn't check it, it was against their policy u.u Apr 16 03:22:17 thats hardly a 'ban your account' offense Apr 16 03:22:34 I know, but it's a "strike" as they call it I think Apr 16 03:22:50 you're probably more likely to get banned for having multiple accounts :) Apr 16 03:22:51 I prefer to upload this new app in a whole new place Apr 16 03:23:02 well, that's why I'm asking. isn't it legal? :( Apr 16 03:23:17 I couldn't find much information on that Apr 16 03:24:21 well if you want to be sure, (1) read the terms and conditions, developer agreements, etc, front to back and (2) just email Play support and ask for their blessing Apr 16 03:24:24 it makes sense to have multiple accounts. a company which develop different kinds of apps would be interested in having more than one Apr 16 03:27:18 oh, and btw, last question! Apr 16 03:27:50 do you guys know any way to enable in app purchases from outside the US? Apr 16 03:28:25 outside the US is not the issue, perhaps your specific country is? Apr 16 03:28:27 (it probably works for Europe as well, but not here) Apr 16 03:28:33 yep Apr 16 03:28:40 there's a list of countries somewhere Apr 16 03:28:51 and if your country is not on there, there is little you can do Apr 16 03:28:59 aside from having an account by proxy Apr 16 03:29:14 I tried, they use other kind of config to know where you are Apr 16 03:29:20 probably your credit card or something Apr 16 03:30:08 I don't mean via VPN Apr 16 03:30:15 I mean have someone in another country create the account for you Apr 16 03:30:30 oh, ok, yeah. that would work Apr 16 03:30:31 that also makes them responsible and get your money though :P Apr 16 03:31:25 this saddens me Apr 16 03:31:30 i cannot change my fabric.io email Apr 16 03:36:49 JesusFreke: yeah, mine didn't either :/ Apr 16 03:37:03 JesusFreke: linkify, that is Apr 16 03:37:54 does "compile project(':project')" usually work to import a local library project? Apr 16 03:46:50 drinfernoo it should work if they day of the week is odd Apr 16 03:47:20 or it's the second tuesday of the month Apr 16 03:49:43 JesusFreke so how come no android powered unicycle consortium ? Apr 16 03:50:20 g00s: they won't let me. something about niche markets blah blah. :( Apr 16 04:00:14 JesusFreke looks cool http://www.wsj.com/articles/cyclings-bradley-wiggins-to-make-attempt-at-one-hour-record-1429114606 Apr 16 04:00:27 if you try it, you'll need those aerodynamic discs though Apr 16 04:04:07 do stubbed void methods (via mockito) ALWAYS doNothing the first time they are invoked? Apr 16 04:06:40 the opening picture looks like a man with helmetting chilling pensively on some form of modern art Apr 16 04:07:07 *helmet Apr 16 04:08:57 groxx, http://cdn.meme.am/instances/31675024.jpg Apr 16 04:11:03 I swear I've tried everything I can think of Apr 16 04:12:51 JesusFreke also wouldn't hurt to have airfoil like seatpost too, like that bike ^ Apr 16 04:18:39 I would get a record-breaking 14 miles or so :p Apr 16 04:23:22 JesusFreke, ever had problems with "attribute has already been defined"? Apr 16 04:24:26 drinfernoo: context? Apr 16 04:26:19 I'm trying to use appcompat-v7:22.0.0, but almost every single attribute from appcompat errors, saying "attribute *** has already been defined". i believe its because some of my dependencies are dependent on appcompat-v7:21.0.3, but I can't override them :( Apr 16 04:26:20 <_genuser_> OMG visual studio has spoiled me in debugging. Apr 16 04:26:33 or Apr 16 04:26:41 idk how to override them Apr 16 04:26:49 or something Apr 16 04:26:56 yeah, no clue. sorry :) Apr 16 04:26:58 <_genuser_> eclipse is like a toddler trying to compete in a free sprint at the olympics Apr 16 04:27:09 damn Apr 16 04:27:22 g00s? Apr 16 04:27:24 lol Apr 16 04:30:04 drinfernoo you will have to resolve the correct appcompat - can't grap 22.0.0 and 22.0.3 Apr 16 04:30:21 grap? Apr 16 04:30:58 grab Apr 16 04:30:59 some of my dependencies use 21.0.3, and some use 22.0.0... I didn't even know there was a 22.0.3 yet lol Apr 16 04:31:05 ohh Apr 16 04:32:10 you'll find the answer in the encyclopedia of gradle, Vol 12, page 30967 Apr 16 04:33:14 http://java.dzone.com/articles/gradle-overruling-third-party Apr 16 04:34:03 And the Lord spake, saying - first, shalt though take out thy holy dependency. Then, shalt thou count to 3, no more, no less. Apr 16 04:36:05 g00s, I read that :( hold on, I'll paste my build.gradle's Apr 16 04:36:18 drinfernoo lol nooo ... Apr 16 04:36:36 i'm terrible fixing gradle problems, i just leave it alone mostly Apr 16 04:36:43 fuuuuu lol Apr 16 04:37:14 I tried to do what that link said, in my top-level gradle file, but it didn't do anything lol Apr 16 04:37:19 you counted to 5, didn't you? that's right out. Apr 16 04:37:26 heh Apr 16 04:37:34 JesusFreke, I counted to 4 :( Apr 16 04:37:46 because that's how many hundred errors I have Apr 16 04:38:07 drinfernoo you must throw the grenade at the bad dependency, being naughty in His sight , which will snuff it Apr 16 04:41:27 i Apr 16 04:41:37 don't know what that means Apr 16 04:41:37 lol Apr 16 04:42:01 !! Apr 16 04:42:06 https://www.youtube.com/watch?v=xOrgLj9lOwk Apr 16 04:44:48 Would it be a bad idea to just dump all the icons from the Google Material Icons project in my resource directory and use them when I need them? I don't suppose there's an intelligent asset packaging system that determines if a drawable is used...? Apr 16 04:47:14 dammit Apr 16 04:49:24 JesusFreke "In Apple Inc.'s iOS system, Siri may say that the "Rabbit of Caerbannog" is its favorite animal when asked." Apr 16 04:49:34 haha Apr 16 04:53:14 JesusFreke i thought somewhere that they doused the rabit in some dye or whatever, and couldn't get it out again Apr 16 04:54:51 blood red dye :) Apr 16 05:00:36 Anyone here use pocket git? Apr 16 05:13:29 is GCM available for all devices? should I consider cases in which an app can be subscribed to GCM? Apr 16 05:17:08 Not available on all devices (e.g. Amazon) Apr 16 05:17:26 ronkrt, for what? Apr 16 05:17:34 nvm Apr 16 05:18:59 <_genuser_> man, made some headway with my app yesterday. it's sounding fun now. Apr 16 05:19:23 <_genuser_> but debugging on eclipse is a little slow. :) Apr 16 05:19:46 <_genuser_> anybody else working on something fun? Apr 16 05:21:51 android wear apps ? Apr 16 05:22:26 their fun Apr 16 05:22:51 <_genuser_> hmm, I don't have a wear gadget so I can't really code and try out an app. Apr 16 05:23:02 <_genuser_> but I guess it might be fun to code some apps for it. Apr 16 05:23:45 yup couldn't hurt Apr 16 05:24:16 just got a moto 360 Apr 16 05:24:53 <_genuser_> this guy I was talking to mentioned he bought this samsung gadget that pairs with his phone. but can also take it's own SIM card. Apr 16 05:25:14 <_genuser_> but thsi thing doesn't sync with a bluetooth ear piece so if you answer a call on it, it's star trek style, open communication. Apr 16 05:25:42 so I'm learning but first new toilet bowl wax ring needs installed Apr 16 05:31:49 interesting, so Android's DecimalFormat is enhanced over oracles Apr 16 05:33:16 * g00s <3 significant figures addition Apr 16 05:38:34 <_genuser_> lol, their documentation is also. Apr 16 05:42:41 _genuser_ not sure what got into them, thats rare Apr 16 05:48:55 <_genuser_> tjhink its more that oracle has stopped doing new stuff since late 90s Apr 16 05:50:12 guess she liked me tho, used to drive me around Apr 16 06:04:42 can I just clarify that I've got this right? to simply test an in app product, I have to 1. Create a Google+ community for the app. 2. Invite an account to it other than my developer one. And it has to be on another real device. 3. Invite that Google+ community to the alpha channel Apr 16 06:05:25 if so, how can they expect that everyone has easy access to another device? and why do I have to use google+, can't I just enter an email address? and why can't it be my own? Apr 16 06:06:06 test in app product, or in app purchase? Apr 16 06:07:30 what is the difference? Apr 16 06:07:49 but probably purchase. it's a "remove ads" $1 IAP. Apr 16 06:07:52 didn't know if you were saying to just have someone test your product, meaning your app Apr 16 06:08:26 duncannz: IAP is a pain Apr 16 06:08:35 and yes that is basically the process Apr 16 06:09:24 although the g+ community i dont think you need to do Apr 16 06:09:28 http://developer.android.com/google/play/billing/billing_testing.html#test-purchases} Apr 16 06:11:20 <_genuser_> OMG the static vars in my app and the cross activity/service/activity/service function calling! Apr 16 06:11:26 <_genuser_> it's already looking so clutterred Apr 16 06:11:50 what kinda static vars Apr 16 06:12:02 _genuser_ that doesn't sound good Apr 16 06:12:04 _genuser_: what are you doing? Apr 16 06:23:08 <_genuser_> g00s: unfortunately, do accomodate the android application model, you end up having to write pretty complicated setups. Apr 16 06:23:25 that ... is true. lots of accidental complexity Apr 16 06:23:37 <_genuser_> add in to that the fact, that I didn't know some of the stuff before and learned while doing it Apr 16 06:23:53 <_genuser_> that means, my own lack of experience and knowledge then leads to additional complexity. Apr 16 06:24:33 i think my app is actually pretty trivial conceptually, but 95% of the complexity is because ... android. i plan on porting to windows phone, so it will be interesting to see how much easier it is there Apr 16 06:25:10 <_genuser_> so mainactivity.StaticVar is initiated over the web in onCreate. then second activity is launched, when you back out of second activity, first activity is launched again and onCreate is called. Apr 16 06:25:41 <_genuser_> so I'm now trying to see if the StaticVar retains it's value since it's static and should be around while app is loaded. Apr 16 06:25:52 _genuser_ thats a bad idea ;) Apr 16 06:26:01 desmin88: yeah I added a test email address to Settings->Account Details but then that page says: "Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported.[...] You can publish an app to the alpha or beta distribution channels.". And an alpha distribution channel can only be targeted to a Google+ community, not individual emails. Apr 16 06:26:51 I know there's nothing that can be done to change it, it's just a real nuisance. Nobody wants to use g+ and the process for testing a simple in app purchase is way too convoluted. Apr 16 06:27:43 <_genuser_> g00s: well, that's some time intensive stuff that I'd rather just do once for the app, especially since it doesn't change. Apr 16 06:28:11 <_genuser_> g00s: I could just subclass Application and create an "application level var", or just put it as static in mainactivity. Apr 16 06:28:24 <_genuser_> g00s: you think that's bad? You got another approach to suggest? Apr 16 06:29:36 setup interfaces or callbacks or broadcast or binds to service or fragments or quite a few ways, but you'd have to detail the data being exchanged Apr 16 06:30:15 <_genuser_> whatitis-: was taht for my app? Apr 16 06:30:27 yeah Apr 16 06:30:44 <_genuser_> whatitis-: well, I'm not passing it back and forth as using it everywhere application wide. Apr 16 06:30:57 then why are you keeping them in the scope of all Apr 16 06:31:31 <_genuser_> webdata (long to retrieve and process @4seconds per request). it's initialized in mainactivity as static var. then everything else can use it all over. Apr 16 06:31:49 <_genuser_> however, I was thinking of moving to the application scope as application var. since it doesn't change much once it's downloaded. Apr 16 06:31:59 just use a service or intent service to fetch, then broadcast to whom ever is listening Apr 16 06:32:49 <_genuser_> well, per my understanding that works when someone requests work and may or may not be around to hear the results. Apr 16 06:33:05 <_genuser_> this is more of a get it once and store it so any activity in the app can use it for the entire app run. Apr 16 06:33:23 a service sounds good for that Apr 16 06:33:32 anyone can bind, or request data from it Apr 16 06:34:11 <_genuser_> ok, so please explain to me the process flow here. app starts, main activity sends request to the service to fetch data? Apr 16 06:34:27 <_genuser_> service fetches and sends broadcast to whoeveer's listening? Apr 16 06:34:56 app starts, if wanting fresh data, startService, then if wanting to bindService, you can send intent data with startService to specify request Apr 16 06:35:15 any other started activites can bind to service as well, and get whatever it needs Apr 16 06:35:54 <_genuser_> right, but once the service is done retrieving.... it stores is somewhere and broadcasts to listeners that data is ready? Apr 16 06:36:04 you can send a broadcast, or if an activity binds you can setup communications, there are many ways to communicate activity/service, but sounds like you atleast want service todo work and have it handy Apr 16 06:36:18 the service can stay running as a data hub Apr 16 06:36:25 you can kill it whenever Apr 16 06:36:47 <_genuser_> I see, so the service can stay running and maintain a copy of the data then. is that it? Apr 16 06:36:51 if no more activities are bound can kill it, or if stopService() or stopSelf from within after receiving command etc Apr 16 06:37:04 it can persist the life of app Apr 16 06:37:13 and stay off ui thread for work and for data Apr 16 06:37:32 and then you do the lolcycle dance ... Apr 16 06:37:34 cha cha cha Apr 16 06:37:45 <_genuser_> cha cha Apr 16 06:37:53 <_genuser_> ok, so this sounds like standard service and not IntentService. Apr 16 06:37:54 mix some bat brains with dandelions Apr 16 06:38:14 IntentService is more for repeat use, Service is for constant Apr 16 06:38:38 like an AsyncTask intentService is for shooting off events Apr 16 06:39:04 <_genuser_> I have one IntentService implemented. I use it for data packing. when all the images and expense data is ready, I call the IntentService to pack it all in a standard binary format (app specific) and store it for upload to server later. Apr 16 06:39:21 exactly a shoot off event Apr 16 06:39:48 pull.....bang Apr 16 06:39:52 <_genuser_> so it seems, then, that I need to look into a service and have it run and maintain a copy of the data. Apr 16 06:40:11 sure, or if not much activity switching can keep a headless fragment Apr 16 06:40:41 <_genuser_> now, one problem that I notice with all these service that android team has designed. Actually passing data around is still done via intents and if you obj can't be serialized, you basically can't. Apr 16 06:40:59 _genuser_, that isn't the only way Apr 16 06:41:18 <_genuser_> so a service maintains an object, how would one request a copy of the obj for example? Apr 16 06:41:18 binding gives you are pretty handy method of data dealing, and there are other ways Apr 16 06:41:32 get a copy of the service and read the object Apr 16 06:41:55 <_genuser_> ok, so 1) service, 2) binding... few things to research. but it sounds like it will be nicer once implemented. Apr 16 06:41:57 or have that service pass the object to a handler that was registered on whatever activity you want Apr 16 06:42:14 just read up on service and communication, there are many ways todo it Apr 16 06:42:36 <_genuser_> having done less of the handler, broadcast type stuff, I get a little lost in terminology. but I think once I've done it a bit, it will be easier to follow Apr 16 06:42:59 yeah repeat use will give you a better understanding Apr 16 06:43:28 <_genuser_> because I'm getting tired of static vars on main activity - which should remain initialized for duration of app, technically. but it's getting annoying to reference mainactivity all over. Apr 16 06:43:59 and know that when an activity starts, calling startService or bindService on an already running service doesn't cause more instances, it just updates the onStartCommand with whatever intent you send, so it's easy to communicate without worrying about state Apr 16 06:45:06 <_genuser_> nice. sounds like the only hit would be actual fetch time. 4 seconds on s4, and 4.5 on noteII. Apr 16 06:45:30 bah, just use callbacks and keep good placeloaders til your data arrives Apr 16 06:46:17 just don't expect to block while getting data, keep things still alive, and keep things showing progress Apr 16 06:46:47 <_genuser_> yeah, I got that part done for the saving files bit, where I use IntentService and send off work and continue with app. Apr 16 06:47:08 <_genuser_> altho, I kinda cheated there and stored a .count static var on IntentService to track how many jobs are in progress. Apr 16 06:47:50 <_genuser_> I know it sounds like I love static vars, but I've used them more in 1yr of android dev than I used them in 15 years of non-android dev Apr 16 06:55:51 <_genuser_> wait wait wait, when flipping back from a second activity you launched, the first activity's oncreate is not called again? interesting. Apr 16 07:00:32 _genuser_: you need the basics, look at the android activity lifecycle diagram in the docs Apr 16 07:00:59 _genuser_: also consider a singleton and a message bus...there is a concept of an application as well as activities Apr 16 07:01:18 don't use singletons to store state that should be saved though Apr 16 07:05:24 Is there a shortcut to shuffle through active window in AS? like move from Editor to Project View to Active Tool Windows like Android DDMS. Apr 16 07:07:30 <_genuser_> myke: tbh, I've been that thing tons of times, it's like the java applet lifecyle. pointless and overly complicated. I keep forgetting. Apr 16 07:07:42 <_genuser_> s/been/seen/ Apr 16 07:08:22 <_genuser_> I am reading about the service now tho. seems like a sticky service that runs and keeps the data would be pretty useful. it can also be used to manipulate the data - fetch, update, store to disk, etc. Apr 16 07:10:09 <_genuser_> one step forward, two backwards. :) instead of adding new functionality, I'm already refactoring the existing codebase. Apr 16 07:10:18 <_genuser_> but once it's done, it should be much much cleaner and easier to maintain. Apr 16 07:26:04 is it bad to have multiple canvases on one screen? (mixed with some linearlayouts) Apr 16 07:26:15 maybe better to ake it just one big canvas and draw everything? Apr 16 07:26:46 =) Apr 16 07:34:44 thepoosh ! Apr 16 07:36:00 g00s: ! Apr 16 07:36:03 sup dude? Apr 16 07:36:24 thepoosh hm, fighting the fight Apr 16 07:36:24 my boss just got here, soon sync and I'll know more about the new version publish date Apr 16 07:36:32 you go girl! Apr 16 07:36:47 lol Apr 16 07:37:28 i found something that pisses me off in AS Apr 16 07:37:57 take 10 minutes to build ? Apr 16 07:38:09 nah, doesn't worry me yet Apr 16 07:38:19 didn't start working with big projects Apr 16 07:38:29 i'm using 1.2 and having tons of problems Apr 16 07:38:39 so use 1.1 if you can Apr 16 07:38:44 is that the beta/canary versions? Apr 16 07:38:53 its dev/beta/canary atm Apr 16 07:38:59 oh, mine is 1.1 Apr 16 07:39:08 stupid thing isn't generating R files, Apr 16 07:39:10 I don't care for being a tester at the moment Apr 16 07:39:13 oh Apr 16 07:39:14 sux Apr 16 07:39:23 like that shit we used to deal with in 2009 Apr 16 07:39:29 hmmmm Apr 16 07:39:37 have you tried deleting your gen folder :P Apr 16 07:40:01 i'm seeing 2 problems. 1 - R.java isn't being created Apr 16 07:40:17 or 2 - its being created, but stuff i add in the xml editors, isn't being added to it Apr 16 07:40:22 like ids, etc Apr 16 07:40:38 i filed a bug, i think it got ignored Apr 16 07:41:07 <_genuser_> g00s: so you're just hanging out here in the middle of the night? Apr 16 07:41:15 no working Apr 16 07:41:17 bleh Apr 16 07:41:27 so have 2 working AS Apr 16 07:41:37 one with the stable one and the other as canary Apr 16 07:41:54 <_genuser_> g00s: in the U.S? Apr 16 07:41:58 yeah Apr 16 07:42:39 <_genuser_> wow, you're working late in the night. Apr 16 07:42:49 almost bedtime when poosh comes along Apr 16 07:42:58 wat?! Apr 16 07:42:59 <_genuser_> oh, he's your reliever? Apr 16 07:43:02 lol Apr 16 07:43:05 it's 10:42 A.M. Apr 16 07:43:12 poosh is on the other side of the world Apr 16 07:43:21 GMT+2.00 Apr 16 07:43:43 <_genuser_> oh you and your knowlegeable ness. Apr 16 07:43:47 <_genuser_> gmt+2!! Apr 16 07:43:57 does anyone have a clue about this: http://stackoverflow.com/questions/29658528/how-to-update-third-party-widgets-at-boot-completed ? Just down know what i can do anymore ;( Apr 16 07:44:24 gmt means goos mean time Apr 16 07:44:56 <_genuser_> is that when g00s goes mean? Apr 16 07:45:08 :D Apr 16 07:45:12 <_genuser_> I'm reading aobut the service stuff now man. Apr 16 07:45:37 <_genuser_> it will really speed up my start up time. but I will have to track when the data is actually ready so people can launch the app but not do anything that requires the data Apr 16 07:55:19 is anyone in the mood to read a SO question i posted? :D Apr 16 07:56:31 Hey, I want to make it so when the user clicks a button it calls a phone number but the number is hidden and they cannot see it in the outgoing call history or when it's calling. Is that possible? Apr 16 07:56:47 Qlue sounds pretty shady Apr 16 07:56:52 hopefully not Apr 16 07:56:54 It's not shady Apr 16 07:56:57 but Apr 16 07:57:05 its not for an app store application Apr 16 07:57:09 you can't dial a call programatically Apr 16 07:57:12 its for a private company Apr 16 07:57:19 Quintasan, if you're rooted you can do anything Apr 16 07:57:21 you can do it with iOS Apr 16 07:57:23 all you can do is send an intent to the dialer with the #, the user has to finish it Apr 16 07:57:24 Qlue, that is Apr 16 07:58:01 iprime: it's possible on a rooted phone? Apr 16 07:58:53 not directly, but with some work, why not Apr 16 07:59:00 http://stackoverflow.com/questions/29664193/nullpointerexception-when-onloadfinished-callback-is-reached Apr 16 07:59:08 tho you have to sort of create a custom "ROM" Apr 16 07:59:17 iprime i wouldn't be able to use android? Apr 16 07:59:37 Qlue, what do you mean? Apr 16 07:59:58 in iOS you can do this with the "tel://" string, Apr 16 08:00:07 vs the "telprompt://"" Apr 16 08:01:25 Qlue, you can do that in ANdroid but the Dialer screen will be shown Apr 16 08:01:47 Pwnies looks like your cursoradapter is trying to get a column that isn't in the result set Apr 16 08:01:47 and the number will be in the call history? Apr 16 08:02:18 hm. i swear i set it to grab my years column Apr 16 08:02:36 Pwnies try something like this to see whats going on http://developer.android.com/reference/android/database/DatabaseUtils.html#dumpCursor(android.database.Cursor) Apr 16 08:02:41 Pwnies, don't pass null for "from", pass an empty array Apr 16 08:03:05 iprime can i pm you? Apr 16 08:05:09 Pwnies, that's the param before 'toViews' / SimpleCursorAdapter Apr 16 08:05:42 k, filling a log.d with the dumpCursorToString g00s Apr 16 08:06:00 k iprime, working on it Apr 16 08:10:28 hm. iprime, that got rid of my nullpointerexception, but my cursorloader still isn't populating my spinners Apr 16 08:14:06 iprime, if you want to submit an answer to SO, i'll mark it as the answer. It did get rid of my NPE Apr 16 08:15:20 Pwnies, that's becauuse you pass an empty array (as I've suggested), you should probably also include the column names that are to be mapped to the views Apr 16 08:18:28 so instead of an empty array, pass an array containing the pointer to the column year? Apr 16 08:18:48 an array containing the names of the columns Apr 16 08:18:52 just as in your projection Apr 16 08:18:53 anyone use phonegap? can it write native android code Apr 16 08:19:09 because that's what you wanna show, right? Apr 16 08:20:40 I want to show all the values in a column containing years Apr 16 08:20:53 so, from 1970-2015 Apr 16 08:21:30 i passed an array containing the column name to no avail sadly Apr 16 08:22:39 additionally, the db is being populated by a service calling an api Apr 16 08:23:42 the db is empty on app launch Apr 16 08:24:37 you're binding to 2 views, so why just one column? Apr 16 08:24:40 oh Apr 16 08:24:55 they're both getting the same values Apr 16 08:30:04 what do you think about scala for android development? Apr 16 08:34:43 iprime, do you know why my cursorloader is disappointing me/ Apr 16 08:35:21 Pwnies, no idea, no time to check all your code now, i might check the details later Apr 16 08:35:50 k. thanks for getting rid of my NPE Apr 16 08:41:47 <_genuser_> so if a service is already start and you start it again, it will just ignore the request, right? Apr 16 08:43:35 eeyup Apr 16 08:43:44 well it will run onstartcommand Apr 16 08:44:59 <_genuser_> I think I'm gonna take a minute to read about it a little more. but it's looking like it's going to help with data manipulation quite a bit. Apr 16 08:47:28 hi, I want to put a checkbox at the bottom of a TimePickerDialog, but I can't get the positioning right Apr 16 10:08:50 if there is anyone who has dealt with display of big numbers, http://stackoverflow.com/questions/29603418/how-do-we-convert-bigger-numbers-into-locale-based-smaller-strings Apr 16 10:09:36 1,500,000 into (en: 1.5M | ja: 150万) etc Apr 16 10:09:39 the requirements is to convert Apr 16 10:09:48 anyone? Apr 16 10:10:53 anyone want to discuss (help me understand) ContentProviders, Resolvers? :-) Apr 16 10:11:12 more example: convert 150,000,000 into (en: 150M | ja: 1.5億) etc Apr 16 10:11:34 I've followed the Udacity course, which builds a CP to interface an SQLite database, but in my case I want to interface the images (photos) on the phone. Apr 16 10:12:31 I just can't get my head around the concepts, with the Contract, and the Provider vs the Resolver class... It all makes more sense in a SQL-scenario, but less so in my non-SQL scenario Apr 16 10:12:59 @joakimk_ this was a good tutorial: http://www.vogella.com/tutorials/AndroidSQLite/article.html Apr 16 10:13:49 storing images into byte codes in DB ? Apr 16 10:14:24 Hi rishabhmhjn! Thanks! But that also deals with the case when the data you're "providing" is in fact in a database Apr 16 10:14:52 joakimk_: how about storing images as blobs in DB? Apr 16 10:15:02 rishabhmhjn: to me, it seems unneccessary to first copy all image files from the SD-card etc into the DB Apr 16 10:15:09 do you agree? :) Apr 16 10:15:18 joakimk_: agreed :) Apr 16 10:15:20 twice the space usage :-o Apr 16 10:16:43 so, I have a set of files, essentially, JPEGs. I need to wrap a ContentProvider around this (prerequisite for a course). Initially, to get started with my app/project, I simply opened a cursor to MediaStore ;) Apr 16 10:17:03 heya guys, where should I report a platform bug? Apr 16 10:17:35 I have checked https://code.google.com/p/android/issues but there are no templates for reporting a platform bug! Apr 16 10:17:43 but, I need to write a CP. So, I thought the CP should read all files of type *.jpg (in some dir), and "insert" these into a MatrixCursor: filename, imageData, dateTaken etc Apr 16 10:18:03 essentially, rewrite the MediaStore (?) Apr 16 10:18:06 ;) Apr 16 10:18:30 anyone? Apr 16 10:18:36 I'm joking -- MS is obviously far superior. But, in a sense, this is what I need to do? Apr 16 10:25:34 so I see that onCreate() is called again if the activity is killed but then the user navigates back to the app (recent screens list). I have code in onCreate that creates a database row on the server and must not be called again when the activity is navigated back to. Where else can I put it? Apr 16 10:27:20 at least I have finally found why there are so many duplicate rows when I look at my database, hopefully it didn't cause too much confusion Apr 16 10:30:28 ah savedInstanceState. of course Apr 16 10:31:36 glad we could help you Apr 16 10:32:29 I should have thought of it though Apr 16 10:32:52 thats when the rubber duck debugging kicks in Apr 16 10:52:18 Sup, what do I need to import to get Item..Clipdata to work? It says "Cannot resolv symbol 'Item'". Apr 16 11:00:48 Hi People! Any help on this please? http://stackoverflow.com/q/29669390/243709 Apr 16 11:06:54 So, I'm trying to follow the lead from this Udacity course, and roll my own ContentProvider. But! My data is NOT in SQL; I want to "interface" the photos (JPEGs) on the phone. I'd like to serve/support 2 URIs: a path, and a path + a year. The first gives *.jpg from that dir, and the second filters on year (date_taken). Apr 16 11:07:34 See WeatherContract.java @ https://github.com/udacity/Sunshine-Version-2/tree/sunshine_master/app/src/main/java/com/example/android/sunshine/app/data Apr 16 11:08:22 that's what I'm working from, from that example. So, I've set up my own "PhotoContract", in lack of a better name, but some of this setup is still quite abstract to me Apr 16 11:09:37 What I've got (so far) is pasted here: http://www.pastebin.com/HzGBqDpm Apr 16 11:10:06 Essentially, I'm asking: Wanna have a glance, and let me know if I'm on the right track? :) Apr 16 11:11:18 The "big issue" (for me), is that my ContentProvider (I'll call it PhotoProvider) queries a set of images on "disk" -- it's *not* using the SQLite database. All tutorials etc I've seen deal with querying the DB :-/ Apr 16 11:12:39 My plan: Get that contract set up properly, to keep everything neat. Then, PhotoProvider.query() etc will essentially do something like go to dir (path), read all files *.jpg into array, insert these into MatrixCursor, and return that...?? Apr 16 11:16:34 how can i solve transactiontoolarge exception ? i have to update a contact photo by getting it from sdcard which is already compressed png Apr 16 11:17:01 When creating new virtual devices in Genomotion, I can go as far back as 2.3.7. How can I emulate an older os version, specifically 2.2? Apr 16 11:18:06 genymotion doesnt have lower than 2.3.7 Apr 16 11:18:29 anyway why would you support lower than api 10 :s Apr 16 11:19:11 In PhotoContract (http://www.pastebin.com/HzGBqDpm) I've set up two classes, one to support each of the two URIs (path and path/year). Does that makes sense? Apr 16 11:24:23 Hello, I am trying to build native code using ndk, but I got an error: undefined reference to 'ffs', how to fix it ? Apr 16 11:26:17 AnAnt: Don't reference something that doesn't exist Apr 16 11:26:20 Maybe he wants to travel to the past Apr 16 11:27:25 ? Apr 16 11:27:56 thanks, I found some patch that does this: #define ffs(i) __builtin_ffs(i) Apr 16 11:30:49 Hello folks! Apr 16 11:30:56 good afternoon Apr 16 11:32:37 On a Up Activity (back) if I try to use intent.setExtra()... and after that use finish(), it won't work, right? Apr 16 11:33:17 good afternoon Ashiren :) Apr 16 11:34:18 android.os.TransactionTooLargeException any idea how to solve it ? getting an img from sdCard and update specified contact's photo Apr 16 12:12:42 I want to play with simple 3D Objects in Android (cube, sphere, ...), in order to make them move and animate. What would be the best option to play with that ? Apr 16 12:31:51 I'm working with a usb-device and have created an intent-filter. It works, but not if the device was already plugged when I started the application (from the debugger). I am not meant to combine intent-filter and enumeration? Apr 16 12:49:28 hello Apr 16 12:49:47 how can i use the same actionbar in all the activities? Apr 16 12:50:55 Morning everyone. Apr 16 12:51:27 i want to include the ActionBar from the main activity in all its children Apr 16 12:53:54 I have a question about wake locks, and geo-fencing. Specifically, I have an app that is killing battery because its aquiring 1000's of wake locks. Thats obviously not right, but theres abit more to the story. Specifically, its an app that relies on the google location services (Geo-fencing). We need to know when we enter or exit a geo-fence, but were Apr 16 12:53:55 finding that the location services are not very accurate. Apr 16 12:54:55 yes, because they're using methods that don't kill the battery :) Apr 16 12:55:00 so what's your issue? Apr 16 12:55:19 Specifically, we will be clicking along and then get a random, off the wall location update that trips the fence, and then back in few seconds later, thus tripping the action. We are having to acquire wake locks and turn on fine location briefly to verify before triggering the action... Apr 16 12:55:54 Mavrik: So Im trying to think of a way to handle it thats both battery friendly and accurate... so far its seeming like an impossible task... lol Apr 16 12:56:04 Any thoughts? Apr 16 13:01:55 was it a mistake to structure my Navigation Drawer app as One Activity/Multiple Fragments? Apr 16 13:03:29 heyas Apr 16 13:03:33 my problem: My app uses a popup window (using AlertDialog.Builder); this has a user input (EditText). Problem is that in some cases, the text color is that of the background, which does not help visibility. Apr 16 13:06:40 <_genuser_> MooGoo: I think the sample they have does the same setup. one activity, multiple fragments where each selection from the nav drawer loads a new fragment. Apr 16 13:07:20 yea, that is what I based my app on, but now I'm starting to wonder, especilly after looking at the source to that Google IO app Apr 16 13:08:22 <_genuser_> if it's not causing you any problems, don't worry about it. Apr 16 13:08:38 <_genuser_> unless this google IO app has something great that you want to implement and the fragments are preventing that. Apr 16 13:09:50 well....I kinda just discovered "Don't keep background activities" and it is causing tons of problems with my app...and I wonder if it is partly because of the way I'm using fragments Apr 16 13:09:59 but it's probably just because I'm using fragments poorly Apr 16 13:10:36 <_genuser_> but if you're using fragments, is there a "background actvitiy" that's causing problems? Apr 16 13:11:06 no....it's just that the app has a lot of trouble in some cases restoring its state after being fully destroyed Apr 16 13:11:57 some of it has to do with the fact that I was using getTargetFragment() extensivly...and that does not seem to work well with the childFragmentManager.....using getParentFragment instead is better Apr 16 13:12:05 <_genuser_> oh,I see. most of the apps I've done haven't need to worry about that. :) Apr 16 13:12:13 how so? Apr 16 13:12:59 <_genuser_> if you use fragments, you can retain state and that helps. Apr 16 13:13:25 using setRetainInstance(true)? Sure, and I have, but that does not help when the activity is destroyed Apr 16 13:13:53 <_genuser_> in some cases where I've had to rebuild from resume, it's been simple enough to put something in the bundle and restore from bundle onResume. Apr 16 13:15:04 <_genuser_> but if activity is completely destroyed, you aren't really restoring state across pause/resume. Apr 16 13:15:26 no....you'd be restoring state in onCreate I guess Apr 16 13:15:36 <_genuser_> it sounds more like restoring from cached state that could be due to activity destruction/construction or even across multiple application runs. Apr 16 13:16:57 <_genuser_> tbh, if I need to store state, I store it in onPause, and restore from it in onCreate. that way if I stored something on activity destruction, it will be passed back in onCreate(bundle). Apr 16 13:17:34 <_genuser_> the official android activity lifecycle description bores me to tears. so I've understood it a little and run with that. Apr 16 13:18:27 it never seems that simple for me...even when the activity can restore its state and not crash doing it....things invariably break at that point Apr 16 13:19:00 I kinda wish someone had told me to develop with the "Don't keep background activities" toggled from the begining Apr 16 13:21:04 <_genuser_> yeah, I wonder how some of the really nice apps do stuff like that. even simple things like keep place in list or textview across screen rotations. Apr 16 13:21:27 <_genuser_> you know stuff like kindle app. it's nice and impressive how those apps just run smoothly and never have glitches. Apr 16 13:22:18 yea I was experimenting with some google apps last night to see if I could get any to break with the dont keep activities toggle....and they almost always compleatly restored their state without a hitch, pretty impressive considering what is going on in the background Apr 16 13:23:01 <_genuser_> so what is the toggle that you're mentioning? Is this an android platform setting? or an app level setting? Apr 16 13:23:28 it's in Developer Options, near the bottom Apr 16 13:24:10 <_genuser_> I see. so it never puts an activity in teh background but rather destroys it, is that it? Apr 16 13:24:27 yes, just as if it needed to do so because of low memory or something Apr 16 13:24:43 so it's a good way to test that scenario deterministly Apr 16 13:25:22 Hi! Apr 16 13:25:35 *deterministically Apr 16 13:26:05 Why can it be that a View with align parent bottom stretches its parent RelativeView height? Apr 16 13:26:10 <_genuser_> I see. I haven't tried that before. Maybe I'll try that to see how my app deals with that kinda stuff. Apr 16 13:27:54 so Application.onCreate() is only run once...even if the activity is completely destroyed and recreated? Apr 16 13:28:36 <_genuser_> my understanding is that it is only run once as long as the application stays loaded, regardless of activity/activities and their lifecycles. Apr 16 13:30:35 eeyup Apr 16 13:30:46 sometimes finishing all the activities isnt enough Apr 16 13:31:37 <_genuser_> when you say eeyup I image a guy taking a big sip of his coffee and then saying yup while smacking his lips. Apr 16 13:32:41 no mlp fan? Apr 16 13:32:41 Ashiren, I checked android:layout_gravity Apr 16 13:32:55 Ashiren, but it's for linearlayout Apr 16 13:33:03 <_genuser_> Ashiren: mlp? Apr 16 13:33:30 hello Apr 16 13:33:50 <_genuser_> lol, google "mlp eeyup" helped me out there. Apr 16 13:34:41 <_genuser_> Ashiren: I didn't know bronies had infiltrated android development... Apr 16 13:35:12 well im surprised they didnt Apr 16 13:35:33 As long as they don't push their hobby on my face I'm cool with it Apr 16 13:36:07 20% cool? Apr 16 13:36:19 101% cool Apr 16 13:36:50 <_genuser_> Ashiren: I haven't ever watched mlp. that I know off. but I've watched kim possible enough to go around saying, "what's the sitch" Apr 16 13:36:51 Ashiren, http://developer.android.com/reference/android/widget/LinearLayout.LayoutParams.html Apr 16 13:36:57 <_genuser_> and then you have to explain to people.... Apr 16 13:39:53 I have an issue where my Java VM (and thus android studio) crashes in relation to fontmanager.dll when onMeasure() of my custom font text view is called Apr 16 13:39:59 any idea what could cause this? Apr 16 13:41:46 for some reason, when I move my finger on an EditText, the hint text gets dragged down half a line, any thoughts? Apr 16 13:42:03 http://code.google.com/p/android/issues/attachmentText?id=166377&aid=1663770003000&name=android_studio_crash_error_64.log&token=ABZ6GAd6s-Ms5vuMGtEeQV3OrXdi7Y8Luw%3A1429191682237 Here's the crashlog if anyone is interested Apr 16 13:45:00 does android studio work with JDK 1.8 yet? Apr 16 13:46:16 iprime: hello Apr 16 13:46:27 blusky: salut Apr 16 13:46:53 john67: if you want to speak french, please, do it in PM :-) Apr 16 13:47:02 but hi anyway :-) Apr 16 13:47:22 blusky: hi, i know but i just wanted to salute u in a special way Apr 16 13:47:46 ^^ Apr 16 13:49:38 hey john67 you done with the app ? Apr 16 13:49:59 not yet, got 2 issues to solve then im done Apr 16 13:51:11 i cant send parcelable to activity after phone reboot Apr 16 13:51:15 Syzygy: you can make it work using a gradle plugin Apr 16 13:51:47 seems like it's working out of the box actually Apr 16 13:52:12 then try a lambda :0 Apr 16 13:52:22 classpath 'me.tatarka:gradle-retrolambda:3.0.1' is what i have Apr 16 13:52:40 john67, you mean you persist the parcelable to a file or something? Apr 16 13:52:54 retrolambda is neat Apr 16 13:53:38 iprime: no, i have a service which contain the notification, i want to send the parcelable througth the notification to activity Apr 16 14:03:33 john67, so put the it in the pending intent Apr 16 14:05:09 pfnQ: have done so , http://pastebin.com/hxcxAj1W Apr 16 14:06:07 but nothing been received Apr 16 14:06:11 in the activity Apr 16 14:06:16 john67, is Verses parcelable? Apr 16 14:06:23 yeah Apr 16 14:06:53 do you really need to use parcelables? why don't you fetch the data in the activity instead Apr 16 14:07:51 the data is been sent through service, i need to send it through service, Apr 16 14:09:16 it should be receiving the extra fine Apr 16 14:09:37 pfnQ: it doesnt , thats what i dont get Apr 16 14:10:49 what are your activity flags? Apr 16 14:11:04 is your activity running Apr 16 14:11:05 guys, which best book I must to read about Android Development? Apr 16 14:12:40 yeah, Apr 16 14:12:55 woozly: Just use d.a.c and make an app. If you're a typical nerd you'll learn way more quickly. Apr 16 14:12:56 its running, Apr 16 14:13:45 what is an avarge salary for junior andorid developer in EU Apr 16 14:14:09 john67, and start flags? Apr 16 14:15:39 How can I include the ActionBar from the main activity in all its children? Apr 16 14:15:39 pfnQ: it does nothing Apr 16 14:16:12 Portugal 1200 eur, Finland 2800 eur, so i guess that makes the average of 2000 eur Apr 16 14:16:26 what flags do you have set on the activity john67 Apr 16 14:16:32 hmmp: :D Apr 16 14:16:47 pfnQ: i dont have a flags in the activity Apr 16 14:16:57 i dont need the flag Apr 16 14:17:34 john67, any single* and you need to use on new intent. Apr 16 14:20:25 pfnQ: the extra re empty, so it doesnt change Apr 16 14:21:41 Nothingn quite as infuriating as a deleted StackOverflow question that holds just a hint of maybe having once had an answer Apr 16 14:24:55 pfnQ: i tried new intent, but the extra re empty , Apr 16 14:27:49 Hello! I'm trying out Android Studio for the first time. I'm creating a library project, though I don't really understand how to make the test classes run. AFAIK it uses JUnit, and even if, following http://tools.android.com/tech-docs/unit-testing-support , I've added testCompile 'junit:junit:4.12' to my library's build.gradle, it exits because of the following error: "java.lang.NoClassDefFoundError: junit/textui/ResultPrinter"... any idea? I can Apr 16 14:27:50 share the project (they're something like 10 lines of code) Apr 16 14:28:59 iprime: thats what i have done, i have a broadcast receiver for BOOT_COMPLETED then that can start a service which starts an activity, inside the service i have a notification in side the service. Apr 16 14:31:31 jim87: http://stackoverflow.com/questions/19516289/exception-in-thread-main-java-lang-noclassdeffounderror-junit-textui-resultpr Apr 16 14:31:36 Is that relevant? Apr 16 14:32:16 TacticalJoke: I've tried adding ANDROID_SDK_HOME and adding that path in the PATH, but no avail Apr 16 14:34:07 TacticalJoke: this is the project (it's really few lines of code, still lost): https://onedrive.live.com/redir?resid=e041b4dbef8ce70d!7001&authkey=!AGaIiL-LctCynXI&ithint=file%2czip Apr 16 14:34:14 jim87: Is it an Android-library module or a Java-library module? Apr 16 14:34:48 TacticalJoke: my idea is to create a library for an Android app, it's built as an Android library though Apr 16 14:34:57 (due to apply plugin: 'com.android.library') Apr 16 14:35:58 TacticalJoke: It's okay, but I want to learn how processes work in android system. etc, but thank you Apr 16 14:36:05 can i use something like that android:text="1/3" ? Apr 16 14:40:16 hey everyone Apr 16 14:40:22 hey Apr 16 14:40:27 is there a place where I can tail a file that shows wake locks in real time? Apr 16 14:42:07 I have an error when trying to run an app that uses the NavigationDraver. my main activity: htmldp.com/p/?aPXK Apr 16 14:42:17 http://htmldp.com/p/?aPXK Apr 16 14:43:40 logcat: http://htmldp.com/p/?AuSZ Apr 16 15:03:01 https://developers.google.com/app-indexing/webmasters/app <-- does this mean i need to have a website as well, that has the same urls the app responds to? Apr 16 15:17:05 osxorgate: no Apr 16 15:17:07 osxorgate, you don't need a website to respond to these urls Apr 16 15:17:53 osxorgate, say you have an app that interacts with twitter.com, you'd want to deep link http://twitter.com to your MainActivity for example Apr 16 15:18:38 yes, that makes sense Apr 16 15:19:35 but suppose i have an app that catalogues stores, how can i let google search engine know that shop 123 == "Jimmy's Shop" ? with url /shops/123 Apr 16 15:20:02 ie, to expose the data i have in my app, to the search engine Apr 16 15:20:29 so when i google for "jimmys shop" it can point my app to /shops/123 Apr 16 15:20:35 osxorgate, so there exists a page http://myawesomestore.com/shops/123 ? Apr 16 15:20:40 is there a way to get style value from code in custom view? eg. android:allCaps Apr 16 15:20:45 quinnjn: no (not yet anyway) Apr 16 15:20:50 so I can change behavior of view Apr 16 15:21:11 osxorgate, then Google SE wouldn't have anything to index. Apr 16 15:21:24 quinnjn: so i DO need a website with those urls Apr 16 15:21:48 osxorgate, if you're making http://myawesomestore.com you will need a website for your awesome store. Apr 16 15:22:21 i have the domain myawesomestore.com, and i have an app, and i want users searching for 'jimmys store' to be able to be pointed to my app Apr 16 15:22:43 but it cannot happen, unless i also have a website with /shops/123 with content for jimmy's shop ? Apr 16 15:24:26 osxorgate: Still no guarantee Apr 16 15:24:39 osxorgate, if the workflow is getting a new user to search for something on google and the end result with them using your app its gonna be tricky. Apr 16 15:25:00 quinnjn: that is what i was hoping for yes Apr 16 15:25:20 https://gist.github.com/pfn/5fe391d220050c8e1420 Apr 16 15:25:23 mmm, pretty beautiful Apr 16 15:25:30 Do you guys have experience simulating LocationManager updates with robolectric? Apr 16 15:26:23 I have a listener and I want to test that it is doing the right thing when location updates are fired Apr 16 15:27:09 osxorgate, hmm. I need a more info on what you're doing. Like is the website your consuming going to be your own or is it a service already offered like twitter / reddit / hackernews ? Apr 16 15:27:43 how to obtain default style attributes? such as android:padding in code? Apr 16 15:27:51 osxorgate, cause if the goal is using your app which consumes hackernews people will find it organically in the play store Apr 16 15:27:51 quinnjn: it does not exist, but it would be mine Apr 16 15:28:06 SneakerXZ, from AttributeSet passed in constructor Apr 16 15:28:24 pfn_: I know that I just cannot find a way to extract them Apr 16 15:28:31 osxorgate, hmm if it's totally your own site you'd probably have more luck trying to get that popular before you make an app for it Apr 16 15:28:56 SneakerXZ, look in aosp source for examples Apr 16 15:28:56 quinnjn: but i allready have the app :) i just thought it could get more users if i add it to the index Apr 16 15:29:01 SneakerXZ, any widget at all Apr 16 15:29:38 quinnjn: so now i get x users per day, but i would suspect more, if people searching for 'jimmys shop' would also see it as a search result Apr 16 15:29:47 pfn_: but how can I access com.android.internal.R.styleable.TextAppearance_textColorHighlight: ? Apr 16 15:30:03 SneakerXZ, you can't, it's 'internal' Apr 16 15:30:28 pfn_: exactly, what should I do if I want to see a value for this style? Apr 16 15:30:32 I am inheriting from it Apr 16 15:30:39 so I should have an access or not? Apr 16 15:31:25 SneakerXZ, you don't have access to it, and cannot change it Apr 16 15:31:26 osxorgate, yeah doing that google search for "term" --> ??? ---> User is now using the app is gonna be a hard workflow. I think your next step is going to need a fully functioning website and then deep link to that Apr 16 15:32:00 SneakerXZ, you can try Resources.getIdentifier Apr 16 15:32:16 this looks like what I need http://stackoverflow.com/questions/18141125/get-androidpadding-attribute-programatically Apr 16 15:32:21 but attr probably doesn't work there Apr 16 15:32:44 quinnjn: i could export the db to a buynch of html files and store them in /shops/xxx , so the spider gets the name of the shops, and since they have the same url as what my app would intercept, it could get shown in the search results Apr 16 15:33:19 pfn_: why? Apr 16 15:33:56 * pfn_ has no interest in answering why Apr 16 15:34:16 lazy lazy pfn_ ;) Apr 16 15:35:24 osxorgate, like me as your new user finds your website and is looking at /shops/123. I still haven't been convinced to download the app though. So IMO you need a nice functional website to convince me to use it more with the app Apr 16 15:35:25 pfn_: I just tried that and it seems to work Apr 16 15:36:34 quinnjn: well .. the whole idea is to get something similar to this: https://developers.google.com/app-indexing/images/more-app-engagement.png Apr 16 15:36:55 quinnjn: it's very specifically linking to an app Apr 16 15:37:25 osxorgate, yeah for sure. I'm pretty sure the app needs to be installed before these results are displayed. Apr 16 15:38:05 osxorgate, and I still think these results are coming from a website. Android's just informing the user they can open it from the app or web Apr 16 15:38:57 quinnjn: the intro video by google says that 1 new app was discovered, in his example workflow, so i think it's not just using only local content Apr 16 15:43:19 osxorgate: it says opentable app installed in that png Apr 16 15:43:48 yiati: sure, but that does not mean it can only use installed apps Apr 16 15:44:32 osxorgate: Yeah I'm not saying it does, there just doesn't seem to be anything so far showing that it doesn't. Apr 16 15:44:46 osxorgate: that image included Apr 16 15:44:49 Hello Apr 16 15:45:01 I've got an issue: I'm using the Shell.SU.run call Apr 16 15:45:12 it should return a List of String Apr 16 15:45:22 I've converted the result in an array of strings and then in a single String Apr 16 15:45:33 finally, I've sent the string to logcat via Log.e call Apr 16 15:45:44 but when I read the messages in logcat , I see: [] Apr 16 15:45:53 it seems an empty array Apr 16 15:46:19 if i type the command directly in an android terminal emulator, I get a message but I can't see it in Shell.SU.run result Apr 16 15:46:37 I don't understand why this occurs Apr 16 15:46:44 i think the content is passed to google by this bit https://developers.google.com/app-indexing/webmasters/appindexingapi Apr 16 15:46:53 so usage of my app will fill google's database Apr 16 15:47:00 Any ideas? Apr 16 15:47:23 I've tried also to send the List of string to a textview Apr 16 15:47:40 but no strings are displayed Apr 16 15:48:42 Is there a way I can detect if the user dismisses the softkeyboard without extending edittext? Apr 16 15:58:56 Syzygy: there is a service to start and close it, maybe it can give you this info you want Apr 16 16:06:35 Can someone explain this to me? DeafultHttpClient docs say that android has two http clients. HttpUrlConnection and Apache. But why don't the docs says the two clients are defaulthttpclient and Apache. I why do they say HttpUrlConnection Apr 16 16:08:09 Because DefaultHttpClient is Apache, the other is HttpUrlConnection Apr 16 16:08:38 xorgate, doesn't seem like I'm able to add a listener Apr 16 16:09:02 Eghdk: Don't worry about those -- just use OkHttp. Apr 16 16:09:59 I want to use okhttp but I want to understand some of http first. I want to look in the source and see what okhttp is made of. Apache? Or Android client. Apr 16 16:10:18 OkHttp is its own implementation Apr 16 16:11:05 Eghdk: Plus OkHttp is not only better, but simpler Apr 16 16:11:33 Also note that HttpURLConnection uses OkHttp behind the scenes (and behind a less-good API) on 4.4+. Apr 16 16:11:41 SimonVT how? Doesn't it have to be built off of Apache or the Android implementation? Apr 16 16:11:41 Eghdk: You'll be better off learning from it than from the Apache/Android one Apr 16 16:12:10 Eghdk: No it does not Apr 16 16:12:14 No.. In fact, since kitkat, HttpUrlConnection uses okhttp Apr 16 16:12:50 So the Android http client uses okhttp in 4.4? WOW Apr 16 16:13:16 yep Apr 16 16:13:47 SimonVT since android 4.4 client uses okhttp does that mean it uses okio as well? Apr 16 16:14:41 Pretty sure okhttp depends on okio, so yeah Apr 16 16:15:20 Ok. Just curious to know whether android botched the implementation of okhttp when it included it in Android. Apr 16 16:15:36 By not including okio Apr 16 16:15:57 Why would they do that Apr 16 16:16:41 Idk. Why would android not update the Apache http client? Apr 16 16:16:50 They do weird things. Lol Apr 16 16:17:34 hey, i have some strange behaviour, usually when i open an app from the home the intent is "android.intent.action.MAIN", when i open a file which has been registered with my app it is ACTION_VIEW Apr 16 16:17:48 however when action_view happened once, it always will be even when opening from home Apr 16 16:18:11 http://imgur.com/EWa2MYy raging Apr 16 16:20:54 So last thing SimonVT. HttpUrlConnection in 4.4+ is effectively an okhttp wrapper? Apr 16 16:21:25 Yep :) Apr 16 16:21:40 Thanks. Appreciate your help Apr 16 16:22:43 TacticalJoke, a question Apr 16 16:23:17 cristian_c: Please ask the whole channel. Apr 16 16:23:27 TacticalJoke, ok Apr 16 16:29:54 morning. Apr 16 16:29:59 :D Apr 16 16:30:15 Gradle Please doesn't work anymore? Whaddup widdat? Apr 16 16:35:33 Is there a reason why people suggest using GSON and not Jackson? Apr 16 16:35:43 i have a broadcast receiver for BOOT_COMPLETED that start a service which starts an activity, inside the service i have a notification in side the service. But i cant send the ParcelableArrayListExtra through the notification from service to activity. when the notification is clicked the content of the arraylist is null . whats the problem and how can i solve this problem. this is my code http://pastebin.com/Up6WdFLG Apr 16 16:35:51 thanks in advance Apr 16 16:36:02 It looks like Jackson runs a twice the performance of GSON, is it more difficult to use than GSON? Apr 16 16:36:28 mrfu: I think their runtime library is quite a big larger. Not that that is a problem, unless your app is already huge Apr 16 16:36:47 Jackson-core is pretty small, but the other libraries add up. Apr 16 16:37:05 I'm more comfortable with jackson, but mostly because it's what I use on the server-side java as well, so I don't need two different json libs Apr 16 16:37:23 Stream-parsing with Jackson-core is super-light. I'm using it for my reddit app for that reason. Apr 16 16:37:25 I also haven't written an android app in forever, but if I did, and it had to use JSON, I'd use jackson Apr 16 16:45:22 mrfu: sonOfRa: TacticalJoke: Moshi is something new to look at as well, https://github.com/square/moshi Apr 16 16:45:24 So I'm catching an exception upon when it occurs I want to just crash my application (fail fast...) for now. How do I do that? I.e. how do I exit the application upon an unrecoverable failure Apr 16 16:45:54 Throw an exception Apr 16 16:46:02 right, just throw a runtime exception? Apr 16 16:46:15 yep Apr 16 16:46:19 ok, thanks Apr 16 16:47:57 Note that you can also throw an Error there. Errors are not intended to be caught. Apr 16 16:49:09 http://pastebin.com/vuNBR6Zv can someone tell me why, if i add several edittexts that contain the string "aaa", I'm told that duplicateMap.containsKey() returns false, but when it's added to the list it overwrites my previous entry to the list? Apr 16 16:51:12 Is hashmap stupid enough to use == for comparision but adds just via hash? Apr 16 16:53:14 You're stupid enough to pass editText.getEditText().getText() to containsKey, but using "" + editText.getEditText().getText() as the key Apr 16 16:54:11 hmm, guess I am. Apr 16 16:54:18 lul Apr 16 16:55:34 Hello Apr 16 16:55:40 I've another question Apr 16 16:55:59 I've got a textview and a button in activity Apr 16 16:56:01 For a second I thought it was weird that it let me autobox when checking if it's contained but I had to cast when adding... but then I was like whatever Apr 16 16:56:20 How can i place the button into bottom of the activity? Apr 16 16:56:46 How can I setup the .xml layout file? Apr 16 16:56:48 Any ideas? Apr 16 17:00:21 cristian_c, you can give the button a gravity Apr 16 17:00:38 Syzygy, i've tried Apr 16 17:00:45 but I don't get effect Apr 16 17:00:52 search view crashes with null pointer exception i am following this guide http://developer.android.com/training/search/setup.html . I have searched but cannot find anything helpfull any help guyz ? Apr 16 17:00:53 *it has not effect Apr 16 17:01:05 e.g. android:gravity="bottom" or android:layout_gravity="bottom", I'm never quite sure Apr 16 17:01:19 Syzygy, android:gravity is for the text Apr 16 17:01:30 probably Apr 16 17:01:31 android:layout_gravity is the right one Apr 16 17:01:47 cristian_c: Didn't someone answer that yesterday? Apr 16 17:01:48 I've tried android:layout_gravity but it has not effect Apr 16 17:01:53 what type of layout is containing the views? Apr 16 17:02:01 Also, FYI, it's hard to read your questions because they span so many lines. Apr 16 17:02:18 Syzygy, LinearLayout Apr 16 17:02:26 orientation vertical? Apr 16 17:02:31 Syzygy, yes Apr 16 17:03:04 you could try using weights. maybe add an empty view between them and give it a heavy weight Apr 16 17:03:06 Syzygy, I can paste the .xml on pastebin Apr 16 17:03:19 uhm Apr 16 17:03:22 honestly, I usually bruteforce until I got what I want with layouts Apr 16 17:03:28 no rxjava room hmm Apr 16 17:03:50 but pastebinning is usually a good idea Apr 16 17:04:08 hi. i'm trying to run my application on a real device, but i get: For input string: "": For input string: "" . I'm on Android Studio on OSX Yosemite Apr 16 17:04:10 lasserix: Ask your rx questions here! Apr 16 17:04:14 brute force, takes 100 times as long as actually understanding what you're doing, but requires 1% of the effort.... too bad it breaks shit so much. Apr 16 17:04:43 cristian_c: Your answer is here: http://developer.android.com/guide/topics/ui/layout/linear.html Apr 16 17:04:47 Syzygy, http://pastebin.com/TaaXyWzB Apr 16 17:05:16 CedricBeust: was just hoping of a bustl Apr 16 17:05:28 *ling community who talked enough i could learn by osmosis Apr 16 17:06:11 So the HeaderView functionality in ListView... If I add multiple headers, do they just appear at the top, stacked on top of each other? Apr 16 17:06:38 cristian_c, well, try what I just suggested with weight, that's what the sample at TacticalJoke's link is doing Apr 16 17:06:38 s9iper1: you should ask a more specific question Apr 16 17:07:12 cristian_c: what is the root element in your layout.xml file? Apr 16 17:07:28 TacticalJoke, If I use 0dp for height and 1 for weight, I can't display the text in textview, finally Apr 16 17:08:11 masterjeff, textview and button are put in activity (linearlayout) Apr 16 17:08:25 masterjeff, he posted a pastebin Apr 16 17:08:29 cristian_c: Please paste what you're trying (with weight). Apr 16 17:08:55 oh my bad Apr 16 17:09:08 TacticalJoke, if I don't use warp_content for the textview, I can't display the text Apr 16 17:09:27 cristian_c:http://developer.android.com/guide/topics/ui/layout/linear.html Apr 16 17:09:29 masterjeff, what service should I use? Apr 16 17:09:55 masterjeff, please follow the conversation before posting the same link that has been posted 2 minutes ago Apr 16 17:10:28 noted. sorry, low on sleep. Apr 16 17:11:27 Syzygy, it can depends on this: at first, textview is empty. If I press the button, text is added to textview (and it's displayed) Apr 16 17:11:28 how can I connect to the Wear API from a service Apr 16 17:11:41 I haven tried and only managed to connect using an Activity Apr 16 17:12:06 Ugh I need a third monitor Apr 16 17:12:09 Syzygy, currently, when text is added to textview button lift down Apr 16 17:12:14 I'm not sure I understand Apr 16 17:12:32 is any of those cases the case you want? Apr 16 17:12:34 Syzygy, but I'd like button was alway on the bottom, statically Apr 16 17:12:46 *always Apr 16 17:12:57 hi. i'm trying to run my application on a real device, but i get: For input string: "": For input string: "" . I'm on Android Studio on OSX Yosemite Apr 16 17:13:09 Syzygy, for example: http://developer.android.com/images/ui/sample-linearlayout.png Apr 16 17:13:30 The answer is right in that guide. Apr 16 17:13:32 sorry...I meant Google Fit API Apr 16 17:13:36 Syzygy, in this example: button is always in the same position, in the bottom Apr 16 17:14:01 well, it should be in this case as well, but you haven't showed us your newest code. Apr 16 17:14:18 Syzygy, I can show the code, too Apr 16 17:14:29 but it's not useful for the layout issue Apr 16 17:14:48 usefull enough for us to tell what might be wrong Apr 16 17:14:53 ok Apr 16 17:14:57 It's so hard to help cristian_c. lol Apr 16 17:15:04 You can spend five hours answering a basic question. Apr 16 17:15:30 TacticalJoke, no, I've found the right way, the last time Apr 16 17:15:48 TacticalJoke, as I said, the isse was in the xml layout file, not in the code Apr 16 17:15:52 *issue Apr 16 17:16:18 now, i can display the text, but I can't setup the right layout Apr 16 17:16:39 well, pastebin the xml file with your changes Apr 16 17:17:14 the reason the layout is incorrect is because of the layout.xml Apr 16 17:17:58 if I place button in the right place (0dp + weight = 1), button is placed correctly. If I use wrap content for textview, text is displayed in textview, but button is lifted down once text is added to textview Apr 16 17:18:05 masterjeff, yes Apr 16 17:18:51 set the weight of the text view to 1. Apr 16 17:18:52 masterjeff, TacticalJoke has shown me the documentation with an example, but I don't know exactly how to fix the layout Apr 16 17:18:55 cristian_c: You're doing it wrong. SHow your code so people can tell you what you're doing wrong Apr 16 17:19:17 SimonVT, ok, also if the code doesn't help Apr 16 17:19:17 and set the weight of the button to 0. Apr 16 17:19:24 masterjeff, ok Apr 16 17:19:58 SimonVT, i paste both the source code files Apr 16 17:21:50 SimonVT, http://pastebin.com/NwVnZdVj Apr 16 17:23:01 By code I meant xml, and by people I meant not me Apr 16 17:23:25 SimonVT, I've already posted the xml file Apr 16 17:23:38 *code Apr 16 17:23:58 There's no weight in that xml file Apr 16 17:23:58 Syzygy, http://pastebin.com/TaaXyWzB Apr 16 17:23:58 did you try my weight suggestion? Apr 16 17:24:03 And you're saying weight doesn't work.. Apr 16 17:24:08 masterjeff, I try Apr 16 17:24:11 Anyway, good luck Apr 16 17:24:13 cristian_c: We need the XML file with weight. Come on, man. Apr 16 17:24:39 SimonVT, previously, there was weight + 0dp, as in documentation example Apr 16 17:24:46 This is really easy. Spending hours trying to answer a really easy question is not desirable. Apr 16 17:24:59 some days ago, text was not displayed with that layout Apr 16 17:25:14 TacticalJoke, it was not easy Apr 16 17:25:21 TacticalJoke, as I said, the isse was in the xml layout file, not in the code Apr 16 17:25:46 TacticalJoke, you suggested me to change/add some lines in the code Apr 16 17:26:13 to test Apr 16 17:26:26 I got a LinearLayout inside a RelativeLayout with width set to "match_parent" but it adds an undesired spacing left and right . Code is http://pastebin.com/4YV5gV6A Apr 16 17:26:26 cristian_c, try the weights i described in your layout.xml. until you do that and then post your updated layout.xml file we won't be able to help. Apr 16 17:26:42 masterjeff, ok Apr 16 17:27:17 i've seen the stacktrace and it seems that at com.android.ddmlib.Device.getDensity(Device.java:1200) returns an empty string Apr 16 17:28:22 and that's what I mean with the extra spacing left/right http://imgur.com/IaEKgzZ Apr 16 17:28:57 LucaS05, confirm if it's null (e.g. if(device.getDensity() == null) and check in which cases it is null Apr 16 17:29:45 Syzygy: the stacktrace is not from "code i wrote" but is from: NumberFormatException: For input string: "": For input string: "" Apr 16 17:30:01 that i get when i'm trying to run my app on a real device Apr 16 17:30:14 can you post the whole stacktrace? Apr 16 17:30:25 plus maybe the parts of code that cause it? Apr 16 17:33:34 Syzygy: here you are Apr 16 17:33:36 http://pastebin.com/rWAdSLvk Apr 16 17:38:54 weird, Device doesn't even seem to have 1200 lines. Well, I can't really help you. Sorry Apr 16 17:45:52 Syzygy: what you mean exactlly? Apr 16 17:46:35 LucaS05, I looked up the sourcecode for Device.java and it only has ~600 lines Apr 16 17:46:45 because I wanted to see what's happening Apr 16 17:49:21 i'm on API 17 Apr 16 17:49:37 Syzygy: i'm on android 4.4.2 Apr 16 17:50:36 Device hasn't been changed in a while Apr 16 17:51:14 Syzygy: i've found this https://android.googlesource.com/platform/tools/base/+/master/ddmlib/src/main/java/com/android/ddmlib/Device.java Apr 16 17:52:23 ff---fkk,xcfz,;shf Apr 16 17:52:25 guess grep isn't up to date then. Apr 16 17:52:44 anyone use exoplayer? how to play at head when resuming paused live stream? Apr 16 17:53:14 in any case, as I said, I can't really help you. it's beyond me from what i've seen. Apr 16 17:54:07 Syzygy: thanks anyway ;) Apr 16 18:12:07 hi. i'm trying to run my application on a real device, but i get: For input string: "": For input string: "" . I'm on Android Studio on OSX Yosemite Apr 16 18:12:49 anyone ever download HoloEverywhere through this method? https://github.com/Prototik/HoloEverywhere/wiki/Import-in-IDE Apr 16 18:13:49 HoloEverywhere? ;o Apr 16 18:13:55 yea Apr 16 18:14:05 I want that damn good looking edittext Apr 16 18:15:47 Hello, I have a list view which after some event detection Im setting a new adapter via setAdapter and also a new itemOnClickListener via setOnItemClickListener Apr 16 18:16:00 well that's cool Apr 16 18:16:06 you're on your way lil buddy! Apr 16 18:16:12 however it's somehow repeating old listener Apr 16 18:16:21 here's a nice quote Apr 16 18:16:29 "In life, you are either on the way or in the way" Apr 16 18:16:30 :D Apr 16 18:18:22 I hate how ProgressBars are still Holo when using AppCompat <21. Apr 16 18:18:36 I can either use a library which'll probably suck or waste time writing something. Apr 16 18:19:04 HoloEverywhere should be premium stuff Apr 16 18:19:10 yes it will solve all my problems indeed Apr 16 18:19:19 I will become a better developer when it's done downloading, mhm Apr 16 18:19:50 and it just errored and the download was canceled Apr 16 18:19:51 Odaym: What about material design? It's what the cool kids are doing these days. Apr 16 18:20:16 I just want the edittext with those nice edges at each end, the current is just a line and it's really ugly Apr 16 18:20:37 Yeah, I'm not a huge fan of them. Apr 16 18:25:45 flippin' facebook Apr 16 18:25:50 rejected our app Apr 16 18:26:00 god damn facebook Apr 16 18:27:14 yeah! Apr 16 18:27:26 actually, I'm totally fine with it Apr 16 18:27:36 i had a fight with our product team about the permissions Apr 16 19:02:00 Awesome: http://blog.jetbrains.com/kotlin/2015/04/try-kotlin-in-your-browser-new-look-and-more-features/ Apr 16 19:02:04 And it uses four-space indents. :D Apr 16 19:02:33 (To JW and a few others' horror.) Apr 16 19:04:05 g00s: !!! Apr 16 19:04:12 thepoosh ! Apr 16 19:04:26 whats up thepoosh Apr 16 19:04:27 g00s: They're putting a lot of effort into Kotlin: http://blog.jetbrains.com/kotlin/2015/04/try-kotlin-in-your-browser-new-look-and-more-features/ Apr 16 19:04:42 oh nice thanks TacticalJoke Apr 16 19:05:56 Kotlin everything! Apr 16 19:07:54 4 spaces? BURN THE WITCHES Apr 16 19:08:14 Do you use 2, groxx? Apr 16 19:08:24 usually. or 3 when I want to troll people. Apr 16 19:08:25 wow, this thing on low latency audio is fascinating http://superpowered.com/androidaudiopathlatency/ Apr 16 19:08:41 haha Apr 16 19:09:26 especially in Java though D: it's so indent-happy, and each line of code is so long, 4 spaces just means you run out of space to write anything inside `public static void main(whatev)` before you exceed 80 characters. Apr 16 19:09:43 who cares about 80 chars :P Apr 16 19:09:55 100-120 is fine ;) Apr 16 19:10:13 yeah, I operate at 120 :) partly because Java. Apr 16 19:10:21 Ruby is easy to keep within 80 Apr 16 19:10:39 yeah perl too Apr 16 19:10:58 in fact, just put the whol eprogram on one line ! Apr 16 19:11:30 * groxx tries to come up with a tasteful way to quip "that's what she sed", but fails Apr 16 19:11:33 Hi Apr 16 19:11:35 I'm refreshing an old project that depends on robolectric 1.1 Apr 16 19:11:42 maybe she uses awk anyway. Apr 16 19:11:47 One of the tests calls a function that calls Looper.loop() to wait for a result Apr 16 19:11:57 but it looks like Looper.loop() isn't blocking :-( Apr 16 19:12:10 When I run the function on an emulator or a device Looper.loop() does block Apr 16 19:12:22 Any thoughts? suggestions? possible reasons? Apr 16 19:12:41 80 characters? Apr 16 19:12:47 what is this, 1969 teletype terminal Apr 16 19:12:55 a terminal for ANTS? Apr 16 19:13:18 I can't believe people still say that the first line of a commit message should contain 52 characters at most. Apr 16 19:13:33 yeah. vim warns me when I exceed ~ that length. and I ignore it. Apr 16 19:14:10 I can barely say anything in 52 characters. Apr 16 19:14:14 (43 characters.) Apr 16 19:15:00 probably for keeping git log lines down to 80 characters when you have the sha and a date or something? Apr 16 19:15:06 This short note is exactly 52 characters in length. Apr 16 19:15:31 Grr. It's 51. Apr 16 19:16:18 i actually do the 51 thing, i thought it had something to do with the format of log message Apr 16 19:16:37 its an exercise in clarity making an atommic commit message summary be 51 chars Apr 16 19:16:46 also futility Apr 16 19:17:06 almost think, if you can't do it, the commit is poorly scoped Apr 16 19:17:07 I keep things really short, but 50/51/52 (whatever it is) characters are just too few, IMO. Apr 16 19:17:12 probably why people use "bugfix: #387273" instead of meaningful messages. Apr 16 19:17:56 lol thats just the summary Apr 16 19:18:17 then for message i try to do : why, what, shortcomings Apr 16 19:18:17 g00s: because "bugfix: crash when doing thing-with-name while doing other-thing and pressing some-button" is infinitely more useful than "fixed crash" Apr 16 19:18:42 i'd put that in the part of the body Apr 16 19:18:47 anyhow :D Apr 16 19:19:04 I have multiple subclasses that need some state set and i need one method to set that state (state has different variables, ie, 3 strings, 3 strings, 4 strings, 3 strings and an int) what's best way to do such? Apr 16 19:19:05 sure, elaborate below. but don't make `git log --oneline` a constant stream of "added thing" and "fixed bug". Apr 16 19:19:19 I usually scope my summaries, like this: "FooActivity: Show error messages only when bar happens". That alone makes it hard to stay within 50. Apr 16 19:19:47 Especially if it's AwesomenessSingletonFactory or something. Apr 16 19:20:10 TacticalJoke: loop starts it so it returns immediatly, a run on that message queue has to wait for the loop to prepare so it does block Apr 16 19:20:21 oops tantalum Apr 16 19:22:03 If i declare a Viewgroup A inside another ViewGroup B shouldn't the layout params of A be type of B ? Apr 16 19:22:16 lasserix, Loop.prepare() is already called so I assume it is prepared to block Apr 16 19:22:20 its most important that everyone on project is consistent groxx TacticalJoke ; i'd follow whatever the standard is Apr 16 19:22:32 hey now, don't go being reasonable Apr 16 19:22:47 unless its 3 space indents, then thats not acceptable :D Apr 16 19:23:24 csst0111: should be, yes. Apr 16 19:23:35 It could be worse: it could be that GNU bracing style. Apr 16 19:23:39 The one that makes me want to gouge my eyes out. Apr 16 19:23:53 we had a coworker go on vacation, and hey didn't want anyone touching the code he was writing so he stripped all the indents. we didn't know it was a joke Apr 16 19:24:01 http://en.wikipedia.org/wiki/Indent_style#GNU_style Apr 16 19:24:06 i think we were all in disbelief Apr 16 19:24:08 TacticalJoke: is that "if (thing)\n(\t+1){"? Apr 16 19:24:54 ah, just "if (thing)\n{" Apr 16 19:24:56 Yeah. Apr 16 19:25:01 while () Apr 16 19:25:03 { Apr 16 19:25:06 do stuff Apr 16 19:25:09 } Apr 16 19:25:12 i hate that one the most Apr 16 19:25:22 for(;;) KILL; Apr 16 19:26:04 This is so nice in Kotlin: names.forEach { addToDatabase(it) } Apr 16 19:26:17 If Kotlin doesn't take off big time, I will be surprised. It's so neat and clever. Apr 16 19:26:30 (Given the parameters {i.e., the JVM} they have to operate under.) Apr 16 19:27:32 it's the coffeescript of java. there are reasons to like it. Apr 16 19:30:57 kotlin shmotlin Apr 16 19:34:56 Hi Apr 16 19:36:26 1TBS and never unbraced one-liners, even if the language allows it Apr 16 19:36:46 i've actually been thinking about coding styles a lot for my own code Apr 16 19:37:00 and have decided that the best way is to allow a regular and compact variant, chosen based on how much code there is Apr 16 19:37:29 I always use braces, personally. Not sure whether to keep that style when moving to Kotlin eventually. Apr 16 19:37:41 Is there a way, from inside a webview in html, to access native methods/functions by the webpages' internal javascript? Apr 16 19:38:10 i think "sometimes braces" is the worst of all worlds Apr 16 19:38:20 either always braces or never braces (like python, etc) Apr 16 19:38:48 and if you want to shorten things then go all the way: if(short-test) { tiny(); } Apr 16 19:39:36 * Voyage snores Apr 16 19:40:10 Voyage: isn't that basically what phonegap/cordova provides? Apr 16 19:40:41 :( i think i got passed over for this gig, because the managers (all iphone users) wanted the android version to look like their apple version, and i was trying to convince them its a bad idea Apr 16 19:40:51 that's because it is a bad idea Apr 16 19:40:53 myke, oh. isnt there a native built in way? Apr 16 19:40:55 i can't believe this is still happening in 2015 Apr 16 19:41:14 there's a good if somewhat ranty post about AIR apps and why they suck because keeping the native widget look is important to users Apr 16 19:41:37 omg adobe air - i almost got into that at one time Apr 16 19:41:39 games being an exception, games are expected to have a unique UI Apr 16 19:41:44 Voyage: yeah, there's a javascript interface thing Apr 16 19:42:13 http://developer.android.com/guide/webapps/webview.html#BindingJavaScript Apr 16 19:43:22 groxx, I want webview internal JS to call things outside (the native functions) and native functions to call / manipulate internal DOM of webview html + run JS Apr 16 19:43:48 groxx, if thats what phonegap provides. then what is the use of http://developer.android.com/guide/webapps/webview.html#BindingJavaScript is it same what phonegap does? Apr 16 19:44:51 you could probably claim it's the inner-most core of what phonegap does. phonegap also has cross-platform integration though, and some "try to make things at least somewhat consistent on different webviews" stuff. Apr 16 19:45:28 hey Apr 16 19:45:57 hey Apr 16 19:46:09 I need to check for root and then run a command without showing an Activity, but simply a toast. Should I avoid using activity alltogether and use a service or something= Apr 16 19:46:20 Voyage: if you want to use android code to manipulate the dom, AFAIK you have to write your own 'translation' between the two. e.g. android code constructs commands (or js code) to change the dom. you don't have direct access to it. Apr 16 19:47:59 Quacked, how is the check for root and then send command being spawned? Apr 16 19:48:28 groxx, hm ok Apr 16 19:49:33 Voyage: I would hope that there are libraries out there to make that easier, but ultimately it all goes through "inject JS into webview" or "call native code via javascript interface". something quick & easy can probably be done by hand, otherwise I'd probably hunt for a lib. Apr 16 19:50:05 m Apr 16 19:50:15 how do I start a service of native code from hitting an html button inside a webview? Apr 16 19:54:15 html button onClick = function that calls the javascript interface for the native code. native code calls startService(whatever). Apr 16 19:56:19 How can javascrip0 have t interface for the native code Apr 16 19:56:50 pretty much that exact same thing is covered in the link from earlier, except that it toasts instead of starting a service. there's a button, onClick event, @JavascriptInterface, everything. Apr 16 19:58:49 Hey guys, in Android Studio, should I add .navigation to git ignore Apr 16 20:01:59 is .navigation the android navigation editor thing? I've only accidentally touched that D: dunno what's important to keep. Apr 16 20:03:58 It contains main.nvg.xml file which shows navigation between xml layout Apr 16 20:06:21 Quacked i don't think you can start a service without an application/activity Apr 16 20:08:41 You can do it with a contextwrapper Apr 16 20:08:59 Dunno how you would get one easier than the application/activity though Apr 16 20:10:33 groxx, thanks Apr 16 20:17:20 masterjeff: Quacked: Service extends ContextWrapper Apr 16 20:20:17 if anyone has experience building/configuring with GYP/ninja, how do you specify linking libraries for NDK targets (need to include -llog in particular) Apr 16 20:21:40 Q: What do you do if your loopers thread is null? Apr 16 20:24:22 Uh... what? Apr 16 20:24:57 tantalum: A: Cry Apr 16 20:24:59 guys. how much time (months) required for learn, for start working as junior android-developer? (have no prev java knowledge) Apr 16 20:25:12 yiati, I'm about to Apr 16 20:25:15 :-( Apr 16 20:27:34 hhee: There's a lot of variables to be able to answer that question. How long have you been programming, what's your data structure and OOP knowledge, have you done imperative programming before or only functional, how much time are you committing per day/week, etc. Apr 16 20:27:50 have you done ui programming before, etc. Apr 16 20:29:38 yiati: have a little knowledge php, some shell scripting, some linux. how do you think, can i do this about a year learning and practice? tnx for the answer :) Apr 16 20:33:34 hhee: too much variability between individuals to answer Apr 16 20:33:49 myke: oh i understand Apr 16 20:34:05 i've known people who went from never using linux to doing things i've not done 18 months later, to other people at the same company still struggling with basic core concepts 8 years later Apr 16 20:38:14 so i continuing to work on dem "tyrian 3d" (immensum). Can anyone suggest a good looking ui for railshooter, because i cannot find anything good enough which wouldn't cut out 1/5 of screen (original tyrian) or be too minimalistic and not impressive (starfox). here's how it looks now -http://screencast.com/t/tfcGkRY0S you have your ship's 'tonnel crosshair', and when enemy crosses it -you get popup Apr 16 20:39:12 myke: yeah, understand. Apr 16 20:44:59 hhee: any statically-typed languages? or just php + shell? static typing isn't particularly _hard_, but it is different. Apr 16 20:45:42 groxx: no staticly-typed at all, but already reading about this, in java Apr 16 20:47:00 anyone here using AS 1.2 ? do you notice lots of errors because IDE is getting out of sync with gradle model, like missing R - stuff like 'Fragment' unresolved symbol, etc ? Apr 16 20:49:01 hhee: hm. I hate to add to the "it depends" crowd, but yeah :) e.g. one of my coworkers is picking it up, he's about 5 weeks in, and is working on his third soon-to-be-released change. but he has moved quickly, and took a couple weeks to do nothing but learn the basics. he had about a month of java in school, otherwise C, so there's an advantage there. Apr 16 20:50:10 groxx: tnx for example, i need speed, need for speed :-D Apr 16 20:51:22 hhee: generally, coming from just php, I'd assume another month or more on top of that, at a minimum. picking up a second language is a lot harder than picking up e.g. a fifth. (he had done a fair bit of python, and dabbled in a couple others) Apr 16 20:52:23 groxx: ok, tnx for info :) Apr 16 20:53:02 groxx: well right now i will be learn the basic java :) have a nice day bro :) Apr 16 20:53:57 hhee: and take this all with a big grain of salt, since he's driving pretty hard, one of the better junior devs we've interviewed, and we're all aiming to get him able to do _something_ sooner than _understand everything_, and we do code reviews. he's a long way from "can do X unsupervised". Apr 16 20:55:29 especially in a big ugly codebase like ours :) Apr 16 20:56:14 :) tnx a lot for yours answers :) it's motivate me a lot :) Apr 16 21:03:01 hm, so AS 1.2 is canary/beta/dev - but its performing more like canary Apr 16 21:04:44 yiati: thanks for that Apr 16 21:15:45 Is anyone else experiencing problems with a floating LogCat window not remembering its size or position every time it's opened? Since 1.2 Apr 16 21:15:56 Rocking on OSX. Apr 16 21:16:23 lol, i guess i haven't found all the AS 1.2 bugs yet :D Apr 16 21:16:25 anyone used exoplayer? when I call stop on it how to do reinitialize the f--ker? Apr 16 21:25:28 In onCreateOptionsMenu() I execute `this.menu = menu`, so that later on I can show/hide menu items, e.g. `menu.findItem(R.id.foo).setVisibile(false)`. However I am getting a NullPointerException when accessing `menu` in onCreate() - is onCreate() called at the same time as onCreateOptionsMenu() or is my problem something else? Apr 16 21:26:15 <_genuser_> hola amigos Apr 16 21:26:30 <_genuser_> g00s: you're here always... hard working. Apr 16 21:26:37 yup Apr 16 21:26:53 working hard, or hardly working? Apr 16 21:27:03 <_genuser_> what do you know about services? Apr 16 21:27:34 you need to know them like the back of your hand Apr 16 21:27:46 <_genuser_> how's the idea of a started service that holds the data and provides object reference to multiple activities. Apr 16 21:28:01 <_genuser_> takes care of needing static vars. takes care of doing time intensive stuff on background thread. Apr 16 21:28:15 use a service to contain active objects that must outlive activities Apr 16 21:28:21 *active objects* Apr 16 21:28:28 <_genuser_> cool. that's what I"m thinking. Apr 16 21:28:43 <_genuser_> so first activity that starts it will cause initialization, all others will just bind and request data, correct? Apr 16 21:28:45 like network connections, threads doing things, etc Apr 16 21:28:48 <_genuser_> request data or submit requests. Apr 16 21:29:39 but dont use a service just to hold things for multiple activities ^^^ Apr 16 21:30:39 <_genuser_> 1) what do you recommend for vars taht must be avaialble to multiple activities? application level vars? Apr 16 21:30:40 I lean more and more towards treating Service as _just_ a lifecycle object. do it to keep something alive when the app is in the background, or don't use them, because that's what they mean to the system. Apr 16 21:31:00 well, that and the fairly rare case where your services are part of an external API. Apr 16 21:31:45 _genuser_ this is a big topic. for something thats not important (read-only) config information, etc you can use a Singleton Apr 16 21:32:17 <_genuser_> g00s: singleton sure, but defined where in application? if it's in an activity, it will go with the activity, no? Apr 16 21:33:52 eventually they're (basically) all either a static variable somewhere, or referenced by your Application instance. Apr 16 21:34:22 <_genuser_> groxx: agreed. so that's what I was doing static var in main activity. didn't want to have an application subclassed just for that. Apr 16 21:34:43 <_genuser_> groxx: but now this object has methods (requests) that takes upto 4 seconds. Apr 16 21:34:43 _genuser_: do you have other activities that may be "on top of" the main activity, and will need the value to be initialized? Apr 16 21:35:01 <_genuser_> so I thought the service would handle both (globally available data) and background work nicely. Apr 16 21:35:31 <_genuser_> groxx: I have two activities currently. Main can start the other or not. The other can also be started from the launcher separately. Apr 16 21:36:18 <_genuser_> which one starts first, needs to initialize data. currently my settings object has a object.initialzie(), which internally sets a bool on successful initialization so it doesn't repeat it. Apr 16 21:36:19 ah, so you have to handle "main has never existed" either way. probably safe. Apr 16 21:36:50 otherwise I usually recommend avoiding static state on activities, period, because the lifecycle is problematic :| Apr 16 21:36:58 <_genuser_> yeah, I need to handle the scenario of main never having started/existed. Apr 16 21:37:31 <_genuser_> I do think a more elegant solution would be move any an all statics as either static or instance into an application subclass. Apr 16 21:37:59 <_genuser_> but this service solution offer to handle two problems, so I'm reading up on services. Apr 16 21:38:02 personally I'd probably make "getInstance()" a static factory-like method on whatever the object is, rather than putting it literally "on" the activity class. but they're ultimately the same thing, functionally. Apr 16 21:39:33 <_genuser_> yeah, I see. so whoever calls getinstance first gets it instantiated and setup. the others just use it, etc. Apr 16 21:39:41 yeah, Service does guarantee a single instance of each class. afaik. _but_ they're started asynchronously, and they imply your process is more important to keep around than a process without any services. if that all works, they're convenient. Apr 16 21:40:07 <_genuser_> I think I moved away from it coz I got tired of java community putting singleton as the solution to every problem including ones where a singleton wasn't needed. Apr 16 21:40:14 heh Apr 16 21:40:44 yeah, that's pretty common :) Apr 16 21:41:16 <_genuser_> I see the implication of services. I have some process intensive stuff that will happen occassionally in the app. I have IntentService for some file saving stuff. Apr 16 21:41:47 <_genuser_> but now I have more data caching going on where a) open, b) rotate, c) save files, etc. etc. so I figured, hey I'm gonna have lots of IntentServices... Apr 16 21:43:48 <_genuser_> I also have this chicken or the egg conundrum that I'm looking at. Apr 16 21:44:17 <_genuser_> settings must be settings.initialize()'d. then this service can use values and init a data cache and manipulate it. Apr 16 21:44:32 <_genuser_> and I wonder, if I shoudl just move settings.initilize() inside the service. Apr 16 21:45:07 <_genuser_> or if I should keep it separate because it's (from puritan pov) outside of services purpose. but then it will need to access yet another static var for settings. Apr 16 21:47:43 Question, I'm wrapping the BluetoothAdapter class to decouple some code. Since there is only one adapter, I think the wrapper would be a good candidate for a singleton. thoughts? Apr 16 21:48:59 <_genuser_> you'll be ridiculed in any job interview that involves java if you haven't overused/misused/eaten/bathed-in/sleptwith/married singletons.... so you should as a rule of thumb just use them. Apr 16 21:49:41 <_genuser_> sorry, when nothing valuable to offer, at least a social commentary is avaialble. Apr 16 21:49:56 :) Apr 16 22:06:38 is there a fix to pause oncreate being called? Apr 16 22:06:42 whenyou deploy an app Apr 16 22:10:18 anyone here pretty well versed with toolchains ? If so, I got a question. I have been trying to get sabermod to work with my build of PacRom, but its not setting the correct dir. I need to know what I need to change to get it to use a custom toolchain. Apr 16 22:10:22 lasserix: ? Apr 16 22:10:34 lasserix: you mean pause it in order to debug? Apr 16 22:11:07 Elimin8er: try #android-root, this is just app dev Apr 16 22:11:45 ok thanks man Apr 16 22:17:53 no Apr 16 22:17:55 err Apr 16 22:18:03 relaunching while showing will cause on pause twice Apr 16 22:29:17 this is so dumb, I can't seem to figure out how to get a line shape to actually show up: http://pastebin.com/2vYPRFhz Apr 16 22:31:09 where are you trying to display it? Apr 16 22:31:24 as a background to a tag Apr 16 22:32:10 http://pastebin.com/n60MtChj Apr 16 22:32:22 originally, I was trying to do a dashed line Apr 16 22:32:38 that didn't work, so I thought I'd try just a straight line Apr 16 22:33:19 if it was working, would it show up in the XML Layout Viewer in Android Studio? Apr 16 22:34:24 yeah, it should show up in the preview window Apr 16 22:34:47 change line to rectangle btw Apr 16 22:34:55 for your shape Apr 16 22:35:59 is it a bug that line won't work? Apr 16 22:37:52 oh nvm. you're missing a stroke element Apr 16 22:38:11 see here http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape Apr 16 22:38:11 well, a stroke isn't necessary for a line itself Apr 16 22:38:31 yeah, I followed that for a line and it doesn't work, so I was trying to get something to work Apr 16 22:38:38 it seems that when I use stroke, things just don't work Apr 16 22:38:45 stroke defines the line's width Apr 16 22:38:46 if I do the rect thing and give a solid color, it does Apr 16 22:39:09 either approach works Apr 16 22:40:00 for me at least Apr 16 22:40:32 what about this for your stroke? Apr 16 22:40:33 android:dashGap="10dp" Apr 16 22:40:33 android:dashWidth="10dp"/> Apr 16 22:40:58 you're missing the width Apr 16 22:41:05 even with that set it doesn't show up Apr 16 22:41:16 and the examples for dashes don't use it Apr 16 22:42:51 ok, well i'd also try setting the Views height to wrap content Apr 16 22:44:14 sorry, I know this is bad manners: Apr 16 22:44:16 android:shape="line"> Apr 16 22:44:16 android:width="3dp" Apr 16 22:44:16 android:dashGap="10dp" Apr 16 22:44:16 android:dashWidth="10dp"/> Apr 16 22:44:16 Apr 16 22:44:51 omg, I wonder why that is Apr 16 22:44:54 you're 100% right Apr 16 22:44:57 in terms of wrap Apr 16 22:45:24 for whatever reason wrap_content is important for the height Apr 16 22:50:21 i could guess at why that is... but i don't really know. The best i can say is that since you define a width/height (which translates to a height as far as the View is concerned), of a child view, you should always wrap content on it's container. that way you aren't trying to redefine the scope of the background when adding it to a View Apr 16 22:51:36 http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html#WRAP_CONTENT Apr 16 22:51:41 worth a read Apr 16 22:54:03 no, I understand wrap_content Apr 16 22:55:56 Hi , I have developed a cameraManager Class which takes pictures and send them as Bitmap to me, Now i need to click picture each 1 minute from the device, but my heap memory keeps increasing and it has reached to 350 MB as well, http://pastebin.com/3480t1C9 Apr 16 22:55:59 here is the code Apr 16 22:56:03 http://pastebin.com/3480t1C9 Apr 16 22:56:38 Does anyone know what the intent is for launching the Phone's contact picker? The same way one that Google's text app launches when you click on the FAB icon. Apr 16 22:56:56 For 1 minute take picture loop I have created a handler in my MainActivity which keeps postdelaying for 1 minutes Apr 16 22:57:24 jonalmeida : try googling that you may find the answer much faster, its not that hard Apr 16 22:58:30 chinu_: I tried but when I'm not sure what the right word is for it. I used 'phone contact picker' but that gives me the normal contact picker Apr 16 22:59:11 what do you mean by phonepicker ? Apr 16 22:59:18 I think it's relatively new, so old Google searches are ranked higher right now Apr 16 22:59:24 you can choose contacts from the phonebook in android with easy intent Apr 16 22:59:28 picker Apr 16 22:59:42 chinu_: I know I'm doing that right now. Apr 16 23:00:18 chinu_: In Google's text app, they seem to be calling the Phone's contact picker which has a viewpager off 'Frequents' and 'All Contacts' Apr 16 23:00:18 chinu_: did you say your memory is growing each time you take a picture? Apr 16 23:00:33 chinu_: As well as an option in there to type in a phone number. Apr 16 23:00:41 jonalmeida: if it's the lollipop Messenger app, that's an Activity that's part of the messenger app, not contacts. Apr 16 23:00:49 herriojr : yes , well there are other functions which are using BitmapFactory.decode features Apr 16 23:01:20 fuccasdasdlking Apr 16 23:01:23 and after 5-10 minutes app crashes and sends OOM exception Apr 16 23:01:25 groxx: Yeah that's what I'm referring to. That's a shame then, it looks like a neat one to use. Apr 16 23:01:30 android team should have enabled easily debouncing of clicks Apr 16 23:01:32 groxx: Thanks again! Apr 16 23:01:40 chinu_: what context are you attaching? Apr 16 23:01:49 jonalmeida: it might be open source, fwiw. the exact activity is: com.google.android.apps.messaging/.ui.ConversationActivity Apr 16 23:01:50 The main activity Apr 16 23:02:33 What is best practise from a usability point of view, and of course also according to Android design guidelines. To trigger an event by a button click or a text link? For instance when a user has filled out an account creation form and must click on a Create/Submit button or text link. Apr 16 23:02:36 groxx: Let's try! :) Apr 16 23:02:50 chinu_: so, your AsyncTask needs to be static in this class then, just FYI Apr 16 23:03:05 herriojr : http://pastebin.com/3480t1C9 here is the code as well for the CameraManager , the exception i see in line 214 Apr 16 23:03:42 chinu_: how quickly are the pictures taken? Apr 16 23:04:07 under 1 minute interval Apr 16 23:04:23 sometimes 10 second , sometimes 20 Apr 16 23:04:33 how long is each bitmap taking to decode? Apr 16 23:05:47 there is one other ImageComparision class as well, each picture i take then i compare it with the picture stored in SD card, so there is also a BitmapFactory.decode method sometimes the exception is there as well Apr 16 23:06:08 herriojr : its quick , within miliseconds Apr 16 23:06:33 chinu_: kk, in terms of the callback, what do the listeners do with the bitmaps? Apr 16 23:07:40 The listeners take the bitmap and pass it to the CompareImage Constructor , which then tells the similarity in this taken image and one stored in SD card. herriojr Apr 16 23:08:20 chinu_: the only glaring thing is the fact that your AsyncTask isn't static declared Apr 16 23:08:42 chinu_: if your bitmaps are leaking, I'd say it's in the listeners Apr 16 23:09:22 herriojr : I even tracked my Bitmaps through each method and in the end used bitmap.recycle Apr 16 23:09:31 does that help ? Apr 16 23:09:38 chinu_: did you profile your memory? Apr 16 23:09:44 no Apr 16 23:09:53 profile it — it will lead you back to what is holding onto it Apr 16 23:09:54 I am using large_heap = true in manifest Apr 16 23:10:03 yeah, for testing, don't do that, it doesn't matter Apr 16 23:10:09 that's a crutch Apr 16 23:10:59 chinu_: do you understand why I said make the AsyncTask static? Apr 16 23:11:04 the declaration that is Apr 16 23:11:28 herriojr : I really dint understand why i should make the async static ? Apr 16 23:11:44 you said that the Context being passed in the constructor is the Activity Apr 16 23:12:32 for safety, I would make that Context object instead the Application object Apr 16 23:12:47 in which case, you don't have to worry about a leak Apr 16 23:13:03 since this thing appears to live throughout the app lifecycle Apr 16 23:13:05 Hey all, how do I go from “x1” to 01? Apr 16 23:13:25 or xF to 0F Apr 16 23:13:41 tricknology: are you talking about hex strings? Apr 16 23:13:46 yes Apr 16 23:14:08 using hex(1) i get x1 Apr 16 23:14:13 which is nice but I really want 01 Apr 16 23:14:22 binary hex value Apr 16 23:14:34 http://stackoverflow.com/questions/9610254/string-format-and-hex-numbers-in-java Apr 16 23:15:00 sweeet thanks Apr 16 23:15:24 chinu_: did I lose you? Apr 16 23:15:24 so String.format("%02X", decInt & 0xFF); Apr 16 23:15:42 herriojr : ok i got your point a little,but what do you mean by "I would make that Context object instead the Application object" , I am passing the context objet to the manager constructor Apr 16 23:16:41 worked liek a charm Apr 16 23:16:50 thanks herriojr Apr 16 23:17:55 chinu_: but what class are you passing as the Context? Apr 16 23:21:05 chinu_: basically, what I'm getting at is the Activity only lives for the lifetime the system chooses for the Activity, which is less than the lifecycle of a static variable Apr 16 23:21:26 so if for this manager, you use the Activity as the Context, you just leaked the activity for the lifetime of the application Apr 16 23:22:01 so, for something like this which doesn't require any View code, the suggestion is to make sure you enforce it is the Application (Application Context) that is being used to construct the manager Apr 16 23:22:12 herriojr : http://pastebin.com/0HK4ad89 this is the activity i am using the class in Apr 16 23:22:35 the other thing that might cause the issue is if the listeners aren't unregistered Apr 16 23:22:55 yeah, you're leaking the Activity Apr 16 23:23:21 do this: public CameraMgr getInstance(Application application); Apr 16 23:23:33 then in your activity, do getInstance(getApplication()); Apr 16 23:23:57 But my cameraManager need view to show it in the activity i am running it in. the surfaceView shows the camera view Apr 16 23:24:07 isn't that what the listeners are for? Apr 16 23:24:57 is this the actual Activity you are using? Apr 16 23:25:12 no , this was just sample code Apr 16 23:25:22 let me paste my whole activity Apr 16 23:25:45 another function on Context is http://developer.android.com/reference/android/content/Context.html#getApplicationContext()() Apr 16 23:26:09 herriojr : http://pastebin.com/eayxVLgR Apr 16 23:29:00 chinu_: ok, so you have a lot going on here which could cause problems — my suggestion is profile it Apr 16 23:29:09 for one, it looks like you are playing video Apr 16 23:29:15 on top of dealing with images Apr 16 23:30:14 chinu_: but yeah, for all your manager classes, do this: public MyManager getInstance(Context context) { return new MyManager(context.getApplicationContext()) } Apr 16 23:31:17 it is actually a app which checks if a user is sitting infront of it , if there is a user it plays videos and if there is no user it sleeps the screens Apr 16 23:31:37 and when it detects any face again it again wakes up and start playing ads herriojr Apr 16 23:32:11 I want a RelativeLayout to appear above a bottom banner ad if it exists (is not View.GONE), and otherwise take up the full screen. I tried setting layout_above="@+id/ad_view" and layout_alignParentBottom="true" simultaneously but it just aligns to bottom even if the ad view exists. Apr 16 23:32:25 and yeah i am making that now , getinstance , earlier i used singleton pattern as well to see if that helps Apr 16 23:32:54 the reason the ad view may be visibility="gone" is because I have an in app purchase to remove ads Apr 16 23:33:20 chinu_: also, your add and remove listener aren't in the same lifecycle scope Apr 16 23:33:32 for the cam listener Apr 16 23:33:45 they should be in onCreate and onDestroy Apr 16 23:34:03 herriojr : yes i checked that now , My bad Apr 16 23:34:27 chinu_: https://developer.android.com/tools/debugging/debugging-memory.html Apr 16 23:34:54 chinu_: so you never leave this activity, correct? Apr 16 23:35:03 yes correct Apr 16 23:35:08 your memory just keeps growing and growing within it Apr 16 23:35:15 yeah exactly Apr 16 23:35:36 right now its running for 15 minutes and its grown to 345 MB Apr 16 23:36:54 herriojr : you there ? Apr 16 23:37:01 chinu_: yeah Apr 16 23:37:07 chinu_: just looking htrough different parts Apr 16 23:37:19 ok Apr 16 23:37:21 so it leaks without the face detection? Apr 16 23:37:49 that is what i am trying to check now , i am removing peice by peice and running the app Apr 16 23:38:17 hello, anyone want to help a really noob problem? Apr 16 23:38:59 chinu_: yeah, your CamManager shouldn't be a singleton Apr 16 23:40:35 chinu_: where exactly are you recycling the bitmaps? Apr 16 23:41:16 there is FacedetectAndCompareEngine , the last work done on bitmaps is there , so i am recycling them there after all processing Apr 16 23:42:02 recycling isn't necessary on newer OSes anyway. more likely something else is holding onto them. Apr 16 23:42:32 hey guys, is it possible to make a tap and pay app? Apr 16 23:42:39 have any of you found any documentation on this? Apr 16 23:45:09 I'm trying to do something simple... add a button, and I just can't do it because I guess my knowledge of layouts isn't good. Apr 16 23:45:18 herriojr : there is FacedetectAndCompareEngine , the last work done on bitmaps is there , so i am recycling them there after all processing Apr 16 23:46:04 chinu_: yeah, sorry, I can't be more helpful, the only thing I can point you at right now is learning how to do an hprof dump and profile it — it will waste less time Apr 16 23:46:49 hmm , I am working on it , and also checking if something i can check within my code , Thanks anyway you were very helpfull :) Apr 16 23:52:37 I'm having trouble understanding where my android application is being installed. As far as I can tell, Android Studio is putting it in data/data and I can't figure out why. Any advice, as I need to create a folder and put files in it Apr 16 23:54:44 Grehg: it doesn't matter. base everything off whatever you get from e.g. getFilesDir(): http://developer.android.com/guide/topics/data/data-storage.html Apr 16 23:55:11 groxx: I've been using getExternalStorageDirectory but I'll look into getFilesDir() Apr 16 23:56:02 getFilesDir will be for your "internal" storage, in your app's sandbox. getExternal... will give you stuff in the shared /sdcard/ (or some other path) directory, which any app can read / write if they have external files permissions. Apr 16 23:57:52 Grehg: there are also cache directories, which are user-eraseable, which is handy. I wish more apps would use them for e.g. download caches. Apr 16 23:58:32 groxx: Alright, I'll also research those. I wish i could browse to the directory in terminal where my application is loaded by Android Studio... odd that I cannot Apr 16 23:58:39 I'm trying to store log files that I'm generating Apr 17 00:00:14 Grehg: yeah, unfortunately they're not easy to browse without root :( but! `adb shell run-as com.your.application.package ls` will show you your folder. Apr 17 00:01:04 is SQLiteOpenDbHelper a handler class? Apr 17 00:01:13 ^ only if the application is debuggable Apr 17 00:02:22 there's such thing as non-debuggable apps? Apr 17 00:02:27 Pwnies: not sure what a "handler class" would be. it's not related to android.os.Handler though, if that's what you're asking. Apr 17 00:02:37 a release build of an app is not debuggable Apr 17 00:02:46 oic Apr 17 00:03:00 Pwnies: http://developer.android.com/guide/topics/manifest/application-element.html#debug Apr 17 00:03:35 yeah, maybe i should've went straight to the docs ( o_o) Apr 17 00:03:36 Pwnies: just to be clear, I was talking about groxx's statement with the "debuggable" comment :) Apr 17 00:04:07 TIL: Apr 17 00:05:11 if i want to use an intent service to query an api, should the intent service do both the querying of the api AND json parsing? Apr 17 00:08:07 might as well. no need to parse JSON on the main thread. Apr 17 00:08:38 should i do db insertion on the service as well, or is that pushing it? Apr 17 00:08:59 db writing* Apr 17 00:09:21 if you want to save the current data before handling the next intent, yeah. otherwise, doesn't really matter, it has to happen eventually. Apr 17 00:09:58 intentservice is "just" a single background thread + a queue of intents to handle. Apr 17 00:10:20 well, and a Service, which encourages the OS to keep your process alive Apr 17 00:11:13 grobe0ba: Alright I figured out what you meant by without root. Apr 17 00:11:34 groxx: Alright I figured out what you meant by without root. I can't access the data/data folder on my PC in terminal, without my phone being rooted Apr 17 00:12:00 android 4.4 webview seems to be based on chromium 30..... does chrome 35 support chromium 30 ??? I'm trying to figure outhow materialize might fare for a css framework for a cordova app ??????? http://materializecss.com/about.html Apr 17 00:37:20 fruitsNveggies cordova, lol Apr 17 00:38:30 g00s, fuck you. Apr 17 00:38:52 I'm a 1 man js dev. Apr 17 00:39:20 i'm still laughing Apr 17 00:43:13 hm, bruce eckel: rethinking scala https://news.ycombinator.com/item?id=9389429 Apr 17 00:53:06 Hey guys Apr 17 00:54:38 Does anyone see an issue with this commit? https://github.com/iPonyRadio/91.8TheFan/commit/64df50a8594115635d1892cda10412ccd9e4d406 Specifically in the MainActivity PlayPause OnClickListener? Apr 17 00:55:36 Guys, i am new to android dev. I have an html5 app i created and i want to load it locally into a webview. In android studio I have setup a project with a webview and i added an assets folder and put my root folder there which contains my index. How can i load this local file into the webview? Apr 17 00:58:47 Hmm Apr 17 00:59:05 I think webview has a loader class in it where you point it at a URL Apr 17 00:59:24 Can you point that at a local file? I've honestly never played with it before Apr 17 01:00:48 Yep. http://stackoverflow.com/questions/4027701/loading-existing-html-file-with-android-webview Apr 17 01:00:57 Just load it as a local file from assets Apr 17 01:01:14 microhaxo, ^ Apr 17 01:01:46 Thanks, im giving it a try right now Apr 17 01:02:32 PixelPerfect what exception is thrown? Apr 17 01:02:40 android studio is flaky as hell. I first got an error saying i didnt have enough room to install my app Apr 17 01:02:43 now im getting "I/O Error: An existing connection was forcibly closed by the remote host" Apr 17 01:03:22 I always just push my APK through pushbullet because I don't develop at my local box microhaxo Apr 17 01:03:46 masterjeff, That means I actually have to dig through logcat ;~; Apr 17 01:04:22 ohh. well i'll look and see if I spot anything Apr 17 01:05:31 Lemme dig through logcat Apr 17 01:05:38 microhaxo: I get the connection was forcibly closed all the time. It's the device that causes that, not AS. My samsung devices always disconnect and reconnect about 30 seconds after i first plug them in Apr 17 01:05:47 How do I filter by package without grep? Apr 17 01:05:51 im using emulator Apr 17 01:06:32 ah. no idea why that is :/ Apr 17 01:06:54 also i always have to remove my app Apr 17 01:07:02 before building and running Apr 17 01:07:11 maybe check the settings for your AVD and see how much storage you're giving it Apr 17 01:07:12 or it doesn't seem to replace it. And none of my break points get hit? Apr 17 01:08:21 Does anyone else find that the material colour palette is just too bright for dark themes? Apr 17 01:08:24 Even the darkest shades. Apr 17 01:08:45 Hey, is the out/res-cache folder important to keep in version control? Apr 17 01:09:02 PixelPerfect, what's the handler for? Apr 17 01:09:21 Fetching some JSON Apr 17 01:10:14 where does it get used? I only see it declared and then initialized in the onClick Apr 17 01:10:18 ethanmad: nothing in out should be in version control Apr 17 01:10:29 JesusFreke: thanks Apr 17 01:11:12 It's started in the onClick, then it updates the view every 5 seconds Apr 17 01:11:43 It doesn't get interacted with besides start and kill Apr 17 01:12:17 JesusFreke: while we're on the topic, do you know how to keep .iml files in sync between computers? my two computers generate different ones and it's annoying Apr 17 01:13:08 TacticalJoke, you can define different color palettes by extending the Material themes i think Apr 17 01:13:56 ethanmad: Personally, I don't check in the .iml files. Apr 17 01:14:32 TacticalJoke: isn't there then the issue of having someone else clone the project and not have an iml? or am i making that up? Apr 17 01:15:14 With the build.gradle file, you can go File > Import Project. Apr 17 01:15:35 Rather than opening someone's .iml file. Apr 17 01:16:16 Am I the only one who loves Gradle for InteliJ/AS, but hate it with Netbeans? Apr 17 01:16:27 Yeah, I generally don't check in the .iml files Apr 17 01:16:34 TacticalJoke: ok, i'll just gitignore them then. Apr 17 01:17:01 I specifically added the org.JSON to my Gradle on Netbeans, and clean built, but the dependancy was still gone Apr 17 01:17:07 so if someone clones the project, they'll be able to continue working without issues? Apr 17 01:17:10 Magical Apr 17 01:17:24 ethanmad: Yeah, they should be able to import from the build.gradle file. Apr 17 01:17:34 Try it first to be sure, I guess. But I and others do it. Apr 17 01:18:20 maybe i'll add imls to gitignore and not remove the existing iml files Apr 17 01:18:46 that way someone can clone without having to import from build.gradle, but won't get pestered to track the files Apr 17 01:18:59 PixelPerfect, nothing is really jumping out at me. Although you are overriding some deprecated service stuff. Apr 17 01:20:03 anyone else annoyed that you cant long-click a spinner anymore? Seems like a big API change, but Im biased since it broke my code Apr 17 01:21:09 Thing is, it worked flawlessly before I switched to that image from a button, and to that boolean from using the text of the button Apr 17 01:21:48 hmm ok Apr 17 01:22:06 Hmm Apr 17 01:22:17 uudruid: like you can't set a listener for it, or the listener doesn't do anything? Apr 17 01:22:17 Maybe I'll just roll back the commit and say screw it Apr 17 01:23:00 no longer works. You can still set it but its non functional in lollipop Apr 17 01:24:02 uudruid, lame. Apr 17 01:24:30 uudruid: Why do you want to detect a long-click on a Spinner? Just curious. Apr 17 01:24:45 Am I the only one bugged by Lollipop not having shadows built into the framework? Apr 17 01:25:04 Like...why do I need a custom rectange for something built into MD? Apr 17 01:25:14 PixelPerfect, if you want i can clone the repo and try running it. Apr 17 01:25:24 yeah, it was to allow holding on the spinner and dragging to an item to select it like on Apple. But I dont think that was worth breaking existing code Apr 17 01:26:11 My app (which uses AppCompat) does that by default on 4.4. Doesn't work on 4.1, though. (Not sure of the details.) Apr 17 01:27:03 The APK of the newest build is in there Apr 17 01:27:03 Top of the commit Apr 17 01:27:04 Or you could clone it Apr 17 01:27:23 Im betting most 4.1 uses have an upgrade path to 4.4 anyway Apr 17 01:27:42 can anyone confirm the following? datepickers do not work in Android < 5.1 Apr 17 01:27:49 appcompat datepickers, that is Apr 17 01:28:22 i'll clone it and debug it real quick, need to take a break from work. Apr 17 01:29:37 uhmm... why wouldn't date pickers work? they are in my android devel book Apr 17 01:30:09 ph... nm. didnt see the appcompat part. I dont know Apr 17 01:31:30 appcompat has a datepicker? Apr 17 01:31:46 for some reason, they haven't actually taken me anywhere until i got the 5.1 update on my nexus 6 Apr 17 01:31:50 just downgraded from AS 1.2 to AS 1.1, so much smoother Apr 17 01:32:03 then i tried on nexus 7 with 5.0, no dice. updated to 5.1 and it's working Apr 17 01:32:31 so i hid the menu button if the android version is less than 5.1 Apr 17 01:33:34 and g00s apparently it does. using appcompat changed the datepicker from holo to material Apr 17 01:33:48 or maybe it's the other support library Apr 17 01:34:12 but i thought the point of the support libraries is that android version doesn't matter Apr 17 01:35:04 g00s, glad I haven't updated Apr 17 01:37:54 TacticalJoke did you see this https://www.youtube.com/watch?v=vWsWoAUjjck Apr 17 01:38:03 pretty good, Bruce is always interesting Apr 17 01:38:23 does testing in different VMs/AVDs not find those issues? Apr 17 01:38:32 i think my first c++ book was 'Thinking in C++' by eckel, many years ago :) Apr 17 01:39:16 uudruid: if that was addressed to me, i haven't tried. i have tried a bunch of devices, though Apr 17 01:41:06 How'dy~ Apr 17 01:41:09 ethanmad : yeah not used to the way this does nock completion, but I found the key for it Apr 17 01:42:09 i just use weechat so it's always the same for me Apr 17 01:43:48 I'm on my phone Apr 17 01:46:08 gotcha Apr 17 01:48:19 the nick completion isnt very accurate Apr 17 01:52:47 what's a normal uninstall ratio? Apr 17 01:52:54 i think mine might be a little high :( Apr 17 01:53:45 like 3/4 or more Apr 17 01:55:34 oh thats like exactly mine Apr 17 01:55:46 right now 74% of users keep the app Apr 17 01:56:00 That sounds pretty good Apr 17 01:56:43 that makes me feel a lot better. I wish google gave a metric of how often users are opening the app. Do most analyic systems give that data? Apr 17 01:57:24 Well, peace guys. If anyone tinkers with my repo, PM me or send a pull request Apr 17 01:57:26 Anyone here ever worked with HorizontalScrollView Apr 17 01:58:08 only by turning my phone sideways Apr 17 01:58:17 :) Apr 17 01:59:06 eww horizontal scrolling Apr 17 01:59:10 Whyyyy Apr 17 01:59:26 Tired of boring old vertical scrolling Apr 17 01:59:48 Gonna try it and see how it comes oiut Apr 17 01:59:49 out* Apr 17 02:00:14 * JesusFreke ponders a grid view that is dynamically scrollable in any direction Apr 17 02:00:32 Would that work? Never used gridview before Apr 17 02:01:08 could you just stick it in a ScrollView? Apr 17 02:01:21 Scrollview is vertical isnt it? Apr 17 02:02:11 I thought it would both directions Apr 17 02:02:36 Im not sure, Ill look into it though Apr 17 02:02:48 I wanna make like 2 blocks verticaly for each row Apr 17 02:02:52 and have them scroll horizontally Apr 17 02:03:05 But the data in the blocks is dynamically pulled from a web DB Apr 17 02:03:05 drose you might prefer paginated horizontal scrolling, like a viewpager Apr 17 02:03:07 gonna be fun Apr 17 02:03:25 Viewpager requires fragments for each item that is being scrolled, right? Apr 17 02:03:49 not sure. i think it might actually be deprecated now Apr 17 02:04:22 "ViewPager is most often used in conjunction with Fragment, which is a convenient way to supply and manage the lifecycle of each page" Apr 17 02:04:42 looks like it wasnt deprecated Apr 17 02:04:43 Right, so it would prob not be conveinent for what im doing Apr 17 02:04:55 Maybe ScrollView though Apr 17 02:05:55 Theres also HorizontalScrollView Apr 17 02:08:54 drose379: I recently used RecyclerView to create a horizontally scrolling listview, if that helps Apr 17 02:08:58 it was fairly painless Apr 17 02:09:23 pfn you might like this too https://www.youtube.com/watch?v=vWsWoAUjjck Apr 17 02:09:39 oh, just read up, you want 2 blocks per column. horizontal grid view might be the go Apr 17 02:09:45 interesting about scala 3 Apr 17 02:09:54 barbs can I see a screenshot? Or recording?/ Apr 17 02:10:28 Oh nevermind on the screenshot barbs Apr 17 02:10:35 So horizontal grid view? Apr 17 02:10:59 i think barbs is right about using recyclerview. I think it has taken the place of all other scrollviews since api 21 Apr 17 02:11:09 because it uses less resources Apr 17 02:11:18 GridView actually looks promising too Apr 17 02:14:13 thanks for the help guys Apr 17 02:16:58 oof. we're happily abandoning GridView for a RecyclerView version. much nicer to deal with. Apr 17 02:18:29 groxx i heard at i/o they will reveal a new ComposterView Apr 17 02:19:05 g00s: San Francisco developers will be thrilled Apr 17 02:19:44 Thank god for eco-friendly views Apr 17 02:20:18 <_genuser_> ok, guys what do you think? two activities both need access data that's read/written in the background by service. Apr 17 02:20:49 <_genuser_> both would call startService(), yeah? And then the service will handle the initialization to make sure it only happens once. Apr 17 02:21:24 <_genuser_> that all subsequent startService requests just return START_NOT_STICKY Apr 17 02:21:45 <_genuser_> but teh first instance that actually initializes null data can return START_STICKY and stay running in the background. Apr 17 02:22:20 <_genuser_> so the service stays active in teh background updating data, etc. Apr 17 02:22:43 _genuser_: as long as you don't stopService / stopSelf, startService will leave you with a constantly-running service (for good or bad). no need to return different values. Apr 17 02:23:06 <_genuser_> and maybe updates can be sent via startService with "update" command as part of the intent so it can queue and update and exit which the first instance can later process. Apr 17 02:23:57 <_genuser_> groxx: taht's good to know. Apr 17 02:24:18 <_genuser_> groxx: so what do you think about calling startService with different values in intent to request different functions? Apr 17 02:24:47 START_STICKY will mean that, if your process is killed while the service is running, it'll start it back up _for you_ when there's available power on the device. which is pretty arbitrary, but that's what they claim anyway. you may not want that behavior. Apr 17 02:25:40 <_genuser_> now would that service ever be killed while my app is running in the foreground? as in, I'm tapping activities and work on it, and android kills the service? Apr 17 02:26:01 and different intent values: they'll both result in onStartCommand being called. it works. just watch out that you don't e.g. get two "init" calls and handle them both, or if you do something async, you may get one, start the async process, get the second, and then later the async thing finishes. Apr 17 02:26:46 _genuser_: _generally_ speaking, no. foreground activities are the last things to go when running out of memory. Apr 17 02:27:20 almost everything else will be killed before that. likely means the phone's flipping out and allocating a bunch of useless ram somewhere critical. Apr 17 02:27:25 <_genuser_> groxx: and even if START_STICKY is returned it could _still_ kill that service, right? Apr 17 02:28:03 <_genuser_> so I should probably not worry about returning START_STICKY at all and focus on assuming the service will be running while activities are in front. Apr 17 02:28:18 _genuser_: if the system decides to kill your process, nothing you can do will change that. there's zero guarantee you'll keep running, no matter what you do. and afaik START_STICKY has no impact on process-importance. Apr 17 02:28:43 <_genuser_> I see, then I'm going to not worry about it. Apr 17 02:28:47 bingo :) Apr 17 02:29:09 <_genuser_> so then, I would create a STARTED and a BOUND service. Started so it can run indefinitely and update the data. Apr 17 02:29:17 take appropriate steps to set your importance level (nothing < service < foreground service or activity), and the rest is just reality. Apr 17 02:29:20 a/c Apr 17 02:29:26 <_genuser_> bound so I can bind to it and request a copy of the data and send it additional data to add. Apr 17 02:30:22 <_genuser_> groxx: so what is a foreground service vs. just service. are we talking about service vs. IntentService? Apr 17 02:31:35 _genuser_: Service has a "startForeground" method (iirc. name might be wrong) that changes it to a foreground service. when doing that, you need a notification. depending on the device, it might appear in the "ongoing" section of notifications, or just look like a normal one (that can't be swiped away, iirc). Apr 17 02:33:52 <_genuser_> I see, it's startForeground(int, Notification); Apr 17 02:34:18 <_genuser_> so if I'm understanding this correctly, each call to startService will launch a new instance Apr 17 02:35:05 single instance. it'll live until stopService / stopSelf, and you'll get multiple onStartCommand calls. Apr 17 02:36:43 <_genuser_> yeah, I just read that no matter how many startServices you call, it will stop with just one stopService. so I assumed then that it would be single instance. Apr 17 02:37:06 <_genuser_> so if I really want to play with it more, I should really just hit the test project. :) Apr 17 02:37:31 <_genuser_> thanks for fielding questions. Apr 17 02:37:34 yep. there's also stopSelf(int) which makes safely stopping with async stuff a bit easier. I haven't looked deeply into how that works though. Apr 17 02:37:39 np :) good luck Apr 17 02:38:33 <_genuser_> lol, I dislike creating new projects in eclipse but if I do this in AS, everything will comes to a crawl on my desktop. #firstWorldProblems Apr 17 02:44:21 Can't seem to get parse to work on in android app - I created a MyApplication class that extends application, called Parse.initialize inside there, and then added MyApplication to my manifest. Any ideas what I am missing? Apr 17 02:55:01 I'm using AppCompat and setting colorPrimaryDark to red, and yet when I run on the 5.0 emulator I see a black status bar. The same happens if I set android:colorPrimaryDark or android:statusBarColor. Apr 17 02:55:04 Shouldn't it just work? Apr 17 02:56:08 Oh, other people are saying it may be a problem with the emulator. **** ENDING LOGGING AT Fri Apr 17 02:59:58 2015