**** BEGIN LOGGING AT Tue Jun 17 02:59:58 2014 Jun 17 03:01:35 therue http://www.fiercedeveloper.com/story/app-annie-ios-apps-get-85-more-revenue-android/2014-04-21 Jun 17 03:04:08 but if i was to make an app that relies on people using that app to help each other... so the more people use it, the more effective it is. then this app is probably more suitable for android right? since there's more android users.. Jun 17 03:04:20 and eventhough ios users spend more... if i just set the price to 1 dollar or something. Jun 17 03:04:37 android is probably the better option for this sort of app right? :D Jun 17 03:06:18 i can't say. i have one app on android that is a good fit for android; also android lets you iterate quickly since you don't have to wait for approvals Jun 17 03:06:25 making something which relies on network effects has a lot of issues - regardless of platform Jun 17 03:07:00 you have a chicken/egg issue - in practice, you probably need a pretty big budget for launch marketing, to 'prime the pump' Jun 17 03:07:46 therue otoh, your demographic might be more represented by iOS Jun 17 03:08:17 in practice, 700 million users, 1 billion users - if you can capture 1% of either, you've got a massive userbase Jun 17 03:09:07 as long as you're not looking at WP8 and BB10, the numbers are almost meaninglessly huge Jun 17 03:09:34 therue it could depend on your primary market; if focusing on emerging economies than maybe android or even jme (i think whatsapp had a lot of jme users) Jun 17 03:10:28 leeds, ya.. 'cuz it requires a lot of people using it in order to be effective :\ Jun 17 03:10:43 In short, you're trying to create a community, this isn't an Android or iOS issue and you could get either user base to do it if you gave them a compelling reason and made them aware of it Jun 17 03:10:46 I'm assuming therue's (hypothetical?) app is relatively general-purpose - not a niche thing Jun 17 03:10:47 i need to add contact like skype ads in contact list with my app icon there , what is the method for that ? ex http://s13.postimg.org/g8mcvt147/device_2014_06_16_235151.png Jun 17 03:11:08 QNX Os ... I want to play with that Jun 17 03:11:19 if - and only if - you're targeting Indonesia, say, it's worth looking at Blackberry... but hopefully you'd know that Jun 17 03:11:46 QNX is an OS I'd like to play with if I could get it without the BB stuff attached. Jun 17 03:12:37 I also need to eventually get around to trying to write my own window manager for Linux desktops. Jun 17 03:12:50 i haven't heard the BB stuff ontop of QNX being bad Jun 17 03:13:02 then again, i haven't seen BB in the news in 6 mos at least Jun 17 03:13:50 actually, from what i read last, BB was considering a major pivot out of mobile devices into medical equipment Jun 17 03:13:54 QNX should be great there Jun 17 03:14:01 wouldn't want my pacemaker running android for sure :D Jun 17 03:14:34 BB10 is a nice OS but I don't want to do anything with it. Jun 17 03:14:48 They drained me of any good will I had after they killed the Playbook and decided tablets were a fad. Jun 17 03:14:53 heh - It's currently an automotive control system iir Jun 17 03:15:02 I keep wondering how long it'll be before they realize how stupid their decision making process is. Jun 17 03:15:30 "Tablets are a fad!" *tablets continue to sell a ton* "We were ri- oh, crap." Jun 17 03:15:32 the next BB quarterly report is due on Thursday - and I'd expect them to pretty much stand up and say "in the past quarter, we sold essentially no BB10 devices in the developed world" Jun 17 03:15:49 "But we did really well in India.. with BB7." Jun 17 03:16:13 they still have a residual BB7 market, mostly from companies who are still tied into it, buying small numbers for new employees and replacement devices Jun 17 03:16:44 I recall them also selling well in India because they were essentially feature phones that didn't suck as much as normal feature phones Jun 17 03:16:53 so I think BB is moving to medical, M2M, and IoT (internet of things) Jun 17 03:17:00 they could find success there Jun 17 03:17:01 Also because they were inexpensive compared to smart phones. Jun 17 03:17:12 a space not completely dominated by anyone yet, even apple Jun 17 03:17:16 I refuse to call old BB phones smartphones because that's a joke. Jun 17 03:17:57 I'm largely opposed to the whole internet-of-things idea because holy christ I do not want to imagine the security implications of having security holes in appliances Jun 17 03:18:26 'Cause you know nobody's going to fix the holes. They'll just tell you to buy new appliances. Jun 17 03:20:28 I wonder if SwitchPreference will ever be fixed or if Google has just decided that thing is plague territory. Jun 17 03:21:13 I still find, if I'm a bit down, or bored, that reading the absolutely delusional comments at crackberry cheers me up... although they're starting to get less delusional, I think Jun 17 03:21:31 Nilium even if they fix it today, you'll have to wait a few years to not think about it Jun 17 03:21:47 unless you want minSdk=20 Jun 17 03:21:52 The comments around the time the Playbook got canned were pretty amusing and a bit depressing 'cause you could see the cracks starting to show Jun 17 03:21:52 thats fun too of course Jun 17 03:22:11 g00s: Yeah, but they haven't fixed it and it's been known for two years >_> Jun 17 03:22:23 I'd actually expect them to just deprecate SwitchPreference Jun 17 03:22:54 Like "hey this was a bad idea, sorry, don't use it, it's broken" Jun 17 03:23:27 Nilium i remember you described the bug - i can't even imagine how they would do that :| Jun 17 03:23:41 even if you tried, how ? Jun 17 03:23:52 almost curious to see the work of art :) Jun 17 03:23:53 How would they do what? Jun 17 03:24:06 have had that weird behavior with SwitchPreference Jun 17 03:24:10 By not using it. Jun 17 03:24:21 wasn't it so that if there was more than 1, they tool the setting of the first or something ? Jun 17 03:24:27 As far as I know, none of the default apps actually use it. Jun 17 03:24:38 Everyone has their own SwitchPreference implementation. Jun 17 03:25:08 If I remember right, the bug is that SwitchPreference always resets itself to a true/on state when it's loaded Jun 17 03:25:10 anyhow, i just use checkbox Jun 17 03:25:19 switch takes up too much space and cramps the title / summary Jun 17 03:25:33 but … the settings app uses switch for the headers, hmmmm Jun 17 03:25:34 So if it gets its view recycled and recreated, the preference gets turned on Jun 17 03:25:36 like Wifi Jun 17 03:25:43 It uses one, but it's not a SwitchPreference as far as I know Jun 17 03:25:48 ah Jun 17 03:26:54 and those are the obvious bugs Jun 17 03:26:56 XD Jun 17 03:26:56 Like, the issue isn't the Switch class, it's just the SwitchPreference implementation Jun 17 03:27:00 yeah Jun 17 03:27:11 should be pretty easy to write your own Jun 17 03:27:51 Leeds is chuckling that i like WP 8, but imho, its rock solid. i haven't had a *single* bug, app hang - never had to reboot the phone, etc Jun 17 03:27:51 It is, just a pain in the ass to find out about it the first time. Jun 17 03:28:11 Nilium so i thank Nilium for the heads up :D Jun 17 03:28:13 I've never used WP8. It looks neat but I can't imagine using it 'cause it doesn't have OpenGL or anything I like to work with. Jun 17 03:28:16 g00s: who cares? Jun 17 03:28:37 i do :) Jun 17 03:28:42 we're not in a world where the best platform wins Jun 17 03:29:00 Yeah, if we were, Linux would be king and Android would be dead. Jun 17 03:29:08 heh Jun 17 03:29:20 er, no... 'Linux' is a shit mobile platform Jun 17 03:29:25 this latest android studio update is slow as hell, can i roll it back somehow? Jun 17 03:29:28 Well I wasn't talking about mobiles. Jun 17 03:29:39 And the JVM would've died and PHP users would all literally die on the spot for thinking PHP was good and so on. Jun 17 03:29:53 whomp really? i haven't noticed any difference Jun 17 03:30:28 Nilium if PHP uses died on the spot, we couldn't get any questions about how to connect android to MySQL - which sometimes is like 5% of the daily questions :) Jun 17 03:30:35 Like the moment someone thinks PHP is good, they just have a stroke because it's the brain's way of fighting irreversible and severely harmful Stockholm syndrome Jun 17 03:30:49 A kind of biological defense mechanism against PHP Jun 17 03:30:50 marketing, carrier relationships, ecosystem, in no particular order Jun 17 03:31:40 how do you guys clean your phone? rubbing alcohol ? Jun 17 03:31:46 spit on it Jun 17 03:31:52 bankai_au oh you Jun 17 03:31:58 wipe it on my trowsers Jun 17 03:31:58 dogs lick it clean ? Jun 17 03:31:59 bankai_au you have your dogs goober it right ? Jun 17 03:32:03 ha Jun 17 03:32:39 Proof there is no god: http://stackoverflow.com/questions/tagged/php+mysql+json Jun 17 03:32:43 You're welcome. Jun 17 03:33:03 Oh wait, I should add node.js to the tag list.. Jun 17 03:33:15 clean? Jun 17 03:33:35 i'm still wondering if i need to learn JS just for whatever reason, like putting up a web page Jun 17 03:33:38 Acid bath. Jun 17 03:33:38 Leeds: he means when you can't see the screen anymore Jun 17 03:33:48 bankai_au: I open the case... Jun 17 03:34:36 do you have one of those things that looks like a purse that you keep your money, keys and cards in ? Jun 17 03:35:13 I have an activity.xml file and I can't get the elements to align properly Jun 17 03:35:18 I am using the graphics viewer Jun 17 03:35:21 you mean a 'pocket'? Jun 17 03:36:02 is it just me, or is gradle insanely fast now Jun 17 03:36:03 Oh, nice, just found out Swift has currying Jun 17 03:36:13 in as 0.6.1 Jun 17 03:36:14 indian curry ? Jun 17 03:36:14 It'll be fun to play with that once it's out of beta. Jun 17 03:36:25 some help Jun 17 03:36:39 ajoul: post your xml&your desires Jun 17 03:37:04 XML: , desires: money, fame, pizza, a tiny ferret Jun 17 03:37:25 Uhhh probably a bunny in a teacup eating a dandelion Jun 17 03:37:38 and many many beautiful women giving me... 5* reviews Jun 17 03:37:43 I can think of other desires but they're all just requests for more absurdly adorable animals Jun 17 03:37:47 Saw that one coming :) Jun 17 03:37:48 canvs2321: http://pastebin.com/kRmjHDVd Jun 17 03:38:08 https://i.imgur.com/PMo9iQR.jpg ⇐ Look at this tiny weasel. Jun 17 03:38:10 It is a tiny weasel. Jun 17 03:38:13 It is SO TINY. Jun 17 03:38:26 canvs2321: I am trying to get spin to align with button Jun 17 03:38:33 It could also probably kill me. Jun 17 03:38:35 Nilium: you know zooborns, right? Jun 17 03:38:59 Nope, had not seen that 'til now. Jun 17 03:39:01 Nilium that thing looks like it could have the same temperament as the rabbit in monty python & holy grail Jun 17 03:39:17 fucking thing could rip your head off ! Jun 17 03:39:18 Oh my god a baby penguin Jun 17 03:39:27 Oh god a baby tiger Jun 17 03:39:32 BEAVERS Jun 17 03:39:33 ajoul: align how? Jun 17 03:39:35 all the babies... Jun 17 03:39:51 SERVAL KITTIES Jun 17 03:40:11 canvs2321: I am new to android, but here is what I am trying to do. I want button on top of the spinner layer and button centered in the spinner layer Jun 17 03:40:20 You know, I'll pass on the albino skunk. Jun 17 03:40:20 when I try to stack them they are a little misaligned Jun 17 03:40:38 also, the spinner layer overlaps the button layer Jun 17 03:40:40 ajoul: and you should clean that xml up, quite a bit of fluff, as in setting orientation on your root layout, naming of items, etc.. Jun 17 03:41:15 ajoul: you have alot of stuff you need to remove. post a screen shot Jun 17 03:41:39 Nilium: this is getting excessively off-topic, but http://goo.gl/0RkhgK is one of my favourite pics ever... Jun 17 03:42:30 I don't know if that's a happy expression or not 'cause the expressions I'd make might indicate fear for one of them. Jun 17 03:42:59 the baby just looks so blissed-out to me Jun 17 03:43:12 canvs2321: http://www.tiikoni.com/tis/view/?id=372ee97 Jun 17 03:43:27 Koalas are adorable but I have learned to fear them. Jun 17 03:43:40 they are dangerous little things Jun 17 03:44:30 ajoul: incidentally, 'spinner' is a thing in Android - I've been wondering why you've been talking about one, but not using one Jun 17 03:44:47 Leeds I meant a loading spinner Jun 17 03:44:51 :/ Jun 17 03:44:57 I was thinking you meant a stepper Jun 17 03:44:59 you mean a spinning circle Jun 17 03:46:25 i think he means an indeterminate progress indicator Jun 17 03:46:36 yes Jun 17 03:46:41 but thats not the problem Jun 17 03:46:41 ProgressBar Jun 17 03:46:46 the problem is stuff don't align properly Jun 17 03:46:48 View names in Android are delightfully confusing. Jun 17 03:47:54 ajoul: you are aligning your button top to linearLayout1. which is android:layout_marginTop="50dp" and not centered. so...try changing that Jun 17 03:48:05 plus that whole linearLayout1 seems useless Jun 17 03:49:00 canvs2321: I'd assume linearLayout1 is either for stuff to go in later, programatically, or ajoul has edited down his xml for us Jun 17 03:49:10 Dang it, my DS ran out of juice. So much for an Animal Crossing obsession session Jun 17 03:49:26 well seeing that xml, it is a mess, so i doubt it has any foresight, it's just something copy pasted Jun 17 03:51:30 i'll admit i like the visual concept of it, but maybe he is a graphics designer, dabbling in code Jun 17 03:58:58 i need to add contact like skype ads in contact list with my app icon there , what is the method for that ? ex http://s13.postimg.org/g8mcvt147/device_2014_06_16_235151.png Jun 17 04:00:12 chinu: been at it for awhile huh? what have you found so far in your journey? and why isn't it working? Jun 17 04:00:58 Leeds I didn't edit down anything I am just not sure Jun 17 04:01:06 I am new to android development Jun 17 04:01:30 ajoul: so what's the point of linearLayout1 then? Jun 17 04:01:40 canvs2321 : I am using ArrayList ops = new ArrayList(); so far , and it just add contacts as regular contacts Jun 17 04:01:41 no idea I use the graphical editor Jun 17 04:01:49 oh :( Jun 17 04:02:25 canvs2321 : but i want all the contact detail to be saved with a seperate icon of my app in the contact list just like for skype , whatsapp etc Jun 17 04:04:15 chinu: what i'm saying is, with your question what has google showed you, and how didn't those examples work? Jun 17 04:04:57 ajoul: did you remove the alignTop w linearLayout1 yet? Jun 17 04:05:09 canvs2321: I am very confused not sure how to do that Jun 17 04:05:26 canvs2321 : I searched google and sometime i stumble on Raw Contact , contactProvider , etc and doesnt seem like this is right approach for that Jun 17 04:05:33 just goto text instead of design while the activity.xml is open, and delete that line Jun 17 04:06:37 canvs2321: ok I did Jun 17 04:06:40 chinu: but you haven't got it working so how doesn't it seem like right approach if it does what you want. There has got to be an example out there. i Really don't wanna google it and find it for you :) Show some links you found that do what you want, but not the approach you wanted Jun 17 04:06:45 ajoul: and.... Jun 17 04:07:05 canvs2321: now the button is rendered on the top but still doesn't align with the spinning wheel Jun 17 04:07:24 show screen shot, you do have a marginTop set on button too Jun 17 04:07:43 just make them have the exact same settings Jun 17 04:07:59 I am not looking for a perticular approach , but i am looking for a specific term or function, about which i can study and make this thing possible and i am not able to find that anywhere Jun 17 04:08:00 minus setting the hardcode size that you use on button Jun 17 04:08:49 canvs2321: I managed to align it I think, by hand but still http://www.tiikoni.com/tis/view/?id=6375409 Jun 17 04:08:58 the button is layered below Jun 17 04:09:05 canvs2321 : http://stackoverflow.com/questions/24250980/how-to-add-contact-in-android-like-skype-whatsapp-in-native-contact-app/24252180#24252180 here is my question as SO also , which is also +1 by someone. Jun 17 04:09:37 button looks low Jun 17 04:09:57 show new xml Jun 17 04:10:47 canvs2321: http://pastebin.com/m3xDaqJK Jun 17 04:11:15 ajoul: your marginTop's are different Jun 17 04:11:33 so you button is 17dp below that of the spinner Jun 17 04:11:52 button top is 34, spinner is 17, so make them the same, why even have them? Jun 17 04:12:04 canvs2321 : ? Jun 17 04:12:20 plus you still have it aligned with linearLayout1 Jun 17 04:12:30 canvs2321: margin top is the margin from the top view right? Jun 17 04:12:31 sorry chinu, directing to ajoul Jun 17 04:13:01 chinu, that is just your question, are you seriously telling me no one else has asked the same on SO? Jun 17 04:13:38 no , i searched a lot and i said i am searching from 1 week or so now , but nothing i got so far Jun 17 04:14:07 i just want a clue on what to study to do this kind of stuff ? Jun 17 04:14:11 it does have to do with being a content provider, your implementation(sp?) is wrong, seems like it'd be something you register in manifest, unless it is purely adding contact through code pointing to your ContentProvider of that action Jun 17 04:14:46 canvs2321: what is the linear layout in my xml file for Jun 17 04:14:47 chinu, if you've spent a week and nothing, then you need to take a break and work on something else til you have a fresh mind about your actions Jun 17 04:15:19 ajoul, the linearLayout1 is for nothing, you need to remove it, it serves no purpose and your button is aligning to it Jun 17 04:15:19 ok i think so , never thought this thing could be that hard Jun 17 04:15:47 canvs2321: there use to be something there but I think I deleted it Jun 17 04:17:41 canvs2321: when I set the align top dpi attribute is this going to scale for every phone Jun 17 04:17:42 then delete the rest. you are creating a mess with having useless items Jun 17 04:17:57 or is it like html that I have to worry about every resolution Jun 17 04:17:59 align top just aligns tops Jun 17 04:18:11 don't over think it for now Jun 17 04:18:14 just get this working Jun 17 04:18:36 ok but I am just setting a random value to it to place the items where I want them to be, is that going to work out for me in the long run? Jun 17 04:18:57 ajoul: it works like html for the most part; try to think in offsets from sides or other objects Jun 17 04:19:09 ajoul, do you know framelayout,relativelayout,linearlayout, etc...? Jun 17 04:19:35 canvs2321: not really, now the next part is setting the button in the foreground Jun 17 04:19:58 how do I do this Jun 17 04:20:03 no the next part should be reading about layouts :) Jun 17 04:20:24 heh Jun 17 04:20:27 canvs2321: any good references? Jun 17 04:20:37 in relativelayout last view added to layout is technically foreground Jun 17 04:20:46 read the android site Jun 17 04:20:51 what is it d.android.com or something Jun 17 04:21:30 you need to realize you aren't coding for one specific device, but all, and keep things relative, don't hardcode, and learn how to utilize your different layouts for each need Jun 17 04:21:47 ajoul, you know about fragments? Jun 17 04:22:11 canvs2321: reading about it now Jun 17 04:22:32 good, it'll make sense once you see how each layout has it's uses Jun 17 04:23:11 relativelayout and linearlayout are top dogs, but creating unecessary nested layouts can be bad, so utilize what you know on how your design needs to be Jun 17 04:24:36 canvs2321: I read through both of them but it wasn't clear to me how I can keep the location of the buttons relative Jun 17 04:24:56 then read again, then again then again etc....it'll make sense Jun 17 04:25:08 visualize what you are reading to your needs Jun 17 04:26:26 in your relative layout, views can be overlapped, aligned etc, so if your "spinner" is aligned to parents center, and size is wrap content, and that content is bigger than your button, then you set your button to align parents center and set size to wrap content. no aligning other than setting center Jun 17 04:27:25 canvs2321: I have activity_launching.xml and activity_main.xml Jun 17 04:27:33 bah Jun 17 04:27:35 are these default xml files Jun 17 04:27:38 required for every app Jun 17 04:27:41 i can't go any further :) Jun 17 04:27:55 you are ADD? stay focused! Jun 17 04:28:12 sorry canvs2321 please continue Jun 17 04:28:33 the only default is what you set as default, everything can be set by you, but you need to understand how Jun 17 04:28:45 I see Jun 17 04:29:10 so just focus on setting your two views, your "spinner" & your button centered Jun 17 04:29:26 remove all nonsense, and just set what you know you want Jun 17 04:30:08 canvs2321: setting android:layout_marginTop="60dp" works well for the current view but it is not relative Jun 17 04:30:34 You said using layouts will help me avoid such issues Jun 17 04:30:39 I saw grid view which might be helpful Jun 17 04:30:40 remove all margins! remove all aligns! Jun 17 04:31:02 ok I just did Jun 17 04:31:28 then how can I position it at lets say not at the center but 2/3 from the bottom of the screen Jun 17 04:31:48 http://www.xda-developers.com/android/swiftkey-and-google-keyboard-ever-heard-of-user-privacy/ Jun 17 04:31:51 lol Jun 17 04:32:40 ajoul: what does this do http://pastebin.com/3RQn8GGh Jun 17 04:33:17 ajoul: if you want fractions of screen check out linear layout & weights Jun 17 04:33:44 canvs2321: this displays both spinner and button on the top which is not what I am after Jun 17 04:33:51 i can have 3 views in a linearlayout set to vertical orientation, and set weights to each of those 3 views to take 0-100% of the height Jun 17 04:34:14 ajoul, i got that hold on Jun 17 04:35:20 ajoul: http://pastebin.com/dQbeBz27 Jun 17 04:35:49 from that you can add margin or padding to slightly lower those views Jun 17 04:36:07 otherwise, i'd say go linearlayout with weights Jun 17 04:36:17 canvs2321: now I am confused, you said I should not have any margins right Jun 17 04:38:14 you said you wanted it in lower 2/3rds Jun 17 04:38:33 so if you have it centered, you can lower by any amount to give the subtle lowering of center Jun 17 04:38:46 sorry I meant upper 2/3 Jun 17 04:38:46 i wouldn't go crazy anything of 20dp i'd say use linearlayout Jun 17 04:38:49 2/3 from the bottom Jun 17 04:38:52 so its 1/3 from the top Jun 17 05:19:23 Hi all Jun 17 05:20:12 can I get some overview on sensor like gps in android Jun 17 05:20:28 can some one redirect me to some good tutorials Jun 17 05:20:39 gps and compass Jun 17 05:26:48 any idea how to go ahead? Jun 17 05:56:26 I dont know why the @string/rdb_light is getting displayed in the layout instead of the exact string light Jun 17 06:04:15 are you setting it in xml or in code Jun 17 06:04:34 if you're setting it in code you should be setting either the resource value (R.string....) or using getString(R.string.whatever) Jun 17 06:05:30 ok.. Jun 17 06:25:48 If I use Google Cloud Save https://developers.google.com/games/services/common/concepts/cloudsave on iOS does the user need to have a Google account? Jun 17 06:26:00 For my application to be able to store data in the "cloud" ? Jun 17 06:28:24 Is this because the phone GPU is lesser? Jun 17 06:28:26 EGL error: EGL_BAD_SURFACE Jun 17 06:29:06 The app doesn't mess around with OpenGL at all but this pops up and causes the software rendering to kick in causing massive performance lag Jun 17 06:31:22 window = pd.getWindow(); window.setLayout(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); window.setGravity(Gravity.CENTER); pd.show(); Jun 17 06:31:43 this part of the code causes it, removing that causes the problem to go away Jun 17 06:32:40 CodePulsar: that would seem to be a question for #ios-dev Jun 17 06:33:25 Leeds: Do I need a Google Account when using Google Cloud Save on Android? Jun 17 06:38:05 no idea Jun 17 06:44:44 CodePulsar i'd bet yes Jun 17 06:45:43 "In order to use the Play Games services, your game needs to implement user sign-in to authenticate your player's identity with the Play Games services. If the user is not authenticated, your game will encounter errors when making calls to the Play Games services APIs. " Jun 17 06:45:46 BUT Jun 17 06:46:19 On IOS it says I can use Google Cloud Save without the games library Jun 17 06:46:36 by using Google APIs Client Library for Objective-C Jun 17 06:47:07 Not sure if that requires a Google account/sign in also Jun 17 06:47:53 On the web hardly anyone is using Google Cloud save Jun 17 06:47:59 :O Jun 17 06:49:16 seems like the *user* has to sign in: https://code.google.com/p/google-api-objectivec-client/wiki/Introduction#Authentication_and_Authorization Jun 17 06:49:38 So Google Cloud Save is out of the way Jun 17 06:49:55 Its a good solution for Android though Jun 17 06:49:59 but not iOS Jun 17 06:50:13 I don't want to force iOS user to have a Google account Jun 17 06:53:38 dudes, where can I set a shortcut for Run As Android Application in ADT ? I don't want to right clic the project then Run as Android Application everytime I want to run my project Jun 17 06:54:07 shift + f10 Jun 17 06:54:11 hm, you should be able to make a run configuration Jun 17 06:56:40 tagrudev, the shift + f10 show me up the contextual menu, the same as when I right clic the project Jun 17 06:57:06 g00s, I don't get it, Jun 17 06:57:26 Are there any senior or architect level developers here? Jun 17 06:57:40 zoraj: there is a shortcut but its WAY too long ALT + X ALT + J or something Jun 17 06:57:46 I don't have a development questions but rather I would like your opinion on how long something would take to develop Jun 17 06:58:00 zoraj: you have to add an eclipse shortcut , check the Window -> Preferences and search for shortcuts Jun 17 07:00:11 i donnu why my cursor won't show up in editors with gradle files Jun 17 07:00:46 oh just takes a loooong time Jun 17 07:01:52 g00s: you need to get yourself a new computer! Jun 17 07:02:02 yeah no kidding Jun 17 07:02:44 Rule #1 Don't use Eclipse, ever. Jun 17 07:02:57 I got it! hardware companies are bribing oracle to make java slower and slower Jun 17 07:03:17 True story. Jun 17 07:03:44 Jitsi (written in Java) takes 800 MB of RAM! A freaking chat client taking that much memory is insane! Jun 17 07:05:34 how can a progress dialog be causing GL_INVALID_OPERATION :\ Jun 17 07:08:15 Just like that Jun 17 07:09:07 CodePulsar problem is, eclipse with ADT and no plug ins takes less memory than intellij or AS with no plugins :) Jun 17 07:09:22 so not sure what the 800mb is supposed to mean Jun 17 07:18:11 I don't complain about the memory usage Jun 17 07:18:13 of Eclipse Jun 17 07:18:27 I complaint about its functionality and its UI Jun 17 07:18:40 The memory usage above is about another program Jun 17 07:19:36 I've had terrible experiences with Eclipse in the last several years, I try to avoid it as much as I can Jun 17 07:20:50 fortunately, you don't have to use it! Jun 17 07:21:14 I have no choice, sometimes :-) Jun 17 07:21:31 really? Jun 17 07:21:50 There is no perfect IDE, all have problems Jun 17 07:23:07 I don't use any Jun 17 07:23:13 problem solved. Jun 17 07:24:16 I have a question concerning listview with custom adapter. you see I have rows inside a listview, the rows each have a layout which has a textview and another instance of "DrawLine", a class that I wrote for drawing a line from the textview until the end of the screen Jun 17 07:24:55 Leeds: Android Dev without IDE? Is that a thing? Jun 17 07:25:00 it's a thing! Jun 17 07:25:00 these rows are like 5, 10, no matter. When I change the name of one of the textviews (at runtime via notifyDataSetChanged, causing them to be named to something shorter), the listview DOES refresh, and everything gets drawn back again Jun 17 07:25:17 BUT the line from the suspect row is left behind on the screen Jun 17 07:25:32 I use canvas.drawPath to draw it. does that stuff just stay on the screen? Jun 17 07:25:45 I suspect it'll be a *different* thing next week, but hopefully still a thing... and now, lunch! Jun 17 07:25:46 Leeds: Emacs? Jun 17 07:25:53 damn you to hell, sir! vim Jun 17 07:26:08 the drawing object is part of the listview, it's not like something is drawing on the screen separately or anything, the drawpath is inside the layout for each separate row Jun 17 07:26:13 Leeds: :D Jun 17 07:26:43 I heard Emacs is better for Java Jun 17 07:28:08 who says that stuff.. Jun 17 07:29:48 give me a few beers and i'll say whatever you want Jun 17 07:32:08 hm, beer Jun 17 07:32:21 havent had beer in almost 2 beers Jun 17 07:32:24 years* Jun 17 07:36:43 hahaha Jun 17 07:37:35 CodePulsar: not sure what's your point Jun 17 07:37:40 sure Eclipse has some issues Jun 17 07:37:56 but they're mostly about crashing Jun 17 07:38:04 anyone can build a shitty app Jun 17 07:39:53 what's that last sentence got to do with it Jun 17 07:39:54 lol Jun 17 07:49:07 omg the t-mobile web site is the worst Jun 17 07:51:02 hey Jun 17 07:55:23 Hi all, I have long downloaded = 12922624 ; long total = 135942628 and want to have the percentage of it: I tried: int p = (int) (downloaded / total *100) but I got 0, what am I doing wrong? Jun 17 07:55:36 after 7 months of iOS I'll come back to android dev :D Jun 17 07:57:20 gdrc you will, or you have ? Jun 17 07:57:29 FrancescoV: maybe (downloaded/total) * 100 Jun 17 07:57:29 are you sure you won't like it :) Jun 17 07:57:52 g00s: I start today Jun 17 07:58:02 gdrc start iOS today ? Jun 17 07:58:21 gdrc: Would still be zero. Jun 17 07:58:32 today I stop with iOS and start with android Jun 17 07:58:35 grdc: also tried (int) ((progress.mOverallProgress / progress.mOverallTotal) * 100) but still got 0 Jun 17 07:58:38 ah, ok Jun 17 07:59:07 FrancescoV: gdrc is sort of right, but got his order wrong -- You could do (M * 100) / N Jun 17 08:00:00 Where M is the amount downloaded and N is the total size. Jun 17 08:00:18 Basically, be aware of order of operations. Jun 17 08:01:04 Nilium: Thanks, your solution works! Jun 17 08:01:05 Hi! Is there a pattern to handling activity changes? I.e. how to take care of the views etc? Jun 17 08:02:11 Longs in Java are 64-bit, right? Or are they machine-dependent? Jun 17 08:02:23 I don't actually remember. Jun 17 08:04:31 Was going to say something about checking for integer overflow but I'd guess it's extremely unlikely in normal usage. Jun 17 08:05:00 longs in java are always 64bit Jun 17 08:05:14 Good to know I'm remembering right, then Jun 17 08:06:55 g00s: I enjoyed iOS, it has a great development environment Jun 17 08:07:20 gdrc why did you quit ? Jun 17 08:07:58 I did not. Where I work we have to start a project in Android Jun 17 08:08:22 ah k, well, keep using those hard earned skills , don't want to forget that stuff Jun 17 08:08:30 you won't know your allocs from your inits soon :) Jun 17 08:08:37 * Nilium smacks g00s Jun 17 08:08:43 [Type new]. Jun 17 08:09:08 Nilium its late! time to go to bed Jun 17 08:09:17 Nilium: use swift haha Jun 17 08:09:24 Actually, not that usable unless there's a typeWith…: class method. Jun 17 08:09:37 Since most of the time you don't want a bare init. Jun 17 08:10:02 I want to try Swift since it's very Scala-like, but I'm too cheap to cough up $100 for compiler access. Jun 17 08:10:23 I guess there's also beta OS access but I couldn't give two craps about it. Jun 17 08:11:50 Nilium: at home I've an hackintosh wich runs greatly on my pc hw Jun 17 08:12:44 Hi Jun 17 08:13:37 i have a unicode string like \u403\u930.... i want to show this as readable string into notification bar ? Jun 17 08:13:56 it shows always with \u.. not decoded/readable string ? Jun 17 08:13:58 any idea ? Jun 17 08:16:00 it should work as is Jun 17 08:16:38 Sicp, i even tried in textview didnt worked :( it shows \u... Jun 17 08:37:03 Hello Jun 17 08:39:40 I have an app submission issue, when users try to download my app, the message "the item you were attempting to purchase could nto be found" appears Jun 17 08:40:10 I submitted the application yesterday and it's a free app. Jun 17 08:42:21 Has anyone had a similar problem? Jun 17 08:45:40 Hi Jun 17 08:45:57 I have three radio buttons placed horizontally Jun 17 08:46:14 niru, good for you :D Jun 17 08:46:42 I want to click each button and see the name Jun 17 08:46:56 http://pastebin.com/XdaqF9mY Jun 17 08:47:13 please check the about mainactivity. Jun 17 08:47:34 But it abruptly says error Jun 17 08:48:03 could not find OnRadioButtonClicked Jun 17 08:48:09 could you please help Jun 17 08:51:42 any help pii3 Jun 17 08:51:56 JakeWharton: good post, well said I gonna fight with tests ;) Jun 17 08:52:03 dude im really noob in android development Jun 17 08:52:12 gordon_: link? Jun 17 08:52:33 thepoosh: https://plus.google.com/+JakeWharton/posts/FYxnhQuEyoq Jun 17 08:52:50 you wont find anything new, just the pain of everyday life of android dev Jun 17 08:52:58 there was a shortcut in eclipse->adt to add all needed imports to code automatically ,No? Jun 17 08:53:18 gordon_: that is what genymotion is for Jun 17 08:53:20 * gordon_ uses intellij Jun 17 08:53:33 thepoosh: read it all.... Jun 17 08:53:40 will do Jun 17 08:53:45 and comments Jun 17 08:53:46 http://pastebin.com/XdaqF9mY Jun 17 08:58:37 Hi! Anyone on a mobile device and can test if infinite scrolling and refreshing the content area after scrolling works? http://jsfiddle.net/frank_o/7zCL2/21/embedded/result/ -- http://bit.ly/1uzXJIm Jun 17 09:04:40 Is there a way to "pause" the app while I am writing to a file, and then let the user interact with the app again once the file is finished written? Jun 17 09:05:51 jesperj: a not cancelable dialog telling the user to wait Jun 17 09:07:01 you dislike your users that much? Jun 17 09:07:32 Guys, Jun 17 09:07:41 Im having trouble with recording a video on the samsung S3 Jun 17 09:07:46 GT-I9300 Jun 17 09:07:54 The video comes out complete garbage Jun 17 09:08:04 it works on all other phones though :/ Jun 17 09:08:18 danijoo: That's a good idea. Thanks Jun 17 09:09:08 danijoo sorry I needed some help in http://pastebin.com/XdaqF9mY Jun 17 09:09:37 I added 3 radio buttons and when clicked on each radio button it should just display that name Jun 17 09:09:39 Turns out its the front facing camera that bugs out Jun 17 09:09:45 anyone had this issue? Jun 17 09:10:33 But it says could not find method OnRadioButtonClicked Jun 17 09:12:52 dont know whats going on in your code Jun 17 09:12:58 the format is a mess Jun 17 09:15:06 i have a getview with a clicklistener but it makes the listeners in the listview stop working Jun 17 09:19:11 why danijoo Jun 17 09:19:49 line 1 and 2, what is this? Jun 17 09:20:14 a method call and a closing tag from a previous method ? Jun 17 09:21:31 please dont consider thise two lines Jun 17 09:21:40 I am getting error like this: Jun 17 09:22:30 http://pastebin.com/zF42KH6R Jun 17 09:22:47 Hello, i am working on a listView adapter, and i want my list to be : grey, white, grey, white, etc Jun 17 09:23:00 so i did something like if(position % 2 != 0) convertView.setBackgroundColor(color.clGray); Jun 17 09:23:23 but when i move on the listView it seems to put colors randomly Jun 17 09:23:52 sometimes its white, grey, sometimes white, white Jun 17 09:24:15 see what i mean ? :D Jun 17 09:24:47 i do it on my getview : public View getView(int position, View convertView, ViewGroup parent) Jun 17 09:25:35 macTAR: post your code.. i think its because you dont call setBackgroundColor on every getView Jun 17 09:25:50 niru: do you want a listener on a specific button of that radio group or just get to know when the user changes the selected button? Jun 17 09:26:12 macTAR: If i had to guess, i would say you mess up the recycling of the views Jun 17 09:26:35 exactly I want to know when the user changes the button Jun 17 09:27:05 then dont use onclicklistener. set an OnCheckedChangeListener on the RadioGroup Jun 17 09:27:29 http://codeshare.io/4H4Y5 Jun 17 09:27:48 codeshare ^^ Jun 17 09:28:13 as i said Jun 17 09:28:19 you messed up rcycling. Jun 17 09:28:32 you only change the color if(convertView == null) Jun 17 09:28:42 i see Jun 17 09:28:44 exactly what i said Jun 17 09:28:52 ill fix it thx guys Jun 17 09:28:53 not on every getView Jun 17 09:28:54 so if the view gets recycled and not inflated on its own, you dont change it and it looks random Jun 17 09:29:25 move the part changing the color out of that if case and it should work Jun 17 09:29:32 niru: your problem is because you have android:onclick="onRadioButtonClicked" in your layout.. remove it Jun 17 09:29:40 Is there a way to do test for HttpUrlConnection with Robolectric without using Mockito or something? Jun 17 09:29:57 ouch Jun 17 09:31:02 Yes you are correct Napalm Jun 17 09:31:17 But when should I use it then? Jun 17 09:32:41 niru: you don't Jun 17 09:33:18 niru: find the view by it's id in code and call view.setOnClickListener(); Jun 17 09:33:28 ah ok... Jun 17 09:33:52 works ! thanks Napalm & danijoo Jun 17 09:34:32 yw Jun 17 09:52:50 Im trying to write a custom Layout that basically is the same as a LinearLayout expect it has a TextView (a title) on top of all other views in it. Jun 17 09:53:00 Thats what i have so far: http://pastebin.com/4RYhPPdJ Jun 17 09:54:24 problem is: it only works with vertical orientation. Any Idea how to make it work with horizontal orientation? I guess I somehow have to wrap all childviews in a new LinearLayout in this case but dont know what method to override to get this behaviour.. Jun 17 09:59:46 Why doesn’t the ViewPagerAdapter use generics? What am I doing wrong? Do I really have the Object type for „getItemPosition“ for example? Jun 17 10:00:07 Or is it me being stupid to even override this? Jun 17 10:03:30 in my main activity, i got these two lines: Intent myIntent = new Intent(this, Player.class); Bundle extras = myIntent.getExtras(); Jun 17 10:03:36 and in the player class, i got this: Bundle extras = getIntent().getExtras(); String url1 = extras.getString(url); String path1 = extras.getString(path); Jun 17 10:03:51 and im getting that the variables url and path are not initialized Jun 17 10:04:01 how do i surpass this? Jun 17 10:04:02 use pastebin Jun 17 10:04:11 alright Jun 17 10:04:48 http://pastebin.com/QE7eBma8 Jun 17 10:05:21 you're trying to get things that don't exist Jun 17 10:05:39 you are doing it wrong :) Jun 17 10:05:42 they do in the mainactivity Jun 17 10:05:52 yeah, i figured, just cant figure out what it is that im doing wrong Jun 17 10:06:09 Bundle extras = new Bundle(); Jun 17 10:06:16 you have to put extras in order to get them Jun 17 10:06:18 then add the url to that bundle Jun 17 10:06:35 oh Jun 17 10:06:41 alright, lemme give that a try Jun 17 10:06:42 and then add it to the intent Jun 17 10:06:47 and then call startActivity Jun 17 10:07:09 if you dont add it to the intent, its not passed to the receiver activity Jun 17 10:07:43 i got this code from stackoverflow Jun 17 10:07:53 not as reliable as i thought Jun 17 10:08:10 cant say that as you dont show the full code.. Jun 17 10:10:06 Hi Jun 17 10:10:22 Ho Jun 17 10:11:10 Anyone knows how do I ban all devices without a specific GL extension from downloading my game on Google Play? Jun 17 10:11:29 Can be used for generic extensions, or only for texture formats? Jun 17 10:13:45 specifically I need OES_depth24, but there are lots of devices on Tegra 2/3w Jun 17 10:13:47 2/3 * Jun 17 10:14:02 so banning them manually is pain in ass Jun 17 10:20:25 hi Jun 17 10:20:33 I am trying to do the facebook developer tutorial Jun 17 10:20:50 I have the problem that there are multiple android-support-v4.jar files Jun 17 10:21:06 one is in a directory called appcompat_v7 Jun 17 10:21:13 one is in the facebook sdk directory Jun 17 10:21:21 it's very likely the same Jun 17 10:21:30 and one is in the libs directory of my project, i didn't put any of them there Jun 17 10:21:44 it seems like different sections of the program use it Jun 17 10:21:55 and I've only just completed the project wizzard Jun 17 10:22:06 yeah, ADT puts it there for convenience Jun 17 10:22:47 it lets you use certain new modern android features on old android versions Jun 17 10:22:50 such as fragments Jun 17 10:22:58 but it's the same for all apps and SDKs Jun 17 10:23:21 certain modern * Jun 17 10:23:49 gordon_: just finished reading Jun 17 10:23:53 was awesome! Jun 17 10:24:02 JakeWharton: cool blog post Jun 17 10:24:13 so much for convenience, I'm gettting these Jar mismatch errors Jun 17 10:24:43 weird Jun 17 10:24:49 dazpetty: that means you are probably using different versions of the support library Jun 17 10:24:59 so what should I do? Jun 17 10:25:03 http://stackoverflow.com/a/13517304/1056359 Jun 17 10:25:06 pick one and overwrite all the others with it Jun 17 10:25:11 no Jun 17 10:25:13 yeah I read it on stack overflow Jun 17 10:25:17 so? Jun 17 10:25:22 that's what it means Jun 17 10:25:24 you need v4, i think Jun 17 10:25:26 not v7 Jun 17 10:25:39 revision 19.1.0 Jun 17 10:25:40 go fetch the updated support lib from the ADT Jun 17 10:25:59 SiPlus: why manully do it when the ADT will do it for him?! Jun 17 10:26:06 yeah Jun 17 10:26:10 use ADT Jun 17 10:26:14 yeah! Jun 17 10:26:17 yeah the support is v4 Jun 17 10:26:38 dazpetty: just import the latest support lib from the ADT Jun 17 10:26:45 into all the projects that need it Jun 17 10:26:48 and that's it Jun 17 10:28:18 I get this error: http://pastebin.com/4hqprw10 Jun 17 10:28:32 when I try to add the facebook SDK to my project Jun 17 10:28:41 before that its fine, its fresh out of the wizzard Jun 17 10:31:28 I copied one of the jars and over wrote the others its not working Jun 17 10:31:32 I'm using eclipse Jun 17 10:31:58 please help me; everytime I try to get started with this I immediatly hit a brick wall like this and can't go any further Jun 17 10:32:54 clean your project Jun 17 10:33:21 I'm looking for something similar to a javascript Object to store some key-value pairs and move them around. What should I use? a hashmap? Jun 17 10:33:43 bankai_au of course i have Jun 17 10:34:02 I'm running linux if that makes a difference Jun 17 10:34:09 oh well there's your problem Jun 17 10:34:43 why would that be the problem? it works for everything else and every android library I've used thusfar Jun 17 10:35:29 sarcasm, we understands the concept Jun 17 10:36:47 hey guys i try to get the current location from a user using the locationlistener in a fragment of navigation drawer. But because the fragment extends fragment and not activity i have to inflate and return a view in onCreateView. After that i am not able to change content of textviews from a class which implements locationlistener. Getting the currentlocation without using navgigationdrawer and fragments works fine. But my problem is Jun 17 10:36:47 to get the current location inside a fragment Jun 17 10:38:42 i don't get it, what's the problem ? Jun 17 10:38:46 How can I unmount and later remount the SD card from an AVD? Jun 17 10:39:07 I need to test the app when there is no external storage available Jun 17 10:39:13 androsep: pastebin Jun 17 10:39:45 bankai_au, ok one moment please i did some changes i will reproduce my main code Jun 17 10:51:26 I wanted to test my AsyncTask Data Fetching behavior when WiFi is turned off, so I programtically turn off WiFi, start the task and all I get is E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #4 without a StackTrace... not very informative :P Jun 17 10:54:07 ok thanks for the help I finally got it, seemed i had done the right steps in the wrong order Jun 17 10:54:22 ok bankai_au this is the MainActivity: http://paste.frubar.net/17722 and this is the Fragment2 for a fragment in the navigationdrawer http://paste.frubar.net/17723 Jun 17 10:54:31 thanks bankai_ai and thepoosh Jun 17 10:54:46 now i have (should be) easy question, where do i add an activity? Jun 17 10:55:46 it says " Finally, add a new Activity to the app, with the name com.facebook.LoginActivity " Jun 17 10:58:22 ah i found it its in application Jun 17 11:18:34 dazpetty: still wondering? Jun 17 11:18:58 hey, thepoosh, just pushing my way through little problems Jun 17 11:19:07 now i'm reading this http://stackoverflow.com/questions/16156856/android-facebook-applicationid-cannot-be-null Jun 17 11:19:09 anything interesting? Jun 17 11:19:12 nothing ever seems to go as planned Jun 17 11:19:21 have you don't facebook apps before? Jun 17 11:19:32 yes, we had some FB integration Jun 17 11:21:31 I've been using libGDX for the past few months, its alot of fun Jun 17 11:21:38 its an android game engine Jun 17 11:23:48 *sigh now its just giving me an "unfortunatly your app has stoped working" Jun 17 11:25:50 What's the nicest way by now to start an AsyncTask and cancel it if it isn't successful after 30s? Jun 17 11:28:13 platzhirsch: are you talking about doing network things? Jun 17 11:28:37 if so, just use a timeout Jun 17 11:28:38 thepoosh: yes, just noticed I had to catch the right (RuntimeException) Jun 17 11:28:53 if not, Asynctask might not be your solution Jun 17 11:30:25 oh, I confused two questions, sorry :D Jun 17 11:30:42 hmmmmm Jun 17 11:30:50 so yeah, timeout, let's see Jun 17 11:31:22 now I'm getting a Could not find appcompat_v7.apk! Jun 17 11:31:29 even though its right in front of it Jun 17 11:31:30 * Zharf sighs Jun 17 11:31:37 There will be a TimeoutException with .get(long timeout...) Jun 17 11:31:52 and I did the android tools - add support library thing Jun 17 11:32:00 but I really don't want to block Jun 17 11:32:01 and only when i try to run it,not before Jun 17 11:32:14 I'm getting reports from some S4 out there that my app can't wrote to the directory Context.getExternalCacheDir() returns... any clues as to why this might be? -.- Jun 17 11:33:58 platzhirsch: appcompat is a library project Jun 17 11:34:10 thepoosh: yeah, I have that included Jun 17 11:34:20 well Jun 17 11:34:28 oh you miss pinged, right? ;) Jun 17 11:34:34 thhat was meant for dazpetty? Jun 17 11:35:00 yes Jun 17 11:35:01 since I believe appcompat is not related to AsyncTask at all Jun 17 11:35:01 :S Jun 17 11:35:03 sorry Jun 17 11:35:11 but to ActionBar backward compatiblility Jun 17 11:35:15 attention dazpetty Jun 17 11:35:26 dazpetty: how does the libs in the appcompat project look like? Jun 17 11:35:40 platzhirsch: you were correct Jun 17 11:43:24 hey Jun 17 11:43:40 its blank Jun 17 11:44:31 appcompat_v7 has is_library checked and has no libraries linked to it Jun 17 11:45:13 thepoosh: it has 2 jar files inside th elibs folder, android-support-v4.jar and android-support-v7-appcompat.jar Jun 17 11:50:02 How do I use typed resources? Jun 17 11:53:35 marrrk: did you read the docs? Jun 17 11:53:45 Where are the docs? Jun 17 11:53:54 d.android.com Jun 17 11:54:36 And where does it speak about TypedResources? Jun 17 11:54:47 have you tried the search feature? Jun 17 11:54:50 it's very good Jun 17 11:55:52 I have tried that Jun 17 11:56:26 That’s all it yields: http://developer.android.com/guide/topics/resources/available-resources.html Jun 17 11:57:51 And I’m quite sure that it’s not an Android feature, anyway. Jun 17 11:59:22 hmmm, I pissed abot and now its saying 06-17 21:54:12.895: E/AndroidRuntime(16731): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.dazawesomeapp/com.example.dazawesomeapp.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.dazawesomeapp.MainActivity" on path: /data/app/com.example.dazawesomeapp-1.apk Jun 17 12:00:23 its hard to beliefe they actually want people to develop apps with this shit Jun 17 12:00:40 dazpetty: they don't, really Jun 17 12:01:01 Leeds, they wouldn't be the only ones either Jun 17 12:01:03 they'd prefer if everyone just used chrome to view ads Jun 17 12:01:18 and they're watching you... through your TV Jun 17 12:01:33 sometimes I wish I'd just die in my sleep so I didn't have to deal with this shit Jun 17 12:01:54 dazpetty: There’s an easy fix for that. Jun 17 12:02:08 marrrk: right - stop sleeping Jun 17 12:02:37 well fuck Jun 17 12:02:51 somebody here has to have setup an android project and integrated it with facebook Jun 17 12:02:59 what the cunt am I missing? Jun 17 12:03:09 really, I don't think it's necessary to poison the water supply on the way out Jun 17 12:03:10 what the cunt?! Jun 17 12:03:12 LOLLL Jun 17 12:03:43 Do I have to append my view to the container. In onCreateView? I’m confused since I also return a view. Jun 17 12:04:25 Ah, so apparently I shouldn't. Jun 17 12:04:46 why is it that what ever I want to do with software seems to have some bullshit hurdle Jun 17 12:05:39 come on Jun 17 12:05:41 seriously Jun 17 12:05:47 dazpetty: It’s like that for everybody. Jun 17 12:06:15 yeah, its like software has some sort of moment where it needs to trush you or something Jun 17 12:06:19 *trust Jun 17 12:06:26 dazpetty sounds british Jun 17 12:06:46 I'm Australian if that helps Jun 17 12:06:52 close enough :D Jun 17 12:06:58 Napalm: nah, nothing like eloquent enough Jun 17 12:07:07 :) Jun 17 12:07:08 and the weather is better here Jun 17 12:07:18 yeah, but... dropbears, mate Jun 17 12:08:28 * Leeds got into an argument with an Aussie last Friday night about app design... Jun 17 12:09:07 marrrk: its given to you so you can inflate your layout parameters correctly. Its the parent container that decides how to apply the android:layout_* parameters. If you don't specify a parent during inflation or use null the inflater will ignore those attributes and no LayoutParams will be assigned to your view and when its added to a parent the parent will assign it the default paramters Jun 17 12:09:09 well I wont be getting into arguements with bloody anyone if i cant get this to work Jun 17 12:09:19 if logcat says its a nullpointerexception error, can i see which object exactly it is that is null? Jun 17 12:09:28 it doesnt have a number of the line or anything Jun 17 12:09:28 apparently a rather famous former AFL player... Jun 17 12:09:47 LighterFluid: pastebin the whole trace Jun 17 12:09:52 LighterFluid: it tells you the line, isnt that enough? Jun 17 12:10:04 it does? Jun 17 12:10:08 yes Jun 17 12:10:15 so, if you where to create an app that stored information between lots of people, how would you do it? would you use a server or does google have some sort of service like googleplay? Jun 17 12:10:19 filename.java: Jun 17 12:10:51 im sorry, im confused Jun 17 12:10:54 and im rather new at this Jun 17 12:11:03 so could you explain it like im an idiot? Jun 17 12:11:04 Napalm: I don’t want to inflate. I’m creating the view programmatically. Jun 17 12:11:19 i cant find a line number in the logcat anywhere Jun 17 12:11:49 LighterFluid: logcat shows a stack-trace.. it contains the method names, file names and line numbers Jun 17 12:12:32 the message where it says nullpointerexception doesnt point to anything when i double click it Jun 17 12:12:38 marrrk: so you might want to resolve your own layout parameters in code.. its your choice Jun 17 12:12:50 Okay, very good, thanks. Jun 17 12:14:18 http://pastebin.com/EVvqjFrz here's a little piece of code i suspect causes trouble Jun 17 12:14:39 basically just an onListItemClick method in which im changing the layout and activity Jun 17 12:14:55 but when i try to click on any items within it, it gives me the nullpointerexception Jun 17 12:16:51 LighterFluidwell these a multitude of problems with that code Jun 17 12:17:02 yeah? Jun 17 12:17:04 like what? Jun 17 12:17:56 LighterFluid: for a start you probably dont want to call setContentView you probably also dont want to start the activity and then alter its extra's after its been started Jun 17 12:19:05 other than that, its rock solid? :) Jun 17 12:19:17 no Jun 17 12:19:22 not by a long shot Jun 17 12:19:34 jeez Jun 17 12:19:55 its 20 lines, how bad could i have botched it? Jun 17 12:20:30 any ideas what causes the NullPointerException? Jun 17 12:21:18 it does refuse to work Jun 17 12:22:09 LighterFluid: unfilter your logcat and find the NPE and copy the stack tracke and paste in it pastebin Jun 17 12:24:23 Napalm: http://pastebin.com/Hm4tTjBY Jun 17 12:24:52 lol Jun 17 12:25:29 i didnt do what you asked for, huh? Jun 17 12:25:50 your Player activity is the problem Jun 17 12:25:50 is it in your manifest Jun 17 12:25:50 also, the NPE is probably being caused by a initialization of a variable in it Jun 17 12:25:51 LighterFluid: yes, i'm telling you what your problem is Jun 17 12:26:00 in your Player activity Jun 17 12:26:39 oh and yes, you didnt Jun 17 12:26:52 LighterFluid: the lines after the Caused by: is the stack tracke Jun 17 12:26:57 trace Jun 17 12:27:29 you want those lines? Jun 17 12:27:53 http://pastebin.com/nzpkWs8D Jun 17 12:28:32 okay, stop trying to post just the bits we want, since you obviously don't *know* what bits we want Jun 17 12:28:34 well there you go Jun 17 12:28:36 its telling you Jun 17 12:28:49 i honestly havent felt this stupid in a long while Jun 17 12:28:53 rs.edu.ict.android.memorygame.Player.onCreate(Player.java:49) Jun 17 12:29:00 line 49 Jun 17 12:29:16 your parameter to setDataSource is null probably Jun 17 12:29:43 but i used bundle to pass that string from the previous activity to the next Jun 17 12:30:29 if i draw a rectangle on a canvas, will it use gpu for this? Jun 17 12:30:34 no its not Jun 17 12:30:34 you start before you fill it in Jun 17 12:30:46 yes Jun 17 12:30:57 osxorgate: yes Jun 17 12:30:59 wait Jun 17 12:31:08 in my mainactivity, i made an intent Jun 17 12:31:12 and added extras to it Jun 17 12:31:26 so has anyone got a blank facebook sdk project they could give me a look at Jun 17 12:31:30 oh shit, i think i see it Jun 17 12:31:52 for fucks sake all i want to do is post a damn "level completed in xxx time" message to peoples fb account Jun 17 12:33:26 LighterFluid: http://pastebin.com/ypsCR1DG Jun 17 12:36:01 LighterFluid: got that? Jun 17 12:36:19 dazpetty: I just downloaded the sdk and built one of the sample apps with 3 commands... Jun 17 12:36:20 yeah, im going over it Jun 17 12:36:21 thanks Jun 17 12:36:28 but its giving me an error Jun 17 12:36:30 Leeds, really? Jun 17 12:36:36 really Jun 17 12:36:40 the createIntent method Jun 17 12:36:50 its undefined for the Player class Jun 17 12:36:59 oh god Jun 17 12:37:01 http://pastebin.com/6zjyNjYJ i'm creating some sort of can't find the main activity classe error now Jun 17 12:37:20 dont give up on me, you went so far Jun 17 12:37:25 LighterFluid: do you know any Java? Jun 17 12:37:36 apart from things like unzipping and cd-ing... I just ran "android update project -p ." twice, and "ant debug" once Jun 17 12:37:41 i used to, but it appears as though i've forgotten lots of it Jun 17 12:38:26 dazpetty: I don't know anything about using the SDK, but at least the HelloFacebookSample... just built Jun 17 12:38:50 was it this one? Jun 17 12:38:51 https://developers.facebook.com/docs/android/getting-started Jun 17 12:39:03 yup Jun 17 12:41:04 download, unpack, run "android update project -p ." in the facebook/ directory, then run it again in the appropriate sample directory, then "ant debug" to build... that's it Jun 17 12:42:42 erm... is your activity in your manifest? have you cleaned? Jun 17 12:43:18 Napalm: thanks for everything Jun 17 12:45:48 dazpetty: ? Jun 17 12:46:11 fiddling about and going no where Jun 17 12:47:08 sounds fun Jun 17 12:48:40 I mean I don't know, I've poked and prodded so many little fucking buttons I think i'll just have to wipe this asshole of a thing and shit out a brand new project Jun 17 12:49:04 its like being repetively kicked in the head, it really sucks, I HATE THIS Jun 17 12:49:19 programming is fun and at worst it's tedious, but this is just utter bullshit Jun 17 12:49:43 dazpetty: you have quite the potty mouth Jun 17 12:49:47 asshole! Jun 17 12:50:00 sorry Jun 17 12:50:10 just trying to convey my stress here Jun 17 12:50:16 you might want to a) calm down and b) look in the mirror Jun 17 12:50:17 it always feel like you're the only one Jun 17 12:50:18 dazpetty: it's ok Jun 17 12:51:13 also, more patience would help Jun 17 12:51:15 all these docs are like its "step 1,2,3" and then you do it and it doesn't work because you've had to search through stack overflow for 45 minutes to find out you need to uncheck some library box and change one line of code Jun 17 12:52:00 3 commands Jun 17 12:52:08 facebook SDK app built. Jun 17 12:53:05 I'm not trying to be an asshole here - well, not entirely - but it's not rocket science... I'm not sure what level of experience you're coming from, but I'd guess you need to level up some Jun 17 12:53:55 which means you need to chill, and accept that you're learning, and things won't always go right straight away - but they will next time Jun 17 12:54:14 (see, asshole *and* patronising, in 2 lines!) Jun 17 12:55:13 I didn't mean to imply you where an ass hole I was talking about this SDK Jun 17 12:55:30 dazpetty: are you configuring your IDE for the first time ? Jun 17 12:55:39 nope Jun 17 12:55:46 I been using eclipse for about 6 months now Jun 17 12:55:57 oh, no, I'm admitting that I'm being a bit of an asshole by pointing out, repeatedly, just how easy it was to build a Facebook SDK app Jun 17 12:56:33 'coz... it was pretty easy, y'know Jun 17 12:57:14 well I don't have much android SDK experiance Jun 17 12:57:25 most of the stuff I've dont has taken care of that for me Jun 17 12:57:25 yes, that is clear... Jun 17 12:57:29 and I like game development Jun 17 12:57:38 and thats all math and problem solving and logic Jun 17 12:57:57 and not actually coding, using tools, debugging, etc. Jun 17 12:58:01 and less about the intricicies of how some person over at some company says I should install my libraries Jun 17 12:58:36 well if you ask me game dev is more about coding because once you know how to do a few basic things all you have is code Jun 17 12:58:50 Leeds, did you use maven? Jun 17 12:58:56 nope Jun 17 12:59:27 from gradle to crave Jun 17 12:59:35 well its my bed time and I cant make any strides without sleep Jun 17 12:59:44 so hopefully I'll catch some of you tomorow Jun 17 12:59:58 fuck maven Jun 17 13:00:00 JakeWharton, ping Jun 17 13:00:06 cyas Jun 17 13:00:15 Charl1e: maven is dope bro. Jun 17 13:00:27 :'( Jun 17 13:00:29 kill me Jun 17 13:00:33 Kevel: maven is wack! Jun 17 13:01:08 what is this LL Cool J vs Kool Moe Dee ? Jun 17 13:01:18 :D Jun 17 13:01:41 shmooz: I was thinking more in the terms of the "guy #1 and Guy #2" from the lonley island Jun 17 13:02:04 thepoosh, it is true your app is written on phonegap? Jun 17 13:02:28 hmmm Jun 17 13:02:31 YES! Jun 17 13:02:34 I KNEW IT Jun 17 13:02:38 Java is for lamers Jun 17 13:02:47 write in html Jun 17 13:02:51 as Denis said Jun 17 13:02:59 Jun 17 13:03:14 +u Jun 17 13:15:19 hello, is it normal that .setVisibility(View.INVISIBLE); on item in view makes soft input keyboard appear? Jun 17 13:16:07 No, I would say that focus went to an input view Jun 17 13:31:17 Is there a script that can push a folder onto a device and then when I run the script again after I change some files only the changed files are pushed? Jun 17 13:36:27 nvm, found adb sync Jun 17 13:49:37 i'm running Android 4.2.2 and trying to write to the external storage. The path is /storage/emulated/0/tokens/token_test and i'm creating a FileOutputStream and writing some data to it and close it again. There is no exception and it seems to write the data but there is not file created. i have the write and read external storage permissions Jun 17 13:49:51 reading from there works just not writing Jun 17 13:50:13 what am i missing? Jun 17 13:54:15 vegetablesalad19: if the view that grabs focus after is something like an EditText then yes that can happen Jun 17 13:55:17 Charl1e, yes I do set focus to EditText after that Jun 17 13:55:53 but before this just setting focus to edittext didn't bring up soft keyboard Jun 17 14:02:32 This seems like a silly question from a design point of view, but I find that I need to execute an AsyncTask serially. Or specifically, I cannot proceed with the user interface until the asynctask has completed. Is there a way to force the logic to wait until the Asynctask is done? Jun 17 14:03:42 Display a progressbar? Jun 17 14:04:25 that would make it a... SyncTask Jun 17 14:05:09 Okay, I think this means I'm crazy, but I think I can create the AsyncTask, and run a public function without actually firing execute. The problem is that I need to access some business logic without actually running the background netowrking. Jun 17 14:05:32 Leeds: I know. Ugh. Jun 17 14:06:02 Any good tips on profiling lags in scrolling listview. I see stutter now and then and I'm wondering which part of getView(..) is slowing it down. Can I profile just getView(..) in some easy way? Jun 17 14:06:17 Jonathan_Eyre can you give any more description about what you are trying to do Jun 17 14:06:55 snowpong: show your getView :) Jun 17 14:08:23 danijoo, do anything interesting with scala? Jun 17 14:08:59 pfn: not anymore. Jun 17 14:09:18 I see Jun 17 14:09:28 i really enjoyed scala. its so much more powerfull than java and stuff, b Jun 17 14:09:37 danijoo: it's 500 lines, it would take too long to go into the details - I was more looking into profiling tips Jun 17 14:09:58 sadly.... I have a native library exposed in the AsyncTask. I use the native library along with many network requests, so this works very well. I found I needed to access the native library without running netowrk, and the UI requires certain information from the library before showing the start page, or rather while the startup screen is coming up, I need to know things to load it correctly. SO... I either create a w Jun 17 14:09:59 Newbiw Q; When I started Eclipse today it says: This Android SDK requires Android Developer Toolkit 22.6.2 or above. How do I update this? Jun 17 14:10:02 but after each problem in project setup comes the next one that took hours to solve.. Jun 17 14:10:29 I published my app some time ago, now I changed my package name a bit and it wont let me upload it. Can I change it somehow ? Jun 17 14:10:49 danijoo, what problems, I disagree Jun 17 14:11:00 vegetablesalad19: package name is one of the few things in the manifest you can't change for an existing app Jun 17 14:11:00 If I click "Check for updates" it says "no updates found" Jun 17 14:11:38 snowpong, I had a bad feeling about this :( Jun 17 14:12:12 danijoo, there are few problems that haven't already be documented in the issue tracker for the plugin Jun 17 14:12:58 pfn: first there where like random ClassNotFounds when running UnitTests. After I solved them (dont ask me how), i got that problem with support-v4 library (see the issue). Jun 17 14:13:24 Unfortunatly this wasnt fixed with the solution that seem to work for others Jun 17 14:13:36 because you didn't add it as a libraryDependency Jun 17 14:13:56 you excluded the support jar, but then never added it... Jun 17 14:14:21 anyway, if you don't want to bother, it's ok Jun 17 14:14:44 libraryDependencies ++= Seq("com.android.support" % "support-v4" % "19.0.1", "com.viewpagerindicator" % "library" % "2.4.1") Jun 17 14:14:53 i added it :) Jun 17 14:15:20 then it should all work fine, assuming you restarted sbt, and maybe did a clean build Jun 17 14:15:32 If I use Debug.startMethodTracing() is that for all threads, or from the thread I'm calling it from? Jun 17 14:15:34 incremental dex doesn't like it when libraries change Jun 17 14:16:03 Yeah. well i decided to remove that library causing the problems. Then I had a problem with another library which was really cryptic to me Jun 17 14:16:12 that was the point I decided to stop. Jun 17 14:16:56 that's too bad Jun 17 14:17:15 yeah. It was like rewriting >1000 lines of code to java again ^^' Jun 17 14:17:30 * pfn uses viewpagerindicator in qicr no problem Jun 17 14:17:56 where can i download the latest eclipse adt plugin (and fine the filename)? Jun 17 14:18:45 my second problem was with StickyListHeader-Library which somehow was available in XML files, but not in the build. Jun 17 14:18:58 BWestOz you can get it right here, I swear it... (http://developer.android.com/sdk/installing/studio.html#download) Jun 17 14:19:03 I guess its just my low experience with sbt but yeah.. Jun 17 14:19:59 danijoo, shoulda tried when I wasn't on vacation for a month :p Jun 17 14:20:47 guess so :p Jun 17 14:21:10 mattblang; thank you for responding. Couldn't find the adt file there Jun 17 14:21:36 BWestOz haha, yeah, I was just kidding around by sending you an Android Studio link. Jun 17 14:21:37 maybe ill come back to it another day. The language itself pretty much has everything I miss in java Jun 17 14:22:22 there is no adt file, you either get the whole eclipse bundle, or you get it from the adt update site in eclipse Jun 17 14:22:56 man, what the heck. i have a included in my XML that I get a handle to in onCreate, then do something with in onCreateOptions. it works fine on 4.x, but on the 2.x test device the fragment handle is null when onCreateOptions runs Jun 17 14:23:46 mattblang: i THINK, may be wrong here but from when I last had issues with onCreateOptions, you couldn't work out when it was going to be called Jun 17 14:24:09 mattblang, I forget the order, but in one of the versions, it occurs in a separate ui thread event Jun 17 14:24:52 Might have been old android versions that ran options menu immediately after create without allowing other events to run Jun 17 14:24:53 Charl1e, pfn well crap. im checking if the nav drawer is open in onCreateOptions menu to adhere to the menu guidelines for when it is open Jun 17 14:25:04 mmm... I love downloading the SDK - I guess Google has a local cache on my ISP's network, so I can download the 100MB file in a couple of seconds :D Jun 17 14:25:22 Leeds, cdn op Jun 17 14:25:34 Charl1e, pfn so what the heck do I do instead, lol. a null check, then manually invalidate later maybe? Jun 17 14:25:38 pfn: op? Jun 17 14:25:44 before/after mattblang: inflate it via code? Jun 17 14:25:47 Leeds, gaming term Jun 17 14:25:57 Leeds, overpowered Jun 17 14:26:02 ah Jun 17 14:26:10 why the hell has before/after appeared in my text? haha Jun 17 14:33:13 pfn, Charl1e I found this (http://stackoverflow.com/a/7706597/1747491). im going to just put a null check in, if null then go ahead and show menu. what is weird is that it only happens on a couple of screens Jun 17 14:34:39 I have a media app that needs to start playing after $X seconds. $X is a user entered variable. Should I use a handler with postDelayed, or should I use something that interacts with the Android date/clock system? Jun 17 14:35:09 i have a java related question Jun 17 14:35:14 i have statements outside of a method Jun 17 14:35:40 they're inside static { a couple of statements here (adding stuff to an object) } Jun 17 14:35:49 is this possible? Jun 17 14:35:57 what does static {} mean? Jun 17 14:38:59 jvrodrigues interesting, didn't realize you could do that. http://stackoverflow.com/a/13319620/1747491 Jun 17 14:39:52 jvrodrigues: it's a static initializer, and it's guaranteed to be called the first time that class is accessed in any way Jun 17 14:40:00 Even before the first instance of that class is constructed Jun 17 14:40:09 i see Jun 17 14:40:11 how interesting Jun 17 14:40:26 My Eclipse/ADT IDE is giving me a whole bunch of messages; eg "Found 2 versions of android-support-v4.jar in the dependency list". Do I need to reinstall the whole IDE? Jun 17 14:40:34 It's barely ever necessary. One place where it's often used is loading JNI libraries Jun 17 14:40:34 I'm looking to create a couple of individual apps that all rely on a common core, would it be possible to let the user install one or several of those apps without installing the core more than once? Jun 17 14:40:48 BWestOz: what you need to do is install android studio Jun 17 14:40:52 if so, can someone point me towards some keywords I should look up? Jun 17 14:41:04 id android studio free? Jun 17 14:41:08 BWestOz: yes Jun 17 14:41:10 yes BWestOz Jun 17 14:41:45 that's a bummer. I have a tutorial book I was planning on using but it uses the Eclipse thing. Is the Eclipse/ADT thing total shyte? Jun 17 14:41:46 Mango_Man, BWestOz yup. that is why I was joking with you earlier with that Android Studio link Jun 17 14:42:25 BWestOz I wouldn't say total shit, no. I am definitely glad I went ahead and made the switch Jun 17 14:42:32 d0de, only use alarmmanager if you need it to happen while your app is not running Jun 17 14:42:38 otherwise alarm manager is the worst possible choice Jun 17 14:43:10 also, when you're using android studio, use Fira Mono for the font Jun 17 14:43:25 Well I installed it last week. It just told me I had to upgrade the ADT, which I did, now it's spitting out a zillion error massages. It's the worst IDE I've ever used Jun 17 14:43:27 * pfn just uses dejavusans everywhere Jun 17 14:43:38 BWestOz, just download the newest adt bundle Jun 17 14:43:40 that's how you update adt Jun 17 14:43:55 BWestOz, you can try the update-site, but it's not guaranteed to work well Jun 17 14:44:00 pfn; I did that but it's now giving me a whole bunch of erros Jun 17 14:45:10 all these found 2 versions of but not all version identical... Jun 17 14:45:25 did what, the update site? then download the newest bundle Jun 17 14:45:29 is it rescuable? Jun 17 14:45:35 Hello guys, I'm looking for a good pattern design of downloading items from a webservice, than store it in the database and meanwhile show the items to the user. But there's another thing, the old items already in the database should also be shown to the user together with the downloaded ones. What's the best way or pattern to do this? Jun 17 14:45:39 I just said it's not reliable... Jun 17 14:45:43 pfn; yes I already did that Jun 17 14:45:49 did what Jun 17 14:45:58 you need to learn to speak in full, descriptive sentences Jun 17 14:46:50 Help>Install new software>Add ADT plugin etc Jun 17 14:47:01 went through all that Jun 17 14:47:18 yeah, don't do that if it's not working Jun 17 14:47:20 download the adt bundle Jun 17 14:48:00 so you mean reinstall the whole thing Jun 17 14:48:53 Well good greif, I only just installed it. Will it ever work? :( Jun 17 14:49:22 BWestOz: 'Bunch of Errors' doesn't say much Jun 17 14:49:58 I'll pastbin them Jun 17 14:50:38 errors -> http://hastebin.com/agunowocug.tex Jun 17 14:51:33 Morning Jun 17 14:51:55 What's appcompat_v7? Jun 17 14:52:41 * BWestOz goes away to have a quite grumble Jun 17 14:52:43 library to use android 3.0+ stuff in older Android versions. Jun 17 14:52:51 not 3.0 stuff Jun 17 14:52:53 just actionbar Jun 17 14:52:59 can I delete it? Jun 17 14:53:42 pfn, it could be anything, it just happens to be actionbar, but also swiper drawer thing Jun 17 14:54:20 nope Jun 17 14:54:24 it's not "could be anything" Jun 17 14:54:26 it is just actionbar Jun 17 14:54:43 "swiper drawer thing" is support-v4 Jun 17 14:54:50 pfn, ty Jun 17 14:55:10 pfn, ok, you're right, if that's what you like to hear. Jun 17 14:56:05 Number5, of course I'm right Jun 17 14:56:55 SwiperDrawerThing swiper = (SwiperDrawerThing) findViewById... Jun 17 14:58:49 man, tough crowd Jun 17 15:04:02 Number5: I haven't found a good solution for such a pattern either but maybe retrofit is a good start http://square.github.io/retrofit/ Jun 17 15:04:41 Number5: some mix of volley or okhttp, gson, sqlite and localbroadcastmanager is what I' Jun 17 15:05:01 Number5: some mix of volley or okhttp, gson, sqlite and localbroadcastmanager is what I'd try with next time I need such a setup Jun 17 15:05:12 Can I make apps that require other apps? Jun 17 15:05:28 Syzygy, you can require them, but you can't enforce that they're already installed prior to installing Jun 17 15:06:06 I assume I can't optionally bundle them either? Jun 17 15:06:40 I'll probably have to request the user to download the other app once the first app is started, right? are there other options? Jun 17 15:08:23 yes, no Jun 17 15:08:31 Number5 I use Retrofit + Okhttp, + Ormlite and it has been fantastic for hitting our web services to consume JSON and persist in sqlite. Not using any hand-written SQL, http, or org.json code. Just using POJOs and some config. Also, OkHttp really sped up the requests. Not sure what the heck I was doing wrong before when I was using HttpClient Jun 17 15:08:53 httpclient sucks, that's what was wrong Jun 17 15:09:08 pfn thanks, that makes me feel better Jun 17 15:09:24 pfn like seriously, when I started using retrofit with okhttp my search requests were almost halved. it was ridiculous Jun 17 15:09:36 was wondering, if I call async tasks on an activity, can I have it call any sort of private methods without any side effects? Jun 17 15:10:32 jackson is also faster than gson Jun 17 15:10:41 although, I rarely start writing an app with jackson immediately Jun 17 15:10:42 * pfn shrugs Jun 17 15:10:51 benzap: As long as your methods dont have side effects, yes Jun 17 15:11:09 just keep in mind that you are running these methods on a seperate thread then, so you cant edit any views Jun 17 15:13:25 Syzygy: you can check if another app is installed, and prompt the user, and guide him to the right place in the app store for downloading Jun 17 15:14:24 snowpong, ok, during interapp commmunication is there an option to limit the package namespace? Jun 17 15:14:42 Syzygy: yeah, I remember doing something like that ... let me check Jun 17 15:17:19 specifically I'm going to create a suite of apps, all using the same core stuff (which handles communication with a backend and so on), I would like to only have to install the core once and prevent my stuff being sent to a different app on accident, under no circumstances should there be a chooser Jun 17 15:18:40 the page for sending/receiving data to/from other apps claims i can specify intent filters, but I need to make sure that there are no unintended collisions Jun 17 15:19:10 danijoo: I see, so it's not technically on the same thread, I need to send it to the ui thread? Jun 17 15:19:17 anyone programming anything interesting? Jun 17 15:20:04 benzap: If youll try to alter any views from AsyncTask, you get an exception Jun 17 15:20:17 Syzygy: I think you do it in the android-manifest using some sort of Jun 17 15:20:24 everything else _should_ work, although it may not be a good idea Jun 17 15:21:03 danijoo: I see, but there's a way to send an event to the UI thread containing a runnable Jun 17 15:22:26 I'm just trying to mimmick what a BroadcastReceiver does without using intents Jun 17 15:22:57 Syzygy: https://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities(android.content.Intent, int) this one gives a list of ResolveInfo - each of these have an activityInfo - you can check if the activityInfo.name startsWith("com.your.stuff") for example - this is how I check if Twitter or Facebook is installed Jun 17 15:23:20 Syzygy: obviously, you've gotta fill in the intent with some sensible stuff Jun 17 15:23:27 you can use onprogressUpdate to execute something on UiThread from async task Jun 17 15:23:35 alright, thanks a lot Jun 17 15:28:05 are there any guidelines for if or how the user will be informed that he'll have to download another app after he installed the first one? Jun 17 15:28:21 what's the best way of removing an image from an ImageView? Jun 17 15:28:40 I've tried setImageResource(0), but that doesn't seem to work Jun 17 15:28:43 shekibobo: setDrawable(null) Jun 17 15:29:28 danijoo: that's it, thanks Jun 17 15:31:20 man, my phone is in a situation where if I don't get root, I can't install the app I am working on. even from Play Jun 17 15:32:20 unless I factory reset Jun 17 15:41:41 Is Genymotion the best Android VM for developer testing? Jun 17 15:42:09 I've been working on an app in android studio, and decided to try intelliJ directly instead, but once I got everything setup and tried to build, I got an "com.android.build.gradle.internal.model.ApiVersionImpl cannot be cast to java.lang.Integer" error. Has anyone seen this or have any insights as to what might cause this? Jun 17 15:43:36 intellij doesn't have the latest gradle support improvements that android studio has Jun 17 15:44:29 pfn: ah, I see Jun 17 15:44:53 I'm seeking advice on what to use for Android Development. I've tried the Eclipse ADT but the VM is unusable. Some have advocated Android Studio for develelpment. Someone has also suggested Genymotion as a VM. I would like to find an Android VM that is usable. The one that comes with the Eclipse bundle is way slow Jun 17 15:46:08 androidstudio as a development studio, and genymotion for vms Jun 17 15:46:18 uhu, thanks Jun 17 15:46:22 although i recommend using real devices for development Jun 17 15:46:51 as genymotion alebit faster than the standard vm, is still not as snappy as a real device Jun 17 15:47:08 *albeit Jun 17 15:47:23 BWestOz, the vm is same regardless of ide Jun 17 15:47:39 BWestOz, and the vm is not unusable, use the x86 vm, not arm Jun 17 15:48:00 I did an android game in unity where you can run the game in the IDE and periodically compile and test on a device. Is there a way of doind something like that with normal android development because the VM with the Eclipse Bundle takes about 5 minutes to load which is unusable Jun 17 15:48:14 yeah I tried the x86, still way slow Jun 17 15:48:15 no, and x86 does not take 5 minutes Jun 17 15:48:17 it's not Jun 17 15:48:20 install haxm Jun 17 15:48:49 what's haxm Jun 17 15:48:57 use the google Jun 17 15:51:39 pk, thanks I'll try that. I've installed eclipse ADT, run the SDK maanager + Help install new software twice now and think it's a total dog but I'll persevere to the bitter end Jun 17 15:53:05 hmmm Jun 17 15:53:16 serrghi, on what machine is Genymotion slower than actual device? Jun 17 15:53:25 I'm having problems with it because it's TOO fast :) Jun 17 15:53:34 hmm, why isn't my new accessibility service showing up... Jun 17 15:55:38 thanks Jun 17 15:59:26 BWestOz yeah, the emulator sucks majorly. I use Android Studio and Genymotion. Jun 17 16:00:07 pfn have you activated it in the settings? Jun 17 16:00:22 Did you create that necessary xml file? Jun 17 16:00:44 About Picasso and performance: Picasso.with(imageView.getContext()).load(urlToLoad).fit().centerCrop().into(imageView); in getView(..) of an ArrayAdapter causes lagging when scrolling - does fit() cause performance issues? Jun 17 16:01:01 marrrk, it's some funky permissions stuff Jun 17 16:01:27 snowpong: it just attaches a ViewTreeObserver and defers starting the request Jun 17 16:02:33 pfn: I think you need only this in the service tag: android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE" Jun 17 16:02:59 hi guys Jun 17 16:03:54 I’m wondering why my fragment isn’t being shown in the FragmentViewPager. It’s so complicated! Jun 17 16:04:07 I need to implement a fragment with this interface: http://goo.gl/80kyuA . Only a Label on the left and a list of scrollable dots at the right. I need to know when user scrolls from one dot to another (it's a scrollable list of seasons, in a series app). Any idea to implement just these dots? Jun 17 16:04:07 JakeWharton: OK Jun 17 16:04:35 marrrk, yeah, found that already Jun 17 16:04:35 I was thinking to use just a ScrollView, but then I don't know when user has changed to another dot Jun 17 16:04:50 pfn I can paste you a manifest Jun 17 16:04:53 taht worked in january Jun 17 16:04:56 if it helps Jun 17 16:05:11 marrrk, yeah, it's working now, is what I meant, thanks Jun 17 16:05:17 Ah, very good Jun 17 16:09:29 Is there inter-app data storage possible without http://developer.android.com/guide/topics/data/data-storage.html#filesExternal ? Jun 17 16:10:07 JakeWharton: and the only work Picasso does in the UI thread is setting loading and/or error placeholder + setting the real bitmap? Jun 17 16:10:15 yep Jun 17 16:10:24 or do I have to encode the data I save to make it unreadable for foreign apps and the user? Jun 17 16:12:00 Syzygy: You can use a content provider Jun 17 16:14:19 pfn: What’s the method to get something out of the typed resources? findView doesn’t seem to exist or I am not importing it right. Jun 17 16:16:07 in hee (mainactivity), does the newInstance method create a new fragment instance everytime it is called, ie every time you switch views? Jun 17 16:16:12 http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-different-fragments-layouts Jun 17 16:16:16 *here Jun 17 16:16:47 f2prateek, if I have 7 apps that all share data on the phone (e.g. account settings), and 3 of them are installed, will this result in one app becoming the "master", managing all data access? or can I share data between them as if they were the same app? Jun 17 16:17:17 Syzygy wow 7 apps :P Jun 17 16:17:22 i mean :O Jun 17 16:17:33 just a random number. Jun 17 16:17:56 3452345 Jun 17 16:18:23 since 7 and 3 are the most random numbers (ask a person for a number between 1 and 10 and those will come up most often) Jun 17 16:18:37 1 Jun 17 16:18:41 9 Jun 17 16:18:45 42 Jun 17 16:19:03 outofrangeexception, darn Jun 17 16:19:15 OutOfBoundsException Jun 17 16:20:27 so anywway, I need access to the data from all of my "7" apps without the requirement to have a specific one installed. basically a sharedPreferences accessible by the my package Jun 17 16:20:37 or application namespace Jun 17 16:20:46 marrrk, import TypedResources._ Jun 17 16:20:55 Ah, okay, thanks Jun 17 16:21:42 I can only import TypedResource without an s, though Jun 17 16:23:43 marrrk, whatever the correct name is, I forget, you can look in TR.scala to see Jun 17 16:25:59 http://stackoverflow.com/a/14695943/1840621 <- in this, how do I declare broadcaster? What type is it? Jun 17 16:27:03 if 2 of my apps had a package name like com.mystuff.app1; and com.mystuf.app2; is there a way to let both use the same sharedpreferences? Jun 17 16:28:02 d0de: I believe the first line _is_ the declaration, Unless you need to import something, then Eclipse should tell you what it is Jun 17 16:28:28 (god damn hwo wonderfully lazy eclipse has made me) Jun 17 16:28:53 Syzygy, no Jun 17 16:29:00 Syzygy, use a contentprovider to share data between apps like that Jun 17 16:29:05 securely Jun 17 16:29:20 well, maybe, if you have your apps use the same user (same signature) Jun 17 16:29:23 But then pfn these implicits don’t work on an activity itself, do they? So I can’t use findView on the activity itself, right? Jun 17 16:29:27 Has anyone had issues with 0.6.1 not being able to resolve Android SDK Classes? Jun 17 16:29:38 jamesson, I tried it as-is but Eclipse gives me "broadcaster cannot be resolved to a variable" Jun 17 16:29:53 marrrk, you can, you need to do something like val _implicits: RichActivity = this; import _implicits._ Jun 17 16:30:03 marrrk, alternatively, you can just do this.findView Jun 17 16:30:11 Using my own typeface for TextViews, is subclassing TextView still the status quo to achieve this in a declarative fashion? Jun 17 16:30:26 pfn, the problem is that I might have several apps that should share the same data but no specific app should be required. Jun 17 16:30:34 jamesson, Eclipse suggests "LocalBroadcastManager broadcaster = LocalBroadcastManager.getInstance(this); " does that look right? Jun 17 16:30:36 platzhirsch: why not in xml? Jun 17 16:30:52 jamesson: does that work by now? I mean I have my own font in assets/font Jun 17 16:31:26 platzhirsch: unfortunately I have found that xml documentation is... sad. Check the eclipse gui designer. Jun 17 16:31:38 Syzygy, well, you can manage it yourself by storing your prefs on sdcard Jun 17 16:31:40 I am using Android Studio? Jun 17 16:32:02 platzhirsch: never tried, no clue Jun 17 16:32:06 platzhirsch, you must subclass Jun 17 16:32:09 d0de: looks ok to me Jun 17 16:32:14 pfn, so back to what I said about 20 minutes ago, using "external storage" and encoding the data somehow Jun 17 16:32:15 you can't use custom fonts in xml Jun 17 16:32:20 pfn: Thanks. So my deed begins Jun 17 16:32:34 pfn: goofy Jun 17 16:32:59 pfn: I ealize fontformats are not standardized, but still Jun 17 16:33:57 they are standardized for android, more or less Jun 17 16:34:04 but there is no way to specify custom fonts via xml Jun 17 16:34:09 in framework Jun 17 16:34:27 pfn: no, I believe you, I am just saying its wierd Jun 17 16:35:31 pfn: we need an open font standard like yesterday, but not bloody likely anytime soon Jun 17 16:37:14 what happens if your private key used for signing an APK for Google Play is comprimised? Jun 17 16:38:30 mattblang: no idea of the answer, but just curious - what do you mean by compromised? Jun 17 16:38:48 jamesson someone gets your private key and password Jun 17 16:39:25 mattblang: and what can they do with it? Jun 17 16:39:37 mattblang: can they sign malicious apps? Jun 17 16:40:54 jamesson I guess if they had access to your dev account they could upload a new apk. just curious if hypothetically if that happened, is there any way to change the keystore Jun 17 16:41:59 mattblang: in other words they could sign their code with your signuature... that is disturbing... Jun 17 16:42:33 jamesson yeah, but it would require that they have your keystore, keystore password, and google dev account login / password Jun 17 16:42:51 jamesson so highly unlikely. just curious if there is anything you could do if that did happen Jun 17 16:43:54 mattblang: probably if that is the case you have bigger problems of the stalker ex variety =P Jun 17 16:44:31 jamesson haha. what made me think about it is we are storing our key internally, and password is in the repository, also internal. but what kind of damage could a disgruntled employee do Jun 17 16:45:04 jamesson essentially made me wonder if I should lock it down somewhere internally Jun 17 16:45:52 mattblang: yo soy confused. If the key is issued to the company then why should more than 1 person/workgroup have access to it? I am not a security genious but seems obvious, no offense Jun 17 16:46:09 hmm, what did plugin 0.11.2 fix O.o Jun 17 16:47:29 jamesson none taken. it needs to be backed up somewhere, so first thought was the inernal storage drive that is backed up to tape. but I think I should probably see about putting it somewhere more secure, just for that small hypothetical case Jun 17 16:49:08 g00s I feel like my gradle builds have definitely gotten faster. I don't know if the incubating parallel feature that I turned on has gotten better, or what. im not even sure at what point it happened, but I swear it seems faster Jun 17 16:49:32 that great. i didn't enable parallel builds Jun 17 16:50:03 Do you guys know how to find the distance between 2 points with Location Services? Jun 17 16:50:24 g00s ive got org.gradle.daemon=true Jun 17 16:50:24 , org.gradle.configureondemand=true Jun 17 16:50:24 , org.gradle.parallel=true right now Jun 17 16:50:30 i mean the actual distance not the distance between 2 points the Road distance... Jun 17 16:50:55 And how do I check if Mock location is turned on? Jun 17 16:50:57 mattblang interesting Jun 17 16:54:10 It’s still not working. Jun 17 16:54:31 why doesn’t my view show when I return it from my fragment in OnCreateView ? Jun 17 16:54:47 In that same method I can change the background of the container Jun 17 17:07:51 hm, i have to try http://tools.android.com/navigation-editor Jun 17 17:07:57 but is this aware of fragments at all ? Jun 17 17:08:52 ok, seems so Jun 17 17:09:05 oh no thats an open issue haha Jun 17 17:12:30 Mavrik: osx, running 4.4.2 emulator of a nexus 5 Jun 17 17:20:03 hello im getting an error (and not evertime using a webview with jqeury and using .getjson Jun 17 17:29:40 Nilium http://www.reddit.com/r/science/comments/28crim/british_scientists_have_discovered_a_technique/ \o/ Jun 17 17:38:02 this looks cool (book on security internals) http://shop.oreilly.com/product/9781593275815.do Jun 17 17:38:51 do I need to do one layout for each type of device? mdpi, hdpi,ldpi,xhdpi, xxhdpi? how do I tell android to use either? will it take from the appropriate folder based on device? so I just keep a layout with the same name in all my folders? Jun 17 17:39:30 miquito you shouldn't have to, its more common to provide different layouts by orientation & screen size Jun 17 17:39:41 maybe different drawable for *dpi Jun 17 17:51:08 Alright, my app loads a simple menu with multiple buttons. 99% of these buttons load a url/webview and will be using the same JavascriptInterface to interact with the web content. Is there a way I can use a switch statement at the beginning of my webview activity to identify the button that was tapped, and load the appropriate url? Note that this is note a project supporting fragments. Jun 17 17:53:45 ol Jun 17 17:53:55 ugh, I hate how g+ doesn't let you change sharing settings on a post after posting Jun 17 17:56:39 don't use g+ , problem solved ! Jun 17 17:56:58 aw :( i like g+ Jun 17 17:57:01 Anyone have a good solution to the fact a boolean representing if a service is bound (in the activity) is not quite the same when requesting to be bound versus being actually being bound (ie, actually getting the callback from the service connection) Jun 17 17:57:22 lasserix don't keep track of state like that :| Jun 17 17:57:30 let the framework do ir Jun 17 17:57:42 meaning it's safe to call bindService multiple times or whatever? Jun 17 17:57:53 you'll set a reference to the service in the service connection, and cleat it in onStop so thats enough state Jun 17 17:58:01 ah ok Jun 17 17:58:02 thanks Jun 17 17:58:03 :) Jun 17 17:58:40 serviceconnection.disconnect() will never be called for local services ; btw Jun 17 17:58:47 only for remote Jun 17 17:58:59 right, and it's only called when an exception happens Jun 17 17:59:04 not when you unbind Jun 17 17:59:12 *exception -> remote service killed off Jun 17 17:59:12 ;) Jun 17 17:59:47 So, the only problem I have here is there is a very slight window in which the service reference is null between bind being called and onServiceConnected being called and the reference being set Jun 17 18:00:13 but that window is essentially trivial and even if it gets called twice, the reference will just point to the last callback so it's no problem? Jun 17 18:00:43 called twice ? Jun 17 18:01:03 if you are worried this is a situation for defensive programming, luckily its not Jun 17 18:02:34 only problem is, when you need to do something with the bound service in another lifecycle thing like onResume, you can't assume the service has been bound yet (or onActivityResult) Jun 17 18:03:05 hehe Jun 17 18:03:12 yeah that's the thing here Jun 17 18:03:41 i need to start the service in on create, do a callback in onPause to do something, but also do a callback in onResume to cancel the operation caused by the callback to onPause Jun 17 18:03:46 *from onPause Jun 17 18:04:04 nono, don't start in onCreate Jun 17 18:04:18 i start in oncreate, bind in on resume Jun 17 18:04:27 sounds messed up Jun 17 18:04:31 i need the service to be independent of the lifecycle of the activity Jun 17 18:04:43 if that is always the case, don't bind then Jun 17 18:04:49 just start it Jun 17 18:04:59 use a singleton or static to access it Jun 17 18:05:41 start it in oncreate, then access a singeleton in the service in onresume/onpause from the activity? Jun 17 18:05:49 they way i usually have it, is the service is bound in onStart. and the user may do something which puts it in 'foreground', so that startServices it Jun 17 18:06:18 always starting a service in onCreate seems bizarre! Jun 17 18:06:49 the situation is this (and please understand i do not like this situtation one bit but my boss won't let me do it otherwise, since I mentioned stupidly this might work and hes happy with it) Jun 17 18:06:58 we are running an executable from java runtime Jun 17 18:06:59 if its tied to the activity lifecycle like that , its broken by design Jun 17 18:07:13 that the activity communicates to (via http) Jun 17 18:07:29 I’m trying to use a FragmentPagerAdapter to show a few fragments but I don’t see them. It is being created because I know that OnCreateView is being called. What could I be doing wrong? Jun 17 18:08:26 i didn't want this executable to be running all the time, so i wrapped it with a remote service to retain a reference to the process that started it, so i can kill it. ie, oncreate -> start remote service and start running executable, onpause -> signal to terminte the process after a delay, onresume -> cancel the the termination signal Jun 17 18:09:25 hence i can't do like bind_auto_create cause it'll kill it (i guess i could do some kind of thread blocking in on destroy, but that seems worse) Jun 17 18:10:09 i would just use the Intent / startService stuff to send commands to the service, let it manage itself Jun 17 18:10:13 and i want this remote service to have background priority (so it is not likely to get killed and i don't lose the reference to the process, cause if that happens the executable will continue to live in its low level deamon process till the user restarts the phone) Jun 17 18:10:24 let it deliver results wehenever, its going to be async anyhow Jun 17 18:10:53 instead of using a messenger, can i just keep firing intents at the remote service? Jun 17 18:11:01 sure Jun 17 18:11:14 ahh which method is that? Jun 17 18:11:21 i mean, if you're sending 10s of intents per second that might be lame but Jun 17 18:11:25 oh if i use a broadcast reciever Jun 17 18:11:37 in the service, hmmm Jun 17 18:11:43 yeah that is a cleaner solution thanks Jun 17 18:12:04 keep all that stuff in your process unless you really really need to split it out Jun 17 18:12:07 (though this whole setup stinks in my opinion, i want to wrap the exe as an so with the ndk but they like to push push push) Jun 17 18:12:19 like, you need the app running all the time and want to shed memory by having the UI process die Jun 17 18:12:27 but thats more complicated Jun 17 18:12:44 so what is mdpi hdpi etc then? how do I provide different layouts for different screensize? i hear the displayMetrics is not reliable... Jun 17 18:12:54 you can use Intents, and then use a event bus - or I use a static field in the service which is a rxjava BehaviorSubject or something Jun 17 18:12:58 g00s: i wanted to split it because if I lose the process reference then the executable will continue to run indefinatly until the user restarts their phone retaining some 50 mb of ram endlessly Jun 17 18:13:21 ok sounds like you have a special case then Jun 17 18:13:34 yeah a profoundly bad special case but yeah ;p Jun 17 18:13:47 the intent idea is much cleaner than binding, thanks Jun 17 18:14:09 you can also communicate by content provider :) Jun 17 18:14:23 have that process stuff something in a provider, have the UI register a ContentObserver Jun 17 18:14:27 we are trying to minimize writes to disk... Jun 17 18:15:03 thanks for also clarifying how to handle that state from my previous question too, i really appreciate it! Jun 17 18:15:15 well, you have a lot of constraints & special cases i guess. i hope they were all carefully defined ;) Jun 17 18:15:41 can you use sw-600 for drawable folders, and does anyone do that? Jun 17 18:15:47 no not at all i am just doing my best to honor and respect the os as much as i can ;p Jun 17 18:25:45 any german developer around? need 5 seconds of your time Jun 17 18:29:50 I am German Jun 17 18:33:39 when it says newInstance here, does it mean that a new instance of the fragment is created every time getItem is called? http://stackoverflow.com/questions/18413309/how-to-implement-a-viewpager-with-different-fragments-layouts Jun 17 18:33:58 jamesson: If you ever get it working, let me know. Jun 17 18:34:07 marrrk: what, that example? Jun 17 18:34:14 A viewpager with fragments. Jun 17 18:34:24 I have been fighting with it for a few hours now. Jun 17 18:34:36 I am just not seeing the view of the Fragment. Jun 17 18:35:19 marrrk: but, what is the problem? I just need to understand how they did it. You have a view, you have a control element (the pager) you call the fragmenthandlerwhatever to switch fragments, hey presto Jun 17 18:35:29 and I’m also confused about this newInstance stuff. I don’t get why they don’t put these arguments directly into the respective constructors. Jun 17 18:35:51 I have a few files. Jun 17 18:35:58 marrrk: well, I am about to go read newinstance doc. It seems he wrong method Jun 17 18:36:17 marrrk: gimme like 5 min, maybe we can collaborate Jun 17 18:36:23 Would be nice. Jun 17 18:36:28 As far as I understand, with SWIG, C++ classes with virtual methods can be overridden in Java. I assume that's just one way, that Java classes can't be overridden in C++? Jun 17 18:36:51 marrrk, jamesson I've wondered too. I think maybe they go ahead and pass them in as a bundle to prep you for sending stuff out in a bundle in onSaveInstanceState, for handling config changes Jun 17 18:36:59 marrrk, jamesson but that is just a guess Jun 17 18:37:01 Ah I just read the last bit of that answer Jun 17 18:37:09 It’s about restoring instance states. Jun 17 18:37:27 From what jamesson sent: „This way if detached and re-attached the object state can be stored through the arguments. Much like Bundles attached to Intents.“ Jun 17 18:37:44 Good, but I have an empty constructor anyway. Jun 17 18:38:15 mattblang: I think that’s exactly it. Jun 17 18:38:34 But it doesn’t change the fact that my stupid layout is never seen. Jun 17 18:38:49 It’s down to one line now: „inflater.inflate(R.layout.test, container, false)“ Jun 17 18:38:59 marrrk: no, newInstance is the wrong method Jun 17 18:39:06 wrong method about what? Jun 17 18:39:07 marrrk: does it inflate? Jun 17 18:39:44 It inflates Jun 17 18:39:49 I just checked. Jun 17 18:39:50 marrrk: newInstance instantiates, it does not switch Jun 17 18:39:57 I know Jun 17 18:40:01 did you think it switched? Jun 17 18:40:38 marrrk: well, thats the way he seemed to be using it Jun 17 18:40:53 marrrk: re layout, did you try other xml? Jun 17 18:41:12 No, that’s the only xml I tried. But it renders fine in the preview, it’s super simple. Jun 17 18:41:33 marrrk: no, NEVER trust the preview. Learned the hard way Jun 17 18:41:37 I am also still confused about how the fragments are being cached but I guess that’s being handled by this FragmentManager. Jun 17 18:42:03 marrrk: no, once a fragment is made it exists until fragmentmanager destroys it Jun 17 18:42:15 fragmentmanager just switches things around Jun 17 18:42:20 And depending on what does the fragmentmanager destroy it? Jun 17 18:42:35 marrrk: program commands (calls to fragmentmanager) Jun 17 18:42:59 jamesson: Look at this layout file: https://gist.github.com/i-am-the-slime/726410f92de9469395ba Jun 17 18:43:27 marrrk: are you using tabs from the action bar? Jun 17 18:43:28 I think I might be missing something like I need to set the view that should be seen now Jun 17 18:43:31 marrrk: does eclipse complain about anything in it? Jun 17 18:43:36 Betray1st: no Jun 17 18:43:52 jamesson: I wouldn’t know Jun 17 18:44:08 But I sure would complain about eclipse, were I using it. Jun 17 18:44:22 Betray1st: Why are you asking? Jun 17 18:45:20 marrrk: I am in eclipse, and it takes care of xml errors for me like a boss. let me check your code Jun 17 18:46:36 jamesson: I can simplify the thing to be simply a match parent match parent frame layout with a green background,t oo Jun 17 18:47:49 marrrk: gimme a sec Jun 17 18:48:20 marrrk: just wondering how you implemented tabs to see if I could help Jun 17 18:48:33 I did not implement tabs Jun 17 18:48:45 I just want anything to display Jun 17 18:48:58 I just put everything into one single file, so you can have a look if you want Jun 17 18:49:38 https://gist.github.com/i-am-the-slime/1f0fe0771bed0fc762f6 Jun 17 18:50:03 dammit, now you went and jinxed my eclipse :/ Jun 17 18:50:14 www.i-hate-eclipse.com Jun 17 18:50:24 Oh Jun 17 18:50:25 no dashes Jun 17 18:50:30 www.ihateeclipse.com Jun 17 18:53:17 marrrk: bully for you. tell you what, let me go take care of some housework for like half an hour, in the meantime figure a way for us to share code that doesnt involve me installing source management. If you want to work together I need to get this all done asap, so whatever time you have we can do this. Only thing is I prefer pomodoro. Let me know, if you want I can give you my phone by email in case I run later Jun 17 18:54:07 Woah, I don’t know how long you were planning on fixing this because I will give up very soon and just actvities. Jun 17 18:54:55 just use* Jun 17 18:55:11 marrrk: no, this is the right way. It makes the code perfectly organized. If I do it any other way later I will get lost. And, there are plenty of examples plus I have reto mayer book Jun 17 18:55:31 should I use drawable-large, xlarge, etc or drawable-mdpi, hdpi,e tc Jun 17 18:55:43 mattblang: What for? Jun 17 18:56:00 marrrk some UI elements Jun 17 18:56:36 I like to use icon fonts instead of creating millions of icons and rsyncing them into millions of folders. Jun 17 18:57:20 So, yeah, if you do it the way Google prescribes, you should use drawable-… Jun 17 18:58:17 marrrk: this probably won't fix the issue but I think you need to call the base class constructor in the constructor of the JournalPagerAdapter class Jun 17 18:59:00 Betray1st: I think I am by doing FragmentPagerAdapter(fm) Jun 17 18:59:32 marrrk the problem is, ive got three versions of my icon. drawable-normal, large, and xlarge. but my app errors out on launch, and the ui editor in android studio says failed to convert into a drawable Jun 17 18:59:46 marrrk soon as I copy them over to just drawable it works Jun 17 18:59:51 marrrk: oops didn't see that Jun 17 19:00:17 mattblang: Strange Jun 17 19:00:42 mattblang: But as I said, I avoid that shit like the plague. Jun 17 19:01:28 Okay, now it’s Brazil - Mexico Jun 17 19:01:43 marrrk I wish that I could, but we have buttons that require an icon, so I have to provide drawables Jun 17 19:02:20 mattblang: just use an icon font. if your icons aren’t monochrome they probably look like shit anyway Jun 17 19:02:47 marrrk its not the text, it has a drawableLeft, my buttons Jun 17 19:09:23 http://romannurik.github.io/AndroidAssetStudio/index.html Jun 17 19:09:32 gen your icons in xxxhdpi Jun 17 19:09:41 then that'll auto gen the rest of them for you Jun 17 19:11:22 I have taken a pic with my cam and I want to keep the high resolution but make it smaller, what is the best way to compress the file? it gets huge when android uses it as background. Jun 17 19:18:37 you cannot Jun 17 19:18:47 memory size = WxHx4 Jun 17 19:18:56 only thing you can do is scale it down Jun 17 19:21:30 <_cypha> is there a way to delay the onPause/onDestroy of an activity by 2-3 seconds? Jun 17 19:21:55 <_cypha> I'm basically shutting down another thread asynchronously and in the meantime I don't want my activity to finish Jun 17 19:22:26 <_cypha> I could override the back/home buttons and instead of pausing the app I'd set a timer and exit it after some time Jun 17 19:22:40 <_cypha> but that's a bit of an ugly solution (?_) Jun 17 19:22:48 <_cypha> any suggestions? Jun 17 19:24:36 pfn: scale it down? cut out? or lower resolution? just take a pic with lower resolution in the first place? Jun 17 19:24:51 _cypha: you shouldnt do a timer if you are shutting down an async thread. Jun 17 19:25:18 <_cypha> not an async thread... just a normal one Jun 17 19:25:28 nvm, dont do it with timer Jun 17 19:25:43 man, what is the correct way to do a button with a drawable? it seems like no matter what I do the drawable looks like crap on my nexus5 Jun 17 19:25:58 <_cypha> I'm basically recording video/audio... and I want to allow it a couple of seconds to stop the recording when shutting down an activity Jun 17 19:26:07 override the buttons to make the thread shut down with a callback Jun 17 19:26:14 <_cypha> ok :) Jun 17 19:26:17 so that it shuts down once the thread is finished/stopped Jun 17 19:26:23 <_cypha> thanks danijoo Jun 17 19:26:33 because once you are unlucky and the thread does not close immediatly, you know... Jun 17 19:26:43 black holes, antimatter aniliation Jun 17 19:26:47 <_cypha> :) dem race conditions Jun 17 19:26:49 the typical stuff :) Jun 17 19:30:25 i don't understand how onResume works Jun 17 19:30:39 am i supposed to persist the activity myself? Jun 17 19:32:00 Nick-S: the things that don't persist when you say hit the Home button and come back Jun 17 19:32:35 shmooz: where do i put them? Jun 17 19:32:44 i thought about sharedPreferences Jun 17 19:32:46 Nick-S: you save what you need to save in onPause and restore in onResume Jun 17 19:33:11 shmooz: i could do the same onDestroy and onCreate, right? Jun 17 19:33:19 Nick-S: in my case I have to save the position of the video when it was playing and restart at that position when the user comes back Jun 17 19:33:20 if thats the kind of behavour i am after Jun 17 19:33:34 i just have one boolean value :) Jun 17 19:33:47 i though about putting it in SharedPreferences Jun 17 19:34:10 onDestroy and onCreate are different but yeah you could put stuff in there too Jun 17 19:34:31 first run your app and see what needs to be resumed Jun 17 19:35:08 when you go home and come back Jun 17 19:35:50 JakeWharton: Good blog post yesterday. Last year they dropped the Android Studio/Gradle bomb on us, wouldnt it be awesome if they did the same this year with an simulator? Altough i highly doubt it. Jun 17 19:37:04 shmooz: thing is that i have a service running too Jun 17 19:37:13 and when i start/resume my app i bind to it Jun 17 19:38:47 intellij ever existed, you could move to it before Jun 17 19:38:55 yes but gradle is new Jun 17 19:39:17 serrghi: yeah. they won't. Jun 17 19:39:26 does anybody uses mac os to compile ndk projects? Jun 17 19:40:09 JakeWharton: a boy can dream... Anyway now that Apple has released Swift, i really feel that Google needs to step up. They dont need to create a whole new language, just give us a damn simulator :P Jun 17 19:40:42 does drawables have to be png? saving a jpeg as png -> size explosion Jun 17 19:42:01 what's the best way to get the expected width of something with width 'match_parent'? Jun 17 19:45:29 view.measure Jun 17 19:50:41 miquito: no, you can use jpg Jun 17 19:50:51 shekibobo: get its parent's width Jun 17 19:53:10 JakeWharton: yeah, every time I try I get back '1' Jun 17 19:53:20 rootView.getWidth() #=> 1 Jun 17 19:53:37 has it been measured? Jun 17 19:54:01 I haven't measured it Jun 17 19:55:13 hi all Jun 17 19:56:24 I reinstalled OS (win 8), and needed to reinstall Android SDK as well (for Unity development). But it has been more than a year since I have done it, I stilll dont get what the difference between the ADT bundle (a .sip file) and the SDK installer...do they contain the same thing? Jun 17 19:56:58 getMeasuredWidth() => 0 Jun 17 19:57:22 How do I pass a result to an already running activity? Jun 17 19:57:54 I was using a LocalBroadcastReceiver before, but my next project won't allow for this Jun 17 19:58:15 it has to be done through a service, as well Jun 17 19:58:22 any ideas? Jun 17 19:59:57 benzap: depends on what the result is from, you could use a callback maybe? idk what you are doing Jun 17 20:01:19 I'm trying to get an image from a site that will as wide as the view it will be in, e.g. placehold.it style Jun 17 20:01:26 how might I do that with an android view? Jun 17 20:01:44 assuming I don't know the actual width ahead of time Jun 17 20:02:01 could just use picasso, and run the image fetching when you've drawn the layout Jun 17 20:02:18 you wait until it's measured Jun 17 20:03:57 does Android not like images that have a background color or something? I have two PNGs, one has a transparent background and is shown in the UI preview, but the one with a background color says Rendering problems Failed to convert. Jun 17 20:04:08 I'm building an AlertDialog with a NumberPicker inside it, after the creation of dialog and after the creation of NumberPick object, I set the dialog's view with NumberPick (dialog.setView(numberPickObject)). Jun 17 20:04:08 Everything works, but I can't see the classic arrow navigation of NumberPicker, why? Jun 17 20:04:20 JakeWharton: Do I have to .reset() ButterKnife for every kind of annotation or just the InjectViews one? Jun 17 20:04:29 i have no idea Jun 17 20:04:45 reset is implemented solely to fulfill a fragment contract Jun 17 20:04:52 and that contract is ambiguous at best Jun 17 20:04:59 And you don't use Fragments, got it. :p Jun 17 20:05:50 yeah. so... maybe? when we did use fragments we never used onDestroyView and never had a crash or problem related to it Jun 17 20:06:07 someone requested it and it was easy to add so I added it Jun 17 20:06:20 Neither did I use onDestroyView, I do now because of ButterKnife. Jun 17 20:06:24 SimonVT added it. Jun 17 20:06:25 kinda of a sideline question here, why dont you use fragments JakeWharton ? Jun 17 20:06:31 because they are terribru! Jun 17 20:06:49 900 callbacks, terrible API, opaque state machine Jun 17 20:06:55 nesting story is ridiculous Jun 17 20:06:58 This is the code for AlertDialog and NumberPicker -> http://pastebin.com/XCYC8CHt Jun 17 20:07:15 but nesting fragments is THE BEST Jun 17 20:07:31 there are so many reasons to hate them that I've forgotten some of them Jun 17 20:07:33 JakeWharton, DallasG nesting fragments... jesus christ that was a bad rabbit hole Jun 17 20:07:35 So if I don't .reset() and I don't get crashes I'll be ok? Or should I just be very afraind and override ondestroyview D: Jun 17 20:07:47 mattblang: but it shoudln't be Jun 17 20:07:50 Hm, i havent seen any of that trouble yet. I remember earlier fragments sucked ass, but i feel that theyve improved to a point where they are quite useful Jun 17 20:08:01 you nest views so why not nest controller-esque objects? Jun 17 20:08:14 DallasG, JakeWharton yeah, it is really sad, because switching out fragments was SOOOO much faster than launching new activities, but man I wasted a good week trying to refactor and said to hell with that Jun 17 20:08:38 we just use views and a library to manage a state machine Jun 17 20:08:50 hm, which library? something private? Jun 17 20:08:57 yeah Jun 17 20:08:58 was about to ask the same Jun 17 20:09:08 interesting Jun 17 20:09:15 sounds like a blog post JakeWharton :P Jun 17 20:09:16 i've been trying to generalize it but i'm not in any rush Jun 17 20:09:22 how do you handle master / detail tablet optimization type stuff Jun 17 20:09:26 What Jake uses is private, but Square released something that Jake ridicules ;p Jun 17 20:09:37 is it a private modification of Mortar or is it much different? Jun 17 20:09:50 mortar is for scopes, or something Jun 17 20:10:37 heh Jun 17 20:11:06 it solves some problem that i haven't run into yet. but that's not the one we released that tries to solve the view state machine problem Jun 17 20:11:20 hmm, so Flow? Jun 17 20:12:04 I went to Ray Ryan's (or Ryan Ray?) talk on Flow/Mortar in NYC last month — I was somewhat on the edge of my seat, but also recall there were some common corner cases where I felt it wasn't production ready (for me) Jun 17 20:13:17 so I'm still 'dealing with' Fragments for some things at this point — generally trying to use custom ViewGroups for encapsulating some things Jun 17 20:22:28 DallasG I came back to Android dev after a few years. we pumped our first coulpe versions out of the phone app pretty fast, but man, learning fragments and creating the tablet optimized version using fragments has not been the most pleasant experience Jun 17 20:22:53 yeah Jun 17 20:22:58 trust me, I know Jun 17 20:23:03 DallasG I felt a little better when I started realizing that I wasn't the only one that felt that way haha Jun 17 20:23:50 you're welcome! Jun 17 20:23:59 haha Jun 17 20:26:00 anyone have an idea why one png would show correctly in the ui preview, but another would give a rendering problem: failed to convert? Jun 17 20:42:59 wrong characters in the name of the png Jun 17 20:43:57 anyone wanna venture a guess as to why jquery would work on an android 2.3 deivce one minute and not the next? Jun 17 20:43:59 I need different layouts for different screensizes but people tell me not to do things based on screensize. But is that just meant using the actual screensize for calculating things? Is it safe to get screen size from displayMetrics and then decide what layout to use (then use LinearLayouts and such), I have heard getting screen size is broken though? Jun 17 20:44:57 miquito: http://developer.android.com/guide/practices/screens_support.html Jun 17 20:45:56 miquito: No it's not broken, and no you shouldn't manually figure out the screensizes yourself. Write different layouts for each screen size, put it in the right folder, and the system will figure out which layout it needs by itself Jun 17 20:46:21 jaspertheghost: what does not work entail Jun 17 20:46:30 the right folder being the mdpi , ldpi etc? Jun 17 20:47:08 View view = inflater.inflate( R.layout.game_setup_layout, container, false ); Jun 17 20:47:08 view.setBackgroundResource( R.drawable.pappas1_cut ); Jun 17 20:47:14 miquito: Table One on that page shows you all of your options, "Table 1. Configuration qualifiers that allow you to provide special resources for different screen configurations." Jun 17 20:47:59 for things like that I put one in each folder with the same name and the system will choose the right one? Jun 17 20:48:48 means i have a list view that was populating via .append()... and .listview("refresh") ... and now its not all of a sudden Jun 17 20:48:49 yep Jun 17 20:50:32 miquito: http://developer.android.com/guide/practices/screens_support.html#ConfigurationExamples Jun 17 20:50:34 and i have no way of debugging this Jun 17 20:51:00 neither do I Jun 17 20:51:51 document.getElementByID('job_list').innerHTML isnt working either Jun 17 20:58:50 man, it took me way longer than I care to admit to find out this existed, android:duplicateParentState="true" Jun 17 21:09:41 I'm using a GridView - when the user click on an item I display some options ( previously Invisible ) . The thing is when I scroll down those options appear on another item. Somehow I have to check the state of the clicked item if its on screen or not - how is this possible ? Jun 17 21:13:13 is the thing you're showing part of an item? Jun 17 21:13:39 yes Jun 17 21:13:50 if so, you can/should track the state of the given item inside of the adapter item itself and tell the View being displayed whether that thing is currently selected Jun 17 21:14:31 so for example if you have something like List for your adapter Jun 17 21:15:16 either change MyItem to have boolean isExpanded;, or make another wrapping class MyItemAdapterItem that has that field, and MyItem item; Jun 17 21:15:30 then affect the item when the view is clicked Jun 17 21:16:43 yeap thats one thing I can do - thnx DallasG Jun 17 21:16:56 sure Jun 17 21:17:17 can an adapter to a spinner no0t be set in xml? Jun 17 21:18:07 miquito, how you set an adapter in xml ? Jun 17 21:27:48 i know the elements beforehand, why cant i just set them in the spinner then? Jun 17 21:30:14 miquito: http://stackoverflow.com/questions/4029261/populating-spinner-directly-in-the-layout-xml Jun 17 21:35:29 Hi there, I was wondering if it was possible to generate a build.xml for an existing project in ADT? Jun 17 21:36:21 Trying to build from command line, figured i’d need a build.xml for ant Jun 17 21:38:23 hi Jun 17 21:38:35 how do i compile native projects for android Jun 17 21:38:48 what compiler should i use Jun 17 21:38:53 im using eclipse ide Jun 17 21:42:12 by native you mean in C code? If so then you want the NDK not the SDK Jun 17 21:42:50 https://developer.android.com/tools/sdk/ndk/index.html Jun 17 21:46:19 yiati, what gcc should i get cygwin or mingw Jun 17 21:48:36 linuxuz3r: Says right on the page https://developer.android.com/tools/sdk/ndk/index.html#Tools Jun 17 21:49:43 hi all. have some files in internal storage. have an index.html file that contains relative paths to said files in the same (or child) directory(ies). if i loadurl('file:///data/...../index.html'), the other files are not loaded. similar result if i loaddatawithbaseurl('file:///data/...', {contents of index.html}...). any thoughts? Jun 17 21:50:44 if i manually re-write all of the paths in the index file to be absolute (i.e., change /images/foo.png to file:///data/...../images/foo.png), works, but seems very brittle Jun 17 21:51:46 Euler: http://developer.android.com/reference/android/content/Context.html#getFilesDir() Jun 17 21:52:08 what did i miss Jun 17 21:52:24 yes, that is where the stuff is stored yiati Jun 17 21:53:30 Euler: Okay, so what now Jun 17 21:54:24 i have a many files in that directory Jun 17 21:54:36 one of them references others Jun 17 21:54:49 the others are not being loaded Jun 17 21:55:27 Why are they not being loaded Jun 17 21:55:46 that is what i would like to know :) Jun 17 21:56:05 Are you providing the correct location? Jun 17 21:56:19 afaik Jun 17 21:56:29 Are you getting a FileNotFoundException Jun 17 21:56:35 nope Jun 17 21:56:46 What are you getting? Jun 17 21:57:09 the index file loads fine in the webview, but none of the other files that it references are. Jun 17 21:57:57 Did you test for existence of the file object before you send it to the WebView Jun 17 21:58:15 yep Jun 17 21:58:21 http://docs.oracle.com/javase/7/docs/api/java/io/File.html#exists() Jun 17 21:58:29 i know the file exists Jun 17 21:58:32 And that returns true, and then you put it in the webview Jun 17 21:58:34 ? Jun 17 21:58:55 yes Jun 17 21:58:57 I know YOU know the file exists, but your File object also needs to know it exists as well :D Jun 17 21:59:00 Okay Jun 17 22:01:13 Well if it works when you hardcode the path then it definitely seems like it is having issues finding the file Jun 17 22:01:42 the non brittle way Jun 17 22:11:21 Is there an way way of finding a project name from the android command line tool? Jun 17 22:11:26 or suboproject names Jun 17 22:17:48 grep or sed Jun 17 22:18:12 where is the name stored? Jun 17 22:20:19 Ah I see it’s int he manifest, thanks! Jun 17 22:49:54 I've got an interesting bug for you guys. I have a service that at one point will call DevicePolicyManager.lockNow(). The service is started, and it binds/unbinds from the activity appropriately when the screen is locked manually or the home/back buttons are pressed. But, when calling lockNow(), it seems that the connection to the service is leaked. Jun 17 22:50:14 Anyone know if lockNow has any known issues related to this? Jun 17 22:59:07 I'm a newbie. How do you run a project in the Eclipse/ADT IDE? Jun 17 22:59:54 BWestOz There's a run button, looks like play :P Jun 17 23:00:28 and stop telling people you're a newbie ... else you'll be one forever ;) Jun 17 23:00:44 Fiki; thank you, Should I use the emulator 5444? Jun 17 23:02:02 capella; OK :). I'm just finding this to be the most frustrating IDE setup I've ever tried to use. I've reinstalled in twice and cannot get it to work Jun 17 23:02:21 I'm considering removing the lockNow functionality from my app completely because it seems buggy. As if it leaks an activity reference. Jun 17 23:02:59 BWestOz Probably yes :P Jun 17 23:03:01 bwestoz: try intelliJ: I much prefer it Jun 17 23:03:29 and it's the standard that Android Studio is based on Jun 17 23:03:38 Eclipse being old-school Jun 17 23:03:40 bwestoz also update it,and I'm having some trouble with the newest version too for some reason. Jun 17 23:05:02 What do you use to test apps? The VM's I've tried so far are so slow they're unusable Jun 17 23:05:25 BWestOz Umm a phone? Jun 17 23:06:42 Well, development is going to be very slow if I have to compile and transfer every small change to an android device. I built an app using unity which has an inbuilt testing vm. Is there no such thing for ANdroid dev? Jun 17 23:07:50 BWestOz Well use the IDE, but I don't know of many good Android emulators. Jun 17 23:08:24 BWestOz: Tried Genymotion? It's pretty speedy, but YMMV. Jun 17 23:08:28 Fiki; How do you build with the IDE? I can't even do that Jun 17 23:08:42 what's YMMV? Jun 17 23:08:53 Your monkeys may vary. Jun 17 23:09:28 or was it milage. :P Jun 17 23:09:54 where would i specifiy ant to compile with -source 7 and target 7? Jun 17 23:10:08 Well I guess I'll try android studio. The eclipse setup I've tried doesn't work Jun 17 23:11:10 BWestOz What doesn't work for you in Eclipse, I would suggest using it,cuz it's the easiest to keep up to date and I mean that's what Android recommends. Jun 17 23:12:19 Fiki; How can I build an ADK with it? Jun 17 23:12:37 i set java.target and java.source to "7" in ant.properties Jun 17 23:12:43 but i get invalid target release: "7" Jun 17 23:13:13 ah got it Jun 17 23:13:19 didn't need quotes Jun 17 23:14:09 Is it possible to build an ADK with the eclipse IDE/ADT and if so how? Jun 17 23:14:54 sorry apk Jun 17 23:15:00 bwestoz Accessory Development Kit? Jun 17 23:15:09 android package Jun 17 23:15:12 BWestOZ go to install new software through help/marketplace Jun 17 23:15:21 BWestOz Of course you can Jun 17 23:15:26 well how? Jun 17 23:15:48 BWestOz : HELP -> INSTALL NEW SOFTWARE (search for android) Jun 17 23:15:59 I have a hellow world and I'd like to build an apk Jun 17 23:16:02 bwestoz Project>Build All Jun 17 23:16:30 Fiki; thank you. It's greyed out for some reason Jun 17 23:16:59 BWestOz: I think you mean APK (not ADK) Jun 17 23:17:03 yes Jun 17 23:17:07 sorry Jun 17 23:18:15 BWestOz I don't know why you are having so much trouble, if you are able to run it, you will get an apk in your workspace Jun 17 23:19:18 the only way I can run it is by using the inbuilt VM, which is a pig to configure and takes about a year to start. So I figure the only way to use this thing is to build an apk and use some kind of vm outside the ide Jun 17 23:19:24 bwestoz in eclipse you can even choose which android device you want to run it on Jun 17 23:19:55 BWestOz, it shouldn't be that slow, at least not for me, I do not know what you are building :P Jun 17 23:20:25 Fiki; well it's a long story but I'll try to explain..... Jun 17 23:21:24 BWestOz Patience is a coders best friend :) Jun 17 23:21:58 ok dumb question Jun 17 23:22:12 but where do i get to the fragment main thing with the layout of the phone app? Jun 17 23:24:16 I have a book called Sam's Android Application Development which I intended to work thru. I installed the Eclipse/ADT bundle last week and did the first chapter, which is a hello world. When I ran the app by creating a galaxy/nexus VM it was horror slow. Someone suggested that I use the x86 setting and haxm in the VM...... Jun 17 23:24:25 To do this I had to run the SDK manager which installed a bunch of updates as well as those things. After this Eclipse spat out a ton of error messages and after fiddling around trying to fix it I gave up and reinstalled the IDE. Jun 17 23:25:15 Can you configure eclipse to use genymotion vm? Jun 17 23:26:07 it should show up as an adb device Jun 17 23:26:15 BWestOz I have a feeling that you are complicating things way too much, I don't get why it's so slow for you, by default it should work pretty normally. Jun 17 23:27:10 Fiki, well maybe it's some idiosyncrysy with my hardware of something. But I've never seen the inbuilt VM work at a usable speed on any computer Jun 17 23:27:13 BWestOz Not even to mention that a Hello World is laughably non intensive Jun 17 23:27:40 it takes about 3 or 4 minutes for the android vm to start Jun 17 23:27:48 BWestOz goto nearby walmart by virgin mobile kyrocera event for 25 bucks Jun 17 23:27:51 runs android 4.0 Jun 17 23:28:06 you don't need to activate it, 1000x better than an emulator Jun 17 23:28:37 lasserix Seriously for a hello world type application :P? Jun 17 23:28:46 yeah Jun 17 23:28:48 I have android devices. Are you saying it's better to transfer apks to an android device as part of developemnt process? that seems tedious to me Jun 17 23:28:53 a phone is about palpability Jun 17 23:29:03 BWestOz: ha Jun 17 23:29:05 yes Jun 17 23:29:07 very much so Jun 17 23:29:14 i updated android studio and now it says build tools 19.0.0 is too low. i raise to 19.1.0 and install the latest build tools and it says failed to find build tools 19.1 Jun 17 23:29:16 unless you are doing automated testing, and even then. Jun 17 23:29:28 emulator is very, very slow unless you have ram up the wazoo Jun 17 23:30:00 and the reality is development for devices is all about tangibility, there are a billions things you'll never realize that users will feel right off the bat because you've never actually "handled" your apps Jun 17 23:30:02 Just use Intel x86 as a build target, and it will not be that slow Jun 17 23:30:05 and no it's not tedius at all Jun 17 23:30:18 Every IDE I've ever used; MS Vis, Stud, Netwbeans, etc etc has a way of running a program within the ide. It seems silly to me not to be able to do that Jun 17 23:30:22 you plug in your device, make sure the drivers are installed, and press the same "Run" button Jun 17 23:30:38 yeah, and its slow. and this is for smart device development: not desktops. Jun 17 23:30:59 there is no moniter, keyboard, mouse pointer for 99% of devices Jun 17 23:31:04 first off BWestOz are you any good with java? Jun 17 23:31:33 I've done java, B Sc comp sci Jun 17 23:32:04 if you have android devices, use them: the only thing that's a pain is most devices don't come with a stand Jun 17 23:32:06 It's a mystery to me. Does the eclipse ide/adk work for any of the 7 billion people on the planet?!! Jun 17 23:32:11 yes, it works fine Jun 17 23:32:14 yes Jun 17 23:32:20 YES Jun 17 23:32:21 I don't know what crack you're smoking Jun 17 23:32:28 maybe you should give up on computers if you can't figure this out Jun 17 23:32:35 the emulator is slow. Jun 17 23:32:41 pfn That's flaming for no reason. Jun 17 23:33:11 I don't understand what you people call slow. It's not like you wait hours or something. Jun 17 23:33:30 the emulator isn't slow Jun 17 23:33:33 quit using the arm emulator Jun 17 23:33:36 #1 rule Jun 17 23:33:40 and install haxm Jun 17 23:33:50 yeah tried that. exactly the same Jun 17 23:33:59 doesn't that require vt-x? Jun 17 23:34:06 And if you consider it slow, then try rechecking your code more often before running anything :P Jun 17 23:34:16 good luck working through any book BWestOz, every thing is out of date the day it is released in android Jun 17 23:34:16 frankdrey it does,but most new Intels have it Jun 17 23:34:47 * frankdrey has always had prehistoric hw ;_; Jun 17 23:34:51 BWestOz, you didn't install haxm Jun 17 23:34:54 it is not exactly the same Jun 17 23:35:02 BWestOz, yeah its total bullshit, it never bloody works, a month of learning to get happy birthday to print Jun 17 23:35:35 dazpetty You have to have patience as a coder, and most of the time expect things not to work Jun 17 23:35:52 my SDK manager is showing haxm is installed Jun 17 23:36:08 BWestOz but are you using it? Jun 17 23:36:17 *oh well aparently the haxm emulator isn't slow. but, if you are learning to dev for phones, you should really deploy your development to phones otherwise you will miss a million little details. Jun 17 23:36:22 Fiki; maybe not! Jun 17 23:36:39 * BWestOz goes away to figure out if he is using haxm Jun 17 23:37:03 Ok everybody just calm down :D. lasserix ofc,but you do that when you have fixed the initial problems on the pc first? Jun 17 23:37:55 BWestOz First check what Intel cpu you have and if it supports VT-X Jun 17 23:38:53 any body got any ideas for a first app or two? Jun 17 23:39:31 daypetty First app as in Hello World :P? Jun 17 23:39:45 ye olde tip calculator? :) Jun 17 23:39:54 nah, a bit more than that, I'm studying maths at college Jun 17 23:39:59 so maybe I should do a maths program Jun 17 23:40:32 you could take my didjimp code and port it to android. It's nice and math-heavy :) Jun 17 23:40:33 how about a death clock? Jun 17 23:40:44 intel i5-2320 vt-x supported Jun 17 23:41:15 dazpetty https://projecteuler.net/ Jun 17 23:41:20 make a calculator that shows you what it is doing Jun 17 23:41:30 dazpetty However the website is down at the moment, but it has some great problems Jun 17 23:42:06 Fiki; My CPU supports VT-X. Do I need to switch it on somewhere in the IDE? Jun 17 23:42:07 ah Jun 17 23:43:31 BWestOz you will have to setup your target Jun 17 23:43:59 Fiki; thank you. Um, how do i do that?! Jun 17 23:45:56 BWestOz http://www.developer.com/ws/android/development-tools/haxm-speeds-up-the-android-emulator.html Jun 17 23:46:15 Fiki; thank you Jun 17 23:49:05 i updated android studio and now it says build tools 19.0.0 is too low. i raise to 19.1.0 and install the latest build tools and it says failed to find build tools 19.1 Jun 17 23:50:34 06-18 09:47:04.880: E/AndroidRuntime(12190): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.daz.mytestapp/com.daz.mytestapp.MainActivity}: java.lang.NullPointerException: Argument 'applicationId' cannot be null Jun 17 23:50:43 how can my applicateionId be null? Jun 17 23:51:32 I have this line Jun 17 23:51:45 and I have this in strings Jun 17 23:51:46 1434483843483180 Jun 17 23:53:46 Fiki; It says; "Download the x86 Atom System Image packages for the API levels you require" I've only installed API 19. Is it necessary to install for all the other API levels? Jun 17 23:53:46 ahh fack i had the value and the name the wrong way around Jun 17 23:53:53 and I'm not supposed to share that number either Jun 17 23:53:55 fack Jun 17 23:54:48 Doesn't matter, dazpetty Jun 17 23:55:11 people can extract the number. Jun 17 23:55:19 ah ok Jun 17 23:55:54 sorry, where is fragments.xml file Jun 17 23:56:07 nvm in layout Jun 17 23:56:08 soz Jun 17 23:56:38 I'm building an AlertDialog with a NumberPicker inside it, after the creation of dialog and after the creation of NumberPick object, I set the dialog's view with NumberPick (dialog.setView(numberPickObject)). Jun 17 23:56:42 Everything works, but I can't see the classic arrow navigation of NumberPicker, why? Jun 17 23:56:46 This is the code for AlertDialog and NumberPicker -> http://pastebin.com/XCYC8CHt Jun 17 23:57:12 Is it necessary to install the x86 Atom System Image packages for all the API levels? Jun 18 00:01:04 WooooooooooooooooooooO! FINALY Jun 18 00:01:08 fricken got a fb logon in my app Jun 18 00:01:15 I love everyone in this chatroom Jun 18 00:01:22 you are all, totally excellent Jun 18 00:01:29 ew, fb login Jun 18 00:01:33 that was a fun week Jun 18 00:01:42 i don't open that part of my code anymore Jun 18 00:01:44 so you went through it to hey? Jun 18 00:02:24 programmers especially seem to use the word "fun" to describe something horrible Jun 18 00:02:53 :D Jun 18 00:03:00 BWestOz Do what the guide says and don't ask questions :D Jun 18 00:03:21 * frankdrey just set up an ant "build server" Jun 18 00:03:23 dazpetty We like to torture ourselves with complexity :P Jun 18 00:03:25 Fiki; Yes Sir! Jun 18 00:03:32 aka a vm that has a script that spits out apks into cloud storage :P Jun 18 00:05:00 Fiki; I think I need to reboot and check the BIOS setting for VT-X Jun 18 00:05:36 BWestOz Do what you have to :D Jun 18 00:07:06 im trying to create an x86 AVD and the ok button is greayed out … the image is installed i have the option to select and i instaleld teh accelerator .. Jun 18 00:07:30 huh, why does the launcher have infinite recursion when examining its accessibilitynodeinfo tree? Jun 18 00:08:04 Because magic. Jun 18 00:08:10 actually now it wont let me click ok on anything ... Jun 18 00:08:31 rather, the accessibility tree is >124 levels deep and I'm getting a stack overflow Jun 18 00:08:36 doesn't make sense Jun 18 00:08:57 That seems sort of shallow for an overflow Jun 18 00:09:08 when i run `./gradlew runUnitTests`, it gives me "NoClassDefFoundError" for my latest test file. what might be the issue? Jun 18 00:09:14 Though I'm not sure what the stack size is for Dalvik/Android processes Jun 18 00:09:15 https://gist.github.com/michaeleiselsc/b9eef2abe6ee381b2055 Jun 18 00:10:17 well, accessibility tree shouldn't be that deep... Jun 18 00:11:24 and AccessibilityNodeInfo doesn't give any way of detecting cycles... can't use object identity, and windowId doesn't change Jun 18 00:12:56 Hey, does anyone have experience with Calendar stuff? Jun 18 00:14:21 any ideas? Jun 18 00:19:48 hi Jun 18 00:20:14 for compiling ndk should i use cygwin or minGW Jun 18 00:21:07 I would use a linux box, but that's just me. Jun 18 00:21:23 ok Jun 18 00:21:59 I'm on linux, seems to be popular among android dev Jun 18 00:22:00 s Jun 18 00:22:55 ok Jun 18 00:23:05 I'm trying to have the user add an event to the calendar, and then receive the information back. However, I'm not getting anything from startActivityForResult in my onActivityResult Jun 18 00:25:33 Fiki; Hoorah! thanks for that. It works. It's still very slow but at least it works Jun 18 00:27:20 nobody? Jun 18 00:28:43 The VM starts in under 30 seconds now. That's the first time I'm ever managed to get Eclipse/ADT useable Thanks all Jun 18 00:28:54 so how is one suppose to debug an android app in the emulat when the app opens up runs some JS from the webview and then comes crashing down with no error Jun 18 00:31:21 the joy of hybrid apps ;) Jun 18 00:44:50 Take a look at my code http://pastebin.com/v0EyPcsp Jun 18 00:44:58 for some reason there is a delay everytime I click the button Jun 18 00:45:01 and its kinda jerky Jun 18 00:45:17 from the moment I click the button to the moment the loader appears Jun 18 00:46:02 I think that the code must have been written by a jerk. It would explain why it is jerky. Jun 18 00:46:35 Fenny: very funny Jun 18 00:47:00 Does Google just not want us to do anything with the calendar? Jun 18 00:47:41 can someone help out please Jun 18 00:47:50 the code is supposed to appear a rotating loader Jun 18 00:47:53 after it is clicked Jun 18 00:47:54 but it doesnt Jun 18 00:48:09 I mean it does but its not exactly smooth Jun 18 00:52:43 so i had a jqeury listview that “was” working in android 2.2/2.3 and now all of a sudden it doesnt …. Jun 18 00:54:55 Can anyone help me out with this? JakeWharton do you think this could be an issue arrising from using ABS? http://stackoverflow.com/questions/24273652/finding-menuitem-is-returning-null-on-certain-devices Jun 18 01:01:16 for a parent class with a public method, how do you make that same method private in the child class? Jun 18 01:02:34 eh, i guess it's not possible since you could do Parent p = new Child(); p.someMethod(); Jun 18 01:18:05 uit Jun 18 01:34:40 Hey, if I have a group of images is there a way to view it with an existing app or do I need to make my own. Jun 18 01:38:52 ProjectBarks: what do you mean? Jun 18 01:39:53 Like if I want a viewer to show a bunch of images i have of a resturant. Do I need to make a tool so the user can then view and zoom into those photos like the gallery app or can I hook into something. Jun 18 01:39:57 Does that make sense? Jun 18 01:43:39 barbs: ? Jun 18 01:45:37 oh I see. I'm actually not sure if you can send them to an external app, but for viewing photos, you might want to look at the Gallery widget, or a ListView Jun 18 01:46:35 this might be helpful: https://github.com/sephiroth74/ImageViewZoom Jun 18 01:47:11 The gallary widget is depricated Jun 18 01:47:50 yeah, been a while since I used that. Try maybe a viewpager? Jun 18 01:49:18 good ol george hotz is at it again. Jun 18 01:49:34 rooting the android things. Jun 18 01:52:07 Can someone explain to me what the error "Hardcoded string "Button" should use @string resource" means? Jun 18 01:52:33 It is a warning. Jun 18 01:52:46 It means that the string should be in your resources. Jun 18 01:52:58 I.E. for later translation and localization. Jun 18 01:53:16 I don't understand Jun 18 01:54:00 warning - you'll learn if you need it later Jun 18 01:54:27 Well the program won't run and I'm trying to figure out why Jun 18 01:54:30 Android applications support multiple languages. It is a lot easier to translate a single strings xml file than to hunt down all the srings. Jun 18 01:54:41 That warning should not stop it from running. Jun 18 01:54:41 are you sure it wont run? Jun 18 01:54:50 heh that -^ Jun 18 01:55:21 Eclipse is trying to be helpful Jun 18 01:55:33 When I Run as Android App, the VM starts and then says "App has closed" Jun 18 01:55:42 poor eclipse. it tries so hard Jun 18 01:55:49 that can be any other thing as n=you self proclaim to be a newbie Jun 18 01:56:01 I'm hating eclipse so much right now Jun 18 01:56:08 barbs++ Jun 18 01:56:15 trying to build this app, I'm getting "GC overhead limit exceeded" Jun 18 01:56:17 FFFFFUUUUUUUU- Jun 18 01:56:35 You have an error in your program that is not a syntax error. I.E. it compiles. But something that is crashing in the application on runtime. Jun 18 01:57:12 Fenny, fair enough Jun 18 01:57:23 barbs oh my! but your app or eclipse ? Jun 18 01:57:49 Wait... is the VM dying? Jun 18 01:57:51 eclipse...it's not even getting to the part where it installs the app on the device Jun 18 01:58:10 ah, maybe give the jvm more heap then Jun 18 01:58:11 it's one of those ugly projects that has dependencies on other projects :( Jun 18 01:58:39 there's something screwy with the configuration...I think I'm just gonna wipe it and start again Jun 18 01:58:54 barms give java more memory/heap? Jun 18 01:59:00 garbage collectors on strike again ! Jun 18 01:59:08 it shouldn't need it...hasn't needed it in the past Jun 18 01:59:19 Same project? Jun 18 01:59:22 if you have lots of subprojects, maybe Jun 18 01:59:58 also java 7 has a better gc than java 6, not sure what you are running eclipse with Jun 18 02:01:53 So if I build my apk with java 7, it will run better on android because of the better GC? Jun 18 02:01:55 * JesusFreke ducks Jun 18 02:03:05 JesusFreke O.o o.O Jun 18 02:03:12 heheh Jun 18 02:03:22 sorry, couldn't resist :p Jun 18 02:03:23 barbs you can find a ton of articles about tuning eclipse Jun 18 02:04:32 g00s: I could. Or, it could just get out of my fucking way and let me code, like IntelliJ/Android Studio does. Jun 18 02:04:35 RAAAAAAAGGGGGEEE Jun 18 02:04:53 If I build my apk with java 8 will it run better on android because of the higher number?\ Jun 18 02:05:06 barbs its no different than intellij, they also have a file with vm options :) Jun 18 02:05:45 Fenny no Jun 18 02:06:11 lol Jun 18 02:07:38 so … i found a few bugs with my lumia 521, but they are all limited to the t-mobile add-ons Jun 18 02:07:49 what we really need to fear is an IDE programmers Don't hate on, that would something very insidious indeed. Jun 18 02:08:00 we all know … just get a device .. any device, where the carrier doesn't fuck with it Jun 18 02:08:08 they don't just mess up android :) Jun 18 02:08:18 the difference is, I don't need to delve that deep just to build an app >< Jun 18 02:08:50 lo Jun 18 02:10:06 I'm trying to investigate a bug in my app where it stays at the "tbro games" splash screen. Jun 18 02:10:17 I haven't been able to reproduce it but several of my users have Jun 18 02:10:18 I have been a programmer for 30+ years and not once, even in the early 80s can I remember a time when more than 2 programmers could agree on an editor. I suspect there is no general case solution to this. Jun 18 02:10:37 Could anyone test and let me know if they hit the bug or not and what version of android? Jun 18 02:10:39 https://play.google.com/store/apps/details?id=com.lvm.lavamonkey Jun 18 02:11:18 Carbonflux emacs of course Jun 18 02:11:26 :) Jun 18 02:14:45 carbonflux: sublime-text-3 of course Jun 18 02:15:23 carboxflux: I could mention ISP/F and you'd probably agree ;) Jun 18 02:15:58 or maybe 30+ years isnt enough to include mainframe Jun 18 02:16:42 only mainframe stuff I did was UNIX related, so VI :) Jun 18 02:17:30 hrm Jun 18 02:17:40 I do recall someone building a bootable version of emacs actually. Jun 18 02:18:23 what's the best way to record screen on andorid pre kitkat ? Jun 18 02:21:12 hdmi output into a recording device :( Jun 18 02:21:18 get another device and record it Jun 18 02:27:05 k thanks no one Jun 18 02:27:19 your asking a lot erebel55 :) Jun 18 02:27:39 lol it's at app startup Jun 18 02:27:47 take one second after installing the app Jun 18 02:27:56 which is a small filesize Jun 18 02:27:57 this is IRC after all, so testing some random app, from someone you don't know personally...;) Jun 18 02:28:31 wabz: thanks! Jun 18 02:29:15 its on the app store Jun 18 02:29:46 tho on the other hand I can understand how difficult is it to get stuff tested for an independent developer so I did feel some measure of guilt for not clicking on it Jun 18 02:30:00 :/ Jun 18 02:30:22 I feel more guilt now. Jun 18 02:35:26 oh well Jun 18 02:36:11 are there communities to help people test? Jun 18 02:36:37 i'm not sure Jun 18 02:38:55 Guys, Im having some issues with a Viewpager. I have 3 activities in the app: loader -> list -> quiz. On the quiz I have a viewpager. When I hit back button in the quiz, it closes the app. Jun 18 02:39:07 Honestly I am not at a place where I could test it, I just felt bad about not being able to help. Jun 18 02:40:25 It's alright Jun 18 02:40:31 :) Jun 18 02:41:08 Guys, Im having some issues with a Viewpager. I have 3 activities in the app: loader -> list -> quiz. On the quiz I have a viewpager. When I hit back button in the quiz, it closes the app if the load is noHistory. If it isn't, it jumps the parent activity (list) and shows the loader activity. Jun 18 02:41:12 Any idea why? Jun 18 02:42:36 the top level back button is set to exit Jun 18 02:42:56 I forget what the parameter is but iirc there is one Jun 18 02:43:46 Carbonflux: Dumb me copy-pasted code and didn't remove the "finish()" that had after creating the quiz activity :p Jun 18 02:43:55 ah :) Jun 18 02:45:38 Carbonflux don't feel bad :) Jun 18 02:45:48 i don't install anything on my device either :D Jun 18 02:45:53 except my stuff XD Jun 18 02:46:51 g00s, :) Jun 18 02:47:10 I know android is sandboxed and my device is not rooted but old habits, etc. Jun 18 02:47:11 there are testing services though, although i never used them Jun 18 02:47:29 I assume there would be because this is clearly a common problem Jun 18 02:47:34 also a meetup somewhere, people can swap devices maybe Jun 18 02:58:30 i propose this to replace java on android! http://www.animalnewyork.com/2014/arnoldc-arnold-schwarzenegger-programming-language/ **** ENDING LOGGING AT Wed Jun 18 02:59:58 2014