**** BEGIN LOGGING AT Wed Feb 01 02:59:57 2012 Feb 01 03:01:48 http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/app/AlertDialogSamples.html Feb 01 03:02:07 WIFI_STATE_ENABLED intent filter for a broadcast receiver, versus something liek checking getwifistate() to see if enabled, is tehre a different? Feb 01 03:02:16 im trying to only scan once the wifi is up and fully functional Feb 01 03:02:20 my program is running too quickly Feb 01 03:02:29 causing the scan to not work Feb 01 03:02:46 any help appreciated Feb 01 03:03:33 sounds like wifi_state is not the same as being connected, its just if they turn it on or off. it takes some time to establish a connection Feb 01 03:03:46 but im just guessing Feb 01 03:03:57 well the thing is, in order to scan, you dont need to be connected Feb 01 03:04:03 your wifi just needs to be enabled Feb 01 03:04:12 oh then that should be ok Feb 01 03:04:23 what are you scanning? Feb 01 03:04:33 available wifi? Feb 01 03:04:35 yea Feb 01 03:06:13 hm dunno, havent worked with that yet. but i have checked if wifi is available by using the connectivitymanager and then calling getNetworkInfo(TYPE_WIFI) and checking if its null Feb 01 03:06:20 instead of receiving a broadcast Feb 01 03:06:25 requires permissions tho Feb 01 03:07:24 cool i will checkout connectivitymanager, saw someone else use that too Feb 01 03:08:58 I've just begun Android developing. I'm unfamiliar with how signing works to get an API key. I've done it successfully on one computer and the application works fine. If I export that application to work on my laptop, the application no longer functions correctly with identical settings. Is it the API key? Feb 01 03:10:44 you just need to delete Feb 01 03:10:46 a certain file Feb 01 03:10:51 so that eclipse regenerates another one Feb 01 03:11:13 the file's name escapes me at this moment Feb 01 03:12:32 zerkz: Thanks, I guess that's a step in the right direction. Feb 01 03:13:10 To fix this problem, simply delete the debug.keystore file. The default storage location for AVDs is in ~/.android/avd on OS X and Linux, in C:\Documents and Settings\\.android\ on Windows XP, and in C:\Users\\.android\ on Windows Vista. Feb 01 03:13:16 http://androblip.huiges.nl/2010/08/25/android-debug-key-expiration-sdkeclipse/ Feb 01 03:15:12 thanks for the previous answer to my question about dialog dismiss listeners. The problem is though, is that I made a custom dialog. I guess you could say that I'm unsure of how to implement the listener in the Dialog subclass and in the dialog's activity. Feb 01 03:15:30 Hmm. Feb 01 03:15:40 Deleted it, but seems no dice. Only reason I notice a problem is the Maps API won't load map tiles. Feb 01 03:15:50 Is there any reason why a soft keyboard would show up behind a dialog? Feb 01 03:15:53 did you restart eclipse/ Feb 01 03:16:03 nope, just a sec.. =P Feb 01 03:16:21 are you killing tossing the flag that makes input/focusables in your activity layout non focusable? Feb 01 03:16:27 er tossing, not killing Feb 01 03:16:28 lol Feb 01 03:17:14 Me? Feb 01 03:17:35 Yes. Feb 01 03:17:40 sorry, forgot to put your name Feb 01 03:17:55 It's not clear what you are asking. I have focusable="true" on an EditText. Feb 01 03:17:59 It's getting focus. Feb 01 03:18:12 However, I have to force the soft keyboard to show up. Feb 01 03:18:31 And when I manage to do that, it shows up behind the dialog. Feb 01 03:19:08 zerkz: Nope, restarted eclipse and ran app again, blank squares. Feb 01 03:19:14 hey JakeWharton you there? Feb 01 03:19:20 force the keyboard from the dialog level perhaps? Feb 01 03:19:24 I'm using getWindow().getContext().getSystemService(Context.INPUT_METHOD_SERVICE) to get the IME manager. Feb 01 03:19:40 Yeah, I'm doing it from the Dialog. Feb 01 03:19:44 Ah. hrm. Feb 01 03:19:54 I'm not that experienced to help you out honestly Feb 01 03:20:03 'Sokay. Feb 01 03:20:10 Anyone familar with custom dialogs? Feb 01 03:20:23 Other than me? Feb 01 03:20:35 if you are, thats good too. maybe you can help me Feb 01 03:20:39 Sure Feb 01 03:21:14 I need to implement a onDismissListener for my custom dialog. I'm unsure how to go about it. I've done listeners for fragments -> activity... but I'm having trouble with it. Feb 01 03:21:38 I need it because when my dialog dismisses I need the fragment (of the activity) to reset its adapter/refresh the data in the listview. Feb 01 03:21:50 Hmm.. Feb 01 03:22:34 Do I need to make a DialogInterface.onDismissListener in my dialog class? Feb 01 03:22:41 Have you tried InstanceOfYourDialog.setOnDismissListener(new DialogInterface.onDismissListener() { }); Feb 01 03:22:42 i know i have to implement it in my activity Feb 01 03:23:04 hmm good idea. ill try that Feb 01 03:23:54 You can also probably make a default one that is built in the constructor. Feb 01 03:24:11 with this.setOnDismissListener(this.the_listener). Feb 01 03:24:17 Then let the activity change it if necessary. Feb 01 03:24:46 Depends on your code reuse Feb 01 03:25:06 ok. I just did that in my onPrepareDialog method. Feb 01 03:25:23 generated the implementation and just moved my intended code there. Feb 01 03:25:25 lets see if this works Feb 01 03:27:16 it worked Feb 01 03:27:38 thanks. However, when I switched orientations with my dialog up, it crashed with something to do with the dismiss listener.. think it was a null pointer exception Feb 01 03:32:35 why is my dismiss dialog even being called from a orientation change... Feb 01 03:32:35 hrm Feb 01 03:32:47 I think orientation changes invalidate the view Feb 01 03:33:31 Not really sure, but it might dismiss the dialog and make a new one. Feb 01 03:34:04 Medjai, barely Feb 01 03:34:20 haha Feb 01 03:34:27 I have two questions for you Feb 01 03:34:41 both actionbar related but really only one is related to the actual project Feb 01 03:35:11 I like the product website, is it a WP theme? Feb 01 03:35:14 haha Feb 01 03:35:19 no Feb 01 03:35:21 made it myself Feb 01 03:35:28 it's pretty sweet Feb 01 03:35:37 go ahead and steal it Feb 01 03:35:38 RMapZero I suppose I could just connect an interface to my buttons instead of a dismiss... Feb 01 03:35:46 I'd like to if you don't mind haha Feb 01 03:35:50 GitHub? Feb 01 03:36:05 it's in the project repository under website/resources/ Feb 01 03:36:12 oh nice Feb 01 03:36:16 thanks man Feb 01 03:36:18 zerkz: That's what I usually do. Feb 01 03:36:28 i'll build a cms for it and open source it for you if you ever decide to use it Feb 01 03:36:43 unless you already have a cms Feb 01 03:37:05 i'm not big on CMSs Feb 01 03:37:11 ah ok no worries Feb 01 03:37:26 my second question is i think this is an actionbar sherlock related issue Feb 01 03:37:33 i posted it on SO last night Feb 01 03:37:35 http://stackoverflow.com/questions/9073609/building-a-project-with-ant-that-includes-actionbarsherlock-as-a-library-project Feb 01 03:37:56 i saw it Feb 01 03:38:05 i've pretty much cleared any errors that would be a result of ant or sdk setup Feb 01 03:38:14 so i'm only assuming it maybe a library error Feb 01 03:38:32 nah, some crap with ant Feb 01 03:38:38 lol Feb 01 03:38:45 do you have the project defined in your project.properties? Feb 01 03:38:45 i was hoping you weren't going to say that Feb 01 03:38:48 yeah Feb 01 03:38:54 I've never used ant Feb 01 03:39:06 it's setup correctly I've confirmed with others Feb 01 03:39:18 well others that used libraries not this one in specific Feb 01 03:39:24 it's definitely not picking up the resources from the project Feb 01 03:39:35 yeah that's the weird part Feb 01 03:39:40 you've pointed it at the library/ folder in the repo? Feb 01 03:39:52 yeah Feb 01 03:40:05 i used the relative path from my project file to point to the library folder Feb 01 03:40:07 not so much a development question, but I flashed to miui and i lost my voicemail number for att carrier Feb 01 03:40:16 any idea how I find the number? Feb 01 03:40:23 ant uses relative path when using the --library Feb 01 03:40:41 so it's pointed to it correctly Feb 01 03:41:40 I'm not sure if i really have any other options other than ant to automate application compilation on a headless linux server Feb 01 03:41:53 maven :) Feb 01 03:41:58 but that brings all kinds of other fun Feb 01 03:42:09 Medjai, did you set the library path in project.properties? Feb 01 03:42:19 or for that matter, did you just drop abs.jar into libs/ Feb 01 03:42:23 yes it's set using the --library Feb 01 03:42:25 it's a library project Feb 01 03:42:40 i can't wait until adt supports resources in .jars Feb 01 03:42:42 clear up this madness Feb 01 03:42:51 I thought that was the point of library projects Feb 01 03:42:52 i can't tell you how many emails I get about problems like this Feb 01 03:43:02 I thought just dropping it in libs/ should work just fine Feb 01 03:43:07 no Feb 01 03:43:29 * pfn shrugs Feb 01 03:43:36 that's what the sdk seems to indicate... Feb 01 03:43:52 droping jars in /libs Feb 01 03:44:11 yes that should automatically be detected when running android update project Feb 01 03:44:30 library projects are different though Feb 01 03:44:43 the need to be in project.properties with the relative path Feb 01 03:45:01 JakeWharton, doesn't maven require eclipse? Feb 01 03:45:18 no Feb 01 03:45:27 i use maven for everything Feb 01 03:45:30 and eclipse for (almost) nothing Feb 01 03:45:41 and maven is completely command line? Feb 01 03:46:17 yes Feb 01 03:46:18 basically i'm looking to do this commit to my GIT have a GIT hook pull a working tree to a directory and launch a build script Feb 01 03:46:26 dude then that's my answer Feb 01 03:46:36 well, making it a library-project should work just fine, too Feb 01 03:46:45 I didn't know there were alternatives to ant Feb 01 03:46:51 maven is a pita to use... Feb 01 03:46:54 yeah ant is crap Feb 01 03:46:54 i've been stuck on this issue for a week man Feb 01 03:46:54 :p Feb 01 03:46:58 it really is Feb 01 03:47:02 nothing like telling your build system how to do its job Feb 01 03:47:12 haha Feb 01 03:47:39 and maven has had proper library projects for a long time now Feb 01 03:49:20 it's a bitch to setup initially, but once you get it going you'll never want to use anything like ant again Feb 01 03:49:33 * pfn has used ant for years and maven on and off Feb 01 03:49:35 I still prefer ant Feb 01 03:50:00 it'd be easier to write bash Feb 01 03:50:10 why bastardize the build into some arbitrary XML Feb 01 03:51:54 any guides you'd recommend to ease my pain? I barely have time to put into my side projects during the work week Feb 01 03:52:18 steal a pom.xml from an existing project Feb 01 03:52:22 look at the sample projects in ABS Feb 01 03:53:07 i would have just said look at my ABS to just make it a pun Feb 01 03:58:44 Checkout my sweet ABS Feb 01 03:58:47 *Check out Feb 01 03:59:11 heh Feb 01 04:02:21 ..has anyone else ever had their phone's internal sdcard "disappear"? :| (it won't mount, seems gone) Feb 01 04:05:05 make sure it's not gone? Feb 01 04:07:24 I think my MBR is corrupted :| Feb 01 04:08:20 virus Feb 01 04:08:36 reinstall windows Feb 01 04:08:42 starlon: I'm talking about my android phone. Feb 01 04:08:43 :\ Feb 01 04:08:51 was being sarcastic :) Feb 01 04:08:56 starlon: ah :\ Feb 01 04:09:03 sorry Feb 01 04:09:14 run a file system check on it - mine's gone a bit wonky before Feb 01 04:09:47 bankai_: oh? noob here, how do I do that? Feb 01 04:10:02 bankai_: (I'm in adb shell now) Feb 01 04:10:08 you'll have to do it from a desktop/laptop Feb 01 04:10:30 freebsd: fsck_msdosfs ... any other OS *shrugs* Feb 01 04:10:45 huh Feb 01 04:12:22 ok, this is pissing me off... I have a class which implements Serializable and its really just a simple datastructure containing my info. When I make an ArrayList of that class and check .contains() before adding another instance of that class with duplicate values but it FAILS every time! Feb 01 04:15:04 soo..... is there a relatively straightforward way to see how many threads my app has created in DDMS? Feb 01 04:16:08 RyanMcDonald, just request thread info under the device view Feb 01 04:18:29 pfn: any idea why ArrayList.contains() wouldn't work? Feb 01 04:18:55 drezel, because you don't have a good equals/hashCode implementation on the object you're checking Feb 01 04:18:57 haha JakeWharton Feb 01 04:19:25 trademark it, it's a freebie from me Feb 01 04:19:26 do i need to override the equals comparison in my class? Feb 01 04:19:28 :-P Feb 01 04:20:24 pfn: yea looks like you're right, thanks for the tip Feb 01 04:20:32 just the tip? Feb 01 04:20:40 that's not very polite Feb 01 04:20:45 :P Feb 01 04:22:04 if it works i'll give him the rest ;) Feb 01 04:22:11 :D Feb 01 04:22:13 take that JakeWharton! Feb 01 04:24:00 how can I change the hit box of something that I am animating on pre-3.0? Feb 01 04:25:31 me thinks it's impossible Feb 01 04:25:34 pfn, i only ever start 2 threads (AsyncTask#1 and AsyncTask#2). but somehow, I am seeing (AsyncTask#3, #4, and #5) starting up! there there some wakky android life cycle thing that can can cause threads be "re-created" or possibly "re-run" your main gui thread more than once Feb 01 04:25:54 AsyncTasks aren't managed Feb 01 04:25:56 pfn, i meant so say "IS there some wakky...." Feb 01 04:26:01 asynctask threads are managed Feb 01 04:26:06 any configuration change would recreate them in all likelihood Feb 01 04:26:14 wrong terminology Feb 01 04:26:31 i lock the screen in portrait mode. what other things cause a configuration change? Feb 01 04:26:38 they aren't managed in accordance to the activity lifecycle Feb 01 04:26:46 sliding keyboard out is a config change Feb 01 04:26:59 im running on a tablet with no keyboard Feb 01 04:28:39 one of my threads does a bunch of sql transactions, and now my app is going mad with "database is locked" errors that I just cant track down. I am *NOT* accessing the db from more than one thread, and I am not instanciating more than one dbhelper. the crash logs refer to AsyncTask#3. There should never be a #3 Feb 01 04:30:38 hello all Feb 01 04:30:48 anyone know a lightweight lib or method that I can use to convert rfc3339 format timestamps between UTC and local time? Feb 01 04:31:10 JakeWharton, asynctask threads are managed by the asynctask class' threadpool Feb 01 04:31:29 some timestamps I have are like 2012-01-01T11:00:00.000-600 while others are 2012-01-01T05:00:00.000Z (UTC) Feb 01 04:31:57 JakeWharton, and the pool size is initially 5 Feb 01 04:32:06 they aren't managed in accordance to the activity lifecycle Feb 01 04:32:22 right, activities are irrelevant of asynctask threads Feb 01 04:33:03 I am creating these 2 threads in the main onCreate() method of my app. Is there some way that onCreate() can be run more than once ASSUMING THE APP DOES NOT completely restart? Feb 01 04:33:18 depends on what you think is "completely restarting" Feb 01 04:33:26 rotating the phone will likely cause that Feb 01 04:33:31 RyanMcDonald, any time your activity finishes, onCreate will be called again Feb 01 04:33:32 assuming you aren't handling that Feb 01 04:33:37 RyanMcDonald, and you'll always have 5 asynctask threads Feb 01 04:33:41 RyanMcDonald, that's how asynctask is implemented Feb 01 04:34:05 why will I "always have 5 asynctask threads" when I only define and start two? Feb 01 04:35:08 hey can anyone tell me the screen density on the original motorola droid? Feb 01 04:35:21 I bet motodev can Feb 01 04:35:51 lets say my app starts, and I start typing something in it (i.e. the gui has changed and the user has started "using the app"). can onCreate run again WITHOUT my user thinking "i have lost my work" (the gui has been reset back to the way it was when the app started)? Feb 01 04:36:35 (Im thinking I dont understand the android life cycle). My app locks the display to portrait, the hardware has no keyboard, and this thing will crash when no one is even touching the damn thing. Feb 01 04:36:51 pfn, why did you say I "always have 5 asynctask threads" when I only define and start two? Feb 01 04:37:01 because by default they're run in a thread pool Feb 01 04:37:28 ( eddi3x3 ): http://developer.motorola.com/products/droid/ Feb 01 04:37:32 240 dpi Feb 01 04:37:39 thank you Feb 01 04:37:50 im not sure why in logcat I see AsyncTask#5 calling sql statements that only my #2 should be calling. Feb 01 04:38:04 don't get so hung up on numbers Feb 01 04:38:24 when you execute an asynctask is could end up being any one of the 5 in the pool Feb 01 04:38:44 it doesn't go sequentially Feb 01 04:39:11 the numbers are only calling out to me because it REALLY seems like my "database is locked" issue is a result of calling the since dbHelper from multiple threads which I am NOT doing. when i saw more than the 2 AsyncTask threads that I was expecting, i started thinking that this was the cause of my crashes Feb 01 04:39:23 put in log statements right before you execute to know when they're being started Feb 01 04:40:12 t0mless, my app instanciates thread #1 and #2, then they loop forever. they should never quit and restart. under these circumstances, could they still end up being called #4 and #5 when they had been being called #1 and #2? Feb 01 04:40:40 why are you having asynctasks loop forever? Feb 01 04:40:49 that seems dumb Feb 01 04:41:36 t0mless, it makes sense in this app. one pulls a "table of contents" from a remote server, then the other grabs "stories" from that server to satisfiy the table of contents. Feb 01 04:41:54 and why can't they quit when they're done with that? Feb 01 04:41:54 RyanMcDonald, no, your app does not instantiate asynctask#1 and #2 Feb 01 04:41:55 the server is contantly changing every few seconds Feb 01 04:42:03 asynctask creates #1, #2, #3, #4 and #5 Feb 01 04:42:05 t0mless, they will never be done Feb 01 04:42:22 when you run something in an asynctask, any of those 5 will be used Feb 01 04:42:44 pfn, will my intansicated threads ever "switch" numbers while still running? Feb 01 04:43:11 RyanMcDonald, they shouldn't Feb 01 04:43:24 Why even use async task then, why not just use thread or a service? Feb 01 04:43:37 asynctask still provides convenience, like publishProgress Feb 01 04:43:56 t0mless, i use publishProgress and I dont want the updates running if the app is dead Feb 01 04:44:15 Either way, Log statements should help you figure out what's going on Feb 01 04:44:38 t0mless, you are right. time to turn up the logging.... BUT Feb 01 04:45:20 i cant ever seem to get this app to crash while in the lab. it only wants to die in the field. can I have my app automatically send the logcat via email or something on a FC (yes, my app is dead) Feb 01 04:45:52 are there any os-provided watchdogs that can send out a logcat? Feb 01 04:47:20 I'm assuming it's not in the market, because then you can just send the error report that way Feb 01 04:47:27 RyanMcDonald, acra Feb 01 04:47:50 and apps retrieved from market can submit crash logs via market Feb 01 04:48:09 not sure how to enable the OS error reporting without building your own crash dialog by catching exceptions Feb 01 04:48:23 t0mless, it IS on the market but when it dies, assuming the user DOES send a crash report, i only get the stacktrace. Id love to see the entire logcat buffer Feb 01 04:48:35 t0mless, that's easy, setUncaughtExceptionHandler, and re-throw the exception from there Feb 01 04:48:48 RyanMcDonald, the crash report is generally enough to figure what is going on Feb 01 04:48:48 ah, sweet Feb 01 04:48:51 didn't know about that one Feb 01 04:49:05 if it isn't, you need to learn how to read a stack trace Feb 01 04:49:14 pfn, true, but if i go nuts with logging (for debugging purposes) i wont see them in a Market crashlog Feb 01 04:49:28 RyanMcDonald, ignore them and concentrate on fixing the exception Feb 01 04:49:47 stack traces are enough to solve something like 90+% of problems Feb 01 04:49:56 i do know how to read the stack trace. the problem is the error is always the same "DB is locked". but i cant see why the DB is locking. my operations are VERY simple Feb 01 04:50:36 and i do not have (to my knowledge) a thread-unsafe problem. i only run 2 threads, one of which never touches the db Feb 01 04:50:41 RyanMcDonald, always close your db after you're done using it Feb 01 04:50:57 RyanMcDonald, if a user presses back, then enters your app again, you will have 2 threads touching the db Feb 01 04:51:02 press back, then enter again, 3 Feb 01 04:51:19 pfn. hmmm.... i NEVER close it for the life of the app. (the app makes modifications to the db every 8 seconds) Feb 01 04:51:40 i do close my cursors, and end my transactions though. is this not enough? Feb 01 04:52:00 well, you need to cancel your asynctask onStop Feb 01 04:52:02 and start it onStart Feb 01 04:52:11 or even better, cancel onPause, and start onResume Feb 01 04:54:59 pfn, wait a sec! let me make sure i understand you. my app is running, someone hits back and we go back to the homescreen (eclipse still shows the app running). then I hit the apps icon and it DOES look like its starting up for the 1st time. BUT, at this point DDMS still shows only 2 threads (i just tried this, just now) Feb 01 04:55:23 refresh the threads Feb 01 04:55:24 it's there Feb 01 04:55:31 you'll have 2 more threads running Feb 01 04:55:37 how do you figure you only have 2 threads running? Feb 01 04:56:25 you said you have 5 asynctask threads Feb 01 04:56:25 holy crap! i just refreshed and i DO now have 5 threads! Feb 01 04:56:39 as soon as you use 1 asynctask, you should have 5 threads Feb 01 04:57:31 pfn, well i *sorta* disagree with you on that. heres why. Feb 01 04:57:42 lets say i kill the app. its known to be not running. Feb 01 04:58:39 i launch the app, which creates 2 AsyncTasks (#1 and #2). i see them in eclispe. I see ONLY #1 and #2. then, if i hit back, go out to the home screen, go back into the app, i get #3 and #4 ONLY (no #5) Feb 01 04:58:55 ok someone please correct me if I am wrong Feb 01 04:59:12 it seems like if I setText on a edittext... THE FUCKING CURSOR GOES TO BEGINNING OF THE STRING Feb 01 04:59:14 wtf wtf wtf Feb 01 05:00:19 pfn, comments? Feb 01 05:00:52 who the fuck would purposely build things to work that way by default Feb 01 05:01:32 RyanMcDonald, maybe I'm wrong about it creating 5 threads right away Feb 01 05:03:18 pfn, i guess in onCreate() i could see if my threads are already existing then decline to create new ones, yes? Feb 01 05:03:50 does hitting the back button (resulting in you going back to the home screen) cause an onCancelled() or a onStop()? Feb 01 05:04:07 RyanMcDonald, you should always stop your threads onPause Feb 01 05:04:10 and start them onResume Feb 01 05:04:11 hello. i'm trying to figure out how to do the following: i have a socket connection to a server running on a service. when a message arrives from the server, i'm supposed to check whether a certain activity is open, if not, show the user a status bar notification. if it is already open, then don't show the notification Feb 01 05:04:55 Yuyo, send an ordered broadcast from the service Feb 01 05:05:06 and have the activity receive the broadcast and cancel it Feb 01 05:05:14 is one way to do it Feb 01 05:05:27 if the broadcast makes it back to the service, then the activity is not running Feb 01 05:05:57 the alternative depends on how tightly coupled you have the the activity and service Feb 01 05:06:42 t Feb 01 05:07:01 honestly, it's not a "real" service, in that i manually create it (using new) in the Application class Feb 01 05:07:24 you can still use an ordered broadcast to do it Feb 01 05:07:42 yeah that sounds good Feb 01 05:07:46 what was the alternative? Feb 01 05:07:48 but presumably, since it's not a service, just have your activity set a flag that indicates whether or not it is running Feb 01 05:08:06 like in a SharedPreferences? Feb 01 05:08:11 onResume => service.setActivityRunning(true); onPause => service.setActivityRunning(false) Feb 01 05:08:17 oh Feb 01 05:08:32 and the service checks if (!activityRunning) nm.shownotification(...) Feb 01 05:08:38 yeah that would also work Feb 01 05:09:05 since it's some arbitrary object, I would favor the latter approach Feb 01 05:09:19 and only use the broadcast if everything's completely decoupled Feb 01 05:09:43 pfn, can I paste 99 lines of code to you in a private msg? onCancelled() never seems to fire for me when i hit the back button Feb 01 05:09:44 thanks, i'll try it now... i was using the ActivityManager and checking using getTasks(1), but it requires an extra permission Feb 01 05:09:54 RyanMcDonald, pastebin only Feb 01 05:10:02 RyanMcDonald, and onCancelled isn't a legitimat callbck Feb 01 05:10:07 RyanMcDonald, use onResume and onPause Feb 01 05:11:16 for fucks sake Feb 01 05:11:27 intellij is locked up on building my apk again Feb 01 05:11:27 RyanMcDonald, read the activity lifecycle documentation Feb 01 05:11:50 hooray for using ides to build ;-) Feb 01 05:11:52 pfn. this is a proof of concept code i wrote when trying to figure out how to detect the back button. http://pastebin.com/ibUe4R9E Feb 01 05:12:59 onCancelled in asynctask doesn't get called unless you call asynctask.cancel() Feb 01 05:13:19 OH! well that explains a lot! ;) Feb 01 05:13:22 onResume => asynctask.execute(); onPause => asynctask.cancel() Feb 01 05:13:29 just do that, and you'll be a happy campre Feb 01 05:13:35 assuming you properly honor the cancel request Feb 01 05:14:00 the fack that you're calling Thread.sleep() on the UI thread frightens me Feb 01 05:14:19 t0mless, this is not a "real" app. its just a code tester Feb 01 05:14:19 fact* Feb 01 05:14:33 i would NEVER call sleep in the gui thread in a real app. i know better Feb 01 05:15:09 and yeah, that's terrible Feb 01 05:15:18 even as a code tester, try to adhere to some best practices Feb 01 05:17:05 g'night all! Feb 01 05:18:27 question about the lifecycle. according to http://developer.android.com/reference/android/app/Activity.html#ActivityLifecycle , when you use the back button to go back out to the home screen, then press the app icon to get back into the app, onCreate should not get called. I seems it is for me because oncreate is where im creating my 2 threads Feb 01 05:20:32 it may or may not get called Feb 01 05:20:41 depends on if the activity was destroyed by the OS Feb 01 05:21:10 RyanMcDonald, who says it doesn't get called? Feb 01 05:21:18 pressing back typically results in the activity being destroyed Feb 01 05:21:18 after hitting the back button, eclipse show the app did NOT get destroyed by the os. when tapping the app icon, onCreate is getting run again Feb 01 05:21:26 and since asynctasks are seperate from activities, even if you close your app for .00005 seconds it has a chance to be destroyed Feb 01 05:21:30 pressing back doesn't destroy the app Feb 01 05:21:33 and the asynctasks will keep running Feb 01 05:21:33 it destroyes the activity Feb 01 05:21:34 eclipse shows my app is still running Feb 01 05:21:42 activity != app Feb 01 05:21:52 add a log message to onDestroy() Feb 01 05:21:53 pfn, true Feb 01 05:22:11 ok, then.... eclipse shows the PROCESS did not get destroyed Feb 01 05:22:25 RyanMcDonald, again, execute the asynctask in onResume and cancel it onPause Feb 01 05:22:28 probably because you still have asynctasks running Feb 01 05:22:29 forever Feb 01 05:22:36 in the process Feb 01 05:22:47 but your activity is gone Feb 01 05:23:04 pfn and t0mless, you guys are really helping me "see the light" i really appreciate this conversation! ;) Feb 01 05:23:37 it's just good practice to use onStop/onPause/onDestroy to clean up your threads/etc Feb 01 05:23:42 close your dbs Feb 01 05:23:53 and whatnot Feb 01 05:25:16 onResume and onPause are the best callbacks to use Feb 01 05:25:34 they're the only matched pair of callbacks that are /guaranteed/ to be called Feb 01 05:26:02 although, I suppose in this situation, onStart/onStop or create/destroy are probably reasonable substitutes Feb 01 05:26:24 best to use onStop/onStart at the least, so the thread isn't running when the activity is not in the activity stack Feb 01 05:26:35 if it's something expensive you need to do, onPause/Resume might not be best, especially if you make use of dialogs/etc Feb 01 05:26:36 adding it into my "code tester" app now Feb 01 05:27:36 pfn, t0mless , actually I do need to keep the asynctask running even when the activity is no longer visible/running. the user cant afford the wait if the db operations have been paused while the activity was away Feb 01 05:27:55 i just need to make sure i dont keep creating new ones (i didnt realize onCreate was being called over and over again) Feb 01 05:27:57 then you should probably use a service Feb 01 05:28:00 yes, the user can afford to wait Feb 01 05:28:10 pfn, not when they are on Live TV Feb 01 05:28:20 but that is going to drain battery like craaaazy Feb 01 05:28:22 this is an app TV reporters use on air Feb 01 05:28:23 having your thread running while the user is not using the activity is detrimental to user experience Feb 01 05:28:27 yes, it MURDERS the battery Feb 01 05:28:29 on purpose Feb 01 05:28:45 is this supposed to be some sorta teleprompter replacement or something Feb 01 05:28:54 pfn, very close to that idea, yes Feb 01 05:29:15 I see... I still think you're doing it wrong :p Feb 01 05:29:26 speaking of battery ,we have full screen brightness, no timeout, no wifi sleep. batt lasts maybe 4 hours Feb 01 05:29:31 and for that matter, if the user stopped the app, presumably they don't want it to continue updating Feb 01 05:29:46 RyanMcDonald, so you mentioned the app is in market; which is it? Feb 01 05:29:49 the devices are single purpose. Feb 01 05:29:52 rScript Feb 01 05:29:58 were you the one in here a few months back saying you were gonna make this Feb 01 05:30:19 yep. now its in use in about 6 markets across the country Feb 01 05:30:40 cool Feb 01 05:30:48 I wish openfeint had a web portal Feb 01 05:31:12 good night Feb 01 05:31:40 I think NPR uses something like that, but on ipads Feb 01 05:32:04 Hi everybody, has anybody done any android dev with eclipse before? I am trying to follow the documentation on the Android SDK website and am having an issue. I created a layout of type GridView but for some reason can't drag any widgets/controls onto it? : / Feb 01 05:32:05 the ipad version is basically a web browser looking into our collaboration system. ITS HORRIBLE Feb 01 05:33:01 lol, anyone done dev with eclipse Feb 01 05:33:14 you mean using the layout editor metap0d? Feb 01 05:33:49 t0mless: Yes. I noticed a post on Stack Overflow that mentioned changing the layout_height of the grid view to wrap_content fixed it, but it didn't work for me. Feb 01 05:34:28 no ones ever done android dev using eclipse Feb 01 05:34:35 man, who ever even heard of doing such a thing Feb 01 05:34:37 just use xml Feb 01 05:34:47 the layout editor is wack Feb 01 05:35:17 you can also try dragging it over to the right side where it has the list to make sure it's going into the gridview itself Feb 01 05:35:20 and you don't drag stuff into a gridview Feb 01 05:35:26 I don't think Feb 01 05:35:27 * pfn shrugs Feb 01 05:35:53 t0mless, you said i scared you. how about this little gem..... System.exit(0); Feb 01 05:35:59 hahahah Feb 01 05:36:18 I thought android ignores that Feb 01 05:36:28 nope, it works Feb 01 05:36:39 interesting Feb 01 05:36:47 ultimately not very useful Feb 01 05:36:54 Indeed Feb 01 05:37:12 hmm, I wonder if there are any rdp clients that fully support keyboard/mouse yet Feb 01 05:37:20 itap rdp has never updated to include it, grrr Feb 01 05:37:36 metap0d I would agree with pfn too, you shouldn't need to drag stuff into the grid view, it populates from an adapter Feb 01 05:37:40 another question. lets say android decides to kill your process (which contains my AsyncTasks that operate on my DB). I assume there is a way for me to detect I am about to die, and then cleanly shut down my db? if I didnt, do i risk DB corruption? Feb 01 05:38:05 pfn, I use XtraLogic Remote Desktop. its *INCREDIBLE*. Feb 01 05:38:29 by far superior to all else. the "screen as a trackpad" feature is worth its weight in gold Feb 01 05:38:29 yeah, I used xtralogic in the past, I wanted to use itap, since it's pretty great on iOS Feb 01 05:38:38 pfn I don't know if it supports keybords but I've been using PocketCloud Feb 01 05:38:52 pfn, t0m, did you see my last qestions? Feb 01 05:38:54 pfn, thanks again, it worked well Feb 01 05:39:03 RyanMcDonald, that's why you should stop your asynctask onStop or onPause Feb 01 05:39:30 Yuyo, which approach? Feb 01 05:39:48 typically the OS won't destroy the process without a call to onDestroy if your activity is active somehow Feb 01 05:39:48 i used the second approach Feb 01 05:40:09 asynctask doesn't count as being active Feb 01 05:40:16 and onDestroy typically does get called Feb 01 05:40:22 unless there's pretty heavy memory pressure Feb 01 05:40:34 in which case, it's possible that onPause is the last callback you get Feb 01 05:40:53 e.g., press home, android runs out of memory and starts killing stuff Feb 01 05:41:29 even then your activity should get an onDestroy call Feb 01 05:41:52 not true Feb 01 05:41:56 and I'm aware that asynctasks don't count as being active Feb 01 05:42:00 read the lifecycle doc Feb 01 05:42:09 onStop and onDestroy are not guaranteed to be called Feb 01 05:44:59 ahh, good to know Feb 01 05:45:22 I thought even if the system was recovering mem that it went through finish() thus calling anything's onDestroy Feb 01 05:45:23 RyanMcDonald, in your thread, only open the database when you're going to write, close it when done Feb 01 05:45:35 but I guess that's not the case in "emergency" situations Feb 01 05:45:52 that is good to know Feb 01 05:46:10 although, being killed after onPause seems unlikely Feb 01 05:46:49 honestly, this is fucking stupid Feb 01 05:47:02 intellij just sites t Building Android Package... when I try to launch Feb 01 05:47:03 pfn, and holding a readonly cursor is still at the lowest level a "getwritabledatabase" lock even if you asked for a getreadabledatabase correct? Feb 01 05:47:11 it did a full build no problem Feb 01 05:47:15 but when I go to launch... owned Feb 01 05:50:09 pfn/t0m, im experiencing onPause fail. http://pastebin.com/46rWHvqd Feb 01 05:52:00 so what's the fail Feb 01 05:52:44 the logwrite never happens. i let the app fire up, then quickly hit the back button. no log Feb 01 05:53:00 onPause always gets called Feb 01 05:53:12 you're missing the log message or something Feb 01 05:53:32 i did code it right, yes? i dont see the logwrite Feb 01 05:54:13 check your filters Feb 01 05:54:21 oh, because you're blocking the main thread Feb 01 05:54:26 onCreate is blocked Feb 01 05:54:34 seriously, stop doing thread.sleep Feb 01 05:54:51 hahahahha! Feb 01 05:54:52 lol Feb 01 05:54:55 damn i suck Feb 01 05:55:42 sorry. i promise that code was written back when i wanted to see how async tasks related to the main gui thread. i blocked the gui thread on purpose Feb 01 05:56:00 need to revert back to my cleaner "codetester.java" template. ;) Feb 01 05:58:21 question: is it "ok" to intentionally block in onPause while waiting for my AsyncTasks to normally end after i signal them to quit? Feb 01 06:00:01 Do not block gui thread, period. Feb 01 06:02:09 well, some degree of waiting is acceptable, it just has to be strongly bounded to relatively short periods, like < 1 second Feb 01 06:02:42 obviously better if you can avoid it. Feb 01 06:03:08 but you should be able to just tell your tasks to stop and then let the activity finish Feb 01 06:03:31 well, there might be important clean-up work or something that depends on the activity context hanging around for a little longer Feb 01 06:04:14 although if that is the case, it sounds like IntentService to me. Feb 01 06:04:40 are ICS emulators still as slow and unberible as HC ones were? Feb 01 06:05:10 I've heard of no news from the emulator optimizing front. Hoping that eventually virtualized android on x86 will be the commonplace solution. Feb 01 06:05:47 it might be interesting to try to figure out, precisely, what makes the emulator so slow Feb 01 06:06:09 well they demo'd one that had full hardware accelleration Feb 01 06:06:13 why? Feb 01 06:06:14 he even played a jetski app on it Feb 01 06:06:16 pfn, i read up on ACRA. looks very cool. but ..... Im lazy. This there an app that will watch for FC's, then just automatically send off the logcat? wink wink Feb 01 06:06:22 because emulating arm on x86 is slow Feb 01 06:06:29 typo: is there an app......... Feb 01 06:06:35 RyanMcDonald, that's acra Feb 01 06:06:53 acra looks like a library that YOUR app has to call. not so? Feb 01 06:07:11 yeah, whhat else do you expect? Feb 01 06:07:22 make your user manually run a logcat program and email you the output? Feb 01 06:07:41 better hope of having them fill in detailed error reporting when you get an exception Feb 01 06:08:30 like i said, im lazy. i also develop on windows. on that platform, i wrote a NT service long ago that watched the eventlog for ANY app crashing. then it sent off a bunch of stuff. Feb 01 06:09:08 (basically, the app does not need to have any knowledge of the crash-reporter) Feb 01 06:09:15 it's not probably the CPU emu that is so slow, but the GPU emu which is Feb 01 06:09:40 of course, qemu _will_ give you a 10-100x performance penalty, no question about it Feb 01 06:10:02 but if it's closer to 10x than 100x, modern x86 hardware should be fast enough to get comparable performance to the native Feb 01 06:10:46 not really Feb 01 06:11:16 you have a bunch of instructions that must execute to handle a single emulated instruction Feb 01 06:11:35 that easily translates to a >10x penalty Feb 01 06:11:42 yes, maybe 10 or so. It's a factor that crops up awfully often when interpreting something, so I use it as a rule of thumb. Feb 01 06:13:10 ugh, I hate it when I install a new widget and I can't see it right away in the launcher.... Feb 01 06:13:27 * pfn just installed a battery widget and can't add it to the home screen because it doesn't show up in the widget tray Feb 01 06:13:52 qemu call itself a fast processor emulator, which amuses me. I remember I once ran completely unaccelerated windows inside it. I'd say 50x slower would be closer to mark for x86 emulation, or that's just how it felt like Feb 01 06:14:26 but it was a whole system emulation, of course. Feb 01 06:14:29 fast is relative Feb 01 06:15:13 I've set one image to one imageview. But while displaying , that image is scaled to some amount and it is set to imageview. Can I find by how much the image is scaled? Feb 01 06:15:26 is the ant binary not included in the sdk? Feb 01 06:15:42 t0mless, might be in tools/ Feb 01 06:15:49 otherwise, it sounds like no Feb 01 06:16:00 I have an ant dir, but only thing in there is a default build.xml Feb 01 06:16:00 * pfn usually has ant installed already Feb 01 06:16:04 and license info Feb 01 06:16:09 then the answer is the sdk doesn't include it Feb 01 06:16:49 banpdtr_: the scaling is to preserve size, so it's the target density of your screen divided by source desnity of the image. Feb 01 06:17:24 so, for instance, if your screen has 200 dpi and your source image is marked as 100 dpi, android would attempt to double the size for displaying, I suppose. Feb 01 06:17:49 or double the dimensions, which is more precise since size might refer to area Feb 01 06:18:12 oh! Feb 01 06:18:32 banpdtr_: there's drawable-nodpi for the use cases where no scaling is acceptable for some reason. Feb 01 06:19:04 (I naturally made a ton of assumptions to give this answer.) Feb 01 06:39:52 where is my apps data stored? Feb 01 06:40:00 im trying to browse the phone structure for it in adb shell Feb 01 06:40:11 in /data/data/package/ Feb 01 06:40:20 you won't be able to see it unless you have root access Feb 01 06:40:41 thanks got it Feb 01 06:41:22 i want to perform scale animation on ImageView.. problem is while doing scale animation , it is translating. How can I stop translation? Feb 01 06:44:56 banpdtr how are you animating Feb 01 06:52:07 Morning Feb 01 06:52:26 night Feb 01 06:52:34 *yawns Feb 01 07:01:30 t0mless, you still awake? Feb 01 07:02:22 is there such thing as a variable that is global to a PROCESS? ie your activity can die and re-onCreate and this variable remains static Feb 01 07:03:24 I guess it will not recycle the used thread Feb 01 07:03:30 and thus process Feb 01 07:04:00 RyanMcDonald not really, no Feb 01 07:04:02 asked another way, is there a way to declare a variable that survives the android life cycle for your activity Feb 01 07:04:11 sharedprefs Feb 01 07:04:13 RyanMcDonald: there is ApplicationContext Feb 01 07:04:32 Im gonna go with sharedPreferences :-) Feb 01 07:04:36 the applicationcontext does survive activity's being destroyed Feb 01 07:04:40 but it's indeed process-specific. There are fragments, which can be set to retainInstance to prevent android from recreating them. Feb 01 07:04:57 t0mless, as a design objective, i dont want to stop my two asynctasks even if the activity dies. i need a way inside of onCreate to see if these threads still exist so I dont start 2 more. Feb 01 07:05:09 but that doesn't get rid of the home button might still destroy that process Feb 01 07:05:16 RyanMcDonald: what you want is probably Service or IntentService. Feb 01 07:05:20 sharedPreferences are persisted by android Feb 01 07:05:22 +1 service Feb 01 07:05:25 do study of them. Feb 01 07:05:48 sounds more like vanilla Service than IntentService if you know you have exactly 2 asynctasks and want them to hang around. Feb 01 07:05:52 you can start the service when your activity is first created and bind to it to do any communication you need Feb 01 07:06:07 dont want to use shared pref. if app is process is dead, then shared pref might lie and say my worker asynctasks are alive when they are not Feb 01 07:06:13 then unbind from the service as needed Feb 01 07:06:26 note that the android Services are kind of difficult to reach from activity because the bind is asynchronous, so all code using a service must be aware that the connection to service might not yet exist Feb 01 07:06:51 then a service is a good idea :-) Feb 01 07:07:15 it's a lamentable state of affairs and has actually turned me away from using services, preferring to hack around this particular issue using some asynctasks fired up by Application subclass. Your preferences may well be entirely different. Feb 01 07:07:53 is there a way for an activity to detect whether or not an asynctask that was created by a previous version of itself still exists? Feb 01 07:08:07 previous version means a previous oncreate Feb 01 07:08:20 RyanMcDonald: yes, but I would not recommend it anymore Feb 01 07:08:44 there used to be a away to pass things like thread instances or any other object form one activity about to be destroyed to another via the onRetainNonConfigurationInstance hook Feb 01 07:08:59 but they have deprecated this in favor of Fragment. Feb 01 07:09:11 oh wait, that opens up another problem. say your activity starts an asynctask that uses publishProgress(). then that activity dies, leaving the asynctask running. what happens to calls to publishProgress then? Feb 01 07:09:35 what should happen to them? onProgressUpdate still fires, afaik Feb 01 07:10:02 there's no rule that says the asynctask must be part of the activity, although it may be if it's an inner class of an activity Feb 01 07:10:10 dosent calling publishProgess from the asynctask call it on its parent? Feb 01 07:10:30 wat? no, there's a method on asynctask itself which fires in ui thread. Feb 01 07:10:49 oh yea. that was a dumb question Feb 01 07:11:24 crap. so pretty much leaving an asynctask running after its parent activity dies is pretty much a no-no Feb 01 07:11:59 no, it's not a no-no, but it requires use of some specific trick to carry the instance along. Feb 01 07:12:17 Service, ugly hack in Application subclass, Fragments, or onNonRetainConfigurationInstance immediately come to mind Feb 01 07:12:18 i just want to have these two async tasks running and i want to make sure i dont keep creating new versions of them each time onCreate() runs Feb 01 07:12:44 in your case, my recommendation would be a Service. Feb 01 07:13:03 is there any way onCreate() can tell if THIS run is the FIRST run since the process began? Feb 01 07:13:44 You're stuck in a mindset that doesn't seem to be very helpful. Feb 01 07:13:50 stop abusing the asynctask and use a service properlyt Feb 01 07:14:17 pfn, you got me. ;) Feb 01 07:15:10 otherwise stop your threads properly Feb 01 07:15:11 although to correctly manage the Service lifecycle is an issue in itself. For symmetry reasons, an activity whose onCreate does startService should have its onDestroy call stopService(). But the service can itself ensure that it doesn't die by starting itself after it's started (yo dawg) Feb 01 07:15:29 I used a sample of OAuth authentication from Google Tasks API, its not web-based... an Intent for an activity is launched. How can I clear this acceptance I did awhile ago so I can keep testing as if its a fresh request? Feb 01 07:15:31 it took me forever to learn how to use asynctask and get it implemented correctly. im kinda hesitant to trash a huge block of code and rewrite this close to the superbowl. (the app will be in use there) Feb 01 07:15:34 quot expecting to leave your garbage running Feb 01 07:16:37 because from the perspective of android its a rogue garbage object Feb 01 07:16:58 RyanMcDonald: everything depends on how much comes under a rewrite, I suppose. Often you can just copypaste the class into Service and call it a day, but if it has a complex surface with the activity that hosts it, then it might get problematic. Feb 01 07:17:04 so either clean up properly or move it into a service Feb 01 07:18:39 as for. being lazy you can use a singleton to maintain state Feb 01 07:19:07 yes, any number of tricks are there. I did not even go into using statics or something. Feb 01 07:19:15 pfn, i was just looking at that in a stackoverflow.com article. too bad ive never used java singletons before. time to learn Feb 01 07:19:27 technically android is at liberty to arrange for the process's death fairly quickly though unless a service is running to protect it Feb 01 07:20:28 http://stackoverflow.com/questions/1944656/android-global-variable talked about using a singleton, but the OP decided it didnt work Feb 01 07:20:42 but anyway, android ought to be _way_ more newbie friendly than it is. All this lifecycle-statesaving-coolstuff should be opt-in, with very simple and primitive programming model as the default. :-/ Feb 01 07:21:42 alankila, no doubt! Feb 01 07:22:01 alankila, at least i got to the bottom of what i was talking about a few days ago with my DB locks. Feb 01 07:22:22 yeah, I remember, you were the guy who couldn't just do the writeaheadlogging the 3+ way Feb 01 07:22:32 i was creating NEW threads that were using my DB without knowing it. i forgot that onCreate() can run more than once Feb 01 07:23:08 i just need a way to detect that I have already spawned them and not do it aagain Feb 01 07:23:08 I see. I kinda wondered about that. You sure you even need a thread for your db, anyway? IIRC, your databases were pretty small. Feb 01 07:23:41 yea, i need a thread. it would be very easy to block the gui. my inbound data arrives slowly Feb 01 07:24:26 well you could download it in an intentservice that collects a chunk, like 100 or 1000 rows, then fires it all in one update that pauses gui for about 1 second (tune the row # accordingly) then let android's ui thread do something else again Feb 01 07:24:59 hmmmmm.... i guess rather than spawing a never-ending AsyncTask, i could just loop in the GUI thread and a create async task that run once and die Feb 01 07:25:01 I'd guess you can do something like 100 to 1000 updates at once. This may be bad advice from many standpoints, but gets rid of those pesky threads except maybe for the data download + batching Feb 01 07:25:17 you definitely should. Feb 01 07:25:22 don't run a thread if it has no work to do, duh. Feb 01 07:25:43 yeah RyanMcDonald, why not a timer.. which updates in batches Feb 01 07:25:45 the updates never stop. i am mirroring a VERY busy database Feb 01 07:25:47 (more specifically, asynctasks come from a pool in an Executor. If you aren't specifying the pool, you may get the one that has only 1 thread.) Feb 01 07:26:58 a timer seems like a good idea. on each timer tick, i kick off an async taks that does one round of updates then dies. Feb 01 07:27:06 the intellij build->generate ant script is not very helpful Feb 01 07:27:26 :-) Feb 01 07:27:29 it will compile the classes, but then you need to edit it to be able to have it build the apk Feb 01 07:27:39 RyanMcDonald: it sounds like horrible idea unless you are careful to not fire several of your asynctasks at once... Feb 01 07:27:42 I dont have any problems with it, t0mless Feb 01 07:27:46 but got my ant build working so now i'm happier Feb 01 07:28:03 RyanMcDonald: tell me, how can this be timing dependent? How do you get the data, periodically poll some server? Feb 01 07:28:24 DashCC IntelliJ kept locking up when trying to build, so I was trying to build on command line and the script was useless Feb 01 07:28:33 because whatever way gets the data coming into your system should be the part that orchestrates the database transactions too Feb 01 07:28:39 so I generated an android one from 'android update project' Feb 01 07:28:46 timer clock is not it, a timer does not generate database rows or new data. Feb 01 07:28:48 Can don't someone ban r04r .. he's been join-spamming for ages :/ Feb 01 07:29:08 * t0mless turned off joins/parts for that reason Feb 01 07:29:48 I should too I guess... Feb 01 07:30:04 same here Feb 01 07:30:08 can = why Feb 01 07:30:09 just did in irssi Feb 01 07:30:09 hehe Feb 01 07:31:33 i poll a server every 8 seconds and pull down a table of contents consisting of guids. then i loop through it. if I already have the data that corresponds to a guid, i move to the next one. i download the data for the guids i dont already have. then i pitch out orphans Feb 01 07:31:55 RyanMcDonald: wow, that seems very inefficient Feb 01 07:31:58 okay. Feb 01 07:32:12 qubez: i know. unfortunately there is no better way Feb 01 07:32:20 ya there is, its called C2DM Feb 01 07:32:27 Does anyone know when the 4.0.4 release will be made public? Feb 01 07:32:33 c2dm would not help here Feb 01 07:32:38 so why can't the thread that downloads these new rows also just directly perform the database work as it sees the new data? Feb 01 07:32:50 i can't image any circumstance where polling is the most efficient method Feb 01 07:32:54 does it have to be strictly transactional, can't you just insert outside a transaction Feb 01 07:33:29 because that way there's going to be no problems with long transaction blocking the gui thread from reading db Feb 01 07:34:28 timing is not critical. i maintain two table of contents. the active (previous) one, and the one i am using to update my local data from. once i update the data referenced in the "new" TOC, i bitflip a flag that tells me which one is now the "current" one. Feb 01 07:34:32 so you could just open 1 db handle for gui, and another for this (which should be Service, I'm convinced of it now), and just let them operate independently Feb 01 07:34:45 basically, i operate from the "last" run while building the next run Feb 01 07:34:46 maybe after each update round you fire a broadcast to let any activities listening to requery their cursors for any updates Feb 01 07:35:06 I see. Feb 01 07:36:40 yea, i can totally appreciate that using asynctask for this is not really "correct". but i cant help but notice it works PERFECTLY excepting for the fact that I can't tell if ive already created the only 2 tasks i want. onCreate() keeps making more. Feb 01 07:36:55 no, AsyncTask _is_ required and correct here Feb 01 07:37:05 but your problem is that you are stuffing it in activity, when it should be a service Feb 01 07:37:19 i have an "immortal" async task though. they loop for the entire life of the process. Feb 01 07:37:31 mhm Feb 01 07:37:42 RyanMcDonald: use a service and the Timer class Feb 01 07:38:24 hehe, just bought the new humble bundle for android Feb 01 07:38:25 :-) Feb 01 07:38:34 awesome! any good? Feb 01 07:38:53 has world of goo! Feb 01 07:39:00 I got it mainly for that Feb 01 07:39:04 haven't tried the others yet Feb 01 07:39:13 am currently installing them :D Feb 01 07:39:20 Ill be able to tell soon Feb 01 07:40:02 http://www.humblebundle.com/ for anyone who's wondering.. buy games for android and do something good - what could possibly be better ? :-) Feb 01 07:40:04 today's humble bundle is awesome Feb 01 07:40:09 what's the average at now? Feb 01 07:40:13 all the games in it are great Feb 01 07:40:18 was around 6$ Feb 01 07:40:33 i got humble bundle 4...amazing value Feb 01 07:40:47 was worth it just for VVVVVV alone ^^ Feb 01 07:40:53 the average is going up, that's pretty great Feb 01 07:40:56 VVVVVV? Feb 01 07:41:07 haha Feb 01 07:41:08 platforming game...amazing fun Feb 01 07:41:08 oh yeah Feb 01 07:41:14 it was.. fucking difficult Feb 01 07:41:15 at times Feb 01 07:41:23 * pfn paid $5 this morning Feb 01 07:41:35 https://en.wikipedia.org/wiki/VVVVVV Feb 01 07:41:36 lol, that one where you had to go alll the way up to that platform, and then all the way down to get on the other side of that tiny block Feb 01 07:41:40 I think i paid 5.25 Feb 01 07:42:29 soundtrack is amazeballs as well Feb 01 07:42:35 trying them on my tablet now Feb 01 07:42:51 damn I dont think that I'll be able to get work done today. Feb 01 07:43:00 ^^ Feb 01 07:43:03 all of today's humble bundle work great on tablet Feb 01 07:43:11 except edge is a little funky, looks great, but it's huge Feb 01 07:43:16 there was even a special version for Osmos Feb 01 07:43:18 thats cool Feb 01 08:03:12 pfn, what do you think of my putting a timer in the gui thread, that ticks every 1 second. on each tick, a new asynctask is started that does a db update, sleeps for 8 seconds then dies. Feb 01 08:03:52 i assume that the asycn task can call back to the timer and pause it during the job, then re-enable it when done? Feb 01 08:04:10 why not tick every 8 sec then Feb 01 08:04:40 never mind i need to sleep Feb 01 08:05:01 xorgate, that would be fine. i just need to disable it during the asynctask so it does not tick again before asynctask's work is done Feb 01 08:05:19 i assume you can call back and suspend the timer this way? (never used one) Feb 01 08:05:29 but the idea sounds a bit weird Feb 01 08:05:47 the job might run way longer than 8 seconds. Feb 01 08:32:13 it's not an approach I would take... Feb 01 08:46:57 hello, eclipse cant see my SDK8 that i have installed and insists that i only have 14 and 15 installed Feb 01 08:47:25 Are you sure the SDK8 installed correctly ? Feb 01 08:47:41 Did you install Eclipse female edition ? Feb 01 08:47:46 If the latter, its right. Feb 01 08:48:08 no arguing Feb 01 08:51:32 why overridePendingTransition works on emulator and not on phone? Feb 01 08:52:17 hi. I have an activity with a spinner and form this activity I start a camera activity on 7 seperate occasions to take 7 different pictures. Every now and then when the camera activity returns to the activity containing the spinner, the spinner selection is reset to position 0. How is this possible? Feb 01 08:53:02 DashCC: checking Feb 01 08:53:24 it would be alright to only have SDK 15 if my phone had already switched to it Feb 01 08:54:26 hmm, i dont have any of the motorola stuff which is in the sdk but everything else is fine Feb 01 08:54:42 who needs motorola stuff ! :-) Feb 01 08:55:05 who has a motorola Feb 01 08:55:15 i wouldnt buy one Feb 01 08:56:41 not after the "quality" of my moms 1990's motorola Feb 01 08:57:07 :-) Feb 01 08:57:08 me neither Feb 01 08:58:09 saying that, i wasnt going to buy a samsung because of the quality of their non android ones Feb 01 08:58:22 namely the tocco Feb 01 08:59:12 yay, fixed Feb 01 08:59:31 otoh, this is the Android app development channel; our main concern is to write apps that people would want to run on their devices, regardless how shitty said devices might be, right? Feb 01 09:00:34 could anyone give me some adviceplease Feb 01 09:04:28 hi. I have an activity with a spinner and form this activity I start a camera activity on 7 seperate occasions to take 7 different pictures. Every now and then when the camera activity returns to the activity containing the spinner, the spinner selection is reset to position 0. How is this possible? Feb 01 09:07:10 I'm developing an imageviewing component for android and now I want to use it in an android project Feb 01 09:07:19 I wonder what the proper project setup in eclipse for this would be Feb 01 09:07:33 add it as a library project ? Feb 01 09:08:00 if the imageviewer was an ordinary java project, I'd have to add all android libs by hand. If I chose android project, I'd get the whole app setup including manifest, res, etc Feb 01 09:08:44 DashCC, library project? Is that an option when creating a new project? Feb 01 09:09:01 hm. I dont use eclipse, I just know that it works :-) Feb 01 09:09:08 maybe someone can help you Feb 01 09:09:16 *maybe someone with eclipse experience can help you Feb 01 09:10:05 http://developer.android.com/guide/developing/projects/projects-eclipse.html - You can also designate an Android project as a library project, Feb 01 09:10:08 let's rtfm Feb 01 09:10:44 see ? Its that easy :-) Feb 01 09:11:09 yeah Feb 01 09:11:12 thanks :) Feb 01 09:11:37 having to learn java, eclipse and android at the same time can be a bit too much sometimes Feb 01 09:11:43 at least the viPlugin is a lifesaver :) Feb 01 09:12:46 I'm on a 64bit linux distro. Can I download a 64bit eclipse for android development ? Feb 01 09:13:16 i'm trying to start a specific activity through adb shell am..and it responds with activity does not exist. it only happens with this specific activity, anyone knows why? Feb 01 09:13:18 Linex: why do you think it matters? Feb 01 09:13:53 ( i tried reinstalling my app) Feb 01 09:13:54 tml_: I don't know. Just asking before wasting 173mb of download. Feb 01 09:14:31 and android is 32bit and I don;t know if thats related or not. Feb 01 09:14:51 tml_: well ? Feb 01 09:14:56 sure, Linex Feb 01 09:15:03 It doesnt matter at all Feb 01 09:15:05 Linex, i don't think it matters Feb 01 09:15:17 i use 64-bit eckipse Feb 01 09:15:20 eclipse Feb 01 09:15:21 You know, the 32 / 64 bit thing is only regarding your computer Feb 01 09:15:31 DashCC: ok thank you. Feb 01 09:15:41 I like straightforward answers. Feb 01 09:15:43 its the size of the bus to your RAM Feb 01 09:15:49 more bits = more ram can be addressed Feb 01 09:16:49 with a 32 bit system you are limited to I think 4 gb of RAM Feb 01 09:17:06 you mean "address space" Feb 01 09:17:14 for each process Feb 01 09:17:27 many 32-bit OSes can handle more than 4 GB RAM Feb 01 09:17:29 So, best is I download Eclipse Classic, right ? Then install the ADT plugin. Anyway, I will follow the guide on dev.android.com Feb 01 09:17:55 Havent seen one which is good with more than 4 GB RAM (meaning it can actually use it for good) Feb 01 09:18:14 and in fact the address space usable for user code and data in 32-bit processes in typical OSes today can be just half of the 32-bit max, i.e. 2 GB Feb 01 09:27:05 StrangeBrew, is your activity listed in AndroidManifest.xml? Feb 01 09:31:05 Somes looks exactly the same on iphone as well as on android. How do they do that ? Feb 01 09:31:25 How would I access app resources in a remote service? Context doesn't seem to be working out. Feb 01 09:31:33 Somes apps looks exactly the same on iphone as well as on android. How do they do that ? Feb 01 09:32:52 they make sure it looks the same? :-) Feb 01 09:33:36 I was thinking they use html5. Feb 01 09:33:58 or OpenGL? Feb 01 09:34:05 I think the apps is really a web-based interface. Feb 01 09:34:32 flash! oh no wait.. Feb 01 09:34:39 No Linex Feb 01 09:34:47 there are toolkits that work cross-platform (ios, android, ..) Feb 01 09:34:58 I'm not sure if they will also look the same - not a good thing imho Feb 01 09:35:14 so the interface is really a web browser. Feb 01 09:35:28 Then why make an app for it you think? Feb 01 09:35:39 I'm currently developing a fully native app for android which has an iOS counterpart Feb 01 09:35:40 Instead of making a webpage made for mobiles? Feb 01 09:35:54 but design-wise they're very similar Feb 01 09:36:01 iivvoo: "fully native app" is an oxymoron Feb 01 09:36:17 iivvoo: if it is an app, it has a virtual machine Feb 01 09:36:26 Mikellip, so the app can run offline and access hardware a website can't, or not as good Feb 01 09:36:34 Mikellip: I see your point. Feb 01 09:37:21 tml_, I consider java based apps using the android libs "native", versus html5, flash, etc Feb 01 09:37:33 ok Feb 01 09:38:08 iivvoo: Linex just suspected that apps that look the same are just webpages that they load into a View Feb 01 09:38:17 what do you call ARM machine code libraries used by apps then, if not "native"? Feb 01 09:38:45 Mikellip: now I do not think so. Feb 01 09:39:05 Mikellip: thanks to you :) Feb 01 09:39:35 it can be done Feb 01 09:39:42 with webview Feb 01 09:39:44 Just to confirm - services of an app share the same context, right? Feb 01 09:39:46 tml_: native as well. The apps running on DVM are native to Android, which runs on top of Linux :) Feb 01 09:39:47 but I haven't seen it yet Feb 01 09:40:11 tml_ aren't they interpreted by the microprocessors microcode? :) Feb 01 09:40:22 are ARM processors microcoded? Feb 01 09:40:31 iivvoo: ARMs aren't microcoded Feb 01 09:40:31 tml_ but I'd call them native as well Feb 01 09:40:50 ok, but those libs on intel wouldn't be native? Feb 01 09:41:14 iivvoo: would be, there's much less microcoding than people think :D Feb 01 09:41:22 well, sure, you can bend words however you want Feb 01 09:41:30 yeah, you can indeed :) Feb 01 09:42:03 but I would say that most developers would think when you say "native app" that you mean one having significant amount of compiled binary code Feb 01 09:42:34 to me the android platform is the dalvik vm, associated libraries and software stacks around it. software running on the dalvik vm can be considered native Feb 01 09:42:40 it's not native linux though, never said it was Feb 01 09:42:49 sigh Feb 01 09:43:11 otoh, if you consider Linux == the Linux kernel, then Android is native Linux Feb 01 09:43:17 it's just not a GNU/Linux system ;) Feb 01 09:43:38 but how would you call the difference between dalvik-based and html5, flash, etc? Feb 01 09:43:43 but let's drop this pointless meta-arguing now Feb 01 09:43:51 I didn't start Feb 01 09:43:59 but yeah, let's Feb 01 09:48:02 Hello everyone, I'm having trouble finding my screen type (large/normal/small) Feb 01 09:49:10 when i use getResources().getConfiguration() I cant look up the variable "smallestscreenwidthdb" Feb 01 09:49:23 (with correct camel-case offcourse) Feb 01 09:58:25 good morning gentlemen. :) Feb 01 09:59:10 morning nogan Feb 01 09:59:12 ex Feb 01 09:59:13 :-) Feb 01 10:00:15 im scraping data from a website via AsyncTask into a custom data model. doInBackground receives an url and passes it to my scraper, but sometimes the app needs to load the same url. what would be an elegant way to "cache" the data model for each url while the application is active? Feb 01 10:01:03 local Database, noganex :) Feb 01 10:02:54 DashCC: i do not required the data to persist after the application is closed... seems a bit like a overkill to force my data model into the sqlite tables ;) Feb 01 10:05:49 well Feb 01 10:06:05 than a final HashMap with the urls Feb 01 10:06:08 in the activity Feb 01 10:06:24 could be static even Feb 01 10:07:21 maybe caching the webpage on the sdcard? could be an idea? Feb 01 10:09:17 rciovati: that's so simple, i haven't even thought about it... thanks a lot. :D Feb 01 10:09:59 hi there Feb 01 10:11:48 Is there any way to get current ServiceState without setting up a listener? Feb 01 10:13:50 I have an activity (A) containing a spinner. From that activity i call a camera activity (B). When ondestry and oncreate are called on the activity (A) after the camera activity ends, the following happens: almost always the state of the spinner is restored to the previously selected item, but every now and then the spinner is not restored to its previous state. Any help please? Feb 01 10:15:13 Try onNothingSelected ? Feb 01 10:16:24 in contexts of what? Feb 01 10:17:51 is it possible to create subfolders in drawable/ ? Feb 01 10:17:55 In the spinner, to see if you can select what you want if nothing happens to be selected? Just a thought Feb 01 10:18:09 or can I just create drawable-whatever/ in stead? Feb 01 10:18:26 drawable-whatever works Feb 01 10:18:31 don't know about subfolders :) Feb 01 10:18:44 probably works :) Feb 01 10:21:20 iivvoo, take a look there: http://developer.android.com/guide/topics/resources/providing-resources.html Feb 01 10:21:52 especially in the "Providing Alternative Resources" par. Feb 01 10:22:09 Mikellip : let me put it differently. I am not using onSaveInstanceState and onRestoreInstanceState, but even when the activity is ondestroyed and then oncreated, the user input in the edittext fields are still there. How is this possible? And then even stranger, sometimes the edittext fields are restored, but the spinner is not. ?? Feb 01 10:23:01 is there a channel more dedicated to porting android to new hardware? Feb 01 10:23:16 rciovati, thanks Feb 01 10:23:32 rciovati, I just want to organize a bit, it's not realy configuration related Feb 01 10:23:38 HcE : #applefanboys Feb 01 10:23:48 haha Feb 01 10:23:52 HcE: #android was supposed to be, I think, but in the end you got whatever support you have from Google and modding community Feb 01 10:24:10 <[deXter]> HcE, #cyanogenmod would be more appropriate Feb 01 10:24:37 iivvoo, infact :) to be honest i never tried but drawable subfolder should be reserve for configurations porpouses Feb 01 10:25:06 gappie, are you sure you activity is destroyed and not just stopped? Feb 01 10:26:46 p_l [deXter]: thanks, seems to match my understanding Feb 01 10:26:51 rciovati : yes, I implemented @override on ondestroy with toast Feb 01 10:29:01 Hello World? Feb 01 10:29:09 ;-) Feb 01 10:29:22 gappie, i see. it is pretty strange Feb 01 10:29:26 hey aLearner :) Feb 01 10:29:41 DashCC: Hiya. How goes it? Feb 01 10:29:45 * iivvoo is still looking for hints on how to create a 'sharp grooved' divider Feb 01 10:30:01 I know how to create drawables/dividers, just not how to get a sharp groove effect Feb 01 10:30:02 good ;) am ready with drupal support for today.. now android :P Feb 01 10:30:23 DashCC: Hey there. You also do Drupal and Android? Feb 01 10:30:29 yes Feb 01 10:30:32 DashCC: We should get to know each other! Feb 01 10:30:41 :) Feb 01 10:31:47 iivvoo, can you please post an image that explain what do you mean with sharp grooved? (my english falut :D) Feb 01 10:32:40 rciovati, that's my problem as well, actually Feb 01 10:32:41 DashCC: I added you to my Buddy list Feb 01 10:32:45 DashCC: PM? Feb 01 10:32:49 sure, go ahead Feb 01 10:32:53 but I think groove is the right term (it's rather overloaded though - google hits are useless) Feb 01 10:32:58 but I'll post the image, hold on Feb 01 10:33:24 Hi, I spent some time writing a function to get a file through http Feb 01 10:33:45 I wrote 3 or 4 versions of it, and none of them work Feb 01 10:34:07 so I started to check tutorials, and they all fail too Feb 01 10:34:48 all these tutorials were made for older android sdk, so I started a new project targetting older android sdk Feb 01 10:34:58 and everything works fine =/ Feb 01 10:35:03 rciovati, http://www.m3r.nl/~ivo/groove.png Feb 01 10:35:15 now that I look in detail at it, perhaps two lines with different transparency will work Feb 01 10:35:22 fleur: Sorry to hear things didn't work out. Feb 01 10:35:26 of course I didnt forget to add the INTERNET permissions Feb 01 10:36:48 fleur: Perhaps if you paste your code and share a link people here might be able to help you? Feb 01 10:37:49 fleur: Try collabedit.com if you need to share code Feb 01 10:38:07 aLearner: the question I was about to ask was something like : "are there common pitfalls that didnt exist with android sdk 2.2 that do exist now with android 4.0.3 ?" Feb 01 10:38:19 but I can paste a function too Feb 01 10:38:36 I'll make a very simple example that work with 2.2 and not with 4.0.3 Feb 01 10:38:54 fleur: Oh OK. Well I'm too new to know but someone else might be able to help! I'd love to see and learn... Feb 01 10:39:22 fleur: don't forget to describe what you expected to happen and in what way it fails Feb 01 10:42:47 What does android:userLevel in my XML means? Feb 01 10:42:54 I am attempting to implement some UI niceties for an App I am making. I am flipping between some views, and I want to add a gradient fade to whichever side it is going to flip to. How would I go about creating this floating layer on the top of the flipper, over the current contents? (I know how I can detect the partial flip) Feb 01 10:46:59 Seems like RelativeLayouts may be the key. Feb 01 10:49:00 napster: do you mean android:useLevel for GradientDrawable? Feb 01 10:49:12 appel1: yes Feb 01 10:49:23 napster: http://developer.android.com/reference/android/graphics/drawable/GradientDrawable.html#attr_android:useLevel Feb 01 10:49:39 appel1: I'm already there Feb 01 10:49:43 :) Feb 01 10:49:43 or the old words, look at the man Feb 01 10:50:05 or RTFM or the censored one of RTM Feb 01 10:50:10 what exactly the sentence : "Indicates whether the drawable's level affects the way the gradient is drawn. " means? Feb 01 10:50:29 Cradam: :P Feb 01 10:51:55 does anyone know? Feb 01 10:52:00 the tutorial i am following wants me to change my textview layout to xml, trouble is the input i am using for textview cant be typed prior to running the application Feb 01 10:52:14 im stumped Feb 01 10:52:27 napster: http://developer.android.com/reference/android/graphics/drawable/Drawable.html : Levels: a compound drawable that selects one of a set of drawables based on its level. Feb 01 10:52:38 its the hello world tutorial but i changed it a bit Feb 01 10:53:30 appel1: ok, got it. Defines when and where this drawable can be used. Feb 01 10:53:32 ty Feb 01 10:54:38 Cradam: may be, set some dummy data and then change? Feb 01 10:54:49 I'm trying to combine two line drawables into a layer-list drawable Feb 01 10:54:59 but the end-result is a mysterious null-pointer Feb 01 10:55:06 napster: thats what i thought but i dont know how to change it Feb 01 10:55:31 Cradam: Do you have a custom TextView? Feb 01 10:55:42 text view class I mean Feb 01 10:55:47 no Feb 01 10:56:08 Cradam: code? Feb 01 10:56:32 ok here is the simplest shape of the function I was talking earlier : http://pastebin.com/GPNTmkHT Feb 01 10:57:15 http://hastebin.com/jekejovibo.java Feb 01 10:57:53 iivvoo: You might have left something null obviously :). Use the debug and find what variables have? Feb 01 10:57:59 this works well with min android-sdk = 8, and it doesnt work with min android-sdk = 15 Feb 01 10:58:09 fleur: what does "doesn't work" mean? Feb 01 10:58:28 Cradam: and the xml Feb 01 10:58:28 it should get an inputstream from the URL I made an httpurlconnection for Feb 01 10:58:44 it works fine with android-sdk 2.2 Feb 01 10:58:44 layout.xml? Feb 01 10:59:06 * the layout xml? Feb 01 10:59:13 Cradam: yes Feb 01 10:59:33 fleur: but instead a pink elephant pops up out of nowhere and destroys your phone? Feb 01 10:59:41 but with android-sdk 4.0.3, the connect doesnt throw any exception and it just jumps to the finally block with is = null Feb 01 10:59:44 http://hastebin.com/limigatutu.xml Feb 01 11:00:38 appel1: I'm using a AVD, I didnt try with actual hardware Feb 01 11:00:45 its not actually using the xml for layout i think Feb 01 11:01:50 * mr_lou hates that damn pink elephant Feb 01 11:02:19 Cradam: You set some text "@string/hello" already via the xml. And also it has an id. So you don't need to create a new text view in the code. Just replace the line with this : TextView tv = (TextView)findViewById(R.id.textview); Feb 01 11:02:43 so you get the same Text view to be used later Feb 01 11:02:55 So, I see that one of the main.xml files has this line in it --> android:background="#00aa00" and it turns out that the background color is green. However, this is very different from what I see here --> http://developer.android.com/reference/android/graphics/Color.html#GREEN Feb 01 11:04:06 napster: thanks, i see how it works, it uses the dummy text in the xml until it is overridden by tv Feb 01 11:04:39 yw:) Feb 01 11:05:07 and, yes, works fine Feb 01 11:05:19 ok Feb 01 11:05:43 ok, next problem, why cant i scroll the output? Feb 01 11:06:53 Cradam: Put a wrapper scrollview to the parent layout Feb 01 11:07:52 Cradam: Sorry I made a mistake. I'm having an inertia of hanging on to GTK+ ;) Feb 01 11:09:42 Cradam: TextView should be taking care of its scrolling. May be something else is wrong Feb 01 11:11:07 oh Feb 01 11:12:01 perhaps its the emulator? Feb 01 11:12:14 if i override onCreate() in my activity and call super.onCreate() in it. then technically speaking it will call the onCreate() Function in the base class right ? Feb 01 11:12:21 yes Feb 01 11:12:26 that's what super. does Feb 01 11:12:54 ok thanks Feb 01 11:13:57 * Cradam transfers the apk to his phone Feb 01 11:15:27 hmm, problem parsing the package Feb 01 11:16:14 I made another pastebin : http://pastebin.com/X8j4GeL9 Feb 01 11:17:01 any hint would be appreciated ;p Feb 01 11:50:11 fleur: do you get any exception? Feb 01 12:00:03 yo Feb 01 12:09:57 dawg Feb 01 12:10:11 I heard you like android Feb 01 12:19:34 screen Feb 01 12:35:35 any idea where i report a bug in google maps for android? (the api that is, not the app) Feb 01 12:36:05 the api kinda fucking sucks. Feb 01 12:38:52 Hi. I'm trying to install de ADT on eclispe and i got this error in the console : http://pastebin.com/dtBrajRy. I'm working on a Debian 64bits. Here is my kernel release : 2.6.32-5-amd64. Thanks. Feb 01 12:43:39 Start the manager before ADT and get the tools you need Feb 01 12:43:45 my entire listview turns black when selecting it for scrolling Feb 01 12:43:51 Android manager... Feb 01 12:43:54 what theming / setting could this be? Feb 01 12:44:54 Mikellip, the manager? Feb 01 12:45:32 Yes where you can download the tools, the android manager Feb 01 12:45:50 iivvoo: http://android-developers.blogspot.com/2009/01/why-is-my-list-black-android.html Feb 01 12:45:51 check windows -> android sdk manager Feb 01 12:46:04 download the platform tools Feb 01 12:48:14 SimonVT, excellent. I remember reading that article before, forgot about it Feb 01 12:51:53 Mikellip, ok i m installing all the tools from the manager, it should works after that? Feb 01 12:52:24 yes toadd Feb 01 12:53:50 hmm, if I set the state_pressed="true" on my listview entry to transparent (#00000000), I get a yellow-ish color, not the background Feb 01 12:54:27 that'll be the list selector Feb 01 12:55:42 are you setting the list selector using android:listSelector Feb 01 12:55:49 (or setSelector(int)) Feb 01 12:56:34 no, not at all, just styling the pressed/selected state on the listitem entries Feb 01 12:57:26 The listview applies a selector by default Feb 01 12:58:53 right, that solves it Feb 01 12:58:55 thanks Feb 01 13:03:54 go team Feb 01 13:04:30 Hello guys, I have a FrameLayout which I can't get the width and the height of it. This is my simple main.xml layout: http://pastebin.com/jSRGiajF Feb 01 13:07:05 This is in onCreate(): Feb 01 13:07:07 http://pastebin.com/FzahvP2H Feb 01 13:08:17 This is the result: 02-01 14:03:15.884: D/MapActivity(13052): FrameLayout width: 0 Feb 01 13:08:17 02-01 14:03:15.884: D/MapActivity(13052): FrameLayout height: 0 Feb 01 13:08:41 It isn't measured until after the layout pass, and that isn't until after onCreate Feb 01 13:09:21 SimonVT, so I have to do a delayed timer to get the values? Feb 01 13:10:36 Or should I do in onStart? Feb 01 13:13:43 SimonVT, I tried in onStart() and on Resume() without success. Feb 01 13:15:48 You have to either find out if you can force the layout to measure, find out if you can get a callback when the layout is measured, or somehow wait until it's been measured Feb 01 13:16:21 lipse Feb 01 13:16:26 ehm Feb 01 13:16:30 "Hello World!" Feb 01 13:22:15 is it ok to run stuff on my phone from the start without first testing it in the emulator or can that break my phone? D: Feb 01 13:22:33 it will asplode your phobne Feb 01 13:22:53 yeah Feb 01 13:23:02 you can burn the firmwarez bad Feb 01 13:23:37 :-D you guys are jerks Feb 01 13:23:44 I'm imaging a huge popup window when running the emulator now Feb 01 13:23:51 WARNING: DO NOT RUN THIS ON YOUR PHONE Feb 01 13:23:57 haha Feb 01 13:24:36 so, i guess i can run it on my phone Feb 01 13:24:42 Yeah Feb 01 13:24:42 yes Feb 01 13:25:24 Syzygy, no, you can play with your phone just fine, they're just joking.. ;-) Feb 01 13:25:33 Syzygy: note that insofar as running apps on your phone can break your phone, that's a security problem (assuming the app doesn't have perms to do that) Feb 01 13:25:35 alright Feb 01 13:25:50 Google keeps you in a cozy shell of protection... Feb 01 13:25:55 running an app you just compiled is not different from installing some app from the market etc Feb 01 13:26:22 now i just need to figure out how to do it... I guess for today I'll stick with the emulator Feb 01 13:26:46 which OS are you using to develop? Feb 01 13:27:09 in many cases it's as easy as plugging the phone in over usb, enabling development mode in the settings (on the phone) Feb 01 13:27:12 and done Feb 01 13:27:20 kpreid, but if you debug your phone a milion times, your phone can break, flash is writable 100000 times or something? Feb 01 13:27:43 running an app you just compiled on your phone is like running a program on your computer that you just compile Feb 01 13:27:46 d Feb 01 13:27:48 it does wear levelling, and the write count is way higher than that Feb 01 13:27:51 so no Feb 01 13:27:58 i love android now (got some blackberry develop experiance) Feb 01 13:28:15 Number5: it's still the same memory that is used if you install an app -- or *use* an app that saves data, even Feb 01 13:28:34 ixc, well BB is awful, all that BES BIS server stuff or something.... Feb 01 13:29:09 kpreid, yes, if you download milion apps on your phone, that could break your phone too Feb 01 13:29:30 *a billion Feb 01 13:30:03 other things that can break your phone: hitting it with a hammer Feb 01 13:30:06 driving over it Feb 01 13:30:07 MDijkstra, windows 7 Feb 01 13:30:11 or solder a new flash memory on it, unless it's all on the same chip with the processor and stuff Feb 01 13:30:29 Syzygy: shouldn't be too difficult to get up and running Feb 01 13:30:29 MDijkstra, hahahaha Feb 01 13:31:20 I need to find the right cable now though Feb 01 13:31:37 To me Android is the easiest to develop on, almost everything works out of the box if you followed the installation steps well. Feb 01 13:32:31 i dont like the fact that you have to root phones to get proper access Feb 01 13:32:52 im not rooting until ICS come Feb 01 13:32:56 s my way Feb 01 13:33:43 I am fine without rooting, maybe after the guarantee runs out I will root.. :) Feb 01 13:33:55 but then I'll probably sell it and buy a newer hehe Feb 01 13:34:31 can you put views in a view pager in XML Feb 01 13:35:22 I don't believe so Feb 01 13:37:04 ehm, no, don't think you can Feb 01 13:37:04 WTF: I made an update to an app on the Market which took the new version, then *reverted* to the previous version 1h after !?! Feb 01 13:37:04 I have this prob :: Missing requirement: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found Feb 01 13:37:10 and you usually don't want to either Feb 01 13:37:20 since every 'paged view' has its own behavior Feb 01 13:39:02 When it gets a view from the adapter it wraps it in an object along with the position Feb 01 13:39:22 iirc it only draws children which are wrapped in this class Feb 01 13:40:00 I'm trying to write test cases for android. in all the examples they create a separate test project for the tests. cant I have them directly in my app project? Feb 01 13:40:46 Unless it's the titlestrip, I believe you can add that from xml Feb 01 13:43:15 Mikellip, hey, packages downloading is done. I have created a new project but i got this error : http://pastebin.com/KyFk3EmF Feb 01 13:45:56 How to findout if EditText has any text in it ? Feb 01 13:48:38 Check the text length Feb 01 13:49:02 nice idea.. Feb 01 13:49:37 one more thing is .. I want to call one function when ever any key is entered/deleted from edit text.. Feb 01 13:49:43 do I get any call back? Feb 01 13:49:53 you can attach a TextWatcher Feb 01 13:57:23 hey guys Feb 01 13:57:27 got a list view that won't long click Feb 01 13:57:30 what's that all about! Feb 01 13:58:08 You're doing it wrong Feb 01 13:58:44 natch Feb 01 13:58:47 but how do I do it RIGHT Feb 01 13:58:55 you're all snakes, but I'm all ladders! Feb 01 13:59:00 (or you're all shoots if you're american) Feb 01 13:59:04 setOnItemLongClickListener Feb 01 13:59:17 but I want a context menu :$ Feb 01 13:59:24 I want a pony :( Feb 01 13:59:25 registerforcontextmenu or something Feb 01 13:59:42 feesh: context menu's are deprecated! Feb 01 13:59:58 :-/ Feb 01 14:00:03 they are? Feb 01 14:00:06 SINCE WHEN Feb 01 14:00:06 yep Feb 01 14:00:12 SINCE NOW Feb 01 14:00:15 ... Feb 01 14:00:36 http://developer.android.com/design/patterns/selection.html Feb 01 14:00:39 and Feb 01 14:00:46 http://developer.android.com/design/patterns/gestures.html Feb 01 14:01:20 that's fine Feb 01 14:01:21 so Feb 01 14:01:25 I want to long press a list item Feb 01 14:01:46 and then show the CAB? Feb 01 14:01:56 Hum... new error on eclipse : http://pastebin.com/b76KnW9H. I'm on a debian 64 bits, anyone knows how to solve that? Feb 01 14:02:07 yeah Feb 01 14:02:08 sure Feb 01 14:02:25 yes toadd, uninstall Eclipse and install Intelli J Idea :-) Feb 01 14:02:33 totes Feb 01 14:02:56 toadd: Feb 01 14:02:59 adb is 32bit Feb 01 14:03:09 you need to compile it yourself, or install multilib jive for debian Feb 01 14:05:06 toadd: add another bit Feb 01 14:05:08 use 65 bits Feb 01 14:05:14 you need toadd a bit. Feb 01 14:05:44 oh god.. Feb 01 14:05:57 toadd: I'm using Ubuntu 64 which is like Debian 64 except that it starts with a U Feb 01 14:05:59 lov everyone Feb 01 14:06:00 and I'm doing just fine Feb 01 14:06:07 I'm assuming that you have some issue with your libncurses Feb 01 14:06:08 I have a Nintendo 64 Feb 01 14:06:10 does that count? Feb 01 14:06:13 lov, ubuntu/debian not really Feb 01 14:06:16 MDijkstra: do you play Doom 64? Feb 01 14:06:22 so back to helping me Feb 01 14:06:23 toadd: they both use .deb files and THAT'S GOOD ENOUGH FOR ME Feb 01 14:06:26 no, I only have the superman game Feb 01 14:06:30 hahaha Feb 01 14:06:31 it's great Feb 01 14:06:46 MDijkstra, not even mario 64 on the nitendo 64? ... Feb 01 14:06:55 or ocarina of time Feb 01 14:07:00 toadd: run strace or something, see if it says WHY it can't open libncurses Feb 01 14:07:06 $5 says that it's a 32bit lib Feb 01 14:07:16 lov, yeah i solved it Feb 01 14:07:29 i have to do the same with libstdc++ actually Feb 01 14:07:36 then you need toadd your solution after you ask your question :> Feb 01 14:07:54 ok, ubuntu and debian aren't the same, in that you have to do more work on debian. Feb 01 14:08:03 * lov is feeling feisty this morning Feb 01 14:08:38 lov, there is no reasons to use ubuntu Feb 01 14:10:06 ubuntu puts the fun in linufx Feb 01 14:10:20 toadd: superman 64 is one of the worst n64 games in existence Feb 01 14:10:29 that's why I mentioned it :) Feb 01 14:10:37 toadd: you mean aside from the fact that things Just Work I suppose you're right. Feb 01 14:10:46 I mean here I am just installing SDKs and eclipse and shit and doing development Feb 01 14:10:55 but you have the pure exhiliration of recompiling libraries Feb 01 14:11:33 I mean, if you enjoy compiling stuff from source, then I'm sure it's no biggy Feb 01 14:11:43 but if I have to compile something from source instead of having a nice binary it's generally going to turn me off Feb 01 14:12:30 lov, on ubuntu 64 bits you don't need to do anything tricky to make something running on 32 bits works? Feb 01 14:12:33 especially since that turns into the game of "let me hunt down all of the development libraries that I'll need to install to compile this thing, in addition to having the overhead of at least one of them being the wrong version" Feb 01 14:12:33 I enjoy watching shit scroll by for hours Feb 01 14:12:48 yeah Feb 01 14:12:54 toadd: I'm pretty sure that there's an emulation layer that you can at least attempt most of the time Feb 01 14:13:03 and the fun ./configure, install something, ./configure, install something loop Feb 01 14:13:17 When my boss comes in I put up a screen with text scrolling = I am working Feb 01 14:13:20 https://help.ubuntu.com/community/32bit_and_64bit#How_to_Make_32-bit_Applications_Work_on_a_64-bit_Operating_System Feb 01 14:13:21 OH SO I'M MISSING LIBNCURSES-DEV EH Feb 01 14:13:38 CURSES Feb 01 14:13:41 lov, you got no troubles with libstdc++? Feb 01 14:13:52 MDijkstra: even better when it damn thing doesn't even tell you what it needs :-P Feb 01 14:13:53 .... no? Feb 01 14:14:02 lov, ok :) Feb 01 14:14:04 it = the Feb 01 14:14:10 I run eclipse+adk on 64bit fine Feb 01 14:14:20 ^^ Feb 01 14:14:27 lol Feb 01 14:14:30 dragorn, no troubles? Feb 01 14:14:32 ubuntu 64 is actually the "official" development environment for Android Feb 01 14:14:36 to install 'em Feb 01 14:14:38 so everything is supposed to work out of the box Feb 01 14:14:54 morning Feb 01 14:15:24 toadd: Not noticeably, no. A few revs back had some wackiness where they used a slightly different compat lib which caused a warning on stdout which made eclipse puke. They seem to have ironed that out. Plus I'm using gentoo, which automatically makes things like that a little more likely. Feb 01 14:15:53 racing stripes joke goes here Feb 01 14:15:54 I like developing/working in windows, and running server stuff on Unix (FreeBSD, CentOS, Linux)... Feb 01 14:18:29 i prefer development on linux tbh Feb 01 14:18:39 most def Feb 01 14:19:06 I'll just repost my problem : http://pastebin.com/X8j4GeL9 Feb 01 14:19:09 yeah, development on linux is much better than windows imo Feb 01 14:19:11 development without grep, svn, vi, ssh, rsync, telnet, etc is like whiskey&water without the whiskey Feb 01 14:19:26 the explanation of the problem in itself is juste before the source ;p Feb 01 14:19:43 fleur: sweet summary bro. Feb 01 14:19:46 what's the actual error? Feb 01 14:19:55 are you executing this in the UI thread? Feb 01 14:20:06 if so you probably want to A) not do that or B) disable strict mode Feb 01 14:20:19 A applies to B as well Feb 01 14:20:26 yeah Feb 01 14:20:40 lov: this function is part of the ui class, yes, and there's no thread for it Feb 01 14:20:43 you should shoot for A in all cases. Only the most unusual circumstances (or you just testing something real quick) allow for B. Feb 01 14:20:46 fleur: there you go. Feb 01 14:20:51 Don't do networking on the UI thread. Feb 01 14:21:00 fleur: Check logcat Feb 01 14:21:06 use an AsyncTask or something Feb 01 14:21:07 The exception should be pretty obvious Feb 01 14:21:15 it was all jsut part of a test, threading it was the next part Feb 01 14:21:23 see also http://developer.android.com/reference/android/os/StrictMode.html Feb 01 14:21:50 SimonVT: I'm not used to java, but it was something pretty generic or it seemed to me Feb 01 14:21:51 storkme: I have all that in windows too Feb 01 14:22:04 fleur: Read what we've told you, please. Feb 01 14:22:09 we've identified your problem and told you how to fix it. Feb 01 14:22:32 this is a new feature as of Android 3.0 Feb 01 14:22:39 it generally saves you from egregious foot shooting Feb 01 14:23:01 yes, yes, thank you very much, I'll just go read and implement it Feb 01 14:23:07 ok :> Feb 01 14:23:37 hey everyone Feb 01 14:24:43 "AudioFlinger could not create track, status: -12" Feb 01 14:24:45 any ideas? Feb 01 14:24:48 using soundpool Feb 01 14:25:07 it's just that this morning, when I described this problem I obviously felt that something changed between 2.2 and 4.0.3, but nobody knew about that at that time, thanks again Feb 01 14:25:31 fleur, whats your problem? Feb 01 14:25:40 .... :-D Feb 01 14:25:52 fleur: Either way, logcat. It'll help you identify most problems Feb 01 14:25:58 tbws I got all the info I neede Feb 01 14:25:59 thanks Feb 01 14:26:18 ah ok, no problems Feb 01 14:29:41 Sorry guys, i'm using sound pool to play audio and i keep getting this error, "AudioFlinger could not create track, status: -12". Has something been missed out when this happens? Feb 01 14:30:36 http://stackoverflow.com/questions/7060572/android-soundpool-fails-to-play-sound Feb 01 14:30:49 * lov shrugs Feb 01 14:30:50 google around Feb 01 14:30:59 look at the AudioFlinger source for that error line if you're still stuck Feb 01 14:32:00 Ty love, i found that link. Doesnt answer the problem really though. I guess I will have to Feb 01 14:32:18 tbws: does the implementation look anything like yours? Feb 01 14:32:52 Hello! I have "Can't create handler inside thread that has not called Looper.prepare()" when query provider using AsyncQueryHandler. It is possible? Feb 01 14:32:57 Mikellip: have you replaced the windows command prompt? because that's my biggest gripe :( Feb 01 14:33:21 lov: sort of, the api calls are the same i guess Feb 01 14:34:35 tbws: http://stackoverflow.com/a/8821224/156102 Feb 01 14:34:38 relevant? yes? no? Feb 01 14:36:17 no Feb 01 14:38:13 does android have this method http://docs.oracle.com/javase/6/docs/api/java/awt/Rectangle.html#intersection(java.awt.Rectangle) Feb 01 14:38:31 please tell me it is X-( tell me the api is lying Feb 01 14:39:31 hey guys. does anyone have an example implementation of a ProviderTestCase2? Feb 01 14:39:54 eddi3x3: no, android does most likely not have AWT stuff Feb 01 14:39:58 eddi3x3: android doesn't use awt at all Feb 01 14:40:25 but this doesn't seem that hard to implement yourself Feb 01 14:40:25 eddi3x3: perhaps you can use http://developer.android.com/reference/android/graphics/Rect.html if you want to know if two rectangles intersect Feb 01 14:40:34 the intersection of two rects Feb 01 14:40:57 yes Feb 01 14:41:01 but the awt one Feb 01 14:41:09 returns a rectangle object Feb 01 14:41:16 which represents the collision Feb 01 14:41:28 yeah, so put the result in a rectangle object... Feb 01 14:41:30 which is much more helpful for me and hit box detection Feb 01 14:41:36 this is like two subtractions you have to do Feb 01 14:41:50 result from what method? Feb 01 14:41:59 not even intersection returns anything Feb 01 14:42:00 from the method you'd write yourself Feb 01 14:42:09 adjustResize isn't respected on android < 3.0, in landscape. Depending upon your IME, you may require imeOptions="flagNoExtractUi" for the IME to be non-fullscreen to notice this. Anyway, can anyone think of any potential workaround? Feb 01 14:42:10 it's like 3 lines of code Feb 01 14:42:37 what I'm actually using this for is to dock a view just above the soft keyboard whenever it's visible... with extra buttons; extended keyboard stuff. Feb 01 14:42:40 I mean, I understand you like convenience, but it's not difficult to calculate the intersection at all Feb 01 14:43:59 Hey. I have succefully ran eclipse without errors. However, when i want to run my program, eclispe does not find the AVD i just created. Feb 01 14:43:59 ah, android-11,12,13,14,15 come with examples Feb 01 14:44:14 toadd: what does adb devices show? Feb 01 14:44:26 (and/or the ddms tab) Feb 01 14:44:37 Hello! I have "Can't create handler inside thread that has not called Looper.prepare()" when query provider using AsyncQueryHandler. It is possible? Feb 01 14:44:54 well Feb 01 14:44:56 lov, adb devices? Feb 01 14:45:57 could I theoretically use intersect(Rect r)? make a temp rectangle with the actual rectangle params and then if it's true the temp rectangle gets the params of the intersection? Feb 01 14:46:10 toadd: at the command line Feb 01 14:46:11 if that makes sense Feb 01 14:46:32 eddi3x3: obviously that is pretty much the only way to use the API so yes Feb 01 14:46:42 Yauhen90: create your handler outside of the asynctask, first. Feb 01 14:46:53 lov, sorry i don't understand what you mean Feb 01 14:47:12 o_O Feb 01 14:47:19 toadd: open up a shell, type "adb devices" Feb 01 14:47:24 I'm assuming that you added platform-tools to your paths Feb 01 14:47:30 in addition to tools Feb 01 14:47:32 (in the android sdk) Feb 01 14:47:38 lov - i query AsyncQueryHandler! Feb 01 14:47:59 it is implementation of handler Feb 01 14:48:01 lov, adb is not found Feb 01 14:48:16 toadd: well that's not correct. Feb 01 14:48:19 toadd: find it. Feb 01 14:48:20 actually it s not in the tools directory Feb 01 14:48:24 right Feb 01 14:48:26 it's in platform-tools Feb 01 14:48:26 in the sdk Feb 01 14:48:31 ho Feb 01 14:48:36 i did not added it in my PATH Feb 01 14:48:42 eddi3x3: in the 20 minutes you've spent trying to find a solution to this you could've written and tested your own implementation... Feb 01 14:48:44 Yauhen90: are you creating this in the UI thread or another thread? Feb 01 14:49:07 eddi3x3: you only have to check whether the two rects overlap in both dimensions Feb 01 14:49:20 handler created in non ui thread Feb 01 14:49:27 if they do not overlap in at least one dimension, return an empty rectangle Feb 01 14:50:00 and in this handler i am not update ui Feb 01 14:50:01 if they do overlap in both, return a rectangle with the overlap in both dimensions Feb 01 14:50:13 lov, ok so adb devices says nothing but "List of devices attached" Feb 01 14:50:15 this is not rocket science Feb 01 14:51:41 Yauhen90: I understand that, but the UI thread is running as a looper. Feb 01 14:51:46 You need to create this object in something that runs in a looper Feb 01 14:51:50 because it will be running on that looper Feb 01 14:52:15 so, either create this object in the UI thread somehow, or create a looper, have it run, and create your handler there. Feb 01 14:52:32 thanks! Feb 01 14:52:34 toadd: ddms can't see your AVD then. Have you tried connecting a hardware device at all yet? Feb 01 14:53:03 also, has the AVD finished booting yet? Feb 01 14:53:17 no Feb 01 14:53:20 check back next year Feb 01 14:53:22 lov, no i did not tried it. Actually i just saw that i can't run the avd Feb 01 14:53:24 actually Feb 01 14:53:24 wait Feb 01 14:53:33 did you start the AVD or did you just create it? Feb 01 14:53:37 guys, anyone have an idea what is going wrong here? http://dpaste.org/xmhib/ - just trying to get this test working: http://hastebin.com/yahasireki.java Feb 01 14:53:43 SDL init error, no available video device Feb 01 14:53:48 ... ah. Feb 01 14:53:52 toadd: good luck! Feb 01 14:54:06 lov, ... : D Feb 01 14:55:12 flashingpumpkin: you might want to look back further in your logs, and see if there are any warnings from dalvikvm about being unable to load the class or something Feb 01 14:55:27 lov, so also, maybe you can help me on this point. I have installed the API 10 (cause it s actually the release of my android phone) but i can create a API 10 project in android Feb 01 14:55:34 because only 7 and 15 appear Feb 01 14:55:36 storkme: if I would ever need grep etc I'd run cygwin... but never had use for it other than on my servers where I run unix, for log parsing etc.. vi I only use for editing server config Feb 01 14:56:19 toadd: it sounds like you installed SDK 7 (2.1) and 15 (4.0.3) then. That's ok. Feb 01 14:56:25 You can run apps built against the 4.0.3 SDK Feb 01 14:56:27 hm Feb 01 14:56:33 It would take a speshal kind of guy to develop in VI I think :-D Feb 01 14:56:39 as long as you are careful about backwards compatability, and don't use any methods that are newer than 2.3.3 Feb 01 14:56:41 or girl, for that matter Feb 01 14:56:43 is there a way to change the color of the listview fastscroll indicator? Feb 01 14:56:48 i develop in vi all the time Feb 01 14:56:53 You are speshal Feb 01 14:56:54 :-D Feb 01 14:56:55 there are no girls Feb 01 14:57:05 toadd: set the minSdk and targetSdk in the project's AndroidManifest.xml file Feb 01 14:57:10 Mikellip: depends... if you pregenerate tags, or use that program that ran Eclipse as service... Feb 01 14:57:16 set the minSdk to 10 or lower, and it'll run on your device Feb 01 14:57:58 lov, ok thanks Feb 01 14:58:30 toadd: see also http://developer.android.com/resources/articles/backward-compatibility.html Feb 01 14:59:00 Mikellip: I develop in vi too, just not for android Feb 01 14:59:13 lov, the full log: http://dpaste.org/C35Yi/ - It appears that the provider is starting too late? Feb 01 14:59:14 vi is a great tool if you're used to it Feb 01 14:59:32 I only do quick edits in vi Feb 01 14:59:35 brr Feb 01 14:59:39 editor flamewar! Feb 01 14:59:41 hahaha Feb 01 14:59:50 vim > vi Feb 01 14:59:55 yeah i use vim Feb 01 15:00:05 I think both are absolutely terrible Feb 01 15:00:09 :q! Feb 01 15:00:10 pragma_: I say I use vi, but I use vim more often Feb 01 15:00:20 I prefer Ultraedit / Eclipse / ..... aaaand.... VISUAL STUDIO BWAHAHAHAHA Feb 01 15:00:30 textmate/eclipse Feb 01 15:00:32 yeaaaah Feb 01 15:00:36 also, ant > eclipse Feb 01 15:00:42 emacs > vim > vi *lalala* Feb 01 15:00:46 I really not like eclipse, but I just spent a few hours with it Feb 01 15:00:50 flashingpumpkin: incorrect. Feb 01 15:01:00 Vim/Eclipse/IDEA Feb 01 15:01:03 I prefer Emacs than ViM, though I was a ViM user... then there were some elisp packages that simplified what I wanted to do, and then I started using SLIME :D Feb 01 15:01:20 I really not like when my text editor auto closes parenthesis and quotes, for example Feb 01 15:01:29 * p_l is now an Emacs/IDEA guy Feb 01 15:01:41 Oh I don't like that either, fleur, I should take the time to check where I disable that sometime ;P Feb 01 15:01:46 fleur: change editor settings? Feb 01 15:01:48 p_l is a simple developer and not a real programmer. Feb 01 15:01:49 New with java... Feb 01 15:02:12 pragma_: ViM (nor ed) don't go well with Common Lisp Feb 01 15:02:16 my main language is perl Feb 01 15:02:20 p_l: I only lost time to enable real tabs (or was it already real tabs, can't remember) Feb 01 15:02:24 but really liking java :) Feb 01 15:02:30 p_l: IDEA? Feb 01 15:02:34 and I don't have the stomach to do all the legwork to make Emacs effective for Java Feb 01 15:02:40 oGMo: IntelliJ IDEA Feb 01 15:02:42 ahhj Feb 01 15:02:43 -j Feb 01 15:02:59 or whatever the correct name is... it runs with idea.sh :P Feb 01 15:03:22 yes, Intelli J Idea Feb 01 15:03:24 brilliant IDE Feb 01 15:03:27 What if a girl joined and said she does all her developing in VI... how many proposals would she get within the minute :-P Feb 01 15:03:46 depends Feb 01 15:03:54 She'd probably be fat and wear glasses Feb 01 15:03:57 hahahaha Feb 01 15:04:06 is she good looking, charming, has a good character and so on ? Then probably much :> Feb 01 15:04:12 * alankila thinks such an irrational, unpractical woman would be a disaster. Feb 01 15:04:18 Who wouldn't hire a neckbeard female developer? Feb 01 15:04:18 :-D Feb 01 15:04:20 to use vi of all possible editors? :-p Feb 01 15:04:31 but the nerd factor would be kind of cute Feb 01 15:04:35 vim ftw anyway, you guys are just broken. Feb 01 15:04:35 (and not even vim, I'm assuming) Feb 01 15:04:38 I've seen a girl wearing a "SELECT * FROM `People` WHERE `clue`>0"-shirt before Feb 01 15:04:48 when I asked her about it she didn't know what SQL was :< Feb 01 15:04:53 awww Feb 01 15:04:58 Eventually some vim user will release a patch to fix you guys though. Feb 01 15:05:02 epic fail, I say Feb 01 15:05:05 yeah :-D Feb 01 15:05:43 select * from users where channel like 'android-dev' and creepy = 1; Feb 01 15:05:50 27 results Feb 01 15:06:15 * alankila notes that lov doesn't really use sql much to write such queries and imply such data models Feb 01 15:06:35 hm. Q: is there any reasonable orm that is compatible with content providers (eg: deosn't return lists / iterators) Feb 01 15:07:01 flashingpumpkin: if you decide to write one Feb 01 15:07:04 I want Feb 01 15:07:04 unnecessary like, use of integer for boolean truth (apparently), could of course mean 100 % creepy people as opposed to only 99 % creepy people. Feb 01 15:07:07 alankila: you're not helping :P Feb 01 15:07:13 (also taht possibly provides facilities for table generation and migration) Feb 01 15:07:23 any1 linked a good looking orm in channel Feb 01 15:07:49 flashingpumpkin: seems unlikely, it should also be lightweight Feb 01 15:07:58 ie, you could import all of hibernate Feb 01 15:07:59 select count(*) from users u, people p where u.id=p.user_id and u.channel='android-dev' and p.clue > 0; :-D Feb 01 15:08:06 I've looked into ormlite.org, it's possible to get at the cursor, but you lose everything that's nice about it Feb 01 15:08:37 And just what is the difference between "users" and "people" supposed to be? Someone's like google and tries to track real people behind mere nicknames? :-p Feb 01 15:08:39 Mikellip: 0 results Feb 01 15:08:42 haha Feb 01 15:08:49 let's all write sql queries in #android-dev and pretend it's funneh Feb 01 15:08:53 agreed Feb 01 15:08:55 flashingpumpkin: what do you mean by 'compatible with content providers, btw?' Feb 01 15:08:59 -btw Feb 01 15:09:07 MDijkstra, it returns cursors Feb 01 15:09:07 select * from stupid_jokes where relevant = 1 Feb 01 15:09:16 flashingpumpkin: on the contentprovider side, or the client of the contentprovider side Feb 01 15:09:22 delete from *. And that's the end of it, Feb 01 15:09:28 on the contentprovider side Feb 01 15:09:46 and ideally on the client side turns the cursors back into objects ^^ Feb 01 15:09:48 flashingpumpkin: shouldn't be too hard to patch an existing one to return a cursor Feb 01 15:10:08 hi folks! i've got a DialogFragment which consists of a ProgessDialog. after "the work" is done and i want to dismiss the dialog, do i simply call DialogFragment#dismiss() or is there anything else to call to clean up the fragment? Feb 01 15:10:09 of course, it then becomes a bit weird Feb 01 15:10:19 since a cursor maps to the cols/rows model Feb 01 15:10:20 hello, i have a little question.. if i have a service which polls a server for updates and informs the activity via runOnUiThread.. what happens if an activity is currently in foreground which is not bound to the service and a new server update arrives ? Feb 01 15:10:23 not the objects the ORM maps to Feb 01 15:10:29 MDijkstra, yeah Feb 01 15:11:24 aren't you better off simply using an sql generation layer with some kind of simple namespace mapping? Feb 01 15:11:42 abaratican: ... I was very tempted to write a hairy multilevel multijoin etc. transaction after seeing your words ;) Feb 01 15:11:51 ANdi``: then it won't run on that UI thread Feb 01 15:12:10 ANdi``: you should probably send broadcasts from your service to tell activity to refresh, and you can maybe send a request for refresh from activity's onCreate to get update from service as soon as possible. Feb 01 15:13:05 flashingpumpkin: seems the Object-mapping step is kind of useless, so simply map the incoming requests to SQL using a simple translation scheme Feb 01 15:13:09 and you're done, I think Feb 01 15:13:17 MDijkstra, possibly. The problem is essentially me - I'm too lazy to type out all the table generation / migration code by hand. But looking for something that does it for me possibly takes even more time than just doing it. Feb 01 15:13:26 achtung der wunder verrukt wurstchen! Feb 01 15:13:35 is it possible to use the camera in ics without an activity? Feb 01 15:13:38 MDijkstra, I'm not that much interested into the actual ORM side Feb 01 15:13:52 flashingpumpkin: well, migration stuff is pretty difficult Feb 01 15:13:58 Jug6ernaut: to be honest I would hope not Feb 01 15:14:03 you're unlikely to find something that's lightweight and works well Feb 01 15:14:16 -- Feb 01 15:14:19 MrChyizPyiz alankila hm so if i currently am in the other activity, the runOnUiThread of the activity bound to the service won't get executed ? Feb 01 15:14:31 lol Feb 01 15:14:44 well lov, for my app i use the led(camera) from a service Feb 01 15:14:52 Jug6ernaut: Wouldn't want some rogue app to capture pics of you while you're watching porn Feb 01 15:14:54 with ics it requires a surfaceholder, which requires an activity Feb 01 15:15:27 lol SimonVT Feb 01 15:16:15 Jug6ernaut: ah Feb 01 15:16:29 Jug6ernaut: to be totally honest I wish that the camera LED would just be exposed as a full class service or something Feb 01 15:16:35 so that developers can turn the damn thing on without tricks Feb 01 15:16:42 ANdi``: if the service is designed to sync info from a server just send a broadcast to update the activities, decouple Feb 01 15:16:47 lov ur telling me :\ Feb 01 15:16:53 the way its implemented is horrible Feb 01 15:17:07 they aren't general purpose lights Feb 01 15:17:13 those things get fucking hot Feb 01 15:17:45 mikedg not an issue with how i use it lol, but ur right, but on that note why allow torch mode at all then? Feb 01 15:17:51 if ur going to do it do it right Feb 01 15:17:56 not pos crap way it is now Feb 01 15:18:09 Bah, can't find a way of solving "AudioFlinger cannot create track, status: 12" Feb 01 15:18:26 is there another way to play sound on android apart from using sound pool? Feb 01 15:18:41 tap on the phone Feb 01 15:19:00 lov: +1 i hoped that "android uses linux" really unleashes the power of linux beeing able to control all hardware in an open-standard way Feb 01 15:19:05 tbws: there are a variety of classes for audio. Feb 01 15:19:12 You don't need to use soundpool; you can just create a MediaPlayer object. Feb 01 15:19:20 that said, I'd recommend you track down the cause of that Feb 01 15:19:22 also, it's -12 Feb 01 15:19:23 not 12 Feb 01 15:19:30 rigid: hahahahahaha Feb 01 15:19:30 thats true ty Feb 01 15:19:47 I cannot unfortunately, there is nothing in the source to suggest a cause Feb 01 15:19:55 or rather i cant find one Feb 01 15:21:54 can you load a resource in using MediaPlayer? Feb 01 15:22:08 looks like you can only specify a path to a file or url Feb 01 15:23:30 tbws: what do you mean, an asset? Feb 01 15:23:51 I think you can load it either from /assets or from /resources/raw Feb 01 15:24:19 tbws: I would copy it to the apps files dir Feb 01 15:26:53 tbws: tbws http://developer.android.com/reference/android/media/MediaPlayer.html#create(android.content.Context, int) Feb 01 15:27:48 ty lov Feb 01 15:27:59 you've been alot of helop Feb 01 15:28:01 *help Feb 01 15:28:32 are you working on anything atm that requires web backend work or graphics design? Feb 01 15:28:38 if so i would like to return the favour Feb 01 15:30:24 well, I might be Feb 01 15:30:30 let me /msg you Feb 01 15:33:35 kk Feb 01 15:34:16 Meh, I have a dynamic ArrayAdapter.. but the getView Method is never called Feb 01 15:34:35 does anyone know why ? Feb 01 15:36:07 You aren't adding the adapter to the listview Feb 01 15:36:19 Your getCount is returning 0 Feb 01 15:36:38 its actually an autoComplete Textview Feb 01 15:36:42 You don't even have a listview Feb 01 15:36:54 yes. Feb 01 15:36:56 Are you sure you're programming Android? Feb 01 15:37:33 Let me check Feb 01 15:37:43 yes ! unfortunately Feb 01 15:38:30 btw. I owe you a beer. Feb 01 15:38:55 The cause of a problem is often the most simplest. Feb 01 15:39:01 getCount ? Feb 01 15:39:32 (16:36:10) SimonVT: You aren't adding the adapter to the listview Feb 01 15:39:38 haha Feb 01 15:39:39 well. autocomplete textview in this case. Feb 01 15:40:30 lov, I implemented the http download with an asynctask, and it works thank you for your advice ;p Feb 01 15:41:21 yw Feb 01 15:44:41 can an activity be started while screen off? Feb 01 15:47:24 Jug6ernaut: you can fire the intent but I don't know if onStart will be called. Feb 01 15:47:32 I THINK onCreate will be? Feb 01 15:47:51 ic Feb 01 15:48:00 arg Feb 01 15:48:39 What's to favor for web apps. Sencha Touch or jQuery? Feb 01 15:49:14 ./ jquerymobile Feb 01 15:54:22 I've styled a bitmap as background for a linearlayout, but now the background seems to make the layout larger (higher - it's wrap_content) Feb 01 15:54:56 how can I simply have the background clipped to match the required size? Feb 01 15:57:13 iivvoo: you're going to probably have to create your own BitmapDrawable, and then assign it Feb 01 15:57:22 on that BitmapDrawable, use http://developer.android.com/reference/android/graphics/drawable/BitmapDrawable.html#attr_android:gravity Feb 01 15:57:27 lov I already have a bitmapdrawable Feb 01 15:57:33 set it to clip_whatever Feb 01 15:57:42 ah... Feb 01 15:57:44 interesting Feb 01 16:00:36 ah, crap, gravity is ignored when the tile mode is enabled Feb 01 16:01:12 why does everything have to be so hard... :( Feb 01 16:01:16 so don't tile :> Feb 01 16:02:32 then it won't fill horizontall Feb 01 16:02:32 y Feb 01 16:06:40 ok, problem solved if I make it the background at a view at a higher level Feb 01 16:17:36 can anyone take a look at my code and tell me if I correctly initialized the rectangle object for my ball object? when ever I call the method to return the rectangle object, I get a null pointer Feb 01 16:17:38 http://pastebin.com/48DDRyjn Feb 01 16:19:44 You aren't instantiating it in Ball(Parcel) Feb 01 16:20:30 how would I instantiate it? Feb 01 16:20:53 new Rect(...) ? Feb 01 16:21:01 I'm sorry for not knowing exactly how to do so, I only use the methods it gives me Feb 01 16:21:19 in public Ball(Parcel in)? Feb 01 16:24:10 rectangles are parecable right? Feb 01 16:29:04 Hmm Feb 01 16:29:16 my app cant get a gps location but somehow google maps can Feb 01 16:29:16 http://pastebin.com/fBTd1zdM Feb 01 16:29:32 is there anything wrong with what i've written? Feb 01 16:30:25 would this be correct? http://pastebin.com/TQ8dU3uM Feb 01 16:32:21 hey i've got text fields that I want all cap characters in, so i set them to: Input Type: textCapCharacters and it mostly works, but inexplicably, some times it allows arbitrary input, what gives? Feb 01 16:35:24 anybody? Feb 01 16:35:46 I don't know how to unmarshall my rectangle object correctly I think Feb 01 16:36:25 eddi3x3, dont really have time to dig into all of it, but the sentiment looks right Feb 01 16:36:39 Anyone work with GPS? Feb 01 16:36:53 I can get a reading for google maps but not my app Feb 01 16:36:58 kinda frustrating Feb 01 16:37:09 http://pastebin.com/fBTd1zdM Feb 01 16:37:10 eddi3x3, the key is just making sure u marshel and unmarshel in the EXACT same order w\ the same # of parts every time Feb 01 16:37:45 so I make a new rectangle object to unmarshall? Feb 01 16:38:29 eddi3x3, ya, using the constructor that accepts a parcelable Feb 01 16:38:31 er Feb 01 16:38:37 a Parcel i mean Feb 01 16:39:00 is it save to assume that an activity is created (i.e. Activity#onCreate was executed) before any fragments are attached to it? sure, should be safe in the obvious case of starting a completely new activity, but what about screen orientation changes? Feb 01 16:39:54 I unmarshel in the writeToParcel method right? Feb 01 16:42:19 eddi3x3, no that would be marshelling Feb 01 16:42:50 marsheling means taking the data and putting it into some other form. Unmarsheling means we take data in some other form, and make it into an object Feb 01 16:43:12 Wavesonics: i think you mean marshmallowing Feb 01 16:44:01 ok so for marshmalliwing, I would do dest.writeParceable(rectangle, flags)? Feb 01 16:44:27 I am trying to force focus to an EditText and also launch the keyboard, I've noticed the following code (http://pastie.org/3296737) works in some situations but not all. Any suggestions? Feb 01 16:44:41 eddi3x3: what is the exact error anyway? it seems that you put the rectangle into the parcel, but you never read it ... Feb 01 16:45:00 I get a null pointer Feb 01 16:45:14 eddi3x3: exact stack trace please Feb 01 16:46:04 eddi3x3: either you shouldn't put it into the parcel in the first place (since you can calculate the rectangle from the other parameters anyway), or you should read it from the parcel (in the Ball(Parcel in) constructor) Feb 01 16:46:53 Specifically it doesn't seem to work within fragments for me, it works fine within a standard activity. Feb 01 16:48:07 here's the log, it's the only thing I know how Feb 01 16:48:08 http://pastebin.com/PjXhUha5 Feb 01 16:49:02 eddi3x3: what is on line 19 of PaddleChooserActivity? Feb 01 16:49:06 eddi3x3: also, you've mixed up the order: on unmarshalling: ...,leftx,rightx,... vs on marshalling: ...,leftx,lefty,... Feb 01 16:49:48 nvm Feb 01 16:50:15 eddi3x3: get the order right and don't write the rectangle into the parcel Feb 01 16:50:18 line 19 = final int height = bundle.getInt("Height"); Feb 01 16:53:16 hmm Feb 01 16:53:26 can you pastebin/gist the code? Feb 01 16:55:59 ok Feb 01 16:56:04 I got it to work now Feb 01 16:56:08 =-) thanks Feb 01 16:56:14 Glad to hear it Feb 01 17:01:54 hi i have one question Feb 01 17:02:05 on a general android phone Feb 01 17:02:11 when the lockscreen is called Feb 01 17:02:53 in an activity the onPause method is executed Feb 01 17:03:29 its not guaranteed Feb 01 17:03:33 and when i unlock i get onRestart on resume ... Feb 01 17:03:35 onPause is guaranteed. Feb 01 17:03:47 not when the lockscreen is turned on Feb 01 17:03:47 i have an s2 here Feb 01 17:03:51 mikedg: lolwut Feb 01 17:03:59 there was someone in here like 2 weeks ago saying it doesnt always happen Feb 01 17:04:04 that always calls onStop Feb 01 17:04:09 and onCreate Feb 01 17:04:13 when the lockscreen is shown Feb 01 17:04:17 thebastl: I'm not sure if you mentioned a problem yet. Feb 01 17:04:21 the activity is completely killed Feb 01 17:04:23 thebastl: why Feb 01 17:04:24 do you Feb 01 17:04:27 And please, form a single sentence. Feb 01 17:04:29 speak Feb 01 17:04:31 in short Feb 01 17:04:32 phrases? Feb 01 17:04:35 sry :) Feb 01 17:04:52 attack Feb 01 17:05:04 thebastl: having your activity destroyed and recreated is something that you should be prepared for and handling anyway. Feb 01 17:05:30 http://stackoverflow.com/questions/2691570/android-how-to-properly-handle-onpause-onresume-methods Feb 01 17:06:25 so on my s2 when the lockscreen is shown the activty is always destroyed and in this case what is the right way/android way to store data that i want to store for that particular time the activity is opend for example if i already called a webserver Feb 01 17:07:06 for example in a game lobby that i added ki opponents (and i dont want to talk to the webserver again) Feb 01 17:07:14 thebastl: you can run a service in separate process for handling the updates if you want to avoid calling the server again Feb 01 17:09:12 also, onCreate and onSaveInstanceState let you load and save state Feb 01 17:09:22 (i use async tasks for that) but how do i do i replace something like "Boolean serverCalled" i would have used if i knew when i see the lockscreen or other activities it wont completely purge the activity object Feb 01 17:10:30 (atm im solving this by using sharedpreferences) Feb 01 17:10:38 thebastl: you can save that boolean into instance state Feb 01 17:11:38 (Into Bundle serialization) Feb 01 17:11:49 onCreate gets that object later on Feb 01 17:12:11 hmm i read somewhere that i cant depend on that too but i will go with this for now Feb 01 17:12:21 thebastl: depends on what user does, IIRC Feb 01 17:12:52 shared preferences might do the work if you place the calls in appropriate callbacks Feb 01 17:13:13 in which case will the instancestate be resetted= Feb 01 17:13:55 I think definitely if your app is closed (as in force close from task manager, killing the process) Feb 01 17:28:50 Hey guys Feb 01 17:28:57 Is there a way to define a preference that has a multiplier? Feb 01 17:29:12 Ex. I want to display some timeout value in seconds, but I want to store it in milliseconds Feb 01 17:33:12 well you can override the preferencechanged thing Feb 01 17:39:16 canadiancow|work: Yeah I thought about that -- but the problem is that a lot of people are listening to that event, and some of them pull it into memory immediately Feb 01 17:39:36 So, I cant do that because I dont know the order in which the callbacks will occur Feb 01 17:40:08 hmm Feb 01 17:41:25 insert 5 records into table; query all records from table; receive 185 records... wtf? Feb 01 17:48:31 190 records this time... wtf is this? Feb 01 17:49:21 oh. Feb 01 17:49:24 wow i'm retarded. Feb 01 17:50:51 LOL Feb 01 17:50:58 185 records? wtf? Feb 01 17:51:02 i just add 5! Feb 01 17:51:04 i know. Feb 01 17:51:05 NOW IT'S 190!!!! Feb 01 17:51:09 i didn't even look at the code. Feb 01 17:51:20 OMG AND NOW IT'S 195 Feb 01 17:51:21 just read what i wrote in IRC. Feb 01 17:51:25 ITS LIKE EVERY TIME I RUN IT Feb 01 17:51:27 IT GOES UP BY 5 Feb 01 17:51:28 GIANT facepalm. Feb 01 17:51:34 :D Feb 01 17:51:38 brightened my day :) Feb 01 17:51:51 hey cow. you got another intern spot open? Feb 01 17:51:56 heh. Feb 01 17:52:10 i can submit your name Feb 01 17:52:15 im not exactly a hiring manager Feb 01 17:52:25 just kidding really. i love my job. Feb 01 17:52:59 i got a call this morning about a job opportunity - they left a message Feb 01 17:53:05 based on the company and location, im guessing it sucks Feb 01 17:54:17 RIM waterloo? Feb 01 17:54:32 you know you want a RIM job Feb 01 17:54:48 i applied once Feb 01 17:54:50 way back in the day Feb 01 17:54:53 went for my interview Feb 01 17:54:54 anyone here working wth the USB ? Feb 01 17:55:02 "this is no longer a technical position. are you still interested?" Feb 01 17:55:03 walked out Feb 01 17:55:12 db42: yes Feb 01 17:55:25 "no longer a technical position?" Feb 01 17:55:33 "I'm no longer qualified, are you interested?" Feb 01 17:55:38 it is now a missionary position Feb 01 17:55:39 +1 mikedg Feb 01 17:55:41 dragorn, why is UsbManager implmented that instead of throwing exceptions on errors, it catches them silenty and returns null instead ? Feb 01 17:55:45 that's not very java-like Feb 01 17:56:01 i went to an interview and when i walked in the door they basically said i shouldnt want the job Feb 01 17:56:02 wtf Feb 01 17:56:02 db42: i have no idea why some decisions are made Feb 01 17:56:14 db42: I'm more interested in why it's impossible to get the length of a queued IO response :P Feb 01 17:56:23 dragorn, also the documentation sucks, for something that returns a reference, the doc says it returns a boolean... Feb 01 17:56:29 db42: necessitating doing a polling thread Feb 01 17:56:30 also: Feb 01 17:56:36 anybody here messed with Java arrays in JNI ( C ) via the NDK ? Feb 01 17:56:40 woundup going to bn.com instea Feb 01 17:56:42 d Feb 01 17:56:43 there is a major bug somewhere, and i can't figure whats going on Feb 01 17:56:48 everything owrked out better than expected Feb 01 17:56:52 (i do a simple array access injni, and it does not work) Feb 01 17:56:52 db42: i've used it for bytearray Feb 01 17:56:59 db42: but not arbitrary Feb 01 17:57:03 dragorn with NDK v7 ? Feb 01 17:57:13 db42: yes, but bytearray is a ndk primitive Feb 01 17:57:25 db42: despite being a byte[] in java-side Feb 01 17:57:27 Dragorn i define a byte[] blah; in Java, pass it to JNI, modify it, and when i release it in JNI it isn't modified with the new data from C Feb 01 17:57:40 oh I don't think you can modify it by reference Feb 01 17:57:44 i'm doing the bast getelements/releaseelements and modifying it in the middle Feb 01 17:57:59 what do you mean ? is there another way (besided bytebuffer) Feb 01 17:58:06 db42: does it work differently in other Java implementations? Feb 01 17:58:08 I may be wrong, but I suspect you can't. Yeah, buffer, or return a new bytearray object Feb 01 17:58:22 evancharlton: my fucking soft buttons dissappeared Feb 01 17:58:24 wtfingfuck Feb 01 17:58:29 db42: or go full retard, and do all your usb processing in java ;P Feb 01 17:58:30 db42: it should be trivial to distill your problem into a non-Android-specific test case, no? Feb 01 17:58:32 db42: which is what I did Feb 01 17:59:21 db42: alternately, rewrite libusb to open by a fd and do all the IO layer native, which is my next plan Feb 01 18:00:20 tml_, i persume, but i'm doing 3 lines of C code, i'm pretty sure this is an NDK bug :) Feb 01 18:00:34 Dragorn yeah i've seen people do that :) Feb 01 18:00:54 dragorn: this isn't usb related, i need to do NEON instructions on some java bytearray... Feb 01 18:01:02 db42: http://blog.kismetwireless.net/2012/01/kismet-on-android.html ... I did a full wifi nic driver in java ;P Feb 01 18:01:10 nice :) Feb 01 18:01:11 db42: I'm both proud of that, and disgusted. Feb 01 18:01:25 and I'm wondering how drunk/high you were Feb 01 18:01:37 p_l: you know, in the end, it really only took about 10 hours Feb 01 18:01:42 also fucking fuck, touchdown is able ot prevent screenshots Feb 01 18:01:43 wow Feb 01 18:01:46 dragorn could that be ported to a jailbroken iphone ? Feb 01 18:01:47 p_l: of which at least a few of them were useless hours Feb 01 18:02:02 db42: if the iphone has usb host and an API to address it? I'd assume so, yeah. Feb 01 18:02:02 dragorn, sorry, can this be ported to jailbroken iphones ? Feb 01 18:02:12 ohh, a wifi usb nic ? Feb 01 18:02:22 i thought internal one Feb 01 18:02:26 db42: I'm working on a more abstract and sane userspace layer to load kernel drivers with less modification. Feb 01 18:02:33 db42: no, not internal. usb, unrooted android Feb 01 18:02:43 i see Feb 01 18:02:43 db42: the iphone internal nic can't do monitor mode Feb 01 18:02:45 nice Feb 01 18:02:58 dragorn i dont think so, i think the drivrers dont allwo it, not the h/w Feb 01 18:03:03 p_l: depressingly neither, I wish. Feb 01 18:03:17 db42: depends on the firmware. Most mobile nics do not implement monitor firmware. Feb 01 18:03:30 tml_, any ideas on how can i figure out this bytearray JNI nug ? Feb 01 18:03:49 as far as your bytearray thing, *test it in normal java on the pc first*. Feb 01 18:04:08 if you can confirm you can alter the contents of a bytearray by reference there, then yeah, you found a bug Feb 01 18:04:12 yeah i'll try later, altough i'm pretty sure it will work Feb 01 18:04:29 i just get a jbyte* poitner to the bytearray, i modify the jbyte* and then i release it back with 0 (so it gets copied back) Feb 01 18:04:32 nothing funcky there Feb 01 18:04:54 where can i see android's jni.cpp implmentation ? Feb 01 18:05:03 i want to compare it to openjdk's Feb 01 18:05:15 db42: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jnistring.html has the semantics of altering by reference Feb 01 18:05:33 db42: you have to explicitly address it specific ways to pin it on the java-side, search "pinning array" on that url Feb 01 18:07:03 any idea where i can find the jni source code for ndk ? Feb 01 18:08:36 what jni source code Feb 01 18:08:38 somewhere in the aosp codebase Feb 01 18:09:20 pfn openjdk has an jni.cpp file Feb 01 18:09:30 if you mean JNI implementation, read through DVM source code Feb 01 18:09:32 which implmetes the marshaling of arrays for example Feb 01 18:09:40 i am wondering if ndk has such a file as well Feb 01 18:09:47 since JNI was used internally before NDK was published Feb 01 18:10:21 db42: you want, iirc, the dvm related repositories Feb 01 18:10:53 huh, I wonder why getListView().setSelection(getListAdapter().getCount() - 1) doesn't put me at the end of the listview Feb 01 18:11:27 p_l got a link Feb 01 18:11:46 db42: look it up on source.android.com, iirc Feb 01 18:12:14 getting through it to track the link is outside of current pay grade ;) Feb 01 18:12:39 I wonder if it's because that list item is really really tall Feb 01 18:25:53 back Feb 01 18:26:12 i dont have my java enviroment @ home, anyone care to try and replcate the issue ? It's 3 lines of C code in JNI Feb 01 18:27:54 void Java_com_example_Test_blah(JNIEnv* env, jbyteArray first, jbyteArray second) {jbyte *firstp = (*env)->GetByteArrayElements(env, first, NULL);firstp[0] = 0;(*env)->ReleaseByteArrayElements(env, first, firstp, 0);} Feb 01 18:28:05 first[0] is not 0 :( Feb 01 18:28:16 http://www.gizmag.com/review-onlive-android-app/21264/ Feb 01 18:28:29 :O Feb 01 18:28:35 g00s, onlive is very nice Feb 01 18:29:20 I have a basic vertical linear layout. I am putting "rows" into this using horizontal linear layouts with textviews and weights. However, using identical weights on each "row" element does not produce a consistent width for each element. Feb 01 18:29:57 afreq: did you look at TableLayout Feb 01 18:30:01 I have experienced this before using TableLayout too. Is there a way to get consistent but dynamic widths accross rows? Feb 01 18:30:04 dragorn, here? Feb 01 18:35:04 hello Feb 01 18:35:41 i'm trying to build/compile an android kernel, is this the appropriate channel to ask? Feb 01 18:36:24 db42: why do you pass NULL as the isCopy parameter? Feb 01 18:36:33 tml_, cause it's allowed ? Feb 01 18:37:15 ok... Feb 01 18:37:30 you need to pass a pointer only if you want to know if it's a copy or not Feb 01 18:38:08 anybody knows why org.w3c.dom.Element.setAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:blargh", "WTF") fails on Android 2.1 with a DOMException, and works with Adnroid 2.2+ ? Feb 01 18:38:11 I'm having a problem with the BackupManager stuff. It won't do a backup on its own, but will if I manually trigger one. and the app will restore automatically if a backup has been run previously so it seems to see the backup handler. Feb 01 18:39:42 tml_, do you see an issue ? Feb 01 18:41:35 Tomasu, documentation says backup only occurs after you call dataChanged... Feb 01 18:41:51 yeah, its been called. Feb 01 18:42:54 who knows when it actually runs the backup Feb 01 18:42:59 it just says at an opportune time in the future Feb 01 18:43:05 maybe it runs the backup once a day Feb 01 18:43:06 its supposed to run on uninstall Feb 01 18:43:46 db42: too lazy to write the corresponding Java code yet;) Feb 01 18:43:51 Tomasu: try to catch ctate if he is around Feb 01 18:44:50 tml_, thats 5 lines :) Feb 01 18:44:56 g00s: thanks, will do Feb 01 18:46:38 Test.java: package com.example; class Test { void static native blah(byte[] first, byte[] second_); public static void main(String args[]) {byte[] f = new byte[] { 1, 2, 3, 4}; blah(f, f);}} Feb 01 18:46:41 tml_ there :) Feb 01 18:46:47 hope ididn't mess pu the syntax :) Feb 01 18:47:18 ohh, and static { LoadLibrary("?"); } Feb 01 18:48:16 has anyone seen a good options menu icon for 'download' ? stock android has an upload icon, and i found a few crappy ones through google search Feb 01 18:49:12 For example, documentations sucks, read the return value of the following function, and then check what it returns actually: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/hardware/usb/UsbManager.java#238 Feb 01 18:49:42 also, amazingly it silently catches all exceptions instead of re-throwing them... Feb 01 18:49:43 g00s: Rotate it 180 degrees :p Feb 01 18:49:53 SimonVT: :P i allready saw that one, heh Feb 01 18:50:00 that messed up my code... Feb 01 18:50:06 SimonVT, that might be copyright violation Feb 01 18:51:18 Does the license say you can't use/modify the drawables? Feb 01 18:51:35 i'll use ic_menu_back rotated -90 Feb 01 18:52:17 lamesauce Feb 01 18:52:32 db42: you're doing somethign wrong Feb 01 18:52:36 db42: works fine for me in my test Feb 01 18:52:42 dragorn: on android device ? Feb 01 18:52:48 yup Feb 01 18:52:53 posting code, hold. Feb 01 18:52:53 did you test my code ? which ndk ver ? Feb 01 18:53:02 no, i ignored your code, I think it's wrong. Feb 01 18:53:23 what do you think is worng ? Feb 01 18:54:04 the fact that it doesn't work is a good guess. You're ignoring the copy attribute which is probably bad. Feb 01 18:54:14 http://durandal.kismetwireless.net/~dragorn/code/jni-array-ref.c Feb 01 18:54:27 hm, I just let both my phone and the emulator run my app for an extended period just idling, and both are attempting to backup, the emulator seems to fully back everything up, but my phone gets stuck on my handler and calls it repeatedly. I should try it in a 2.3.x vm rather than 4.x Feb 01 18:54:50 as far as i understand, the copy attribute is an optional notification to me, if i wantto know if it's a copy or pinned, how is that a required info ? Feb 01 18:55:29 db42: not my problem man. that url shows code that works fine under the latest ndk, which does array stuff properly. It's as basic as your example so you should be able to adapt it easily. Feb 01 18:55:40 db42: I don't know what exactly is wacky about yours Feb 01 18:55:54 sec, checking Feb 01 18:56:48 dragorn, to be sure, can you make the method static, and pass NULL in iscopy, just to see if it still works ok ? Feb 01 19:00:00 (i dont have an ndk enviroment for the next day or so? :( ) Feb 01 19:00:35 god damnit testers are so annoying Feb 01 19:00:59 QA or random people? Feb 01 19:01:04 QA Feb 01 19:01:17 it's like they genuinely don't know on a technical scale they're barely half way between myself and my grandma. Feb 01 19:01:31 my testers know Feb 01 19:01:39 i hate when they presume to understand some issue and start explaining to me a potential fix. shut up you fool. Feb 01 19:01:43 .. i may have told them.. Feb 01 19:02:04 lol Feb 01 19:02:18 mine are pretty good Feb 01 19:02:21 except when they see NPE Feb 01 19:02:27 "OH JUST CHECK IF IT'S NULL AND DO NOTHING" Feb 01 19:02:39 "oh yeah looks like you just need to use threading here." ... "it is threaded." ... "oh, then i bet you need synchronization." Feb 01 19:02:42 thanks, please go die. Feb 01 19:02:46 LOL Feb 01 19:02:48 wow Feb 01 19:02:53 do they have degrees in CS? Feb 01 19:02:56 lulz Feb 01 19:03:05 i think this guy does. and damnit if he didn't waste his money. Feb 01 19:03:12 the only person on our QA team who would even know anything like that has a CS degree Feb 01 19:03:18 the rest would have no clue Feb 01 19:03:30 but yea...QA should tell you what they were doing and what happened Feb 01 19:04:22 i like, too, how they assume that all "logs" are of the same type, and provide always everything you need to solve a problem. Feb 01 19:04:30 this is especially true of testers with CS backgrounds. Feb 01 19:05:06 heh Feb 01 19:05:15 when i pointed out that this was not the case, there was a week long period of all JIRA tickets have "adb bugreport" output attached. lol, seriously Feb 01 19:05:35 my manager, who is a very techincal person, has a very bad habit of logging crashes with just a stacktrace Feb 01 19:05:51 "ok...so it crashed at this line....what were you doing?" "i dont remember" Feb 01 19:06:02 at least he can tell what a stack trace is. half the people in this channel can't tell that much. Feb 01 19:06:08 :) Feb 01 19:07:15 dragorn, also can you paste the java source ? Feb 01 19:08:38 btw, in OpenJDK http://hg.openjdk.java.net/jdk7/jdk7/hotspot/file/tip/src/share/vm/prims/jni.cpp the getbytebufferelements always copies, never pins Feb 01 19:11:58 fucking gimp's ui sucks so bad Feb 01 19:12:09 hello. I have a HTC Desire Z with two special keys. They are not functional in cyanogenmod, however in the original system by HTC they are. On cyanogenmod there are no keycode when pressing these keys. But with cat /dev/input3 I get an output. So it seems as if the kernel (?) does not know about these keys? Or is it something in the userland? Feb 01 19:12:29 anyone know if samsung galaxy II ICS kernel allow for usb host mode ? Feb 01 19:13:03 if you can plug in a mouse and use it, does that mean it suppors host mode? Feb 01 19:13:38 Finswimmer: might be a better question for #cyanogenmod or #cyanogenmod-dev Feb 01 19:13:59 canadiancow good question :) Feb 01 19:14:10 canadiancow|work: i'd think it would, but i didn't sleep at a holiday inn express last night Feb 01 19:14:13 db42: aren't you forgetting the second standard parameter to JNI functions? Feb 01 19:14:22 tml_, which is ? Feb 01 19:14:33 tophyr: what? Feb 01 19:14:39 im never going to one of those shitty places again Feb 01 19:14:41 they suck so bad Feb 01 19:15:12 canadiancow|work: .. the ad campaign? "Oh! Are you a doctor?" "No, but I did sleep at a Holiday Inn Express last night." Feb 01 19:15:12 are they rent by the hour ? Feb 01 19:15:15 tml_, if you are refering to "this" i declared the function as static, meaning no this ? Feb 01 19:15:28 dunno if they go that far up north however ;) Feb 01 19:15:30 tophyr: Maybe. But at the moment I just try to figure out which part of linux is missing these keys. So this should be a more generic question. (beside this on #cyanogenmod no one could help me...) Feb 01 19:16:04 Finswimmer: ah, gotcha. yeah heh i rarely expect any sort of technical knowledge in #cyanogenmod. -dev is good for that but very idle usually. Feb 01 19:16:26 db42: "The JNI interface pointer is the first argument to native methods. The JNI interface pointer is of type JNIEnv. The second argument differs depending on whether the native method is static or nonstatic. The second argument to a nonstatic native method is a reference to the object. The second argument to a static native method is a reference to its Java class. " Feb 01 19:16:49 tml_, OMG Feb 01 19:16:55 * db42 is dumb Feb 01 19:17:02 Finswimmer: #android-platform is another place you could ask, though we're just trying to get it going.. not many of us and just about as idle as cm-dev :p Feb 01 19:17:30 tophyr: I will try it in -dev. But generally: If I cannot get a keycode there is missing a mapping in the input driver? Feb 01 19:17:38 tml_, thanks allot for this oversight Feb 01 19:17:57 i've no idea tbh, never worked on that area. i'd go peek for you but i'm under a time crunch for this week :( Feb 01 19:18:41 tophyr: Ok. No Problem. Thank you for your help! Feb 01 19:18:49 good luck Feb 01 19:21:08 * pfn kicks Process.destroy for getting whiny in ics Feb 01 19:21:51 I'm waiting for the droid-x ICS projects to complete, then I can start kicking things. Feb 01 19:23:24 holy shit Feb 01 19:23:28 some crazy fedex guy jsut came in yelling Feb 01 19:23:36 EXCUSE ME GUYS I HAVE A PACKAGE HERE FOR YOU NO ONE IS AT THE FRONT Feb 01 19:23:49 how the fuck did he even get in the office Feb 01 19:23:59 cuz no one is at the front? Feb 01 19:24:01 and he tailgated? Feb 01 19:24:15 we're usually pretty good about not letting strangers in Feb 01 19:24:24 after that one incident... Feb 01 19:24:26 at least he didn't go virginia tech on you guys for ripping off poor indie games Feb 01 19:24:35 ;-) Feb 01 19:24:37 *sigh* Feb 01 19:24:53 what's this one incident? Feb 01 19:25:25 some crazy woman came in, started harassing the receptionist Feb 01 19:25:29 took candy off her desk Feb 01 19:25:31 started singing Feb 01 19:25:47 wow Feb 01 19:26:24 christina aguilera? Feb 01 19:26:32 sigh Feb 01 19:26:32 no Feb 01 19:26:37 you know what's annoying? Feb 01 19:26:40 when someone takes a class you wrote Feb 01 19:26:46 changes like... a constant value Feb 01 19:26:46 and has sex on it Feb 01 19:26:52 and adds an @author tag to the javadoc Feb 01 19:26:57 hah Feb 01 19:27:05 i'll remember that when it needs fixing Feb 01 19:27:08 OH WELL IT SAYS YOU WROTE IT Feb 01 19:27:08 oh it's better when they remove a comment and add @author Feb 01 19:27:32 good thing for blame/annotation tools in scm Feb 01 19:27:39 no but this is like Feb 01 19:27:42 i wrote a class in one project Feb 01 19:27:42 hm i updated firmware ob my mobile, now when i want to deploy an activity i got the error: New package not yet registered with the system. Waiting 3 seconds before next attempt. Feb 01 19:27:44 that was useful here too Feb 01 19:27:47 so they just copied the class over Feb 01 19:27:51 and changed the @author Feb 01 19:27:56 so lame Feb 01 19:30:45 im having trouble excluding large and xlarge screens, i have them set to false in manifest but the market still shows available Feb 01 19:32:17 I have a logo that needs to be iconified for my android app. I have a psd file but unfortunately I'm terrible with Photoshop. Is there somewhere I could ask for help? Guess this channel might not be the best but then again I have no other ideas where to ask. Feb 01 19:33:33 the adt doesn't seem to want to let me create a project in //android Feb 01 19:35:54 eclipse project organization is the suck Feb 01 19:36:09 indeed Feb 01 19:36:29 I hate all tools that force a particular dir structure Feb 01 19:36:47 that's why I absolutely refuse to use maven as well Feb 01 19:37:04 man you really have to get clever to compose backwards compatable resources on android :) Feb 01 19:37:11 styles, that is. Feb 01 19:38:55 i hate when people add random null checks Feb 01 19:38:58 like holy fuck Feb 01 19:39:01 it's a final field Feb 01 19:39:14 ==canadiancow Feb 01 19:39:14 it's not going to be null... Feb 01 19:39:27 :D Feb 01 19:39:30 symptom programming gets an entire chapter in my book ;) Feb 01 19:39:55 worse than the test on a final field is the random test when the stateful design of the rest of the program necessitates that a null value is illegal and must fail. Feb 01 19:39:56 if (TAG != null) Log.d(TAG, ...) Feb 01 19:40:31 for example, an NPE is observed, so a programmer goes to the line in question and adds the null test without consequence. Feb 01 19:40:44 ive seen way too many if (something == null) return; 's Feb 01 19:40:45 yea Feb 01 19:40:45 that Feb 01 19:40:52 and then later WHY ISNT THIS WORKING Feb 01 19:40:53 in my experience both here and professionally, this is overwhelmingly the common approach to problem solving. Feb 01 19:40:54 THERE'S NO ERROR Feb 01 19:41:15 I always just blame the cow when there's a problem. Feb 01 19:41:21 what is the best way to integrate ndk development / debugging into eclipse ? Feb 01 19:41:29 ugh, when you create a new android project in the adt, all you have to do is deselect 'use default location' and everything just goes to shit. i don't think they even tested this. Feb 01 19:41:42 also how to get dual debugging, both C and Java in eclipse ? (i could only do one of those at a time) Feb 01 19:42:14 I think there is doc about debugging the ndk Feb 01 19:42:36 "/Users/.../Projects/HHH overlaps the location of another project: 'HHH' Feb 01 19:42:38 bullshit Feb 01 19:43:13 trying to create new project from source when should be importing? Feb 01 19:43:20 no Feb 01 19:43:32 trying to create a new project from scratch Feb 01 19:44:37 im having trouble excluding large and xlarge screens, i have them set to false in manifest but the market still shows available Feb 01 19:45:31 * g00s wonders if the adt team ever fixed that bug preventing import of sources located within your workspace dir Feb 01 19:46:14 t0mless, dual debugging both Java and C ? Feb 01 19:46:38 Seems like I was wrong, ndk debugging comes form ndk-gdb command line Feb 01 19:46:52 no ndk debug support in eclipse Feb 01 19:47:23 actually jasta, so a big problem here is that we get null stuff in non-critical parts of the code Feb 01 19:47:42 ive started doing: if (DEBUG_MODE) { throw new NullPointerException(); } else { return; } Feb 01 19:48:05 or stuff like that Feb 01 19:48:05 O.o Feb 01 19:48:09 so it hits the devs hard Feb 01 19:48:10 haha Feb 01 19:48:17 but it doesnt impact users Feb 01 19:48:29 like if its in some "play sound" method when you score 20 points Feb 01 19:48:33 I prefer hitting users hard, they're more likely to deserve it! Feb 01 19:48:36 that's not worth blocking release Feb 01 19:49:14 that seems like a poor approach. wouldn't it be better to at least set a var to null, and let that throw the npe? then at least it's in a place where it'd be somewhat sane to check for nulls. Feb 01 19:49:42 unless you really just want to bitchslap them Feb 01 19:50:34 if (variable == null) rm -rf /; Feb 01 19:50:50 well sure tophyr, same thing Feb 01 19:51:01 but if i had written if (!DEBUG_MODE) { return; }, it wouldn't have got the point across :P Feb 01 19:51:02 t0mless, that sucks :( Feb 01 19:51:12 mikedg: lulz Feb 01 19:51:28 canadiancow|work: gotcha Feb 01 19:51:51 man i hate stupid people Feb 01 19:52:07 "are you more interested in position A in location X, or positon B in location X+20km" Feb 01 19:52:08 i hate all people Feb 01 19:52:15 how about you fucking tell me what the jobs are Feb 01 19:52:21 becuase there's more to a job than its location Feb 01 19:52:30 im seriously tempted to reply to the email with that Feb 01 19:52:51 i'm interested in the job that is closest with highest pay Feb 01 19:52:54 and least work Feb 01 19:53:07 canadiancow, fecal matter relocation engineer. Feb 01 19:53:19 pooper scooper? Feb 01 19:53:27 hehe yup Feb 01 19:53:34 anyone know how to get rid of the extra gap on the right of a CheckBox that does not have any text ? Feb 01 19:53:59 g00s is it in the image? Feb 01 19:54:31 mikedg: no, its a textview + compoundDrawable, the drawable has the button, but the textView is empty so its adding space to the right of the drawable Feb 01 19:54:56 do i really have to make my own fucking imagebutton Feb 01 19:54:57 if i wanna install a new rom on my phone.. how do i do it? wipe clean relock bootloader or wtf do i do? Feb 01 19:55:32 does this help http://stackoverflow.com/questions/6358797/how-to-remove-unwanted-spaces-at-the-right-of-checkbox Feb 01 19:56:22 mikedg: hm, already using a relative layout with no effect Feb 01 19:56:35 yeah what they said made no sense to me Feb 01 19:56:37 but eh Feb 01 19:56:45 thanks though Feb 01 19:58:41 FUCK Feb 01 19:58:46 i reply to the recruiters email Feb 01 19:58:49 after ignoring her two voicemials Feb 01 19:58:51 within 2 minutes Feb 01 19:58:54 i get a phone call Feb 01 19:59:05 if i could (or wanted to) have a phone convo, i would have answered this morning Feb 01 20:01:55 fucking recruiters Feb 01 20:02:11 they always have things that "would be perfect for me!" Feb 01 20:02:16 but never pans out Feb 01 20:02:30 I just stopped responding to them on linked in Feb 01 20:03:10 is there a way to register a content observer to watch for changes to the call logs table for a particular number? Feb 01 20:03:57 ive got it almost working but it watches for changes to the entire call_log table Feb 01 20:04:51 is it possible to convert /data from vfat to ext3? Feb 01 20:05:11 t0mless: I don't think you've realized this yet, but recruiters are just a specialized subset of salespeople Feb 01 20:05:23 oh I've realized Feb 01 20:05:23 hello all =) Feb 01 20:05:27 but they're a bunch of asshats Feb 01 20:07:57 anyone using and engine has experiance with conection detection, i need to determin if a object is coliding on the left or right side. Feb 01 20:08:55 is the filesystem vfat, mount shows the following /dev/st11 /data rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0 Feb 01 20:10:15 testt: no, it's rfs Feb 01 20:10:18 aka retarded file system Feb 01 20:10:20 gl w/ that Feb 01 20:10:27 enjoy your samsung phone Feb 01 20:10:47 ^_^ Feb 01 20:10:58 testt: that's vfat with extensions, ergo retarded Feb 01 20:11:14 and yes, if your kernel supports it, it will happily run ext2 or ext4 Feb 01 20:11:31 i am unable to exec cgi scripts in this /data Feb 01 20:11:42 ... cgi? srsly? Feb 01 20:11:44 even if i put chmod 777 on the scripts Feb 01 20:11:59 .... Feb 01 20:12:03 >_< Feb 01 20:12:04 just Feb 01 20:12:05 just stop. Feb 01 20:12:06 so they want a "mobile" developer experienced in ios, android, windows phone, bb Feb 01 20:12:10 i said "im only interested inandroid" Feb 01 20:12:15 reply: it is android! Feb 01 20:12:32 there is no way to make it ext3 Feb 01 20:12:33 canadiancow|work: nice Feb 01 20:12:54 testt: yes, there is, it starts with having root and custom recovery Feb 01 20:13:19 it ends with your phone breaking because you don't actually know what you're doing Feb 01 20:15:32 if she rpelies one more time, im going to start ignoring her Feb 01 20:15:39 and i will forward her phone number to like... toronto police Feb 01 20:15:40 or something Feb 01 20:22:18 JakeWharton does ABS support ActionProviders? Feb 01 20:25:00 recruiter: "No way someone will do all three [platforms]. Feb 01 20:25:14 gee, becuase ive NEVER worked at a company where one person did multiple platforms... Feb 01 20:25:28 lol Feb 01 20:25:47 I'd totally learn ObjC and iOS if a company paid for the 99$/year dev license Feb 01 20:26:04 meh, 99$/year is easy Feb 01 20:26:06 o.O Feb 01 20:26:12 getting time to develop applications for multiple platforms is annoying Feb 01 20:26:18 that ^ Feb 01 20:26:26 for me "getting powerful enough Mac" is also a part of it ;) Feb 01 20:26:32 that too Feb 01 20:26:41 macfail :( Feb 01 20:26:44 i hate mac Feb 01 20:26:45 p_l, I just run it in VMWare on my workstation Feb 01 20:26:46 *hate* Feb 01 20:26:58 I cannot afford 99$/yr to be honest Feb 01 20:27:01 it works pretty well Feb 01 20:27:41 Mavrik: well, I don't have a machine with virtualisation support :/ Feb 01 20:27:47 ah Feb 01 20:28:11 I threw like 700€ into a new system for development half a year ago so now I don't swear over slow software :) Feb 01 20:28:14 $99/yr isn't expensive really, it's not hard to sell 99 $1 applications in a year Feb 01 20:28:51 ive never directly made any money off an android app Feb 01 20:28:56 considering the iOS developer demand around here, you could probably get paid more for developing apps for companies Feb 01 20:28:57 so i still havent directly recovered my $25 Feb 01 20:28:59 nor i Feb 01 20:29:06 Just to confirm - services of an app share the same context - even remote ones? Feb 01 20:29:08 duh Feb 01 20:29:09 canadiancow|work, that's because you don't publish your own apps for pay... Feb 01 20:29:10 poor canadiancow Feb 01 20:29:17 vadi2, no Feb 01 20:29:23 but ive indirectly made more than $25 from an app :) Feb 01 20:29:24 most of the good money is on consulting.. or day jobs right now Feb 01 20:29:25 canadiancow|work, well, did you get paid by a company to develop the apps? :) Feb 01 20:29:30 no Feb 01 20:29:31 How could I get access to my apps resources in a remote service? Feb 01 20:29:34 not my personal apps Feb 01 20:29:37 vadi2, they share the same resources and stuff, and same ApplicationContext, but not the same 'Context' Feb 01 20:30:00 plenty of places out on the east cost paying 100-130K for developers.. Feb 01 20:30:01 Hm... getResources() is throwing my a nullpointer Feb 01 20:30:16 vadi2, doing it wrong is a different matter Feb 01 20:30:22 TheBunny: who? :) Feb 01 20:30:27 * p_l can't really take a day job, being a student Feb 01 20:30:35 I'm not seeing a difference, how could I be messing it up? Feb 01 20:30:41 military consulting firms, game companies etc Feb 01 20:30:41 I thought you were old, p_l Feb 01 20:30:52 my free apps brought me alot of cash with lectures/other apps I've gotten offers Feb 01 20:30:59 without them noone would know I can do Android :) Feb 01 20:31:07 Mavrik, what are your free apps? Feb 01 20:31:16 pfn, some local market service apps Feb 01 20:31:18 SimonVT: I feel old, and compared to some students am old Feb 01 20:31:21 * pfn needs interesting app ideas Feb 01 20:31:22 pfn, not english :) Feb 01 20:31:22 * p_l is 24 Feb 01 20:31:37 I need to hax0r keepassdroid so that I can use a swipe to unlock the db Feb 01 20:31:46 Heh, depends what you study :p Feb 01 20:31:46 instead of having to type out my ridiculously long password on a soft keyboard Feb 01 20:31:49 ugh Feb 01 20:32:03 when I finish my degree, I'll be 26 Feb 01 20:32:13 nothing new there Feb 01 20:32:19 swipe -> convert to 4-9 digit pin + salt => pbkdf2 -> encrypt master password Feb 01 20:32:23 I'm finishing my degree as well and I'm 25, so that's normal :) Feb 01 20:32:31 http://stackoverflow.com/questions/9102871/android-how-to-force-left-justified-items-to-wrap-rather-than-right-justified-i Feb 01 20:32:33 Mavrik, I see Feb 01 20:32:37 I feel old compared to guys who got out with BSci at @21 :P Feb 01 20:32:40 If all goes well, I'll be 24.. Which I am now.. just another 5 months :) Feb 01 20:32:59 24, 21, 25, all so young Feb 01 20:33:00 :p Feb 01 20:33:04 ^_^ Feb 01 20:33:10 how do you guys handle the async nature of startActivity()? if a user is fast/"lucky" enough, they can hit one of my buttons that starts an activity a second time, before it disappears Feb 01 20:33:15 Young people, with their IDEs and whatnot Feb 01 20:33:16 I think my classmate got out with degree... at 20? Feb 01 20:33:19 Back in the day.. Feb 01 20:33:21 resulting in two calls to startActivity().. resulting in confusion. Feb 01 20:33:52 pfn, yeah, it's wierd... I'm on this 5 year CS masters program Feb 01 20:33:56 SimonVT: I feel older because of some uncommon experiences... at the same time I don't really feel like my years (more like I was still 16...) Feb 01 20:34:06 tophyr, finish as soon as you startActivity, or set a flag on button press that debounces Feb 01 20:34:08 and half of my ex-highschool mates got their BSci diplomas like two years ago Feb 01 20:34:09 :P Feb 01 20:34:13 Mavrik, that's not bad Feb 01 20:34:14 tophyr: dont start a second activity Feb 01 20:34:15 most people around here don't have experience being homeless :D Feb 01 20:34:32 p_l: lawl :p Feb 01 20:34:36 tophyr, debounce, then reset the flag in onResume Feb 01 20:34:48 Mavrik: I've got a "Honours" degree, which basically Masters without dissertation Feb 01 20:34:54 mikedg: thank you lol, that's very helpful ;) "hey, X doesn't work" "well, don't do X" lol Feb 01 20:34:55 ( moonlightcheese ): Tablet layout. Feb 01 20:35:04 pfn: that's what we're doing in some situations, it just seems "hack-y" Feb 01 20:35:36 Everything I'm seeing is revolving around passing the main activity's context - but that wouldn't work when the service is started at boot. Feb 01 20:35:39 tophyr, respond faster so that startActivity doesn't get called twice :p Feb 01 20:35:39 move the button after the user clicks it Feb 01 20:35:44 to a random location Feb 01 20:35:51 tophyr: you have too much going on in your onCreate, it's too close Feb 01 20:35:53 vadi2, the service is its own context and has access to resources just fine Feb 01 20:35:53 so they cant click it quick Feb 01 20:35:55 haha that's even better Feb 01 20:35:55 tophyr: your activity has to open quicker then the user won't have time for a second button press Feb 01 20:36:01 *fast Feb 01 20:36:18 vadi2, a case of doing it wrong Feb 01 20:36:22 vadi2, in your instance Feb 01 20:36:33 vadi2, since you neglect to tell us what you're doing, we can't tell you what you're doing wrong Feb 01 20:36:56 pfn, brute force customer support. Start listing all the things he could be doing wrong Feb 01 20:36:58 pfn: Getting an NPE at android.content.ContextWrapper.getResources(ContextWrapper.java:80) though. Just calling getResources() in a class of the same package, hence same app Feb 01 20:36:59 MrChyizPyiz: that's ultimately not a definitive fix though. the root problem is a race condition, and that's simply trying to make the new activity win the race Feb 01 20:37:17 vadi2, provide a full stack trace and some context lines of code Feb 01 20:37:22 Alright Feb 01 20:37:31 getting an "NPE" is not telling us what you're doing Feb 01 20:37:54 tophyr: move stuff into onStart and onResume Feb 01 20:38:06 or for fragment onActivityCreated Feb 01 20:38:18 tophyr: Move everything into a single Activity and just setContentView for each screen !!11 Feb 01 20:38:34 SimonVT: SUCCESS Feb 01 20:38:34 onCreate needs to be relatively quick Feb 01 20:39:50 MrChyizPyiz: you didn't catch my point.. it is in theory possible to have a completely empty onCreate, and still trigger this. the activity manager could be backed up, you could be on a slow device, or some other reason.. speeding up onCreate is just making one competitor in a race condition faster. it doesn't solve the race condition Feb 01 20:40:10 so what's the result of startactivity happening twice? Feb 01 20:40:17 Here it is - http://pastebin.com/HgywGsB8 Feb 01 20:40:27 you just get two activities. not the end of the world, just confusing. Feb 01 20:40:49 pfn, tophyr: single top flag will handle all this Feb 01 20:40:50 pfn, wanna bet he's doing private Resources mResources = getResources() ? Feb 01 20:41:06 i was mainly wondering if there was a more elegant solution than the one we've got, which is blocking button presses anytime between a button press and onResume Feb 01 20:41:09 SimonVT, close Feb 01 20:41:22 vadi2, doing it too early, onCreate is the earliest you'll have access to resources Feb 01 20:41:31 vadi2, you can't do stuff in the constructor Feb 01 20:41:44 they can press it multiple times and single top will just ignore the successive presses Feb 01 20:42:04 tophyr: Never had that happen :o Seems... strange that it's possible Feb 01 20:42:06 vadi2, and why are you repeating R.java Feb 01 20:42:27 aha Feb 01 20:42:27 thanks Feb 01 20:42:53 Was just trying to work out a problem for that, I'll take it out Feb 01 20:43:05 SimonVT: i can't really think of a way around it being able to happen, with an rpc-based activity manager like android uses. just one of the quirks. Feb 01 20:43:13 is there a way to move a project from 3.2 to 4? in the preferences or something? Feb 01 20:43:40 roger_padactor: right-click on the proj in eclipse, go to properties, android, choose the new target Feb 01 20:44:15 alternately, edit project.properties and set target=android-14 Feb 01 20:44:20 thanks Feb 01 20:45:39 tophyr: I guess Feb 01 20:48:23 Have any of you ever used proguard retrace with android? Feb 01 20:48:29 It doesnt seem to work.. Feb 01 20:49:17 I put the android log output into the tool, and all it does is spit the same lines back out without any changes Feb 01 20:50:20 Cpudan80 i did have a problem once Feb 01 20:50:27 but i know igot it working Feb 01 20:50:31 retrace -verbose mapping.txt stacktrace.txt Feb 01 20:50:34 don't you have to also supply something else to the tool, the progaurd conf or something Feb 01 20:50:37 mapping Feb 01 20:50:37 no Feb 01 20:50:38 that's it Feb 01 20:50:42 well yea ht emapping Feb 01 20:51:51 I have the mapping Feb 01 20:51:57 http://stackoverflow.com/questions/6264408/proguard-retrace-isnt-mapping-the-stack-trace-to-the-actual-source Feb 01 20:52:00 Seems to be similar to that Feb 01 20:52:15 What a pain in the ass - the tool should work with android logs Feb 01 20:52:25 oh Feb 01 20:52:26 yea Feb 01 20:52:27 that was it Feb 01 20:52:27 :P Feb 01 20:52:52 Eh.. no it shouldn't :p Feb 01 20:53:01 ? Feb 01 20:53:09 It isn't something magic the android team came up with Feb 01 20:53:23 it's distributed through the android sdk tools Feb 01 20:53:26 Would you consider it unwise (from a UX perspective) to change the action buttons in the action bar depending on view page is shown in a ViewPager? Feb 01 20:53:59 pakerfeldt: no Feb 01 20:54:21 it's distributed with the sdk tools, but it wasn't made by them Feb 01 20:54:41 SimonVT: It most certainly should. The android team should have wrapped it or done something to it to make it work Feb 01 20:54:47 yea Feb 01 20:54:58 canadiancow|work: so how did you fix it -- I cleaned up the log output and still nothing Feb 01 20:55:01 they probably could make their own tool that uses progaurd tool Feb 01 20:55:07 they should have knit us all sweaters too Feb 01 20:55:13 Cpudan80, i cleaned it up and it worked? :P Feb 01 20:55:20 hrm.. Feb 01 20:55:24 Well still no go over here Feb 01 20:55:36 you on windoze? Feb 01 20:55:41 02-01 15:54:59.624: W/System.err(6374): at org.andengine.opengl.view.EngineRenderer.onSurfaceCreated(EngineRenderer.java:59) Feb 01 20:55:43 -> org.andengine.opengl.view.EngineRenderer.onSurfaceCreated(EngineRenderer.java:59) Feb 01 20:55:52 im on windows Feb 01 20:56:05 thought it might not like the windows carrage returns Feb 01 20:56:28 t0mless: yes, windows .... I need linux carriage returns? Feb 01 20:56:35 dont think so Feb 01 20:56:42 I think you just need to take the "at" out Feb 01 20:56:51 lol @ "linux carriage returns" Feb 01 20:56:54 and everything to the left of it Feb 01 20:57:00 lol abaratican Feb 01 20:57:03 linux newlines are what you mean, and they happen to be line feeds. Feb 01 20:57:13 windows are lf+cr Feb 01 20:57:15 I'm assuming he got the w/system.err etc logcat stuff when he said he "cleaned it up" Feb 01 20:57:17 t0mless: the at ? Feb 01 20:57:24 canadiancow|work: other order actually Feb 01 20:57:38 .:12:55:57:. ( canadiancow|work ) 02-01 15:54:59.624: W/System.err(6374): at org.andengine.opengl.view.EngineRenderer.onSurfaceCreated(EngineRenderer.java:59) Feb 01 20:57:38 .:12:55:59:. ( canadiancow|work ) -> org.andengine.opengl.view.EngineRenderer.onSurfaceCreated(EngineRenderer.java:59) Feb 01 20:57:45 oh Feb 01 20:57:46 that Feb 01 20:57:47 hrm Feb 01 20:57:50 t0mless: no ;/ Feb 01 20:57:53 whatevs abaratican :P Feb 01 20:58:14 At least I never have Feb 01 20:59:04 Is this a good idea or bad idea: Find out the size of an inner view, find out the size of the whole canvas, iterate through all views in the inner view, size it up by a factor that makes it as wide & tall as the canvas, scale of textSize shadowRadius all of that stuff in order to just magically SCALE UP a whole view Feb 01 20:59:11 i've never actually used progaurd so I'm just throwing ideas out :p Feb 01 20:59:13 t0mless: no that didn't work Feb 01 21:00:01 a friend of mine works at FB Feb 01 21:00:07 and he posted something on his wall Feb 01 21:00:11 it linked to a yahoo news article Feb 01 21:00:13 and i clicked it Feb 01 21:00:19 and got rick rolled? Feb 01 21:00:20 and it wanted me to add some stupid yahoo app Feb 01 21:00:29 so i commented on his post about how stupid facebook is for that shit Feb 01 21:00:34 then remembered where he works Feb 01 21:00:41 lol Feb 01 21:01:07 it wanted you to add the yahoo app Feb 01 21:01:10 how is fb stupid for that? Feb 01 21:01:15 it's yahoo that's asking you to install the app... Feb 01 21:03:43 * pfn just doesn't obfuscate when using proguard Feb 01 21:04:05 can't really read scala code decompiled anyway ;-) not easily at least Feb 01 21:04:57 how strict is the android market/google about apps with similar/same names... for instance if there were 2 apps called "pie chart tool" would only one be allowed? i am always a bit paranoid when choosing names for anything... just wondering how strict the android market/google is so i can adjust my paranoia level accordingly Feb 01 21:05:48 devtekbeta, as long as it's not a trademark,copyright, servicemark, etc. you're safe Feb 01 21:06:13 i know i can make my name a bit different like some people do by putting something random like "flying dolphin pie chart" but i prefer logical names Feb 01 21:06:15 cool. thanks Feb 01 21:07:02 oh and can 2 apps have the same name? from different developers Feb 01 21:07:14 devtekbeta, yes, but you're really asking for confusion Feb 01 21:07:22 When I scroll up in logcat, it periodically scrolls back down to the bottom for seemingly no reason. anyone else experience this or have an alternative to logcat or fix? Feb 01 21:07:29 yeh. was just curious Feb 01 21:07:46 Could anyone explain to me the benefit of assigning strings in XML through the strings file? Feb 01 21:07:53 devtekbeta: Only thing that HAS to be unique is the package name Feb 01 21:08:09 zerkz: localization through resource qualifiers Feb 01 21:08:41 zerkz, localization Feb 01 21:08:42 still a CS noob. what benefit does localization have? Feb 01 21:08:48 zerkz: so that "hello world" can be displayed as "gershlocken flocken" when a user from zerkistan runs it Feb 01 21:08:57 ah, I see. Feb 01 21:09:07 zerkz: it means you can more easily translate your app to another (spoken) language, like Spanish Feb 01 21:09:22 zerkz: also if you use a string in lots of places and want to change it, storing it in the xml file means you only need to change it once Feb 01 21:10:03 hello, anyone knows what I do wrong when I do git clone https://android.googlesource.com/kernel/samsung.git and just get a .pack file ?? where do i find the actual source ??? Feb 01 21:12:21 zerkz, localization isn't really a CS problem Feb 01 21:12:45 ( Pinas ): why not just goto samsung's site and get it? Feb 01 21:12:50 it's a software engineering problem Feb 01 21:12:51 opensource.samsung.com Feb 01 21:17:09 has anyone implemented both backup/restore functionality for an sqlitedb ? its easy to export it :) how to implement the import ? Feb 01 21:17:23 or restore, i should say Feb 01 21:17:52 t0mless - because i can't finde it on the samsung site Feb 01 21:18:38 g00s, backupagent does all of that Feb 01 21:18:46 g00s, just export the entire db and import the entire db sounds like the easy approach Feb 01 21:18:57 g00s, then let your sqliteopenhelper handle upgrades if you have version diffs Feb 01 21:18:59 i don't think its that easy :/ Feb 01 21:19:11 g00s, you just use the file backup object Feb 01 21:19:14 and backup the entire db file Feb 01 21:19:23 i thought that was discouraged Feb 01 21:19:33 (from the docs) Feb 01 21:19:39 damn it Feb 01 21:19:41 didn't seem to be when I read it Feb 01 21:20:03 say there was a trademark of "U Like" would an app name called "U Like Games" be considered an infringement of that trademark? Feb 01 21:20:15 devtekbeta, yes Feb 01 21:20:37 devtekbeta, try naming any of your apps with Apple or iPod or iPhone or iTunes in them Feb 01 21:21:01 every name i think of theres a website or company with the same name Feb 01 21:21:06 pfn: Apple Pie Recipes? Feb 01 21:21:28 Amphoras, that might be a legitimate exception Feb 01 21:21:29 (actually they would probably still sue) Feb 01 21:21:45 there are some funky rules around apple and windows as they are common words Feb 01 21:21:56 hmmmm Feb 01 21:22:21 ill only feel safe if i name my apps like "G378hf75jg" Feb 01 21:22:33 devtekbeta: i think it can depend on whether the names could be confused Feb 01 21:22:37 as well Feb 01 21:22:40 i see Feb 01 21:22:46 devtekbeta, there's also area of presence when you're talking about trademarks Feb 01 21:23:08 industry-reach, or whatever Feb 01 21:23:13 so basically, unless you intentionally try to confuse customers by exploiting another company's name... you should be ok? Feb 01 21:23:51 like if you used a name similar to a paper making company for a video game company it wouldnt be the same as using a name similar to a software company for example Feb 01 21:23:53 basically: ask a lawyer, not a bunch of developers on IRC Feb 01 21:23:57 devtekbeta, mostly, as long as the other name is in a completely unrelated industry Feb 01 21:24:09 oh i see Feb 01 21:24:25 e.g. rockstar games and rockstar the drink are unrelated Feb 01 21:24:42 are apps in the same industry as electronics? they are both tech Feb 01 21:25:03 probably depends on what the app does Feb 01 21:25:15 ahh Feb 01 21:25:24 if the electronics can be remotely related to computers, then they're the same industry Feb 01 21:25:53 if they could argue that you are using their name to pull customers/users then you should pick something different Feb 01 21:26:19 im not worried about being sued... more worried about google pulling my app from the market Feb 01 21:26:27 rename and re-publish Feb 01 21:26:35 assuming it's pulled for naming reasons Feb 01 21:26:53 does google allow that? Feb 01 21:27:17 if you fix whatever broke the rules then you can reupload it yes Feb 01 21:27:24 cool Feb 01 21:27:32 so if it was just the name and you change it then it should be ok Feb 01 21:27:59 my paranoia level is decreasing Feb 01 21:28:02 :) Feb 01 21:31:04 * Amphoras facepalm Feb 01 21:31:34 just thought of a very stupid hole i left in the password system on my app Feb 01 21:31:38 hello everyone! Feb 01 21:32:00 Amphoras: that sounds like an app that should be fairly secure Feb 01 21:32:12 it doesnt ask for your current password when you try to change the password... Feb 01 21:32:18 I am new to Android programming and I have a very basic question regarding creating a View Feb 01 21:32:18 hahahahahahha Feb 01 21:32:41 ask away Feb 01 21:32:43 good thing I didn't publish it yet Feb 01 21:32:59 yeh.... Feb 01 21:33:05 Amphoras: ouch. least you caught it now. Feb 01 21:33:13 I have a bunch of view that I want to put together as a single view: a Spinner + an EditText + an ImageView + a ListView Feb 01 21:34:02 I want to use this one in multiple places, so I created an XML layout and I would like to create a class like: MyView that displays this layout Feb 01 21:34:05 shibakaneki: well, the basic answer is to use layouts and creat a view hierarchy Feb 01 21:34:20 shibakaneki: you can also use , as an alternative. Feb 01 21:34:28 depends on whether you truly want a compound control or not Feb 01 21:35:10 for a compound control, one strong pattern is to inflate the child layout in the constructor of the view and then in onFinishInflate(), finish up some of your binding Feb 01 21:35:12 ok, I think I understand, but my ListView has a custom Adapter with some logic behind. I would like to embed all this logic code as well in 'MyView' Feb 01 21:35:36 then you would inflate it as Feb 01 21:36:06 ok, so : create a layout , then create a class and inflate it Feb 01 21:36:26 you should be able to find examples of this around. I bet the samples even has some. Feb 01 21:37:07 I am sure that examples are available, my problem is that I'm still new to the terminology and I don't know which word to look for ^^' Feb 01 21:37:37 so, this kind of thing is called compound control? Feb 01 21:38:15 mac os x 10.7.3 is out Feb 01 21:38:33 what does that add Feb 01 21:38:34 copy/paste? Feb 01 21:39:01 :P Feb 01 21:39:20 you laugh, but... Feb 01 21:39:31 security fixes at least Feb 01 21:39:45 i'm still on 10.6.8. got security updates too Feb 01 21:40:11 I will look at the Compound Control documentation then, thank you for the information! Feb 01 21:40:11 is it more shiny? Feb 01 21:40:31 har har Feb 01 21:40:39 canadiancow|work: They found out swiping sideways is much more intuitive for scrolling up and down on webpages Feb 01 21:41:38 o.O Feb 01 21:41:38 does anyone know if there is a way to store data such as a password even if the app data is wiped from the settings menu? Feb 01 21:41:40 * g00s is about to release his app to the market but is vewy vewy nervous Feb 01 21:42:22 let the scrutiny begin Feb 01 21:44:17 hello there, i get this error trying to do anithing with adb command: - exec '/system/bin/sh' failed: Exec format error (8) Feb 01 21:45:04 ... somehow you got incorrect binary there? Feb 01 21:46:29 p_l, i guess sh was moved to sh_bak Feb 01 21:47:12 Amphoras: you could use backup/restore Feb 01 21:47:24 Amphoras: or you could encrypt it and store it on external storage Feb 01 21:47:34 Amphoras: or tell the user to not do that Feb 01 21:47:52 mankeletor: you have /system/bin/sh that isn't an executable binary for your arch Feb 01 21:48:03 ... somehow I don't think that will boot again :D Feb 01 21:48:30 evancharlton: thanks. the app needs root access so I might try and write it to the system partition Feb 01 21:48:41 then its still there if they remove the sdcard Feb 01 21:50:12 p_l, there is something that i can do to repair it? the phone dont have a file manager and no term emulator instaled. Feb 01 21:50:45 mankeletor: can you still do adb push? Feb 01 21:50:56 and is the fs mounted read-write? Feb 01 21:51:05 i learned today how to modify the items in a listview/gallery while scrolling Feb 01 21:51:19 while scrolling? Feb 01 21:51:50 while a swipe gesture is going on Feb 01 21:52:40 i did not previously know this was possible Feb 01 21:52:44 and it's a bit of a hack Feb 01 21:53:50 hi Feb 01 21:54:14 p_l, oops Read-only file system :( Feb 01 21:57:15 mankeletor: ... I wonder how it got broken Feb 01 22:02:42 p_l, app2sd.sh :( Feb 01 22:03:26 mankeletor: well... I sure hope you got custom recovery there Feb 01 22:04:06 just uploaded my first app to the developer console, but it tells me that my application is available for more than 0 devices.. am I doing anything wrong? only permission is Camera, used functions are: camera, camera.autofocus, touchscreen, screen.portrait. api 1-16+ (initial 14-16, tried 1 now to check if it matters), screen-sizes normal-xlarge Feb 01 22:04:23 can someone tell me how to find the kernel for a european samsung nexus s (Android 4.0.3) on this site ??? opensource.samsung.com ?? Feb 01 22:04:47 p_l, exactly with this line in that script: mv /system/bin/sh /system/bin/sh_bak Feb 01 22:05:15 Pinas: youd have to compile it yourself Feb 01 22:05:44 Cpudan80 - i want to do this, but where do i get the source ??? Feb 01 22:05:59 Pinas: It's under Mobile --> Mobile Phones Feb 01 22:06:09 mankeletor: welp, I can't help you there - you'll have to boot into recovery, connect to it with adb shell, and copy sh_bak to sh Feb 01 22:06:34 Cpudan80 - yes i got this far, but which one do i need for my phone ??? Feb 01 22:12:58 look up the model# of your phone Feb 01 22:13:03 normally under the battery pack Feb 01 22:13:37 p_l, that's the problem, adb shell don't works causes this error: exec '/system/bin/sh' failed: Exec format error (8) Feb 01 22:14:00 *i mean doesnt work Feb 01 22:15:44 Pinas looks like it might be GT-I9020T Feb 01 22:17:37 t0mless - i'll have a try thx Feb 01 22:17:58 looks like it hasn't been released yet, just announced Feb 01 22:18:04 the source that is Feb 01 22:18:29 but double check what your model# is Feb 01 22:19:12 mankeletor: if you have any serious aftermarket *recovery*, it will have it's own copy of busybox Feb 01 22:19:26 mankeletor: mind you, boot into *recovery*, not normal OS Feb 01 22:19:40 t0mless the phone says Baseband version I9023 Feb 01 22:19:57 otherwise it's using whatever tool your phone's manufacter has for flashing the OS Feb 01 22:21:28 Pinas there is no i9023, unless it's not a GT- Feb 01 22:21:39 i9023 is nexus s Feb 01 22:21:48 tmobile one iirc Feb 01 22:21:59 he's saying europe Feb 01 22:22:00 p_l, the phone is *unflasheable* at this momment by unknown reason (maybe because of the broken /system/bin/sh) Feb 01 22:22:11 is it sch or sgh? or gt-? Feb 01 22:22:29 eww, its the S-LCD model of nexus s Feb 01 22:22:49 GT-I9023 Feb 01 22:23:05 yea, the opensource.samsung.com site only has GT-I9020 Feb 01 22:26:09 and even then that is an announcement only Feb 01 22:26:28 p_l, so i afraid i fucked the phone :( Feb 01 22:33:01 adb wifi + usb mouse on phone = sex Feb 01 22:33:36 I keep forgetting about adb wifi Feb 01 22:33:45 I did that with my tablet a few times Feb 01 22:34:23 is it any good Feb 01 22:34:38 yea Feb 01 22:34:47 as long as wifi stays on, it stays connected Feb 01 22:34:51 its awesome for some things Feb 01 22:34:59 uh, i just hit the publich button on the developer console, which put me back to the home screen in the concole, but it says under "all android market listings" "no applications uploaded" Feb 01 22:35:01 like that thing that lets you mirror your desktop screen on a device Feb 01 22:35:03 so you can pass it around Feb 01 22:35:18 holy fuck Feb 01 22:35:30 so i can debug on my phone without needing to plug it in? Feb 01 22:35:34 yes Feb 01 22:35:40 mirror your desktop screen on device? Feb 01 22:35:41 but set wifi to never sleep Feb 01 22:35:42 interesting Feb 01 22:35:42 with adb? Feb 01 22:35:50 t0mless it uses adb, ubt its a separate app Feb 01 22:35:55 one of the googlers made it Feb 01 22:36:10 http://code.google.com/p/android-ui-utils/ Feb 01 22:36:13 android design preview Feb 01 22:37:01 tits. Feb 01 22:37:08 tits are nice Feb 01 22:38:58 mankeletor: what phone, what ROM, did you install custom recovery... Feb 01 22:39:45 bah Feb 01 22:39:48 it won't connect Feb 01 22:40:10 g00s, reload the home screen Feb 01 22:40:18 sounds like a cache issue on your browser Feb 01 22:42:54 p_l, the phoe is a sony ericsson x10 mini (e10a) Feb 01 22:46:55 there we go, got the tablet to connect on wifi Feb 01 22:47:15 pfn: pm ? Feb 01 22:47:18 I'm working with an image view and a translate animation. Unfortunately, instead of the entire image being shown through the translation, it is being cut off. Is there a way to have it translate and also be completely visible? Feb 01 22:47:44 mankeletor: did you install any rom, or did you just root it? Feb 01 22:47:46 t0mless, v4 does Feb 01 22:47:52 (action providers) Feb 01 22:47:57 back to 2.x? Feb 01 22:48:16 yep Feb 01 22:48:23 awesome Feb 01 22:48:27 provided whatever implements it works back to 2.x as well Feb 01 22:48:39 that's still in beta though right? Feb 01 22:48:40 people assume things like SearchView will be there out of the box (which it won't) Feb 01 22:48:40 why does apache http commons seem so slow compared to a web browser? Feb 01 22:48:45 yeah Feb 01 22:48:49 and it's hella-broken right now Feb 01 22:48:52 trying to remedy that tonight Feb 01 22:48:55 lol Feb 01 22:49:06 I might end up using that then Feb 01 22:49:08 when it's stable Feb 01 22:49:23 but for now I'll just use a sub menu that pops up another menu that I build dynamically Feb 01 22:49:32 hopefully it's not too far off Feb 01 22:49:46 i have a lot of free time now Feb 01 22:49:59 o rly? Feb 01 22:50:03 Get fired? ;) Feb 01 22:50:17 turned in my resignation today Feb 01 22:50:23 still working until the end of the month though Feb 01 22:50:26 Snap Feb 01 22:50:35 don't really work hard when you know you're leaving Feb 01 22:50:53 got a new dig lined up? Feb 01 22:50:58 I have to educate the other two guys on all the crap only I know Feb 01 22:51:06 I do, moving to SFO to work at Square Feb 01 22:51:14 Nice Feb 01 22:51:25 p_l: both Feb 01 22:51:39 didn't even know Square had an office in SF Feb 01 22:52:20 I actually try to avoid SF if I can I would never want to live there Feb 01 22:52:24 JakeWharton: sounds like you did a good job at your last company, and seemed liked you really cared about things - i'm sure they will miss a good employee Feb 01 22:52:55 mankeletor: then you did install a custom recovery, right? Feb 01 22:53:11 yeah I really like the place I'm at now. awesome work environment for sure Feb 01 22:53:31 I'll miss it a little, but being able to move into the mobile space is going to be sweet Feb 01 22:53:33 * p_l at this rate should start requesting payments -_-; Feb 01 22:53:57 you going to be working on android stuff at square? Feb 01 22:54:03 yeah Feb 01 22:54:13 which is kind of scary since i've only ever done this as a hobby Feb 01 22:55:33 You know your shit though Feb 01 22:55:44 so you'll do pretty well Feb 01 22:56:14 You'll have to live around a shit load of Sharks fans though Feb 01 22:56:40 I know Feb 01 22:56:47 Would be cool to have Sharks v Pens in the finals though :) Feb 01 22:57:09 but JakeWharton, you were the closest android dev on latitude :( Feb 01 22:57:14 now it's going to be mikedg :( Feb 01 22:57:20 ew Feb 01 22:57:24 canadiancow|work: you're fucked now Feb 01 22:57:25 that's reason enough not to go right there Feb 01 22:57:29 <3 Feb 01 22:57:31 haha Feb 01 22:58:03 both my gf and me have family in the bay area, so we're down there a lot Feb 01 22:58:26 I used to live there... until I couldn't pay rent and had to move back home Feb 01 22:58:32 protip: if in the bay area, check out Noisebridge Feb 01 22:59:06 If my app is to load an image (from the gallery) into the app. Should I copy the image or refer to it where it already exist? (I've never done anything like this before) Feb 01 22:59:20 pakerfeldt: yes. Feb 01 22:59:36 XMPPwocky: yes, as in? Feb 01 22:59:46 copy that floppy Feb 01 23:00:17 JakeWharton: alrighty Feb 01 23:00:31 there is a SF Android Users group too... on like meetup.com or something like that holds workshops Feb 01 23:00:50 I won an oriley android book from a talk romainguy did through them Feb 01 23:01:28 but seriously, noisebridge is awesome Feb 01 23:01:34 #noisebridge on this very network Feb 01 23:01:36 yea, it looks awesome Feb 01 23:02:43 just read that you're moving to SF, JakeWharton, congrats! Feb 01 23:03:09 i live/work in SF, if you want to know any Android devs here :P Feb 01 23:03:12 thanks! going to be a crazy chaotic couple of weeks but i'm pumped Feb 01 23:03:39 haha it's cool. SF is awesome Feb 01 23:03:46 I hope you either don't have a car or are a crazy fuckin' driver Feb 01 23:03:59 that way you'll fit right in :) Feb 01 23:04:08 what? SF isn't bad for driving. have you been to LA? Feb 01 23:04:16 haha, yea Feb 01 23:04:25 SF is still pretty bad compared to the rest of the bay area Feb 01 23:04:26 that, is crazy ass driving Feb 01 23:04:36 ass driving? Feb 01 23:04:43 JakeWharton: what brings you to SF? Feb 01 23:04:44 i'm selling my car. so I won't have one (at least initially) Feb 01 23:04:47 t0mless: that's what BART and MUNI's for Feb 01 23:04:53 pakerfeldt, job at Square Feb 01 23:05:09 moving to sf to work at square Feb 01 23:05:10 nice Feb 01 23:05:13 JakeWharton: congrats, I guess! Feb 01 23:05:22 what else is square gonna do on their path to mobile payments domination Feb 01 23:05:26 Yea, and both use clipperCard and you can get free muni transfer from riding bart Feb 01 23:05:32 JakeWharton: whatever you do, don't live in SOMA Feb 01 23:05:45 soma is great Feb 01 23:05:46 just expensive Feb 01 23:05:48 pakerfeldt, thanks :) Feb 01 23:06:00 and if you live in SF, driving is not an issue Feb 01 23:06:04 as long as you live somewhere central in SF Feb 01 23:06:13 soma and downtown are ideal if you're gonna be working in SF Feb 01 23:06:16 JakeWharton: say hi to Bob Lee for me :)) Feb 01 23:06:17 meh, SOMA is overhyped. it's dead past 6p Feb 01 23:06:34 also not close to anything Feb 01 23:06:42 what do you call "anything" Feb 01 23:06:55 I guess north beach is more popular Feb 01 23:07:04 well personally, Hayes/Lower haight are my favorite Feb 01 23:07:18 romainguy, I will. They had mentioned that you had been in the office and talked with them Feb 01 23:07:32 I hadn't realized who Bob actually was until later in the day Feb 01 23:07:39 I know Bob from his time on the Android team Feb 01 23:08:55 I'm trying to use a translation animation on an image view, but it's being cut off by it's bounds, rather than having the entire view translated. Is there a way to fix it so it doesn't do that? Feb 01 23:09:12 That's awesome. I'm really excited to be around these kinds of guys and just soak up as much knowledge as possible. Feb 01 23:09:39 I'm using ObjectAnimator.ofFloat and the animations are kinda choppy, is this normal? Feb 01 23:10:22 romainguy: if you have a CheckBox with no text, there is extra space on the rhs, is there any way to get rid of that ? Feb 01 23:10:50 change the padding Feb 01 23:11:00 romainguy: i did, set it to 0 Feb 01 23:11:04 (left and right) Feb 01 23:13:55 JakeWharton: would you have any idea why ObjectAnimator.ofFloat would be choppy? Feb 01 23:14:12 ObjectAnimator itself is not choppy Feb 01 23:14:24 profile your code to see where you are spending time Feb 01 23:15:24 romainguy have you seen the ScaleAnimation bug on TextView in ICS? Feb 01 23:15:36 could you be more precise? Feb 01 23:15:48 it doesnt remove previous frames before drawing the new one Feb 01 23:15:53 so you end up with blurred text Feb 01 23:16:07 like it needs an invalidate() call or something Feb 01 23:16:36 hw acceleration on or off? Feb 01 23:16:41 on Feb 01 23:16:48 then it's not an invalidation bug Feb 01 23:16:56 romainguy: ah slowed it down and it seemed to be an issue with running it alongside a viewpager transition. thanks! Feb 01 23:16:57 the text bitmaps are scaled Feb 01 23:17:00 dues the "blurry" result Feb 01 23:17:06 thus Feb 01 23:17:08 -dues Feb 01 23:17:14 blurry was a bad word Feb 01 23:17:29 it is not removing previous frames before drawing the next Feb 01 23:17:38 screenshot? Feb 01 23:17:58 one sec Feb 01 23:20:42 oh how i love chrome history Feb 01 23:20:43 romainguy: http://imageshack.us/photo/my-images/7/icsanim.png/ Feb 01 23:21:02 file a bug Feb 01 23:27:14 anyone know offhand how many textures a tegra-2 supports at once?.. is it 8? Feb 01 23:33:04 Rangar: 16 Feb 01 23:33:51 thanks Feb 01 23:33:59 you should query this at runtime :p Feb 01 23:34:25 romainguy: why is google going to start posting actual content on google+ as opposed to just organizing it on the existing website ? Feb 01 23:34:39 +1 Feb 01 23:34:42 i'm referring to reto;s announcement of course Feb 01 23:35:03 it will be a fucking mess Feb 01 23:36:52 anything to spread the knowledge Feb 01 23:37:17 can someone help me figure out why my intent filter isnt working Feb 01 23:39:08 im created my own ContentProvider and querying/inserting/etc. all work fine, now ive created an activity to be able to view/edit my custom content and set up an intent filter but every time i do a startActivity i get no activity found to handle intent Feb 01 23:40:22 JakeWharton: it should be organized well, not 'spread' Feb 01 23:42:26 Anyone have any suggestions on how to debug an NDK app with valgrind? I see you can connect to the gdbserver, but I'm not sure what to feed valgrind at the command line since it needs an executable. Feb 01 23:42:27 well seeing as no one reads the docs anyways Feb 01 23:42:43 big name companies releasing apps that use px for measurement or the like Feb 01 23:43:24 i use px for 1 pixel dividers :) Feb 01 23:43:29 * g00s ducks Feb 01 23:43:55 i hate relative layout. Feb 01 23:44:16 using a bunch of LinearLayouts, you can use layout_weight and avoid even specifying dimensions in dp. Feb 01 23:44:44 your layouts should be as flat as possible Feb 01 23:44:47 canadiancow: you like chrome history more than firefox history? :\ Feb 01 23:45:06 why? Feb 01 23:45:09 welp, so much for taking my tablet to do some coding on it today, I just realized that android keyboard doesnt have squiggly brackets DOH Feb 01 23:45:11 performance? Feb 01 23:45:14 for faster rendering Feb 01 23:45:25 they render plenty fast, though. Feb 01 23:45:30 Rangar: there's an app/keyboard for that. :P Feb 01 23:45:31 Rangar: yeah it does Feb 01 23:45:53 Rangar: symbols -> extended symbols Feb 01 23:46:12 there's also a hackers keyboard which places those things in more prominent positions Feb 01 23:46:23 ooo MORE, lol.. how cld i miss that Feb 01 23:46:26 yeah Feb 01 23:46:37 i'll check that out, thanks folks Feb 01 23:47:32 * t0mless <3 hacker's keyboard Feb 01 23:48:44 JakeWharton: I've managed to squeeze in ActionBarSherlock, ViewPagerIndicator and NineOldAndroid all in one app. Thanks for your contributions! :) Feb 01 23:48:53 haha Feb 01 23:48:54 woah! Feb 01 23:49:10 that's awesome Feb 01 23:49:18 ;) Feb 01 23:49:41 anyone published to amazon app store? Feb 01 23:49:52 need to think up some other creative libraries then... Feb 01 23:51:47 nice keyboard, thanks again Feb 01 23:52:31 JakeWharton: is square using abs :D Feb 01 23:52:51 (will they be soon XD ) Feb 01 23:52:51 g00s, no Feb 01 23:53:01 that I don't know Feb 01 23:53:05 i'm not privy to their future plans yet Feb 01 23:53:47 perhaps a subset for easier handling of pre/post HC/ICS action bars Feb 01 23:56:17 I've an odd bug and I can't seem to figure it out. http://pastebin.com/jL49WxiN <-- my task works for a random period of time (usually 5-10+ minutes) then it starts getting a -3.5s delay and causes the task to fire repeatedly. Feb 01 23:59:47 you calculate two dates of known distance apart Feb 01 23:59:47 Tomasu: it seems it's because you're passing in the same object each time, presumably so you can "loop" it... but I do not see "delay", and the runtime of updateDuration() is not even deducible from your code, so it could be interleaving with the run() method that gets executed by your Activity's work queue. Feb 01 23:59:57 why not just delay by that known time span? Feb 02 00:00:04 60*1000 Feb 02 00:00:35 oh wait, i see what you're doing Feb 02 00:00:36 also we don't know what updateDuration() does. Feb 02 00:01:22 anyone remember which HTC devices had trouble with Bluetooth (beyond the desire) ? Feb 02 00:01:35 updateDuration is really simple: http://pastebin.com/Zd6tDmH4 Feb 02 00:01:43 shit, and there are a bunch of desires Feb 02 00:02:09 readme: same object? it creates the two calendars each time in there Feb 02 00:02:37 no, the same "updateDurationTask" Feb 02 00:02:37 or do you mean the runnable? Feb 02 00:02:39 yes. Feb 02 00:02:44 yeah, I just want to keep using it. Feb 02 00:02:49 why recreate it if you don't have to Feb 02 00:02:59 its used once on start up Feb 02 00:03:04 of course there is no need to. Feb 02 00:03:07 and then it calls itself Feb 02 00:03:19 but I think something in your code is interleaving, only sometimes, and causing it to stop. Feb 02 00:03:23 In my preference activity the title for my checkboxpreference does not wrap around the view instead it flows of the screen cutting off the title, how do I fix this? Feb 02 00:04:07 the output is odd, at some point the updateCalendar value stops really changing, it goes from incrementing by 60s to -3.5s Feb 02 00:04:37 Tomasu: what is the purpose of those two calendars? just to calculate the delay? Feb 02 00:04:40 there's no threading so I'm not sure how it can overlap Feb 02 00:04:49 pretty much, time in future - now Feb 02 00:05:21 sleeping an even 60 seconds could start not updating near a minute boundary after a while Feb 02 00:05:29 it likes to float a bit Feb 02 00:05:36 *delaying Feb 02 00:09:00 Why say "updateDurationTask" in postDelayed() and not "this"? Feb 02 00:09:13 It hadn't occured to me. :-x Feb 02 00:10:07 huh, why is evernote failing to update... Feb 02 00:10:09 I think your scheduling should probably occur after the work in updateDuration is done. Feb 02 00:10:27 but I do not know why your code is blowing up on you. Feb 02 00:10:45 that might have something to do with it. I'll make those two changes. Feb 02 00:12:36 * readme back to work on my competing product... Feb 02 00:12:51 heh Feb 02 00:12:59 I doubt its competing with mine ;D Feb 02 00:13:33 but yeah, now with the updating being done before, the amount of delay has gone down, closer to where I had expected it Feb 02 00:13:50 I should have looked into the code harder when I saw that it was only losing a few micro seconds ::) Feb 02 00:14:55 Tomasu: nah, not yours.. Hopefully evernote. Feb 02 00:15:02 aahh Feb 02 00:22:59 isn't there a way to make the home icon show as an indeterminite progressbar while you're loading stuff in the action bar? Feb 02 00:23:09 hmm... worded poorly Feb 02 00:23:37 want to toggle the logo to a indeterminite progressbar then be able to toggle it back, programatically Feb 02 00:24:23 or can you only do that for action items? Feb 02 00:24:39 test Feb 02 00:24:48 fail. Feb 02 00:24:52 i want to show a Dialog with an Action or an intent. how to? Feb 02 00:25:11 show a dialog with an action? Feb 02 00:25:50 i have an action bar. there have to be actions added. when i click on one actionitem on this action bar ai want to call showDialog Feb 02 00:26:15 so in your onOptionItemSelected method for the ID of that action call showDialog Feb 02 00:26:29 onOptionsItemSelected* Feb 02 00:27:16 i have something like this Feb 02 00:27:20 final Action shareAction = new IntentAction( this , createShareIntent() , Feb 02 00:27:21 R.drawable.ic_sl_add ); Feb 02 00:27:21 actionBar.addAction( shareAction ); Feb 02 00:28:15 now i want to replace createShareIntent with showDialog Feb 02 00:28:24 but this is not possible Feb 02 00:28:38 as showDIalog returns void, and no Intent Feb 02 00:29:41 oh, you're using an action provider Feb 02 00:29:58 er... intentAction... which is what ICS turned into action providers Feb 02 00:31:12 i am using https://github.com/johannilsson/android-actionbar on android 2.2 Feb 02 00:31:15 why do you want a dialog if you're using an intentaction? Feb 02 00:32:07 How do I manage a MyCustomClass[] with parcels? Feb 02 00:32:27 whats wrong with doning so? Feb 02 00:32:33 j4hr0m, use a normal action and show the dialog in its callback Feb 02 00:32:45 ok, thanks! Feb 02 00:32:47 in the construct of the class (that takes a parcel) as well as writeToParce() - I've tried multiple ways with no luck. Feb 02 00:36:45 JakeWharton: there has to be an Intent... Feb 02 00:37:31 can i somehow call showDialog in my intent? Feb 02 00:38:03 or return an intent to showDialog? Feb 02 00:38:34 n20: http://developer.android.com/reference/android/os/Parcel.html#writeArray(java.lang.Object[]) Feb 02 00:39:19 no Feb 02 00:39:22 don't use IntentAction Feb 02 00:39:30 write your own that extends from Action Feb 02 00:40:50 readme: I think I've tried that, or maybe some weird combination with it in - I'll try it once again though. :-) Feb 02 00:42:00 ok, i got it , thanks! Feb 02 00:42:04 ( JakeWharton ): can I set the logo/icon of the action bar to a spinning progress bar? Feb 02 00:42:09 i will then call showDialog in performAction Feb 02 00:42:16 or can I only do that to action items? Feb 02 00:42:43 t0mless, no Feb 02 00:42:49 there's an intedeterminate one built-in Feb 02 00:43:06 I thought there was Feb 02 00:43:12 how do I make use of it? Feb 02 00:43:16 natively? Feb 02 00:43:28 I can't find the apis for it -_- Feb 02 00:43:43 requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS_BAR) Feb 02 00:43:50 then setIntedeterminateProgressBarEnabled(Tue) Feb 02 00:43:52 *true Feb 02 00:44:01 ahh Feb 02 00:44:17 except spell correctly Feb 02 00:44:30 that makes sense, uses the one that was built into the old title bar which as far as I know no one ever used Feb 02 00:44:32 my fingers can't type indeterminate correctly very often Feb 02 00:44:36 word Feb 02 00:44:44 I've been making a shitload of typos today Feb 02 00:44:57 either too much or too little tea... not sure which Feb 02 00:45:32 readme: java.lang.ClassCastException: java.lang.Object[] cannot be cast to com.ninetwozero.battlelog.datatypes.ProfileData[] - am I missing something? Feb 02 00:46:44 readme: I'm sending in a ProfileData[] into the writeArray(), however when I read it (and cast from Object[] to ProfileData[] - it basically dies) Feb 02 00:47:36 ok, it works, thanks JakeWharton Feb 02 00:49:55 I want to draw something on my SurfaceView each time onPreviewFrame() is called .. How can I do so ? Feb 02 00:51:41 readme: thanks for the help, so far the problem hasn't shown up again. having the update call after the calculation, it was probably causing a conflict when ever the phone didn't get back in time, or something else was using the cpu. Feb 02 00:51:43 #/join #cynogen Feb 02 00:51:47 oops Feb 02 00:51:48 heehe Feb 02 00:57:43 Tomasu: cool Feb 02 00:59:05 it does make sense though. a delta larger than the few usec's it calculated would cause issues. Feb 02 01:02:11 fuck i hate hardware people Feb 02 01:02:35 USE OUR NEW QUAD CORE CPU BECAUSE IT WILL RUN YOUR APPS FASTER Feb 02 01:02:42 ...not unless i rewrite them... Feb 02 01:02:52 You have a lot of hate today cow. Feb 02 01:03:19 heh Feb 02 01:03:30 people are just silly Feb 02 01:04:02 you candians Feb 02 01:04:48 is there a possibility to call onResume manually? Feb 02 01:04:53 JakeWharton, did you fix the bugs yet? Feb 02 01:04:55 j4hr0m: dont do that Feb 02 01:05:49 i just need to rebuild a listView Feb 02 01:06:01 after showDialog Feb 02 01:06:02 i dont know what that means Feb 02 01:06:12 regardless, dont call onresume yourself Feb 02 01:06:21 canadiancow, just got off the phone with my mother Feb 02 01:06:25 trying to get back to work Feb 02 01:06:27 So I have a PreferenceActivity that has a EditTextPreference where I want to check the data that gets entered. It's supposed to be 9 digits but can have pre-padded zeros. Is there a callback where I can check against this? Feb 02 01:06:27 woman can talk Feb 02 01:06:33 when you dismiss the dialog have it tell the adapter of your listview that the content changed, that will rebiuld your list Feb 02 01:06:55 i do it in an AsyncTask... Feb 02 01:07:24 so? in the onPostExectute() tell it to rebuild the list Feb 02 01:08:04 hmm interesting Feb 02 01:16:29 Are there callbacks I can use to sanitize data for an EditTextPreference in a PreferenceActivity ? Feb 02 01:16:50 I believe there is a onPreferenceChanged callback Feb 02 01:17:02 did you look in the docs? Feb 02 01:17:06 there are listeners Feb 02 01:17:15 I didn't find any in EditTextPreference Feb 02 01:17:26 what about its parent classes? Feb 02 01:17:41 Looking right now Feb 02 01:18:01 there is also a place to see inherited methods in the edit text Feb 02 01:18:34 setOnPreferenceChangeListener <-- under inherited methods Feb 02 01:18:37 for preference Feb 02 01:18:47 Is there any way to reuse the preferencesactivity stuff but make the backend be an sql database? Feb 02 01:19:11 Aha Feb 02 01:19:15 Yea you can Feb 02 01:19:19 It's a great UI that users know how to use very well, and it'd be awesome if I could reuse it for a differnet aspect of my app. Feb 02 01:19:20 just don't give it key's in xml Feb 02 01:19:33 then use a change listener to put the stuff into sql Feb 02 01:20:24 t0mless, awesome Feb 02 01:20:31 Do you know of any examples? Feb 02 01:20:39 No because that seems just silly Feb 02 01:20:53 ha Feb 02 01:20:56 would be pretty trivial though Feb 02 01:21:23 So I have the concept of a "project" in my app--and each project has a variety of settings. Feb 02 01:21:29 findPreference() to get a handle, set a listener to save it to sql Feb 02 01:21:30 done Feb 02 01:21:49 you can have different settings files.... Feb 02 01:21:58 hmm. that sounds like a much better approach. Feb 02 01:22:07 not sure how to specify the file in xml though Feb 02 01:22:38 I think if you use the key elements in xml is uses the getDefaultSharedPreferences() from PreferenceManager Feb 02 01:23:19 but you could also store them with a listener useing getSharedPreferences(file, mode); same way you could store them in sql Feb 02 01:29:34 looks like you could just call PreferenceManager.setSharedPreferencesName() in onCreate of your preferenceActivity and set it to your project name Feb 02 01:32:02 anyone having trouble uploadng updates to the marketplace lately? Feb 02 01:32:21 Even if I change just one character in the description and hit save, I get "The title you have chosen matches that of another of your applications. Change the title. Feb 02 01:33:26 heh Feb 02 01:33:30 i have three apps with the same title Feb 02 01:33:33 one was suspended Feb 02 01:33:36 then i reuploaded it Feb 02 01:33:44 then i decided to hcange the package name again Feb 02 01:33:53 the one thats never been published is annoying that i cant delete Feb 02 01:34:19 maybe I need to upload the update before I can change the details.. but don't want people to start getting the update if the changelog etc cant go up Feb 02 01:34:22 bah Feb 02 01:34:55 you can upload the apk but not activate it Feb 02 01:35:02 good idea Feb 02 01:35:14 that MIGHT require "advanced" apk mode Feb 02 01:35:42 API level: 7-16+ Feb 02 01:35:49 i keep wondering... Feb 02 01:37:02 me too Feb 02 01:37:06 shit better not be released soon Feb 02 01:37:11 canadiancow, ABS problem Feb 02 01:37:17 proxying to native is killer Feb 02 01:37:24 =\ Feb 02 01:37:33 i can imagine Feb 02 01:37:37 but why are you doing that? Feb 02 01:37:44 because it's the right thing to do :( Feb 02 01:37:51 i mean if api 16 adds new AB features, you'll need to include all the new shit in ABS for api 15 Feb 02 01:37:56 and then you cant proxy anymore for 15 Feb 02 01:37:57 right? Feb 02 01:38:19 i guess Feb 02 01:38:25 what would you have me do though? Feb 02 01:38:33 well i dunno Feb 02 01:38:44 im just saying that sure, proxying sort of (kind of?) makes sense on api 14/15 now Feb 02 01:38:48 double-edged sword Feb 02 01:38:49 but you dont proxy on 13 right? Feb 02 01:38:55 not presently Feb 02 01:39:10 because then you lose collapsible and stuff, right? Feb 02 01:39:13 can't support setLogo/setIcon, etc. Feb 02 01:39:16 yea Feb 02 01:39:17 that too Feb 02 01:39:24 so the second a new version comes outw ith new features Feb 02 01:39:30 you can no longer proxy on 14 or 15 either Feb 02 01:39:34 becuase you'll lose those features Feb 02 01:39:41 so im saying why bother Feb 02 01:40:03 well, because things like the next Google TV (or whatever else) may use a wholly different display for the action bar Feb 02 01:40:08 they *almost* did that sidebar thing Feb 02 01:40:27 hmm Feb 02 01:40:37 so then youd update ABS to do that, and proxy on 16, but not proxy on 14/15? Feb 02 01:40:54 I'm not sure Feb 02 01:41:05 I'm still a little new to java but understand a decent amount. Most examples using listeners of various types usually involve code such as: foo.setBarListener(new OnBarListener() { public void onBar(void) { } }); but to me it looks odd putting in a whole function of code inside say an onCreate. What should I do to separate out the listener into its own function? Feb 02 01:41:32 private OnBarListener mBarListener = new OnBarListener() { ... } Feb 02 01:41:33 JakeWharton: that sounds increasingly like a job for a custom classloader Feb 02 01:41:43 private final OnBarListener mOnBarListener = new OnBarListener() { @Override public void onBar(void) { } }; Feb 02 01:41:45 then on oncreate Feb 02 01:41:50 Aha that's what I wanted. Feb 02 01:41:50 foo.setBarListener(mOnBarListener); Feb 02 01:42:08 mLocationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) Feb 02 01:42:14 java.lang.IllegalArgumentException: provider=gps Feb 02 01:42:16 Right that second part is what I figured I needed to do, but I didn't know how to declare it. Feb 02 01:42:21 p_l, but then i'm complicating my implementation by quite a bit Feb 02 01:42:23 Throws IllegalArgumentException if provider is null Feb 02 01:42:27 ... Feb 02 01:42:32 fucking apis not behaving as the docs say Feb 02 01:43:03 Hey all, I hope this is a quick question, if I define ids.xml do I need to define all ids that used by my app? I haven't trouble parsing the xml when I only put a few items in ids.xml Feb 02 01:43:07 canadiancow: your bug report is… terse :)) Feb 02 01:43:11 lol Feb 02 01:43:14 sorry Feb 02 01:43:17 i wanted to go home :( Feb 02 01:43:31 not even sample code?!? Feb 02 01:43:37 i was gonna Feb 02 01:43:38 but... Feb 02 01:43:40 i was hungry Feb 02 01:43:42 and wanted to go home Feb 02 01:43:44 and needed to buy shoes Feb 02 01:44:11 i have a patch in Gerrit from like two weeks ago I need to update Feb 02 01:44:32 i told someone to submit a patch that only removed an @hide from javadoc Feb 02 01:44:45 "only"? :)) Feb 02 01:44:56 theres some class he wants Feb 02 01:45:11 * @hide Feb 02 01:45:12 */ Feb 02 01:45:12 public class LongSparseArray { Feb 02 01:45:14 I have tons of duplicated code in ABS solely because of "@hide pending API board" or whatever :) Feb 02 01:45:28 damn those @hide doclets Feb 02 01:45:57 hmm, looks like I created LongSparseArray Feb 02 01:46:05 HAH Feb 02 01:46:05 <3 Feb 02 01:46:08 I dunno, better they hide it until they know it's stable than changing it later and breaking shit Feb 02 01:46:09 any reason it's hidden? Feb 02 01:46:29 what t0mless said Feb 02 01:46:35 also it would require better docs, etc. Feb 02 01:46:40 just copy it in your app Feb 02 01:46:46 yea im sure that's what he did Feb 02 01:46:50 I wish we'd get smaller, more componentized frameworks Feb 02 01:46:53 if docs are the only reason it's hidden though.... -_- Feb 02 01:46:59 yea t0mless :P Feb 02 01:47:03 but to be fair, a lot of the docs suck Feb 02 01:47:07 Truth Feb 02 01:47:08 either that or oem's break shit a lot Feb 02 01:47:12 or both Feb 02 01:47:19 Both more than likely Feb 02 01:47:20 where the heck is my phone :S Feb 02 01:47:22 patches welcome :)) Feb 02 01:47:38 romainguy, i wish i could patch the stuff i need Feb 02 01:47:48 http://code.google.com/p/android/issues/detail?id=23659 Feb 02 01:47:50 hire me as a tech writer and I'll write docs all day long Feb 02 01:48:06 any help on the ids.xml? Feb 02 01:48:13 romainguy: reminds me to get cracking on that CV for google... Feb 02 01:48:15 ;) Feb 02 01:48:22 http://code.google.com/p/android/issues/detail?id=24136 Feb 02 01:48:30 brobzill1, no you don't have to define them all Feb 02 01:48:31 at least samsung responded to my first one Feb 02 01:48:33 and said it would be fixed Feb 02 01:48:39 and tehn deleted their comment Feb 02 01:48:40 you can mix and match defining in ids.xml and in view XMLs directly Feb 02 01:48:43 * canadiancow waits for a GN radio update Feb 02 01:49:15 canadiancow: in your example, is the textview transparent? Feb 02 01:49:18 or does it have a background? Feb 02 01:49:29 whatever the default is Feb 02 01:49:30 ok thanks, that is good to know, I don't know why I'm getting unparsed aapt errors Feb 02 01:49:33 so transparent i guess Feb 02 01:49:37 canadiancow, do you set the window background to @null? Feb 02 01:49:54 not sure what i did there :S Feb 02 01:50:06 we moved that part into opengl Feb 02 01:50:09 lemme see our git history :P Feb 02 01:50:27 yeah go git it Feb 02 01:50:54 I feel like you try to use that joke on a daily basis.... Feb 02 01:51:16 in all likelihood... yes Feb 02 01:51:22 :p Feb 02 01:51:29 bleh Feb 02 01:51:33 double Feb 02 01:51:48 if styles could somehow refer to sibling attributes I would be fine Feb 02 01:51:50 I wish I knew more graphics designers that would do small things for me in exchange for beer Feb 02 01:52:18 they can't using the ?attr: thing? Feb 02 01:52:26 hmm romainguy lemme boot up my laptop and i can get everything for you if you're looking at it right now Feb 02 01:52:26 that only works for reading from the theme Feb 02 01:52:28 I only kinda know how that works Feb 02 01:53:09 http://stackoverflow.com/questions/6486594/access-sibling-style-attributes-in-a-non-theme-style Feb 02 01:53:22 anytime I try to work with themes/styles I get pissed of that it doesn't work how I intutively want it to work Feb 02 01:53:31 off* Feb 02 01:54:59 that question combined with this one ( http://stackoverflow.com/questions/8814109/read-newer-theme-attributes-on-older-platform ) ruin all hope of proper styling of custom and native action bar Feb 02 01:55:20 with a single theme, that is Feb 02 01:55:35 canadiancow|work, go home Feb 02 01:55:42 lol Feb 02 01:56:46 I can't wait to write an app that's 14+ only Feb 02 01:57:25 How do i make multiple guis? Feb 02 01:57:34 lol JakeWharton Feb 02 01:57:36 use resource qualifiers Feb 02 01:57:59 yes but how do i actualy make the gui first :/ all i have is the default.xml Feb 02 01:58:07 main* Feb 02 01:58:09 ( aaa801 ): you can make a layout.xml in layout, layout-land, layout-xlarge, etc to load specific ones in different situtations Feb 02 01:58:49 then your setContentView(R.layout.main); will load whatever one it needs Feb 02 01:59:01 :/ Feb 02 01:59:10 ( aaa801 ): just make new main.xml files in the different res folders Feb 02 01:59:14 i think he means multiple activities Feb 02 01:59:20 no Feb 02 01:59:37 t0m will it auto make the R for them aswell? Feb 02 01:59:56 one you build the project to refresh R Feb 02 02:00:00 might have to clean in eclipse Feb 02 02:00:04 ok Feb 02 02:00:09 il try that in a min Feb 02 02:00:35 JakeWharton, speaking of not using eclipse, is there a keyboard shortcut to just instert a ; at the end of the line and goto next line in intellij? Feb 02 02:00:54 that isn't end+;+enter Feb 02 02:00:59 haha Feb 02 02:01:03 you could probably make a macro for that Feb 02 02:01:25 fricking annoying when using the smart text stuff Feb 02 02:01:42 that it doesn't put the cursor at the end of the line after you fill in the params Feb 02 02:02:15 $i; Feb 02 02:02:17 ;) Feb 02 02:02:18 I want to make a base class for a button so I don't have to repeat the same layout_width, layout_height and weight for the same type of button; any suggestions on how to do that? Feb 02 02:02:31 is it doable in xml only? Feb 02 02:03:08 styles Feb 02 02:03:27 can you put width and height in styles? Feb 02 02:03:31 yes Feb 02 02:03:46 put the stuff you want the same in the style Feb 02 02:03:57 then just do