**** BEGIN LOGGING AT Mon Feb 11 02:59:58 2013 Feb 11 03:00:31 I can use this as an excuse to roll my own collections :) Feb 11 03:03:11 Just curious about this statement "you can build android apps entirely in c or cpp Feb 11 03:04:29 Is that really the case,? i am starting from an ndk sample, which appears to draw a triangle , but it does use a java base calling init and render functions in cpp Feb 11 03:05:00 http://stackoverflow.com/questions/4893403/cant-include-c-headers-like-vector-in-android-ndk Feb 11 03:05:28 the answer says they got it to work, and some comments confirm that vector works Feb 11 03:05:39 but real men use straight C, not C++ Feb 11 03:05:43 Ok i see some other samples have an application.mk Feb 11 03:05:49 asm Feb 11 03:06:09 i could use straight c Feb 11 03:06:51 I dont tend to use much stl,this is the first time i have lol Feb 11 03:09:53 Thanks, progress Feb 11 03:10:09 Adding application.mk helped Feb 11 03:10:56 Wohoooo it compiles now Feb 11 03:15:56 I'll have my secretary send you a bill Feb 11 03:24:31 he's gonna needa bout ... three-fity Feb 11 03:27:26 This isnt exactly android dev but I need to edit a very large number of .csv files on my computer that are used in my app, anyone know an easy scripting language to do this with? Feb 11 03:27:43 python :) Feb 11 03:28:12 sed Feb 11 03:28:49 i have to run this script on about 2000 .csv files to edit and then re-save them, would python be able to do that easily? Feb 11 03:29:18 I've always wanted to learn python but never had the need/time Feb 11 03:29:59 banakai ive never heard of sed but ill do a search thanks Feb 11 03:39:05 getting there, all compiles now, but soon i have to start faffing around with files again.. Feb 11 04:39:03 I have my code runnning on android, at last :) Feb 11 04:40:59 make sure you build it for all four major platforms if you want coverage Feb 11 04:41:27 armeabi, armeabi-v7a, mips and x86 Feb 11 04:45:49 Right now, i will just sleep. My visuals are glitchy (zbuffer state bug) but that should be simple, must wire up input aswell but i have a bit of that already Feb 11 04:45:49 I did see it didnt compile when i took some settings from the hello neon sample Feb 11 04:45:49 its running on a galaxy nexus right now. i have a good excuse for an impulse purchase of a another device i guess... Feb 11 04:46:26 did you say its possibble to run a pure cpp app? I have a java mainloop and input reading code, starting from the gl sample Feb 11 04:46:54 I can tolerate that but it does mess up my mainloop a little Feb 11 04:47:41 fortunately that's easy, just add "APP_ABI := armeabi armeabi-v7a mips x86" to your Application.mk Feb 11 04:49:54 it puts multiple executables in the apk? Feb 11 04:51:40 mount -o remount,rw / <-- how does that command work? Feb 11 04:51:46 commas in arguments? Feb 11 04:55:29 not sure what that's got to do with Android apps, but it's a list of options Feb 11 04:55:48 Hi, Can an android application be written to make use of the phone application like to do calls for reminders of meetings automatically? Feb 11 04:55:49 I figured it out Feb 11 04:56:06 it's one argument, just comma separated Feb 11 05:04:05 nickgaw, sure. it can. Feb 11 05:09:44 ron_frown: you there ? Feb 11 05:09:52 can the phone calls be backgrounded when they are made or can the program do the calls if you are already talking on the phone? Feb 11 05:19:08 can you retype, just cleared, soory Feb 11 05:19:11 sorry Feb 11 05:20:47 nickgaw, just missed what you said. If you can, repeat please. Feb 11 05:21:11 can the phone calls be backgrounded when they are made or can the program do the calls if you are already talking on the phone? Feb 11 05:21:13 hello all Feb 11 05:21:30 Hi, Can an android application be written to make use of the phone application like to do calls for reminders of meetings automatically? Feb 11 05:24:09 yep Feb 11 05:24:11 you mean just dial a particular number, nickgaw ? Feb 11 05:25:17 no like some call centers do where if you wish to call members of a meeting to remind them of the meeting but if you record the message in a wav file the program would call the user then play them the reminder? Feb 11 05:25:56 and if you are on another call can it do the call like you can put a person on hold but instead the application does the work automatically? Feb 11 05:27:09 nickgaw: it's not likely Feb 11 05:27:26 and some of your points are carrier dependant and hardware dependant Feb 11 05:27:43 so as an overall thing, 90% no Feb 11 05:27:45 :) Feb 11 05:28:30 what about if I have a sip account configured could it do that task them? Feb 11 05:28:54 again hardware dependant Feb 11 05:29:01 no1 can answer that really Feb 11 05:29:28 I believe as a general thing, Android apps still don't have access - read or write - to in-call audio Feb 11 05:30:50 so I am pritty much out of luck on android? Feb 11 05:33:25 well like i said, yes no Feb 11 05:33:30 90% yes you are Feb 11 05:33:45 10% no it's possible Feb 11 05:34:02 but you will have to do way too much Feb 11 05:41:14 has anyone tried to build an expansion apk which consist of video files inside zip container ? Feb 11 05:42:25 i am using the APEZProvider to access the contents inside zip file, but its giving me an exception Feb 11 05:43:04 i downloaded google api but i cant add it as a target for the emulator. why is that? Feb 11 05:59:59 crap, i thought this was supposed to be a summary of the blue DDD book http://www.informit.com/store/implementing-domain-driven-design-9780133039894 Feb 11 06:00:02 700 pages :/ Feb 11 06:02:11 a need to find a summary of the summary Feb 11 06:54:07 hm, i dont think i've seen android-dev below 400 before Feb 11 06:54:36 400 ppl ? Feb 11 06:54:46 maybe nowadays, everybody knows everything Feb 11 06:54:50 yeah but like there are probably 20 here Feb 11 06:54:58 rest are ghosts Feb 11 06:55:13 Hey! I'm not a ghost. I just woke up :p Feb 11 06:55:24 StingRay_: still awake again? :-) Feb 11 06:55:27 ok 21 Feb 11 06:55:31 I wish I was a ghost Feb 11 06:55:32 :p Feb 11 06:55:47 fredcooke: no I got up a few hours ago, 4am tis now 7am Feb 11 06:55:50 :) Feb 11 06:55:56 and got to bed at? Feb 11 06:55:59 yeah, there are a few bots here :) Feb 11 06:56:17 fredcooke: when my brain no longer functions enough for me to be productive Feb 11 06:56:36 which was what? 2am? :-) Feb 11 06:56:53 well no, i think today i will stop at 6pm Feb 11 06:56:58 sleep about 8pm Feb 11 06:57:02 just guessing Feb 11 06:57:03 :) Feb 11 06:59:36 Hi Feb 11 07:00:13 TLG = tender loving goat ? Feb 11 07:00:29 StingRay_: there are 78 people who have said something yesterday (CEST), and you've said 82 things: http://paste2.org/p/2848045 Feb 11 07:01:02 something like that Feb 11 07:01:03 lol Feb 11 07:01:11 i've made my first app Feb 11 07:01:13 Wauw, I've said more today already than I did yesterday Feb 11 07:01:15 for some student gov thing Feb 11 07:01:15 StingRay_: you aren't trying hard enough, only #3 ! Feb 11 07:01:19 but it keeps crashing Feb 11 07:01:27 could you guys throw some advice for debugging? Feb 11 07:01:29 That means that I've said things yesterday after midnight :p Feb 11 07:01:40 TLG_: see the topic :) Feb 11 07:01:58 last link Feb 11 07:02:40 maybe Feb 11 07:02:41 use Feb 11 07:02:42 the Feb 11 07:02:44 debugger Feb 11 07:02:56 g00s: maybe someone should change it to plaintext, and not a imgur link. May get more attention Feb 11 07:03:09 (and keep the link anyway) Feb 11 07:03:13 StingRay_: use the CR … you can't inflate your messages #day that way, its cheating Feb 11 07:03:13 stacktrace Feb 11 07:03:15 will do Feb 11 07:03:22 o Feb 11 07:03:23 k Feb 11 07:03:35 StingRay_: I'll leave you oyut the list today :p Feb 11 07:03:42 dammit! Feb 11 07:03:50 lol Feb 11 07:07:47 in eclipse is it a common bug to suddenly develop multiple panel syndrome ? Like 2 Problem panels / 2 package explorer panels ? remove any singular and both disappear ? Feb 11 07:07:55 There's a top100 of nicks since I joined (about two weeks): http://paste2.org/p/2848067 Feb 11 07:08:09 fk yeah Feb 11 07:08:26 shit that means i need to spend less time here Feb 11 07:08:28 yeah, you have twice as much lines as #2 Feb 11 07:09:06 Thi highest ranking @ is only at #63 :p Feb 11 07:09:38 well canadiancow is there Feb 11 07:09:51 #6 Feb 11 07:10:12 Yeah, that's a + Feb 11 07:10:32 well only cause he doest +o until he needs to Feb 11 07:11:13 1673 StingRay_ bahahaha Feb 11 07:12:07 i know right ? really need to spend more time looking at the other monitors Feb 11 07:12:17 rather than this one (with irc) Feb 11 07:19:40 in my defence I maybe try a little too hard to help AND on an frustrating sidenote, the last 4 questions I posted for help, no answers or help!! oh wait ...5 there is one not 20 lines up :) Feb 11 07:20:02 haha happens to me all the time :/ Feb 11 07:20:11 unless a @ or CC is on Feb 11 07:21:06 StingRay_: well, I can't help you with eclipse, as outside of one project that uses a plugin existing only for eclipse (proprietary shit), I don't use Eclipse :) Feb 11 07:21:12 and you're rather prolific :) Feb 11 07:23:22 I am ? Feb 11 07:26:11 StingRay_: "the wall of StingRay_" … Feb 11 07:39:04 anybody know wky the android sdk Graphical layout designer woul d just suddenly stop working? Feb 11 07:39:26 its written by google Feb 11 07:39:29 * g00s runs Feb 11 07:39:57 * StingRay_ stays quiet and hopes that "actions" dont count towards Peetz0r's stats Feb 11 07:40:52 http://puu.sh/20Nwn Feb 11 07:41:06 * zack6849 sees g00s message and laughs Feb 11 07:42:07 zack6849: it runs in Eclipse? Feb 11 07:42:11 StingRay_: just answer people with "/me" now on :) haha maybe it'll break peetz0r's script Feb 11 07:42:40 what script are you guys scared of? .-. Feb 11 07:42:52 * StingRay_ things that zack6849 problem maybe something to do with the theme association Feb 11 07:43:07 turns out i need to update my ADT Feb 11 07:43:20 i think, cant be a coincidence that needs to be updated right when the error happened >_> Feb 11 07:44:15 p_l: come on, you cant blame eclipse for everything :) Feb 11 07:46:54 StingRay_: I can *make* actions count if you want :p Feb 11 07:46:58 g00s: I can! It even causes global warming by increased heat production from overtaxed computers! ^_- Feb 11 07:50:52 i'm guessing the carbon footprint (considering cradle-to-grave) all these disposable android phones is more :P Feb 11 07:51:49 I think the heat of computers doesn't contribute to global warming. However, power usage does :D Feb 11 07:52:04 aapt and qemu alone were probably responsible for 0.5'C rise in global temps this year Feb 11 07:52:18 And now the best part, faster cpu's use less power for the same job than slower ones Feb 11 07:53:02 yeah, but mining the rare earths used in all these phones is environmentally devastating Feb 11 07:53:28 Peetz0r: thats not true Feb 11 07:53:46 new cpu's use less power Feb 11 07:53:57 newer* Feb 11 07:54:03 I was talking about two cpu's from the same series Feb 11 07:54:32 a 2.8 ghz 3rd gen i3 uses less power than a 2.4 ghz 3rd gen i3 (for example) Feb 11 07:54:48 I'm talking about rush-to-idle Feb 11 07:54:55 just out of the blue, was it you stingray who liked using ganja while coding? Feb 11 07:55:06 fk no! Feb 11 07:55:26 my brain is small and only mildly works at the best of times Feb 11 07:55:32 I dont drink either Feb 11 07:55:34 :) Feb 11 07:56:37 another q out of the blue, do you use music while coding? Feb 11 07:56:51 everyone uses music, it's the best drug there is Feb 11 07:56:55 no Feb 11 07:57:13 should do but no Feb 11 07:57:46 I have a theory... more music = less irc haha jk :) Feb 11 07:58:04 more music -> lower ranking in stats Feb 11 07:58:12 that doesn't work for me Feb 11 07:58:21 music is just a reason to stick to the computer Feb 11 07:58:27 headphones don't go that far Feb 11 07:58:37 so music == more irc for me Feb 11 07:58:46 speakers all over the house? Feb 11 07:58:54 is there a android equivalent of a JTextArea? Feb 11 07:58:59 neighboors Feb 11 07:59:10 also, there's music on my phone and irssi connectbot on the same phone :) Feb 11 07:59:15 oh well you could just ipod it hehe Feb 11 07:59:28 therefore, I have acces to both music and irc wherever I go :D Feb 11 07:59:39 zack6849: i would think TextView or EditText Feb 11 08:00:01 I don't have any portable music player besides android devices Feb 11 08:00:22 therefor any device I own which can play mp3 files also has a ssh client and network connection Feb 11 08:01:12 I don't own many devices, and most (if not all) run linux Feb 11 08:03:07 peetz0r, g00s: have you heard of SSL Strip? Feb 11 08:04:27 gah, why is android trying to launch a new emulator every time i launch my app Feb 11 08:04:37 wasnt it capable of hotswap? Feb 11 08:05:26 Trinity: yes Feb 11 08:06:00 have you ever used it/test it? Feb 11 08:06:14 no Feb 11 08:07:04 i suppose encrypting data is the best method anyways ;/ Feb 11 08:07:39 Trinity: see this yet? https://silentcircle.com/ Feb 11 08:08:07 yup Feb 11 08:08:38 g00s: http://www.ironkey.com/en-US/ this? Feb 11 08:08:46 how about ^* Feb 11 08:09:33 sounds familiar, know nothing about it Feb 11 08:10:02 well one of the features is remote self-destruct data haha :) Feb 11 08:10:03 how do you know there isn't a backdoor ? Feb 11 08:10:24 anybody have the sources for the firmware :) Feb 11 08:10:48 wouldn't know haha it costs wayyy to much and you would need to order wayyy too many Feb 11 08:11:29 g00s: A friend of mine recently watched one of those self-destruct after too many failed passphrase entries Feb 11 08:12:06 i think even in the last MI the self destruct failed Feb 11 08:12:11 p_l: was it like kaboom self-destruct or data wipe? Feb 11 08:12:25 Trinity: ... it actually tried to release the Magic Smoke outside Feb 11 08:12:49 dang Feb 11 08:13:27 Trinity: have you used Cryptocat ? Feb 11 08:13:27 from what I heard, they don't have backdoors for the simple reason a big portion of their market pretty much forbids that... as in NSA forbids backdooring ;) Feb 11 08:13:49 (a backdoor increases possibility that someone stumbles on it and uses it against you) Feb 11 08:13:50 g00s: yup Feb 11 08:14:00 NSA forbirs backdoor for NSA, not for us :D Feb 11 08:14:04 ^ Feb 11 08:14:34 g00s: in reality, I don't think it's worth to fear backdoors of that kind... you should fear incompetent "encryption" :> Feb 11 08:14:48 or the rubber hose Feb 11 08:14:53 and yes, rubber hose Feb 11 08:14:57 or rather, rubber club Feb 11 08:15:15 hose is... such low-quality implement Feb 11 08:15:40 * p_l thinks he has the correct rubber club somewhere in house... or maybe it's in the office... Feb 11 08:16:49 question, if i want to include an external library, how would i do that? Feb 11 08:16:51 personally, I wonder if that xkcd comic was based on stuff from former Warsaw Pact on how to... "treat" politicals Feb 11 08:16:53 Trinity: i wonder if these are any good https://guardianproject.info/apps/ Feb 11 08:17:05 can i just make a libs folder in the project and toss the library in there? Feb 11 08:17:13 zack6849: afaik not Feb 11 08:17:37 D: Feb 11 08:18:33 doubt it, don't trust tor Feb 11 08:18:35 if you're using IDE and trying to add normal JAR, not Android Library, add the libs to your build config manually specifying them to be included as part of result Feb 11 08:18:48 gibberbot uses google talk ;/ Feb 11 08:19:24 Tor is pretty good... though I'd recommend not using it by itself if trying to access non-tor resources Feb 11 08:19:33 (accessing tor resources is IIRC safer) Feb 11 08:20:08 anybody know how to include external API's in an android app? .-. Feb 11 08:20:34 well.. considering that NSA and FBI placed various "compromised" cell's into tor's end-nodes i wouldn't trust it Feb 11 08:21:06 although it would be like playing cat-and-mice in the end with enough info you wouldn't be anonymous Feb 11 08:21:50 but you shouldn't be posting any of your personal info out anyways Feb 11 08:22:51 Trinity: an end-node by itself doesn't compromise you (now, a timing attack and few other ways can help pinpoint you). But that's the nature of *anything* that goes out into open net Feb 11 08:24:10 p_l: not if you use sufficient encryption :) Feb 11 08:24:34 Trinity: which would be "not going into open net" :P Feb 11 08:24:52 because timing attacks are based on noticing the existence of communication, not the contents Feb 11 08:24:54 that wasn't towards your last comment haha only to the "timing attack" Feb 11 08:25:02 oh Feb 11 08:25:31 Trinity: it's about narrowing down location of target by analyzing timings of packets Feb 11 08:25:42 here in the uk we had a few headlines about US just passing legislation about data comms/email and voice, as in they dont need a court order and can do it anytime Feb 11 08:25:45 is that true ? Feb 11 08:25:56 StingRay_: they are trying again Feb 11 08:26:09 thats horrific ! Feb 11 08:26:21 cue Cameron jumping on the bandwagon in 3, 2, 1... Feb 11 08:26:35 na Feb 11 08:26:41 though iirc Metropolitan Police was the last one that tried similar stuff Feb 11 08:28:31 p_l: i still prefer Vpns though, I mean tor has 1800 nodes with around 20 zombies you would be able to start "pinpointing" Feb 11 08:28:50 Trinity: pinpointing works for the timing attack mentioned Feb 11 08:29:01 also, VPN providers are notoriously rubberhosed :> Feb 11 08:29:08 what i mean is its fairly easy for them to target you Feb 11 08:29:35 again, when the traffic goes outside Tor, yes Feb 11 08:29:46 I have an asset (xml file) that is a part of my APK. from my understanding, it gets pushed into the APK at build time. is there a way to modify this xml file though after its been installed on the machine? Feb 11 08:29:50 I would like to manually modify it Feb 11 08:30:08 so that when my app gets loaded next time, it would read the updated xml file Feb 11 08:30:09 you have a bunch of server just searching and databasing from exposed tor exit nodes whereas VPNs they would only be looking through the logs or the VPN service is suspected malicious activity is seen Feb 11 08:30:38 hey guys, how to handle refund messages with in app billing v3? Feb 11 08:30:53 or how to handle refund messages in general? Feb 11 08:31:37 stiggpwnz: depends if theyre managed or un-managed Feb 11 08:31:44 Trinity: with VPNs they usually have damn easy way to pinpoint you. Just check the money flow, also full deep packet inspection and possibly fool you into loading their SSL cert as trusted Feb 11 08:31:54 Trinity: managed products Feb 11 08:32:28 Trinity: is there any broadcast sent to the device? Feb 11 08:32:30 stiggpwnz: http://developer.android.com/google/play/billing/billing_admin.html#billing-refunds Feb 11 08:32:32 no Feb 11 08:33:02 google doens't support it but what i'd recommend anyways is to have the verification process done on a separate server and not on the client device Feb 11 08:33:41 and with that implemented you could easily create a refund system to disable items (not secure). but the entire refunding process would have to be done manually Feb 11 08:33:49 how cna adding an onclick listener cause an NPE..... Feb 11 08:34:34 p_l: what im comparing is a network thats already being actively watched/logged vs. something they have to spend time/effort/money Feb 11 08:34:51 http://puu.sh/20OjA http://puu.sh/20Oka Feb 11 08:35:48 zack6849: erm there is no Content set to use findViewById at the time you are Feb 11 08:35:59 o_0 Feb 11 08:36:07 when should i be running all this code then? Feb 11 08:36:09 setContent = add my UI Feb 11 08:36:12 Trinity: Sorry, ball busting a VPN service is a question of choosing which, whereas analyzing bigger network where there's significant traffic that won't flow through your servers (or won't ever pass unencrypted through them) gets harder\ Feb 11 08:36:30 ah, set content first? Feb 11 08:36:30 zack6849: but your saying, hey find this button in the UI, then later on.....add the UI Feb 11 08:36:35 indeed Feb 11 08:36:39 derp :) Feb 11 08:37:35 I am trying to figure out how I can dynamically tell my app to wait for debugger on startup. Sometimes, it crashes at startup, and it would be nice to attach a debugger to it Feb 11 08:37:53 I was thinking of creating an xml file and putting it in the assets directory, but the problem is that it is not accessible from outside Feb 11 08:38:03 so I cannot use adb shell to modify it Feb 11 08:38:12 and put it back on the device Feb 11 08:39:23 Trinity: why do you say google doesnt support it? it said that google play sends a broadcast intent Feb 11 08:39:33 Trinity: with a purchase state changed Feb 11 08:39:46 how do i print out to console in ddms? doesnt appear to work with sys.out :I Feb 11 08:40:51 zack6849: why not use log.d() and print to logcat ? Feb 11 08:40:51 stiggpwnz: oh whoops my bad Feb 11 08:40:58 ill try that then :3 Feb 11 08:43:02 Trinity: thanks anyway for pointing that out Feb 11 08:43:44 sitggpwnz: but my statement on verifying on server still stands, angry birds and a couple of the big ones got their IAP's cracked from client side verification Feb 11 08:47:24 why would my app throw an exception about networking? do i need to set an intent for internet acess? Feb 11 08:47:40 zack6849: you need to set a permission android.permission.INTERNET Feb 11 08:48:33 also don't do it in main thread Feb 11 08:48:42 yep, running in a seperate thread. Feb 11 08:49:01 just trying to find out how you add perms, the gui is probably more complex than the xml itself Feb 11 08:49:12 if you use eclipse: yes Feb 11 08:49:42 Feb 11 08:50:04 thanks ^_^ Feb 11 08:52:35 yeah, I've been doing android developing for less than 2 weeks now, and I already switched from gui to xml Feb 11 08:53:19 Trinity: one of the serial killers in Dexter (Season 3 I think) was named Trinity Feb 11 08:53:56 Season 4* Feb 11 08:55:23 http://puu.sh/20OBW Feb 11 08:55:45 bah, im beggining to remeber why i dislike android development Feb 11 08:55:59 NetworkOnMainThreadException Feb 11 08:56:10 Sounds clear, doesn't it? Feb 11 08:56:12 im creating a new thread... Feb 11 08:56:16 quite a few actually. Feb 11 08:56:16 sure? Feb 11 08:56:23 very sure? Feb 11 08:56:41 http://pastie.org/pastes/6115163/text?key=yimma7ybhw1nfvfycj3a9q Feb 11 08:56:46 pretty damn sure :I Feb 11 08:56:59 a seperate activity is not aseperate thread Feb 11 08:57:09 im running a new thread.. Feb 11 08:57:10 the main thread of an activity is always the UI thread Feb 11 08:57:15 check in the oonclicklistener. Feb 11 08:57:27 and then the savefile and getimage urls methods Feb 11 08:57:31 new threads EVERYWHERE Feb 11 08:57:55 ah, but I don't see your thread in the stack trace Feb 11 08:58:04 which means what? :I Feb 11 08:58:41 I don't know because I don't use threads that way Feb 11 08:58:44 zack6849: for ease just use Asynctask Feb 11 08:58:54 which i do how? :I Feb 11 08:58:59 I use AsyncTask's Feb 11 08:59:04 by reading to docs Feb 11 08:59:17 yeah, there are great examples in there Feb 11 08:59:18 look, teach a man to fish iand all that, i get it Feb 11 08:59:27 I could paste one Feb 11 08:59:32 zack6849: or use "implements Runnable" Feb 11 08:59:34 but im not trying to learn andoid dev as a living, i just want to get my app working ;-; Feb 11 08:59:56 zack6849, also, you start() threads, not run() them Feb 11 08:59:58 zack6849: perhaps you should use Thread.start() instead of Thread.run :D Feb 11 09:00:03 oh >_+> Feb 11 09:00:10 run() just executes the run method you implemented in the very same thread Feb 11 09:00:15 zack6849: also Asynctask in my opinion is straight forwar Feb 11 09:00:29 and would be best for what you're doing Feb 11 09:00:30 http://paste2.org/p/2848259 Feb 11 09:00:39 ^ example of a quite large asynctast Feb 11 09:00:49 peetz0r: too complex! Feb 11 09:00:50 asynctask* Feb 11 09:00:55 Trinity: is it? Feb 11 09:00:56 "(09:55:45) zack6849: bah, im beggining to remeber why i dislike android development" you prefere the system let the developer make network connection in main thread and screw up with users instead? :) Feb 11 09:01:07 aw shit. Feb 11 09:01:17 timroes, no, just that im utterly helpless with android :) Feb 11 09:01:28 http://d.android.com :) Feb 11 09:01:33 hi Feb 11 09:01:34 wanna start another activity, am i doing it right?: http://pastebin.com/h6AkrA2e Feb 11 09:01:38 in fact best official documentation i've yet seen Feb 11 09:01:50 mikey: yes Feb 11 09:01:53 Trinity: maybe 200 lines is a bit heavy for one task, but it's the heart of my app really Feb 11 09:02:09 it throws me an exception Feb 11 09:02:14 the rest is just UI and some articfial added syntactical sugar Feb 11 09:02:21 http://puu.sh/20OIe Feb 11 09:02:28 ill get you a simple asynctask zack :/ Feb 11 09:02:39 mikeyMike: http://imgur.com/jacoj (frop /topic) Feb 11 09:02:42 from* Feb 11 09:02:46 Selection: line 76 and 87 Feb 11 09:03:11 i just gave a stack trace .-. Feb 11 09:03:38 he was talking to mike Feb 11 09:03:45 oh Feb 11 09:03:48 kk Feb 11 09:03:55 zack6849, you'll end up in a mess if you don't think more about your threading :) Feb 11 09:03:59 kliknieto almost sounds like 'don't click here' in Dutch :p Feb 11 09:04:09 bah Feb 11 09:04:10 zack6849, but it says you can't update the UI from other than the UI thread :) Feb 11 09:04:26 well thats useful .-. Feb 11 09:04:31 it is Feb 11 09:04:50 well i know the problem, but solving it would mean re-writing how alot of my code works Feb 11 09:05:00 yeah Feb 11 09:05:11 or better yet, could i make a setTest method that wouldnt be in the thread? Feb 11 09:05:19 http://developer.android.com/reference/android/app/Activity.html#runOnUiThread(java.lang.Runnable) Feb 11 09:05:21 ie thread -> set text -> ui thread? Feb 11 09:05:41 asyctask has methods to help using the ui thread from inside your task Feb 11 09:05:44 runOnUIThread (see above), Handler, VIew.post() Feb 11 09:05:48 just read the docson it and try it Feb 11 09:05:54 AsyncTask would do this all for you Feb 11 09:06:35 wait. i'm trying startActivity(intent) instead of layAct.startActivity(intent); Feb 11 09:06:35 * zack6849 looks into that Feb 11 09:07:02 zack6849: http://pastebin.com/B7iFMNZz Feb 11 09:07:10 zack6849: http://www.vogella.com/articles/AndroidBackgroundProcessing/article.html Feb 11 09:07:25 and more more info and better useage of Asynctask's capabilities... http://developer.android.com/reference/android/os/AsyncTask.html Feb 11 09:07:34 w0 Feb 11 09:07:37 w- Feb 11 09:07:47 what am i looking at o_o Feb 11 09:08:01 i assume the stuff in <'s are arguments? Feb 11 09:08:08 no Feb 11 09:08:10 read the doc Feb 11 09:08:29 which is what im doing ._. Feb 11 09:08:40 how would i implement an app that is permanently recording, writing audio in chunks to media and in a parallel thread, analyse these chunks for acoustical metrics. This is the only usage of the device, so many of the usual restriction's won't apply. I'm just a little bit confused about the many methods to remove calculations or tasks from the ui-thread. Feb 11 09:09:03 zack6849: perhaps read up on generics in java as well :) Feb 11 09:09:44 i know java just fine, i wrote the same app in JSP , an applet, and a gui application Feb 11 09:09:49 i just bave trouble with android Feb 11 09:10:12 spend 3 days reading the docs, you'll appreciate it. (from personal experience0 Feb 11 09:10:34 but i dont want to know it that well, i just want it to work l0l Feb 11 09:10:39 ah, i see now Feb 11 09:10:47 zack6849: guess I missunderstood what you meant when you asked what the <..> stuff is then Feb 11 09:11:07 zack6849: web stuff is not regular gui, so if you would have done it in regular gui in any other framework, you would have had the same problems Feb 11 09:11:15 because you cannot do internet connection in UI thread Feb 11 09:11:35 freiform, service, threading... Feb 11 09:11:42 i said two of them were web, but the other was normal java and works just fine >_> Feb 11 09:12:01 so you are fimiliar with (in case of swing) SwingWorkers Feb 11 09:12:10 work nearly the same like AsyncTask Feb 11 09:12:21 in case of SWT i don't know right now how the "asynctask" is called there Feb 11 09:13:26 android is a different beast though Feb 11 09:13:58 Zharf: Yes. ATM i use an AsynCThread for recording, calling another one when one chuck is finished to process the data, unfortunately AsyncTasks runs serially. So leaving Services out of it for the moment, could i create a Thread manualla for recording and from this thread, call my preocessing task? Feb 11 09:14:30 freiform, yes, regular java threading will work fine Feb 11 09:14:38 freiform: i think "runOnUiThread()" Feb 11 09:14:45 you just need to take care when talking to UI thread Feb 11 09:15:02 What trinity said Feb 11 09:15:40 and make sure thread-safe Feb 11 09:17:45 BlockingQueue might be useful to pass chunks to another thread Feb 11 09:17:55 or somethingl ike that Feb 11 09:19:10 I'l lgive it a shot, thanks. Feb 11 09:35:21 getActionBar is undefined. lol. Feb 11 09:36:24 yep, i officially have no idea what im doing. Feb 11 09:39:56 cant run it in my normal thread, it doesnt download but gives no errors, cant run it in a different thread, errors, cant run it on an asynctask, doesnt make sense Feb 11 09:40:12 run what ? Feb 11 09:40:21 my app ;-; Feb 11 09:40:37 you want to run your app in a async ? Feb 11 09:40:40 nice Feb 11 09:41:11 not the enteire app, my main methods use networking and i was trying to let them set text, i gave up on that Feb 11 09:41:19 still wont work from the main thread, no errors eiter. Feb 11 09:41:31 well no, no ui thread Feb 11 09:41:37 whats wrong with async ? Feb 11 09:41:48 easy enough Feb 11 09:41:52 doesnt make much sense to me Feb 11 09:42:07 no Feb 11 09:42:17 i mean why isnt async working ? Feb 11 09:42:36 how to make final static String with for string from resources? Feb 11 09:42:42 because it doesnt make sense to me, it would probably work, but ive been at it for a few hours no Feb 11 09:42:44 *now Feb 11 09:43:20 async , doInBackground is off UI thread Feb 11 09:43:27 others are on ui thread Feb 11 09:43:28 squ: doesn't, you won't have resource object in your static initialization phase Feb 11 09:43:52 i mean doesnt make sense as in i cant figure out how the hell to amke it work and my normal threading knowldge doesnt apply here Feb 11 09:44:11 well use a thread/runnable solution then Feb 11 09:44:24 did that, no stack trace, just doesnt work Feb 11 09:44:40 again: works pretty much the same like in every UI toolkit. one method to prepare, one to run off the ui thread, and one back in ui thread to apply the results Feb 11 09:45:32 http://www.vogella.com/articles/AndroidBackgroundProcessing/article.html that explained it pretty well imho, and even gave an example on how to use for network communication Feb 11 09:45:50 i dont have any issues in swing, im just confused and tired ;-; Feb 11 09:45:53 zack6849: in what way doesn't it work? does the entire app crash/force close? Feb 11 09:46:05 no crash, says there are no images iin the thread Feb 11 09:46:07 then OOM Feb 11 09:46:08 zack6849: do you even run your code? tried settings breakpoints when debugging? Feb 11 09:46:25 yes i run my code... how do you think i get my stacktraces? Feb 11 09:46:40 zack6849: you just wrote "no stack trace" Feb 11 09:46:53 not just now, but the other 15 times it crashed... Feb 11 09:46:55 "no errors" Feb 11 09:46:56 zack6849: what do you try to do with the data you download? Feb 11 09:47:17 zack6849: and how much of it is there? Feb 11 09:47:21 ohshit, do i need a permission to save files too? that could very well be my issue Feb 11 09:47:28 i would wager not very much of it. Feb 11 09:47:43 2-4 image Feb 11 09:47:43 zack6849: depends on where you want to save. Feb 11 09:47:48 images* Feb 11 09:47:52 to the downloads folder. Feb 11 09:48:09 zack6849: then yes, you need permission to write to external storage Feb 11 09:48:28 zack6849: the error you get if you try should be pretty clear though Feb 11 09:48:33 you can btw transfer it pretty easily from swing, if you hadn't any problems there. What you done in SwingWorker.doInBackground will be done in AsyncTask.doInBackground, and what you have done in process you do it `onPostExecute`, signatures are even the same :) Feb 11 09:49:03 http://puu.sh/20PmE Feb 11 09:49:11 zack6849: so you don't try to read the images as Bitmaps or something? Feb 11 09:49:29 nope, just pass them off via file outpus stream to a file. Feb 11 09:51:00 this is the code im using if that helps :I Feb 11 09:51:01 http://pastie.org/6115380 Feb 11 09:52:40 timroes, i dont see a "run in background. i have execute though. Feb 11 09:52:48 zack6849: getImageURLs is broken since it returns urls before the thread has finished Feb 11 09:52:59 wut? Feb 11 09:53:01 oh o_o Feb 11 09:53:03 zack6849: so it'll always be empty Feb 11 09:53:32 that would explain that.. Feb 11 09:54:43 zack6849: perhaps move it all to a single async task and use onProgressUpdate to update gui during download or something Feb 11 09:57:50 appel1, i still dont get how to do it, AsyncTask.execute(new Runnable(){ stuff(); }); ? Feb 11 09:58:24 zack6849: did you look at the usage example in the docs? Feb 11 09:58:48 they want me to make a class extending it which still helps none because i dont see any of the stuff they want .-. Feb 11 09:59:19 zack6849: youre creating a subclass and running the execute() method in your onCreate method Feb 11 09:59:26 can't get any more straight forward than that Feb 11 09:59:28 zack6849: you don't know how to extend a class in java? Feb 11 09:59:43 i know how to extend a class .-. Feb 11 09:59:50 everything (unless i forgot something) except for doInBackground is run off UI Feb 11 10:00:16 what are you having trouble with. and btw are you testing via emulator? Feb 11 10:00:29 well the only method it created when it yells at me is the doinbackground Feb 11 10:00:30 and yes Feb 11 10:00:38 but ive also tested on my actual phone, same issue Feb 11 10:00:52 zack6849: you implement your download logic in doInBackground Feb 11 10:01:13 the SaveFile method? Feb 11 10:01:27 or should i jsut make an entiere thing where i pass it a url and it does everything from there? Feb 11 10:02:11 zack6849: you could just make an AsyncTask that takes the string from the activity that does all the downloads Feb 11 10:03:29 zack6849: that is, remove the thread stuff from getImageURLs and saveFile and call those from the doInBackground implementation instead Feb 11 10:03:31 for example Feb 11 10:03:36 zack6849: create an Asynctask called "ImageDownloadTask" place all of your networking in doInBackground, modify the asynctask so doInBackground can return a BufferedImage/Image and save in PostExecute Feb 11 10:04:33 Trinity: why? when all he wants to do is write the file content to external storage? Feb 11 10:04:50 hes trying to download a image i think and then save it in external storage Feb 11 10:05:09 Trinity: yes, so no need to decode it into an Image Feb 11 10:05:42 can i set stuff in the ui inside doInBackground or no? Feb 11 10:05:44 i assume not? Feb 11 10:05:50 no Feb 11 10:05:57 well yes Feb 11 10:06:01 Is it possible to get stereo line in on Nexus 4? Feb 11 10:06:13 zack6849: no, you implement onProgressUpdate and in doInBackground you call publishProgress Feb 11 10:06:23 publishProgress() or progreessUPdate() Feb 11 10:07:28 zack6849: as is shown in the example in the documentation :) Feb 11 10:07:34 i dont have the runInbackground method accessible. Feb 11 10:07:40 Override it.. Feb 11 10:07:45 all i see when i Write WorkerClass. Feb 11 10:07:48 is execute Feb 11 10:07:50 it is in my code... Feb 11 10:07:59 Subclass Asynctask... Feb 11 10:08:08 zack6849: doInBackground Feb 11 10:08:13 it extends asynctask. Feb 11 10:08:23 i dont have that when i type the classname appel1 Feb 11 10:08:30 can open default SMS application on andriod (filled with my text) ? Feb 11 10:08:40 http://puu.sh/20PzU Feb 11 10:08:55 http://puu.sh/20PAc Feb 11 10:09:10 squ: http://stackoverflow.com/questions/10370731/share-via-sms-only Feb 11 10:09:42 zack6849: http://developer.android.com/reference/android/os/AsyncTask.html Feb 11 10:09:47 Intent sendIntent = new Intent(Intent.ACTION_VIEW); Feb 11 10:09:54 1. subclass Asyntask Feb 11 10:10:03 zack6849: read below the line that says: Once created, a task is executed very simply: Feb 11 10:10:13 2. if you want to do it your way its fine as well... execute(params); Feb 11 10:10:23 timroes, hello :) Feb 11 10:10:40 3. http://pastebin.com/B7iFMNZz, and appel1's docs like i suggested 30 minutes ago -.- Feb 11 10:11:02 squ: hi :) Feb 11 10:17:47 appel1, and now im getting network on main thread exception again .-. Feb 11 10:18:34 zack6849: look at the stack trace to find out what causes it Feb 11 10:20:11 Document doc = Jsoup.connect(s).userAgent("Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.56 Safari/537.17").get(); Feb 11 10:20:23 so in otherwords it's jsoup causing my errors. Feb 11 10:20:23 zack6849: so you didn't move that to the asynctask? Feb 11 10:20:28 i did. Feb 11 10:20:38 http://puu.sh/20PH8 Feb 11 10:20:48 i have a feeling i didnt import jsoup right for android Feb 11 10:20:56 i asked this hours ago and never got a reply Feb 11 10:21:14 anyone know where I can find professional GUI's to look at for reference purpose? need some guidelines and tips for color schemes and tricks to make the design look good. I have been reading through a lot but can't find anything good Feb 11 10:21:16 zack6849: that makes no sense, how are you executing the asynctask? Feb 11 10:21:30 new WorkerClass().doInBackground(MainActivity.box.getText().toString()); Feb 11 10:21:35 MelvinKelvin, android niceities / Android Design in Action on YouTube Feb 11 10:21:38 box is the textbox for the URL. Feb 11 10:21:56 zack6849: that's wrong Feb 11 10:21:58 rofl. enough said. Feb 11 10:22:07 zack6849: READ the documentation!!! Feb 11 10:22:07 wat? .-. Feb 11 10:22:11 i clicked it! Feb 11 10:22:17 hes not going to read the documentation ;/ Feb 11 10:22:18 and i clicked all your pastes and read them! Feb 11 10:22:22 NetworkString: will check it out Feb 11 10:22:26 zack6849: WHERE in the docs does it says that you should call doInBackground yourself? Feb 11 10:22:41 somone over here said i needed do in background did they not? Feb 11 10:22:46 zack6849: WHERE in Trinity example does he call doInBackground?? Feb 11 10:23:13 zack6849: no, you IMPLEMENT your download logic in doInBackground Feb 11 10:24:01 zack6849: Look at the line below "Once created, a task is executed very simply:" on http://developer.android.com/reference/android/os/AsyncTask.html again, what does it say? Feb 11 10:25:38 zack6849: or do you find this example easier to understand? http://developer.android.com/training/basics/network-ops/connecting.html#AsyncTask Feb 11 10:26:15 i understand my issue, i got it the first time because i was questining it myself earlier but i kept hearing people mention do in background,no in that context but they kept mentioning it Feb 11 10:26:32 now the error is mine, im getting file not found, which im fairly sure i can fix. Feb 11 10:27:05 have fun fixing the issue :). I wish you the best of luck! Feb 11 10:34:09 al i should need perm-wise is ext storage and internet right? Feb 11 10:35:14 http://puu.sh/20PSN Feb 11 10:35:56 zack6849: what path you storing it to ? Feb 11 10:36:07 Environment.DIRECTORY_DOWNLOADS + "/" + filename Feb 11 10:36:11 which would be for example Feb 11 10:36:28 ./downloads/1360567048589.jpg Feb 11 10:36:37 hmm never used that Feb 11 10:36:50 Environment.getExternalStorage() Feb 11 10:37:11 passes the current external storage like /mnt/sdcard/ Feb 11 10:37:12 open failed: ENOENT (No such file or directory) Feb 11 10:37:18 is english your first language? Feb 11 10:37:24 -_- Feb 11 10:37:32 i know what the damn error is, i said it earlier Feb 11 10:37:38 i even asked if i needed perms to write files Feb 11 10:37:49 Trinity, im not a genius but please stop insulting my intelligence Feb 11 10:37:58 js teasing, imo just save it to externalStorage Feb 11 10:38:00 you need permissions for anything everything that is outside the scope of your app Feb 11 10:38:12 when youre positive your code works then work on the /downloads/ Feb 11 10:39:15 also depending on your android sdk you might need to create the directory yourself Feb 11 10:39:22 zack6849: http://developer.android.com/reference/android/os/Environment.html#getExternalStoragePublicDirectory(java.lang.String) Feb 11 10:39:26 in which case use mkdirs() Feb 11 10:39:54 zack6849: you are not supposed to use that constant directly as a path, you are supposed to pass it to getExternalStoragePublicDirectory to get the path Feb 11 10:40:18 gug? Feb 11 10:40:20 *huh Feb 11 10:40:25 zack6849: http://developer.android.com/guide/topics/data/data-storage.html#filesExternal Feb 11 10:40:49 new File(Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "/downloads/ + File.separator).mkdirs(); Feb 11 10:40:58 Trinity: gah, no Feb 11 10:41:02 no? Feb 11 10:41:36 Trinity: getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLAODS) Feb 11 10:41:52 DOWNLOADS Feb 11 10:42:03 ahh i guess there was an implementation for that Feb 11 10:43:50 btw zack: as a user I don't think I would appreciate your app's downloads to go into download folder, would prefer it more if it had its own folder Feb 11 10:44:01 zack6849: the Training and API Guides sections on d.android.com are a good place to start looking for info on how to do stuff and get a general feel for the android platform Feb 11 10:45:09 it worked :D Feb 11 10:45:28 now i just need to try and get it to pring to the log, not entirley necessary but it would be nice >_> Feb 11 10:48:29 zack: congrats, "Log.d(tag, msg);" Feb 11 10:48:36 yep Feb 11 10:49:07 can i make a method in the ui class that sets the text in the ui thread somehow? :I Feb 11 10:49:17 or can i do that from my asynctask? Feb 11 10:49:54 after it completes? Feb 11 10:50:03 zack6849: look at the docs for reporting progress from your asynctask Feb 11 10:50:05 use a Toast if its after it completes Feb 11 10:50:16 a progress dialog if you want to show progress Feb 11 10:50:19 nope, i wanted a progress thing of sorts, ill look at the docs for what appel1 just said Feb 11 10:50:57 zack: http://stackoverflow.com/questions/3893626/how-to-use-asynctask-to-show-a-progressdialog-while-doing-background-work-in-and Feb 11 10:51:37 nvmd that shows a progress dialog but doesnt show % which im assuming is what you want Feb 11 10:52:42 zack: http://www.androidhive.info/2012/04/android-downloading-file-by-showing-progress-bar/ Feb 11 10:53:04 i actually only wanted the current count / total :) Feb 11 10:53:12 2nd link Feb 11 10:53:14 which the first link should allow me to do, yes? Feb 11 10:53:22 1st link is just a "loading..." Feb 11 10:53:25 ah Feb 11 10:53:31 1st is easier to implement, 2nd is harder Feb 11 10:53:52 zack6849: you could just have the progress parameter be String and pass whatever text you want to onProgressUpdate and it can then set that String on any gui element you want Feb 11 10:53:57 but i think that article sums it up pretty well and it looks compatible with your current code Feb 11 11:00:55 zack6849: btw, sorry for that comment. It was mean of mean to say it even in a joking matter Feb 11 11:01:04 not a problem Feb 11 11:08:02 i see in some api something like this : "Only the system can get this permission" , where can i found any information about system level api ?? Feb 11 11:08:53 hm, code doesnt appear to be working, perhaps did something wrong Feb 11 11:08:58 its just stuck at 0 / 100 Feb 11 11:10:15 heh, that was close Feb 11 11:10:16 http://puu.sh/20QiK Feb 11 11:10:28 i almost copypasted ~300 lines of code in here on accident Feb 11 11:16:38 hey Feb 11 11:19:23 how do i get the context? Feb 11 11:20:56 getContext Feb 11 11:21:05 or 'this' Feb 11 11:21:10 getApplicationContext? Feb 11 11:21:11 or pass it as argument Feb 11 11:21:20 yes Feb 11 11:22:45 Hello! One question about surfaceview usage technique(in case of performance). If i have constant image that should be placed over surfaceview - can i place it just like ImageView or i should draw it in surface view from my drawing thread? If i place it like ImageView - it will significant impact on performance? Feb 11 11:29:28 how do i use getSystemService to get the notifications manager? i dont see a direct contructor in the documentation ;-; Feb 11 11:31:13 tried this too Feb 11 11:31:14 NotificationManager s = getSystemService(NOTIFICATION_SERVICE); Feb 11 11:38:06 hey guys, I want to use fragments @ android 2.2 with 'compatibility-v4' however, the maven instructions say I should install all platform tools to android-3, android-4 e.t.c and not the platform version i.e. 'android-15'... but I can't see where I can install this on the SDK Manager. Anyone know? Feb 11 11:38:27 maven instructions? Feb 11 11:38:51 https://github.com/mosabua/maven-android-sdk-deployer see "How to Use" Feb 11 11:39:51 oh well. i just use the existing ant stuff. when thats replaced by Gradle i'll use that Feb 11 11:40:53 * FreeAir prefers to burn ants with magnifying glasses Feb 11 11:44:56 bah, i cant make my stuff Feb 11 11:51:43 turns out the jar is there all along, just not by that name... Feb 11 11:57:41 Hello! One question about surfaceview usage technique(in case of performance). If i have constant image that should be placed over surfaceview - can i place it just like ImageView or i should draw it in surface view from my drawing thread? If i place it like ImageView - it will significant impact on performance? Feb 11 11:57:56 Hi every body Feb 11 11:58:01 does the GCM RestarID change on a Full Wipe/Reset? Feb 11 11:58:21 Is it posssible on Google Api2, to use something more optimize than addMarker ? Feb 11 11:58:40 addMarker take only one marker and populate I think at each add the googlemap view Feb 11 11:58:53 I would like to give a list of markers if it is possible Feb 11 12:00:12 ??? Feb 11 12:03:53 we have someone named adam levine working here Feb 11 12:03:54 lololol Feb 11 12:19:33 nobody know ? Feb 11 12:21:54 can anyone tell me what class can't be found here? http://pastie.org/6116073 Feb 11 12:22:27 mikedg, I bet that initiates a lot of trolling hehe Feb 11 12:27:43 is it possible to have GridLayout be right aligned, including the items within it? Feb 11 12:27:56 i assume i can do it in code but i really hope there's a combination of gravities that will work Feb 11 12:29:14 I cant tell if my issue is that I dont have the runtime classes on my phone, or if its my code. I think the latter... Feb 11 12:30:23 also, how can the class be static... public static class ExampleFragment extends Fragment from http://developer.android.com/guide/components/fragments.html Feb 11 12:30:24 ahhughes: what version of android does your phone have? Feb 11 12:30:29 2.2 Feb 11 12:30:44 they doesn't support fragments without support jar Feb 11 12:31:00 ahhughes: fragments were introduced in api level 11, anoidrd 2.2 is api level 8 Feb 11 12:31:01 but I haz the support-v4 jar (or so I believe) Feb 11 12:31:11 ok Feb 11 12:31:24 how you are declaring your fragments? Feb 11 12:31:25 in xml Feb 11 12:31:30 ahhughes: are you using it though ? or calling the non-support version Feb 11 12:32:25 Well I have a .... Feb 11 12:32:48 I need more info to understand what you are asking StingRay_ :) Feb 11 12:33:28 ahhughes: well is your import in your activity android.support.v4.app.frag***** Feb 11 12:33:29 because it seems that you are by accident using the non-support version Feb 11 12:33:44 and that's why you are getting those errors Feb 11 12:33:57 import android.support.v4.app.Fragment; Feb 11 12:34:09 and which is base class of your activity? Feb 11 12:34:20 FragmentActivity or Activity? Feb 11 12:34:34 public class ExampleFragment extends Fragment Feb 11 12:34:49 oh Feb 11 12:34:54 ok, but how about the activity? Feb 11 12:34:56 not the fragment Feb 11 12:35:12 public class MainActivity extends Activity Feb 11 12:35:28 ok Feb 11 12:35:30 there you go then Feb 11 12:35:34 you need to change that to FragmentActivity Feb 11 12:35:36 ahhughes: you must extend android.support.v4.app.FragmentActivity Feb 11 12:35:40 http://developer.android.com/tools/extras/support-library.html Feb 11 12:36:03 Check the section "Using the v4 library API's" Feb 11 12:36:06 or http://developer.android.com/training/basics/fragments/support-lib.html :) Feb 11 12:36:14 you probably need to refer to by its fully qualified name Feb 11 12:36:15 cheeeeeeeeeeeeeeeeeeeeeeeeeeeeeeers! Feb 11 12:36:18 in the xml Feb 11 12:36:46 or don't use layout-defined fragments Feb 11 12:36:51 and instead do a fragmenttransaction Feb 11 12:38:06 Does FLAG_ACTIVITY_SINGLE_TOP translate to 'do nothing' if the activity one wants to launch is lower on the back stack (not on top) ? Feb 11 12:38:23 Or does it wipe out the back stack up to the point where that particular activity is. Feb 11 12:38:54 woohoo! it works. Feb 11 12:39:06 thanks StingRay_ / vavirta and MDijkstra :) Feb 11 12:40:21 that was my daily goal... cheers heaps now I can get some shut eye! nighto Feb 11 12:41:41 hello Feb 11 12:41:49 np :P Feb 11 12:42:09 Oh wait, I guess I'm looking for FLAG_ACTIVITY_CLEAR_TOP Feb 11 12:42:20 i was searching the web for ADV configuration for the Android galaxy tab II without success, anyone knows how to configure ADV for it please ? Feb 11 12:43:13 uglyandstupid: what do you mean a tab 2 emu setup ? Feb 11 12:43:30 RoboSpice where has ye been all me life Feb 11 12:43:31 StingRay_: just to configure it for ADV Feb 11 12:43:44 what, screen / ram etc ? Feb 11 12:43:49 StingRay_: yes Feb 11 12:43:58 avd config Feb 11 12:44:10 choose screen dimensions etc Feb 11 12:44:12 StingRay_: i want to create a new virtual device Feb 11 12:44:20 use the "new" button then Feb 11 12:44:24 or add Feb 11 12:44:31 i forget Feb 11 12:45:46 You mean AVD Feb 11 12:46:02 think Anti Venereal Disease Feb 11 12:46:05 no im eman adv Feb 11 12:46:17 :) Feb 11 12:46:32 because being an android developer means not being near vaginas Feb 11 12:46:39 avd indeed Feb 11 13:01:51 what's a good place to store widget configuration? Feb 11 13:02:43 anyone using osmdroid ? Feb 11 13:08:47 Hello! One question about surfaceview usage technique(in case of performance). If i have constant image that should be placed over surfaceview - can i place it just like ImageView or i should draw it in surface view from my drawing thread? If i place it like ImageView - it will significant impact on performance? Feb 11 13:09:53 xgear: why dont you try and see? Feb 11 13:10:28 why dont you try and see? - i have good device and i can't see difference Feb 11 13:10:42 on emulator everything is slow Feb 11 13:10:43 why dont you use something to measure performance Feb 11 13:11:06 how i can do it? Feb 11 13:12:27 ok forget eveyrhting i said, just draw it yourself in your surface view Feb 11 13:12:37 i dont have the time to explain profiling Feb 11 13:12:39 sorry Feb 11 13:29:01 http://developer.android.com/training/articles/smp.html Feb 11 13:29:03 fun read Feb 11 13:42:46 Godzilla Arm Feb 11 13:52:07 woof Feb 11 13:56:41 why Button.setText(R.id.resource) produce button caption "false" ? Feb 11 13:57:38 because that ID corresponds to a string that is 'false' Feb 11 13:57:47 R.string.someidentifier is what you want Feb 11 13:57:54 R.id.resource corresponds to a view in a layout file Feb 11 13:59:09 yeah Feb 11 13:59:11 right Feb 11 13:59:19 :) Feb 11 13:59:31 thank you Feb 11 13:59:42 too much android today Feb 11 14:00:52 no problem Feb 11 14:00:59 i know the feeling Feb 11 14:01:59 is there an easy way to detect the status bar in android ? < 3.0 seems really hard Feb 11 14:02:15 detect as in size, position (top?) Feb 11 14:02:30 ot that i remember Feb 11 14:02:35 i looked into it a while ago Feb 11 14:02:40 and just determined close enough is good enough :/ Feb 11 14:02:57 mikedg: yeah I have that now Feb 11 14:03:04 but I kinda want it perfect Feb 11 14:03:05 :) Feb 11 14:03:22 and a sammy 8.9 tablet shows a wrong offset for one of my popup views Feb 11 14:03:31 only slightly but it's there Feb 11 14:10:37 hello Feb 11 14:10:55 why is android programming so awful? Feb 11 14:11:04 it's 2013 Feb 11 14:11:14 sysRPL: because of people like you Feb 11 14:12:27 its not android programming its all programming which is to say its a function of the programmer, not the program Feb 11 14:12:35 in 1995 i could drop a FileOpenDialog component into my program and write ... if FileOpenDialog.Execute then Memo.Lines.LoadFromFile(FileOpenDialog.FileName) Feb 11 14:13:12 sysRPL: so? easy way to crap out memory in Delphi but so what about it? Feb 11 14:13:25 writing something similar with android is such a shitty experience Feb 11 14:13:44 ? Feb 11 14:13:47 the equivalent is quite simple, though writing in pure java is annoying Feb 11 14:13:51 not really android-specific Feb 11 14:14:10 displaying a file chooser is not so simple Feb 11 14:14:24 and it is android specific Feb 11 14:14:53 have you looked to some 3rd libraries to selecting files? Feb 11 14:15:13 a fast googling gave me this project: https://github.com/iPaulPro/aFileChooser Feb 11 14:15:17 just an example :P Feb 11 14:15:23 yes, and again it's awful Feb 11 14:16:08 fucking awful actually Feb 11 14:16:08 ok, so your point is that nobody has done good file chooser? Feb 11 14:16:12 well, it's missing a handler for intent with ACTION_PICK and general files Feb 11 14:16:19 well, go ahead and do one and put that to github Feb 11 14:16:26 ^^^ Feb 11 14:17:12 vavirta, that was just the example i choose to underscore how crappy android programming, especially compared to what existed 20 years ago Feb 11 14:17:54 well, the same thing exists in ios programming also Feb 11 14:18:07 sometimes you have to use 3rd libraries Feb 11 14:18:14 or make your own Feb 11 14:18:24 and well, actually that's the thing with modern web apps also Feb 11 14:18:28 sysRPL: it's because "normal users" seem to think that dealing with files is above them Feb 11 14:19:52 dealing with customizing viewing a list of items is similarly crappy Feb 11 14:20:20 How so? Feb 11 14:20:32 btw, what you described was using a 3rd party library, so I don't see why you complain about suggestions of 3rd party libs Feb 11 14:20:42 (no, VCL is not "system lib") Feb 11 14:21:27 sysRPL: file choosers don't fit mobile usage patterns Feb 11 14:22:19 think outside the box Feb 11 14:23:41 mikedg, ah so, writing an application where users can create their own soundboard using their own clips ... that doesn't "fit" ... gotcha Feb 11 14:24:02 I get the feeling that this conversation was inspired by this; http://www.bash.org/?152037 Feb 11 14:24:14 giving the user a list of directories to navigate on a 3 inch screen isn't a good experience Feb 11 14:24:35 sysRPL: selecting *music* files is much easier, since there's a content provider for that Feb 11 14:24:41 sysRPL: *generic* files are harder Feb 11 14:24:47 mikedg, a 3 inch screen doesn't sound like a good experience Feb 11 14:25:07 sysRPL: 3.2" is common size for android device Feb 11 14:26:03 Seeing as how Google created a storage system where files are potentially scattered throughout tons of directories, a file chooser is inevitable. Feb 11 14:26:28 Well, I wouldn't mind a standard intent for picking a file or set of files Feb 11 14:26:54 additionally, java's gnerics suck ass, java's lack of function/method pointer's (delegates/events) sucks, java's lack of operator overloading, extensions methods ... all ass suck Feb 11 14:27:16 Cry me a river Feb 11 14:27:21 a 1993 level of ass suck Feb 11 14:27:27 java's lack of pointers sucks ass Feb 11 14:27:35 androids lack of AWT sucks ass Feb 11 14:27:40 Java 8 is going to be sweet. Feb 11 14:27:47 Coming to an Android near you in 2024 Feb 11 14:29:04 hi there, i'm new to android development, and i'm finding it hard to re-use the original camera app because of dependencies on the gallery and whatnot. any suggestions? thanks! Feb 11 14:29:07 btw, a task of "let me add a custom sound for my soundboard" would be launching an activity with Intent action ACTION_GET_CONTENT, MIME type apropriate for music, and possibly a chooser Feb 11 14:29:59 * memoryleak trying to figure out why app can't write to mounted externalStorage: Forgot the damn permissions -.- Feb 11 14:29:59 Problem is, a lot of devices ship without an app that can handle such an intent. Feb 11 14:30:06 There is no default chooser. Feb 11 14:30:24 even if you used the best 3rd party FileDialog class someone created, it would still suck ass ... because you can't write anything that waits without blocking everything Feb 11 14:30:36 sysRPL: ... like everywhere else Feb 11 14:30:58 especially with how certain GUI libs go back to single-threaded model Feb 11 14:30:59 * like everywhere else in android which sucks Feb 11 14:31:14 (Cocoa, GTK 3.0+) Feb 11 14:31:24 I'm pretty sure you can simply press home and exit the app, or perhaps I'm misunderstanding the definition of "everything". Feb 11 14:31:38 p_l: normally there is this thing called an event loop, which is can be invoked while you wait Feb 11 14:31:54 sysRPL: yes, and you can do so on Android as well Feb 11 14:32:02 hi there, i'm new to android development, and i'm finding it hard to re-use the original camera app because of dependencies on the gallery and whatnot. any suggestions? thanks! Feb 11 14:32:05 it's just advised to simply run something blocking in extra task Feb 11 14:32:13 yellow_: why do you want to reuse it? Feb 11 14:32:17 (and how?) Feb 11 14:32:26 p_l: such that writing ... if FileChooser.Execute then Lines.Load(FileChooser.FileName) is possible Feb 11 14:32:53 P_L: but awful android is awful Feb 11 14:32:56 p_l: i want to just add a camera picker Feb 11 14:33:11 p_l: to support an external webcam Feb 11 14:35:22 p_l: any pointers? Feb 11 14:36:03 No pointers in java! Feb 11 14:36:08 hehe Feb 11 14:36:13 not what i meant :p Feb 11 14:36:20 :P Feb 11 14:36:55 (except for the dreaded nullpointer) Feb 11 14:37:08 but yeah i need to change a propper cam app, would like to reuse the original one Feb 11 14:37:23 Hello. Feb 11 14:37:28 how come the originals are not sandboxed Feb 11 14:37:34 HDroid: :D Feb 11 14:37:48 yellow_: I think in your case you're getting a bit into modifying the framework Feb 11 14:38:05 (as the Camera app simply gets a stream from the media framework) Feb 11 14:38:06 yellow_: a lot of the stock pps use private apis Feb 11 14:38:13 which makes it a bitch to compile Feb 11 14:38:16 yeah but i cant take care of the rest, i just need to build the app itself Feb 11 14:38:24 yeah Feb 11 14:38:28 i guess Feb 11 14:38:32 BUT Feb 11 14:38:43 then you need to reimplement all of camera device handling Feb 11 14:38:58 i did find somewhere in xda-foruns that some guys have an apk for the "latest" gallery AND camera Feb 11 14:38:59 (or of network stream, if it's over network) Feb 11 14:39:03 so they must have built it somehow Feb 11 14:39:14 yellow_: yes, and it still uses the same camera as in device Feb 11 14:39:29 yes, but they did cherrypick the original source Feb 11 14:39:31 ? Feb 11 14:39:40 they build the entire platform Feb 11 14:39:44 to be able to compile just that apk? Feb 11 14:39:44 or use some other voodoo Feb 11 14:39:46 really? Feb 11 14:39:51 omg :/ Feb 11 14:40:10 yellow_: Camera.apk etc. require full source set to build, you don't have to build whole framework though Feb 11 14:40:11 this will be hard :/ and i only got a couple of days im doomed Feb 11 14:40:15 I think they will have ripped the apk, modded profiles and any xml stuff Feb 11 14:40:25 I'm wondering how you people usually handle the support for different screen sizes. I develop with Unity, but I've looked through the docs for supporting different screens for Android. Looks like the standard way is to let the system scale your graphics, or supply different graphics for different dpi, all inthe same .apk. However, we're doing a game with a lot of 2D graphics, and would prefer to deliver them pixel perfect (unity scales graphics poorly). Feb 11 14:41:07 the auto scaling works well for standard layouts Feb 11 14:41:15 there is a svg library you can use Feb 11 14:41:22 Kryigerofe: pixel perfect, lol Feb 11 14:41:23 p_l: do you know where i should learn about that? Feb 11 14:41:26 It would probably be most straightforward for us to deliver a different version for every screen height, but that seems to be impossible. Feb 11 14:41:26 if you're doing games, then I expect you;d need to draw yourself, maybe the opengl support? Feb 11 14:41:28 well, vector, or supporting every screen size out there Feb 11 14:41:39 mikedg: Can you explain why it's funny? Feb 11 14:41:51 I'm kind of new to Android, I've always done pixel perfect for iOS. Feb 11 14:41:55 sysRPL: btw, startActivityForResult(Intent(Intent.ACTION_GET_CONTENT).setType("*/*").addCategory(Intent.CATEGORY_OPENABLE)) etc and you got your file chooser... except there needs to be an app that will serve it Feb 11 14:42:00 no reason they can;t ben in the same APK Feb 11 14:42:02 moire patterns prove the non-existence of pixel perfect :) Feb 11 14:42:09 theres a million different screen densities Feb 11 14:42:19 yellow_: not really. XDA might have links, also there were some informations on building framework on android website Feb 11 14:42:23 lasserix: do better filtering Feb 11 14:42:25 :) Feb 11 14:42:28 if you get away from wanting stuff to be the same physical size like you would in an app, it becomes less laughable Feb 11 14:42:30 Kryigerofe: there is a library for supporting svg Feb 11 14:42:44 p_l: thanks Feb 11 14:42:51 but UI related graphics are still a mess Feb 11 14:43:24 then toss in different aspect ratios for device screens Feb 11 14:43:25 ugh Feb 11 14:43:40 lasserix: We're not using Scalable Vector Graphics. Feb 11 14:44:24 mikedg: We'd be fine with providing different images for all of those millions of screen densities (or at least the 100 000 most common). Feb 11 14:44:47 But I haven't been able to figure out how to not have to force everyone to download all of them. Feb 11 14:45:14 Kryigerofe: external data pack Feb 11 14:45:15 download them at launch Feb 11 14:45:20 like most do it Feb 11 14:45:23 p_l, and i need a listener or callback object to get notified of the result of the intent ... which again is awful ... you are trying to convince yourself that programming for android isn't crappier than what existed 15 years ago -> if FileDialog.Execute then Lines.Load(FileDialog.FileName) <- oh, why couldn't programming for android be this sophisticated. the technology just isn't there yet Feb 11 14:45:38 Hmm. That does seem like a possible solution. Feb 11 14:45:47 Thanks. Didn't think of that. Feb 11 14:46:03 And really? Most people download their graphics at first launch? Feb 11 14:46:05 sysRPL: result of what intent? Feb 11 14:46:21 Kryigerofe: well if they are fixed pixel assets Feb 11 14:46:33 Kryigerofe: or just really really big data Feb 11 14:46:35 :) Feb 11 14:46:39 sysRPL: it's called asynchronous and event driven programming Feb 11 14:46:50 sysRPL: well, you can just use a 3rd party library like you're constantly quoting to do so Feb 11 14:47:01 Thanks, StingRay, they indeed are fixed pixel assets. Feb 11 14:47:04 Windows, web dev, and most other environments are simialr Feb 11 14:47:07 if you are using a listener or callback object to get notified of the reuslt of an intent, then you are doing something wrong Feb 11 14:47:26 Kryigerofe: make sure you have a good artist on the creation of lesser versions ;) Feb 11 14:47:28 Why can't I just type "fixMyProblem()" in assembly and have my ERP system work? The technology just isn't there yet. Feb 11 14:47:30 also, the async model is to keep the UI responsive, instead of the wonder of Win16/32 of ghost patterns when app hung the event loop by opening a dialog this way Feb 11 14:47:47 p_l, other people here are the one that keeps saying 3rd party, not me Feb 11 14:47:59 sysRPL: Windows Phone development sounds right up your alley Feb 11 14:48:05 await is awesome Feb 11 14:48:05 sysRPL: No, you're quoting code from VCL, a third party library Feb 11 14:48:11 Anoia, the model of event driven programming android uses is very bad Feb 11 14:48:15 StingRay_: I believe we do have a good artist, and we're going to try automating the rescaling with ImageMagick (and yes, we know it's not probably that straightforward). Feb 11 14:48:16 I did my first GUIs on it, I still remember those classes Feb 11 14:48:43 Kryigerofe: I've been a game artist for 17 years, DONT do that!!! Feb 11 14:48:48 :) Feb 11 14:49:43 ... also, what the fuck happened, if Delphi programmers are trying to act like Smug Weenies? Feb 11 14:49:58 p_l, i am providing a reference to a programming design which demonstrates a modern straight forward way to write something Feb 11 14:50:12 p_l, i am providing a reference to a programming design which demonstrates a modern straight forward way to write something Feb 11 14:50:18 what makes it modern? Feb 11 14:50:46 if (fileChooser.Execute()) then lines.Load(fileChooser.FileName) // there now C# Feb 11 14:51:08 mikedg, the fact that it's clear and cleanest Feb 11 14:51:16 and easiest Feb 11 14:51:18 clear to whom? Feb 11 14:51:28 StingRay_: Why not? Will it look horrible? Feb 11 14:51:38 Application.CalculateMyFinances() is easiest Feb 11 14:51:41 mikedg, to people that use common sense and aren't moronic Feb 11 14:51:43 and cleanest Feb 11 14:51:56 so... just write the code and reuse it? Feb 11 14:52:12 Kryigerofe: well, compared to some1 choosing filter method/resize type based on visual aesthetic ..... erm YES!! Feb 11 14:52:16 Also, StingRay_: Can you tell me one more thing about the download suggestion: Do we need our own server for that or can the downloads be put on the marketplace sites? Feb 11 14:52:34 Kryigerofe: I have little idea, sorry Feb 11 14:52:35 It's all a matter of libs, both VCL's and System.Windows.Forms file choosers just provide an extra convenience lib for that Feb 11 14:52:41 Well, the artist would choose those and then we'd use ImageMagick. Feb 11 14:52:50 OK, thanks for your help. Feb 11 14:52:56 p_l, okay, please elighten me how do write a chooser without an inner class/callback to notify you of the dialog result? Feb 11 14:53:18 sysRPL: not possible in java yet, because in fact its lacking lamba methods Feb 11 14:53:32 such that you could write .. if (executeDialog()) { /* code here */ } Feb 11 14:53:44 timroes, yeah that is another issue Feb 11 14:53:47 but thats nothing new, that java is lacking lamba expressions, and might be a bit behind c# from its syntax (ofc the newer language can learn from older ones misstakes) Feb 11 14:53:57 timroes, yeah, again that's another issue Feb 11 14:54:04 given that the fileChooser classes you mention use callbacks or Looper (like the internals of UI thread on Android)... Feb 11 14:54:07 actually they wanted to introduce them with jdk7 what they somehow didn't succeed Feb 11 14:54:15 so they are coming now with jdk8 Feb 11 14:54:29 timroes, we know that, ty very much Feb 11 14:55:06 so what'd you expect? Feb 11 14:55:11 .. Feb 11 14:56:31 Hi, if I want to created a button that really acts like a switch and has a different background depending whether it is on or off, is it necessary for me to subclass Button and override onDraw()? Feb 11 14:56:32 timroes, how about no callback or inner class required, and that certain methods have a message pump inside them and pass the result back to the caller rather than a inner class/callback Feb 11 14:57:38 that's fine if you are willing to suspend the rest of your apps UI, and yes, can be done, just forget the ability to use external resolvers Feb 11 14:57:42 lol Feb 11 14:57:57 (because external resolvers do run async) Feb 11 14:58:22 haqe17: if you don;t want to use the standard on/off control Feb 11 14:58:23 why should code like ... if (promptThe USerToDoiSomething()) { /* should not block */ } Feb 11 14:58:32 well, you can code your own event loop handling to deal with updating your UI, like with Win32 OpenFileDialog (I think you could hijack its event loop for that) Feb 11 14:59:02 p_l, THE WAY IT IS NOW IS FUCKING RETARDED Feb 11 14:59:28 watch your language Feb 11 14:59:30 sysRPL: not my fault people didn't like Genera enough. Or how they hang dogs on X11 Feb 11 14:59:38 sysRPL: ofc would be neither, but unfortunately java doesn't have such thing as async. If i remeber right its also pretty new (4.0+?) in .net. Ofc would be nice to have that stuff also in java. But as i said, java isn't the most modern language compared to .net (same like C isn't the most modern language compared to java) Feb 11 14:59:39 haqe17: https://github.com/mrn/switch < you can check this out. Feb 11 14:59:46 sysRPL: Chill out. Feb 11 15:00:11 tell oracle to implement it in java.. i mean I don't like microsoft, but oracle is imho a way way worse company (apple niveau) and so I am a bit not so hopefull for getting that kind of syntax very soon Feb 11 15:00:14 novie, sorry, i didn't realize caps lock was on. my apologies Feb 11 15:00:14 welcome to heavily popular, "modern", early 1980's, "ui on single thread only" mentality of OSX, Win32, Android, and Wayland Feb 11 15:00:26 sysRPL: that also applies to your trolling. Java is Java. Feb 11 15:00:26 hi.. does anybody know how can I disable the "Always on when charging" setting (or development options) programatically? Feb 11 15:00:30 would still hope google would take over Java some time :) because they have a pretty lucky hand for modern languague design Feb 11 15:00:44 Anoia: no, it has to be like a button. Feb 11 15:00:59 sysRPL: try javascript Feb 11 15:01:09 mikedg, i have Feb 11 15:01:58 mikedg, it's actually a lot better than java, just due to the single fact that you can pass functions as arguments Feb 11 15:02:20 is there a point to this conversation? Feb 11 15:02:27 that's not very object oriented Feb 11 15:02:33 SaveButton.OnClick = SaveFileClick; Feb 11 15:02:44 and again, java8.. Feb 11 15:02:48 the technology isn't there yet Feb 11 15:02:59 mikedg: most "object oriented" code isn't Feb 11 15:03:01 sysRPL: let's move on. no point in beating a dead horse here. Feb 11 15:03:10 timroes, j8 is only adding lambdas, not function references Feb 11 15:03:13 including pretty much 99% of java (and C#) Feb 11 15:03:21 i would use sysRPL++ Feb 11 15:03:32 sysRPL: you can pass around Method References, as they call it Feb 11 15:03:36 sysRPL: in fact it does add method references Feb 11 15:03:41 Lambda is jdk7, iirc Feb 11 15:06:12 Any of you guys tried RoboSpice? Feb 11 15:06:36 https://github.com/soryy708/Astrolo9 // Anybody wants to do some code revision & give me tips on refactoring this? Feb 11 15:07:08 soryy708: use java naming conventions Feb 11 15:07:45 timroes: Why? Feb 11 15:08:07 you wanted some tips on how to refactor it (and with refactoring I always would suggest because you want to have cleaner code?) Feb 11 15:08:35 timroes: I don't see how changing the naming convention will make it cleaner. Feb 11 15:08:38 so what did you guys think of Justin Timberlake at the Grammys? Feb 11 15:08:44 mikedg: minus the async task part: I love this library, https://github.com/square/retrofit Feb 11 15:09:31 soryy708: taking wrong package names (like you did) is not just a question of clean, but there is a sense in why you need a domain that belongs to you Feb 11 15:09:49 sometimes I think Square just has Jake Wharton chained up to a desk with 5 computers surrounding him Feb 11 15:10:09 mikedg: there's lots of guys there doing awesome work. Feb 11 15:10:28 dagger is a great library. Feb 11 15:10:44 * memoryleak asks himself if there is nice way to tell someone that he literally stinks Feb 11 15:10:45 timroes: soryy708.a9 // What's the problem? Feb 11 15:11:03 i guess you don't own the domain a9.sory708? Feb 11 15:11:20 oh wow, never realised how much they have out there Feb 11 15:11:20 https://github.com/square Feb 11 15:11:26 yuo Feb 11 15:11:28 yup Feb 11 15:11:51 I have been using otto, retrofit and dagger in projects. Tape is another one that looks pretty awesome. Feb 11 15:11:59 timroes: I think it's soryy708.a9, not a9.soryy708 Feb 11 15:12:09 http://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html Feb 11 15:12:13 okhttp looks interesting Feb 11 15:14:21 is it possible that handle touch event of TextView's link text? Feb 11 15:15:00 timroes: I don't see the problem. I am soryy708, and the app is called (a)strolo(9). Feb 11 15:15:11 ... Feb 11 15:19:04 Is it possible to disable the "Always on when charging" setting programmatically? Feb 11 15:19:17 or even disable the development settings Feb 11 15:19:20 rcosta: not through normal APIs Feb 11 15:19:27 if you have root, sure Feb 11 15:19:44 p_l, that won't be a problem Feb 11 15:19:50 tell me more about it please Feb 11 15:22:50 sorry, I don't have data on that on-hand Feb 11 15:22:56 ask on XDA-developers, IMO Feb 11 15:22:59 or #android-root Feb 11 15:23:10 (because people who muck around with extensions might know) Feb 11 15:23:45 from adb/shell is there a way to check the permissions used by an apk? Feb 11 15:24:17 p_l, thank for the directions ;) Feb 11 15:26:19 doldrim: On my machine, an apk opens like a zip file (with the same programs that will open a zip file), letting you peek at the AndroidManifest.xml Feb 11 15:26:44 xalbo: that's because it is a zip. Feb 11 15:27:16 That's sort of what I thought, but I was too lazy to look up whether it was really a zip or a jar (or whether a jar is just a zip, too) Feb 11 15:29:52 xalbo: that's a compressed/binary manifest tho so you won't quite get the original back out Feb 11 15:30:11 Huh, you're right. Well, that's annoying. Feb 11 15:31:14 * xalbo decides to shut up, stop poking around at random, and let people who actually know what they're talking about answer. Feb 11 15:36:45 I'm using a SherlockPreferenceActivity and a prefs.xml to create an app configuration dialog. I would like to let the user choose a directory to download files to. How can I achieve this? Feb 11 15:37:30 memoryleak: listView Feb 11 15:37:42 doldrim: http://code.google.com/p/android-apktool/ looks promising Feb 11 15:38:24 StingRay_: That's not the problem, I would like to catch the click event on the "DownloadDirectory" preference field and show an own dialog Feb 11 15:38:30 Is that possible? Feb 11 15:38:58 ahh cool xalbo, thanks Feb 11 15:39:13 StingRay_: memoryleak: sorry not used pref activity, but I'd just popup a listView in dialog Feb 11 15:40:05 get user to choose Feb 11 15:44:02 1.5 hours of scrums in a row.. fml Feb 11 15:44:03 hi. in admob ID in the XML, what should i put? the publisher ID? Feb 11 15:46:23 (16:43:32) mikedg: 1.5 hours of scrums in a row.. fml Feb 11 15:46:23 gutted :-/ Feb 11 15:46:34 "agile" development Feb 11 16:01:01 FreeAir: and you pasted his comment from 120 seconds ago because ... ? Feb 11 16:04:57 (17:00:31) pragma-: FreeAir: and you pasted his comment from 120 seconds ago because ... ? Feb 11 16:04:57 It was clear why. Thanks for the nick ping, pragma-. Feb 11 16:05:19 FreeAir: we care about your timestamps because ... ? Feb 11 16:05:44 you're two minutes fast too Feb 11 16:05:49 (17:04:49) pragma-: FreeAir: we care about your timestamps because ... ? Feb 11 16:05:50 I know how much you like them, now ;-) Feb 11 16:06:00 stop flooding, thanks. Feb 11 16:06:19 (17:05:30) pragma-: stop flooding, thanks. Feb 11 16:06:19 Sure, no problem. Stop wasting my time, in return. Feb 11 16:06:28 novie: do something about this guy. Feb 11 16:12:16 Free Air knock it off Feb 11 16:15:27 I have an index out of bounds at offset 510. How do I find out what line offset 510 is? Feb 11 16:15:48 the stacktrace includes the line numbers Feb 11 16:16:14 stacktrace? Feb 11 16:16:24 00 Feb 11 16:16:57 unless you're referring to the data itself? Feb 11 16:17:42 Theres nothing in the console tab in Eclipse mentioning it Feb 11 16:17:54 Surely there is in logcat ? Feb 11 16:18:12 Nope. Just in "Error Log" Feb 11 16:18:34 Ah, found it Feb 11 16:18:37 Double click :P Feb 11 16:19:32 Failed to resolve selection in '=AppName/src Doesnt show anything else than that specific to my activities Feb 11 16:21:14 The Exception Stack Trace is here: http://pastebin.com/bz8zPNUW Feb 11 16:22:12 same Exception Stack Trace for my other activity at another offset Feb 11 16:22:46 nice, pastebin.com is timing out at "requesting data from www.facebook.com" Feb 11 16:22:56 haha Feb 11 16:23:02 Your eclipse is fucked Feb 11 16:23:16 Good Feb 11 16:23:28 I thought it was app-related Feb 11 16:23:52 How can you think that ;/ Feb 11 16:24:00 It even says "at org.eclipse..." Feb 11 16:24:24 Since it mentioned the activity first Feb 11 16:24:40 I can't reproduce the error now though Feb 11 16:24:48 magically fixed itself Feb 11 16:29:15 is it possible that change style of EditText context menu(cut, paste, copy etc...)?? Feb 11 16:47:28 hjpark: you mean in the actionbar? Feb 11 16:47:44 no he means the copy paste popup stuff Feb 11 16:48:22 i think that is styled by the system Feb 11 16:49:46 depends on what version of android you are dealing with I think. Feb 11 16:56:11 https://developer.android.com/reference/android/R.attr.html#actionModeCopyDrawable Feb 11 16:56:15 etc Feb 11 16:56:46 Oh, popup Feb 11 16:57:02 yeah, this wont work for outdated platforms Feb 11 17:01:53 When was it introduced? Feb 11 17:01:56 4.x? Feb 11 17:04:58 is it me or is devloping for android harder than ios Feb 11 17:05:16 for a novice in particular Feb 11 17:05:55 it's you Feb 11 17:05:57 speaking from some1 who doesn't program / hadn't ... and who has tried both Feb 11 17:06:19 maybe a total complete novice to development Feb 11 17:06:25 I found obj-c a bit odd and convoluted , but the tools more pleasing to work with Feb 11 17:06:33 obj c is so unlike other languages Feb 11 17:08:05 I find java easier to understand, but the tools a little crappy Feb 11 17:08:11 it's true obj c is different but it seems simpler to do simple things like display input text to a screen Feb 11 17:08:13 well the platform Feb 11 17:08:56 someJunk.setText(text) vs [somjunk setText:text]; Feb 11 17:09:13 Android is much much easier for me, since step 0 of developing for iOS is "get a Mac" Feb 11 17:09:29 mikedg: but to another activity Feb 11 17:09:39 and with the keyboard rather than hardcoding the string Feb 11 17:10:22 some developers owuld say ios is a pain in the ass to restore "Activity" state Feb 11 17:10:23 maybe i'll think differently in a few more days when i get the hang of things Feb 11 17:10:30 it's all about trade offs Feb 11 17:11:22 I'm still not familiar with the concepts of activities and intents Feb 11 17:11:38 is an activity literally just a UIView Feb 11 17:12:11 initially it's fine to think of it that way Feb 11 17:12:21 if that helps Feb 11 17:12:34 did you go through the tutorials and api guides at d.android.com? Feb 11 17:12:47 it's pretty much a foreground component of an app Feb 11 17:12:51 I think the Android Guide/Training explains the concept of an Activity and Fragment pretty well. It's a lot of text, but well worth reading since it's so fundamental. Feb 11 17:13:38 mikedg: i'm going through them now, i'm at the build an intent part and it's getting very confusing from here. especially with the findViewbyID() etc Feb 11 17:14:35 and an Intent is a message - can be sent to a specific component, or to any/all matching components, can contain data, and can request a result... Feb 11 17:16:17 Leeds: I'm thinking of intent as calling something Feb 11 17:16:22 like a method Feb 11 17:16:30 that's too specific Feb 11 17:16:43 think of an intent as a boner Feb 11 17:16:51 you may have someone's name in mind for it Feb 11 17:16:59 looooooool Feb 11 17:17:02 but really anything can pretty much swoop in and accept it Feb 11 17:17:15 ugh, what does that make a PendingIntent? Feb 11 17:17:18 and it can carry all sorts of data Feb 11 17:17:27 Leeds: i dont know Feb 11 17:17:40 a vibrator? Feb 11 17:17:55 you can give it to someone to be used later without your knowledge Feb 11 17:18:06 this is the weirdest explanation I have seen Feb 11 17:18:19 it's also the most correct non technical explanation possible Feb 11 17:18:26 is it ? Feb 11 17:18:36 i'm pretty confident that it is Feb 11 17:18:49 this is going to stick with me for a while Feb 11 17:19:01 you not think a post-it and a letter maybe better ? Feb 11 17:19:03 if not the most correct, it's clearly the best Feb 11 17:19:24 oh yeah, best by a long shot...specially for entertainment Feb 11 17:20:21 i could do with some entertainment going through tutorials and all this studying Feb 11 17:20:42 but yeh, so a post-it could also be an intent? Feb 11 17:20:58 pendingIntent Feb 11 17:21:04 ah Feb 11 17:21:04 a post it is more of a pending intent Feb 11 17:21:21 letter being a forwardable set of sh*t Feb 11 17:21:32 post-it being...who the f*ck cares Feb 11 17:21:36 :) Feb 11 17:22:01 marco_: in case you don't know, a PendingIntent is an Intent which you can pass to another component for it to deliver later on your behalf - say to the AlarmManager to deliver at a specific time Feb 11 17:22:51 ah i see Feb 11 17:22:52 Leeds, thanks Feb 11 17:23:38 i just dont get why method calling isn't used instead of intent Feb 11 17:23:57 and why we call it activity instead of a view Feb 11 17:24:09 i'm probably really misunderstanding everything i should read more and come back :P Feb 11 17:24:31 Activity is certainly not a View. Feb 11 17:24:43 hi guys Feb 11 17:25:13 because Intents are a lot more flexible than method calling Feb 11 17:25:51 Leeds: how so? Feb 11 17:25:54 IPC is the biggie. Feb 11 17:26:04 I have a little doubt, why as soon as I do myCamera = Camera.open(i); my app dont respond and i need to reboot the device to have the camera back? Feb 11 17:26:57 the most very simplest example is that you can call an Intent to do something without knowing what app is going to handle it - obvious default is 'open a URL' - which could be handled by any number of browsers, but also site-specific apps (e.g. youtube or g+) or file-format-specific (e.g. a media player which can handle URLs ending in .mp4) Feb 11 17:27:13 intents can contain many filters. Feb 11 17:27:57 the ability to define what type of intents parts of your application can handle, regardless of who is firing the intent is quite flexible. Feb 11 17:28:27 upld: you probably just need to end your app/task not restart device Feb 11 17:28:40 ahh I see that makes a lot more sense now Feb 11 17:29:16 so it's basically like do this, but when or who is unspecified Feb 11 17:29:44 StingRay_ tks Feb 11 17:29:46 as I said the first time, you *can* specify a destination if you want to, or you can leave it up to the system to deliver to an/any/all interested components Feb 11 17:29:55 ah right Feb 11 17:30:33 it is that flexible. Feb 11 17:30:35 if you're opening a new Activity within your app, you probably want to specify it... if you're opening a URL without knowing what it points to, you should let the system decide where to deliver it Feb 11 17:31:41 Hi Feb 11 17:31:52 Here's an explanation from sam's teachyourself of an Activity: 'An activity is a core component of the Android platform. Each activity represents a Feb 11 17:31:53 task the application can do, often tied to a corresponding screen in the application Feb 11 17:31:53 user interface.' Feb 11 17:31:56 wow sorry Feb 11 17:33:02 I thought that would appear as one line.. Anyway, so an activity is not a view but features of the app? :S Feb 11 17:33:29 I'd say s/activity/fragment/ Feb 11 17:33:29 iam writing a filebrowser activity and i have a listview with an adapter, the data in the data list changes but the listview itself will not update, i thought thats enough to say the adapter that the data is updated, thats what i have done https://gist.github.com/stubb/83f6e53975339265462d and there have to be a mistake, can anyone take a quick look at it? thanks in advance Feb 11 17:33:46 an Activity is a foreground component... fragments confuse things slightly Feb 11 17:34:20 Leeds: what's a foreground component? like a textfield a button etc? Feb 11 17:34:26 er, no... Feb 11 17:34:43 a chunk of app which runs in the foreground, as opposed to a Service which is a chunk which runs in the background Feb 11 17:34:49 Kilian]: you need to call notifyDatasetChanged() after it changes Feb 11 17:35:03 i see Feb 11 17:35:50 Kilian]: hmmm, checking the code, you never make changes to the ArrayAdapter, just make a new one Feb 11 17:36:34 clever: that doesnt change anything, i thought its enough to change the listarray with the data Feb 11 17:37:05 Kilian]: i ArrayAdapter makes a copy of the array you give it Feb 11 17:37:43 No, it keeps a reference to the instance Feb 11 17:37:45 clever: ah, okay. so i have to modify the data in the adapter, thanks for the hint Feb 11 17:37:49 Kilian]: one simple method, is to just make a new ArrayAdapter each time your list changes, and put that into the list Feb 11 17:38:02 And then you reference another list: fileList = r; Feb 11 17:38:09 Without telling the adapter in any way Feb 11 17:38:15 It still has a reference to the old list Feb 11 17:39:29 Leeds thanks btw Feb 11 17:40:21 you're (reasonably) welcome :) Feb 11 17:41:21 Good guy Leeds Feb 11 17:41:59 leeds peeds Feb 11 17:42:02 meads Feb 11 17:42:03 keads Feb 11 17:42:09 SimonVT: and clever thanks for the help! Feb 11 17:42:21 * novie kicks mikedg for acting like a 2 year old. Feb 11 17:42:53 if not me then who else Feb 11 17:43:20 * novie votes for no one. Feb 11 17:43:39 thanks for the help mikdg and novie also, gonna carry on with the tutorials and hopefully it will all unfold Feb 11 17:44:02 good luck. Feb 11 17:44:08 marco_: most important thing is to take your time to get your head around this stuff - you'll appreciate it later Feb 11 17:44:11 anyone have a guess as to why scripts already in int.d get executed, but scripts I put there don't? Feb 11 17:44:12 Hey guys.. Anyone good with ADB?? -- Having trouble.. Feb 11 17:44:24 DrDank: what are you trying to do? Feb 11 17:45:01 andkore, Trying to root my Samsung Epic 4G.. and all the one click deals im findiing doesnt work.. and when I open up cmd prompt.. adb devices.. the phone shows.. but once I do adb shell and try it again.. it deosnt do anything adb: not found. Feb 11 17:45:13 DrDank > #android-root Feb 11 17:45:17 yeah Feb 11 17:45:41 once you do adb shell you are in the phone's shell Feb 11 17:45:55 you can't run adb because there's no command called that on your phone Feb 11 17:46:08 andkore, well when I try to do a push cmd to put files on the phone.. it still says adb: not found. Feb 11 17:46:16 #android-root Feb 11 17:46:18 @novie, Ive been trying there for 3 days.. no luck with anyone. Feb 11 17:46:23 DrDank: that sometimes comes up when /bin/sh doesnt exist Feb 11 17:46:25 DrDank: that doesn't make this the place Feb 11 17:46:29 you do the push before adb shell Feb 11 17:46:39 ooh.. Feb 11 17:46:42 didnt know that. Feb 11 17:46:53 argh Feb 11 17:47:04 Leeds: ? Feb 11 17:47:18 andkore: this isn't #android-root ... Feb 11 17:47:26 the dumbness in rooting is bottomless Feb 11 17:48:04 novie: the channel isn't too busy. I think it'll survive Feb 11 17:48:14 andkore: that isn't the point. Feb 11 17:49:08 ok so where should I ask my question? in #android? nobody talks in there Feb 11 17:49:27 That's not really our issue Feb 11 17:49:37 You Feb 11 17:49:42 've been pointed to the right place Feb 11 17:49:52 If it's dead, find some other place Feb 11 17:50:24 google voice Feb 11 17:50:27 shares sms on phone and tablet Feb 11 17:50:37 andkore: what question? Feb 11 17:50:40 oops Feb 11 17:50:41 wrong channel Feb 11 17:51:03 your init.d question? what does that have to do with anything here? Feb 11 17:53:03 Leeds how so? Having my rooted phone saved me for debugging several times Feb 11 17:53:18 being able to just pull the database file and look at it with an sqlmanager for example Feb 11 17:53:34 sonOfRa: I don't mean that rooting is dumb - I mean that there is a limitless supply of dumbness in the 'rooting community' Feb 11 17:53:41 oh Feb 11 17:53:46 that is quite true Feb 11 17:53:49 mainly people who have no fscking clue how their system works trying really hard to break it Feb 11 17:54:31 add to that endless "me too" forum threads on xda-dev Feb 11 17:54:47 I stopped rooting after I bought a nexus device Feb 11 17:54:56 Any root needs I have is solved by the emulator Feb 11 17:55:13 also, run-as helps a lot Feb 11 17:55:47 but what is even worse is the people who think they desperately need kill buttons Feb 11 17:55:49 Anyone know where the internal memory is located on the sdcard of a samsung epic 4g? Feb 11 17:56:02 becuase they're apparently smarter than the device considering memory management! Feb 11 17:56:04 DrDank: please stop posting the same question in two places Feb 11 17:56:37 are there any apps to monitor battery usage vs cpu usage? Feb 11 17:57:00 and how much time the lcd backlight is on Feb 11 17:58:00 Well, can't seem to find no help.. irc or google. :-\ Been super frustrating. Feb 11 17:58:46 DrDank: http://developer.android.com/guide/topics/data/data-storage.html#filesInternal Feb 11 17:59:56 Sounds strangs that the internal memory would be on the sd card Feb 11 18:00:03 s/strangs/strange/ Feb 11 18:00:12 Thanks Leeds, Ill check that out! Feb 11 18:00:27 to be fair, you can have external storage without having an SD card, which is also strange Feb 11 18:00:45 Well, how do I access it??? --- I just want to copy a file or two to the internal.. Im not coding nothing.. lol Feb 11 18:00:58 try a user help forum, this isn't it Feb 11 18:01:16 Depends how you define external, really. If you define it as "removable", then sure :p Feb 11 18:02:44 it would probably be better to call them something like (app-)private and shared/media storage, rather than internal and external Feb 11 18:03:31 also, of course, Android doesn't really handle the somewhat-common case of having two 'external' storage areas, one on internal flash and one on removable storage Feb 11 18:03:31 Yeah, probably Feb 11 18:03:53 which is actually what DrDank is talking about, I think Feb 11 18:03:55 But easier to re-define external than to change the api Feb 11 18:06:47 Hey Guys :) How difficult is it to set up an in-app pruchase? Feb 11 18:07:23 Styler2go: it's a 6 Feb 11 18:07:40 on what scala? Feb 11 18:07:41 (just go look at the docs and guess. No one in here can answer that for you) Feb 11 18:08:05 not scala, Java Feb 11 18:08:13 Yeah.. thats what I'm talking about.. just can't seem to locate the proper folder for it. Feb 11 18:08:34 is there any good tutorial about this? Feb 11 18:08:56 Styler2go: you've read the docs and looked at the samples, presumably? Feb 11 18:09:15 there are no samples Feb 11 18:09:25 there is Feb 11 18:09:31 a dungeons one or something Feb 11 18:09:31 http://developer.android.com/google/play/billing/billing_overview.html Feb 11 18:09:45 oh yeah. there a sample app Feb 11 18:09:46 all ok Feb 11 18:10:02 but i have to load the billing library for that :) Feb 11 18:12:13 a PayPal-donate button is forbidden, right? Feb 11 18:12:35 i've seen them b4 Feb 11 18:13:03 i heard it is forbidden cause of their tos, maybe this was an old post i've seen Feb 11 18:13:51 Styler2go: oh and I think you need a bit of design consideration on your main activity UI Feb 11 18:14:10 Is there any means of Ellipsis text in a Label? Feb 11 18:14:13 yeah.. did u look in my app today? Feb 11 18:14:20 yeah :( Feb 11 18:14:25 horrid buttons Feb 11 18:14:30 yes >.< Feb 11 18:14:32 well not horrid Feb 11 18:14:39 I'm trying to compile against Google Downloader but it's using functionality from apilevel-11 and 13... but my project is apilevel-9 Feb 11 18:14:42 just way off the style of the app Feb 11 18:14:52 is there a way to set this picture on the bottom middle to a percent width? Feb 11 18:15:01 is there something I need to know? Feb 11 18:15:15 Styler2go: in code yeah Feb 11 18:15:17 shouldn't it be available for apilevel-4 and up ? Feb 11 18:15:37 what is "Google Downloader"? Feb 11 18:15:40 Styler2go: or in a horrid way using layout weight Feb 11 18:15:46 Google Downloader API for downloading OBB files Feb 11 18:15:55 when they're missing etc. Feb 11 18:15:57 so i should use the code way yes? :) Feb 11 18:16:16 Styler2go: up to you Feb 11 18:16:19 it's for instance using Notification Builder which was introduced in apievel 13 Feb 11 18:16:37 i will use code way lets search for it :) Feb 11 18:16:48 any help would be appreciated Feb 11 18:18:50 hey guys so to start and activity the constructor takes two parameters - 'A Context as its first parameter (this is used because the Activity class is a subclass of Context)'. I don't quite understand their explanation for it. What is context? Feb 11 18:19:02 I'm talking about play_apk_expansion and play_licensing Feb 11 18:20:41 Context is a class that other classes (e.g. Activity) extends Feb 11 18:21:25 barque: Unless those classes are actually used on older platforms, there is no issue Feb 11 18:21:43 I can't compile against it Feb 11 18:21:48 Why not? Feb 11 18:21:56 well.... Feb 11 18:22:01 I get compile errors from Java Feb 11 18:22:04 my api level is 9 Feb 11 18:22:08 (as I mentioned) Feb 11 18:22:14 So compile against a new API Feb 11 18:22:16 I don't have Notification Builder Feb 11 18:22:18 newer* Feb 11 18:22:21 but shouldn't i understand what's in the context class to know how it is used? Feb 11 18:22:22 ...? Feb 11 18:22:29 I just downloaded it from the SDK Manager Feb 11 18:22:40 I can't change my apilevel Feb 11 18:22:44 that's publisher requirements Feb 11 18:22:57 is the Downloader apilevel-11 and up or something? Feb 11 18:22:59 or 13? Feb 11 18:23:03 13* rathewr Feb 11 18:23:05 rather* Feb 11 18:23:13 so why is 'this' used? Feb 11 18:23:23 the documentation clearly says it is for apilevel-4 and up Feb 11 18:23:28 You do know that even if you compile against api13, your app will still work on api4? Feb 11 18:23:30 did they change their minds? Feb 11 18:23:46 or a more specific question, why does there have to be a context as the first parameter? Feb 11 18:24:05 well my apilevel is 9... if I install this on a Android 1.5 ... it'll work? Feb 11 18:24:24 As long as you only use methods that exist on android 1.5 when running on android 1.5 Feb 11 18:24:31 well that's the problem Feb 11 18:24:51 the Google Download API uses Notification Builder which was introduced in apilevel 11 or 13 or something Feb 11 18:24:52 and set minimumsdk as ... what, 4? Feb 11 18:25:19 my problem is that I can't compile against it... but just double checking : Google's dox say it was designed for apilevel-4 and up Feb 11 18:25:21 But Notification.Builder is only used when running on 11/13+ Feb 11 18:25:22 am I missing something? Feb 11 18:25:38 barque, NotificationCompat.Builder works on api level 4 Feb 11 18:25:43 it's highly likely using that Feb 11 18:26:04 actually javac me they're using Notification.Builder Feb 11 18:26:05 or just some other way Feb 11 18:26:06 let me double check Feb 11 18:26:15 1> [javac] void setProgress(Notification.Builder builder) { Feb 11 18:26:34 Notification.Builder is used in public class V14CustomNotification, which is only used when if (android.os.Build.VERSION.SDK_INT > 13) Feb 11 18:26:42 so does this mean Google has now decided (on its own) to bump up the version requirement? Feb 11 18:26:54 oh I see Feb 11 18:26:58 The only issue here is failure to change build target Feb 11 18:27:17 ok ... Feb 11 18:27:25 so I can rip that code out or something? Feb 11 18:27:32 no need Feb 11 18:27:34 Why would you do that Feb 11 18:27:40 barque: this code is only executed when running on a sufficiant device Feb 11 18:27:41 I can't change my apilevel... just saying Feb 11 18:27:43 Just build against 14+ Feb 11 18:27:46 right right Feb 11 18:27:46 just compile against a new enough sdk Feb 11 18:28:00 it's not in my authority to change the apilevel on my end Feb 11 18:28:04 I'm not coding alone Feb 11 18:28:10 Building against api4 does not mean your app wont run on api9 Feb 11 18:28:17 s/api4/api14/ Feb 11 18:29:16 just need to make sure you're not using api level 14 functions on api level 9 device Feb 11 18:29:27 right... Feb 11 18:30:54 what's the purpoes of the first parameter being a context when starting a new activity? Feb 11 18:31:37 marco_: when starting a new activity, you only pass in the intent as sole parameter? Feb 11 18:31:47 It needs to call methods that exist in Context Feb 11 18:33:47 SimonVT: in other words, it needs to call methods that exist in Activity? Feb 11 18:34:07 No, Context Feb 11 18:34:15 Otherwise it'd require you to pass an Activity Feb 11 18:34:40 sorry i'm so confused Feb 11 18:36:36 Context has many subclasses, one of which is Activity Feb 11 18:37:03 The constructor you're using requires a Context, but not necessarily an Activity Feb 11 18:37:52 Java 101 :) Feb 11 18:37:56 ah I see, and this refers to the activity Feb 11 18:38:09 Yes Feb 11 18:38:16 SimonVT: which activity ? Feb 11 18:38:21 the current Feb 11 18:38:23 :? Feb 11 18:38:55 and I know, it's so depressing how much of Java i've forgotten since a year ago. I got a first in my java exam and i can't do the basics :'( Feb 11 18:39:05 "this" refers to the instance of the class you're currently in Feb 11 18:39:18 marco_: doesn;t matter if its the current activity in fact, since the context is only used by the intent to get the package name of the application Feb 11 18:39:40 so every context would be okay, but ofc it makes most sense to just pass it the current activity, since you know that exists Feb 11 18:41:13 ah I see, so you need a context as the parameter which could be any subclass of context in order for intent to get the package name? Feb 11 18:43:15 that sounds like a question for #java Feb 11 18:44:13 oh? cos i've never come across contexts and activities before i thuoght it was android specific Feb 11 18:44:31 but if what i said was correct then i think i understand Feb 11 18:44:36 Or a case of pull the source and check what it uses the context for Feb 11 18:45:39 hm? Feb 11 18:46:23 You're confused about what it uses the context for Feb 11 18:46:29 You can find out by checking the source Feb 11 18:48:08 ya Feb 11 18:48:25 so its not to get the package name Feb 11 18:48:34 Hello :) Feb 11 18:48:59 If you say so Feb 11 18:50:12 Hi all, i am writing come API classes to talk to a spesefic API that returns JSON, insteaf wrap the user having to know the API and what to call to get spesefic info info i am curently wrapping the JSONObject ... array's and so on in classes and providing functions to access spesefic info .. is there a huge preformance differance to do ing it this way, rather than using EG extends JSONObject ? Feb 11 18:50:19 If i will write web like application for android is it possible to get somehow any serial number of it, or is it possible only by native application in java ? Feb 11 18:50:47 the idea is to making it more easy to use the api not having to call stuff manually in the json data Feb 11 19:15:08 hey guys, I'm watching a tutorial and it has R.layout.main and the guy is saying it's refering to the folder path from res, layout then finally to main.xml. Why doesn't it refer to R as in R.java ? Feb 11 19:15:52 It does Feb 11 19:16:14 R.java contains resource ids Feb 11 19:16:22 Each resource has a resource id Feb 11 19:17:25 oh god Feb 11 19:17:27 And each resource id is a reference to layout ou drawable Feb 11 19:17:44 this in app billing is hardcore... or i am doing something wrong Feb 11 19:19:03 so with R.layout.main you're calling the main.xml that has a reference to something in R? Feb 11 19:19:20 or the other way round Feb 11 19:21:18 just look at the R.java file Feb 11 19:22:00 sonOfRa: ah I see, so it calls the layout method in R Feb 11 19:22:10 it's not a method Feb 11 19:22:14 it's a static final class Feb 11 19:22:18 containing integer constants Feb 11 19:22:30 sonOfRa: ah i see Feb 11 19:22:33 R.java is a class called R Feb 11 19:22:43 and in that class called R are several other inner classes Feb 11 19:22:49 ahh i see Feb 11 19:23:21 so iwth regards to the main Feb 11 19:23:37 shouldn't the variable be called main rather than activity_main Feb 11 19:24:15 It should be called whatever your xml file is called Feb 11 19:25:04 but i thought we were still in R.java Feb 11 19:25:31 R.java is generated from your resources Feb 11 19:26:47 hmm Feb 11 19:27:12 i thought we were looking at the layout class in R Feb 11 19:27:22 .main should be somewhere in layout no/ Feb 11 19:27:23 ? Feb 11 19:27:53 does anyone know of a place I can browse the android source code online? Feb 11 19:27:57 I need the source for 4.2.1 Feb 11 19:28:10 actually 4.2.1_r1. I've found a few places but they only have 4.2.0_r1 Feb 11 19:28:14 *not the latest* Feb 11 19:28:15 marco_ what is the layout file called you're looking for? Feb 11 19:28:38 sonOfRa: activity_mainh Feb 11 19:29:31 starbucks is closing :( i've gotta get outta here Feb 11 19:29:35 Then there should be a constant R.layout.activity_main Feb 11 19:29:45 sonOfRa: ah right Feb 11 19:29:48 that's why i was confused lol Feb 11 19:29:50 hmm Feb 11 19:30:05 The R.java file is generated from your resources Feb 11 19:30:09 if you rename the activity xml file Feb 11 19:30:15 the constant will be renamed as well Feb 11 19:30:46 oh right, so if you rename activity_main to main Feb 11 19:30:51 the constant would be called main Feb 11 19:31:19 yeah Feb 11 19:31:29 i see that makes sense Feb 11 19:31:41 sonOfRa: thanks a lot for your help Feb 11 19:31:50 no problem Feb 11 19:32:35 sonOfRa: i'll be back laterr i appreciate it Feb 11 19:32:40 see ya! Feb 11 19:35:54 sleepster, have you tried s.android.com? Feb 11 19:36:35 Would someone have time and wants to help me step by step through the in-app-pruchase setup? :-/ Feb 11 19:36:58 News Feb 11 19:36:58 Source Code Available for Android 4.1 Feb 11 19:36:59 or sleepster, for browsing online, https://android.googlesource.com/ Feb 11 19:37:00 Some news Feb 11 19:37:31 SimonVT, where is that? Feb 11 19:37:39 On the page you linked Feb 11 19:37:44 To the right Feb 11 19:38:08 lol Feb 11 19:38:13 is github.com/android official? Feb 11 19:38:25 I don't believe so Feb 11 19:38:36 and yet it's linked from the topic Feb 11 19:39:06 I really have no idea Feb 11 19:39:25 that's awfully suspicious indeed Feb 11 19:39:29 so? Feb 11 19:39:44 I'd expect there to be more information on the user if it was official Feb 11 19:39:54 it's my github Feb 11 19:39:56 As well as being a complete mirror Feb 11 19:40:00 i do it to make people happy Feb 11 19:40:06 stop shitting on my umbrella Feb 11 19:40:59 everyone has ops but me Feb 11 19:41:13 and i maintain the official github android repository Feb 11 19:42:19 mikedg, do you really? Feb 11 19:42:25 wait who is novie Feb 11 19:42:25 no Feb 11 19:42:37 canadiancow: /info Feb 11 19:42:41 yeah Feb 11 19:42:42 got it Feb 11 19:42:44 :) Feb 11 19:42:53 novie = justin timberlake Feb 11 19:43:40 oh god :( Feb 11 19:44:46 Nobody ever did this in-app purchase? Feb 11 19:45:14 novie = michaelnovajkr ? Feb 11 19:45:22 *jr Feb 11 19:45:23 ^^ Feb 11 19:45:24 no Feb 11 19:45:30 g00s: yes. Feb 11 19:45:30 michaelnovaksr Feb 11 19:45:37 yawn Feb 11 19:45:49 haha Feb 11 19:45:54 * g00s gets popcorn Feb 11 19:46:01 i really will cause you physically harm should i see you again. Feb 11 19:46:05 physical* Feb 11 19:46:09 * jastajr slaps the popcorn out of g00s's hands Feb 11 19:46:19 well at least he's not trolling me this time Feb 11 19:46:25 my dad gets so pissed off at me he can't even type Feb 11 19:46:49 actually, my typing challenge today is because i nearly broke my finger this weekend Feb 11 19:46:50 oh well Feb 11 19:46:52 there you go Feb 11 19:46:55 goodbye, you will be missed Feb 11 19:46:58 but i'm still typing faster than most of you guys ;) Feb 11 19:46:59 i've had this name for years Feb 11 19:46:59 not Feb 11 19:47:05 americancow, since you met me? Feb 11 19:47:08 americancow: I'll ban you next :) Feb 11 19:48:37 what is this, EFNet? Feb 11 19:48:47 efunet i think Feb 11 19:49:06 It's the internet Feb 11 19:49:10 +1 Feb 11 19:51:09 it's sparta Feb 11 19:51:59 * g00s noms onpopcorn in hell Feb 11 19:52:15 guys.. nobody can help? Feb 11 19:52:31 help ? in sparta? Feb 11 19:52:41 ... Feb 11 19:52:48 in-app-pruchase in android Feb 11 19:53:25 canadiancow:know Barbara Moo ? Feb 11 19:55:01 does anyone know of a place I can browse the android source code online? I am particularly interesed in android-4.2.1_r1 Feb 11 19:56:58 sleepster: android.googlesource.com Feb 11 19:57:51 i am on freenode, or? Feb 11 19:58:17 yeah.. i am... Feb 11 20:00:32 free the nodes! Feb 11 20:00:35 avoid the noid! Feb 11 20:00:39 freenoid! Feb 11 20:01:07 jasta: stick with intellij ? Feb 11 20:01:18 sleepster, i answerd your question like 20 minutes ago Feb 11 20:02:26 ... Feb 11 20:09:13 g00s: oh man yes, it's so amazing. Feb 11 20:09:47 g00s, barbara moo? Feb 11 20:10:13 anyone here in the EU can help me get a LG nexus? Feb 11 20:10:31 this is a developer channel Feb 11 20:10:33 try #android Feb 11 20:10:38 or play.google.com Feb 11 20:11:11 When countdown is complete, my alarm rings. But I get "Error (-38,0)" and "start called in state 0" when I click the OK button in the AlertDialog that is supposed to stop the audio playing. Any ideas? http://pastebin.com/SGrgHUSf Feb 11 20:14:01 coding a syncing framework in javascript Feb 11 20:14:03 to port to android Feb 11 20:14:04 lol Feb 11 20:15:13 hmmm android:singleLine="true" works ... but android:maxLines="1" do not ... since android:singleLine="true" is deprecreated what is the correct to use ? Feb 11 20:15:47 define do not Feb 11 20:15:56 it issue is wordwrap Feb 11 20:16:13 it do not want to change line no matter if the text wont fit Feb 11 20:16:21 turn wordwrap off Feb 11 20:17:03 android:scrollHorizontally="true" maybe? Feb 11 20:17:14 tried that one also Feb 11 20:17:31 you said singleLine works Feb 11 20:17:37 so what's hte problem? Feb 11 20:17:49 singleLine also doesnt show deprecated in the docs for me Feb 11 20:17:49 oh, that it's deprecated, hm Feb 11 20:18:34 yeah, android:singleLine is *not* deprecated. where are you seeing that it is? Feb 11 20:18:46 in eclipse Feb 11 20:18:53 ohh, i see Feb 11 20:18:59 canadiancow yea don't sell them here fyi ;) Feb 11 20:19:00 i guess it is wrong ? Feb 11 20:19:03 but thnaks && srry ;) Feb 11 20:19:19 fanno: not sure, but it's an easy way to get a contribution to AOSP Feb 11 20:19:57 maxLines doesn't work? Feb 11 20:20:09 nope Feb 11 20:20:28 it's times like this when I wish there was an easy way to throw a project together, add some code and throw it out Feb 11 20:20:33 it seems i can use android:ellipsize Feb 11 20:20:48 however android:ellipsize="end" add the "..." in the wrong location Feb 11 20:20:57 define "wrong location" Feb 11 20:20:58 and i dont wanna use android:ellipsize="start" Feb 11 20:21:08 https:/.... Feb 11 20:21:24 instead of .https:/bladbldabla.co.... Feb 11 20:21:29 as when i use single line Feb 11 20:21:41 btw what version of the OS are you testing on? Feb 11 20:22:07 How do I pay for the Google Play Developer Console without a credit card? Feb 11 20:22:38 get a debit card Feb 11 20:22:55 4.2 Feb 11 20:22:58 Peetz0r: gimme your google account info and some good porn Feb 11 20:23:00 and ill get it done Feb 11 20:23:10 Peetz0r: you can get a prepaid card Feb 11 20:23:10 mikedgjr: lol nowai Feb 11 20:23:27 Can I somehow use a Maestro card like I use every day? Feb 11 20:23:27 ctate: i assume the os question was for me Feb 11 20:23:31 Or maybe PayPal? Feb 11 20:23:45 google and paypal are enemies Feb 11 20:23:57 Both are my friends :p Feb 11 20:24:25 www.paypalsucks.com Feb 11 20:24:29 ctate: i guess i could remove the https:// pr http:// from the spiller list but it would be importent to know for the user if they are connection to a secure on not server Feb 11 20:24:49 But if they can't get together that well, then Google should implement iDeal, the dutch national internet-payment system Feb 11 20:25:18 pragma-: where can I get a known working prepaid card? Feb 11 20:25:42 I don't feel like transferring money to a foreign company which I've never heard of Feb 11 20:26:02 y u no bank account? Feb 11 20:26:09 Yes, I do Feb 11 20:26:14 so go to your bank Feb 11 20:26:43 My bank isn't going to give me a credit card, this is not the USA Feb 11 20:27:00 one of my banks has a service on their web acccess to generate a CC number containing a specific amount of money, and with a given expiration date Feb 11 20:27:20 Peetz0r: you don't need a credit card, you can use a debit card Feb 11 20:27:27 flodin: sure? How? Feb 11 20:27:39 there's no reason your bank shouldn't give you a debit card Feb 11 20:27:59 ask your bank for a visa or mastercard without credit function Feb 11 20:28:05 I have a piece of plastic with a Maestro logo on it, is that a debit card? Feb 11 20:28:26 yes, but maestro is a cheaper version of mastercard that doesn't allow international transfers Feb 11 20:28:32 false Feb 11 20:28:47 I've used itin germany during 29c3 Feb 11 20:28:54 or, at least, comes with several limitations compared to mastercard Feb 11 20:28:57 and I am from the Netherlands Feb 11 20:29:32 Well, maybe I'll go to mybanks office tomorrow and ask them for help here Feb 11 20:30:13 It's really weird that I cannot use a de-facto indstry standard like paypal to pay for this Feb 11 20:30:35 Is there some sort of OS managed "download this file for me"? I recall something was added in ~2.3 but I'm having trouble finding it Feb 11 20:30:41 hunting down every last text/title/string in xml/java files and moving them to values.xml is so fun Feb 11 20:30:42 Every foreign internet transaction that I've ever done was paypal Feb 11 20:30:44 ... not Feb 11 20:30:47 paypal is not reliable and takes a very high charge for the transaction Feb 11 20:31:09 flodin: I can live with $1 or $2 less Feb 11 20:31:50 dollars are cheap to me anyway. Here's a picture of my face: ^(€..€)^ Feb 11 20:32:12 at least I can grep "text=|title=|setText|setTitle" Feb 11 20:32:30 but still such a pain Feb 11 20:32:57 well, cheap... €18,60 is still quite a bit for selling free apps trough a company that already provides me with tons of storage and bandwith for free anyway Feb 11 20:33:31 the fee is 3.4% + $0.3 per transaction Feb 11 20:34:05 preds: DownloadManager Feb 11 20:34:12 so that's about one euro Feb 11 20:34:13 thanks mikedgjr Feb 11 20:34:14 I started making ablog post about it Feb 11 20:34:19 but never finished Feb 11 20:34:25 it's pretty easy breezy beautiful Feb 11 20:34:42 I did a homebaked solution but I'd like to make it more bulletproof Feb 11 20:34:53 unfortunately the suckers on 2,2 will be stuck with my homebaked recipe Feb 11 20:35:05 flodin: yeah, €19,67 is still acceptable for me Feb 11 20:35:15 I'd round it to €20 anyway Feb 11 20:36:07 anyway i will just use android:singleLine="true" and cross the bridge whe i come to it =P Feb 11 20:38:36 i have had a few remote testing client apps report errors with Circular dependencies cannot exist in RelativeLayout, on a android 4.2 device, i cant recreate it on my 4.1 or the emulator. anyone have any hints to locating it i cant find any toLeftOf / toRightOf that are conflicting as far as i can tell. cant it be something different than toLeftOf / toRightOf ? Feb 11 20:40:20 circular dependency means view1 is positioned relative to view2, but view2 is positioned relative to view2 as well Feb 11 20:40:31 it is not limited to toLeftOf/toRightOf Feb 11 20:41:13 When countdown is complete, my alarm rings. But I get "Error (-38,0)" and "start called in state 0" when I click the OK button in the AlertDialog that is supposed to stop the audio playing. Any ideas? http://pastebin.com/SGrgHUSf Feb 11 20:41:40 I wonder if I'm maybe not trying to stop the right instance of the media player or something Feb 11 20:44:02 wow, local bank's phone support is still open at 21:43 Feb 11 20:44:40 nice Feb 11 20:44:42 you win Feb 11 20:46:32 meh - Ally's is there 24 hours... Feb 11 20:47:12 well, they lose. They charge €3,60 per quarter for a credit card, and they don't know of any other solution Feb 11 20:47:22 so nowai Feb 11 20:49:10 f2prateek k i will look again Feb 11 20:53:00 I have "public static MediaPlayer mMediaPlayer;" Feb 11 20:54:30 does the expiration date of my CC matter? Feb 11 20:54:56 Peetz0r: well what do they charge for the maestro? Feb 11 20:55:21 Well, I've found another solution: https://www.3vcard.nl/ Feb 11 20:55:24 when it expires they will send you a new one, same number but new expiry date Feb 11 20:56:01 it's a voucher-like system whcih will create a cerdit card number which will expire soonish I think Feb 11 20:56:29 yeah, my bank offers that Feb 11 20:56:42 you get a one-time cc# that you can use on the interwebs Feb 11 20:57:27 it's pretty nice Feb 11 21:02:58 "controlled disbursement accounts" Feb 11 21:03:46 one thing that bugs me though is how hard that "no negative money" limitation is Feb 11 21:04:21 this summer i ended up with €-1700 on my debit card Feb 11 21:05:09 i thought they weren't supposed to transfer money when there's nothing to transfer, but apparently they will Feb 11 21:07:10 yes, because then they charge you penalties Feb 11 21:07:16 it's a profit center for them Feb 11 21:07:31 protip: credit card lenders are evil. Feb 11 21:07:44 it's not supposed to be a credit card though Feb 11 21:07:55 for the very reason that I don't want that kind of thing to happen Feb 11 21:07:58 if they let your balance go negative, it's a credit card Feb 11 21:08:01 <3 eftpos Feb 11 21:08:02 but they're pretending not to be. Feb 11 21:08:12 f2prateek: well my layout was good, it was a program logic issue from a friend of mine =) Feb 11 21:08:31 i can't withdraw money from it or use it to pay in a store if there's not enough money on it Feb 11 21:08:41 but it seems e.g. dealers on the internet can Feb 11 21:09:46 I think it happens if there _was_ enough money at the time of purchase, but not at the time that the transaction happens Feb 11 21:10:53 Savings accounts with overdraft protection - enabled via tie to credit account - <3 banking Feb 11 21:12:39 "Your Google Order #FOO with Google is currently on hold. An attempt to charge your VISA xxx-BAR for $25.00 on Feb 11 failed. This may have occurred because of insufficient funds, or as a precautionary measure against fraud. You may see authorizations on your billing statement for a declined charge. Occasionally, the authorization for a charge may be approved, but the actual charge for the order declined. Contact the customer service department for VISA Feb 11 21:13:32 Peetz0r: sometimes you need to enable withdrawals from specific parts of the world Feb 11 21:13:41 Hey guys, I'm a newbie android developer (so I apologize for a stupid question). I'm having issues using onclicklisteners... I've got my class set up, my buttons being referenced properly, but my events never fire. Do I need to do anything special (like, instantiate the class in my mainActivity file?) Feb 11 21:13:46 oh. Well. Right. Feb 11 21:13:48 Money sucks Feb 11 21:13:51 hoping someone can help. i've got an Allwinner A10 based board (Cubieboard) running 4.0.3 and I've got a 15.6" panel attached with a 4-wire resistive touch screen. TSCalibrationView.java looks like it was written for smaller screens and "breaks" with my larger screen Feb 11 21:14:03 Banking rocks ! Feb 11 21:14:10 Does anyone know of a different touch screen calibration code that I can use? I'm hardware, not software so modifying the code is not going well Feb 11 21:14:33 wow, I am $0.04 short Feb 11 21:15:27 becuase someone (Google themselves) decided to charge me €1 before charging me €19.04. That's €20.04. I just created a €20 voucher Feb 11 21:15:36 |Occasionally, the authorization for a charge may be approved, but the actual charge for the order declined.| This can happen when pumping gas for example, the account is pre-auth-ed a set amount then gas pumped, then when the actual debit is to be posted, someone has real-time mofied your available balance somewhere else, and though you have the gas, the charge fails and you go into overdraft Feb 11 21:16:17 geudrik: pastebin your code, please (layout and java) Feb 11 21:18:45 Can I borrow a nickel? http://i.imgur.com/X2yutj7.png Feb 11 21:20:25 evanc: http://pastebin.com/fFvEYGhJ || http://pastebin.com/1iwuBV19 Feb 11 21:20:45 evanc: My question is really, how do I instantiate my listener class? Feb 11 21:22:51 you swapped play and pause in your layouts Feb 11 21:23:04 maybe you're getting the wrong ID and the wrong event is firing? Feb 11 21:25:42 sonOfRa: Thanks for noticing that, Even still though, I get nothing dumped out in LogCat :S Feb 11 21:26:20 wrong loglevel in eclipse? try typing adb logcat in a console and see if it fires Feb 11 21:29:23 :S Nada Feb 11 21:29:33 $ adb logcat | grep "=>" Feb 11 21:29:47 I get nothing when mashing buttons haha Feb 11 21:30:47 geudrik: your listener class is instantiated when you set it on the listener (hence the "new" keyword) Feb 11 21:31:19 are you sure it's a) set on the right element and b) the right element is being clicked on? Feb 11 21:31:33 if you have multiple items with the same ID, findViewById might not be picking the correct one Feb 11 21:32:50 when setting an android:theme on an element, how do i theme and