**** BEGIN LOGGING AT Sun Oct 14 03:00:03 2012 Oct 14 03:02:23 all the time? Oct 14 03:02:51 Drumer306_ all the time or sometimes? Oct 14 03:03:44 hey speaking sometimes, i think i figured it out, just calling finish() Oct 14 03:03:49 after starting the new activity Oct 14 03:04:11 yeah that'll pretty much do it Oct 14 03:04:16 but now I have a usability issue to think about.... Oct 14 03:04:47 I have a "main menu" going on, since I have multiple activities which are really seperate and all should be accessed from a main screen Oct 14 03:06:09 ok Oct 14 03:06:18 what's the usability issue? Oct 14 03:06:40 basically its a slide menu, like facebook , g+, so I can either put the menu on each Activity, so you can always go to another activity, so you would think to remove the previous activities, otherwise you could keep going back quite a few times Oct 14 03:07:02 hmmm Oct 14 03:07:07 but then consider how android UX is, and if I remove the previous activity Oct 14 03:07:16 you might think to press back twice to get the first scren Oct 14 03:07:29 but that would take you out of the app, if I remove the previous activity Oct 14 03:07:31 you can give activities aproperty in the manifest such that only one instance ofi t will live Oct 14 03:07:42 hmmm Oct 14 03:07:44 so if they revisit an existing activity it will pull it and put it back on the top of the back stack Oct 14 03:08:35 so consider the scenario Oct 14 03:08:45 android:launchMode=["multiple" | "singleTop" | Oct 14 03:09:08 "singleTask" | "singleInstance"]"singleTask" | "singleInstance"] Oct 14 03:09:09 you start at actvitity A , click a menu item that brings you to activity B, but then you want to go back to A Oct 14 03:09:25 then you hit back Oct 14 03:09:58 right, so that tells me I should NOT remove the previous activities Oct 14 03:10:09 because it conflicts with the normal android UX Oct 14 03:10:22 http://d.android.com/design Oct 14 03:10:39 but, if the user doesnt hit "back", your method will not create a new activity A Oct 14 03:10:48 but reuse the previous A and push it to the top of the stack Oct 14 03:11:01 pushing back doesn't create a new activity Oct 14 03:11:13 no I know Oct 14 03:11:15 it pops the current one off, and returns to the existing one, if the system hasn't killedi t Oct 14 03:11:20 but my menu would be on every activity Oct 14 03:11:33 so if you hit the menu for activity A, it starts a new activity Oct 14 03:11:41 go to one of the apps that uses it as you say Oct 14 03:11:45 n see what it does Oct 14 03:11:58 facebook seems to keep everything on the stack Oct 14 03:12:29 speakingcode: so if I put android:launchMode= singleTask Oct 14 03:12:37 that will reuse any previous activities Oct 14 03:12:41 and put them on the top of the stack Oct 14 03:12:49 or the beginning Oct 14 03:12:58 does this first activity actually work? http://developer.android.com/training/basics/firstapp/starting-activity.html because I've tried it and I fail to comprehend what edit_message is and how to get it to not show as an error, i've switched it for my textfield but that's not solved it, once I press my button my application freezes and quits.. Oct 14 03:13:17 on 4.0.4 Oct 14 03:14:58 edit message is an edittext you need to put in the layout.xml of the main activity Oct 14 03:15:24 I did use the correct id.. and all Oct 14 03:15:31 I followed everything it told me to do Oct 14 03:16:38 the first line starts _after completing the previous lesson_ which is a link to the lesson in which you create that edittext Oct 14 03:17:14 it has the complete layout file at the bottom Oct 14 03:17:22 oh alright I got it Oct 14 03:17:26 or at least I think I do, but I've already removed most of my stuff Oct 14 03:17:45 start from scratch Oct 14 03:18:07 ty Oct 14 03:18:27 speakingcode: thanks i will play with this Oct 14 03:19:04 hey sorry, yeah, singleTask or singleTop Oct 14 03:19:32 they behave similarly IIRC, singleTask will never start a new task (if for instance your activity is launched from another application, etc) Oct 14 03:20:11 speakingcode: yea, i think i just need to play with how this works, and have some android users test it Oct 14 03:20:22 to get a good application flow Oct 14 03:20:25 err sorry, singleInstance not singleTop* Oct 14 03:22:03 meh, reading through Oct 14 03:22:22 singletop will reuse if it's at top of stack, otherwise recreate if not. that may be best, i dunno' Oct 14 03:24:41 android was intended moreo r less for linear navigation. read d.android.com/design for insight on navigation patterns Oct 14 03:30:37 those sidebars are more weblike n i don't personally care for them. search online for how other people are implementing them Oct 14 03:31:44 Alright so I got another question, if I set an array for my listactivity, such as String time_array[] = { "MainActivity", "Never", "1 Day", "1 Week", "1 Month"}; clicking the first item will return me to the mainactivity/mainscreen again, obviously, however if I were to want to rename this to say.. 'Return' how would I do that? I imagine it requiring to rename the variable and setting it up.. Oct 14 03:32:32 umm Oct 14 03:32:49 how does mainactivity fit with never, 1 day, 1 week, 1 month? Oct 14 03:32:54 hi, I'm on indeed.com right now looking at job trends and the mobile jobs are just going up and up but a few other things are on the decline. I was just wondering, in the age of mobile how important are server-side languages? Do you guys personally ever have to deal with them or are they on the way out? Oct 14 03:33:06 right, exactly what i mean, it has no connection therefore I want to remove it Oct 14 03:33:28 I just got that from a tutorial where it mentioned it, and the other items aren't connected yet, so I need a backbutton Oct 14 03:33:32 which is the MainActivity Oct 14 03:33:40 man you are confusing me Oct 14 03:33:42 however I want to rename that to Return Oct 14 03:33:45 aw sorry :( Oct 14 03:33:52 what does a back button or Rturn have to do with your data set? Oct 14 03:34:16 gets me out of the listactivity and back onto the mainscreen Oct 14 03:34:16 whatever you're doing sounds horrible, no offense Oct 14 03:34:31 yeah, the back button usually takes care of that, no? Oct 14 03:34:36 ugh, I feel like I'm in a microsoft chatroom. Is my question too subjective for someone to answer? Oct 14 03:34:43 yeah, and clicking MainActivity does the same Oct 14 03:34:50 ok but Oct 14 03:34:51 since my main layout is called MainActivity Oct 14 03:34:56 if the back button takes them back Oct 14 03:35:01 and the user expects that Oct 14 03:35:09 I want to have 2 options, a Return item and a back button Oct 14 03:35:25 why would you put "mainactivity" in your data set of times and hack up some trick to have a list item to take them back, when the user already has a standard expected way to get back? Oct 14 03:35:47 * Streusel shrugs Oct 14 03:35:51 you're digging a hole and building a ladder to get out of it :-) Oct 14 03:36:02 well there's 1 ladder I want 2 :) Oct 14 03:36:11 eindoofus you're question isn't too subjective, it's just obvious Oct 14 03:36:32 most apps share data in some fashion with other people or services. how do you think that happens? through servers Oct 14 03:37:19 I guess I should rephrase my question. What server-side language do you guys typically enocounter Oct 14 03:37:47 PHP, ASP.NET, Ruby on Rails, Node.js, etc. Oct 14 03:37:48 php, java, javascript, c++, c#, perl, python Oct 14 03:37:58 asp, ruby, lisp, Oct 14 03:38:08 mysql :x ? Oct 14 03:38:21 not major but used and easy Oct 14 03:38:28 the general practice is to use langauge agnostic mechanisms to transfer data, so that client is not concerned with the implementation of the server Oct 14 03:38:31 everything then. is there any language/framework that is better tailored towards mobile apps? Oct 14 03:38:50 anything with an advantage in that arena? Oct 14 03:39:00 what are those mechanisms? SOAP & REST, primarily, which make use of xml, json, or jsonp typically Oct 14 03:39:16 but aren't limited to that Oct 14 03:39:27 you're confusing langauge with architecture. langauge is just language Oct 14 03:39:44 what architecture best supports mobile apps? Oct 14 03:40:11 mobiel apps are developed in java, objective c, python, scala, html5/javascript, lua, silverlight c#.... Oct 14 03:40:23 ugh Oct 14 03:40:26 ew objective c >< Oct 14 03:41:06 as a newbie I'm sick of being told, learn what you enjoy. Is there anything that is definitely growing at the moment that I can gamble on? Oct 14 03:41:20 are there frameworks better tailord for mobile apps? yes, mobile frameworks. android, xcode, blackberry sdk, jquery mobile, phonegap, appcelertor, kony... Oct 14 03:41:48 iphone apps obviously but the android market is growing as well.. blackberry I doubt they'll last long even with the new boost they'll soon get Oct 14 03:41:56 well, what mobile platforms are most popular? Oct 14 03:42:01 ios and android Oct 14 03:42:02 not that the iphone market is any better than android Oct 14 03:42:09 ios uses objective c. android uses java Oct 14 03:42:26 although I do believe it's iphone users that spend money quicker than android users, they think less Oct 14 03:42:37 is anyone using mono or html5/js for those platforms? Oct 14 03:42:42 mobile-optimized web-apps are developed in html5/javascript (front end) Oct 14 03:43:16 Streusel they spend more money _purchasing apps) Oct 14 03:43:19 so everyone is sticking to the native code for android and ios? Oct 14 03:43:27 no Oct 14 03:43:33 majority? Oct 14 03:43:42 i guess? Oct 14 03:43:57 not sure if that was a question or not : Oct 14 03:43:59 :s Oct 14 03:44:36 whats more in demand, android developers or ios developers? Oct 14 03:44:53 eindoofus: WP8 devs Oct 14 03:44:58 eindoofus if you want to be professional programmer, first yuo need to learn programming. doesn't matter what language, there are universal concepts that are present ni most languages/platforms in one way or another Oct 14 03:45:38 popular choices for beginners are python, php, javascript, ruby, java... you can pick any you want, tho Oct 14 03:45:42 both are high in demand eindoofus.. Oct 14 03:45:47 scheme! Oct 14 03:46:06 and second, if you want to be a professional programmer, expect to learn new langauges and platforms fairly regularly Oct 14 03:46:07 do either have less developers to jobs ratios? Oct 14 03:46:11 if you've never written towers of hanoi in brainfuck, frankly uou're just an amateur Oct 14 03:46:16 dude Oct 14 03:46:33 brainfuck? try whitespace Oct 14 03:46:44 whitespace? try perl Oct 14 03:46:51 how about asm Oct 14 03:47:16 eh, i wrote a perl compiler in brainfuck once that was pong when run as a whitespace program Oct 14 03:47:20 nah, perl is worse Oct 14 03:47:27 acually yeah Oct 14 03:47:33 towers of hanoi in asm isn't too bad really Oct 14 03:47:46 I'll throw out a logo interpreter in basic... anyway Oct 14 03:48:11 eindoofus i'll put it like this Oct 14 03:48:12 assembly isn't too much worse than c, you just make the same abstractions.. Oct 14 03:48:51 i'm a professional android developer, for about 1.5 years now- i got a couple of recrutiers reaching out to me from linked in for android dev jobs every week. people doing ios enjoy the same market, more or less Oct 14 03:49:24 if you're a good programmer, you'll get a job Oct 14 03:49:43 if you find your skillset isn't gettign you the gig you want, then its time to learn more skills. i think that's universal, no? Oct 14 03:49:53 ok, lets say I have an interest in Ruby/Rails but the world will eventually revolve around mobile. Assuming RoR is still around, where I fit into the world? Why would a RoR developer be needed? Oct 14 03:50:15 ...... Oct 14 03:50:16 sl;djgnsdnklsenl'sw Oct 14 03:50:27 It'll go mainly on mobile only for travel, it'll still be based on laptops due to the bigger screens.. Oct 14 03:50:37 lol Oct 14 03:50:42 eindoofus: you aren't gonna get the job if you say "I think I should do mobile because it's going to be important some day" Oct 14 03:50:42 Windows 8 could take off... Oct 14 03:50:51 people still want to see large images and not some on a 4inch screen.. Oct 14 03:50:58 "But wait, I actually would rather do ruby but" Oct 14 03:51:12 right Oct 14 03:51:15 fnord': that's not what I'm saying at all Oct 14 03:51:17 there's ruby on rails, and there's ruby. RoR is a web application framework Oct 14 03:51:27 eindoofus: actually it's like, exactly what you just said Oct 14 03:51:45 but whatever you say! :P Oct 14 03:51:46 also, server-side code is never going away Oct 14 03:51:55 speakingcode helps me? xD I wants 2 ladders :x Oct 14 03:52:02 but this is #android-dev, not #ruby-on-rails-for-my-career Oct 14 03:52:16 <_deXter_> lol Oct 14 03:53:24 hello Oct 14 03:53:29 ruby is a language. if you wanted to do mobile stuff in ruby... you could make a mobile optimized front end for yuo RoR-based site/web app, or you could build a framework for mobile development that uses Ruby, if there isn't one already Oct 14 03:53:48 pridian: why have you joined the channel twice? Oct 14 03:54:19 because my other nick is being used due to a disconnect on my end Oct 14 03:54:30 mobilei s a concept, not a langauge. it is a paradigm of computing based on user experiences optimized for small, portable devices and the supporting technologies. Oct 14 03:54:48 ./msg nickserv ghost nick pass (I'm prtty sure that's it. Oct 14 03:54:50 pridian: /msg nickserv ghost eindoofus will knock the other login off the network Oct 14 03:55:09 thanks Oct 14 03:56:12 lol Oct 14 03:56:23 this guy Oct 14 03:56:39 eindoofus: and then you could have just done /nick eindoofus to change the second login back to the first nick... but oh well Oct 14 03:56:53 oh, whoops Oct 14 03:57:17 stuessal man Oct 14 03:57:28 eindoofus: anyway, as far as anyone here knows, Android will entirely dominate the technology world by 2015, and there'll be no point learning anything else, ever Oct 14 03:57:59 Lol, well I hope that's the case. Not rooting for Apple or Microsoft. Oct 14 03:58:40 how are you mapping strings to activities? Oct 14 03:58:59 damnit, wrong window. damn terminal client Oct 14 03:59:38 I saw your answer about Ruby, but what will be the use of Rails web framework if mobile apps were to hypothetically dominate all apps out there? Oct 14 03:59:57 man Oct 14 03:59:57 if you have to ask that you should try at least learning RoR Oct 14 04:00:07 because it illustrates that you don't know it Oct 14 04:00:17 apps have backends... Oct 14 04:00:19 do you know why the www exists in the first place, and has web applications? Oct 14 04:00:35 eindoofus: stop and think for *just a minute* - do you think that mobile apps never need server-side support? Oct 14 04:00:55 do you know why there are different browsers? Oct 14 04:01:03 most of us here probably know a server side language and framework in addition to android and java Oct 14 04:01:18 fnord`: 'a'? Oct 14 04:01:18 not if they can send a packet to a service that has access to a database and can return db information Oct 14 04:01:24 Leeds: at least Oct 14 04:01:27 and have you ever thought about the fact that a website (more or less) looks the same on every computer you look at it on? Oct 14 04:01:36 do you think the website is coded for every device, every computer? Oct 14 04:02:28 In my hypothetical scenario I meant that native mobile apps dominate the market Oct 14 04:02:38 now, does your android app run on your iphone? does your iphone run on your android? no. Oct 14 04:02:48 the web will _always_ exist because it is cross platform Oct 14 04:02:55 because they are two different apps Oct 14 04:03:13 whether you view it on an android, an iphone, a google tv or a desktop, the web works. heh Oct 14 04:03:24 always impressed to see people who have more patience than I managing to hold it together to deal with idiotic questions Oct 14 04:03:42 Leeds i been on irc a long time :-D Oct 14 04:03:52 so have I... Oct 14 04:04:00 lol. good point hah Oct 14 04:04:12 perhaps my reasoning is flawed there. shrug Oct 14 04:04:14 speakingcode: your taking about front end stuff Oct 14 04:04:20 eindoofus: "native" apps still use backends written in server side languages. Oct 14 04:04:22 yeah, and? Oct 14 04:04:26 I Oct 14 04:04:33 I'm talking about the back end Oct 14 04:04:33 the backend for them is the same too Oct 14 04:04:36 ok? Oct 14 04:04:41 so what about it? Oct 14 04:04:47 you're going in circles man Oct 14 04:04:55 they adjust to the device it's displaying to? Oct 14 04:04:58 eindoofus: how about writing some code instead of doofing around asking whether it's worthwhile Oct 14 04:05:04 I thought that's handled by css Oct 14 04:05:04 it's definitely worthwhile Oct 14 04:05:06 trust me Oct 14 04:05:07 just do it Oct 14 04:05:35 www.codecademy.com eindoofus start there Oct 14 04:05:57 I prefer http://toiletcademy.com Oct 14 04:06:05 (yes, real site. SFW) Oct 14 04:06:20 go through the entire web track, then javascript. that will help you get some concrete grounding on how this stuff works Oct 14 04:06:48 Streusel so? what takes the string and says "this is an activity" Oct 14 04:06:51 fnord`: I can replace a toilet seat or a ballcock - good enough for me :) Oct 14 04:07:05 dmnit Oct 14 04:07:06 ;sdnfs;dknasdfk;jasejaf Oct 14 04:07:10 i'm being bombarded Oct 14 04:07:39 * Leeds throws dried lime skin at speakingcode Oct 14 04:07:53 i'm not sure what that does. but it smells nice Oct 14 04:08:07 (because for some reason, when I popped out to the supermarket earlier, they were drying lime skin in the street outside my place) Oct 14 04:08:22 does indeed smell nice :) Oct 14 04:08:29 probably some satanic ritual Oct 14 04:08:36 Chinese, but close enough Oct 14 04:08:57 quick question: i think my app is being slowed down by too many OnClickListeners, is there anything i can do to mitigate this? Oct 14 04:09:07 chinese for 'devil' is 'American', yeah? Oct 14 04:09:10 use only one, and ids? Oct 14 04:09:38 is that going to be faster? Oct 14 04:09:48 i guess i should take a look under the hood Oct 14 04:09:50 yes, because you'll create less objects. Oct 14 04:09:59 sampullman: any particular reason why you think it's onclicklisteners? Oct 14 04:10:02 I'm stuck in the 90s/early 2000 mindset of server-side, client-side crap and I have no idea what going on with mobile. It's frankly confusing the hell out of me. If someone could please break it down to just mobile app needs to authenticate a user so it communicate by doing an example mobileapp -> X -> X -> X -> Apache -> MySQL. I promise I'll shutup after that. Oct 14 04:10:15 eindoofus mobile is client Oct 14 04:10:16 yeah, but i wouldn't think ~40 objects would matter Oct 14 04:10:23 eindoofus: mobiles don't use X Oct 14 04:10:43 Leeds: nothing else makes sense Oct 14 04:10:44 X is ? Oct 14 04:10:55 I dunno what's going on at X Oct 14 04:11:09 or how many X's there are Oct 14 04:11:11 eindoofus: let me fill you in on 2012... I'm going to give you the only flow chart you'll ever need again Oct 14 04:11:11 X is the standard windowing system on Linux and other Unix(-alike) systems Oct 14 04:11:12 nm Oct 14 04:11:33 X11 to be more precise Oct 14 04:11:40 You <------oO(___THE CLOUD__)Oo Oct 14 04:11:54 forget apache, mysql, whatever you learned Oct 14 04:11:57 lol Oct 14 04:12:26 yes. eindoofus the standard practice is to talk to webservers through a language/platofrm agnostic api, typically based on the SOAP or REST protocols - REST muuch more common now adays Oct 14 04:12:34 and what technologies are connected to the cloud? Are we talking about stuff like Heroku and Amazon? Oct 14 04:12:46 the way it happens is the client hits a url Oct 14 04:13:02 So is something like RoR managing the REST? Oct 14 04:13:15 say... myserver.com/users/profile?id=eindoofus Oct 14 04:13:20 eindoofus: now you're getting trollish Oct 14 04:13:20 could be anything, heh Oct 14 04:14:10 so what happens? the client sends an HTTP request to that url. the server gets it, does whatever, and sends back an HTTP response with data - that data is _typically_ packaged as XML or JSON formatted, i.e. a long, pretty structured string Oct 14 04:14:14 so a server-side language/framework is in charge of the REST, right? and the ?id=eindoofus is the data being sent to rest? Oct 14 04:14:25 ehhh sorta Oct 14 04:14:30 close enough Oct 14 04:14:35 forget everything you know, because all that matters now is node and mongodb Oct 14 04:15:14 fnord`: are those seriously the frontrunners? why? Oct 14 04:15:15 I think we need to start a movement for server-side Android Oct 14 04:15:22 lol mongodb Oct 14 04:15:47 why lol? it seems to be growing like crazy for a reason Oct 14 04:16:00 it depends on how the webservice is implemented... sometimes data is sent via GET (i.e. ?id=eindoofus§ion=profile) Oct 14 04:16:11 sometimes it is sent as POST data in the HTTP request Oct 14 04:16:12 oh, mono Oct 14 04:16:16 nosql isn't all it's cracked up to be Oct 14 04:16:26 GET and POST are different things Oct 14 04:16:26 nosql is great at what it's great for Oct 14 04:16:34 nod they are Oct 14 04:16:35 but none of this is #android-dev, is it? Oct 14 04:18:08 but anyway, eindoofus you get the general idea. the idea is to use commmon protocols built on top of HTTP to communicate between client n server. so the client doesn't care what language, database, platform, framework, whatever the server uses. it only cares about the communication scheme, and any client from any platform can talk with the same web service Oct 14 04:18:18 yeah it's really not Oct 14 04:19:06 thank you guys for your help. I should probably leave and do some googling Oct 14 04:19:14 i'll say this eindoofus = it's the common approach. there ARE exceptions. Oct 14 04:19:32 as there always are in this field. lol Oct 14 04:19:41 take care Oct 14 04:19:53 mobile apps are typically client apps. some need no server at all... many do Oct 14 04:19:57 well damn Oct 14 04:20:01 we were finanlyl getting somewhere Oct 14 04:20:18 damn troll Oct 14 04:20:20 anybody know how many calls to gldrawelements (with ~50 verts each) i can reasonably make on a medium-high end phone? Oct 14 04:20:30 troll? you were probably just helping someone ungrateful Oct 14 04:20:34 while keeping >55 fps, i guess Oct 14 04:20:49 that's why I don't bleed my heart out for people anymore unless they show some initiative first. Oct 14 04:20:51 sorry sampullman i know nothing about gl Oct 14 04:21:04 triangles, triangles everywhere Oct 14 04:21:17 yeah. i want to be a teacher eventually, i have a bad habbit of trying to successfully explain Oct 14 04:21:44 that's why I prefer to contribute on stackoverflow, where I at least get rep points for helping noobs Oct 14 04:22:11 yeha i should do that more and abandon here. i can get rank on workforpie if i did more SO Oct 14 04:22:48 i dunno. SO is too uptight of a community tho, imo. this is a fairly lax IRC channel Oct 14 04:23:34 i hadn't used workforpie, about to see how much pie I have. Oct 14 04:24:58 ranks you by SO, github, bitbucket and hackernews currently. i'm not much established on any of those :-\ Oct 14 04:25:04 so i have a score of 1 Oct 14 04:28:46 It's not possible to give an activity more than 1 name, is it? Oct 14 04:28:52 (within the manifest) Oct 14 04:29:44 no Oct 14 04:29:46 not anywhere Oct 14 04:29:47 that. question. makes. no. sense. Oct 14 04:29:54 Leeds man.... you have no idea Oct 14 04:29:59 just...stay away Oct 14 04:30:06 speakingcode: I gave up yesterday Oct 14 04:30:37 here's a hint for you - if Streusel doesn't understand a question, his standard procedure is to make up an answer which he thinks sounds sensible Oct 14 04:31:02 speakingcode: so, my workforpie is 66 :) Oct 14 04:31:14 how does it not make sense..? Oct 14 04:31:43 nice fnord` Oct 14 04:32:14 I was simply asking if it was in any way possible to give an activity declared in the manifest to be given a second name as in android:name="Bla" android:name="Bla2" Oct 14 04:32:30 Streusel wtf would you want to do that for? Oct 14 04:32:32 well I forgot the . in front of each bla but still.. Oct 14 04:32:34 Streusel: and what would you expect that to *do*? What purpose would it serve? Oct 14 04:32:48 do you know what the . is? Oct 14 04:32:51 no, I forgot, I'm out Oct 14 04:33:11 black hole suuuuuun won't you cooooooome Oct 14 04:34:02 thank god for gregory isaacs Oct 14 04:34:12 If I assume correctly then it declares the activity, so if I were to use either .bla or .bla2 I would return to the same screen. And no I don't know what the . means, I assume it refers to the activity defined in the /src/ folder. Oct 14 04:34:32 well, it doesn't Oct 14 04:34:41 why?????? Oct 14 04:34:54 and yuo need to give up on this hacked up approach of mapping a string to activities. Oct 14 04:35:37 however you managed to map one string to an activity, duplicate it for the other string you want. but it's still a completely terrible approach. learn to program before trying to... program, heh Oct 14 04:36:10 :x Oct 14 04:36:22 That'll be my next move. Oct 14 04:36:28 I just wanted to clear that first Oct 14 04:36:46 k Oct 14 04:38:53 Leeds, for reference: Alright so I got another question, if I set an array for my listactivity, such as String time_array[] = { "MainActivity", "Never", "1 Oct 14 04:38:53 Day", "1 Week", "1 Month"}; clicking the first item will return me to the mainactivity/mainscreen again, obviously, however if I were to Oct 14 04:38:53 want to rename this to say.. 'Return' how would I do that? I imagine it requiring to rename the variable and setting it up.. Oct 14 04:39:49 yeah, I saw that Oct 14 04:39:54 ah Oct 14 04:40:08 i really tried, sigh Oct 14 04:40:14 Well I figured out that I can obviously say String Return = "MainActivity"; but that won't work, since even if I change the "MainActivity" to Return no quotations so it'll become a variable it'll still display "MainActivity" Oct 14 04:40:32 * speakingcode facepalms Oct 14 04:40:47 you need to learn some basics man Oct 14 04:40:51 no duh Oct 14 04:40:54 a wibble a flobble dibble dobble mabble. Fooble skring prlagn Oct 14 04:41:15 which makes just as much sense... Oct 14 04:41:16 you got that wrong, it's wibbly wobbly timey wimey Oct 14 04:41:19 Leeds, are you from china? Oct 14 04:41:33 speakingcode: nah, I just live here Oct 14 04:41:40 native, i mean. where from? Oct 14 04:42:01 from the UK, been living in Hong Kong for a few years now Oct 14 04:42:15 job took you there? how is it? Oct 14 04:42:45 a job brought me here, but didn't keep me - the job didn't work out, I stayed because I liked it, or at least preferred it to London Oct 14 04:42:53 i was born in HK Oct 14 04:42:55 cool Oct 14 04:43:05 i'd like to try out asia soon Oct 14 04:43:10 it's fun Oct 14 04:43:17 what do you prefer about HK to London? Oct 14 04:43:20 nevermind. changed my mind Oct 14 04:43:26 lol Oct 14 04:43:30 :-p Oct 14 04:43:40 couldn't care less, not living there anymore Oct 14 04:43:47 how is it? it's different - mostly cheaper than the UK, except property, good place to travel around South/East Asia, pretty easy with the post-colonial infrastructure, all official stuff bilingual Chinese/English Oct 14 04:44:03 not a great place to do software, unless you've got experience in banking Oct 14 04:44:14 ah Oct 14 04:44:17 singapore is the best place to start off from, flights are cheap Oct 14 04:44:23 food in HK is definetly better than london Oct 14 04:44:33 beijing man.. or sichuan Oct 14 04:44:35 mate from the UK just got a job in Singapore, moving out there in a few weeks Oct 14 04:44:40 could do western development remotely i suppose, shrug Oct 14 04:44:55 singapore is nice to visit, but I wouldn't want to live there - too small, too insular Oct 14 04:45:10 singapore is a bit boring Oct 14 04:45:14 true Oct 14 04:45:16 speakingcode: if you can get the work, that's a good plan - paying local taxes and living costs against western income level works well Oct 14 04:45:31 cool Oct 14 04:45:49 my ex-flatmate moved to Singapore, moved on again a couple of years later - but that was for a guy, mainly... a guy she'd met in HK Oct 14 04:45:57 i work for an international company, i probably _could_ , or use freelancer or somethnig, ifi wanted to Oct 14 04:46:06 dunno fi my fiancee would be so down tho, i dunno, maybe Oct 14 04:46:23 you can't just rock up and freelance - you need a visa (unless you are ethnic Chinese and/or have family connection to HK) Oct 14 04:46:38 ah yeah, there's always that Oct 14 04:46:55 I can go into the visa stuff, but... also not #android-dev :) Oct 14 04:46:56 i would probably be an off the grid type ; i suppose that can lead to trouble Oct 14 04:48:00 if by "off the grid" you mean illegal - yeah, don't do that Oct 14 04:48:27 right.. Oct 14 04:48:30 worst thing to do in china Oct 14 04:48:39 hk might not be as string but mainland is Oct 14 04:48:54 *strict Oct 14 04:49:06 actually, I'd imagine it's a lot easier to get away with on the mainland, as long as you pay the appropriate 'fees' Oct 14 04:49:12 nod Oct 14 04:49:21 i mean more like a passer through extended traveler Oct 14 04:49:43 you dont want to go off the grid in mainland china Oct 14 04:50:01 i dunno what dictates illegal there, i'm not experienced in int'l travel Oct 14 04:50:40 the short answer is: any sort of work, even including volunteer work, unless you have a visa for it Oct 14 04:51:34 if you're from the US it's not hard to get a year long multi-entry visa to mainland china. It limits the visit to 3 or 6 months or something, but I read you can take a day trip to Hong Kong or similar and that counts enough as an exit/entry to extend your stay. Oct 14 04:51:39 i think it would be hard to get a job. there are lots of very smart desperate people willing to work for peanuts Oct 14 04:51:57 whatyi f you work for a company based in another country, paid in that currency, paying taxes as a citizen in that country, and just buy chinese currency regularly Oct 14 04:52:19 you pay tax where you live Oct 14 04:52:34 speakingcode: you go to jail when they find out Oct 14 04:52:53 you pay tax where your mail goes and the money gets deposited ;-p Oct 14 04:53:08 sorry, i have a tendency to think fraudulently Oct 14 04:53:14 or if you're lucky, you get pulled up on a visa run, and given 14 days to leave the country for good, walking out on any sort of life you've built Oct 14 04:53:28 go for it. have fun seeing the inside of a chinese jail Oct 14 04:53:51 so if someone visits for say a week Oct 14 04:54:07 and they ask for papers, what is it? they see a dated passport n know you'veo nly been a few days n you're good? Oct 14 04:54:11 don't confuse China and HK - they are independent legal and immigration jurisdictions Oct 14 04:54:19 right.. Oct 14 04:54:41 need visa to get from hk to beijing and vice versa Oct 14 04:54:57 but if it's 24 months past due they might say hey wtf buddy, and you either bribe them or go to jail, more or less? Oct 14 04:54:58 also, I might mention again that this is #android-dev - if you want to meet me in #hk-immigration we can continue :) Oct 14 04:55:05 haha yeah Oct 14 04:55:07 back on topic Oct 14 04:55:20 android - no boundaries ;-) Oct 14 04:57:56 is there a method to drawPath on a vanvas starting at a given point? Oct 14 04:57:59 *canvas Oct 14 05:04:52 f2prateek: um..yes? Oct 14 05:04:59 it's the drawPath method Oct 14 05:06:00 here, look at moveTo: http://developer.android.com/reference/android/graphics/Path.html Oct 14 05:09:34 doesn't seem to work... Oct 14 05:10:55 if i use this method for a bitmap http://developer.android.com/reference/android/graphics/Canvas.html#drawBitmap(android.graphics.Bitmap, float, float, android.graphics.Paint), the reult lines up properly with the float values i give it, this one isn't drawing it at the coordinates i gave it Oct 14 05:11:47 i think for drawPath your paint has to have a stroke style and stroke width set? Oct 14 05:12:50 kevinb: it does. the path draws fine, but i'm having drouble positiong it on the canvas Oct 14 05:13:50 oh. no idea then sorry Oct 14 05:19:44 did you call moveTo(x, y) on the path before adding your contours? Oct 14 05:23:20 sampullman: i did it before, adding any points Oct 14 05:24:38 anyways i got it to work with a matrix, it still doesn't line up by just giving the coordinates, but works for values i got by trial and error Oct 14 05:25:34 if my app has several views setup for various tasks, is it best to have 1 activity for each view, or can several very different views share an activity? Oct 14 05:26:34 clever: hard to say without details, but I always think a good rule of thumb is that if you're completely redrawing the UI, that should maybe be a new activity Oct 14 05:27:29 Leeds: it would be a few different tasks, like login, selecting a target system, and various views to control it Oct 14 05:28:02 i would do differenct activities/fragments Oct 14 05:28:48 more simple screens > fewer complex ones, IMO Oct 14 05:28:56 how does the back button interact with having several activitys, or sharing 1 activity for many views? Oct 14 05:29:21 does back always just go back one activity?, or can the app intercept it and keep its own history stack? Oct 14 05:29:44 you can intercept it, but not really recommended in most cases. or well, not necessary Oct 14 05:29:49 you can intercept it - most of the time you probably shouldn't Oct 14 05:30:13 what happens by default then?, the os keeps a history of activity's ive been in? Oct 14 05:30:45 yes Oct 14 05:30:59 ah, so i will need seperate activitys if i want back to go back :) Oct 14 05:31:55 there is a stack. pressing back 'discards' the current one and pops the last off the top of the stack to view Oct 14 05:32:21 yep, makes sense Oct 14 05:32:40 if i tried to share 1 activity between many views, it would not push things into the stack Oct 14 05:32:48 so id loose functionality Oct 14 05:32:58 how do i get TableView to align a TextView to 1/3 and EditText to 2/3? Oct 14 05:33:39 hmmm, what happens if you define 2 activitys in the androidmanifest, both with the main/launcher filter? Oct 14 05:33:40 yeah you def shouldn't be putting them on 1 activity if you're redrawing that activity in that way, clever Oct 14 05:33:40 or should i be using GridLayout? Oct 14 05:33:42 TableLayout* Oct 14 05:33:47 would you get 2 icons to start the app from? Oct 14 05:33:55 clever they will both show on the user's phone Oct 14 05:33:57 yeah Oct 14 05:34:00 ah, nice Oct 14 05:34:10 so i can make 2 relates apps in a single apk :) Oct 14 05:34:32 nod Oct 14 05:35:21 and if it had no main/launcher, is there some kind of filter to make it run purely as a background service? Oct 14 05:35:45 yeah i think so Oct 14 05:36:00 part of it may need to run when the phone is in standby, to detect certain long async events, Oct 14 05:36:21 and give off a beep to let you know its done, sort of like the calendar events Oct 14 05:36:28 or a new message Oct 14 05:36:37 that i don't know about. sure it can be done, probably with broadcast receivers Oct 14 05:37:15 anything special to push events to the device, like apple has? Oct 14 05:37:27 gcm Oct 14 05:37:29 GCM Oct 14 05:37:33 ^^ Oct 14 05:37:36 * clever googles Oct 14 05:37:38 what he said Oct 14 05:37:57 yeah, GCM may work well for those async events Oct 14 05:38:05 so i dont have to hold my own tcp socket open 24/7 Oct 14 05:38:27 err yeah Oct 14 05:38:40 i can just do a call somewhere to enable it, when the app goes into the hidden state Oct 14 05:38:48 gcm basically provides that. taps into the connection to google the device always has Oct 14 05:39:05 yep, ive peeked at how apple does theirs with tcpdump Oct 14 05:39:12 one multiplexed connection to a central server Oct 14 05:39:21 less resources to open and maintain Oct 14 05:39:28 nod Oct 14 05:40:54 i'm guessing i have some way to print debug stuff to the logcat command from within the app Oct 14 05:41:01 is everything prefixed with the app name? Oct 14 05:41:03 i think yu don't even need a service. it'll call an intent and you justh andle that intent and get the payload Oct 14 05:41:17 Log class Oct 14 05:41:23 * fnord` facepalms Oct 14 05:41:27 yep, sounds sane, my app is using 0 ram until the GCM event comes in Oct 14 05:41:43 speakingcode: and the Log class prefixes every msg with my app name? Oct 14 05:42:01 the phone puts out a crap-load of garbage just under normal use, i will def need to grep for something Oct 14 05:42:04 yeah, it has a few methods. i (info), d (debug), e(error) etc Oct 14 05:42:21 they all take 2 strings - a tag and a message Oct 14 05:42:56 do you happen to know if firefox uses the Log class at all?, i havent been able to find the error console in it Oct 14 05:43:05 usually you create a string per activity/component, something like final String TAG = "suchandsuchactivity" Oct 14 05:43:20 clever: are you working in HTML5 and Javascript? Oct 14 05:43:21 ah Oct 14 05:43:35 Logcat will filter by application name Oct 14 05:43:41 fnord`: heavily, but i'm trying to write a pure java ui that takes full advantage of the android ui Oct 14 05:43:44 then within that you can filter by tag, etc Oct 14 05:43:53 I believe cordova will pipe your console.log messages through logcat for you. Oct 14 05:43:54 fnord`: so there will be 2 clients for the same API, html5/ajax and android Oct 14 05:44:09 ah, i'm trying to avoid js on the android itself Oct 14 05:44:21 I just don't understand this quesiton then Oct 14 05:44:27 01:42 < clever> do you happen to know if firefox uses the Log class at all?, i havent been able to find the error console in it Oct 14 05:44:37 that was a seperate app, writing a firefox extension Oct 14 05:44:58 android firefox has changed too much since i last checked it, the ext does nothing at all, and no errors Oct 14 05:45:21 i'll have to check logcat and see what it has Oct 14 05:46:24 ah, yeah, not sure what android firefox uses but probably logcat i would guess Oct 14 05:47:00 hmmm, and one last thing, my login process uses openid, so i'm thinking spawn www.example.com/android_login in a browser, and then when done, it calls example:// to call back into the app? Oct 14 05:48:04 not sure onthat one Oct 14 05:48:22 my login page simply redirects to another one (google, or many others) Oct 14 05:48:29 which may require full html and javascript Oct 14 05:48:58 and my ipod just sucks horribly at embeding browsers Oct 14 05:49:08 every app has its own embeded browser and its own cookies Oct 14 05:49:21 so i'm constantly having to login Oct 14 05:49:56 don't know much about that personally Oct 14 05:50:21 launching an external browser of the users choice would eliminate that problem from the start Oct 14 05:50:33 learn from the horid ui designs in other apps! Oct 14 05:52:40 any good site for learning java that one can suggest before I go looking any further? Oct 14 05:53:31 Streusel: http://docs.oracle.com/javase/tutorial/ Oct 14 05:53:38 hmm already got that Oct 14 05:53:48 hmmm, the docs mention that no code can run in the hidden state Oct 14 05:53:58 was hoping for something a bit cleaner Oct 14 05:54:00 does that include recieve callbacks for tcp sockets? Oct 14 05:54:27 clever: if you want stuff to run in the background, don't put it in an Activity Oct 14 05:54:50 but thanks anyways leeds Oct 14 05:55:01 Streusel: have you actually followed that tutorial? Oct 14 05:55:02 ah, so i'll need to handle that either thru a service or GCM? Oct 14 05:55:22 no, I was just looking around right now for a good clean site where I can start from Oct 14 05:55:24 clever: erm... what do you think GCM is? Oct 14 05:55:34 I just don't like the design of oracle w3 school did it so nicely Oct 14 05:55:45 and so did the android website Oct 14 05:55:48 Leeds: getting events from a remote server Oct 14 05:55:49 Streusel: go follow that tutorial, start to finish, don't stop because it doesn't tell you exactly what you want to hear right now... take some time, learn, come back when you've got a fucking clue Oct 14 05:56:06 Streusel: get the readability browser extension Oct 14 05:56:09 could say it in a nicer way D: Oct 14 05:56:21 I could say it in a much less nice way right now Oct 14 05:56:27 i can see how i would transition from a raw tcp socket to GCM, and limit the traffic to only whats needed Oct 14 05:56:41 clever: what do you think GCM delivers to? Oct 14 05:57:12 havent read the docs yet, but i'm guessing i post a message to a google server, and it forwards it to the device and calls something in my app Oct 14 05:57:26 how about going to read the docs rather than guessing? Oct 14 05:57:42 was still reading thru the activity lifecycle docs Oct 14 05:58:04 that too Oct 14 05:58:15 leeds doesn't like it when people guess, I'm assuming he's got a bad history with it.. Oct 14 05:58:39 Streusel: it's a fucking technical subject with fucking technical documentation - guessing makes you look like a fucking fool Oct 14 05:59:11 but not everybody is on your level of expertise Oct 14 05:59:31 how would i go about obtaining the value of a EditText with only the id of it? Oct 14 06:00:20 findViewById and go on from that? Oct 14 06:00:29 hey, how can i make WebView to scroll to the bottom? setScrollY()? with what value? Oct 14 06:00:32 EditZText et = (EditText) findViewById(R.id.itsId); et.getText.... Oct 14 06:00:51 speakingcode, ah thanks Oct 14 06:00:59 i got confused by some answers at http://stackoverflow.com/questions/4531396/get-value-of-a-edit-text-field Oct 14 06:01:30 Streusel: and you will improve your level of expertise by reading instructions and practicing Oct 14 06:01:47 yes I will which is what I'll be doing once my trash empties Oct 14 06:01:49 Leeds did you go to school for Comp Sci? Oct 14 06:01:56 speakingcode: yes Oct 14 06:02:03 likewise Oct 14 06:02:08 luckies.. Oct 14 06:02:13 catch my drist, Streusel Oct 14 06:02:17 drift* Oct 14 06:02:21 my intro year doesn't have it, only doing vb right now Oct 14 06:02:22 <_< Oct 14 06:02:27 I hope they'll cover it next year Oct 14 06:02:49 what program are you in? Oct 14 06:02:58 it's just cpsc intro Oct 14 06:03:13 right but what program are u in? Oct 14 06:03:16 we did gates & circuits, vb Oct 14 06:03:26 uhm Oct 14 06:03:32 interesting combination Oct 14 06:03:38 i.e. what degree/major? Oct 14 06:03:45 let me check it, forgot.. if it was studies or science Oct 14 06:03:50 too low-level to be much use, too high-level to be much use Oct 14 06:03:59 too useless to be much use Oct 14 06:04:23 you don't know what major you're in Streusel ? Oct 14 06:04:27 yes Oct 14 06:04:42 well what is it? Oct 14 06:04:44 speakingcode: seems about right Oct 14 06:05:05 NOW it all makes sense Oct 14 06:05:29 Streusel: what are you studying? Oct 14 06:05:34 gimme a min Oct 14 06:05:35 geez Oct 14 06:05:41 from what ive read so far in GCM, it fits with what i was guessing Oct 14 06:05:43 lmao Oct 14 06:05:46 are you looking up what course you're on? Oct 14 06:05:51 or trying to make up a reasonable guess? Oct 14 06:05:52 well I know the course name Oct 14 06:05:55 not the program name Oct 14 06:05:57 what is the course name? Oct 14 06:06:04 the course is computer science intro to computer science Oct 14 06:06:10 how do you not know your major? Oct 14 06:06:12 if everything goes well, the event would fire ~6 hours after using the app, but error conditions could come up early Oct 14 06:06:20 and you're just studying a single course? Oct 14 06:06:21 it's associate of science computer science Oct 14 06:06:31 and it's a certificate degree only Oct 14 06:06:38 since it's a college Oct 14 06:06:50 what country? Oct 14 06:07:01 canada Oct 14 06:07:13 canada, eh? Oct 14 06:07:16 juh Oct 14 06:07:21 sounds aboot right eh Oct 14 06:09:10 presumably you just started on the course a few weeks ago? Oct 14 06:09:18 uhm Oct 14 06:09:20 1 1/2 months Oct 14 06:09:40 what is a certificate a degree? Oct 14 06:09:47 actaully, nm Oct 14 06:09:48 i don't care Oct 14 06:09:51 rofl Oct 14 06:09:52 you don't know what a certificate is? Oct 14 06:09:57 are you from this planet? Oct 14 06:10:06 i've never heard "just a certificate degree" Oct 14 06:10:22 i've heard of certificates, and degrees Oct 14 06:10:28 yeah Oct 14 06:10:32 presumably it's a sub-bachelor's Oct 14 06:10:47 associates degree? shrug, that's still a degree in US Oct 14 06:10:53 and/or not accredited Oct 14 06:10:57 A.S. typically are given to people studying quickly for a job Oct 14 06:11:07 not intending to transfer to a 4 year Oct 14 06:11:09 o Oct 14 06:11:13 it allows me to after my studies transfer to uni and do 1 yr there then do my bachelor in that yr Oct 14 06:11:40 fair enough Oct 14 06:11:46 but this is an android channel and not a personal life inquiry ._. Oct 14 06:11:55 so it's an associate degree, which because it's canadian, isn't worth the paper they print it on. makes sense Oct 14 06:12:23 yeah you're right. anyway, my point is, it's a serious subject Oct 14 06:12:53 speakingcode, tried your code and got a NullPointerException despite id being specified correctly Oct 14 06:13:26 the people answering questions here have been typically reading and learning for years and years, many have studied in school for it for years. so dnt be surprised when yuo get answers like "you need to learn this" "you need to read that" Oct 14 06:13:44 I would usually in that sense say, show your code else it's hard to tell where the problem is, even if I don't know what it might be. Oct 14 06:13:45 It just helps. Oct 14 06:13:54 lack of knowledge isn't a sin Oct 14 06:14:03 inability to think is Oct 14 06:14:08 haha Oct 14 06:14:10 rofl Oct 14 06:14:20 unwillingness to learn Oct 14 06:14:38 you need to show some sign that you've tried to do something, tried to learn something, before asking people here to teach you Oct 14 06:14:39 problem might be over-thinknig. stop thinking, start reading Oct 14 06:14:41 i suppose i should give my code? lol Oct 14 06:14:48 wei2912 yeah Oct 14 06:14:55 ah well Oct 14 06:14:57 asking questions that illustrate you haven't even run the api demos is bad Oct 14 06:15:00 and if - for example - you don't know Java... the answer is to learn some Java, not to ask everything here Oct 14 06:15:04 let me do some commits to github first Oct 14 06:15:12 the snippet i gave you wasn't exact code, just an example, per se Oct 14 06:15:23 speakingcode, yup... thanks for that Oct 14 06:15:24 wei2912 just paste it on pastebin or gist , shrug Oct 14 06:15:40 http://upaste.me xD Oct 14 06:16:29 speakingcode, there you go: https://github.com/wei2912/SMStransfer Oct 14 06:17:19 ... Oct 14 06:17:26 it's not in there Oct 14 06:17:29 stuff you would probably require would be in layout xml file and wei2912.smstransfer.SMStransfer Oct 14 06:17:37 speakingcode, ah forgot... the commit will push soon :) Oct 14 06:17:45 okay here it is: https://github.com/wei2912/SMStransfer/blob/master/src/wei2912/smstransfer/SMStransfer.java Oct 14 06:18:01 and pardon the weird formatting Oct 14 06:18:18 damn tab size Oct 14 06:18:27 Leeds: looks like GCM is exactly what i was thinking it was Oct 14 06:18:36 all fairly simple stuff :) Oct 14 06:19:11 wjere is the NPE occuring? on line 49? Oct 14 06:19:37 speakingcode, line 15, sry for tht Oct 14 06:20:18 speakingcode, and filename_input is present at https://github.com/wei2912/SMStransfer/blob/master/res/layout/activity_smstransfer.xml line 13 Oct 14 06:20:53 uh, hmmm Oct 14 06:20:57 paste the NPE Oct 14 06:21:35 don't see why an NPE would occur there. it's compiling? Oct 14 06:21:41 speakingcode, yes Oct 14 06:21:55 wei2912: you can't call findViewById before setContentView( Oct 14 06:21:55 speakingcode, how do i copy log messages in logcat? lol Oct 14 06:22:03 fnord`, ah... thanks! Oct 14 06:22:08 ah yeah, there ya go Oct 14 06:22:49 and ofr reference wei2912 highlight them and hit ctrl+c Oct 14 06:23:03 rofl Oct 14 06:23:15 oh right, like you should be laughing Oct 14 06:23:19 ;-p Oct 14 06:23:31 are their any libs to handle socket.io within android's java?, or am i better off using bare tcp with json packets? Oct 14 06:23:58 speakingcode, fnord` thanks a lot for your help Oct 14 06:23:59 why not just use http + json? Oct 14 06:24:17 i think some common ones are included, lots of org.apache stuff Oct 14 06:24:18 :( Oct 14 06:24:23 fnord`: needs to be bi-directional Oct 14 06:24:24 you're on a device where the connection is going to constantly cut in and out Oct 14 06:24:52 fnord`: its performing tasks similar to VNC Oct 14 06:25:03 oh cool Oct 14 06:25:27 but rather then full graphics, i have proper android buttons for each action, with a view for each window on the remote end Oct 14 06:25:52 i must thank you all... from yesterday till today you've been helping me with my noobie questions and guiding me patiently Oct 14 06:26:00 so... i'll autojoin this channel :D Oct 14 06:26:02 uh oh Oct 14 06:26:15 I suddenly got the idea that I should make my whole desktop look like a gnex Oct 14 06:27:06 fnord`: the current plan is to use socket.io, websockets, or just raw tcp when the activity is live, and GCM for certain events when its not live Oct 14 06:27:12 clever: are you making a remote mouse app using RFB? Oct 14 06:27:36 I wrote some code to automate the mouse once in C using RFB Oct 14 06:27:37 more basic, its more like calling special functions in a greasemonkey script Oct 14 06:27:49 mouse/keyboard dont come into play at all Oct 14 06:27:50 hulu remote Oct 14 06:27:51 :P Oct 14 06:28:43 ive already got all of that working with a pure html5/javascript ui using socket.io, but i'm trying to make a matching android client fully in java Oct 14 06:28:54 I wouldn't use GCM if it was a situation requiring any sort of low latency or serious reliability. Oct 14 06:29:07 I'd go with the socket. Oct 14 06:29:21 the GCM part would be for an event that only fires after ~6 hours delay Oct 14 06:29:33 should i connect to the emulator with adb? Oct 14 06:29:35 just to let the user know the task is done Oct 14 06:29:38 yeah, it's good for that Oct 14 06:29:45 because, it can wake the phone up from sleep Oct 14 06:29:51 yep Oct 14 06:29:55 the socket would be to start the task and control the startup Oct 14 06:30:02 wei2912 no connect to it with a phone cord. rj45 cable Oct 14 06:30:04 then the phone goes to sleep and waits for GCM Oct 14 06:30:15 speakingcode, lol Oct 14 06:30:50 fnord`: just wondering what exactly i can use for that socket part, socket.io, websockets, or bare tcp sockets Oct 14 06:31:32 I don't know. I am only aware of your ability to use TCP. Oct 14 06:32:21 i'll have to play arround with a few things then Oct 14 06:32:25 when i get that far in the app Oct 14 06:42:12 hello what is the best way to load a jpeg from a file in the android NDK ? Oct 14 06:42:21 i know i can use libjpeg, wondering if there is someting better Oct 14 06:57:45 when making a 2d android game would it be wise to first get the whole game working with simple geometric shapes, and then add graphics? or add graphics while making the game Oct 14 06:58:25 my moto is - first make it work, then make it beautiful Oct 14 06:59:32 Sculptor, good one to follow Oct 14 06:59:39 thank you, and for physics lib, what do you use if anything? Oct 14 06:59:48 im thinking of using EminiPhysics Oct 14 07:01:48 i don't use physics libs Oct 14 07:02:54 Sculptor, oh Oct 14 07:03:02 may i inquire as to what types of games you have made? Oct 14 07:03:17 i'm thinking a platformer of sorts Oct 14 07:05:49 some simple 2d games, but not for android yet Oct 14 07:06:14 i want to make some widgets and live wallpapers Oct 14 07:13:25 how do i set the text of a EditText (not the hint) in the main activity? Oct 14 07:18:38 wei2912: please look up EditText on d.android.com Oct 14 07:18:53 if you really can't find it there, I'll tell you Oct 14 07:19:32 fnord`, ah i forgot to tell you my findings Oct 14 07:19:39 what's that? Oct 14 07:19:52 libjpeg-turbo anybody used it for the NDK ? Oct 14 07:19:55 fnord`, setText(CharSequence text, TextView.BufferType type) Sets the text that this TextView is to display (see setText(CharSequence)) and also sets whether it is stored in a styleable/spannable buffer and whether it is editable. Oct 14 07:20:10 with more research i attempted this: filename_input.setText(settings.getString("filename", "sms.txt"), TextView.BufferType.EDITABLE); Oct 14 07:20:24 and recieved a NullPointerException at line 65 (pushing a commit soon) Oct 14 07:21:19 http://developer.android.com/reference/android/widget/TextView.html#setText%28java.lang.CharSequence%29 Oct 14 07:22:47 edittext.setText("Hello"); Oct 14 07:23:36 fnord`, that's all? Oct 14 07:24:00 i think i figured out the source of the NPE... settings.getString("filename", "sms.txt"); Oct 14 07:25:59 ah.... Oct 14 07:26:18 fnord`, thanks anyway, i figured it out on my own. turns out it isnt the setText that is causing problems Oct 14 07:28:55 yeah that is all Oct 14 08:03:49 quick question. how do i update a widget that uses WidgetManager from inside an activity? Oct 14 09:03:44 so this silence means that weekend has arrived Oct 14 09:04:05 Or everyone is asleep Oct 14 09:04:11 It's 5am here Oct 14 09:05:20 <[deXter]> Or the weekend is over and we're preparing for Monday. It's 10PM sunday here. Oct 14 09:05:26 so, sleep = weekend Oct 14 09:05:31 i have a baby and less time to develop Oct 14 09:06:08 Monday, why does it even exist ;( Oct 14 09:06:36 the return of Monday Oct 14 09:06:37 because someone has to bring home the bacon Oct 14 09:07:51 hi guys Oct 14 09:08:57 hi dude Oct 14 09:14:08 is there any free/opensource breadcrumb library available? Oct 14 09:21:51 I'm developing an app and I want to support mutiple screen devices. I want to use a background image, so I need to know the screen size width and height for normal screen size Oct 14 09:22:55 You could fill parent both ways Oct 14 09:23:27 but what size I should use when I save the file on photshop? Oct 14 09:24:14 Depends on what devices your wanting. Oct 14 09:25:09 for normal size device Oct 14 09:26:38 there is no normal sized device Oct 14 09:29:30 Has anyone been to AnDevCon SFO ? Oct 14 09:29:34 how is it? Oct 14 09:58:11 Is it recommended to put file saving/loading operations (from internal storage) into an AsyncTask? I mean it has worked fluently on most devices until now but I've got messages that the app quits sometimes when saving on some devices... Oct 14 09:59:17 probably yes Oct 14 09:59:27 depending on the medium it saves on, it might be rather slow Oct 14 10:05:49 sonOfRa: ok thank you I will have a look at that... :) Oct 14 10:16:46 My camera.takePicture jpeg callback is not called until I release the camera (but it also isn't called if I release the camera too early), any ideas why? Oct 14 10:20:28 Even if I wait for a minute the callback is not called automagically, but as soon as I call camera.release() it is called (the image is complete, no parts missing because I'd abort too early or something) Oct 14 10:45:22 hi Oct 14 10:45:56 my app provides an account, which works fine everywhere except a few galaxy devices Oct 14 10:46:43 when trying to add the account there, this happens: http://pastie.org/private/9ttelwc5iblf3tg9xcopqg Oct 14 10:46:49 and the settings app crashes Oct 14 10:46:59 anyone know HTC up in hurr Oct 14 10:47:00 lol Oct 14 10:47:10 AccountSyncSettings.java doesn't even have 681 lines in the official android tree Oct 14 10:47:22 and I can't find the source for samsungs implementation Oct 14 10:47:24 any ideas? Oct 14 11:05:51 why can't you set margins for FrameLayout.LayoutParams that are applied to FrameLayouts within a RelativeLayout? Oct 14 11:06:58 gravity doesn't work either Oct 14 11:11:57 Because you need RelativeLayout.LayoutParams when the view is inside a RelativeLayout Oct 14 11:12:36 SimonVT: you've always been quite knowledgeable, do you have any idea what could cause my crash? Oct 14 11:15:48 SimonVT: that's what i was doing before, and it worked fine… but oddly, when i try to reset the params later on (to reposition things), i get an exception saying i'm trying to cast relative layout params to frame layout params… this is a scrollview i'm working with Oct 14 11:15:58 i'll try using getlayoutparams instead before updating Oct 14 11:26:54 Hey there I'm trying to include holoeverywhere in my maven build Oct 14 11:27:58 but can't find anything on its github project Oct 14 11:31:19 why does it let me set a scrollview's layout params once using LayoutParams, but if i do it a second time later on, i get a cast error b/c it's not FrameLayout.LayoutParams? Oct 14 11:32:24 What layout is your scrollview contained in Oct 14 11:32:30 relative layout Oct 14 11:33:16 Where are you using this scrollview? Oct 14 11:33:39 where? Oct 14 11:33:55 Is it a top level view in a fragment? Oct 14 11:33:56 where Oct 14 11:34:10 i have multiple scrollviews, each have the relative layout i'm subclassing as its parent Oct 14 11:34:24 Yeah, I can't make sense of what you're doing Oct 14 11:34:27 Pastebin some code Oct 14 11:34:31 i'm trying to resize/reposition them at runtime Oct 14 11:38:38 ok i figured it out Oct 14 11:38:52 i was working on the wrong scrollview… i forgot it's a child of another scrollview Oct 14 11:39:12 A scrollview in a scrollview? ;/ Oct 14 11:39:39 hi Oct 14 11:40:31 yep Oct 14 11:40:35 a 2d scrolling grid Oct 14 11:40:48 works great too until i want to resize the grid buttons, but i'm getting that worked out Oct 14 11:41:23 probably will need a more powerful tablet… i'm gonna find myself and older honeycomb tablet to test this… works slick on a n7 Oct 14 11:44:33 Hi, I'm trying to create arraylist of custom object and save /load it. What would be best advices and easiest way to do that? Oct 14 11:44:49 json Oct 14 11:44:52 xml Oct 14 11:44:53 sql Oct 14 11:44:58 flat file Oct 14 11:45:11 csv Oct 14 11:50:26 hi Oct 14 11:50:40 in an xml file, how can I set another xml as background ? Oct 14 11:50:51 or load an xml from another one Oct 14 12:20:10 Hi @all Oct 14 12:35:03 my app is a sync adapter that syncs high-res images (720 pixels on jelly bean) to rawcontacts Oct 14 12:35:11 this used to work just fine until a few days ago Oct 14 12:35:18 now it still syncs high-res-images Oct 14 12:35:25 but after a while they are replaced by low-res ones Oct 14 12:35:33 any idea what's going on and how I could fix it? Oct 14 13:00:58 in the docs to AsyncTask it says that with Donug AsyncTasks will be processed parallelly in a pool of threads, with Honeycomb this was changed back to a single thread so avoid errors that come through parallelization... Can i force somehow that on pre-Honeycomb devices AsyncTasks are also only executed on a single task and therefore be serialized? Oct 14 13:17:23 i need help here Oct 14 13:17:27 adb devices Oct 14 13:17:31 wont return anything Oct 14 13:17:37 although my n7 is connected to the usb port Oct 14 13:18:17 settings-> dev options -> usb debugging is on Oct 14 13:20:18 what OS? Oct 14 13:20:24 i've found the answer Oct 14 13:20:28 win7 x64 Oct 14 13:20:29 oh good Oct 14 13:20:46 i need to install ?!? galaxy nexus drivers Oct 14 13:23:10 problem solved Oct 14 13:23:14 thanks for your help, Leeds Oct 14 13:26:56 Is developing for Android outside of Eclipse a hassle? I'm an emacs user and would like to use that, but I'd like to take advantage of some of the features of the SDK. Oct 14 13:26:57 hello Oct 14 13:27:57 i'm rather familiar to Eclipse Oct 14 13:28:22 I'd like to avoid bloatware wherever possible. Oct 14 13:28:45 you can select only some features of the sdk and the android builds you're interested in Oct 14 13:29:09 i've a screen of that i think Oct 14 13:29:50 here it is Oct 14 13:29:54 https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-prn1/78004_4235144910825_1738970628_o.jpg Oct 14 13:30:04 you can manage the sdk features Oct 14 13:32:46 is anyone here familiar with Darkplaces engine ? Oct 14 13:33:10 it's quake 3 engine with enhanced network features Oct 14 13:34:13 isn't darkplaces a quake1 engine? Oct 14 13:35:40 anyone know of a tool for monitoring the intents being used by other apps in order to ensure your own apps intent filters are suitable? Oct 14 13:35:50 maraz it has quake 3 bs support Oct 14 13:35:56 i would have thought it should be possible to monitor them somehow Oct 14 13:36:09 scored, that does not make it a quake3 engine :) Oct 14 13:36:24 robb_www: use nagios and ip_cop Oct 14 13:36:29 thanks man Oct 14 13:36:34 np Oct 14 13:37:07 maraz, well, it's the engine of many forked quake games that look like more about quake 3 than quake 1 Oct 14 13:38:08 i'm not sure, and i may be mistaken, but, so far, i think it's Oct 14 13:38:34 scored, are those tools not for monitoring a server rather than the intents on an android device? Oct 14 13:38:38 scored: we could argue about this or yo ucould simply look at the homepage and see how the author says it's based on the quake engine. :) Oct 14 13:40:21 isecpartners have something called "IntentSniffer", seems applicable Oct 14 13:40:26 robb_www: it monitors hosts and services on any clients, so it should work, Oct 14 13:40:40 uNagi is nagios' android port Oct 14 13:40:49 robb_www: look for an app called "appxplore" Oct 14 13:40:56 maraz: my bad, i wasn't sure Oct 14 13:41:32 scored: and please... don't guess when you don't know Oct 14 13:43:45 np, Oct 14 13:45:01 maraz: here's the makefile of nexuiz, the game i'm willing to port http://gitorious.org/nexuiz/darkplaces/blobs/9b483e302a32f2e76f55dc2660e17d7f7c5e96cb/makefile Oct 14 13:46:33 in the makebuild.sh file, i'm dealing with the syntax to compile on another platform Oct 14 13:48:45 so i added another arch-var buildon nexandroidbuild nexuiz-linux-arm fteqcc-linux-arm Oct 14 13:49:38 all darkplaces dependencies are installed, but it fails compiling Oct 14 13:51:15 [bin-debug] Error 2 and [sv-debug] Error 2 Oct 14 13:51:54 Some things look bad, but I don't know what to do about it Oct 14 13:54:15 uh, isn't darkplaces coded in c, and android (dalvik) uses java? Oct 14 13:54:29 so isn't the makefile effectively moot? Oct 14 13:55:16 Leeds, thanks for the advice earlier, although it only really shows the intent filters rather than the intents being broadcast, having looked at http://www.mcafee.com/us/resources/white-papers/foundstone/wp-pen-testing-android-apps.pdf it seems IntentSniffer is the tool of choice for monitoring Oct 14 13:55:46 zmisc: ever heard of the NDK? Oct 14 13:55:52 yes, android uses dalvik java, that's why i use android ndk, that's the only way i found to port c++ apps Oct 14 13:56:21 Leeds: native development kit? Oct 14 13:56:27 yes Oct 14 13:56:37 So you can program with C/asm, etc now? Oct 14 13:56:49 there are ways to create C/C++ libraries for use with android (ndk), but those are compiled on a host machine, not on the device itself. Oct 14 13:56:58 where 'now' means 'for the past couple of years' Oct 14 13:56:59 Ah I wasn Oct 14 13:57:21 Dalvik/Java is still native, NDK is there for porting and performance-critical stuff Oct 14 13:57:46 Leeds: sorry I wasn't aware of the NDK, no need to be condescending Oct 14 13:57:55 fortunately, we don't have to translate all c+ apps in java, that'd be painful Oct 14 13:58:23 zmisc: you were the one who piped up to tell scored off Oct 14 13:58:48 I didn't tell him off, I asked a question. I wasn't aware of the NDK Oct 14 13:59:16 I shouldn't have assumed; I Oct 14 13:59:21 I'll give you that one Oct 14 13:59:58 Anyway, I'm glad I now know about the NDK (its nice to have that option) Oct 14 14:01:35 it's cool when it works :D actually i didn't manage to compile a working build yet, i followed quake compiling tutorial for android, tried to apply these methods onto git files i gathered Oct 14 14:05:35 so guys, any idea about how i can manage to solve my issues ? Oct 14 14:06:43 scored: I'm really interested in seeing how it turns out for you. Keep in touch with me (I want to play it :D) Oct 14 14:07:31 that'd be cool, where can i keep you updated ? :) Oct 14 14:08:06 are you regular on this channel ? Oct 14 14:28:35 Howdy Oct 14 14:28:49 I'm having trouble getting the USB driver for my HTC sensation to work Oct 14 14:28:59 I tried the google one Oct 14 14:29:06 I tried the htc sync one Oct 14 14:29:19 I tried the naked driver one, but it won't install the google or the htc sync one Oct 14 14:36:32 y'know, for a channel withy 647 people in it, you guys are awefully quiet Oct 14 14:38:04 my solution would be to not use windows Oct 14 14:38:12 but you probably don't want to hear that, so I didn't say Oct 14 14:39:10 Heh yea I could reboot Oct 14 14:39:23 But I'd like it to work on windows too y'know Oct 14 14:42:53 gah Oct 14 14:42:55 I'll reboot x_x Oct 14 14:43:00 dangit Oct 14 14:45:23 alrighty Oct 14 14:45:27 On linux Oct 14 14:45:29 Let's see... Oct 14 14:47:08 Dwarf: it's not quiet Oct 14 14:47:10 it's sunday Oct 14 14:47:13 ppl want to rest Oct 14 14:47:21 Heh Oct 14 14:47:32 I thought "hey, it's sunday, let's be productive" Oct 14 14:47:36 and often ppl come with really silly problems Oct 14 14:47:41 yeah Oct 14 14:47:43 Like mine huh Oct 14 14:47:46 so what.... Oct 14 14:48:02 wanna make open source navigation based on openstreet map ? :D Oct 14 14:48:10 Eh Oct 14 14:48:19 Well I am actually just starting android dev Oct 14 14:48:34 I should make some tool for databases... Oct 14 14:48:41 And windows gives me a big fuck you, so now I've rebooted, I can download everything again Oct 14 14:48:45 Install everything again Oct 14 14:48:50 Set everything up again Oct 14 14:49:00 it's XXI centaury and ORMlite doesnt have reverse engineering... Oct 14 14:49:04 And finally, when THAT's done, I can start fiddling with making some apps Oct 14 14:49:08 I havent seen windows.. in a while Oct 14 14:49:15 Good on you Oct 14 14:49:20 I wish I didn't have to Oct 14 14:49:20 I think so ;P Oct 14 14:49:27 so install linux ? Oct 14 14:49:33 I am on linux Oct 14 14:49:39 Dualbooted tho Oct 14 14:49:41 now I'm confused.. Oct 14 14:49:44 But my boss is an idiot Oct 14 14:49:50 And wants me to work with dreamweaver Oct 14 14:50:05 smells like php Oct 14 14:50:09 I wish Oct 14 14:50:13 If only! Oct 14 14:50:19 No, he wants me do to HTML and CSS Oct 14 14:50:28 he wants me to design with tables. TABLES! :( Oct 14 14:50:28 in dreamweaver ? Oct 14 14:50:32 Yea x_x Oct 14 14:50:35 I wish it was PHP Oct 14 14:50:37 thats... overkill Oct 14 14:50:43 This is the worst internship EVER. Oct 14 14:51:20 I came to this internship to expand my knowledge of PHP, but I'm designing emails instead ... Oct 14 14:51:52 oh damn Dwarf, i feel sorry for you, for real :( Oct 14 14:51:59 tables, dreamweaver, e-mail... Oct 14 14:52:05 Ikr ;_; Oct 14 14:52:11 Dwarf: do you know what's the shortest IT joke ? :D Oct 14 14:52:17 inb4 me. Oct 14 14:52:30 'php developer' Oct 14 14:52:40 mmme Oct 14 14:52:51 Well anything's better than html Oct 14 14:53:05 I've been doing that shit since I was 12, I don't need to learn it on an internship Oct 14 14:53:25 what country is your intership ? Oct 14 14:53:29 Netherlands Oct 14 14:53:41 I wouldn't complain if I got decent pay Oct 14 14:53:42 ah :D Oct 14 14:53:52 But 100euro per month for 40 hours a week..? Oct 14 14:53:56 ugh Oct 14 14:54:05 Well I'm done ranting I guess Oct 14 14:54:05 hmm Oct 14 14:54:08 shit happens :) Oct 14 14:54:15 You bet your ass it does Oct 14 14:54:24 naah Oct 14 14:54:34 I'm waiting for job interview results ;) Oct 14 14:54:38 Oh sweet Oct 14 14:54:42 Exiting Oct 14 14:57:22 I just need to go to work Oct 14 14:57:28 but hate waiting Oct 14 14:57:31 like everyone Oct 14 15:00:54 Why do people love to get rich? Oct 14 15:01:10 who ? Oct 14 15:01:21 Some people wanna get a highly paid job so they can get rich Oct 14 15:01:30 luyang: i prefere sex Oct 14 15:01:35 monsti: :) Oct 14 15:01:37 I'd rather get jon in japan :P Oct 14 15:01:38 you can have the money Oct 14 15:01:52 *job Oct 14 15:02:08 I think money is just one of the basic needs... So getting a lot of it and not getting the other things just cannot be worth it Oct 14 15:02:52 is it philosophy channel today ? ;P Oct 14 15:03:37 gorudonu: not necessarily... I just wonder why bother... http://bemorewithless.com/2010/the-story-of-the-mexican-fisherman/ Oct 14 15:05:05 Tim Ferriss talks about micro vacations throughout the life Oct 14 15:05:18 luyang: I just like programming... Oct 14 15:05:51 hmm Dwarf what school are you attending? Oct 14 15:05:52 gorudonu: I do too... I just find it very hard to actually get down to business and write code outside of working hours. Oct 14 15:06:11 and ride a bike :P Oct 14 15:06:13 and learn japanese Oct 14 15:06:17 ok Oct 14 15:06:19 gorudonu: I wanna have my own biz and be my own boss! Oct 14 15:06:20 enough of me Oct 14 15:06:29 I dont want to start me company Oct 14 15:06:36 I don't wanna have a boss Oct 14 15:06:37 *my Oct 14 15:06:40 luyang, stand in line Oct 14 15:06:42 I dont mind Oct 14 15:06:50 Sculptor: which line? :) Oct 14 15:06:53 I just want to write programs :P Oct 14 15:07:00 own biz line Oct 14 15:07:03 i mean, i want it too Oct 14 15:07:15 gorudonu: if you are your own boss you can write more programs and the programs you wanna write instead of the program your boss wants you to write =) Oct 14 15:07:31 luyang: have you ever tried ? Oct 14 15:07:38 if you are your own boss, you can slack off Oct 14 15:07:46 Sculptor: I see... Have you made any actual steps or just at the visualization stage too? Oct 14 15:08:05 gorudonu: no but I have been a consultant where I was basically on my own but was employed Oct 14 15:08:13 no, besites writing resignation emails and deleting them Oct 14 15:08:15 besides Oct 14 15:08:37 luyang: then you spend a lot of time with emails and with clients Oct 14 15:08:41 than programming Oct 14 15:08:49 Sculptor: yeah it'd be nice to have a quiet working environment as my own boss... more time to focus and less interruptions and more $$ and less waste Oct 14 15:09:04 gorudonu: that probably depends if you can outsource it Oct 14 15:09:11 atm i manage 14 people Oct 14 15:09:15 it's a mess Oct 14 15:09:20 working with people is the hardest Oct 14 15:09:48 so how profitable would developing android apps be? probably nice if you make them for others? Oct 14 15:10:40 gorudonu: I'm thinking of an online website which will be on multiple platforms... Like Evernote for example... But a certain kind of social network where people can connect via phones. Oct 14 15:11:10 Sculptor: the hardest thing with people is the added stress level for no good reason Oct 14 15:11:54 I liked my university studies which were so free and that felt great Oct 14 15:12:15 yeah. people, what a bunch of bastards Oct 14 15:12:25 :) Oct 14 15:12:40 quote from the it crowd Oct 14 15:12:50 Mikevin: probably quite nice Oct 14 15:12:58 if it comes for games Oct 14 15:13:09 I think it's an inherent social bug amongst human beings which causes misunderstandings, frustration, artificial behaviour and waste of time Oct 14 15:13:15 Sculptor: ^ Oct 14 15:13:39 gorudonu yeah the top list of apps is full of games with cheesy names. wouldn't expect them to be so popular Oct 14 15:13:48 luyang: maybe you have bad pointer and reading on memory ;P Oct 14 15:14:10 Sculptor: Like stupid meetings, artificial recommendations from architecture team, ... Oct 14 15:14:17 Mikevin: honestly I would like to make some game Oct 14 15:14:20 just for fun Oct 14 15:14:21 gorudonu: you bet =) Oct 14 15:14:52 luyang: next time be sure to set your unused pointers to 0 or null :P Oct 14 15:15:34 gorudonu: I think my problem is not with pointers but with concurrency and object visibility with women. Oct 14 15:15:57 gorudonu: I think my women don't understand the java memory model =) Oct 14 15:16:12 lack of synchronization Oct 14 15:17:25 Hello Oct 14 15:17:33 Hi Gaulois94 Oct 14 15:17:41 shoot Oct 14 15:18:06 Please, for the app ressources, how can I have ressources who don't change with the user language ? (sorry for my bad english) Oct 14 15:18:24 I create 2 folders : res/values-en and res/values-fr Oct 14 15:18:56 roc asa, Mikevin Oct 14 15:19:14 and I have also global values (common in bith language) Oct 14 15:19:20 both* Oct 14 15:19:26 (sorry for my bad english, I'm french) Oct 14 15:19:56 have you tried putting them in both the directories or just in the res/values directory? Oct 14 15:20:12 I don't want to copy this values Oct 14 15:20:27 Should I to create a res/values folder ? Oct 14 15:20:42 I think so but I'm not sure Oct 14 15:20:52 ok, I will test :) Oct 14 15:20:58 OK let me know Oct 14 15:25:42 It didn't work Oct 14 15:26:09 damn Oct 14 15:26:10 what happened Oct 14 15:26:51 http://sprunge.us/PaTV Oct 14 15:26:51 Gaulois94: you did it incorrectly Oct 14 15:27:11 It is my AndroidManifest.xml Oct 14 15:27:23 and I want to put a global project name Oct 14 15:27:55 perhaps it doesn't fall back to the default resource xml Oct 14 15:28:51 (with android:label option) Oct 14 15:29:13 And I put this resource in res/values/string.xml Oct 14 15:29:24 http://sprunge.us/ichi Oct 14 15:30:21 oups, I don't send the correct string's name x) Oct 14 15:30:29 Sorry, it build correctly Oct 14 15:30:48 i created a prototype of a upload class using AsyncLoader: http://pastebin.com/u0eCxHWc. But there are two errors: Line 33: setRetainInstance(true); and Line 87: getActivity(). Why do I have these errors? Am i doing something completly wrong? Oct 14 15:30:48 (It just a test, but it is important for after) Oct 14 15:31:28 sorry and thank you :) Oct 14 15:31:53 cliffer: Because those are Fragment methods Oct 14 15:34:33 SimonVT: so i have to create a separate class with type fragment and call this one from my upload class? Oct 14 15:35:55 I don't know what you're trying to do Oct 14 15:36:13 getActivity makes no sense when you're already in an activity Oct 14 15:36:17 So you can remove that.. Oct 14 15:36:27 And you shouldn't retain activities through configuration changes Oct 14 15:37:33 only fragments? Oct 14 15:39:31 so instead of having an Activity creating an AsyncLoader and displaying a progressDialog, my Activity should call a fragment with processDialog and AsyncLoader in it, which could then be retained Oct 14 15:40:07 do i understand your answers right? Oct 14 15:42:55 or do i simply exchange extends ActivityFragment with Fragment? Oct 14 15:44:56 Android needs more official activity Oct 14 15:45:20 The App Clinic is all good but more blogging, example apps, code analysis on youtube etc... Oct 14 15:46:46 Eh, I don't know.. I don't see why you need to retain anything Oct 14 15:50:07 SimonVT: i have a ProgressDialog which should be closed after AsyncTask finishs. the handler of the progressDialog should be retained, because while AsyncTask is running, an Orientation change could occur and recreate the activity (or fragment) Oct 14 15:57:36 So check if the loader is still running when that happens Oct 14 15:59:40 Is there a way to force AsyncTasks to be executed in serial mode instead of parallel with api level lover than 11? By default it's done using a pool of threads, but I would like it in serial mode... Oct 14 16:11:13 evident: you could 'chain' them together (start one in onPostExecute of other) Oct 14 16:11:34 this would require some extra logic and checking against api level Oct 14 16:13:09 probably not what you want to hear but you might want to use something else. Oct 14 16:14:58 sampullman: that would be an idea... I could create some kind of queue of AsyncTasks and onPostExecute() will then execute() the first in the queue... Oct 14 16:15:02 thank you Oct 14 16:15:24 Seems easier to implement your own AsyncTask like class Oct 14 16:15:36 fnord`: what else would you recommend if you say I should use something else? ;) Oct 14 16:15:51 Or, copy AsyncTask from the JB source and use that Oct 14 16:16:31 do i need to call super.onDestroyView for a fragment? (when overriding the method) Oct 14 16:21:54 is there a good tuto on creating/using a settings activity ? Oct 14 16:23:12 i did my own one, but it has some issue, mostly to send the updated values to the calling activities Oct 14 16:23:49 hi to all Oct 14 16:24:00 i want to ask a general question for mobile programming Oct 14 16:24:13 is that all apps writen in html and java script? Oct 14 16:24:52 no, absolutely not Oct 14 16:25:00 ok Oct 14 16:25:08 is there sdk in c++? Oct 14 16:25:32 sort of Oct 14 16:25:39 Leeds: i move my fist steps in mobile app programming, i am a java/phpWEB/C programmer Oct 14 16:25:43 Android's 'native' language is Java Oct 14 16:26:16 Leeds: o if i want my app work for android and ios and windows mobile and blackbarry i must learn 4 sdk? Oct 14 16:26:18 you can use c++ with ndk Oct 14 16:26:28 I make android games with c++ Oct 14 16:26:30 onebitxajax: you should, yes Oct 14 16:26:34 cross platform iOS / Android games Oct 14 16:26:37 ok Oct 14 16:26:45 QcMat_: how do you did that? Oct 14 16:26:53 cocos2d-x Oct 14 16:26:54 ndk? Oct 14 16:27:39 gogole it Oct 14 16:27:56 first result will give you all the info you need Oct 14 16:28:25 QcMat_: yes already google it, it's a good sdk Oct 14 16:28:38 what's a good sdk ? Oct 14 16:29:17 QcMat_: cocos2d-x it's a developer platform rigt? Oct 14 16:29:27 it's a library, not an SDK Oct 14 16:29:37 but yeah, it's a cross platform 2D game library Oct 14 16:29:45 ok Oct 14 16:29:48 it's based off cocos2d-iphone's code Oct 14 16:29:56 the objective-c version Oct 14 16:30:15 can i do apps for company with it? Oct 14 16:30:37 follow this tutorial and the tutorial it links to at the beginning (setting up ndk and such) http://www.raywenderlich.com/11283/cocos2d-x-for-ios-and-android-getting-started Oct 14 16:30:45 what's app for company ? Oct 14 16:30:49 like google maps location, interface it with web shopping ... ans so on Oct 14 16:30:54 I wouldnt suggest to use it to make a data driven app no Oct 14 16:31:01 definitely not Oct 14 16:31:05 ok Oct 14 16:31:20 to do app like that what can you suggest me? Oct 14 16:31:31 I have no idea, I have never done anything on android except this Oct 14 16:31:34 you should start with native android-sdk Oct 14 16:31:38 i'm an iOS dev that wants to expand my game's market Oct 14 16:31:44 with Java Oct 14 16:32:25 ok another question Oct 14 16:33:07 those web-based sdk dev that make cross platform app, our client must install a client on their mobiles? Oct 14 16:34:36 nope Oct 14 16:35:04 but if your only reason to do web-based app is that you don't know how to do native apps, I suggest you to learn Oct 14 16:35:33 because developing html5 app is really pain in the ass Oct 14 16:35:53 and getting the look and feel of native app is difficult Oct 14 16:38:23 vavirta: no i want to develop that kind of app Oct 14 16:38:31 and i want to know what is the best for it Oct 14 16:38:42 i thought doing it on web based sdk is better Oct 14 16:40:38 well good luck, I've used phonegap with one comercial project, and at first everything went pretty well Oct 14 16:40:55 phonegap is abominable Oct 14 16:41:04 sounds good in theory Oct 14 16:41:39 wait to deal with the differences in webkit versions after you tack on 3-4 javascript libraries just to make something that resembes a listview. Oct 14 16:41:41 but as the project progressed and codebase became more complex (as it always does) we started to experience problems Oct 14 16:41:58 and fnord` has the point Oct 14 16:42:14 if you want to make for example native-like scrolling, you'd need javascript library Oct 14 16:42:16 i've been asked to 'fix' phonegap projects like this Oct 14 16:42:19 and then enjoy your users screaming in pain from horribly slow shit Oct 14 16:42:32 if you want to make transform between views, you need a library Oct 14 16:42:34 of course my fix was native rewrite :P Oct 14 16:42:41 or worse, client demanding to reuse assets from iOS Oct 14 16:42:47 etc Oct 14 16:43:31 and ofcourse, huge difference between performance with zte blade and samsung s3 Oct 14 16:44:00 o_0 Oct 14 16:44:02 vavirta: ZTE Blade? Try Galaxy Spica (i5700) Oct 14 16:44:24 you got the point :P Oct 14 16:44:43 someone kill superlinux-hp Oct 14 16:44:50 and handling different screen sizes with css is much harder than handling them with native layout Oct 14 16:44:51 someone kill superlinux-hp Oct 14 16:45:00 someone kill supaduba Oct 14 16:45:10 wtf? Oct 14 16:45:10 * QcMat_ kills SupaDupa Oct 14 16:45:18 where's the banhammer! :P Oct 14 16:46:55 SupaDupa, cmon Oct 14 16:46:56 hello guys Oct 14 16:47:06 hello PatrickC Oct 14 16:48:47 ... Oct 14 16:49:27 you should should ignore joins and parts Oct 14 16:49:34 yea, /ignore ftw Oct 14 16:49:52 alright yay just ignore him Oct 14 16:49:59 he'll wonder why noone answers his questions later Oct 14 16:50:19 oh, someone is talking and I don't see them? That means they were already on my list Oct 14 16:50:19 i wouldn't answer any questions from an idiot like that Oct 14 16:50:21 someone ddos him Oct 14 16:50:28 morrildl, SanMehat, zhobbs, volmarias, kroot, KNY[laptop], michaelnovakjr, ctate, jt436, romainguy, Leeds: ping any of you guys? Oct 14 16:50:32 wtf is this shit Oct 14 16:50:47 pinging all the ops is not a good idea Oct 14 16:50:55 fnord`: well, one of them is bound to be on :P Oct 14 16:50:58 doesn't freenode support channel flags for preventing shit like this? Oct 14 16:51:08 Frigolit: they do, if there is an op around Oct 14 16:51:11 to redirect it Oct 14 16:51:24 PatrickC: can you paste me what I'm missing? I don't even see it because I have a killer /ignore list Oct 14 16:51:41 fnord`: SupaDupa is really spamming join/leave Oct 14 16:51:44 well, it should be applied to the channel :P Oct 14 16:51:46 like, several times every 10 seconds Oct 14 16:51:51 PatrickC: ah ha Oct 14 16:52:30 WTF? Oct 14 16:52:32 for irssi users: /ignore -channels #chan * JOINS PARTS QUITS NICKS Oct 14 16:52:42 lov: you around? Oct 14 16:52:59 something like that, anyway Oct 14 16:53:43 lol Oct 14 16:57:03 bored SupaDupa Oct 14 16:57:13 * lloir pokes romainguy Oct 14 17:02:36 did it stop?! Oct 14 17:02:43 :) Oct 14 17:02:52 my ddos attack works Oct 14 17:02:58 yeah right Oct 14 17:03:10 yes Oct 14 17:03:11 stopped Oct 14 17:03:14 see PatrickC Oct 14 17:03:20 :P Oct 14 17:03:21 lloir: i saw Oct 14 17:03:23 :P Oct 14 17:03:27 and saw what Freenode said haha Oct 14 17:03:31 ;) Oct 14 17:03:55 they have no room to argue with you if you know how irc works Oct 14 17:03:58 * lloir goes back to logcats Oct 14 17:04:04 have fun Oct 14 17:04:25 vavirta: QcMat_ fnord` so from where i msut start Oct 14 17:04:43 onebitxajax: you in jacksonville fl? Oct 14 17:04:47 i want to devolp apps that interactive with store locator and google maps Oct 14 17:04:54 PatrickC: :D Oct 14 17:05:02 I have no idea, told you earlier that I only do 2D games Oct 14 17:05:10 with c++ Oct 14 17:05:13 totally different thing Oct 14 17:05:22 ah ok sorry QcMat_ i didnt understand that Oct 14 17:05:25 onebitxajax: lived there for 14 years.. parents lived there for over 20 :) Oct 14 17:05:34 np, kinda understandable with the flood of join/quits :) Oct 14 17:05:45 PatrickC: where? O,O Oct 14 17:05:53 in Jacksonville, FL Oct 14 17:05:55 westside Oct 14 17:06:14 PatrickC: and you make apps for mobile there? X°°°°°D Oct 14 17:06:28 i didn't start making apps till i moved to TN Oct 14 17:06:39 PatrickC: i am far away from there . Oct 14 17:06:44 lol Oct 14 17:06:49 what part of jax you live in? Oct 14 17:06:51 PatrickC: TN = toronto :D? Oct 14 17:06:57 Tennessee ;) Oct 14 17:07:00 Nashville area Oct 14 17:07:03 aaaah Oct 14 17:07:12 PatrickC: i am from europe :D Oct 14 17:07:32 so where do you live now? europe/florida? :P Oct 14 17:07:35 PatrickC: in the house of mafia <-------- this help you discover where i am from Oct 14 17:07:45 lol Oct 14 17:07:46 onebitxajax: http://developer.android.com/about/start.html Oct 14 17:07:47 :) Oct 14 17:07:53 argh not where i am from but from where i am talk Oct 14 17:08:02 vavirta: lool ok Oct 14 17:08:12 There are about 11 users on Eclair (2.1), who have been using my latest app version. Lol, I feel bad but I think I'm dropping support for them :-) (That's less than 0.5%) Oct 14 17:09:02 PatrickC: to tell where i am from i must say , "were 100 people die every day" Oct 14 17:09:02 onebitxajax: and if you are into books, I've found this to be really good read Oct 14 17:09:05 http://www.amazon.com/Professional-Android-Application-Development-Guides/dp/1118102274 Oct 14 17:09:14 on earth? :P Oct 14 17:09:35 who's watching the jump Oct 14 17:09:42 vavirta: oooook l'ets start Oct 14 17:09:42 trying to Oct 14 17:09:44 not loading Sculptor Oct 14 17:09:46 o/ Oct 14 17:09:49 hi people. i have a few questions about how to architect my app demo. i need to have two screens: 1) android widget 2) full-screen front-end (probably html5 / css3 / jquery). i want pressing a button on the widget to send a signal to the full-screen front-end, and vice versa. i've been looking at websockets to handle the communication. does this sound reasonable? Oct 14 17:09:50 o/ Oct 14 17:09:54 not loading? Oct 14 17:10:03 i can't rely on internet access, so can't use any google cloud functionality Oct 14 17:10:08 https://www.youtube.com/watch?v=MrIxH6DToXQ#! Oct 14 17:10:13 PatrickC: vavirta i will put this chan in autojoin :D Oct 14 17:10:14 Sculptor: me Oct 14 17:10:27 93k ft. Oct 14 17:10:29 good Oct 14 17:10:38 What situations would cause a runnable post()'ed to a View to not actually execute? http://pastie.org/private/yvrpvkqtd8wuengeedegdg Oct 14 17:10:58 kbs, app crashes? Oct 14 17:11:03 The log shows the runnable being posted, but the subsequent run() method never logs the message Oct 14 17:11:18 kbs: not posted to a View, it's posted to the EventQueue on your main thread Oct 14 17:11:54 kbs, use Handler Oct 14 17:11:58 mrenouf: good points. No crash, however; and run() never logs Oct 14 17:12:09 mHandler.post(new Runnable(... Oct 14 17:12:20 kbs, call runOnUiThread ? Oct 14 17:12:57 I'll try the alternatives, but none of this explains the behaviour -- what's the possible cause? Oct 14 17:13:49 not sure, but you can also watch the system log: adb logcat -p events Oct 14 17:14:10 er, -b events Oct 14 17:14:29 and set it to Verbose Oct 14 17:17:07 adb logcat -b events -s '*:v' doesn't reveal anything exciting Oct 14 17:17:15 and set it to Verbose, and log system too: adb -d logcat -b system -b events -b system "*:V" Oct 14 17:17:42 is that possibile Netbeans and ANdroid SDK, i hate eclipse Oct 14 17:17:42 I guess it's mostly intents Oct 14 17:17:44 :D Oct 14 17:22:15 I wonder if events are silently discarded if the specified view is not yet attached to its window Oct 14 17:22:29 or, runnables at least Oct 14 17:22:54 yes Oct 14 17:23:05 hi people. i have a few questions about how to architect my app demo. i need to have two screens: 1) android widget 2) full-screen front-end (probably html5 / css3 / jquery). i want pressing a button on the widget to send a signal to the full-screen front-end, and vice versa. i've been looking at websockets to handle the communication. does this sound reasonable? Oct 14 17:23:14 cause it has no context, and no looper to post to Oct 14 17:23:58 antgel, "full screen front end" as in a WebView activity *in* the app? Oct 14 17:24:22 or some web app elsewhere? Oct 14 17:24:33 mrenouf: no, the full screen front end runs on an entirely different machine Oct 14 17:24:38 mrenouf: the latter :) Oct 14 17:25:04 sorry, i'm new to this, it might take a while before i get the jargon bang-on Oct 14 17:25:44 antgel, use the widget to post an event to the server, and use some push mechanism in web app. websockets would work great Oct 14 17:26:25 especially for just a demo, unsure of adoption percentage of websockets these days (I only really follow android) Oct 14 17:27:08 mrenouf: okay, so i'm on the right path. is there any preferred / definitive android websocket implementation? my initial search revealed https://github.com/koush/android-websockets and http://jwebsocket.org/mobile/android/android_part1.htm. Oct 14 17:27:25 mrenouf: no, it's a closed system, i don't have to worry about adoption %age Oct 14 17:28:18 mrenouf: runOnUiThread() "fixes" my problem; though the android code runs this when the view is not yet attached: ViewRootImpl.getRunQueue().post(action); Oct 14 17:28:19 Oct 14 17:28:45 I think that sort of looks like a hail mary pass Oct 14 17:28:54 heh Oct 14 17:29:09 well which do you want? run for sure, or only run when attached? Oct 14 17:29:31 or you want to queue, and run it *after* attaching? Oct 14 17:30:00 yep -- the last. I basically just want it to 'do the least confusing thing', which is run the runnable when the associated view is ready to run it. Oct 14 17:30:24 antgel, you dont need websockets for the android side, you can just post to the server. if you want bidirectional traffic (server->android) then you can simply open a TCP socket and do as you please. Oct 14 17:30:41 write a simple server that takes basic commands Oct 14 17:31:18 I like protobuf, but anything would work, even plain text commands, like "PING", "BUTTON 1 PUSHED", etc Oct 14 17:32:11 mrenouf: hmm, but with websockets, the messaging infrastructure is in place, and i just have to handle the message in a switch / if. also on the web side, i can use websockets from javascript, so i don't have to have a fully-fledged web backend server (e.g. tomcat) Oct 14 17:32:18 which would simplify deployment massively Oct 14 17:32:30 antgel, ok, then use websockets :-) Oct 14 17:32:43 I want to make a simple layout like this http://imgur.com/cZqsB. Can anyone guide me? Oct 14 17:32:56 there are tons of libraries. I wrote one, but I think it's out of date in terms of the latest spec Oct 14 17:33:15 mrenouf: :-) - any preferred implementation on android? my google search was inconclusive (see ^^) Oct 14 17:33:59 I prefer mine, cause I wrote it and its simple and depends on zero other libraries, but like i said, it's probably outdated. Oct 14 17:34:06 I haven't used any others, sorry Oct 14 17:34:42 i git-cloned the android websocket code from https://github.com/koush/android-websockets, but now what? how do i integrate it into my android project in eclipse? Oct 14 17:34:44 "draft-ietf-hybi-thewebsocketprotocol-00" was the one I targetted Oct 14 17:34:51 https://github.com/mrenouf/websocket-client Oct 14 17:35:25 Looks like it was finally made into a standard: RFC 6455 Oct 14 17:35:39 mrenouf: respect! Oct 14 17:35:49 maybe I will update it... Oct 14 17:36:29 so how does one deploy these things? the file structure looks similar on both. just copy to the src directory then import as appropriate? Oct 14 17:36:47 i haven't done java since about 15 years before android came out ;) Oct 14 17:37:15 yeah Oct 14 17:37:28 antgel, isn't it like learning to ride a bike Oct 14 17:37:32 files need to go in package path Oct 14 17:37:40 so keep same dirs Oct 14 17:37:58 from development side, android = java Oct 14 17:38:04 Sculptor: not sure if i can still ride a bike either Oct 14 17:39:59 hello, how can i set the forground color of preference screen items in a ? extends PreferenceActivity ? Oct 14 17:47:11 How do you guys handle state information about views? Oct 14 17:47:30 what do you mean? Oct 14 17:47:36 depends on the situation Oct 14 17:47:55 ok, suppose I have an imagebutton, it can either say "LIKE" or "UNLIKE" Oct 14 17:48:19 if it's that simple...a boolean? Oct 14 17:48:45 sampullman: that is fine but I will need to handle another variable right? Oct 14 17:48:56 what do you mean? Oct 14 17:48:57 I was looking for some sort of tags Oct 14 17:49:37 if i have a lot of state information i like to extend the view class and keep it there Oct 14 17:49:44 vavirta: is that possibile to use Netbeans and ANdroid SDK, i hate eclipse Oct 14 17:49:53 hmm, ok sampullman Oct 14 17:49:54 i.e. LikeableImageButton Oct 14 17:50:05 yes, I understand Oct 14 17:50:19 onebitxajax: I think it is possible, but haven't use it Oct 14 17:50:28 google has command-line tools for all magic that eclipse does Oct 14 17:50:32 are there any cases where that wouldn't suffice? Oct 14 17:50:32 use ToggleButton Oct 14 17:51:06 otherwise you can attach arbitrary data using setTag("key", object) Oct 14 17:51:08 another possible way is to get the current drawable from the imagebutton and compare it with the drawable I have. But that looks weird :) Oct 14 17:51:25 napster, ToggleButton Oct 14 17:51:46 * napster looks into ToggleButton and setTag() Oct 14 17:52:14 don't use setTag. just create a state list drawable with your like/dislike images Oct 14 17:52:24 setTag is annoying if you have a lot of data Oct 14 17:52:31 to associate Oct 14 17:52:37 ok Oct 14 17:53:55 hey Oct 14 17:54:06 why does the dialog look like android 2.2, the rest like 4.1? https://dl.dropbox.com/u/6559846/device-2012-10-14-195301.png Oct 14 17:54:10 codebutler: It is not just about setting proper drawables. Oct 14 17:54:15 note that the dialog is a library project Oct 14 17:54:25 I will need to fire correct methods Oct 14 17:54:57 so ToggleButton seems right for this particular situation Oct 14 17:55:08 sampullman: mrenouf thanks Oct 14 17:55:11 spobat: do you need to persist the state forever, or just when the activity is resumed? Oct 14 17:55:19 sorry, napster ^ Oct 14 17:55:22 ^^ Oct 14 17:55:29 spobat: how is the dialog being created? Oct 14 17:55:40 it's an activity Oct 14 17:55:40 is any of the op around Oct 14 17:56:25 codebutler: persist the state for ever means? Oct 14 17:56:40 I just need it through out the activity Oct 14 17:56:42 yes, the dialog is an activity Oct 14 17:56:50 one of my registered nick is blocked Oct 14 17:57:02 in this very channel Oct 14 17:57:08 a ToggleButton will automatically remember if its checked when saved/restored from instance state Oct 14 17:57:10 needed some help with it Oct 14 17:57:23 codebutler: oh Oct 14 17:57:43 ok, let me see how that is useful as well, thanks codebutler Oct 14 17:59:00 codebutler I invoke this activity: http://ideone.com/3zDrW Oct 14 17:59:05 with startActivity Oct 14 18:00:49 spobat: in your AndroidManifest you are probably declaring the activity's theme as @android:style/Theme.Dialog, you instead want to use @android:style/Theme.Holo.Dialog unless you're on Android 2.x Oct 14 18:01:03 spobat: it would probably be better to use an AlertDialog, which automatically provides buttons Oct 14 18:01:07 instead of an Activity Oct 14 18:01:54 so you probably have something theme.xml in values/ and values-11/ to handle Theme versus Theme.Holo for your main activity, do the same for the dialog. But yeah what codebutler said about using an AlertDialog instead of an Activity is good advice Oct 14 18:02:03 codebutler it's all about the facebook thing Oct 14 18:02:08 but ty for the idea kevinb Oct 14 18:02:43 workin'! Oct 14 18:02:46 thanks again Oct 14 18:09:37 I could use some app testers if you're bored: http://forum.xda-developers.com/showthread.php?t=1936907 Oct 14 18:09:41 sampullman: mrenouf codebutler : ok I think it is better to use CoumpoundButton instead of a Togglebutton, since it has a setOnCheckedChangeListener() public method. Oct 14 18:10:10 either could work Oct 14 18:10:30 ok Oct 14 18:10:36 got it Oct 14 18:10:40 what's the issue with just storing a boolean in the activity? Oct 14 18:10:49 ToggleButton extends CompoundButton Oct 14 18:10:51 togglebutton is a subclass of compoundbutton Oct 14 18:11:00 yup Oct 14 18:11:15 sampullman: Just don't wanted to use another variable, thats all :) Oct 14 18:11:40 also, I'm learning best practices ;) Oct 14 18:11:56 i think best practice would be to store a boolean Oct 14 18:12:18 why sampullman ? Oct 14 18:12:38 it's by far the simplest solution Oct 14 18:13:07 ok, I should admit it is simple. hmm Oct 14 18:13:58 why do you think having an extra boolean variable floating around is bad? Oct 14 18:14:48 sampullman: actually I have a few other buttons on the same activity. Follow/Unfollow, like/unlike, checkin/checkout etc Oct 14 18:16:00 if you don't like the idea of a few booleans in an activity, just write a wrapper class and keep that Oct 14 18:16:55 keeping booleans is fine when thinking from one side, but again, in this case, ToggleButton can work just fine, right? Oct 14 18:17:00 since there is only two states Oct 14 18:17:10 sure Oct 14 18:17:11 Is there a straightforward way to add a togglebutton in a widget (ie, a home-screen widget) or is it all done by flipping drawables on a button? Oct 14 18:17:11 for all these buttons Oct 14 18:25:06 So I'm still quite lost on The Right Way to enqueue a runnable on a view, that runs when the view is "ready". At the moment, I'm down to subclassing the view and trapping the onAttached/DetachedFromWindow() methods, and storing the runnables in a list, and running them once the onAttached() is called Oct 14 18:25:19 this is a hack, what's a better way to do this? Oct 14 18:28:02 the runnable of course, should run on the ui thread. At the moment, I subclass the view(s) of interest, and add an enqueueRunnable(Runnable r) method. In here, if the view is currently attached to a window, I post() the runnable. Otherwise, I push it into a list, to be post()'ed during the onWindowAttached() callback. Oct 14 18:30:09 why not just do that in onResume? Oct 14 18:31:27 do what in the onResume()? The symptom at the moment is that some background initialization that I do in an Activity's onCreate() appears to kick in before all the associated views have had their windows attached. Oct 14 18:32:17 post the runnables Oct 14 18:33:56 napster not sure post 3.x but in 2.x widgets are pretty basic, you're looknig at flipping drawables IIRC Oct 14 18:36:04 sampullman: hm, didn't think of that - i'm trying to see if all the views of interest (some of which are dynamically created) will be usable at this point... Oct 14 18:42:57 sampullman: the onResume() doesn't appear to solve the issue -- I'm still losing post()'ed runnables Oct 14 18:43:35 what you're doing is probably more complicated that what i thought when i said that Oct 14 18:43:39 *than Oct 14 18:47:46 I have something I _thought_ was simple :-) I have a background initialization [now in the onResume()] method in the main activity. The background init happens in a separate thread. When it does whatever it needs to do, it calls back into the activity, asking it to post a runnable that essentially asks a view to refresh itself. This runnable is post()'ed on that view -- but the runnable is never run. Oct 14 18:48:42 The known symptom is that if the background method returns too quickly, the runnable never runs. Oct 14 18:50:33 the current working theory is that the view is not attached to its window when the runnable is posted; and I can work-around the situation by subclassing the view and storing the runnable and post() the event until that condition occurs Oct 14 18:51:45 but this seems egregiously silly for me to do - in my naive faith in android, I assume that stuff post()'ed will get run when the view is ready; so I fear I must be missing something obvious Oct 14 18:53:46 i could be wrong, but it sounds like you should be starting an AsyncTask in onCreate (or wherever makes sense), and updating the views from the UI thread (in the AsyncTask's onPostExecute) Oct 14 18:54:47 if it is possible for you to do that, it would get rid of a lot of complexity Oct 14 18:55:39 hm. complexity is in the eye of the beholder, I guess :-) Oct 14 18:55:57 ehm, no Oct 14 18:56:06 oh yes it is Oct 14 18:56:45 in this case, i think it would be objectively simpler Oct 14 18:57:10 Regardless of alternate ways to do the same thing, i'm still perplexed about the expectation surrounding the post() method Oct 14 18:57:27 the docs for View.post say "This method can be invoked from outside of the UI thread only when this View is attached to a window." . Oct 14 18:57:42 i wouldn't say this is an alternative way Oct 14 18:57:49 the correct way, i think Oct 14 18:58:13 kevinb: aha, cool -- thanks Oct 14 18:58:54 sampullman: how does running the refresh on onPostExecute() still guarantee that the view of interest is attached to the window? Oct 14 18:59:10 if you're using custom views you could do something along the lines of making a requestRefresh() method, then when it's called either refresh right away, post a refresh, or set a flag so that onAttachedToWindow it will refresh Oct 14 18:59:24 kevinb: yep -- that's exactly what I'm currently doing Oct 14 18:59:25 ^^ that's a good idea Oct 14 18:59:32 oh Oct 14 19:00:02 my point is that it doesn't seem like you need to post a runnable at all Oct 14 19:00:34 but i guess it depends on what you're doing in the runnable Oct 14 19:01:27 thanks sampullman and kevinb -- i seem to have developed blindness vis-a-vis the docs around post(); appreciate the hints and suggestions. Oct 14 19:08:15 So Oct 14 19:08:32 I'm going to act like a total newbie and ask for some support setting up the USB debugging on debian Oct 14 19:10:31 Dwarf: this should answer any questions you have http://developer.android.com/tools/device.html Oct 14 19:11:04 Yuck, ubuntu Oct 14 19:11:38 hey, im on ubuntu right now :( Oct 14 19:11:41 :3 Oct 14 19:11:54 is that peter griffin? Oct 14 19:11:55 What does the number on the rules file mean? Oct 14 19:11:59 Yes it is Oct 14 19:12:42 dunno Oct 14 19:15:29 Dwarf: instructions for ubuntu and debian should be identical. Oct 14 19:15:41 btw ubuntu is better Oct 14 19:15:45 just my 2c Oct 14 19:15:52 how can ubuntu be better than debian? Oct 14 19:15:57 I'm actually on crunchbang Oct 14 19:16:03 But it works the same Oct 14 19:16:07 fresher packages, good ux out of the box. Oct 14 19:16:13 works with more hardware out of the box Oct 14 19:16:21 (more bloated) Oct 14 19:16:26 But eh Oct 14 19:16:30 The names Oct 14 19:16:30 ubuntu is just debian with some polish Oct 14 19:16:33 Carmic Oct 14 19:16:35 And all that Oct 14 19:16:36 one day you will grow up and realize that 'bloat' isn't such a big deal Oct 14 19:16:38 Karmic* Oct 14 19:16:44 Yea.. Oct 14 19:16:51 I just need stuff for wheezy y'know Oct 14 19:16:52 and it's Karmic Koala, thank you very much Oct 14 19:17:04 lol karmic koala? what is this 1980? Oct 14 19:17:09 I haven't used ubuntu since LTS9 Oct 14 19:17:13 lucid lynx! Oct 14 19:17:22 how can you dislike these names? Oct 14 19:17:22 Dapper Oct 14 19:17:29 ? Oct 14 19:17:30 Idk Oct 14 19:18:11 i'm on quantal quetzal Oct 14 19:18:57 #!11 Oct 14 19:21:37 hello, can anyone explain what the problem is here? http://paste.ubuntu.com/1279823/ Oct 14 19:22:40 android won't let perform network operations on the main thread Oct 14 19:23:02 you have to create a thread ... Oct 14 19:23:28 loin: look up AsyncTask (or even better, Loaders) Oct 14 19:23:49 what's wrong with having a network operation on the main thread? Oct 14 19:24:10 loin: hangs the UI, among other nasty things Oct 14 19:24:15 any operations on the main thread need to be less than 16ms or you start dropping frames Oct 14 19:24:31 networks is many orders of magnitude slower than that Oct 14 19:24:37 s/is/are/ Oct 14 19:24:51 <_jonathan> not if you use non-blocking sockets Oct 14 19:25:09 i'll try using a thread for that Oct 14 19:27:20 async tasks/loaders will make your life easier Oct 14 19:30:40 is it 4.x or 3.x that doing any network on the main thread will result in a fatal crash immediately because it's not allowed.. Oct 14 19:31:09 if strict mode is enabled, i think it's 3.x+ Oct 14 19:31:15 err Oct 14 19:31:27 what i mean is i think strict mode in enabled by default for 3.x+ Oct 14 19:31:38 your targetSdkVersion has to be set to 11 or higher Oct 14 19:31:53 as well Oct 14 19:31:56 yeah, so, there ya have it. another reason to do it on a sep thread Oct 14 19:33:15 here's a weird, not so much android question. anyone know an editor or way to export code as html so that color scheming will stick? working on a presentation and having colored code would make it so much more interesting Oct 14 19:34:24 screenshot? Oct 14 19:34:46 might come down to that as a last resort, yeah Oct 14 19:35:16 speakingcode: http://softwaremaniacs.org/soft/highlight/en/ would do the highlighting, a script should be simple enough to wrap your code files into
 tags and html files
Oct 14 19:36:45   Hey I have an issue where SIM card contacts can't be read after upgrading to 3.3 CM 7.2 on HTC Vision -- anyone have idea how to fix? phone.apk or contacts.apk ?
Oct 14 19:37:09  if you used emacs :-) http://fly.srk.fer.hr/~hniksic/emacs/htmlize.el.cgi
Oct 14 19:39:01  niftylettuce: ask that in #android
Oct 14 19:41:41  sampullman: ok tyvm
Oct 14 19:43:20  Howdy folks
Oct 14 19:43:25  Where can I get the build-sdk?
Oct 14 19:43:41  I downloaded the SDK package but it seems it lacks the build-sdk
Oct 14 19:44:02  o.O
Oct 14 19:44:17  did you follow the installation tutorial?
Oct 14 19:44:24  Sure did
Oct 14 19:44:33  so you got eclipse?
Oct 14 19:44:38  Yep
Oct 14 19:44:44  Installed the plugin
Oct 14 19:44:45  then dunno
Oct 14 19:44:50  Downloaded the SDK
Oct 14 19:44:54  Pointed the settings
Oct 14 19:44:56  Ooooh wait
Oct 14 19:44:58  wait wait
Oct 14 19:45:00  I must be stupid.
Oct 14 19:54:27  Why would getLoaderManager().restartLoader() only work successfully one time during an activity instance?
Oct 14 19:55:09  I am targeting a specific loader (0, null, context)
Oct 14 19:59:25  If I extend CursorLoader as its own class have an affect on .restartLoader()?
Oct 14 20:03:59  What do I have to do if my device returns ????????????
Oct 14 20:04:11  List of devices attached
Oct 14 20:04:11  ????????????	no permissions
Oct 14 20:04:42  profit. No, disconnect and reconnect. Also "adb kill-server" and "adb devices" again.
Oct 14 20:05:05  wrong channel.
Oct 14 20:05:09  go to #android
Oct 14 20:05:34  You sure
Oct 14 20:05:36  sure wrong?
Oct 14 20:05:40  It's part of development y'know
Oct 14 20:05:52  hardly
Oct 14 20:06:20  yea it still returns ??????
Oct 14 20:06:25  Ima try as root
Oct 14 20:09:39  Running as root worked :)
Oct 14 20:10:03  any specific actions required inside onLoaderReset() to insure future use?
Oct 14 20:17:52  does anyone know the resource id of the button that ABS uses by default?
Oct 14 20:20:07  Are you talking about THE button, or the other one?
Oct 14 20:26:10  hi, what is the best way to share array among all activities in application?
Oct 14 20:26:37  array will contain most important information in application
Oct 14 20:27:58  I have tried to extend application and use ArrayList, but didn't succeeded. I know I suck at java, but guidelines would be useful. Am I doing right thing?
Oct 14 20:36:13  Is this a channel to ask about problems connecting your device to your computer?
Oct 14 20:42:20  http://map.honeycloud.net/
Oct 14 20:42:33  real-time map of cyber attacks according to honeypots
Oct 14 20:42:36  very cool stuff
Oct 14 20:48:03  Firstmate: #android might help
Oct 14 20:48:14  Okay, thank you.
Oct 14 20:50:16  SimonVT: it was a silly question, i know. i figured it out
Oct 14 20:54:49   I'm building an Android app where the only way for the user to use is through the "Login with Facebook" button ... My backend is built using Django .. How can I notify Django that the user logged in via his facebook account so that he's allowed to consume the webservice resources ?
Oct 14 20:55:48  This is to do with the interaction between android and OAuth, I guess -- but is it correct to assumet that bouncing the user to a OAuth authorization URL within a WebView should be verboten?
Oct 14 20:56:30  Meaning that a bad app can simply intercept the password if it wants, in a WebView
Oct 14 21:02:21  kbs: You mean I have to provite OAuth support for my webservice ?
Oct 14 21:02:37  :-)
Oct 14 21:03:31  well, for us schmucks who need to access OAuth-mediated services, at least; I'm flummoxed by 'security'  when it comes to android accessing such services
Oct 14 21:04:31  I sort of thought that 50% of the point of using OAuth was to avoid giving my password to 3rd party apps, but I don't really see how this can be prevented in android
Oct 14 21:04:52  well -- specifically, for apps use their own webview to point me to the authorization page
Oct 14 21:05:43  those apps should be using AccountManager. At the very least, installing their own Authenticator, but ideally allowing use of existing types (like "com.google")
Oct 14 21:06:35  mrenouf: well, looking at a big provider (a.k.a facebook) the 'should use' doesn't line up with what they are doing
Oct 14 21:06:52  the recommended practice for an app to access facebook, is via their sdb
Oct 14 21:06:54  *sdk
Oct 14 21:06:55  well facebook is fine too, and they do this
Oct 14 21:07:18  You can use AccountManager
Oct 14 21:07:45  because otherwise it forces everyone to trust your app with their credentials
Oct 14 21:08:38  I completely understand what the problem is :) The issue is that the recommended sdk from Facebook for android apps veers very far away from AccountManager, etc
Oct 14 21:08:49  now, for facebook, im not sure how they engineered their authenticator, but maybe it's only useful for their own app, which is terrible if that's the case
Oct 14 21:09:12  kbs, what's forcing you to follow "recommended" practice?
Oct 14 21:09:51  mrenouf: 1) So, I'm looking at https://developers.facebook.com/docs/mobile/android/build/ which is the procedure for someone to write an android app that wants to access facebook stuff.
Oct 14 21:11:05  The moment I decide to click on 'native android app' as my app-type, I'm railroaded into their flow -- whether or not it makes sense security-wise
Oct 14 21:11:25  hence my original question: should it be verboten to ask for OAuth permissions in a webview....
Oct 14 21:13:15  Now in particular, it appears to me that the facebook library in fact, does launch a webview if their client is not already installed on the device
Oct 14 21:18:40  I also don't see a 'standard' facebook authenticator plugin for AccountManager -- am I missing something in plain sight?
Oct 14 21:19:35  Isn't there one when the Facebook app is installed?
Oct 14 21:20:00  wait -- does this rely on the facebook app being installed?
Oct 14 21:20:08  Yes
Oct 14 21:20:21  yeah, so doing the same, you should use that, and fall back to a web view
Oct 14 21:20:39  but this is exactly what I said before :-) using a WebView fails to protect the password
Oct 14 21:21:15  well, you can fire an intent to the market to ask the user to install the facebook app and add an account first
Oct 14 21:21:37  heh :-)
Oct 14 21:34:24  hi, guys. have anyone ever deal with obfuscated apk decompilation? what tools can be used??
Oct 14 21:34:44  vklimkov: same as always, the symbols just get a bit jumbled
Oct 14 21:36:15  p_l: Donno. I see all vars, imports changed. i used dex2jar, jd_gui
Oct 14 21:36:29  vklimkov: because it's obfuscated
Oct 14 21:36:33  obfuscation is not reversable
Oct 14 21:36:36  that is the point of it!
Oct 14 21:36:55  fnord`: well... most of the time, the obfuscating tool doesn't do that good of a job on it :P
Oct 14 21:36:59  the best you can do is find a program that tries to make it more readable by giving friendlier naes
Oct 14 21:37:29  p_l: eh, I've disassembled some *very* obfuscated code before, but it didn't usually stop me from doing what I wanted if I was really determined
Oct 14 21:37:33  i understand. do you know such kind of tool?
Oct 14 21:37:34  er, decompiled, whatever
Oct 14 21:38:25  i'm sure it exists but it's not really our topic
Oct 14 21:48:39  Sheesh, News and Weather still hasn't been updated for xhdpi displays :S
Oct 14 22:03:41  hey
Oct 14 22:03:55  I get ogg music looping all the time even if setLooping(false) was called on the MediaPlayer
Oct 14 22:04:07  I read there's some metadata flags for it, but my ogg doesn't have that set
Oct 14 22:04:18  is there any workaround for the bug?
Oct 14 22:12:58  The wikipedia page for the PowerVR SGX series chip says that the hardware supports geometry shaders and it's used on a lot of devices. Is there any reason it's not exposed as an extension for OpenGL ES?
Oct 14 22:13:56  in general, exposing features takes time effort and expense
Oct 14 22:16:35  this is soooo mad ... a shortcut how to shut down win8 fast so that it won't suck :)
Oct 14 22:17:05  win key +i is the official way? wtf
Oct 14 22:17:57  ugh, im getting the impression that it's impossible to stop the soft keyboard from showing when an edittext is focused (while still changing the cursor index)
Oct 14 22:18:09  does anyone have insight on how to do that?
Oct 14 22:18:31  sampullman: i set the nofocus style
Oct 14 22:18:53  can you elaborate? i believe i've tried that, though
Oct 14 22:19:06  i think there are 2 things you have to set
Oct 14 22:19:12  err, i still want the cursor to be visible and whatnot
Oct 14 22:19:15  let me check my code
Oct 14 22:21:17  enabled false, focusable false, focusableInTouchmMode false
Oct 14 22:21:40  this won't popup any keyboard - but it's still an edittext
Oct 14 22:21:50  but the cursor won't show, and i still want the focused drawable shown
Oct 14 22:22:00  i could get around the second issue, but the first stands
Oct 14 22:22:13  tried all 3 styles?
Oct 14 22:22:38  ill give it one more shot, but yeah, i think ive tried them
Oct 14 22:22:41  thanks though
Oct 14 22:24:24  yeah, none of those allow the cursor to show
Oct 14 22:31:22  sampullman: you can try hiding they keyboard after the editfield is focused
Oct 14 22:32:00  i've tried doing that in an onFocusChange listener, but it didn't work
Oct 14 22:32:23  is there any need for a cursor?
Oct 14 22:32:28  i did a trick
Oct 14 22:32:30  yes
Oct 14 22:32:40  i changed the editfield to a password style
Oct 14 22:32:46  and just put "*"
Oct 14 22:32:59  as input type?
Oct 14 22:33:02  yes
Oct 14 22:33:37  there will be no carret, but you can still "see" where there is an input
Oct 14 22:33:51  i capture the onKey event for USB keyboards
Oct 14 22:34:12  and for GUI input i have my own 9+0 button style keyboard
Oct 14 22:34:32  i get: Error: String types not allowed (at 'inputType' with value '*')
Oct 14 22:35:45  android:textType = "textPassword"
Oct 14 22:36:13  does the android:inputType matter?
Oct 14 22:36:43  no idea - i just fiddled around :) and no i have what i need
Oct 14 22:37:47  there's no such thing as textType
Oct 14 22:38:11  yeah sry
Oct 14 22:38:16  it's inputType
Oct 14 22:39:01  doesn't work :/
Oct 14 22:41:46  i've subclassed view to make my own button, and i set the width using a setWidth() method… how do i make a width property that can be used to animate with ObjectAnimator?
Oct 14 22:43:22  sampullman: in the past when I have needed an EditText that didn't pop up the soft keyboard, I just used a TextView
Oct 14 22:43:35  sampullman: of course, this means you also can't use the hard keyboard.
Oct 14 22:43:46  i don't mind that
Oct 14 22:43:55  you can even set the EditText theme on the TextView
Oct 14 22:43:59  but i do need the cursor to be shown
Oct 14 22:44:02  then it looks just like the others
Oct 14 22:44:12  yeah I did without the cursor
Oct 14 22:44:15  really
Oct 14 22:44:20  you'll have to figure that bit out
Oct 14 22:44:35  i'd bet you can use a TextView, though.
Oct 14 22:44:43  i tried for a bit..was it just xml stuff or did you have to subclass TextView?
Oct 14 22:45:18  no subclassing required
Oct 14 22:45:23  i'll look at what I did
Oct 14 22:45:28  thanks
Oct 14 22:45:33  ill give it a try in the meantime
Oct 14 22:50:45  it seems i can't manually update the cursor position in this scenario
Oct 14 22:50:54  eh, what I did is gone
Oct 14 22:51:16  are you in a situation where you've implemented your own keypad with buttons?
Oct 14 22:51:20  no
Oct 14 22:51:24  wait
Oct 14 22:51:26  yes
Oct 14 22:51:30  sorry, misread that
Oct 14 22:51:38  yeah that was my use case for this
Oct 14 22:51:40  hmm
Oct 14 22:52:18  i have it working with a single edittext, but when there are multiple, clicking on an unfocused one pops up the keyboard no matter what i've tried
Oct 14 22:52:35  sampullman: btw. i also implemented my own keyboard
Oct 14 22:52:53  sampullman: you can attach a custom keyboard per view
Oct 14 22:53:06  maybe i can attach an empty keyboard
Oct 14 22:53:10  yeah :)
Oct 14 22:57:53  Hello, has someone implemented a Rotary Wheel View on Android ?
Oct 14 22:58:47  be careful, apple might sue you :P
Oct 14 22:59:43  if they sue just bring secret of mana to court with you. they were in that game way before apple would have patented it
Oct 14 23:00:55  apple just patented a new slide to unlock feature, and the wording makes it exactly what android has been using with the circles
Oct 14 23:01:41  i hate patents
Oct 14 23:02:13  if I ever become a terrorist, I'll burn down patent offices.
Oct 14 23:06:14  lol
Oct 14 23:08:34  fnord`: you can deal a significant damage to patent lawsuits by smuggling a requirement for any patent held to be widely publicized and anonymously accessible
Oct 14 23:09:10  suddenly MPEG4 LA can no longer have advanced information on anyone who works in related field to some of their patents :>
Oct 14 23:09:31  p_l: for philosophical reasons, I object to the idea of patents outright and would like to see them abolished
Oct 14 23:09:52  fnord`: I'd like to see them back in their original form, not the circus that exists currently
Oct 14 23:10:36  anything would be better than what we have now. the problem is that patents are just a tool for bullies like apple. individual inventors can't use them for squat. corps just hire people to build 'patent portfolios' without actually developing technology.
Oct 14 23:10:57  interesting would be making physical person put as author of the tech in patent be the only person allowed to grant licenses... without sublicensing rights
Oct 14 23:12:36  how the universe went from a big explosion to patents is beyond me.
Oct 14 23:13:47  suddenly once the matter forms 'life' the matter starts to think it can own things
Oct 14 23:13:54  even intangible things
Oct 14 23:14:01 * p_l recalls something about USPTO starting out as a way to block foreign inventors
Oct 14 23:14:38  I beleive patents should be non-transferrable
Oct 14 23:14:49  originally patents were created as a way to break guild monopoly, and infact protected against loss of knowledge that might disappear because someone didn't want to publish in fear of design being stolen
Oct 14 23:14:54  that would put an end to this "non-practicing entity" bullshit
Oct 14 23:15:01  (aka patent trolls)
Oct 14 23:15:51  that would be good since they prey on little developers
Oct 14 23:15:58  mrenouf: trademarks lapse when they aren't protected by the holder... something similar could be done to patent trolls. "So, you had this patent in year X, in X+3 the person you
Oct 14 23:16:31  're suing used the tech, and now, when it's X+5, you're trying to sue? Sorry, have a 100k USD fine to pay, and loss of patent rights"
Oct 14 23:17:05  when you invent something, you are sythesizing it from millenia of accumulated human knowledge, yet no one gets the credit but you or "the corporation"
Oct 14 23:17:47  it doesn't matter how hard or through what means you acquired the knowledge, those are meaningless abstractions and probably even inefficient methods of delivery based on how primitive we still are in that regard
Oct 14 23:17:51  fnord`: the original patent system was made so that the patented stuff would enter the pool of accumulated knowledge, instead of being lost with inventor or hidden in a guild
Oct 14 23:18:25  I don't know much about the original system I guess. I'll have to research it.
Oct 14 23:18:32  I still hate the idea
Oct 14 23:19:46  there are no geniuses, only lucky atoms.
Oct 14 23:19:48  fnord`: before patents, you had a lot of stuff being hidden behind the monopolies of various guilds. Even if you didn't grant them monopoly on certain stuff by law, they'd still hold the monopoly on knowledge
Oct 14 23:22:02  with patents, at least in theory (or "spirit"), the research made by the inventor became public, with patent describing how to replicate it, in exchange for time for the inventor to capitalize
Oct 14 23:22:17  p_l: makes sense, fwiw, they helped free up information then but that's only because of the disease called capitalism.
Oct 14 23:22:31  similar with origins of copyright, mostly - it was replacement for patronage system
Oct 14 23:23:21  i've subclassed view to make my own button, and i set the width using a setWidth() method… how do i make a width property that can be used to animate with ObjectAnimator?
Oct 14 23:23:24  all the problems can be traced back to basic dispicable human emotions.
Oct 14 23:28:05  …aaaaand the vikings are done today :)
Oct 14 23:34:32  probably way off-topic for here, but I've been reading Adam Smith on and off -- and I have to say, it's a fascinating read. That guy was one smart cookie.
Oct 14 23:34:53  [related to the fnord` rant :-)]
Oct 14 23:37:49  the philosopher?
Oct 14 23:39:59  I bet fnord` would enjoy reading Keynes slightly more
Oct 14 23:40:22  yep. "Wealth of nations"
Oct 14 23:40:28  it's a surprisingly interesting read
Oct 14 23:41:07  sam: :-) sounds like it
Oct 14 23:44:06  jeezus, that was a lot of work just to get a cursor to show w/o opening the soft keyboard..
Oct 14 23:58:35  sam, kbs: thanks for the suggestions. I'll try to find the time
Oct 15 00:04:03  fnord`: I wasn't really suggesting you read Keynes -- there are modern economist who have built on top of the classical and keynesian economists' work and are probably more interesting reads
Oct 15 00:06:03  fnord`: given your views on patents I'd recommend Stiglitz (author of the "Prizes, not patents" article)
Oct 15 00:07:16  fnord`: ditto for me, vis-a-vis Adam Smith. Was mostly a tongue-in-cheek remark, given that most consider him to be the first to advocate free-market economics.
Oct 15 00:07:32  what is generaly the recomended way to store data client side, like the GCM id or a username?
Oct 15 00:07:50  kbs: a truly free market would not have patents :)
Oct 15 00:08:20  I think capitalism is a disease, but it's one we have to probably live with forever.
Oct 15 00:09:24  fnord`: no, a truly free market would soon reintroduce them in the form of corporation-2-corporation treaties ;)
Oct 15 00:10:02  fnord`: perhaps :-) though living as I now do in the u.s. and having lived before in a much poorer country, I have a slightly different perspective
Oct 15 00:11:52  clever: I usually just use SharedPreferences, that seems to be about right for things like user names and other primitive tokens
Oct 15 00:12:51  If anyone is interested in some beta testing, http://forum.xda-developers.com/showthread.php?t=1936907
Oct 15 00:13:21  kbs: i'll have a look at the docs for that then :)
Oct 15 00:14:25  the ideal government would be run entirely by Google
Oct 15 00:14:33  lol
Oct 15 00:15:14  fnord`: shhh
Oct 15 00:16:24  hi guys, i had to learn that the java.library.path is read only once when the JVM starts up and iff you change this property using System.setProperty, it wont make any difference at all. is there any hack for android to trigger the change at runtime like there is for common java? see http://fahdshariff.blogspot.de/2011/08/changing-java-library-path-at-runtime.html
Oct 15 00:16:34  kbs: what is the scope of the sharing for shared preferences?
Oct 15 00:17:03  both options do not work in android because logcat says "java.lang.NoSuchFieldException: usr_paths", "java.lang.NoSuchFieldException: sys_paths"
Oct 15 00:17:16  i cannot think of anything any more
Oct 15 00:17:34  clever: it should be restricted to only your app. [Though a rooted phone will allow a user to access the content if they want.]
Oct 15 00:17:59  i tried setting LD_LIBRARY_PATH in a shell process before running the actual command, the variable is properly updated, but the linker does not care
Oct 15 00:18:21  kbs: ah, thats fine :)
Oct 15 00:18:25  nothing can stop access once its rooted
Oct 15 00:20:05  apparently it works on some kernels and doesnt on others
Oct 15 00:20:18  did any of you ever run into this?
Oct 15 00:20:31  outofideas: you have to keep in mind, the phone doesnt run java, it runs dalvik
Oct 15 00:20:43  yeah
Oct 15 00:20:49  thats the problem i think clever
Oct 15 00:21:16  (but shouldnt it implement the java specification and the sys_paths fields?)
Oct 15 00:21:46  why should it implement the java specification if it's not a JVM?
Oct 15 00:22:15  and why would you be trying to change the path in an Android app anyway?
Oct 15 00:23:05  Leeds: because the jvm is not part of the java language specification
Oct 15 00:23:26  erm... what?
Oct 15 00:24:04  ?
Oct 15 00:24:35  Leeds: i want to change the path variable to dynamically link libraries from a path i specify btw
Oct 15 00:24:48  why would you need to do that?
Oct 15 00:26:21  i dont get the question
Oct 15 00:26:59  its like asking why you would want a key to the trunk of your car
Oct 15 00:27:08  are you implying dynamically linking libraries from a folder you specify is a use case you cannot imagine?
Oct 15 00:27:17  on android, yes
Oct 15 00:27:37  ok then you cannot help me i guess
Oct 15 00:30:56  well, you can certainly do that through the ndk
Oct 15 00:31:25  sampullman: apparently you cannot, that is the problem :(
Oct 15 00:31:26  although "folder that you specify" is somewhat limited
Oct 15 00:31:32  no, you can
Oct 15 00:31:34  i've done it
Oct 15 00:31:47  i mean you can using the hack for the jvm
Oct 15 00:32:03  but yeah it doesnt work on the dalvikvm
Oct 15 00:32:22  p_l: just sold paip and graham's ansi common lisp; good bye to good stuff
Oct 15 00:32:29  sampullman: http://fahdshariff.blogspot.de/2011/08/changing-java-library-path-at-runtime.html
Oct 15 00:33:48  sampullman: the ndk linker is initialized when the app launches, and it does not care if you update the environment variables afterwards like any other sane program does
Oct 15 00:34:19  i've subclassed view to make my own button, and i set the width using a setWidth() method… how do i make a width property that can be used to animate with ObjectAnimator?
Oct 15 00:34:22  yeah, that's interesting
Oct 15 00:35:36  outofideas: could you give me an example of a use case? excuse my ignorance
Oct 15 00:35:39  those variables are deep inside a specific library implementation; why should those variables exist in general...
Oct 15 00:35:40  it sucks so much though
Oct 15 00:35:51  i don't see how
Oct 15 00:37:51  sampullman: well sure i just mean i dont see whats specifically exotic about that, you want to launch several binaries from java and they all require libs like libpcre etc. and you have many of these binaries and a fair number of dependencies, so you want to organize your libs into several folders
Oct 15 00:38:51  so, keep them in ndk/*
Oct 15 00:39:45  there is a folder /data/data/yourapp/lib which apparently is used by default. i tried putting all libs there, i still got the linker error
Oct 15 00:39:46  the only issue i could possible see is if there are many apps that have the same dependency
Oct 15 00:40:08  the weird thing is when i run exactly the same command from adb shell in the same directory all things being equal, it perfectly works
Oct 15 00:40:13  no, that's where jars go
Oct 15 00:40:20  ok
Oct 15 00:40:24  c libraries go in yourapp/ndk
Oct 15 00:41:01  sampullman: actually i am not using ndk i am just calling binaries from a /system/bin/sh process by writing to its stdin and pressing "\n"
Oct 15 00:41:47  like process = Runtime.getRuntime().exec("sh");
Oct 15 00:42:11  ah, now i understand
Oct 15 00:42:31  still not sure why you need to do that, but it's beyond the scope of my knowledge
Oct 15 00:42:33  sorry
Oct 15 00:43:14  dude just assume organizing libs into folders makes sense for me
Oct 15 00:44:12  outofideas: dude, don't say things like that
Oct 15 00:44:41  g00s: pity. For PAIP, that is. PG's ANSI CL can go to hell :P
Oct 15 00:45:39  sampullman: this is how i do it exactly: process = Runtime.getRuntime().exec("sh"); writer = new DataOutputStream(process.getOutputStream()); writer.writeBytes("LD_LIBRARY_PATH=/data/data/myapp/files/folder/to/my/libs:$LD_LIBRARY_PATH && cd /data/data/myapp/files/folder/to/my/binaries && ./binary --go\n"); writer.flush();
Oct 15 00:46:01  sampullman: and as i said the really weird think is that it works completely fine if i run the exact same command from adb shell
Oct 15 00:46:44  thing*
Oct 15 00:47:26  i get errors like "link_image[1966]: 22619 could not load needed library 'libgif.so' for './nmap' (load_library[1108]: Library 'libgif.so' not found)CANNOT LINK EXECUTABLE"
Oct 15 00:48:05  try using the linker directly?
Oct 15 00:48:22  though I don't remember if it allowed much on android
Oct 15 00:48:45  also, the linker in android is pretty limited regarding envvars
Oct 15 00:48:58  p_l: what do you mean directly?
Oct 15 00:49:21  i only know how to set LD_LIBRARY_PATH
Oct 15 00:52:24  something along the lines of /lib/ld-linux.so --option-for-library-path=path /path/to/executable
Oct 15 00:52:56  p_l: you mean statically linking it?
Oct 15 00:54:21  static linking would work but it is not an option i want to consider yet
Oct 15 00:54:31  no. in linux, dynamic linking is done by a normal userspace program
Oct 15 00:55:00  on normal systems it's in /lib/ld-linux.so
Oct 15 00:55:07  I just don't remember what Bionic used
Oct 15 00:56:41  so you mean on android there is an option to specify the path for dynamic linking by invoking the binary using a special command on the shell that involves /lib/ld-linux.so? that sounds like a good option
Oct 15 00:56:55  i just tried googling it, nothing so far
Oct 15 00:57:51  Not that I've tried it, but Runtime.exec() has a variant where you set the environment variables and the working directory -- will at least take potential sh/busybox issues out of the equation.
Oct 15 00:58:11  kbs: tried all of that, the linker totally doesnt care :(
Oct 15 00:58:41  i tried ProcessBuilder.environment()
Oct 15 00:59:07  what does that mean?
Oct 15 00:59:25  i tried Runtime.loadLibrary(String libname)
Oct 15 00:59:46  i tried Runtime.load(String filename)
Oct 15 00:59:57  i tried Runtime.exec(String command, String[] envp, File dir)
Oct 15 01:00:06  i tried Runtime.exec(String cmd, String[] envp)
Oct 15 01:00:28  kbs: ProcessBuilder is a class used to create processes
Oct 15 01:00:37  it has a method environment() that lets you change the env
Oct 15 01:01:03  outofideas: I understand what ProcessBuilder is -- but the environment() method does _not_ change the enviroment variables.
Oct 15 01:01:17  and i can do all of that (it has the same effect as LD_LIBRARY_PATH=/data/data/myapp/files/folder/to/my/libs:$LD_LIBRARY_PATH && command) but the linker does not care
Oct 15 01:01:25  kbs: yes it does change it
Oct 15 01:01:49  kbs: you can modify the Map you get from environment() it and your changes are reflected
Oct 15 01:02:29  outofideas: ah, my mistake. you're correct.
Oct 15 01:02:51  i am really out of ideas
Oct 15 01:02:55  p_l: you didn't like pg's cl book :) there are some more recent ones out, i havent looked at them though
Oct 15 01:03:03  i think i tried everything there is out there publicly on the web
Oct 15 01:03:09  so i thought i had to dig deeper
Oct 15 01:03:15  in the depths of irc
Oct 15 01:03:27  does the loadLibrary() statement run successfully without errors?
Oct 15 01:03:42  where the android gurus meet and talk when they dont want to be overheard
Oct 15 01:03:45  :(
Oct 15 01:04:11  kbs: yes it loads the lib correctly, logcat says "successfully added" and all that. not that the linker would care..
Oct 15 01:04:25  g00s: I think I can thank Graham for slowing down my getting of lisp severely due to his push for scheme. Also, I hang out with people whose probably mildest opinion on that book is to look up "Graham crackers" errata ;)
Oct 15 01:05:49  heh, oh you mean arc
Oct 15 01:05:58  wtf happened to arc :)
Oct 15 01:06:09  it s supposed to be the second coming of christ or something
Oct 15 01:06:22  i also tried System.load(String libname) btw
Oct 15 01:06:37  g00s: it's dead jim
Oct 15 01:06:40  on arrival, too
Oct 15 01:06:41  lol
Oct 15 01:07:57  outofideas: right, just curious whether the library itself was accessible from within java; but it wouldn't be linked to your child I would think.
Oct 15 01:08:11  yes kbs
Oct 15 01:08:41  is there any standard folder i can put libs into like there is myapp/ndk for ndk and /myapp/lib for jars?
Oct 15 01:09:36  i mean even if i wanted to drop custom folders not even that seems to be an option because i found nothing like that on google
Oct 15 01:10:08  i think..assets might be ok for that
Oct 15 01:10:10  not sure though
Oct 15 01:11:34  i would probably have to write things into /system/lib lol
Oct 15 01:12:57  you realize that this renders android entirely unusable for dynamic linking?
Oct 15 01:13:14  i cannot change the path and there is no standard path i can write to
Oct 15 01:13:18  game over
Oct 15 01:13:34  :((
Oct 15 01:16:52  outofideas: if you could explain what you're actually trying to *achieve*, someone might be able to help you
Oct 15 01:17:28  Leeds: running nmap from an android app
Oct 15 01:17:42  and you can't do that with static linking?
Oct 15 01:17:56  well not just nmap
Oct 15 01:17:58  there are lots and lots of apps out there which wrap native binaries
Oct 15 01:18:01  i mean all kinds of binaries i can find
Oct 15 01:18:37  you're doing something that's not really meant to be done, so it's going to take a little work
Oct 15 01:19:10  Leeds: thats no reason for me not to do it myself, i also want to learn
Oct 15 01:19:19  sampullman: yes, i work hard
Oct 15 01:19:27  i tried everything i could find actually for days
Oct 15 01:19:33  outofideas: I didn't say that - I meant that it's obviously not impossible, if other people have managed it
Oct 15 01:19:41  yes
Oct 15 01:20:08  you realise there's already an NMAP for android right?
Oct 15 01:20:17  Leeds: the thing is the process = Runtime.getRuntime().exec("sh"); writer = new DataOutputStream(process.getOutputStream()); writer.writeBytes("LD_LIBRARY_PATH=/data/data/myapp/files/folder/to/my/libs:$LD_LIBRARY_PATH && cd /data/data/myapp/files/folder/to/my/binaries && ./binary\n"); writer.flush(); approach actually works on many devices
Oct 15 01:20:31  but not on all devices, it seems to be kernel specific
Oct 15 01:20:58  lloir: i didnt even check, but it is not a reason for me to stop anyway
Oct 15 01:22:14  um... why on earth wouldn't you be using your own wrapper script?
Oct 15 01:22:42  Leeds: i told you i want to learn
Oct 15 01:23:33  yes, and I just suggested a better way to do things
Oct 15 01:23:56  outofideas, you looked at pamn ip scanner?
Oct 15 01:23:58  Leeds: what exactly do you mean by wrapper script?
Oct 15 01:24:09  well, a script which wraps
Oct 15 01:24:45  lloir: is it open source? i just looked at it in the market
Oct 15 01:24:56  Leeds: why would that help?
Oct 15 01:25:01  yes
Oct 15 01:25:10  well, it would make things a fuckload more readable, for a start
Oct 15 01:25:22  cool lloir thanks, i will check the source and how they do it, although i suspect they use the same approach
Oct 15 01:25:35  which works on many devices
Oct 15 01:26:19  Leeds: oh you mean why i dont use a method that abstracts the command? i do, i simplified for the channel
Oct 15 01:26:38  ah, so the stuff you're showing us isn't actually what you're doing?  good stuff
Oct 15 01:27:06  Leeds: you are jumping to conclusions again
Oct 15 01:27:34  nope, I'm reading what you're writing and extrapolating based on the personality you've shown so far in the channel
Oct 15 01:28:15  anyway, good luck in your future weird endeavours
Oct 15 01:29:31  anyone using any cool code gen in their work?
Oct 15 01:29:40  I saw one called lazy android but it's not up to date really.
Oct 15 01:29:41  Leeds: you dont get the code do you?
Oct 15 01:29:59  I get much code
Oct 15 01:30:21  Leeds: also wrong. i did use the exact code in the past, therefore your argument of me posting a snippet but actually being so incredibly stupid to write sufficiently unrelated shit code in reality fails
Oct 15 01:30:53  Leeds: i mean the snippet i posted. because if you do understand it then you wouldnt ask that question
Oct 15 01:30:58  or make that statement
Oct 15 01:31:02  okay, whatever
Oct 15 01:31:19  because... its like saying "wow you wrote 1+1=2, i bet dont know what 1+2 is!!"
Oct 15 01:31:44  i bet you dont know*
Oct 15 01:31:53  good, good
Oct 15 01:31:55  its....so incredibly uninformed
Oct 15 01:32:00  so pls the fuck back off
Oct 15 01:32:01  yes, very nice
Oct 15 01:32:11  because i tried everything i could and it sucks
Oct 15 01:32:12  kthx
Oct 15 01:32:15  bye?
Oct 15 01:32:23  no :)
Oct 15 01:32:44  really? oh well
Oct 15 01:34:33  I'm trying to canvas print a long value to my screen, but I'm getting chinese characters instead of numbers?
Oct 15 01:34:48  Komak57: code?
Oct 15 01:35:00  canvas.drawText("Frames: "+String.valueOf(frames), 5, 20, frmt);
Oct 15 01:35:35  Leeds: you seem to have made a friend =P
Oct 15 01:35:47  HacDan: I'm a people person
Oct 15 01:36:09  -blinks-
Oct 15 01:37:28  Komak57 - is that on the emulator perchance?
Oct 15 01:37:37  Komak57: I have no idea why that would happen (seemingly that your frames var is being interpreted as some sort of wide character) but can you also try with Long.toString(frames) and report back?
Oct 15 01:40:03  tried that
Oct 15 01:40:13  tried ""+frames; as well
Oct 15 01:40:24  Komak57: if you print it instead to logcat, is it the number?
Oct 15 01:47:10  variables ARE numbers, long/long seems to result in 0 all the time (probably need to cast to double)
Oct 15 01:48:17  that... doesn't make much sense
Oct 15 01:49:06  strangely enough, the whole loop doesn't make much sense...
Oct 15 01:49:53  placing log outside of my if (time >= 100) check prints every frame, but printing it inside and it never parses?
Oct 15 01:57:19  Komak57: variables are binary data
Oct 15 01:57:27  so sure, they're numbers
Oct 15 01:57:56  Komak57: my question was meant to mean whether you saw your chinese chars in logcat as well, or you saw a decimal number printed
Oct 15 01:59:34  I think the main piece of information you haven't given us is the value of 'frames' in your example line of code.
Oct 15 02:00:13  which I'm going to bet is uninitialized/some random value
Oct 15 02:00:17  but we'll see
Oct 15 02:01:05  why would you cast a long to a double..
Oct 15 02:01:52  well, i suppose there are some obvious use cases for that, but I'm asking specifically about yours
Oct 15 02:02:01  IGUAY
Oct 15 02:03:06  it's ok if you're guay. we'll accept you that way.
Oct 15 02:04:06  URGUAY?
Oct 15 02:04:25  frames: 54, time: 98 fps: 0
Oct 15 02:04:37  Komak57: hint - that's not Chinese
Oct 15 02:04:41  that's what it is before it resets
Oct 15 02:05:20  Leeds would know
Oct 15 02:07:59  hi
Oct 15 02:08:07  http://pastebin.com/BfE7fLJX
Oct 15 02:08:21  that is from the sample notepad application
Oct 15 02:08:41  can you explain that manifest?
Oct 15 02:08:59  why are those intent-filter's needed?
Oct 15 02:12:25  because it's an overdone example
Oct 15 02:13:32  they're not necessary, but say in the case of .NoteEditor for example, one IntentFilter matches VIEW/EDIT and another matches "INSERT"
Oct 15 02:13:35  the code uses Android's IPC mechanism 'properly' - while most devs would likely just hardcode calls within an app, the notepad example uses the intent-filter to show the proper generic way to handle things
Oct 15 02:14:01  >A component has separate filters for each job it can do, each face it can present to the user. For example, the NoteEditor activity of the sample Note Pad application has two filters — one for starting up with a specific note that the user can view or edit, and another for starting with a new, blank note that the user can fill in and save. (All of Note Pad's filters are described in the Note Pad Example section, later.)
Oct 15 02:14:17  >To inform the system which implicit intents they can handle, activities, services, and broadcast receivers can have one or more intent filters.
Oct 15 02:14:22  http://developer.android.com/guide/components/intents-filters.html#ifs
Oct 15 02:14:53  you might start one activity in more than one way to get it to have different initial states.
Oct 15 02:21:10  does it match against the activities defined in the app?
Oct 15 02:25:03  does it match against the activities defined in the app?
Oct 15 02:32:37  My Eclipse environment for my project somehow got... corrupted. It suddenly thinks that my project doesn't exist anymore ("There is no android project named blah" in the launch configuration properties) and deploying doesn't work anymore - says there's no apk, doesn't bother to build it, and project-> build project is disabled. Has anyone run into this?
Oct 15 02:41:09  how does GPU accelerated video decoding work on android, is there a common API every device implements, or does each app have to special support each device?
Oct 15 02:44:23  hello Im trying to develop my very first android app, all was going fine until I decided to add to images.9.png or maybe Im not sure what is wrong this is the log file im getting anyone can help me? http://pastebin.com/BDNi6H7e
Oct 15 02:44:44  I cant seen to figure it out
Oct 15 02:46:07  where's the image stored in the directory tree
Oct 15 02:46:13  ?*
Oct 15 02:46:36  res/drawable/drawable-hdpi
Oct 15 02:47:35  k, lemme finish reading the log then =P only skimmed it
Oct 15 02:47:40  but im using an xml to create a touch effect on image
Oct 15 02:47:47  kk
Oct 15 02:52:34  Rafafuturox: 10-14 16:57:00.915: E/ActivityThread(1484): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #5:  tag requires a 'drawable' attribute or child tag defining a drawable
Oct 15 02:52:39  maybe?
Oct 15 02:52:52  hi guys, do you know about any sample of the Google Drive 2.0 SDK for Android? There is a Google I/O 2012 presentation, but the most important part (how to create the Drive object with your client secret was left out)
Oct 15 02:52:59  ok let me check thanks
Oct 15 02:53:43  Rafafuturox: it also mentions res/drawable-hdpi/selectorempezar.xml so maybe line 5 of that?
Oct 15 02:54:00  k
Oct 15 02:54:06  checking
**** ENDING LOGGING AT Mon Oct 15 03:00:01 2012