**** BEGIN LOGGING AT Sat Jan 11 02:59:58 2014 Jan 11 03:00:44 but what does that mean if I'm building with SDK 17+, but with a minimum requirement of SDK lower than 17? Jan 11 03:12:51 it means you can use new APIs where appropriate but have to be mindful of supporting older versions Jan 11 03:24:42 Anyone have a suggestion for getting around InetAddress's caching behaviors? Jan 11 03:24:55 do to what, exactly? Jan 11 03:25:42 JakeWharton: I can't have it caching previous lookups. And it does. I realize in >4.0 it respects TTL, but there's still a lot of oru client base who is <4.0. Jan 11 03:41:16 hello Jan 11 03:41:34 JakeWharton retrofit is better with gson or jackson for performance? Jan 11 03:43:51 probably the same anywhere where you would compare gson to jackson Jan 11 03:45:06 Baluse: Retrofit streams the response to the converter so it doesn't really matter Jan 11 03:45:28 the delay of the bytes transferring over the network will be 10x slower than Gson or Jackson can turn them into JSON and write them to the object Jan 11 03:47:19 to anyone who has implemented a custom account. What is the point of having preferences directly in the accounts settings page if they are written to /data/data/com.android.settings/ so no application can even access them? Jan 11 03:47:43 not sure how deep of information you want, but Jackson is usually faster on raw performance but at the expense of hammering the string pool and less aware of security whereas Gson is 10-20% slower (remember how I said this didn't really matter?) but using normal string parsing and has defenses against certain attacks against Java/JSON Jan 11 03:51:56 awesome work on retrofit JakeWharton. Im writing basically an open source version of Parse & retrofit is an integral part of it. Jan 11 03:54:26 awesome Jan 11 03:54:38 Retrofit is one of my favs Jan 11 03:55:58 trying to install android sdk in linux. after being prompted for my default workspace it crashes. i'm getting this in the terminal http://dpaste.com/1546085/ Jan 11 03:57:25 u looked at the log? Jan 11 03:57:37 probably a jvm issue if i had to guess Jan 11 03:57:59 tho it says in native...so who knows Jan 11 03:58:29 no i havn't. is openjdk compatible with android sdk? Jan 11 03:59:17 http://askubuntu.com/questions/180555/eclipse-does-not-want-to-use-openjdk-7 Jan 11 03:59:22 seems to be related Jan 11 04:00:46 jug6ernaut: thanks. i'll check it out Jan 11 04:01:06 i don't need to have eclipse already installed right? Jan 11 04:01:26 4 what Jan 11 04:01:41 to launch eclipse from the android sdk bundle Jan 11 04:01:41 the sdk is just a zip Jan 11 04:01:50 no its included Jan 11 04:01:56 right right. Jan 11 04:02:06 tho, i believe its old. Jan 11 04:02:16 late response. Jan 11 04:02:29 probably better off downloading the latest eclipse and using that Jan 11 04:02:34 It seems json to object mapping is a little bottleneck Jan 11 04:02:48 to me but only at my old phone LG P500 Jan 11 04:03:05 Baluse how much of a bottleneck? Jan 11 04:03:10 cause at galaxy tab is like 1sec whereas lg is 4-5 secs Jan 11 04:03:14 how big the objects Jan 11 04:03:21 :| Jan 11 04:03:32 7 lists of objects 1000~ objects Jan 11 04:04:18 ah, might want to throw the 7 lists into different requests & thread it Jan 11 04:04:31 that helped galaxy tab Jan 11 04:04:44 a lot becuase server has 200ms latency Jan 11 04:04:54 but at LG P500 made almost no difference Jan 11 04:05:27 how old of a device is that? Jan 11 04:05:36 gingerbread Jan 11 04:05:38 i mean the gtab is pretty old itself Jan 11 04:06:10 2010 lg p500 Jan 11 04:06:11 ic Jan 11 04:06:19 galaxy tab isnt very old Jan 11 04:06:26 its pretty old :P Jan 11 04:06:39 how often are u gonna be pulling that much info? Jan 11 04:06:47 i'll try installing using the standard eclipse package. that's what the post's suggesting. Jan 11 04:06:48 april 2013 is old ? Jan 11 04:07:12 not as LG p500 Jan 11 04:07:20 the Galaxy Tab 1 is older then 2013 Jan 11 04:07:26 its tab 3 Jan 11 04:07:33 ah Jan 11 04:07:39 and its fast i dont have a real performance issue Jan 11 04:07:44 this is going to happen once as sync Jan 11 04:07:55 but for slower devices Jan 11 04:08:03 meh Jan 11 04:08:09 they should upgrade :P Jan 11 04:08:09 i am competing IOS developer here heh Jan 11 04:08:23 who is synchronising faster Jan 11 04:09:17 competing? Jan 11 04:09:22 networking seems bigger bottleneck than writing these data to internal storage Jan 11 04:09:53 u would expect it to be lol Jan 11 04:10:37 i have the following layout xml defined, but i can't seem to get it to fill the screen height. can anyone help please? Jan 11 04:10:46 heh Jan 11 04:11:06 hope you wont paste the whole xml here :p Jan 11 04:11:12 :| Jan 11 04:11:18 jug6ernaut, god day Jan 11 04:11:29 it's here http://pastebin.com/2YGKLnhV Jan 11 04:11:30 good even Jan 11 04:11:31 yo Jan 11 04:11:44 http://i.imgur.com/sQYBGVb.jpg Jan 11 04:12:20 arcode fill_parent is deprecated, and is this being applied as the root element? Jan 11 04:13:06 arcode why on earth do u have linear_layouts wrapping single views? Jan 11 04:13:29 because i want those things on separate rows Jan 11 04:13:33 jug6ernaut, i hope to god you never look at any of my UIs Jan 11 04:13:42 infact, let me go delete some stuff from github Jan 11 04:13:56 lol Jan 11 04:14:39 it's the only layout being applied in the acitvity so it should be the root element Jan 11 04:15:56 when you say its not full screen, what is it doing Jan 11 04:16:06 & what are you wanting Jan 11 04:17:37 i want each row to be equally spaced vertically so it fills the height of the screen. i'll make a screen of what it looks like now Jan 11 04:20:50 do u want the views to grow in size? Jan 11 04:20:56 or just be equally spaced? Jan 11 04:21:14 equally spaced Jan 11 04:21:45 add android:layout_weight="1" to each of your "rows" Jan 11 04:22:21 also remove the linear_layouts wrapping single views, they arnt needed. Jan 11 04:23:15 ok i will try it thanks Jan 11 04:23:23 with this simple of a layout it doesn't matter, but with more complicated layouts nested layouts will degrade performance. So you want to remove them when able, especially if they arnt necessary :P. Jan 11 04:25:20 may actually need the nested linear_layouts... Jan 11 04:25:37 since layout_weight will force the height to not be wrap_content Jan 11 04:26:45 ok i will put them back in :) Jan 11 04:27:10 lol Jan 11 04:30:10 i changed the xml to this http://pastebin.com/NMvuwiad, and it still looks like this http://imgur.com/ZrX8sUt Jan 11 04:31:26 so adding android:layout_weight="1" didn't change anything Jan 11 04:32:53 arcode u got other issues, the layout is fine Jan 11 04:32:58 i just tried it and it looks fine Jan 11 04:33:29 i am loading the layout in a baseadapter and then in my activity i use setListAdapter(), could that be the problem? Jan 11 04:33:47 say what Jan 11 04:34:00 yes Jan 11 04:34:19 if its being loaded in a list view row Jan 11 04:34:46 why are u doing that? Jan 11 04:34:51 ah, so how should i load it in my main activity? Jan 11 04:35:06 i thought it was the correct way to load a linearlayout Jan 11 04:35:27 just setContentView(R.layout.layoutName); Jan 11 04:37:03 JakeWharton: Thanks for the response. I know that I have to use new APIs and be mindful of old devices, but the wording confuses me. If I build the app using the @JavascriptInterface annotation (from 17+), will older devices still be vulnerable? Jan 11 04:37:21 i dont' know Jan 11 04:37:38 ok, fair enough. Shouldn't be too hard to build a test app to find out Jan 11 04:37:49 arcode https://www.dropbox.com/s/39biws4h46me2nt/Screen%20Shot%202014-01-10%20at%2010.36.46%20PM.png is what its suppose to look like Jan 11 04:38:07 many thanks jug6ernaut it's working Jan 11 04:38:15 vn Jan 11 04:39:18 My gut tells me that only devices with 17+ available will be OK, but then again, it's something that happens with the development sdk, so maybe it happens at build time, and builds the class in a safe way... Jan 11 04:39:27 anyway, i'll try it out Jan 11 04:50:14 ah, on another link: "Note: If the linked SDK has been built for an API lower than 17, the vulnerability exists – even if the application using the SDK has been built for API 17 or above. T" Jan 11 04:50:19 well thats too bad Jan 11 04:50:50 what vulnerability Jan 11 04:51:19 running arbitrary code from javascript if you use addJavascriptInterface on a WebView Jan 11 04:51:29 ah webview Jan 11 04:51:34 yeah :/ Jan 11 04:51:58 just another reason making apps from webviews is a terrible idea Jan 11 04:52:13 quite a long list :P Jan 11 04:52:51 tell me about it...but unfortunately my company insists of making like 80% of the apps webview based Jan 11 04:52:58 because price? Jan 11 04:52:58 otiose, that vulnerability depends on a few things Jan 11 04:53:05 oh? Jan 11 04:53:25 easist way to fix it is build with a newer api Jan 11 04:53:42 and using ssl Jan 11 04:53:46 but doesnt the quote i just pasted say that that doesnt work? Jan 11 04:53:51 avoid http, and validate your certificates Jan 11 04:54:24 otiose, i believe if you target api 17 and up Jan 11 04:54:24 making apps out of webviews ftl Jan 11 04:54:33 pfn++ Jan 11 04:54:41 I installed Bower using NPM on Windows. How does Windows know how to handle the bower command? It isn't in the Path system variable. Jan 11 04:54:44 yeah i really dont think we'll be moving to ssl soon; our server architecture is so screwed up to begin with, it would take a long time to merge our normal+secure servers Jan 11 04:54:47 changing target shouldn't make a difference Jan 11 04:55:00 otiose, then they shouldnt be using webviews at all imo Jan 11 04:55:00 jcase even if you build against newer apis, on older devices the old version of the web view would still be used wouldnt it? Jan 11 04:55:55 jug6ernaut, i blieve they are mitigating it with the newer support library Jan 11 04:55:56 jcase: yeah, i agree with you. i fought the idea of going to webview, but thats all in the past now Jan 11 04:55:58 but i could be wrong Jan 11 04:56:11 ohh that is possible Jan 11 04:56:21 otiose, demonstrate exploiting it to your supervisor Jan 11 04:56:23 and document it Jan 11 04:56:34 else it may be your ass that gets blamed at some point Jan 11 04:56:40 yeah, we're talking about it on tuesday Jan 11 04:57:00 given teh age of webkit on most devices Jan 11 04:57:03 its not the only worry Jan 11 04:57:11 im the iOS guy... i showed him that I can just display the ouput of 'ls /sdcard' onto a browser Jan 11 04:57:24 and he's just like 'meh, i dont think its a problem' Jan 11 04:57:31 xD Jan 11 04:57:40 and im like wtf dude, this guy in the video _literally_ got root access to the phone with this Jan 11 04:58:47 true, if we only display our own pages, with no links to anywhere else, and we use ssl (which we don't) then we might be sort of OK Jan 11 04:59:06 otiose, why does your webview app need permission to external st orage? Jan 11 04:59:20 but still, man... knowing about something like this and purposely not do anything is dumb Jan 11 04:59:39 jcase: iirc, your app doesnt need those permissions for the exploit to get to it Jan 11 04:59:52 using addJavascriptInterface? yes it does Jan 11 05:00:04 but our app has a bunch of native features, one being taking/saving pictures Jan 11 05:00:06 unless it is using another vulnerabilityu after the fact Jan 11 05:00:26 yeah even if its an exploit of the view its still sandboxed. Unless it does actually get root. Which would be crazy... Jan 11 05:00:28 are your webviews using javascript? Jan 11 05:00:38 yep Jan 11 05:00:52 give me a few Jan 11 05:00:57 lets see if i can fix Jan 11 05:01:00 jug6ernaut: let me see if i can find the video where the guy got root; im not sure if i can find it again Jan 11 05:02:24 jug6ernaut, he used a secondary exploit Jan 11 05:02:45 :| Jan 11 05:02:57 * jug6ernaut avoids WebViews Jan 11 05:03:13 * jug6ernaut things the only valid use for a WebView is authentication Jan 11 05:04:09 ah ok, using just this exploit, they only have the sandboxed info Jan 11 05:04:10 otiose, i saw a workaround for at at somepoint Jan 11 05:04:36 but apparently you can drop in some other root exploits Jan 11 05:04:44 correct, they are using reflection to download additional files Jan 11 05:04:50 then execution the downloaded payload Jan 11 05:05:06 http://50.56.33.56/blog/?p=314 states gingerbreak, rageagainstthecage, zergRush, psneuter, etc Jan 11 05:05:24 :\ Jan 11 05:05:26 zergRush, ratc andpsneuter wouldnt work Jan 11 05:05:39 not by default Jan 11 05:05:45 zergrush might work with modification Jan 11 05:05:53 but i believe the other two are property space exploits Jan 11 05:06:04 and are unsetting ro.secure Jan 11 05:06:05 well, i dont know anythign about them... just what the article says... im an iOS guy who just does android on the side :D Jan 11 05:06:10 only granting root over the adbd Jan 11 05:06:12 I was just thinking about using UserDefinedFileAttributeView to identify changes in a file tree. Does anybody know if that works with android? Jan 11 05:06:38 otiose, the author apparently didnt either Jan 11 05:06:41 gingerbreak would work for sure Jan 11 05:06:45 we could change the we we're using it to use shouldLoadUrl or whatever its called Jan 11 05:06:50 on pre 2.3.4 Jan 11 05:07:08 dhulke look up FileObserver Jan 11 05:07:19 but with our current codebase, it might take a while to implement... but not impossible Jan 11 05:07:27 if i have time this weekend i might mess around with it Jan 11 05:07:39 * jug6ernaut wishes he worked on android apps at work Jan 11 05:09:10 ahow the hell do i set the alignment of a section WITHOUT fucking with the ndk-build linker scripts Jan 11 05:09:27 this is a FUCKING nightmare Jan 11 05:09:39 jug6ernaut: oh ok. I'm trying to create a folder sync app to sync with a computer. I tried to use WatchService but just figured out that i cant rename a folder if it has a subfolder being watched... Jan 11 05:10:29 makes sense Jan 11 05:10:37 either way, i have to do some more cleaning -- gotta leave to pick someone up from the airport in about 1.5 hours, and its still a bit of a mess ;D Jan 11 05:10:56 thanks for you knowledge, jcase, jug6ernaut Jan 11 05:11:00 np Jan 11 05:11:30 jug6ernaut, is probably a better person to listen to for the programming advice, mine is fairly limited in scope (you just happened to touch my area) Jan 11 05:11:43 lol Jan 11 05:12:10 jcase: you deal with webviews, security, or exploits? Jan 11 05:12:25 lol not webviews Jan 11 05:12:28 never used one before Jan 11 05:12:46 :') you are a fortunate individual, keep it that way Jan 11 05:13:24 yeah, well im pushing my luck, ive gotta go get an ipad and iphone for work project Jan 11 05:13:44 objective...c.... Jan 11 05:14:04 jug6ernaut, lucky me no writing for hte device Jan 11 05:14:10 just dealing with it over usb Jan 11 05:14:16 agh nice Jan 11 05:14:18 ahh* Jan 11 05:14:23 jug6ernaut: is an awesome language that is a pleasure to work with Jan 11 05:14:29 is what you mean to say, right? ;) Jan 11 05:14:36 xD Jan 11 05:14:57 idky they felt the need to fix c's syntax Jan 11 05:15:07 & in such a backwards way Jan 11 05:15:34 c has no objects, and they liked smalltalk, i guess Jan 11 05:15:56 if they didn't fix c's syntax, you'd be writing objc_sendMsg(obj, message, params ... ) every time Jan 11 05:16:29 & I've only done a very little iOS dev, but that shit is :S. At least with what i did to much of the code was generated, and i had no idea how views were being connected to there logic. Which i couldn't stand. Jan 11 05:16:48 otiose opposed to what in obj-c? Jan 11 05:16:55 (comparable operation) Jan 11 05:17:57 well instead of obj_sendMsg(array, setObject:atIndex:, object, index); (not sure about how parameters are send in atm) Jan 11 05:18:06 you would just do [array setObject:object atIndex:index]; Jan 11 05:18:15 super readable Jan 11 05:18:32 java might be something like array.setObject(object, index) or something, idk Jan 11 05:19:20 i just hated it when got nested function calls Jan 11 05:19:49 well, for a lot of things they are starting to embrace dot syntax as well Jan 11 05:20:24 anyways i out Jan 11 05:20:26 peace Jan 11 05:20:49 so you used to have to do do [array setObject:[self myObject]] but now you can do [array setObject:self.myObject] Jan 11 05:20:51 ok see ya Jan 11 05:21:25 * jug6ernaut much prefers the . syntax Jan 11 05:22:35 fucking hate the way every fucking person in the world developing "Development tools" fucks over people who try to develop in ASSEMBLER Jan 11 05:24:34 trying to call a DO NOTHING assembler function that I have wrapped up with a C wrapper. do a jni call on the c wrapper with the asm call commented out... works fine Jan 11 05:24:43 include the call to the DO NOTHING assembler funciton..... Jan 11 05:24:46 fucking segfault Jan 11 05:25:02 in fucking libc.o Jan 11 05:25:11 .so i mean Jan 11 05:26:25 how do i specify a custom linker script for a NDK library Jan 11 05:51:00 <_genuser_> guys, my user can click on listitems and it will load a new fragment. The fragment will launch asynctask to fetch json data. User can keep click on listitems. Jan 11 05:51:12 <_genuser_> this causes a huge delay and lot of asynctasks floating about. Jan 11 05:51:37 <_genuser_> eventually teh fragments take forever to actually respond. I think android prevents the new ones from running some of the old ones are done. Jan 11 05:51:48 <_genuser_> any ideas on how to tackle this situation best? Jan 11 05:51:59 don't run multiple ... Jan 11 05:52:08 <_genuser_> you see that too, eh? Jan 11 05:52:26 <_genuser_> I have moved it to MainActivity as static for now. but I wasn't sure if that's a good thing. Jan 11 05:53:21 <_genuser_> the asynctask also has a refernce to the fragment to notify it of completion. once the fragment is gone, it can't be notified and new ones can't start. Jan 11 05:54:02 <_genuser_> so I'm thinking of notifying the mainactivity of completion and let it store a reference to the latest fragment so it can notify it that it can go ahead with the request. Jan 11 06:02:34 if I were to get a contractless android phone for development purposes, today, which one should I get? Jan 11 06:02:55 anything from google Jan 11 06:03:02 nexus 5 then huh? Jan 11 06:05:41 <_genuser_> AsyncTaskLoader vs. AsyncTask, is either better to use? Jan 11 06:11:55 the task loader is around to generally fix issues of asynctasks. mainly involved in configuration changes Jan 11 06:13:08 there are a few limitations of asynctaskloaders, but i can't find a reference that lists them Jan 11 06:13:52 <_genuser_> Yeah from googling, I see both can fetch data in the background and update UI. Jan 11 06:14:16 <_genuser_> I think I'm doing to put a notify list in my AsyncTask. So it can notify all interested parties that it's done. The ones that are null have been unloaded. Jan 11 06:14:28 <_genuser_> the one that is not null is the one currently up and waiting for it to complete so it can request it's own data. Jan 11 06:14:32 <_genuser_> *its Jan 11 06:33:20 <_genuser_> if a fragment passes a refrences to itself to an AsyncTask, after a screen rotate would the AsyncTask have a valid reference? Or is the activity completely new? Jan 11 06:36:30 ok so i'm building cyanogenmod recovery(made a device tree for my galaxy trend) Jan 11 06:36:41 ionutica-99: wrong channel Jan 11 06:36:47 and all I get is a white screen flashing with random pixels on it Jan 11 06:37:16 bankai_: what channel should it be? Jan 11 06:37:27 #android-root or cm channel Jan 11 06:37:47 _genuser_: you're going to have a bad time on config change Jan 11 06:38:11 ok thanks Jan 11 06:38:13 <_genuser_> bankai_: I don't understand. Jan 11 06:38:34 <_genuser_> problem on config change due to which part of my design. Jan 11 06:40:48 your use of Android Jan 11 06:41:18 you want a loader because it will not retrigger the execution after config change Jan 11 06:41:31 <_genuser_> AsyncTaskLoader? Jan 11 06:41:47 <_genuser_> I'd be glad to change my code to it, if that's a benefit it offers. Jan 11 06:42:11 right. so on rotation (or any other config change) you will request the same loader be fired Jan 11 06:42:31 the loader manager will not re-execute the task because you haven't forced loading and because you already initialized it before Jan 11 06:42:46 <_genuser_> I see. that's perfect! Jan 11 06:42:48 it will either wait until the existing task is finished or it will redeliver the same result Jan 11 06:43:03 <_genuser_> provided, of course, that I used the same id, correct? Jan 11 06:43:22 <_genuser_> for init Jan 11 06:45:30 yep Jan 11 06:46:29 <_genuser_> alright, I have some major re-arranging to do, then. :) Jan 11 06:47:02 <_genuser_> I think this wouldn't have been problematic if my app wasn't launching a new fragment for each list item selection to request new data. Jan 11 06:47:35 <_genuser_> because the old fragment is destroyed, the new one would have to sit in a while loop waiting for a homegrown .isRunning() to finish. Jan 11 06:47:52 <_genuser_> and STILL have problems with rotate. Jan 11 06:47:53 <_genuser_> lol. Jan 11 06:48:18 <_genuser_> thanks again for your help. You have really helped me learn a lot of android stuff with just the right pointers. Jan 11 06:59:30 <_genuser_> lol, no need for isRunning(), and all that. Jan 11 07:00:59 is there any reason why a native library cannot call the mmap system call? Jan 11 07:01:08 can native libraries NOT make system calls? Jan 11 07:02:03 this fucking shit is fucking me over Jan 11 07:02:43 can anyone tell me if a native library can make system calls? Jan 11 07:09:17 You mean like system("fooCmd"); from c++? Jan 11 07:09:42 no Jan 11 07:09:45 i mean swi 0 Jan 11 07:09:52 a direct linux system call Jan 11 07:10:08 yes, of course they can Jan 11 07:10:15 maybe you are calling mmap with some silly arguments? Jan 11 07:10:53 no because the code works perfectly on my beagle board xm. and worked perfectly when i ran it as a native process under adb shell Jan 11 07:11:06 if i comment out the swi 0 the code does not segfault Jan 11 07:11:15 if i leave in the swi 0 it segfaults Jan 11 07:11:51 this was previously a stand alone native arm linux executable. i converted it to an android dynamic library Jan 11 07:12:25 in my JNI_OnLOad i allocate a 4k buffer - the code that does this here also does it in the native executable version. Jan 11 07:12:35 the code is not wrong. there is something else going on here Jan 11 07:13:09 why can i not make system calls Jan 11 07:14:23 mov r0, #0 ldr r1, #size mov r2, #3 mov r3, #0x22 mov r4, #-1 mov r5, #0 mov r7, #0xc0 swi 0 Jan 11 07:14:45 the #size here is a constant Jan 11 07:15:47 also. why is this freeking shit not letting me write into a section i declared with a "w" flag Jan 11 07:18:31 what is libdvm.so ? Jan 11 07:25:08 dalvik vm Jan 11 07:25:24 thats where the segfault is happening. Jan 11 07:29:19 this shit is now segfaulting inside my .so at a place that should not be executing Jan 11 07:29:41 my JNI_OnLOad tries to write into a WRITEABLE data section and i segfault Jan 11 07:29:55 but the reported address is utter bullshit Jan 11 07:31:15 maybe you should show us the code Jan 11 07:31:30 "Swi 0" Jan 11 07:31:32 thats the code Jan 11 07:31:45 *shrug* Jan 11 07:32:09 anything else other than that is not important, i KNOW it works. it works just fine on my hardware if i run the original executable in adb shell Jan 11 07:32:11 NO PROBLEM Jan 11 07:32:17 so i know the code is just fine Jan 11 07:32:23 evidently it's not Jan 11 07:32:29 whats NOT fine is for some reason my library is not allowed to swi 0 Jan 11 07:32:48 come on, you've got these things called logic and reason, stop raging and think Jan 11 07:32:49 maybe i need to list some permissions im not aware of Jan 11 07:33:20 also. i have a .section user_data, "wa" Jan 11 07:33:30 i try str r0, [r1] where r1 points into that section and Jan 11 07:33:32 segfault Jan 11 07:33:39 you said yourself that the address is, quoting, "utter bullshit" Jan 11 07:33:54 you also should know that assembly without context is useless Jan 11 07:34:05 so please show us the actual code or stop venting Jan 11 07:34:16 .section userData, "aw" Jan 11 07:34:17 user_data: Jan 11 07:34:17 .space 0x00100000 Jan 11 07:34:22 thats the section Jan 11 07:34:28 ldr r0, =user_data Jan 11 07:34:36 str r0, [r0] Jan 11 07:34:39 segfault Jan 11 07:35:03 yes i know allocating that empty space in the library is silly. but it proved the flags are working Jan 11 07:35:23 so the address space should be +w Jan 11 07:38:49 so first your problem was with calling mmap, then it was executing some code that "should not be executing", and now this Jan 11 07:38:58 what -is- it really? Jan 11 07:40:06 BOTH i tried to temporarilly get around the mmap issue by not allocating the buffer at run time but allocating it at assemble time Jan 11 07:40:19 one way gives me one problem, the other way gives me a different problem Jan 11 07:40:22 BOTH need to be fixed Jan 11 07:40:37 is this hand-written assembly or is there some source code it's compiled from? Jan 11 07:40:44 hand written assembly Jan 11 07:40:52 oh, then you probably have many problems Jan 11 07:41:10 you can take a look at the native linux executable at www.isforth.com/a4.tar.bz2 that contains the soruces Jan 11 07:41:14 WORKING linux sources Jan 11 07:41:23 but its not EXACTLY what im using here Jan 11 07:41:28 but its the basis for it. Jan 11 07:42:00 that a4.tar.bz2 runs on my beaglbe board xm running gentoo. it runs on my phone in adb shell Jan 11 07:42:11 well, you're trying to turn it into a shared library Jan 11 07:42:12 my phone is rooted, not sure if that is a requirement for it to work there Jan 11 07:42:16 yes Jan 11 07:42:20 that's a whole other bucket of headache Jan 11 07:42:27 yup Jan 11 07:42:48 and you're probably screwing up the ABI somewhere Jan 11 07:43:18 no i dont think thats the problem Jan 11 07:43:19 again, assembly without context is useless. Just because some fragments look fine doesn't mean -anything-. Jan 11 07:43:51 have you ever done any androd development in asm? and i dont mean "inline asm" Jan 11 07:44:00 i mean in asm. pure asm. no c. Jan 11 07:44:02 luckily, no Jan 11 07:57:12 unrecognized .section attribute: want a,e,w,x,M,S,G,T Jan 11 07:57:39 which is fucking annoying because im looking at the GNU docs for as and half of those fucking flags arent even listed Jan 11 07:58:28 maybe you need to use 'info' :| gnu man pages are often elided Jan 11 07:58:39 im looking at the gnu WEB page Jan 11 07:58:59 time to look at the source ;) as isn't too bad Jan 11 08:00:10 no way in HELL im looking at the source code to ANYTHING produced by the GNU foundation, they would just make me thoroughly CRINGE. Jan 11 08:00:20 cluster fuck source format Jan 11 08:00:22 no comments Jan 11 08:00:39 heavilly obfuscated macros using undocumented assembler features (im sure) Jan 11 08:00:48 the sources wouldnt help me Jan 11 08:00:52 lol Jan 11 08:02:58 <_genuser_> JakeWharton: wow, that was pretty cool. not unnecessary refresh on screen rotation. !!! Jan 11 08:03:12 yep. that's the idea Jan 11 08:04:26 :( Jan 11 08:04:28 <_genuser_> I have another strange behavior that I just can't describe. Jan 11 08:04:48 can someone PLEASE tell me why the FUCK i cannot write into a data section i have declared as +w in my sources? Jan 11 08:05:01 .section userData, "w" @progbits Jan 11 08:05:27 <_genuser_> in method, populateInfo(...), I check for a value, and if it's 0, I set the background color to red'ish and foreground color to brighter red. Jan 11 08:06:01 <_genuser_> well, sometimes when the said value is not 0, the background is changed, however, the foreground is unchagned. It is the original intended color. Jan 11 08:06:31 <_genuser_> sometime, when I just inflate the view, one of the fields, that is hardcoded to have a greenish background also get the redish color. Jan 11 08:06:41 <_genuser_> all these colors are defined in @color/xxx Jan 11 08:14:05 i cannot seem to be able to declare a section as writeable Jan 11 08:14:10 fuck Jan 11 08:21:48 _genuser_: sounds like incremental build problems Jan 11 08:22:03 the unique IDs in the R file are being shifted so you're getting adjacent values Jan 11 08:22:37 30/? I/DEBUG? signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 80500000 <--- TOTALLY not the fucking address where the segv happens Jan 11 08:22:44 <_genuser_> JakeWharton: oooh, should I go over it and make sure, there's no collisions? Jan 11 08:22:50 <_genuser_> or is this an eclipse problem. Jan 11 08:22:55 Eclipse problem Jan 11 08:23:03 <_genuser_> or should I just do a clean? Jan 11 08:23:05 yep Jan 11 08:23:28 <_genuser_> what's happening, is that on the same run, 5 times, I'll click the nav drawer list and ti will load the fragment just right. on the 6th, it will load it incorrectly. Jan 11 08:23:35 <_genuser_> and then it will stay botched until app close. Jan 11 08:24:04 <_genuser_> the 5th,6th times being examples. it can go on for more times working as expected. Jan 11 08:25:02 ive noticed that eclipse screws up with builds if you dont do make clean at least every 3 or 4 builds Jan 11 08:25:10 but that was with the TI version of it Jan 11 08:25:59 but ive never been able to run any version of eclipse for longer than a couple of hours before totally uninstalling it and primising to never install it ever again Jan 11 08:26:23 <_genuser_> I'll say this of eclipse.... Jan 11 08:26:28 i think the android NDK ignores section atribute flags Jan 11 08:26:40 specify writeable... not writeable Jan 11 08:26:42 <_genuser_> it has a delight launch screen. I have never seen any other app's launch since netscape, but.... Jan 11 08:26:44 segrault on write Jan 11 08:27:44 and pointless filing any BUG report with google. probably requires a G+ accoun t anyway. seems like google needs more data to sell to the spammers Jan 11 08:28:37 <_genuser_> eclipse's ctrl+I to format is the worse. Jan 11 08:29:46 just rm -rf eclipse and install intellij idea community edition Jan 11 08:29:59 <_genuser_> is that an ibm product? Jan 11 08:30:14 no Jan 11 08:30:38 <_genuser_> 'coz I was about to say they've got some odd products. not very impressive. Jan 11 08:30:41 its the greatest java development environment ever devised by god Jan 11 08:30:50 <_genuser_> I'm thinking of moving to android studio. once this app is done. Jan 11 08:30:59 android studio IS intellij idea Jan 11 08:31:11 <_genuser_> well, there that's nice. Jan 11 08:31:45 Does android studio come with maven? Jan 11 08:38:31 so a simple 10 minute job has thus far taken 3 days Jan 11 08:38:48 wish the fuck the GNU development suite would just disappear Jan 11 08:38:50 permanantly Jan 11 08:40:17 <_genuser_> if I may venture a guess, I'd say you're just a tad irritated... Jan 11 08:41:07 cant write into a writeable section. section declared as nobits takes up 1 megabytes worth of file size Jan 11 08:41:12 yes im pissed off Jan 11 08:41:52 <_genuser_> yeah, I was just being overly formal like Arthur Spooner from King of Queens. Jan 11 08:42:38 dont watch it, no idea what it is Jan 11 08:42:42 <_genuser_> but I'm fairly ticked at my app, also. Jan 11 08:42:45 dont have a tv, have not had one in close to 20 years Jan 11 08:42:50 no intention of ever getting one Jan 11 08:43:38 <_genuser_> don't know but when I hardcode a value #01ff01 into a field, it's background is being changed in an if-statement that does background and foreground both. Jan 11 08:43:58 <_genuser_> but only the background is changed, and the data clearly indicates that it should not be even in the if statement. Jan 11 08:44:17 <_genuser_> think I really need to read this function carefully. Jan 11 08:49:01 http://www.foxnews.com/tech/2014/01/10/google-integrates-google-with-gmail/?intcmp=features Jan 11 08:49:10 ya google can be trusted... honest! Jan 11 08:50:22 hello everybody and happy new year. I got an OEM tablet, a very cheap one, and yesterday the manufacturer gave me a rom upgrade in .img format. They told me i should enter update mode but no luck there. I managed to install cwm though to have a recovery environment. Can you tell me how to install the new rom? Thank you in advance Jan 11 08:51:13 if it was in zip format it would be easy, and i googled about converting the img into zip but it's a lot of trouble :( Jan 11 08:56:14 "Hello, I have a format suffix that represents a collection of files, and another format suffix that also represents a collection of files. How would I convert one to the other?" Jan 11 08:56:50 why on earth did this guy install CWM rather than learn to use the provided update facility correctly. Jan 11 09:02:46 <_genuser_> is it not standard jva behavior that if your method doesn't catch an exception it bubbles up to the caller? Jan 11 09:03:03 <_genuser_> and if the caller has a try catch block around the method and one of the catches is (Exception e), it should be caught? Jan 11 09:04:24 _genuser_: it bubbles up until someone catches it, or terminates the program Jan 11 09:05:11 <_genuser_> alankila: yep, the caller has a try{ func_call(); } catch (Exception e) { ; }. So it should be caught and not crash the android app. Jan 11 09:05:14 and formally, Exception is just one of the subclasses of Throwable. All your normal exceptions inherit from it. Jan 11 09:05:28 <_genuser_> exactly. So it's a catch -all. Jan 11 09:05:33 Errors are another type of throwable that should not be caught because they aren't generally recoverable Jan 11 09:05:57 <_genuser_> java.lang.IllegalStateException that's def an exception tho. Jan 11 09:06:19 in principle you can do just what you did there, the try-catch block that catches Exception is a common sight after all Jan 11 09:06:28 it isn't the best possible coding practice though Jan 11 09:06:47 <_genuser_> you mean react to each situation individually, etc? Jan 11 09:06:51 and you should not swallow exceptions silently. At the very leat, Log.error(TAG, "Something bad happened while doing x", e); Jan 11 09:06:54 or was it Log.e Jan 11 09:07:15 <_genuser_> right, I'm doing Log.i there. that was just to spare the channel long code lines. Jan 11 09:07:48 but in general yeah I do a lot of catch-Exception stuff, though I most often throw it right again but this time as RuntimeException Jan 11 09:07:49 <_genuser_> I was actually letting them bubble up to the call, so the caller can actually display it on the activity. Jan 11 09:08:16 this exception class does not need to be declared and handled by caller, so it streamlines programs and usually without any loss Jan 11 09:08:46 my own exceptions also often inherit from RuntimeException Jan 11 09:08:55 <_genuser_> I have come to loathe exceptions. Jan 11 09:09:31 <_genuser_> mainly because of devs who don't catch exceptions. especially if you throw them for their benefit. Jan 11 09:09:44 <_genuser_> and it crashes the whole thing and the boss is looking you because it crashed in your unit. Jan 11 09:11:04 well, that is a social problem. Shouldn't guide what the right design is. Jan 11 09:11:38 I prefer writing "bug-free" algorithms as much as possible, and one of their characteristics is that they can never throw and all input combinations are sensible and do something useful Jan 11 09:12:12 <_genuser_> alankila: yes and no. I mean if your code is breaking in production and you're the one staying late fixing it 'coz the caller won't catch it or has a clueless look then the boss only knows one thing Jan 11 09:12:15 still, i/o is one of those things that generally causes IOExceptions to be declared as thrown and they actually do get thrown. No way around that. Jan 11 09:12:16 <_genuser_> who knows how to fix it. Jan 11 09:12:22 I dislike it when APIs use unchecked exceptions Jan 11 09:12:40 i dislike it when development tools fuck me over Jan 11 09:12:42 <_genuser_> I have decided on a compromise. Jan 11 09:12:51 like not honoring WRITEABLE attributes on sections i create Jan 11 09:13:03 <_genuser_> I catch all exception by frameworks and by your code. and store them in a var for you to query. then I return true/false, or obj/null. Jan 11 09:13:21 ew Jan 11 09:13:29 <_genuser_> if you get a false or a null, you can care to check the last seen exception. if not, it will only crash if you use the null without any checking. Jan 11 09:13:38 O.o Jan 11 09:13:43 that is C-like error handling Jan 11 09:13:47 <_genuser_> what this causes is, application not reacting at all. Jan 11 09:13:49 exceptions were meant to improve on that Jan 11 09:14:05 <_genuser_> but when you look at the log, somebody says to the other dev, hey why didn't you check the result. Jan 11 09:14:10 <_genuser_> then it's upto them to stay late and fix it. Jan 11 09:15:02 <_genuser_> I think T&M world works much differently. my boss regularly yells at me for saying "that will take longer because we should refactor." Jan 11 09:15:07 alankila heh, sounds like c errno Jan 11 09:15:10 <_genuser_> he says, "just write it up and ship it. we don' care". Jan 11 09:15:46 <_genuser_> he's always planning to not get the customer for phase II solution engineering. Jan 11 09:15:58 a programmer shouldn't reason with a person who understands less than him about his own work Jan 11 09:16:13 <_genuser_> sometimes you have to. Jan 11 09:16:31 <_genuser_> sometimes I have to fix a design before I can add any more to it. Jan 11 09:16:36 alankila, why not. thats how engineering managers work all the time Jan 11 09:16:37 <_genuser_> then I refactor it in my downtime. Jan 11 09:16:37 what you have to do is deliver correctly working software at record speed and keep the noise in your stomach. Everyone will love you and see you as dependable. Jan 11 09:16:46 no you cant code it like thayt baeacuase i dont understand it! Jan 11 09:16:53 <_genuser_> and he always says that was a really good thing that we refactored it. Jan 11 09:16:56 err but your the manager and im the engineer... i do unerstand it Jan 11 09:17:00 no. change it Jan 11 09:17:16 <_genuser_> alankila: my boss knows. if I told him xyz date, he'll get it then. Jan 11 09:17:32 <_genuser_> but before committing if I can hassle him for a week more, I'll do it. Jan 11 09:17:34 alankila, if correctly working code in no time flat were an important factor everyone would be coding in forth. anyone who cant code in forth wont be coding Jan 11 09:17:43 seems nobody is coding in forth Jan 11 09:17:53 I440r: I've no idea what you are talking about. Jan 11 09:18:22 what im talking about is that in the industry the ONLY thing that is important is "NOW" Jan 11 09:18:29 not good. not even "working" Jan 11 09:18:37 just "can we ship it now and fix it later" Jan 11 09:19:07 25 years of realtime embedded control applications as a consultant tells me nobody but NOBODY gives a flying fuck about good software Jan 11 09:19:29 I beg to disagree. The users do appreciate it. Jan 11 09:19:44 erm nobody in the industry gives a flying fuck. Jan 11 09:19:55 coders dont. managers dont. Jan 11 09:20:03 well. in very VERY rare cases some do Jan 11 09:20:10 if you also have to shoulder the helpdesk function at your shoulders, then it follows that the less chance for user error, and the more useful the error feedback, the more users are able to help themselves. That way, quality becomes naturally part of a good product. Jan 11 09:20:12 but they are shot down by the rest Jan 11 09:22:03 I realize that I'm probably outlier because I do pretty much everything myself when it comes to some product and always have. It's just that the sizes of systems I get to do are delivered in a few days to few weeks of programming if you don't fuck around and deliver the simplest design that can possibly work Jan 11 09:22:28 <_genuser_> alankila: how do you feel about agile? Jan 11 09:22:58 I do not really know the practical value of this concept or what people mean by it Jan 11 09:23:21 <_genuser_> neither do people who advocate for it. Jan 11 09:23:47 <_genuser_> but it's become something you can't scorn publicly anymore. hiring mgrs won't let you live it down. Jan 11 09:23:51 <_genuser_> "supposedly" Jan 11 09:24:02 <_genuser_> my consultant friend was horrified that I didn't think highly of it. Jan 11 09:24:49 when the company I used to work for switched to "agile", it was actually a downgrade in our response times. I guess it was sprints and shit like that and work decided weeks in advance, rather than 15 minutes Jan 11 09:25:08 <_genuser_> did you guys a huddlge master? Jan 11 09:25:12 <_genuser_> *have a Jan 11 09:25:24 I tell them I'm trained in the LBMS methodology, but I'm sure there are parallels Jan 11 09:25:34 I left at around that time, I did not get to see it in action very much. Jan 11 09:26:08 <_genuser_> scrum master.... there you go. that's what it was. Jan 11 09:26:22 <_genuser_> most people who say agile agile, don't even know that there isnt' a framework with the name agile. Jan 11 09:26:24 I had actually forgot it was called scrum Jan 11 09:26:37 <_genuser_> it's a concept. an actual framework supporting that would be scrum. Jan 11 09:26:42 <_genuser_> one of many. Jan 11 09:26:57 <_genuser_> each framework defines each step differently and some say document everything and others say don't worry just code it. Jan 11 09:27:21 <_genuser_> as a contractor people love it. you can quote agile and go to indefinite design changes and keep billing hours. Jan 11 09:27:55 Sounds like a good way to ensure you get stuck on a project instead of moving on, though, which sounds like a kind of personal hell for me Jan 11 09:28:27 Hm, I should look into porting my serialization stuff to Scala/Java.. Jan 11 09:28:34 Since screw built-in serialization I've got time to waste Jan 11 09:28:50 <_genuser_> but if you work for a gov't project AND you don't care about nerdy stuff, it's the best. Jan 11 09:29:02 <_genuser_> you settle down. raise kids. work the same playce 4-5 years. Jan 11 09:29:14 <_genuser_> gov't is on a "holiday" every other week. Jan 11 09:29:19 and put out a bad healthcare website ;) Jan 11 09:29:23 <_genuser_> it's a sweet gig for those so inclined. Jan 11 09:29:26 I think all the process-oriented types are basically just creating an ass-covering system that involves least possible time of actual work Jan 11 09:29:32 At that point, I'd probably be looking at something other than just contract work Jan 11 09:29:32 <_genuser_> 280mill it cost supposedly to code it. Jan 11 09:30:00 because actual work carries with it a risk: can you deliver it? did it work? did it cause damage? If you instead sit around endlessly in meetings and following a process and diffuse the responsibility to some quality ensuring scheme ... Jan 11 09:30:04 well, it's a safe but very boring job Jan 11 09:30:07 Plus there's the problem of people hating you for being a government contractor Jan 11 09:30:14 Nilium, live in mahwah nj, work in east podunk idao as a consultant, earn $80 an hour with only $20 of it taxable (perdiem) Jan 11 09:30:21 I like to say I don't care, but it's a death by a thousand cuts thing Jan 11 09:30:25 <_genuser_> alankila: so true. my curent project is kinda like that. Jan 11 09:30:26 some consultants take advantage of that situation and code in job security Jan 11 09:30:35 <_genuser_> and I don't even work for the gov't. Jan 11 09:31:11 I already live in Idaho. Why the fuck would anyone want to live here? Jan 11 09:31:32 <_genuser_> well you'd move to another place and then get a job. Jan 11 09:31:37 <_genuser_> example, state gov't. Jan 11 09:31:41 nobody works FOR the government. if you are "working for the government" you ARE the government and thus you are working for the people. er i mean screwing the people over Jan 11 09:31:42 <_genuser_> now you can work in any state. Jan 11 09:31:45 What kind of brain damage does someone have to get to think Idaho's a nice place to live? O_o Jan 11 09:31:55 Nilium, lol you do? Jan 11 09:32:08 <_genuser_> you're the only one living there, bub! Jan 11 09:32:21 Yes. It's a terrible state. Jan 11 09:32:21 it was an example, i dont live in mahwah nj but i bet east podunk idaho is WAY better than mahwah nj Jan 11 09:32:23 ive been there Jan 11 09:32:38 <_genuser_> nj rocks!! Jan 11 09:32:38 im in texas atm, the "dont mess with" state Jan 11 09:32:42 <_genuser_> it has the jersey shore people Jan 11 09:32:45 <_genuser_> not! Jan 11 09:32:57 new jersey is a cess pool of unamericanism Jan 11 09:33:04 move west. welcome to america Jan 11 09:33:08 * _genuser_ high fives fellow lone star stater!!!! Jan 11 09:33:14 just dont go too far west or your going to move back out of it Jan 11 09:33:27 _genuser_, where in tx? Jan 11 09:33:28 I live in northern Idaho. One of the cities south of me, Hayden, was the former home of the Aryan Nations headquarters. Jan 11 09:33:32 My home town is the birthplace of Sarah Palin. Jan 11 09:33:37 I440r, I think it matters on what stereotypes you're referring to ;P. Jan 11 09:33:39 <_genuser_> I440r: dfw. specifically plano. Jan 11 09:33:40 People here are _proud_ of that for some reason. Jan 11 09:34:01 Nilium, Eh, is it a pretty small town? Jan 11 09:34:03 _genuser_, im in north dallas. looking for work!! :) Jan 11 09:34:06 Yes. Jan 11 09:34:08 Anyway, I could probably moan for hours about how much I hate Idaho, so I'll just leave it at me hating it. Jan 11 09:34:12 Nilium, Probably why ;P Jan 11 09:34:20 <_genuser_> just leave idaho dude. Jan 11 09:34:21 Saphiresurf, erm... the govoner? Jan 11 09:34:36 <_genuser_> I440r: looking for work eh. try perry's office. Jan 11 09:34:36 I440r, Huh? Jan 11 09:34:53 <_genuser_> I440r: he's like shooting guns running around killing animals that attack his little dog. Jan 11 09:34:54 i thought u were referring to my cut at NJ lol Jan 11 09:35:31 _genuser_, perry is a good govoner, would have made a weak president Jan 11 09:35:54 but if christie is the only one the GOP has to offer come election time im voting for hillary Jan 11 09:35:55 lol Jan 11 09:36:15 <_genuser_> I440r: I liked him. kinda still ok. but you know when they use emotional rants to get your vote and don't even say thank you. Jan 11 09:36:18 rand paul :) Jan 11 09:36:25 <_genuser_> I440r: he did lot of that last election time. Jan 11 09:36:26 _genuser_, srsly tho, i am looking for a coding job Jan 11 09:36:34 <_genuser_> I440r: what kinda coding. Jan 11 09:36:38 capella, i would SRSLY vote for rand p any day of the work Jan 11 09:36:57 realtime embedded control apps. any processor. c/asm or (yea right... forth) Jan 11 09:37:17 rand paul > hillary Jan 11 09:37:17 * Nilium saying nothing about who he'd vote for because can of worms. Jan 11 09:37:33 <_genuser_> I don't really know any jobs. but man I'm totally in the .NET industry. high evel stuff. maybe java now and then. Jan 11 09:37:35 ;P Jan 11 09:37:47 capella, yes but theres no guarantee he will run. christie was probably thinking of doing so till he got shot in the foot by his own stupidity Jan 11 09:37:50 Also because I don't even know which giant douche and turd sandwich I get to choose between Jan 11 09:38:08 meh - christie was collateral damage Jan 11 09:38:29 <_genuser_> whoever you vote will continue the 85billion a MONTH spending spree to prop up the stock market. Jan 11 09:38:29 .NET has paying jobs, I may have to switch to that tech Jan 11 09:38:33 The republicans are going to trot out a lot of stupid people who will proceed to humiliate themselves in varying ways, as with the last election. Jan 11 09:38:38 christie is an anti gun, anti american RINO Jan 11 09:38:51 <_genuser_> Nilium: that's exactly the problem that destroying this country. Jan 11 09:38:57 christie does have gun problems Jan 11 09:38:58 The democrats are going to trot out a lot of ineffectual people until they find someone that's sociable. Jan 11 09:38:59 <_genuser_> Nilium: people only see one side as being stupid. Jan 11 09:39:02 So, same dance as always. Jan 11 09:39:16 there is no republican party. thers just the OLD SCHOL business as usual idiots Jan 11 09:39:20 <_genuser_> Nilium: dems wil hate repubs. and repubs will hate dems. Jan 11 09:39:24 rand paul ftw Jan 11 09:39:30 <_genuser_> Nilium: and the leaders win. Jan 11 09:39:32 No, no, I'm on the both-major-sides-are-stupid.. side. Jan 11 09:39:46 Nilium, agreed. we need to do 2 things. Jan 11 09:39:55 ran paul down the middle Jan 11 09:39:56 1: fire 99% of congress Jan 11 09:40:01 <_genuser_> Nilium: only if we could get people to stop watching jersey shore and read up on politics. Jan 11 09:40:08 2: decrease the federal bugit by 99% instantly Jan 11 09:40:15 not "in 100000000000 years" Jan 11 09:40:38 The annoying thing is I could choose to vote third party, but it would never matter. Jan 11 09:40:46 So I don't end up voting for the best choice, I end up voting for the side I hate the least. Jan 11 09:41:03 * capella latest project is sucking him into Win Metro Jan 11 09:41:26 <_genuser_> capella: pretty snazzy there!! Jan 11 09:41:41 That said, I'm in Idaho, it doesn't even matter who I vote for since it goes republican every time. Jan 11 09:42:09 It's not as bad as I thought I'd be, but it's still a bastardazation in the name of allowing OS flexibility Jan 11 09:42:15 It's a shame that people associate with a party instead of evaluating their options each time. Jan 11 09:42:34 <_genuser_> capella: they're all the same. linus couldn't even port linux kernel to c++ and just blamed c++. Jan 11 09:42:50 Nilium, it wouldnt matter if 100% of the country voted republican, the democrats will still win Jan 11 09:42:54 Add in my dual boot box, and I've got got context switching headaches :D Jan 11 09:43:04 proof: last 2 elections... obama lost Jan 11 09:43:12 Linux? Win? Metro? Jan 11 09:43:22 I seem to remember Linus giving reasons for not using C++, but I don't remember what they were Jan 11 09:43:52 how about using c++ would make the linux kernel about 1000 times larger Jan 11 09:43:57 Though they were probably slightly outdated or nonsense reasons (like when people choose C because it's "faster") Jan 11 09:44:11 and 2384562964592345 times more complicated and 28652936542837654982645982635824 times easier to totally fuck up Jan 11 09:44:14 can't be 1000 times Jan 11 09:44:26 <_genuser_> his actual reason was he couldn't port over something low level. Jan 11 09:44:29 It'd make it larger if they used templates heavily, and that's assuming there's no LTO or stripping unused code. Jan 11 09:44:34 ah Jan 11 09:44:41 <_genuser_> due to teh way c++ handles that particulr data structure or something. Jan 11 09:44:50 <_genuser_> so he figured to heck with it and left it in c. Jan 11 09:45:03 c++ OOP is freeking horrendous. no modules Jan 11 09:45:05 <_genuser_> apparently he uses kde, which is written in c++. so don't think he cares personally. Jan 11 09:45:05 Compilers and linkers now are pretty good at avoiding the bloat you'd have seen when using, say, Visual C++ 6.0 Jan 11 09:45:07 no REAL modules Jan 11 09:45:12 The only real pain with C++ is there's no standard ABI Jan 11 09:45:35 <_genuser_> It as fun implementing a clib implementation for a kernel development project. Jan 11 09:45:38 Which is a huge problem Jan 11 09:45:41 <_genuser_> but meh, I can't do c/c++ anymore. Jan 11 09:45:46 <_genuser_> it just takes too long. Jan 11 09:46:06 <_genuser_> visual basic FTW ... if it wasn't retired. Jan 11 09:46:14 I still use it for the majority of my person projects. Well, C and C++. I like to alternate between the two depending on what I'm doing. Jan 11 09:46:16 <_genuser_> basically speak in english and it compiles. Jan 11 09:46:21 *personal projects Jan 11 09:47:30 my projects in VS run three times longer to build than gcc Jan 11 09:47:59 So, C/C++ for most things, BlitzMax (BASIC variant) for random odd things that I don't feel like spending much time on, and Scala for Android because Java can die in a fire. Jan 11 09:48:20 And Ruby for small tools. Jan 11 09:48:21 <_genuser_> my projects in VB used to take 1/10th time it would to do it in c++ Jan 11 09:48:29 And probably a bunch of other languages I'm forgetting because I use them on and off. Jan 11 09:48:39 heh - I still have to force myself no to resort to BASIC Jan 11 09:49:07 <_genuser_> I had written a visual studio plugin. hosting media player. Jan 11 09:49:28 <_genuser_> and I could send it file or open via the interface. so I could watch shows while coding. Jan 11 09:50:06 <_genuser_> and if my boss walked by he wouldn't really notice the video in a small window in teh IDE. and if he did, hey I was still get crap done. Jan 11 09:50:31 :) Jan 11 09:50:44 <_genuser_> but my boss was really cool in general. Jan 11 09:50:57 <_genuser_> he would ask me, hey are you just walking around socializing? Jan 11 09:51:20 <_genuser_> I'd say if you want me to tell you that I work 8 hours a day, I could, but we both know nobody can actually do that. Jan 11 09:51:52 I wrote an addon for the Pelles C Windows compiler to flag end of line whitespace, that was a fun waste of time Jan 11 09:52:37 <_genuser_> if you could a write a plugin for all the open source idiots who only believe in linux style newlines, that's be great. Jan 11 09:53:03 <_genuser_> open a source file, and BAM! total mess Jan 11 09:53:14 Ah! Pelles had a handy switch for that file property Jan 11 09:53:44 You mean the idiots who use CRLF. Jan 11 09:54:00 <_genuser_> even use eclipse on windows? Jan 11 09:54:04 or as homer says " Ka-tarl-f" Jan 11 09:54:22 * capella uses intelliJ on all OS Jan 11 09:54:24 <_genuser_> copy something in eclipse and paste it in irssi. Jan 11 09:54:37 <_genuser_> if you think irssi has newline detection it will block it if it's more than 5 lines.... Jan 11 09:54:48 <_genuser_> lol, paste it and see. eclispe doesn't even use proper newlines. Jan 11 09:55:48 * capella no eclipse, tried it, bailed Jan 11 09:56:24 Pretty hard to go back to eclipse after using intellij/AndroidStudio Jan 11 09:56:31 ++ Jan 11 09:56:52 I love the fact that alt+enter fixes EVERYTHING. Jan 11 09:57:08 i have all of my drawables in drawables/ and the app can't find my png files Jan 11 09:57:58 <_genuser_> JuiceSSH: in eclipse? Jan 11 09:58:00 shouldn't any screen size or density fall back to drawables/? Jan 11 09:58:08 _genuser_: No, android studio/intellij Jan 11 09:58:15 <_genuser_> JuiceSSH: oh. Jan 11 09:58:26 yeah alt enter is magic Jan 11 09:58:33 just like static analyzer Jan 11 09:58:42 <_genuser_> I thought ctrl+I was amazing in eclipse. Until I found that I cna't even parse files properly. Jan 11 09:58:48 jasonmog: do you mean res/drawable ? Jan 11 09:59:34 jasonmog: it needs to be singular not plural Jan 11 09:59:55 <_genuser_> wish eclipse would let you step thru the code. Jan 11 10:01:33 JuiceSSH: oops i meant singular Jan 11 10:02:20 doesn't android fall back to res/drawable if there isn't a dpi or size drawable? Jan 11 10:02:46 Oh, neat, the successor to BlitzMax is now free for desktop use. Jan 11 10:03:09 I'll have to play with that. Jan 11 10:07:19 why can't my app find a PNG that is in res/drawable? Jan 11 10:07:38 Did you clean and rebuild? Jan 11 10:09:48 yes Jan 11 10:09:55 obvious things already done Jan 11 10:10:08 <_genuser_> man this json parsing is really annoying. all that crap needing to be parse!!! Jan 11 10:10:25 Ok, what do you mean by "can't find" then? Jan 11 10:10:33 jasonmog: What I was trying to say before my fibre dropped, is maybe it's the naming of the drawable Jan 11 10:10:38 Only a-zA-Z0-9_. are allowed - no hyphens Jan 11 10:10:40 the preview can't resolve the drawable and it doesn't show up on the device Jan 11 10:10:42 I know that's caught me out before Jan 11 10:10:45 naming is fine Jan 11 10:11:21 it can be found when placed in res/drawable-___ Jan 11 10:11:32 but not if i move it to res/drawable Jan 11 10:12:51 i also tried other file names Jan 11 10:14:03 is there an elf section editor that will allow me to HAND modify the flags on an elf section? Jan 11 10:14:12 i.e. make the freeking section +w ? Jan 11 10:14:15 <_genuser_> nice, my code made the emulator reboot. Jan 11 10:14:23 <_genuser_> now let's see if it can make the real phone reboot. Jan 11 10:14:49 is there a file size or dimension limit to drawables? Jan 11 10:17:12 <_genuser_> there's hacking kittens now? Jan 11 10:27:56 Does android studio come with maven? Jan 11 10:28:03 to use it with appengine Jan 11 10:28:16 how can i patch an elf file to make a specific section therein writeable? Jan 11 10:31:24 _genuser_: I use the simple-json library. it's basically just extending hashmap Jan 11 10:32:49 <_genuser_> alankila: that's what I'm doing. but I like to then do crap like map.get(i).tostring(). Jan 11 10:32:58 <_genuser_> but if it get(i) returns null, I have to add anotehr check. Jan 11 10:33:00 why would an app be able to find a drawable in drawable-mdpi but not drawable? Jan 11 10:33:09 String.valueOf(map.get(i)) Jan 11 10:33:12 this is null safe Jan 11 10:33:21 <_genuser_> beautiful. thanks. Jan 11 10:33:22 though you might not want to print the string "null" Jan 11 10:33:40 <_genuser_> it's a .toString() function just so I can dump the entire json as parsed by me. Jan 11 10:34:04 <_genuser_> to see if I left anything thing out. mostly it's all jsonobject or jsonarray parse them into map Jan 11 10:35:00 <_genuser_> I was thinking of putting an overall try/catch in the tostring. or in the parseString(String jsonData) and if one thing fails, to just catch it and call it invalid. Jan 11 10:35:12 <_genuser_> if the object has chagned from when you wrote the code, no use parsing it anyway. Jan 11 10:36:07 I admit I'm not very fond of this simple-json thing at all. Would be better to let something map the keys to a pojo with conversions supplied where necessary... Jan 11 10:36:20 these libraries exist but they are also kinda hard to use, so I often just do the simplest thing Jan 11 10:36:36 <_genuser_> gson does a pretty good job. I guess I didn't like that I had to sit there and replicate the entire object verbatim. Jan 11 10:36:55 well, the benefit is that once you have done that, that's all you have to do Jan 11 10:37:03 and everything like changes to structure gets caught there Jan 11 10:37:08 <_genuser_> but if the object changes, you'll be back again. Jan 11 10:37:16 why the fuck is android upscaling images in res/drawable? without a dpi specifier it should just load the file as is Jan 11 10:37:28 sure, but I guess I prefer *knowing* it has changed over not knowing... Jan 11 10:38:07 <_genuser_> alankila: I'm parsing the output of a hashing pool status. so let's say the bit about .balance{ "one": "one", "two", "two } stays the same. Jan 11 10:38:13 <_genuser_> alankila: the rest of the object has more properties. Jan 11 10:38:36 <_genuser_> so now if I use my method, I'll get the values and move on. with gson, my user will see an error message that object wasn't parsed. Jan 11 10:38:48 <_genuser_> now the dev himself chagnes thigns up quite a bit. Jan 11 10:38:56 <_genuser_> without any announcements. Jan 11 10:39:20 there might be a lenient option in gson -- I have not looked at it -- which might make it ignore extra keys that have no mapping Jan 11 10:39:36 <_genuser_> or missing keys, then it's pretty amazing, if it will do that. Jan 11 10:39:52 Firefox Desktop under Win8 runs both Metro Style, and Desktop Style Jan 11 10:40:06 <_genuser_> I just do .optJSONObject(""). it' nice that it won't raise an exception but will return somethig. so you can parse the rest of it. Jan 11 10:40:16 anyway data serialization stuff is exceedingly boring. I actually use jaxb because it comes with jdk and I wrote a few simple helper functions once to do that stuff Jan 11 10:40:21 <_genuser_> capella: but the problem there is you're using firefox. Jan 11 10:40:25 :) Metro vs. Android is the next fiht Jan 11 10:40:26 <_genuser_> alankila: lol, agreed. Jan 11 10:40:39 ouch - I contribute to FF Mobile Jan 11 10:40:52 <_genuser_> capella: solid effort there man. Jan 11 10:41:02 FF mobile seems slower than chrome these days. Jan 11 10:41:13 Well, I didn't write most of it :p Jan 11 10:41:18 I used to use it when chrome sucked but since android 4.4 I guess it caught u Jan 11 10:41:22 <_genuser_> alankila: I wrote the entire thing using gson and it worked. until the dev changes it the day after I wrote it. it for me thinking to go for most amount of tolerance in his code changes. Jan 11 10:41:27 But yah, I like the FF Android version Jan 11 10:41:36 With the new front UI redesign Jan 11 10:41:51 <_genuser_> FF is just busy politicizing, no? Jan 11 10:41:52 Oh, that might still be beta Jan 11 10:41:57 <_genuser_> new version numbers. higher than everyone else. Jan 11 10:42:00 <_genuser_> new skins. Jan 11 10:42:07 <_genuser_> do they even fix a single mozilla bug? Jan 11 10:42:18 <_genuser_> or just get a fresh get every morning and do a nightly build. Jan 11 10:42:21 I don't like the huge version numbers by the new VC system / release system Jan 11 10:42:37 <_genuser_> I did like it's buildin support for tor, tho. Jan 11 10:42:38 one of the pleasures working with xml is that you can publish a schema -- jaxb can generate it from your description and then give that to your client Jan 11 10:42:45 <_genuser_> I used it for that when blogging about work. Jan 11 10:42:54 if they change stuff, it's their fault for having done so Jan 11 10:42:57 Heh, we close to creating our 1,000,000 bug in bugzilla Jan 11 10:43:30 <_genuser_> alankila: like you said earlier, serialization of any kinda is just mind numblingly boring. Jan 11 10:43:35 <_genuser_> *numbingly Jan 11 10:43:57 meh - just a big .toString() method :) Jan 11 10:44:26 I do think json is kinda step backwards in sense that we're without schemas again and the tools are stupider as a consequence Jan 11 10:44:36 but people want simple and the web likes eval(js) Jan 11 10:44:39 <_genuser_> I didn't like json much. but it's better than soap. Jan 11 10:44:51 <_genuser_> you remember the head banging in wall java devs you to do with soap parsing? Jan 11 10:44:55 json is kinda like .csv Jan 11 10:45:06 <_genuser_> in MS languages it was a breeze. auto parsed everything. Jan 11 10:45:16 <_genuser_> sax parser and all. Jan 11 10:45:34 soap wasn't any problem for me either because the clients can be generated from service definition, or even generated at runtime. Most soap boils down to simle soap wrapper around http requests. I often even did it manually, because it was simplest that way Jan 11 10:45:57 <_genuser_> I did it once, long time ago manually. Jan 11 10:46:05 using curl on cmdline to generate working call and then just copypaste that into java source with my httprequest library Jan 11 10:46:07 <_genuser_> back then the proxy class generator by MS wasn't all that. Jan 11 10:46:08 no need for even ksoap Jan 11 10:46:27 <_genuser_> now, it's all auto. point your microsoft magic app to it. and it will just work Jan 11 10:46:44 but yeah, I guess 'rest' was better than 'soap' for sure. enterprise happened to soap and it turned to shit Jan 11 10:47:10 it used to be actually simple near when it was conceived Jan 11 10:47:37 <_genuser_> what I don't understand is how all the people are enamored by restful api. Jan 11 10:47:52 some clients I work with send http post/put requests with xml content. The call parameters are in the URL query string, and documents and additional data is in post body Jan 11 10:47:53 <_genuser_> when restful is just a description of what the web world has been doing since inception of web apps. Jan 11 10:48:19 <_genuser_> lol query string RPC is the easiest. Jan 11 10:48:24 responses typically xml, with http status code being 200 for successful op. It is very close to 0 bullshit. Jan 11 10:48:42 <_genuser_> right. Jan 11 10:48:51 <_genuser_> it's the buzz word creators that cause all the mess. Jan 11 10:49:10 <_genuser_> agile was created over a ski trip by people who consider themsevles to be experts in their field. Jan 11 10:49:36 <_genuser_> and the "manifesto" reads like a drunk childs idealist world peace speech. Jan 11 10:49:55 <_genuser_> instead of realistic expectations. but if you see none ofthe authors have actually worked in a job settings. Jan 11 10:50:06 <_genuser_> freelancing for open source groups doesn't count. Jan 11 10:50:36 * capella pouts Jan 11 10:50:45 <_genuser_> was is somethign I said? Jan 11 10:50:52 :) Jan 11 10:50:55 well you can't really come in raging about agile at a job when their other 50 developers are using a different methodology to get things done ;) Jan 11 10:51:19 <_genuser_> oh no. my contractor friends love agile. Jan 11 10:51:25 <_genuser_> they say it have benefits. Jan 11 10:51:32 <_genuser_> but it really just draws out the work. Jan 11 10:51:59 <_genuser_> my customers have said, we're in agile shop. I'm thinking they read the part about "requirements can change at anytime" and thought oh this is just neat. Jan 11 10:52:14 It's the latest thing design methodology afaict Jan 11 10:52:28 There were others before Jan 11 10:52:42 <_genuser_> I like the if it ain't broke, don't fix it design methodology. Jan 11 10:52:44 Andersons Method/1, the CMM, et al Jan 11 10:52:56 i love using agile tools for organization Jan 11 10:53:06 <_genuser_> you know we have frickin' people living in orbit using software that was written older principles. Jan 11 10:53:29 Agile is what the LBMS-ers called the express phase Jan 11 10:53:41 <_genuser_> I like agile, if you own the dev shop. and you know when to stop making changes. otherwise, you're just shooting yourself in the foot. Jan 11 10:53:59 <_genuser_> JakeWharton: since you're here, man thanks again for yourhelp. my app is working so much better now that I don't have tons of threads running asynctask Jan 11 10:54:05 sweet Jan 11 10:54:10 glad they helped out Jan 11 10:54:13 <_genuser_> :) Jan 11 10:54:25 <_genuser_> gotta button up the rest and ship it to play store. Jan 11 10:55:50 I should probably publish my worthless android-obd reader app too. Jan 11 10:56:19 <_genuser_> I figure sending the .apk to my users and making it a download off my site would just raise their virus alerts. Jan 11 10:57:37 i'm getting "Bitmap too large to be uploaded into a texture" without any images exceeding 2048x2048 Jan 11 10:58:21 well what size are they? Jan 11 10:58:35 you only have to exceed one of those dimensions, not both Jan 11 10:59:02 heh - was just checking that math Jan 11 12:04:51 Does android studio come with maven? I want to use App Engine with it Jan 11 12:04:57 To store data in App Engine, of course Jan 11 12:35:31 Hello Jan 11 12:50:23 Hi Jan 11 12:50:37 is it able to extend as a native activity? Jan 11 13:17:43 hello Jan 11 13:18:10 i cant use jackson :( Jan 11 13:18:24 i need some advice - i have a main activity which sometimes shows big text, and sometimes shows an image and a caption. behind each of those can be a similar object type, or a different object type. how should i model this in terms of UI? Jan 11 13:19:02 Hey guys, so I have Activity A add to an ArrayList which is a parceable and is added as an extra when Activity B is started for Activity B to use. When the ArrayList gets added to in Activity A the ArrayList is saved to a file and just before it is sent to Activity B it loads the from the file. However, Activity B has methods to remove from the list, how do I remove from the ArrayList that is sa Jan 11 13:19:02 ved to the file from Activity B? Jan 11 13:24:40 I don't understand how is this difficult to get an amd64 ELF adb? eclipse android sdk manager installs 32-bit version, adt bundle comes with 32-bit version Jan 11 13:28:14 what is the best way to keep a long polling tcp connection alive (in a background-service)? Jan 11 13:30:07 Description Resource Path Location Type Jan 11 13:30:07 Hint: On 64-bit systems, make sure the 32-bit libraries are installed: sudo apt-get install ia32-libs FroyoTest line 1 Android ADT Problem Jan 11 13:30:12 OK Jan 11 13:32:45 hi anyone done something with native activity? Jan 11 13:34:08 And that is painful. How do Debian people develop apps? Do they virtualize Ubuntu or do they configure thos ia32-libs? Jan 11 13:35:21 well, usually if you develope apps you are not using debian Jan 11 13:35:46 Ubuntu is more likely as desktop-environment. Debian is more used for servers. So, when you decide developing on debian its your own fault, isnt it? Jan 11 13:36:09 agree, i think when you choose an OS you should know how to use it Jan 11 13:36:45 i never had any issues using ubuntu as developer-environment. AS is easy installed aswell as ADT (and gradle) is Jan 11 13:37:19 i dont even know what linux is, and i got and evnironemnt set up in Ubuntu no prob Jan 11 13:37:32 :P Jan 11 13:38:07 ubuntu is based on debian, so i guess it shouldnt be that hard to install those stuff on debian. But Ubuntu is very user-friendly and i think it's way more stable for desktop environments then debian Jan 11 13:38:51 Not true. If you often develop backend code, you get to know Debian finally f#$%& you less than Ubuntu in general. Jan 11 13:39:08 hello Jan 11 13:39:10 i have problems Jan 11 13:39:10 Does android studio come with maven? I want to use App Engine with it Jan 11 13:39:24 i get this error Duplicate files copied in APK META-INF/LICENSE Jan 11 13:39:30 android studio gradle Jan 11 13:39:47 galegosimpatico, does it? Really? Jan 11 13:40:05 And in general Debian has less gotchas than Ubuntu and is less bloated. Jan 11 13:40:14 I dont think so. Ubuntu is based on Debian but debian not on Ubuntu. This means you dont have Problems using Debian features/drivers/configurations on debian. Elsehow you cant use ubuntu stuff on debian Jan 11 13:40:56 well, probably in your setup. In mine - and i have lots of different setups - it takes about 2 hours to configure (and finally use it without lags) to use ubuntu.- Debian takes days Jan 11 13:41:15 and think about dependencys.. you dont have "usually" dependency problems in ubuntu Jan 11 13:41:30 Not true. A laptop configuration for debian takes about a pair of hours. Jan 11 13:41:50 Activate the corresponding repositories for the wireless driver and that's it. Jan 11 13:41:54 Yeah? so debian have all drivers included for your laptop as soon as you install it? even vga drivers? Jan 11 13:42:51 Don't get me wrong. I use both too. Debian for Server, Ubuntu for Desktop. I like and love them both. In the Education i do also use OpenSuse and Suse Enterprise which is really not that bad too. But at least it takes more "fun" and it's stable enough to use ubuntu Jan 11 13:42:56 I think haven't configured yet some vga accel, but in the end I always had the same problem with Kubuntu 10 and 12 Jan 11 13:43:02 But let's keep flaming. Jan 11 13:43:08 ;P it's not flame Jan 11 13:43:12 debian sux Jan 11 13:43:21 MacOS FTW Jan 11 13:43:26 bah macos haha Jan 11 13:44:21 At least it doesnt matter. all os have it's own advantages. But Ubuntu is the most user friendly based on linux (after macos) Jan 11 13:44:41 "macos" / osx isnt based on linux Jan 11 13:44:55 its based on unix, which linux also is based upon Jan 11 13:45:18 Oh,s orry. You are right Jan 11 13:45:40 do I need to load an array from a stored file before I update it or will the Activity keep an updated reference? Jan 11 13:45:57 that being said, when it comes to picking the right OS, whatever floats your boat. Jan 11 13:46:00 depends how you access the array Jan 11 13:46:16 so os.writeToObject(arrayList) <- arrayList is updated? or do I need to load from file? Jan 11 13:46:16 That may be true, but Fedora and Debian are sure next easier options to Ubuntu, by short distance. Jan 11 13:46:17 first Jan 11 13:46:48 yupp, for the average user Jan 11 13:46:49 If you keep a reference to the arrayList and update it somewhere it's updated everywhere Jan 11 13:47:08 Depends how you access it. If you have a static reference to the list and change it somewhere else it's updated in your outputstream aswell Jan 11 13:47:27 ah, wait Jan 11 13:48:47 misterly, so I have Activity A add to an ArrayList which is a parceable and is added as an extra when Activity B is started for Activity B to use. When the ArrayList gets added to in Activity A the ArrayList is saved to a file and just before it is sent to Activity B it loads the from the file. I now have Activity B save the ArrayList to file when the last index is removed but when I go back to Jan 11 13:48:47 Activity A and add to the ArrayList the first index is overridden I think Jan 11 13:49:48 (without removing the last index I mean) Jan 11 13:50:20 so add -> Activity B -> back -> Activity A -> add -> Activity B -> one index Jan 11 13:55:29 For the flamewar guys I'm installing the 32 bit library packages which I hope let me keep developing. On a system that has not frozen yet a single time since more than a year ago. Jan 11 13:57:06 Oh wait there will gonna be problems getting Debian recognizing the phone D: Jan 11 13:57:24 But this is free software! Jan 11 13:57:45 Backed by people not corporations. Jan 11 13:58:01 i can give you a software which is not working for free aswell Jan 11 13:58:02 want it? :) Jan 11 13:58:48 oh, btw. Why does apt-get purge .. | apt-get autoremove | apt-get autoclean not remove the software completly in deb? :) Jan 11 13:59:13 You have to use aptitude, it's more operating. Jan 11 14:00:09 I just can't get bloody GMS to work through gradle Jan 11 14:00:18 it's not giving any particular error message Jan 11 14:00:26 but the classes aren't there Jan 11 14:03:05 is there any concept of model binding in android? Jan 11 14:05:26 Oh man, you are gonna love is. Jan 11 14:06:40 Results that I have just configured the ia32 libs and Debian is recognizing the cellphone, which is actually a crappy lowend sony cellphone that a virtualized Ubuntu didn't recognize at workplace. Jan 11 14:08:06 I bet you have no explanation for this, as myself am amazed of this fact. Jan 11 14:08:14 pellis: describe model binding Jan 11 14:08:49 Ankhwatcher, i take a POJO, bind it to a fragment. textboxes/UI objects get bound to values in the POJO. when the POJO changes, UI changes automatically Jan 11 14:09:43 there is no binding on android. or in java in general, in that respect, unless you count the manual work with the propertychangeobservers Jan 11 14:10:18 i see, wondering if there's any open source library that does that? Jan 11 14:11:09 I imagine the preference code has something a bit like what you want in sense that there is a bidirectional bound between the preference value and the control Jan 11 14:11:37 but iirc it requires manual refreshing if you update the preference behind its back, and android provides the code to update the pref when the control changes Jan 11 14:12:22 yep something like that but for my own objects and UI Jan 11 14:12:28 i'll google it i guess. Jan 11 14:13:35 If i have a Service which creates an object and a observer. The Object created a Thread which runs "forever". How about the GC? What happen when the Services onDestroy is called? Will the Thread be destroyed too? Jan 11 14:13:52 I guess it's not very difficult problem to model. Basically you can provide a generic thing -- call it Model -- which accepts say EditText, object, and name of property as string. It will set a value change listener on the edittext to update the value referred by string, and provides a method to call when the reverse operation must be made -- or you simply update the property from now on via the model Jan 11 14:15:29 a call to get() accesses the underlying object's property, call to set(foo) changes it and also updates value in edittext. You'll need a couple more classes to deal with all control types but not many Jan 11 14:15:35 could be best handled by factory method Jan 11 14:16:25 fiexed it! Jan 11 14:16:28 the Model should probably be generic though at compile time the safety can't be ascertained thanks to nature of java's generics and reflection Jan 11 14:16:29 erm fixed Jan 11 14:17:12 an abstract class that requires user to override get() and set(T foo) would of course be compile-time type safe Jan 11 14:17:54 misterli: Services, activities, etc, are just regular objects, they don't work in any special way. onDestroy is just the framework letting you know that it's no longer a valid context.. It will dereference it and not call any more methods on that instance Jan 11 14:18:14 Hello, I want my application to browse to my page, auto-insert saved login data and display index.php then, can anyone recommend me a solution? stackoverflow or something like that Jan 11 14:18:42 Threads run until their run method returns.. If they keep a reference to any objects they will not be gc'd until the thread stops Jan 11 14:30:11 In my Activity A, I converted bitmap to byte[] so that it is parcelable, and in Activity B I'd get that byte[] convert it to a bitmap and use as an icon for google maps marker.. I tried to run it but I didn't get any errors in the logcat, but the app just constantly crashed everytime I tried to open the maps Jan 11 14:30:15 (activity B) Jan 11 14:33:44 why is this? Jan 11 14:41:18 You don't want to put bitmaps in bundles Jan 11 14:41:28 There a limit to how much data they can hold (Ilike 1 mb or something) Jan 11 14:41:31 gson seems lot faster for my usage Jan 11 14:41:58 Put a key or something that tells the activity how/where to get the bitmap Jan 11 14:44:07 SimonVT, but they're byte arrays aren't they a lot smaller? Jan 11 14:46:23 I noticed some performance problems with ThreadPoolExecutor. At some devices numbers of corepoolsize makes things worse Jan 11 14:46:32 mean larger is worse Jan 11 14:50:50 how much is large? Jan 11 14:50:56 8 Jan 11 14:51:07 the pool size needs to be chosen optimally for the types of tasks being performed Jan 11 14:51:32 i wanted to make 8 network calls Jan 11 14:51:47 because server has high latency Jan 11 14:51:51 CocoStorm: nope Jan 11 14:51:59 cpu-bound suggests a pool size equal to number of cores. i/o generally more, to enhance parallelism. IMHO, too many threads with i/o just makes all i/o operations slower Jan 11 14:52:19 that helped a lot performance at tablet Jan 11 14:52:20 but you sound like you have a reason for doing more i/o parallelism Jan 11 14:52:40 but degrated performance for local server at my old phone Jan 11 14:52:42 Or well, I guess.. If you converted to png or something.. Jan 11 14:52:44 in theory if the response is quick, you gain the entire network bandwidth with just 1 thread already Jan 11 14:52:55 yep but there is 200ms latency to server Jan 11 14:52:56 Still, bundles are not a place for bitmaps Jan 11 14:52:58 so it adds up Jan 11 14:52:59 Keep the data small Jan 11 14:53:46 i mean the difference is hudge 8 seconds without threads for requests Jan 11 14:53:48 vs 1 sec Jan 11 14:53:54 Does android studio come with maven? I want to use App Engine with it Jan 11 14:54:07 autrilla: yeah Jan 11 14:54:19 jacky, how do I set it up then? I get an error Jan 11 14:54:36 SimonVT, what do you suggest I do? Jan 11 14:54:39 I meant Maven support, not Maven binaries Jan 11 14:54:40 my bad Jan 11 14:54:44 Oh Jan 11 14:54:46 SimonVT, I don't have a resource Jan 11 14:54:47 And how do I install it? Jan 11 14:55:54 autrilla: install Maven? Have you used it before? Jan 11 14:56:02 jacky, no Jan 11 14:56:24 Ah. Well check out http://maven.apache.org Jan 11 14:56:58 Save it to a file or keep a memory cache Jan 11 14:58:09 jacky, got the zip extracted (at D:/Programming/Java Jan 11 14:58:23 Ah, you're using Windows. I won't be able to help you Jan 11 14:58:30 but the instructions are straight forward Jan 11 15:00:01 jacky, well, I think it is installed... how do I tell IDEA where it is? Jan 11 15:00:07 Or gradle or whatever asks for it Jan 11 15:01:12 That's partially-platform dependent Jan 11 15:01:21 I recommend Googling first Jan 11 15:01:31 if you can't find anyhting, come check back here or in #maven Jan 11 15:02:24 jacky, for what I can see, I need to set up a Maven project and then tell it where the SDK is Jan 11 15:04:01 Hmm. I'm getting `NoSuchMethodError: android.widget.TabHost.setScrollX` on 2.3.3. Jan 11 15:04:54 Ok, `Added in API level 14 Jan 11 15:05:05 Any way to simulate this?... Jan 11 15:05:25 is there a vertical viewpager? Jan 11 15:05:48 public void setScrollY(int value) { Jan 11 15:05:49 scrollTo(mScrollX, value); Jan 11 15:05:49 } Jan 11 15:05:50 Cool. Jan 11 15:05:52 Disregard. Jan 11 15:13:47 SimonVT, save the bitmap to a file? Jan 11 15:14:03 hmm Jan 11 15:27:20 If I've made an ArrayList of Parcelable objects so that I can add it to a bundle as an extra when starting another activity. And I make those objects serializable so I can save the arrayList to a file, do I still need to add it to as an extra in the intent? Jan 11 15:29:33 hey guys Jan 11 15:29:41 got a question Jan 11 15:29:59 I'm trying to intercept links on a webpage. I was able to setup intercepting links to our website with http://foo.com Jan 11 15:30:07 but I also want to intercept foo://blah links Jan 11 15:30:25 (I didn't choose to do this. I dislike this idea. We didn't implement a new protocol. But it is some legacy thing that I have to live with) Jan 11 15:30:30 anyway, these have no host Jan 11 15:30:42 so I just have Jan 11 15:30:53 clicking those links with that data tag won't work, though Jan 11 15:31:03 I think maybe I need a scheme and a host? Jan 11 15:34:39 oh, shoot. So...I need a path Jan 11 15:34:51 foo://open will work. And "open" is the host Jan 11 15:35:06 alright, this is do-able now. A total hack but whatever Jan 11 15:35:08 thanks :D Jan 11 15:37:16 my app crashes if i add pages on top, for a view pager adapter Jan 11 15:37:31 something about: Can't change tag of fragment ShareFragment Jan 11 15:42:40 To use Maven on Android Studio, do I need to create an Android Project, or a Maven one? Jan 11 15:56:46 jacky, can you tell me how you do it on linux? Maybe it works similar on windows... Jan 11 16:00:57 autrilla: not the same case, but when I had to do a joint jersey/drools project was a somewhat similar situation in the terms I had to create a JEE project or a Drools project. But creating a JEE project and then resolving Drools dependencies did ok. This was eclipse. Jan 11 16:18:24 can you place a map on an nfc tag Jan 11 16:18:33 galegosimpatico, I'm on Android Studio :( Jan 11 16:18:40 Ankhwatcher, depends on the size of the map Jan 11 16:18:46 You can serialize it and write it Jan 11 16:19:00 sounds promising Jan 11 16:19:33 I guess you mean a Map<> Jan 11 16:19:37 And not a Google Map Jan 11 16:21:17 yeah I have a hashmap Jan 11 16:21:41 but I'm thinking maybe I need to switch to a different map Jan 11 16:22:48 Ankhwatcher, maybe have a look at guava's maps Jan 11 16:23:49 did someone else experience that his app was sold on Google Play to a country in which it shouldn't be available? Jan 11 16:25:49 If that happened I thrive to know more about the case. Jan 11 16:28:58 galegosimpatico, not much to say, got three sales in the last few months from three countries where my apps shouldn't be available Jan 11 16:31:22 But that sounds like Iran or something creepy. Jan 11 16:31:42 Are you boycotting Iran? Jan 11 16:31:56 Serbia, Ukraine and Qatar Jan 11 16:32:19 galegosimpatico, you can't sell to Iran via Google Play at this time Jan 11 16:33:01 http://developer.android.com/reference/android/app/Fragment.html <- I cannot understand the example here. The Fragments are declared static, so should they be inner classes of the Activity? it is kind of gross to have all the different classes in a single file. Jan 11 16:34:50 So don't make them an inner class Jan 11 16:35:27 but then they cannot be static. so they just shouldnt be? Jan 11 16:36:18 http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html Jan 11 16:43:30 I think I'm going to have to start my project from scratch... Jan 11 16:43:36 hello how can i determine pool size for threads ? Jan 11 16:47:04 Hello, I have a Samsung Galaxy S3 and I need to develop an app that uses the InfraRed blaster (that devices like SG4 and HTC One X has) is there something I can do other than get on of those devices? anyone tried this http://www.irdroid.com/purchase/ ? Jan 11 16:51:00 viran: afaik they both act slightly differently so if that's your target platform you're going to need to get one of each Jan 11 16:51:25 if you're making an app specifically for a unique piece of hardware you'd want to have that exact hardware anyhow, would't you? what would be the point, otherwise Jan 11 16:53:28 I want to create a remote control for a spefic device, the app should work for every phone that can use those IR frequencies. you're saying that each phone is different? Jan 11 16:53:42 Hey guys, I'd like to embed my own custom bitmap onto another in this case the default google marker icon. So rather than replacing the google marker completely I'd like to have a picture within that. Is this possible? Jan 11 16:55:17 viran: there is no android standard IR interface, it's a per-vendor hack Jan 11 16:55:27 viran: how similar those vendor hacks are, I don't know Jan 11 16:55:51 Kitkat added api's for ir transmitters Jan 11 16:56:32 dragorn: i see, i though it's in the api already... Jan 11 16:56:58 maybe it is as of 4.4 Jan 11 16:57:24 <|0xD34D|> viran: see http://developer.android.com/reference/android/hardware/ConsumerIrManager.html Jan 11 16:57:36 yeah. as of api 19 there is a common way. I don't think the htc or the samsung ship 4.4 on all carriers yet though. Jan 11 16:58:44 thanks :) Jan 11 17:01:48 Hey guys, I'd like to embed my own custom bitmap onto another in this case the default google marker icon. So rather than replacing the google marker completely I'd like to have a picture within that. Is this possible? Jan 11 17:04:22 Hi. I have an Activity, which has (created and showed in this order): 1. ListFragment that shows some data and not added to Backstack; 2. DialogFragment which is called from ListFragment and showed over it and is NOT added to backstack; 3. PreferencesFragment which IS added to backstack. After DialogFragment is dismissed, if I go to PreferncesFragment and press back - I see DialogFragment... How do I avoid opening of DialogFragment Jan 11 17:12:45 I guess I'll have to install Linux again! Jan 11 17:15:17 autrilla: linux? why? Jan 11 17:15:30 gdrc, I can't get maven working with Android Studio on Windows Jan 11 17:15:39 So I can't use App Engine Jan 11 17:16:00 i still dont get it. I have a tcp connection to the server. I have a service which implements an observer and the service creates the connection in onStart.... and destroy it in onDestroy... The Connection does timeout as soon as the display is off (no wake locks) but the service is still running. Why is this? Jan 11 17:16:09 I don't know App Engine Jan 11 17:17:08 autrilla: why you need that? Jan 11 17:17:23 gdrc, because I need to store data on the internet Jan 11 17:17:28 And it's a good service Jan 11 17:20:36 autrilla: how many space do you have? Jan 11 17:20:46 Space where? Jan 11 17:21:50 where do you store data? Jan 11 17:23:16 So there's no way to stitch two bitmaps together? Jan 11 17:29:10 Sure, back Canvas by a 3rd bitmap and draw both to it Jan 11 17:29:33 Or draw to one of the existing bitmaps Jan 11 17:31:52 SimonVT, is that the only way of embeding a bitmap into a default google marker? Jan 11 17:32:45 I have no idea.. But that's how you combine two bitmaps Jan 11 17:34:53 SimonVT, kk I'll try it out :) thanks! Jan 11 17:39:15 any ideas why my phone goes into a bootloop when i plug it into my computer? Jan 11 17:39:35 if i just plug it in to transfer files, its fine, but if adb is running it keeps rebooting Jan 11 17:40:18 im running ubuntu 12.04, cyanogenmod 10.1, and its an htc evo v 4g Jan 11 17:40:27 and im using the usb cable that came with the phone Jan 11 17:41:14 and intellij idea 13 is what im using to run my app, but i doubt that makes a difference Jan 11 18:22:24 if I'm creating: new AlertDialog.Builder(callingActivity) - is it possible somehow to call Dialog methods, like setCanceledOnTouchOutside(false) ? Jan 11 18:22:45 or how is it possible to set setCanceledOnTouchOutside(false) for a alertDialog? Jan 11 18:27:49 nvm, found solution... I can simply run create() which returns a Dialog and modify it before show() ^_^ Jan 11 18:28:00 and it is workZ! Jan 11 19:19:02 Example how to connect android app with tcp server ? Jan 11 19:23:54 I have a unix timestamp that tells me the day without minutes, seconds.. what's the best way to check that's the current day? Jan 11 19:24:42 Is there a better way than creating a new date from a String and check whether they're equal? Jan 11 19:25:29 does anyone know how to get the API key from Google Cloud Messaging? the instructions on their website are outdated Jan 11 19:25:48 Compare it with the current timestamp and see if the difference is larger than X seconds. Remember to adjust for timezones. Jan 11 19:26:02 KeyboardNotFound: standard java networking Jan 11 19:26:56 kjeldahl, the unix timestamp I got is exact as I said (1 Jan 2013, 15 March 2012... because it was converted from a String to a unix int) Jan 11 19:27:31 use the time functions to make a record of the current day then get the timestamp out of it Jan 11 19:27:34 I asked whether there is a better option, it seems unnessarcy(kfds (however you spell it) Jan 11 19:27:54 What do you mean? Jan 11 19:29:27 is the GCM API credentials the same ones as OAuth Jan 11 19:29:29 ? Jan 11 19:30:07 Dreeas: Generally, you use time utility functions to convert them to dates, and then compare. But assuming you know the current time related to the current timestamp, deduct this from the current timestamp and compare with the one your checking against. If that one is >= startofday and less than startofday+24hours, it's "today". Jan 11 19:30:15 Dreeass: use the java calendar functions to figure out the timestamp for the start and end of today, then compare. Easy. Jan 11 19:31:35 kjeldahl, dragorn, well you're suggesting the same thing I wanted to do but added the beginning of the day and the end time which is not needed. I can just use the current day unix timestamp since the one I got is exact (always is). Jan 11 19:35:14 So see if you're w/ in 24 hours of the timestamp given. I dont' see the issue. Jan 11 19:35:41 Dreeass: the class Calendar can convert timestams to gregorian values Jan 11 19:35:52 It's an awkward legacy-ridden piece of crap though Jan 11 19:36:18 Calendar c = Calendar.getInstance(); c.setTime(yourDateGoesHere); c.get(Calendar.YEAR), c.get(Calendar.MONTH), c.get(Calendar.DATE), and add 1 to month Jan 11 19:36:22 awkward as hell Jan 11 19:36:40 the new date stuff in jdk8 is probably not going to appear on android any time soon Jan 11 19:37:02 new date in jdk8? Jan 11 19:37:06 I thought jodatime was in java7 Jan 11 19:37:12 nah I think not Jan 11 19:37:15 alankila: not even. if you're guaranteed to get the start of a day from whatever, and you trust it to always give you the start of the day, then if now < start || now > start + 24*60*60 then it's not in the day. Modulo for timezones, have fun with that. Jan 11 19:37:24 s/modulo/modifi/ Jan 11 19:37:26 y Jan 11 19:37:55 dragorn: eh? I make no such assumptions. There are of course more compact ways to convert date to string which may be enough for this task -- is a timestamp still on today Jan 11 19:38:09 alankila: he's apparently willing to make such assumptions Jan 11 19:38:16 MessageFormat.format("{0,date,yyyy-MM-dd}", date) comes to mind Jan 11 19:38:17 alankila: I'd use calendar, myself, in most situations Jan 11 19:38:38 at least MF is less typing but bummer if you need the values for calculation Jan 11 19:41:15 anyway they didn't quite put jodatime into jdk, just something fairly similar. I confess I'm anxious to leave the calendar-related java.util.* and java.sql.* stuff behind if at all possible. Jan 11 19:41:29 Where should I put Android Studio on linux? Jan 11 19:41:32 especially java.sql.Date and j.s.Timestamp piss me off Jan 11 19:43:36 autrilla: my favorite is to dump stuff like that to Deskto Jan 11 19:44:01 I just prefer working like that, especially for .tar.gz type installs like eclipse Jan 11 19:44:07 haven't tried AS on Linux yet Jan 11 19:45:14 autrilla: It typically goes into /opt or /usr/local Jan 11 19:46:24 kjeldahl: ok, so not on Desktop Jan 11 19:47:21 You can put it where you want, but typically you need to set some environment variables to point to it. Jan 11 19:47:46 kjeldahl: even on /opt? Jan 11 19:48:48 Yes, I do not think there is any default location for AS. Jan 11 19:49:49 kjeldahl: alright... But do I have to execute it as root? That is not safe is it? Jan 11 19:51:58 You need root to install it (system-wide), but it stores all user data in your HOME, so you do not need root to run it afterwards. Jan 11 19:52:40 If that's an issue for you, install it in your home (for instance under Desktop like suggested already, or anywhere else in your home). Jan 11 19:53:20 Its a hang-over from when systems were shared between users. These days I usually set myself as owning both /opt and /usr/local. Jan 11 19:53:37 (then it's easy to install stuff there without root) Jan 11 19:59:09 sh: 0: Can't open /opt/android-studio/bin/studio.sh Jan 11 19:59:15 I guess perms Jan 11 19:59:40 Probably. Jan 11 20:24:50 Hm... So just chmod 777 the whole folder recursively? Jan 11 20:28:39 No. You chmod a+x /path/to/script.sh Jan 11 20:29:59 kjeldahl: and if I want to use App Engine, should I make an Android Project or a Maven Project? Jan 11 20:32:57 Hi,what is the best way to add a bottomMargin to an element in a RelativeLayout? Is it best to wrap the element in another view and add padding? Jan 11 20:38:40 autrilla: That's one thing I know nothing about unfortunately. Jan 11 20:39:17 But I believe App Engine is backend/server stuff, so I would gof or Android Project (assuming you are working on the client side with an Android app). Jan 11 20:39:28 "go for" Jan 11 20:43:28 Ah, RelativeLayout inside a RelativeLayout with padding did it. Wish they'd fix the layout measurement bug with RelativeLayouts. It's been there since 2.2 I think Jan 11 20:45:14 Why is an EditText's afterTextChanged still called if I remove the TextWatcher before editing and add it again after I edit? Jan 11 20:48:36 I can see a time when they just remove all the views from Android except for OpenGL and WebView. The html rendering engine is so much more powerful than using the native widgets for layout and styling Jan 11 20:49:17 kjeldahl: it has a backend, yes, but I can use it to store data on the internet... and I need maven for it, so I'm confused Jan 11 20:51:50 autrilla: That's outside my area of expertise. I know what maven is, and I doubt it is ideal for building Android apps. It may be well suited to compile/push packages to App Engine, but again, I'm guessing. Jan 11 21:01:09 Anyone? Jan 11 21:01:53 ? Jan 11 21:06:25 I dont really get fragments. for a game which would have MainMenu+highscores+how_to_play+play_game, that is 4 different activities+views. would Fragments decrease the amount of code? maike it more modular? Jan 11 21:07:45 Hello. I have a ListView and I want to have two items per row. Is there a "best" way to do this, or should I just have a "ListRowFragment" which contains two "ListItemFragment"s? Jan 11 21:08:01 Is there a list that shows all of Android's default drawables? Jan 11 21:08:18 That you can access through @android:drawable/...? Jan 11 21:08:33 bricker: Sounds like fragment would be overkill, just have a view with your two items in each row. Jan 11 21:09:09 Dreeass: http://androiddrawables.com/ Jan 11 21:09:31 bricker, ya that's what I found too. But it goes till 4.1, isn't it outdated? Jan 11 21:11:12 bricker, it also shows "ic_menu_search_holo_light" but I don't seem to have that. Jan 11 21:12:41 Dreeass: yeah I guess so. You can also just look in the SDK - {sdk}/platforms/android-*/data/res/drawable-* Jan 11 21:13:11 kjeldahl: I see. So the ListView would have several of these ListRowView's as direct descendants? Jan 11 21:13:17 bricker, thanks. Jan 11 21:14:38 Dreeass: Look up the javadocs for android.R.drawable Jan 11 21:14:50 bricker, the folder seems to contain "ic_menu_search_holo_light" but IntelliJ says it's no valid reference. Jan 11 21:15:50 It doesn't seem to work for most other drawables either. Jan 11 21:16:35 SimonVT, why doesn't it contain all of the drawables inside of the res drawables folder? Jan 11 21:18:34 kjeldahl: ah, it looks like Grid View may be what I need Jan 11 21:18:44 It was a mistake to add any of them to the api Jan 11 21:19:07 Add drawables to your own project Jan 11 21:20:17 hi Jan 11 21:20:30 ring3 hey Jan 11 21:20:39 i have an html5 app locally on the apk Jan 11 21:20:50 i load it using file:// Jan 11 21:20:52 is there an JNI_OnUnload ? Jan 11 21:20:57 probably not eh Jan 11 21:21:03 then then i cant use http requests ? Jan 11 21:21:04 SimonVT, it is so annoying to rename them and drag them to the drawables folder from the IconPack download. Why isn't there something to make this more easy? INTELLIJ PLUGIN REQUEST Jan 11 21:21:17 ring3: you can do things via JS Jan 11 21:21:37 if i use xmlhttp to load a file Jan 11 21:21:50 is a cross-origin Jan 11 21:21:58 bricker: You can use a standard list as well and populate it with your own views. But if GridView does the job then fine. Jan 11 21:22:06 on a normal browser is not possible Jan 11 21:22:10 is posible with web-view? Jan 11 21:22:32 ring3: probably Jan 11 21:24:04 Weird... I'm launching my app in debugging mode on two different devices and one of two does not have a breakpoint being reached, the on at the service's onStartCommand() Jan 11 21:25:12 then do i have to run a webserver inside the phone to launch my html5 app? Jan 11 21:25:28 Is there an update icon pack available supporting xxhdpi? Jan 11 21:25:34 updated* Jan 11 21:25:47 ring3: Why not use your html5 app through the device's browser? Jan 11 21:26:50 ring3: You can load xml cross-origin, you just need the 3rd party server to suppy the correct headers Jan 11 21:27:00 *supply Jan 11 21:27:27 Got one, mb Jan 11 21:27:38 Smashcat: there is not 3rd party, all the content is in local Jan 11 21:27:42 inside the phone Jan 11 21:27:59 but i use XMLHttpRequest to a relative path Jan 11 21:28:13 ring3: What I mean is, you can load content from any server via an AJAX request, as long as the server sends back the right headers Jan 11 21:28:48 on the apk i have the /www/images /www/css etc .. Jan 11 21:29:13 i load file://android_asset/ ... Jan 11 21:29:20 God thank the updated icon pack finally has good naming. Jan 11 21:29:27 i use ajax to localhost Jan 11 21:29:45 ring3: Sounds like you'd be better off just making an offline HTML5 app bundle., with a local database Jan 11 21:30:11 yes, 100% offline Jan 11 21:30:27 if the javascript is under a file:// context Jan 11 21:30:43 on chrome is not allowed to do ajax Jan 11 21:31:12 but i can change it to be loaded without ajax .. all from an hhtml ... Jan 11 21:31:15 ring3: If your entire app is HTML/JS then you can make a bundle to work offline. That's how a lot of webapps work on Android/iOS Jan 11 21:31:44 a bundle? what do you mean? Jan 11 21:31:49 i use a WevView Jan 11 21:32:57 ok, i load all from html for avoiding problems Jan 11 21:32:59 ring3: Search for "html5 offline app android" in google, and there's tutorials. You don't even need to make an Android app to do what you're trying to do I think Jan 11 21:33:04 but i have to modify the libs .. Jan 11 21:33:27 are you thinking in phonegap ? Jan 11 21:33:43 ring3: No, it's something that works in HTML5 Jan 11 21:33:50 lol Jan 11 21:33:53 and i get an apk? Jan 11 21:33:54 oks Jan 11 21:33:56 checking Jan 11 21:34:28 Hey guys, I'm currently using eclipse's debugger to debug my app. LogCat is receiving data from the device, but the activity's space is black. By that I mean that the screen is lit up, the top bar is there, it shows the time and battery, but the rest of the screen is black. Also, the device is telling me my app is not responding. Why is that so if LogCat is receiving logs Jan 11 21:34:29 ? Jan 11 21:34:54 ring3: The good thing is that it will work on Android and iOS if you code it right. No need for a native app. Of course if you're using animation etc then a native app is faster. Jan 11 21:34:59 Your app freezing doesn't stop logcat Jan 11 21:37:45 SimonVT: So what is freezing if my app is still sending logs to logCat? Jan 11 21:38:05 Whatever is sending those logs, likely Jan 11 21:38:33 Freezing isn't really the right word Jan 11 21:38:41 SimonVT: The app is sending the logs Jan 11 21:38:49 If something on the main thread takes longer than 5 seconds you'll get an ANR Jan 11 21:39:29 A while(true) that logs to logcat would send logs, but it would cause an ANR Jan 11 21:39:58 SimonVT: My phone, the device which has the black screen, does not have the service initiated by the app. My tablet has the exact same app, and there is only a black screen before the service gets initiated (I've placed breakpoints at key moments) Jan 11 21:40:18 From the perspective of the user your app is frozen.. Your app might do a lot of work, but it does not respond to input Jan 11 21:40:34 SimonVT: Oh I see Jan 11 21:40:57 tl;dr stop doing work on the main thread Jan 11 21:41:02 SimonVT: So there's a thread that's waiting for something Jan 11 21:41:06 the main thread. Jan 11 21:41:25 SimonVT: Well, could that be related to my service not launching? Jan 11 21:42:03 The app on my tablet has the service launched without any problem, and the screen displays the app running correctly, but the phone does not launch the service, AND its screen is black Jan 11 21:42:07 Can someone tell me why the following XML menu gives errors saying no resource identifier found for Attribute showAsAction and actionViewClass? http://hastebin.com/vocalukavo.xml Jan 11 21:42:11 I have no idea Jan 11 21:42:19 If you're blocking the main thread you'll get an ANR Jan 11 21:42:21 It comes straight from the Android developers site. Jan 11 21:42:55 Dreeass: You haven't added appcompat as a dependency Jan 11 21:43:23 SimonVT, I have. Jan 11 21:43:38 Both v4 and v7 Jan 11 21:44:26 http://pbrd.co/1dcn1XE Jan 11 21:45:17 Did you just add the jar? Jan 11 21:46:05 SimonVT, I'm using the files provided in the SDK Jan 11 21:46:18 SimonVT: Alright, so there is something blocking the main thread.I disconnect the USB cable and the black screen is gone, giving space for the app itself. That means that the main thread was affected by the debugger? Jan 11 21:46:47 wilornel: Did you set a breakpoint in something that was called on the main thread? Jan 11 21:47:05 Dreeass: So you just added the jar Jan 11 21:47:09 appcompat is a library project Jan 11 21:48:01 SimonVT: I did set a breakpoint in something that was called on the main thread. On the main thread, I am calling startService(intent), where I have placed a breakpoint. Also, there is a breakpoint in the onStartCommand() function of the service.... Maybe that's why? Jan 11 21:48:21 Well, yeah.. Jan 11 21:48:29 Unless you tell it to continue it will wait there.. Jan 11 21:48:46 SimonVT: Well, the debugger, on my IDE, does not stop at that breakpoint Jan 11 21:49:54 hello Jan 11 21:50:05 SimonVT: On my tablet, the debugger is reaching that breakpoint inside onStartCommand. On the other hand, on my phone, the debugger does not reach that breakpoint.... Jan 11 21:50:09 I'm working on android development with linux for augmented reality apps Jan 11 21:50:50 ok so am i correct in saying that your main activity never actually calls GcmBroadcastReceiver? (google cloud messaging) Jan 11 21:51:00 SimonVT: Anyways, I remove the breakpoint and it still does the same thing,,, Jan 11 21:51:31 removed* Jan 11 21:51:32 when a message is receiver, GcmBroadcastReceiver broadcasts the message (correct me if im wrong) Jan 11 21:51:39 received* Jan 11 21:52:05 how can i, for example, change a text view to be the contents of this message? Jan 11 21:52:29 ....because i cant access the UI from the GcmBroadcastReceiver class Jan 11 21:52:36 SimonVT, yes I'm using the .jar files now. Jan 11 21:53:47 PDilyard: There is a function called "runOnUiThred" or something that I use to update views when something happened Jan 11 21:54:32 loffa: within the GcmBroadcastReceiver class? Jan 11 21:55:01 It is part of the android fframework and can be run from everywhere. Let me look it up Jan 11 21:56:11 PDilyard: http://developer.android.com/reference/android/app/Activity.html#runOnUiThread%28java.lang.Runnable%29 Jan 11 21:57:43 so when i receive a message from GCM, i use that method and i have access to elements of the UI? Jan 11 21:58:19 PDilyard: That function will be qued to be executed in the UI thread and there you can modify them as usual Jan 11 21:58:43 Any idea why the device shows a black screen when it is connected to the debugger even though there are no breakpoints? The device suggests to shut down the app after a short moment(not 5 seconds, more) Jan 11 21:59:08 I'm 64bits, can i install any sdk? Jan 11 21:59:23 i was thinking on use virtualbox .. Jan 11 21:59:34 wilornel: Probably bad coding :( Does it have any loops that it gets stuck in? Jan 11 21:59:39 loffa: hmmm....so where would you actually put this function? in my activity or in the class? Jan 11 22:00:19 * in the receiver class Jan 11 22:00:27 loffa: Not that I know of. This issue only happens on my celllphone, not on my tablet Jan 11 22:00:34 can't tell you that. But I would try in the reciver class first Jan 11 22:01:13 hmm alright...im still kinda trying to come to grips with how the intentservice actually works Jan 11 22:01:21 I see so many people struggling with IntelliJ's Gradle that it seems fucking impossible Jan 11 22:01:56 I have put 5 hours into making Gradle work and it just doesn't on IntelliJ, now when I try using the plain support libraries it doesn't work either. Jan 11 22:02:03 loffa: I guess you don't know, then? Jan 11 22:02:10 I'm regretting my decision of switching to IntelliJ... Jan 11 22:02:33 wilornel: no I don't think so. I have only developed for phones Jan 11 22:02:36 There is absolutely zero help around Intellij, while there is tons and tons of help for Eclipse. Jan 11 22:02:59 loffa: I don't see the difference between phones and tablets... I mean... It worked on both devices before Jan 11 22:03:05 Looks like there's no avoiding Gradle, IntelliJ or not. Having said that, I think it works better than anything before it. Jan 11 22:04:06 lol. ok so i tried to CHEAT. i used objcopy to mark my .text section on my NDK code as +X and +W Jan 11 22:04:08 Btw, can someone tell me what Appcompat v4, v7 and v12 mean? Jan 11 22:04:11 wilornel: Try to remove the app totaly before installing it again might be an option. Some garbage file laying araoun Jan 11 22:04:15 d Jan 11 22:04:17 Why can't there just be one simple Appcompat? Jan 11 22:04:20 guess the linker loader does not honor setting of +w on text at load time lol Jan 11 22:04:21 dammit Jan 11 22:06:56 <|0xD34D|> Dreeass: my guess would be some stuff just can't be made to work on older APIs Jan 11 22:07:11 How is a fragment more modular than another view+activity? is it really less code with Fragments? Jan 11 22:08:05 fragry: no, but you stay in one activity and fragments (and their views) are composable Jan 11 22:08:20 |0xD34D|, why is it so hard to use them all in IntelliJ? I'm really getting so pissed right now because of these simple things that should work (and work in Eclipse) that are a fucking hassle in IntelliJ and aren't working at all; Jan 11 22:08:21 JakeWharton, define composable? Jan 11 22:08:38 Put multiple together on the screen at once. Jan 11 22:09:09 i dont really get frags, is this like having two separate but related activities visible at the same time? Jan 11 22:09:21 Yes Jan 11 22:09:25 aha Jan 11 22:09:30 They are management containers for views. Jan 11 22:09:33 do they run as separate threads? Jan 11 22:10:01 Main thread. Their UI management containers. Jan 11 22:10:08 oh Jan 11 22:10:12 They're. (Stupid phone) Jan 11 22:10:30 so whats the difference betweena fragment and a view Jan 11 22:10:36 why use a fragment over using just another view? Jan 11 22:10:40 or view group Jan 11 22:10:49 Fragment is logic and life cycle Jan 11 22:10:53 View is UI Jan 11 22:11:08 loffa: "remove the app totally". That's not a simple uninstall, right? Jan 11 22:11:23 How come it runs perfectly fine when I'm not trying to use a v7 appcompat SearchView and outputs errors that don't make any sense because I have the fucking dependencies. Jan 11 22:11:36 I am literally losing my mind right now Jan 11 22:11:36 wilornel: I yes it is. Not from the comand line but from the phone Jan 11 22:12:05 What does this error even mean: android-apt-compiler: [Nupdate] W/ResourceType( 6892): ResXMLTree_node size 0xffffffff or headerSize 0xffff is not on an integer boundary. Jan 11 22:19:44 one would think SSLSessionCache would have a get / put SSLSession O.o Jan 11 22:34:40 hey g00s Jan 11 22:34:57 I always get Failed to install Android Health at Home.apk on device '07b0e904': timeout wtf Jan 11 22:34:58 hi gdrc Jan 11 22:57:08 How do you handle the different API:s codewise? Jan 11 22:58:25 So i have a textview that's selectable but not editable...yet i can still get a keyboard to show with it if i press next on the keyboard from the other edittext's Jan 11 22:59:16 Is there any point in using Fragments if you dont use tablets? (im just asking cause i wonder because i will probably make the app for tablets as well) Jan 11 22:59:59 fragry, yeah, my app uses fragments on phone Jan 11 23:00:08 fragry they have purpose and are a tool at your disposal, understand them and if you choose not to use Fragments then that is up to you Jan 11 23:00:15 i have a drop down navigation that switches out a fragment Jan 11 23:00:28 instead of starting a whole new activity for each section Jan 11 23:00:54 though...you probably could do that without Fragments...I think Jan 11 23:02:58 hmm Jan 11 23:04:24 frankdrey: you could do it but maybe it takes longer time, so fragments could make your app react quicker? Jan 11 23:06:11 I dunno. I guess it's sort of like OOP, you could do without it, but it's very very useful :P Jan 11 23:06:32 useful indeed, but first one needs to understand what value they provide Jan 11 23:09:58 How do I create a Button in a Fragment when it needs a context as input? Jan 11 23:10:52 usually your button would be created via a layout you inflate Jan 11 23:11:19 you sound like you are trying to skip over alot of important stuff, maybe you should go do some reading Jan 11 23:18:03 alright figured out my problem :D Jan 11 23:19:14 I set a new OnFocusChangeListener for the TextView, and hid the keyboard when it's focus changes Jan 11 23:24:03 fragry: you can call getActivity() from your fragment to get a context Jan 11 23:52:37 im trying to use gcm, but my regid is always null for some reason. here's the getRegId and the registerInBackground methods. Jan 11 23:52:41 http://pastebin.com/Sxr5sQ8s Jan 11 23:57:22 nevermind its working now! :) Jan 12 00:00:42 however, i still have one question...whenever i plug my actual hardware device into my computer with adb on, i get into a bootloop. it usually happens after installing my app, but sometimes as soon as i plug in the phone Jan 12 00:01:08 and i know its not the app, because if i sign an apk and install that, it runs just fine Jan 12 00:05:52 ugh, I hate how videoview can't load videos from assets Jan 12 01:18:35 i got a question Jan 12 01:18:41 Im trying to make like an app that has two tabs Jan 12 01:18:47 and two pages on it Jan 12 01:18:52 would these be activities Jan 12 01:19:34 hi, how can I take a branch from CM (say m7-common kk) and fork it to another project thru gerrit? Jan 12 01:19:43 the second project has m7-common, but not a kk branch Jan 12 01:20:01 hope someone can help... Jan 12 02:09:09 How can I make my app aware of which phone number texted me? Jan 12 02:09:41 I have an Activity which hosts a GridView, and an ArrayAdapter to manage the view's items. There is a method (fetchArticle()) that makes the call to the model to fetch the items. Is it better to put this method be in the Adapter, or in the Activity? Jan 12 02:09:52 Currently it's in the Activity and it works fine. Jan 12 02:33:33 Hello everybody Jan 12 02:35:45 Herro errybawdy Jan 12 02:35:59 hurroo Jan 12 02:36:45 o/ Jan 12 02:46:24 Hello everyone. Jan 12 02:46:56 I'm using android studio, how do I add the android library to my project after I've downloaded it using the SDK Manager? **** ENDING LOGGING AT Sun Jan 12 02:59:59 2014