**** BEGIN LOGGING AT Mon Sep 17 02:59:59 2012 Sep 17 03:00:14 ok, then let me ask about those, as I haven't heard about them yet Sep 17 03:00:50 just serializing up into another form, but using an automated mechanism which you dont have to manually code Sep 17 03:01:06 so object->json and back Sep 17 03:01:42 I actually like that idea better so make it easier for other users to modify. Is there any major difference between how JSON and parcelable behave with the lifecycle Sep 17 03:01:57 also, a simple automated round-trip test of your value classes would catch any mismatches in code. Sep 17 03:02:27 not really, other than speed I suppose. Nothings going to be parcelable since it's designed for that Sep 17 03:02:49 also, of note, whatever you use is limited to 1MB. Sep 17 03:03:07 whether parcelable or JSON? Sep 17 03:03:20 right, except JSON is much less compact. Sep 17 03:03:30 you'd be passing it as one big string Sep 17 03:03:41 so parcelable still sounds like the way to go? Sep 17 03:04:12 and I meant a dozen fields as in one class, not total. It's really about maintenance. I dont find it that bad. Sep 17 03:04:35 write a unit test and dont worry about it Sep 17 03:06:15 mrenouf: I appreciate the help. My issue so far with Android is that I have learned a whole lot of how to do things and have used a lot of it, however I never know which is the best way to do something Sep 17 03:07:22 epsilonorion, that's pretty much been my entire experience. however things are settling down a bit. There are some good books and articles, but they dont always cover the nuts and bolts of things. Sep 17 03:08:19 mrenouf: I agree. Been working with fragments, ROSJava (in android), serialization, viewpager, Google MapView, etc all in the same app Sep 17 03:08:20 Reto Meier's Professional Android 4 for example Sep 17 03:08:30 I have reviewed that one a bit Sep 17 03:08:58 the short answer is there is rarely a "best way" that holds true for many situations Sep 17 03:09:27 serialization and persistence falls into that category Sep 17 03:09:56 part of the general topic of caching, basically Sep 17 03:10:28 how big is it, how often do you need it, how frequently does it change, how much of it can you afford to lose Sep 17 03:12:39 lol, yeah. In this situations, not too big, often, often, no Sep 17 03:47:02 I have eclipse indigo on my machine and android setup in it. Now I want to try eclipse juno. Is there anyway of configuring it for android using the configuration for eclipse Indigo? I am using kubuntu Sep 17 03:57:35 mrenouf: If you are out there, I have a quick question about the parcelable option with an ArrayList Sep 17 04:45:53 How do I save and persist an Itemized OverlayItem List for Mapview when the onPause lifecycle occurs Sep 17 05:01:39 Hello. Trying to get my first Android hello world program working. Code shows no errors, AVM is up. I don't know what to do next. Sep 17 05:03:55 AvgJoe47: unlock the AVM Sep 17 05:04:20 AVM is unlocked, seeing the desktop. Sep 17 05:04:21 it takes a long time to load the virtual device AvgJoe47 Sep 17 05:04:39 especially your first time running it AvgJoe47 Sep 17 05:05:07 I've already used the Browser app in the avm. Sep 17 05:05:34 So it's up and functional. Just don't know how to run my hello world app on the avm Sep 17 05:05:43 did you compile it Sep 17 05:06:33 Do I have to make it into an apk? Sep 17 05:06:41 no Sep 17 05:06:48 you just have to build it then run it Sep 17 05:07:09 have mainactivity.java on the screen and press f12 Sep 17 05:07:14 I right click on the project, select run as, and click android application. Sep 17 05:07:27 are you using eclipse Sep 17 05:07:37 F12 doesn't appear to do anything. Sep 17 05:07:41 I'm using Eclipse Sep 17 05:07:47 are you getting errors? Sep 17 05:07:57 It wil show in the debugger on the right bottom hand of the screen Sep 17 05:08:04 Under Markers on the bottom it says 0 errors Sep 17 05:08:39 AvgJoe47: did you add something in the code that can update logs? Sep 17 05:09:07 AvgJoe47,: Im sorry its ctrl and f11 to run the program Sep 17 05:09:10 if not, do add them, they are very helpful in debugging, and then run the project again, no need to restart the avm. Keep an eye on lgos. Sep 17 05:09:11 try that AvgJoe47 Sep 17 05:09:14 I don't know what that means. Sep 17 05:09:16 f11 + ctrl Sep 17 05:09:37 Ok, Ctrl+F11 brings up a new AVM window. Sep 17 05:10:55 see if the hello world app runs on it when it loads up Sep 17 05:11:23 It's up, but I no app is running. Sep 17 05:11:50 The console says "Performing com.example.test.MainActivity activity launch Sep 17 05:14:14 when I start a new activity, my old activity calls the onSaveInstanceState function, however it is not calling onCreate when starting back up and I cant get the savedinstance bundle to come up Sep 17 05:15:01 that means it is trying to launch at least... you have your manifest set up and an oncreate in ur default launcher class right? Sep 17 05:15:07 setcontentview to your xml? Sep 17 05:15:34 AvgJoe47: not epsilonorion Sep 17 05:16:53 I don't know what 'manifest' refers to, and the MainActivity.java has an onCreate Sep 17 05:20:16 AvgJoe47: did you just make a new android app then tried to run it? Sep 17 05:20:28 which would be a helloworld app Sep 17 05:21:07 Yes, File->New->Other->Android Application Project Sep 17 05:22:48 mrenouf: yes, I have it open in a tab for investigation tomorrow Sep 17 05:23:34 AvgJoe47: did you close the virtual device that was supposed to run the program? It can take a long while. Sep 17 05:24:29 I've left it open for up to an hour. I can install apk and runs apps, use the browser. Sep 17 05:25:26 What's the best way to grep through the android sources? Sep 17 05:25:43 I keep trying to use grepcode.com but that seems to fail. I also try and go to the github pages, but that seems to slow. Sep 17 05:25:52 Anyone have any go-to methods that are quick+easy? Sep 17 05:26:59 hwrd|work: sometimes i use ack Sep 17 05:28:19 Tracks: any ideas? Sep 17 05:28:19 g00s: hmm. I'll give it a try. Like for instance -- just now I was searching for the config_mediumAnimTime actual value. But I searched for like 2 minutes and couldn't find it. There must be an easier way. Sep 17 05:28:29 sorry my computer froze Sep 17 05:28:38 no worries. Sep 17 05:28:44 AvgJoe47,: you have no erros? Sep 17 05:28:47 errorS* Sep 17 05:29:03 AvgJoe47: I can't think of possibly what could be wrong not saying there isn't anything wrong. Sep 17 05:29:21 Are you on windows? Sep 17 05:29:36 no Sep 17 05:29:38 g00s: wow. Ack seems pretty damn nice Sep 17 05:29:57 good for quick one-off searches ;) Sep 17 05:30:22 found 500 no problem Sep 17 05:31:23 So on Mac/Linux you can create a new Android Application Project, Run As Android Application, the AVM comes up and the app comes up? Sep 17 05:32:12 You don't have to do anything inside the AVM for the app to come up? Sep 17 05:32:28 or in Eclipse? Sep 17 05:33:23 That should run it :/ sometimes i had to click the app in the app draward but thats all Sep 17 05:33:52 So the app should be in the app drawer? Sep 17 05:34:18 I should see test after Spare Parts? Sep 17 05:35:16 whatever you called it.. it will have the default icon Sep 17 05:36:26 or, should. It does in the video I've watched to get this far, but it's not working for me. Sep 17 05:38:21 "iPhone 5 preorder number leads to German adult dating hotline." Sep 17 05:38:36 lots of hipsters got dates :) Sep 17 05:40:47 g00s: Sadly. Sep 17 05:46:01 heya guys, I have a build tree for JB for my SGS2, and I was wondering how I could add a new platform manifest to it, so I can start working on porting to the n900? I don't want to sync the whole android git again, hence my question Sep 17 05:50:00 when working with fragments and your activity goes to onPause, what is called when the activity is resumed Sep 17 05:50:18 I've deleted the AVM and the Project, created both as the first 80 seconds in this video says (http://www.youtube.com/watch?v=EXM18wRW5Pk), it works in the video but is not working for me. Sep 17 05:51:43 epsilonorion: onResume() Sep 17 05:52:20 Source: http://developer.android.com/training/basics/activity-lifecycle/pausing.html Sep 17 05:53:57 Okay, so the more complicated question. I know the standard lifecycle, but besides onResume what is called. I assumed that onActivityCreated or something that would have the savedinstance (created during onSavedInstance) would be called, but I don't see anything Sep 17 05:54:08 I need to pull out a savedInstance bundle Sep 17 05:55:03 That's the limit of what I can help. I can't get the default hello world project to run in the AVM. Sep 17 05:55:03 onActivityCreated is called again, but I thought that bundle was different then onActivityCreated Sep 17 05:55:28 sorry, onStart is called Sep 17 05:56:27 Did you answer your own question? Sep 17 05:58:10 nope, still trying to figure it out Sep 17 05:58:12 thanks though Sep 17 05:59:17 epsilonorion: You on windows? Sep 17 05:59:23 linux Sep 17 05:59:44 Anyone here on windows? Sep 17 06:03:28 I am. Sep 17 06:08:33 AvgJoe47, do you get an error message? Sep 17 06:09:14 ok, to answer my own question in case anyone cares, symlinking .repo/projects between directories is the way forward Sep 17 06:16:52 Anyone have an idea as to why onActivityCreated or any other function with savedStateInstance does not get called when I resume with a fragment Sep 17 06:19:42 anyone here read "Brave NUI World" ? wondering if anything is applicable to android dev. seems like a lot of principles made their way into wp Sep 17 06:20:34 no, but would you recommend it? Sep 17 06:21:13 its one of the only books i can find that describes post-WIMP (genstural / natural) interfaces Sep 17 06:21:21 *gestural Sep 17 06:22:14 it was referenced in a book i just finished "The Mobile Frontier" which i recommend if you are are a designer / UX practitioner Sep 17 06:22:55 besides onStart and onResume, is anything else supposed to run when I return to a fragment Sep 17 06:23:21 oh, those people Sep 17 06:23:25 epsilonorion there are detailed lifecycle maps for activity and fragments on developer.android.com Sep 17 06:23:33 epsilonorion: yeah, i think everything after onCreate is called Sep 17 06:23:40 in the lifecycle graph Sep 17 06:23:51 epsilonorion: i good way to learn lifecycle timing with both activities and fragments, is to override all of them and put log statements in there. you'll probably learn some interesting things Sep 17 06:24:09 done all of the above for sampullman, goos, ron_frown Sep 17 06:24:22 which is just onactivitycreated Sep 17 06:24:41 I am just needing confirmation. I am trying to work with SavedState. Only onResume and onStart are called. onActivityCreated is not Sep 17 06:25:04 its not an activity is it? =) Sep 17 06:25:47 no, just a fragment, but onResume and onStart do not allow access to the savedStateInstance Sep 17 06:26:11 ron_frown: also, if you follow the lifecycle, it makes it seem as if it would be called Sep 17 06:27:38 why does MainActivity show in the launcher instead of the application name Sep 17 06:27:40 its called of course when the fragment is first created Sep 17 06:28:16 my main issue, if anyone can help is how do I pull back the data I save during onSaveInstanceState Sep 17 06:29:13 speakingcode: put an android:label on the activity Sep 17 06:29:30 epsilonorion: the activity is being resumed, not created. hence, not called. Sep 17 06:30:47 JakeWharton: I agree, and do follow that, which is why i was not suprised when onResume and onStart were called, however, if this is the case (which I desire), I still need to know how to grab the bundle saved during onSaveInstanceState Sep 17 06:31:03 alread ythere, JakeWharton Sep 17 06:33:15 epsilonorion: it's available in onActivityCreated, onCreate, and onCreateView if I remember correctly Sep 17 06:33:27 and if those aren't being called, then you shouldn't need access to it Sep 17 06:34:11 and onViewCreated and onInflated (just looked) Sep 17 06:34:37 JakeWharton: I do seem to though. I create a parcelable object that MapView has access to. When I press home, onSaveInstanceState is called and I am placing the object in the bundle. Sep 17 06:35:18 When I start the app up again, the onResume and onStart functions are called, but none of the items placed in the object have persisted due to none of the functions I assumed would grab it from the bundle are called Sep 17 06:35:29 this includeds any create variations Sep 17 06:37:22 onResoterInstanceState? Sep 17 06:37:32 doesnt exist for fragments Sep 17 06:37:45 *onRestoreInstanceState () Sep 17 06:38:02 JakeWharton: Actually, let me ask this question and I might be able to bypass this then. How do I get an ItemizedOverlay List created through mapview to persist Sep 17 06:38:10 are you calling setRetainInstance(true)? Sep 17 06:38:25 no Sep 17 06:38:27 I don't use Google's MapView Sep 17 06:38:32 so not sure on the latter question Sep 17 06:38:53 understood Sep 17 06:41:03 is it possible to write an app that communicates with other apps using nfc and transmits data that way? Or is nfc only useable in the default os scenarios? Sep 17 06:41:09 dang wtf is up with this Sep 17 06:41:24 why is it showing activity label on the launcher that makes no sense Sep 17 06:41:41 because you can have multiple launcher icons Sep 17 06:41:43 uhh what sort of data Sep 17 06:42:01 Mech0z: apps communicate with each other using intents. nfc is for phone to phone/tags Sep 17 06:42:06 speakingcode remove the launcher and main intent filters form the other activities in androidmanifest.xml Sep 17 06:42:55 f2prateek:so its possible (When you say phone to phone) Sep 17 06:43:27 i havent used the nfc api's, but i woudl think so Sep 17 06:43:55 i have only one icon Sep 17 06:44:07 and it shows "MainActivity" Sep 17 06:45:07 nm, i see Sep 17 06:46:29 thanks JakeWharton - O Sep 17 06:46:34 I'm an idiot* Sep 17 06:49:15 of course you can send data Sep 17 06:49:26 I think as long as nfc has been avaliable, so has the instant wifi conn stuff Sep 17 06:49:33 which is what you want to do for sending large files etc Sep 17 06:50:28 is it possible to programmatically inflate a view so that is fills the width of a GridLayout? Sep 17 06:50:40 it doesn't seem to work Sep 17 06:51:03 did you set your layout params? Sep 17 06:54:58 yeah. i guess my issue is that wrap_content doesn't fill the layout, but match_parent fill the whole screen, pushing the rest of the layouts out Sep 17 06:55:06 *fills Sep 17 06:56:25 is the only way to get 2+ layouts to "share" the whole screen in a GridLayout to dynamically calculate the desired sizes? Sep 17 07:14:36 i need to download stuff asynchronously while the user does other stuff. right now, i use an AsyncClass subtask to do the download, and then in onPostExecute i want it to pass the downloaded data to the activity or to the view. right now, i'm trying to send an intent from the AsyncTask instance out, have a BroadcastListener receive it, and have the BroadcastReceiver send it to the activity, which has been set as an instance variable Sep 17 07:14:36 of the BroadcastReceiver. all of this seems very complicated, and i don't know how to broadcast intents from AsyncTask Sep 17 07:14:45 is there a better way to do this? Sep 17 07:18:30 what? Sep 17 07:18:43 whomp_: if i'm certain the activity won't go away, i just pass the async task a pointer to it Sep 17 07:18:50 if you need 1 parameter pass in one parameter with the generics Sep 17 07:19:01 if you want more, create parameters to the constructor and instantiate it Sep 17 07:19:52 iirc asynctask already handles onPostExecute in the ui thread, so you should just be able to instantiate anonymously and access outer scope Sep 17 07:20:20 that's correct Sep 17 07:20:58 sounds like you are making it harder than it needs to be =) Sep 17 07:22:51 is there a way to make a 3x3 grid of buttons in a gridview all the same size, while filling the screen width? Sep 17 07:23:34 for some reason the right/bottom button is ~2/3 of the size. Sep 17 07:24:55 i read that GridLayout 'prefers' right/bottom views, is there a way around this? Sep 17 07:25:05 err.. read the previous GridView as GridLayout Sep 17 07:25:10 hi. what xml entry can set the progress bar color? Sep 17 07:25:20 or which one? Sep 17 07:25:34 There's no "color" attribute Sep 17 07:25:42 You have to change the drawable used for the progress indicator Sep 17 07:26:16 mmm Sep 17 07:26:19 let me see Sep 17 07:29:39 hello everybody Sep 17 07:29:57 i am getting this strange behaviour for one samsung tablet GT-p7300 Sep 17 07:30:02 i am getting outofmemoryerror for one device since the dalvikkvm heap size gets more than 50mb and doesn't get reduced Sep 17 07:30:17 memory leak Sep 17 07:30:43 while on the other 2 tablets i don't get this issue since i can see the increasing and decreasing size of the kvm heap Sep 17 07:30:56 sampullman: hi Sep 17 07:31:06 sampullman: why its happening for a certain device Sep 17 07:31:08 ? Sep 17 07:31:39 There's a heap limit Sep 17 07:31:41 sampullman: for other device i can see the dealloating of memory Sep 17 07:31:44 could be a bug, i guess Sep 17 07:31:45 Can depend on device and platform version Sep 17 07:31:55 Use less memory Sep 17 07:32:22 If a number of objects needed to be shared across many activities in an app, what would you people suggest to use? A singleton class or extending the application object? (See, I cannot share these objects since they are neither serializable nor parcelable) Sep 17 07:32:44 napster: why not extend the Application class? Sep 17 07:33:18 i think both would be fine, though Sep 17 07:33:24 sampullman: hmm, I would have but, I need to fiddle with these objects when broadcasts are being received. Sep 17 07:34:05 Brodcast receiver class doesn't have getApplication() method as I understand. Sep 17 07:34:18 napster I wouldnt do it if there was anyway to avoid it Sep 17 07:34:29 sampullman, i ended up doing that. i was just afraid that the asynctask class would lock its instance variables while it's in use Sep 17 07:35:02 too much shit going on with androids activity manager and lifecycles and shit to go tossing a ton of crap in a singleton somewhere Sep 17 07:35:20 ron_frown: what's wrong with extending Application? Sep 17 07:35:24 ron_frown: sampullman : The base thing is I cannot bundle these obejcts as extras since they are not parcelable or serializable Sep 17 07:35:41 sampullman: nothing but broadcast receivers! :) Sep 17 07:35:48 why isnt it serializable Sep 17 07:36:32 ron_frown: Because they comes from a closed source library Sep 17 07:36:40 sampullman - nothing... but I just wouldnt go loading it up with a ton of data Sep 17 07:37:00 kepe in mind the scope of application, android cant/wont do any cleanup after the activity goes bye bye Sep 17 07:37:11 right Sep 17 07:37:18 data may be floating around Sep 17 07:37:33 So, what do you guys think about Singletons? Sep 17 07:37:35 but as for the broadcast receiver thing, doesn't onReceive get a context? Sep 17 07:38:15 sunny_slls: is that GT-p7300 a honeycomb device ? Sep 17 07:38:17 sampullman: Yes it does but not application context as I see, but I can't figure it out very clearly from the docs either Sep 17 07:38:57 may be some android gurus can clear it for us. :) Sep 17 07:39:18 g00s: nope Sep 17 07:39:23 g00s: sorry yes Sep 17 07:39:33 g00s: 3.1 version Sep 17 07:40:03 does you mug manifest on ics or above ? Sep 17 07:40:08 *bug :) Sep 17 07:40:52 g00s: sorry i didn't get you Sep 17 07:41:19 sunny_slls: what are the other 2 tablets ? Sep 17 07:41:25 (android versions) Sep 17 07:41:49 Or the question can be rephrased as "Is it possible to refer the application context from a broadcast receiver?, is yes how?" Sep 17 07:42:24 g00s: the other 2 are version 3.1 and version 4.0.4 Sep 17 07:42:47 interesting, so the other 3.1 device does not show the problem Sep 17 07:43:40 g00s: the other tablet with OS version 3.1 has 32GB internal memory and 1 GB ram Sep 17 07:43:57 Most HC devoces have a 48mb heap Sep 17 07:44:05 ron_frown: sampullman : Or I will need to experiment if I can pass the activity context and then call getApplicationContext() on it. That should theoretically work, isn't it? Sep 17 07:44:31 napster: i'd imagine you can just cast the context in onReceive to Activity, then call getApplication Sep 17 07:44:32 mmmmeh Sep 17 07:44:36 I'll just back out Sep 17 07:44:41 I dont want to contribute to badness Sep 17 07:44:47 hahaha Sep 17 07:44:57 sampullman: Thats what exactly I was thinking, and I typed faster than you ;) Sep 17 07:45:22 ron_frown: err...! Why it is badness?? Sep 17 07:45:27 ron_frown is right, though..that's not so good Sep 17 07:45:27 g00s: SimonVT actually i extracted build.prop file and got these configuration data Sep 17 07:45:29 dalvik.vm.heapstartsize=5m dalvik.vm.heapgrowthlimit=64m dalvik.vm.heapsize=288m Sep 17 07:45:59 better to make the objects parcelable Sep 17 07:46:00 sampullman: ron_frown But you have moral obligation to say, 'Why?' :D Sep 17 07:46:20 because I think the solution you are shooting for is probalby not the way to solve this problem correctly Sep 17 07:46:31 I do think its fine to implement an application class Sep 17 07:46:49 but understandling lifecycles and scopes is important Sep 17 07:47:03 ron_frown: hmm, agreed Sep 17 07:47:06 you'll be preventing android from cleaning up resources Sep 17 07:47:23 Still, better memory management Sep 17 07:47:24 I mean when your app is killed, your application shit will go waway Sep 17 07:47:47 ron_frown: And how will be the case if I choose to use a Singleton? Sep 17 07:48:18 SimonVT: You think extending the application implies better memory management? Sep 17 07:48:22 depending on singleton route, you may be building static initializer, which will be lifetime of the app, a variable on the application Sep 17 07:48:29 No, this was for sunny_slls Sep 17 07:48:35 oh sorry Sep 17 07:48:37 variable on application = memory consumed lifetime of tha pp Sep 17 07:48:40 If he is getting outofmemoryexceptions, he needs better memory management Sep 17 07:48:49 sure you can nullify etc Sep 17 07:49:07 but ideally you keep references to your data as short as you can get away with them Sep 17 07:49:38 hmm, ok. So what do you suggest? Sep 17 07:50:55 get your objects serializable Sep 17 07:51:00 which is easy enough to do Sep 17 07:51:04 or make them parcelable Sep 17 07:51:16 whats the nature of the data Sep 17 07:51:45 shit very worst case scenario, you should be able to json serialize that shit and deserialize Sep 17 07:51:49 I mean thats overhead you shouldnt need Sep 17 07:51:55 ron_frown: It is practically hard to make them extend. As you may know I'm using the Parse library. And these are parseObjects Sep 17 07:52:08 I dont know what parse is Sep 17 07:52:15 this is worst case, trust me Sep 17 07:52:30 just use gson to serialize deserialize to json Sep 17 07:52:38 at least once the flow is complete, the data is gone Sep 17 07:52:51 but I would choose parcelable or something before that Sep 17 07:53:06 ok Sep 17 07:53:21 dont be afraid to use application for stuff Sep 17 07:53:37 and hell if what you are sending across is tiny, I suppose it wouldnt be problematic Sep 17 07:53:54 but its kinda round about Sep 17 07:54:00 ok, the size of the data does matter Sep 17 07:54:54 ok, let me give it a try. Thanks a lot ron_frown & sampullman Sep 17 07:55:25 napster I didnt mean to sound harsh, but I'm trying to help save you from some of the mistakes I made when I was new Sep 17 07:55:47 ron_frown: no problem mat, I understand e :) Sep 17 07:55:53 theres a lot of shit that happens behind the scenes and it seems like any time I'd try to come up with workarounds they'd frequently bite me in the ass in the end Sep 17 07:56:09 hmm Sep 17 08:17:43 hello all, I create a surface view that just draws a bitmap continuously. Due to the performance issue, I set the bitmap and rescale the bitmap such that the size is fit the size of the Surfaceview. However, when I call getWidth and getHeight in SurfaceView, it returns zeros so that I cannot know the size of the view. How can I tackle this problem? Sep 17 08:18:12 getMeasuredWidth? Sep 17 08:20:07 alex_PP: what is the difference between measured width and width? Sep 17 08:23:22 it doesn't help Sep 17 08:25:24 when are you calling it? Sep 17 08:25:49 getWidth will return 0 until it's parent is measured Sep 17 08:25:53 its* Sep 17 08:26:50 i.e. when you call getWidth or getMeasuredWidth in onCreate Sep 17 08:28:33 surface views have holders. holders have the callback, which fires when it's sized Sep 17 08:28:37 I think that is the way Sep 17 08:30:05 you can override onSizeChanged and do it there Sep 17 08:30:56 Hi guys. Does anyone know how to fix this fucking INSTALL_FAILED_INSUFFICIENT_STORAGE issue with adb? I have sufficient storage space. I even put the android:installLocation="preferExternal" in the manifest. Each time I reboot, try again, and that works. I'm not on the emulator neither. Sep 17 08:31:01 It happens randomly. Sep 17 08:31:40 pcboy_: maybe there's a clue in logcat about what more specifically went wrong Sep 17 08:31:54 hello, I'm trying to use "adb pull" to get the .apk of an app I developed and put on my tablet, but it's not under /system directory (I guess it's for pre-installed apps only), but I can't find my app anywhere ... Sep 17 08:32:12 sampullman: I think it is called after onCreate Sep 17 08:32:41 sampullman: I have a button that open a Image.Pick intent to allow user to pick an image. Sep 17 08:32:43 yeah, do you absolutely need it in oncreate? Sep 17 08:33:20 sampullman: I don't call it onCreate Sep 17 08:33:25 oh Sep 17 08:33:43 I set the bitmap in onActivityResult Sep 17 08:33:56 if you can see the view, getMeasuredWidth should work Sep 17 08:33:57 that means, when the user selected an image Sep 17 08:34:51 I don't know, this is ok for fast device. For slow device, the screen is black, and then exception throw Sep 17 08:35:23 well, what does the stacktrace say? Sep 17 08:35:52 the stack trace is about Bitmap.createBitmap with zero size Sep 17 08:36:01 the size I input is the surface view size Sep 17 08:36:16 that's why I said the getWidth and getHeight return zero to me Sep 17 08:36:50 and you have tried getMeasuredWidth/height? Sep 17 08:37:12 yep, the same result Sep 17 08:37:56 alankila: Good call. I have a Failed to unmount container error. Device or resource busy. It can't unmount my app to replace it. Now I'm just wondering why. Sep 17 08:38:41 well, if the view isn't rendered at that point, they would return 0. otherwise, i don't know Sep 17 08:41:25 hello, I'm trying to use "adb pull" to get the .apk of an app I developed and put on my tablet, but it's not under /system directory (I guess it's for pre-installed apps only), but I can't find my app anywhere ... Sep 17 08:41:32 Morning All! Sep 17 08:42:04 Morning! Sep 17 08:42:09 getWidth wont return the width until the layout pass has executed (View.onLayout is called).. getMeasuredWidth wont return the width until the measure pass has executed (View.onMeasure is called) Sep 17 08:46:58 SimonVT: umm, but I still don't know why it returns 0 when I can getWidth in the view when onActivityResult Sep 17 08:49:16 Because your views have already been measured and laid out before you start the new activity, maybe Sep 17 08:50:59 then it should not be zero I think if the views have already been measured. Sep 17 08:52:44 I don't know what you're doing. Look, unless your view has been measured and laid out, getWidth/Height will return 0 Sep 17 08:54:34 Override the appropriate methods if you need to know when that happens Sep 17 08:56:09 SimonVT: ok, let me explain. I start an activity with a surface view which is invisible first. a button to ask user to select image. After selected image, onActivityResult is called and I call getWidth in the surface view. It returns zero for the width of the surfaceview. Sep 17 08:58:37 If it's invisible (View.GONE or View.INVISIBLE), then it's not being laid out Sep 17 08:58:45 If it's View.GONE, then it's not being measured Sep 17 09:00:08 If it's not being measured, getMeasuredWidth will return 0.. If it's not being laid out, getWidth will return 0 Sep 17 09:00:58 ok, let me try if this is visible Sep 17 09:04:28 the same problem…. : ( Sep 17 09:06:44 hello. Have anyone had any succes connecting an android 4.0 device to a bluetooth low energy peripheral? Sep 17 09:10:18 Jesper_: from what i can tell, android does not support BLE although some phones have BLE capable chipsets Sep 17 09:11:10 but iOS and WP8 do, fyi Sep 17 09:14:44 why is lint showing me an error message I fixed 5 days ago whenever I start eclipse? It's easy enough to get rid of it, but it's still annoying. Sep 17 09:16:07 g00s: yeah that was my conclusion as well. I have 2 test phones here with bluetooth 4.0 which should support BLE, but since the connection protocol is different from regular bluetooth, i cant use them :P Sep 17 09:16:59 http://imsresearch.com/press-release/Is_the_Google_Platform_Delaying_the_Bluetooth_Smart_Train Sep 17 09:18:19 i think its a big fuck up on google's part. two areas of mobile which are emerging are the shifting boundaries between phone / environment, and phone / human. sensors, which would be low power (Zigbee, BLE, etc) are not supported. this means android basically is incapable of participating in these trends at the moment Sep 17 09:21:39 g00s: just read the article, you're right. this is a fatal thorn in my eye :P my boss is kinda disappointed i havent gotten it to work yet, but that should shed some light on why at least :P Sep 17 09:26:14 ive got a list on my actionbar (abs), and it works etc, but itseems a little odd, when i first go into the screen the top item of the list is automatically called in opnItemSelected, and if i hit it again it wont call, only seems to call onItemSelected when i touch another option and go back Sep 17 09:26:16 Jesper_: yeah, hopefully your boss understands. its been a thorn in my eye also :P enough to cause me to switch to another platform Sep 17 09:26:34 Gaaaaaaaaaz Sep 17 09:26:39 is your game done yet :P Sep 17 09:26:41 :) Sep 17 09:26:44 did you get paid :P Sep 17 09:26:44 no :( Sep 17 09:26:55 g00s: yeah unfortunately I can't switch platform as that is not my decision to make Sep 17 09:26:55 still waiting for pay from client, working for new one now Sep 17 09:27:16 goos: found this though; http://code.google.com/p/broadcom-ble/downloads/list Sep 17 09:27:17 game hasnt done much but im demoing it at indie game movie premier in taiwan :) Sep 17 09:27:19 this week Sep 17 09:27:43 Jesper_: cool, thanks Sep 17 09:27:53 cant understand these lists on actionbars, theyre more like modes than list items Sep 17 09:28:11 id expect if u hit same one that is already selected it would simply call onItemSelected again Sep 17 09:30:13 Why are you assuming behavior when you can just read how it works Sep 17 09:30:23 Jesper_: if you are around sometime i'd like to ping you to see if this worked. Sep 17 09:30:26 well im not sure this is documented Sep 17 09:30:31 wher ewould i read it Sep 17 09:30:37 Javadocs? Sep 17 09:31:38 seems pointless that this feature behaves like this to me Sep 17 09:33:45 g00s: just found out that the HTC one S im working with now uses a Qualcomm, not a broadcomm bluetooth modem. "The HTC One X and One S use a Qualcomm Bluetooth chip, not Broadcom. Therefore the Broadcom SDK would not be expected to work" Sep 17 09:34:32 yeah, i would think the kernel and bluez need to support this, as well as the Bluetooth service in the framework Sep 17 09:54:14 hey guys when should we use the subclass the Application class and use it? Becasue we can do that via singleton class also Sep 17 09:56:40 but that singleton wouldn't be a context Sep 17 09:57:17 I use the application context as singleton and for caching data Sep 17 10:00:57 Is there a linux command which will tell you the manufacturer and model of an internal hard drive? Sep 17 10:02:42 Ankhwatcher, hdparm Sep 17 10:03:04 or smartctl Sep 17 10:03:13 EPG: format hdparm /dev/sdd? Sep 17 10:03:32 mephju: so that's means that i can use that application context anywhere right. Sep 17 10:03:45 hdparm -I /dev/sda Sep 17 10:03:52 mephju: what if i am not using that application context ? Sep 17 10:04:05 anywhere Sep 17 10:04:06 EPG, Leeds thanks Sep 17 10:04:39 <[deXter]> Ankhwatcher, Also, hwinfo --disk Sep 17 10:07:21 hey if i am calling one activity from another activity should i use this global context or should i pass the "this" (activity context)? Sep 17 10:07:56 calling one? you mean startActivity? Sep 17 10:12:43 sunny_slls, I always use the kind of context which is closest to the code I am writing Sep 17 10:13:22 also it's important to start activities always from an activity context... Sep 17 10:13:38 at least without setting flags in ur intent Sep 17 10:14:30 I got a question myself... 9 patch graphics don't work properly on my device but do so in the layout editor...anyone else experiencing this? Sep 17 10:14:49 mephju: but then we can always get global context from Context.getApplicationContext() Sep 17 10:15:08 mephju: why to subclass application for that ? Sep 17 10:15:55 to get ur own loging in there... Sep 17 10:16:01 logic Sep 17 10:16:07 not loging ;) Sep 17 10:17:14 mephju: i am not clear with this. can you please explain more Sep 17 10:18:05 i can have a singleton class for caching data Sep 17 10:18:08 right Sep 17 10:18:12 for example if you want to store some objects in the application context you have to subclass it Sep 17 10:18:57 mephju: like ? Sep 17 10:20:02 also the application context can then be accessed as a singleton which give u access to a context everywhere in ur app...this can't be achieved with a singleton unless u pass it a context which shouldn't be done unless it's the application context....so u can just sublass it.. Sep 17 10:20:44 mephju: ok Sep 17 10:22:57 mephju: so you mean that class will provide you with the global context like the Context.getApplicationContext as well as it will behave as a singleton class. Right ? Sep 17 10:24:28 OnKeyListener events not firing for my EditText Sep 17 10:26:24 mephju: because though i have an application class but i am not using its context anywhere else which i think is not a good way of writing code. Sep 17 10:27:26 mephju: you there ? Sep 17 10:28:22 peter Sep 17 10:30:06 how can I make the application constantly portrait? Sep 17 10:30:40 blah just going to use TextWatcher Sep 17 10:31:22 superlinux-hp: you have to mention that in the manifest file in the activity Sep 17 10:31:39 add a parameter android:orientation="portrait" Sep 17 10:31:51 ok Sep 17 10:33:29 mephju: are you there ? Sep 17 10:38:22 sunny_slls, where in the activity? eclipse is not showing anything in the tag Sep 17 10:38:46 sunny_slls, I would still use the application context instead of a singleton Sep 17 10:39:06 superlinux-hp, in the manifest file Sep 17 10:39:50 hi, can someone help me out in preparing an android app? Sep 17 10:40:01 mephju, the manifest is not showing this attribute as i type in eclipse Sep 17 10:41:16 i found it Sep 17 10:41:18 good! Sep 17 10:42:01 android:screenOrientation="portrait" !!! Sep 17 10:42:32 mephju: Sep 17 10:42:36 ok Sep 17 10:42:46 Hello world ! Sep 17 10:45:43 mephju: last question . Which is better to pass to intent whille starting another activity . "this" or the global Application Context? Sep 17 10:45:54 mephju: i think the global application context . Sep 17 10:45:59 right ? Sep 17 10:46:02 sunny_slls, the activity context Sep 17 10:46:45 the activity context is "this" in ur activity class Sep 17 10:51:23 mephju: correct but then you can pass the global context also Sep 17 10:51:53 its safe to use that because then we will have less chance of memory leak Sep 17 10:55:04 sunny_slls: You can't have memory leak when using global or local Context with startActivity Sep 17 10:56:23 cyrilmottier: but if we create a view using that local context and make that view as static then it can easily have a memory leak right Sep 17 11:04:59 sunny_slls: yes but that it totally different from startActivity Sep 17 11:05:23 okay Sep 17 11:05:32 And a View should always be built using an Activity-Context Sep 17 11:05:51 cyrilmottier: why is it so ? Sep 17 11:06:32 They're tried to the activity lifecycle.. And it'll probably crash otherwise Sep 17 11:06:52 s/tried/tied/ Sep 17 11:25:18 what's the best practice regarding alarms and time zone changes, i.e. when the time zone is changed after an alarm was set via AlarmManager? If I set an alarm to 20:00 UTC and then change time zone to UTC+1, the alarm will still trigger at 20:00 UTC, but maybe an user would expect it to _always_ trigger in his local time. Should I simply change the alarm to fit this idea or maybe ask the user when he changes the time zone? Sep 17 11:33:43 EPG: Is this an automated change, such as Daylight Savings Time or Summer Time? Sep 17 11:33:50 the most useful to me seems to have a setting that handles the default handing of this, and the ability to set it per individual alarm if they want to Sep 17 11:34:42 i would want an alarm that is utc stable sometimes (like chat appointments with somebody somewhere) and local alarms (when to get up in the moring) Sep 17 11:34:47 I've found mine useful that I set it to a "common" timezone, like "Central Standard", so I know my alarm will ring 8am Central Time, even if it changed from CST to CDT overnight. Sep 17 11:35:17 yea Sep 17 11:39:24 if i schedule an alarm for tomorrow 8h and tonight would start DST, would the alarm trigger on 8h or 9h? Sep 17 11:40:45 anyone knows if android supports bluetooth 4.0 and bluetooth 4.0 low energy ? Sep 17 12:07:16 i have a phone with hdmi out. how can i record my app? anyone tried this? Sep 17 12:07:20 MikkelDK: nope Sep 17 12:09:07 MikkelDK: Jesper_ and g00s were discussing it earlier Sep 17 12:15:29 hello :) Sep 17 12:15:34 hey Sep 17 12:15:49 anyone experience with parsing html and displaying it more properly in an ap Sep 17 12:15:53 app* Sep 17 12:15:54 ? Sep 17 12:19:01 how do you mean Sep 17 12:19:14 you could use a WebView Sep 17 12:24:45 luyang: http://www.novaprojecten.nl/roosters/lbl/basis/38/c/c00247.htm Sep 17 12:25:04 try to parse it and change it to native android display without a webview Sep 17 12:25:04 ok whqat do u wanna do with it Sep 17 12:25:16 sorry, i read minds. Sep 17 12:26:40 iSeeDeadPixels: have you read http://stackoverflow.com/questions/2188049/parse-html-in-android ? Sep 17 12:38:59 hi room Sep 17 12:51:09 Hi, instead of drawing a String to a Canvas, I want to draw a Spanned. How do I do this? Sep 17 12:52:35 Look at how textview does it Sep 17 12:57:05 grrr... Sep 17 12:57:21 how do i change a textview in Class A from Class B? Sep 17 12:57:38 findViewById is not recognized as i've not extended class b. Sep 17 13:00:02 ((Activity) getContext()).findViewById(...) Sep 17 13:00:26 but that's ugly. better to pass in a reference. have the activity wire them up Sep 17 13:00:29 getContext is not recognized :( Sep 17 13:00:47 uhh? Sep 17 13:00:56 what is class A and what is Class B Sep 17 13:01:20 ^_^ Sep 17 13:03:13 if class A and B are both activities, consider setting some value that A will poll for in its onResume Sep 17 13:03:19 alternately, consider using startActivityForEsult Sep 17 13:03:56 if A is an activity but B is not an activity, consider passing an interface which A implements to B, with some method like setFooText(String text) which A will handle via a handler Sep 17 13:04:04 be careful not to cache/leak the activity Sep 17 13:05:02 when building a signed app via netbeans with the android plugin i get the following exception when i try to install it 09-17 15:02:43.861: W/PackageParser(1359): Exception reading res/drawable/buttonpanelshade.xml in /data/app/vmdl-1050960386.tmp Sep 17 13:05:26 is this something i have done wrong or is it a problem with the ide? Sep 17 13:05:28 * lov shrugs Sep 17 13:05:32 I have no experience with netbeans. Sep 17 13:05:40 Consider building from the command line and see if that works. Sep 17 13:07:08 i'll try, haven't done it before but i suppose there is a first for everything =) Sep 17 13:08:08 see http://developer.android.com/tools/building/building-cmdline.html Sep 17 13:08:20 you'll need ant installed, and you'll need your SDK to be in your paths Sep 17 13:09:17 do people here hate Ant they way ##java does? Sep 17 13:11:02 possibly. I don't think it really comes up Sep 17 13:11:14 we're kind of stuck with ant until a new and improved build setup is released by google Sep 17 13:11:17 there is maven these days, apache maven Sep 17 13:11:38 Right, but in 2008 when the SDK was released, there was ant. Sep 17 13:11:48 :) Sep 17 13:12:15 people seem to hate maven even more than ant :P Sep 17 13:12:29 is there a java implementation of a /dev/log/ reader? Sep 17 13:12:50 asfdd: odd, in #java they were all about Maven over Ant to the point of being ready to ban me over it. Sep 17 13:13:17 Ge0rG: no idea. doubtful. Sep 17 13:13:21 feel free to make one though! Sep 17 13:13:50 hmm, Wavefront OBJ readers in Java seem to be rather rare, in part because com.sun.j3d has a reader already Sep 17 13:13:54 but of course I lack that on Android Sep 17 13:13:56 lov: I'm only trying to work around http://code.google.com/p/android/issues/detail?id=36869 Sep 17 13:14:26 hi. how can I set the spacing between gridveiw elements? Sep 17 13:14:51 when i build my app wihtout signing it it installs fine. I guess there is somehting buggy with the IDE's signing script Sep 17 13:14:56 Ge0rG: haha, nice Sep 17 13:15:14 superlinux-hp: its described on d.android.com at gridview Sep 17 13:15:23 lov: not at all. its causing 1-star-reviews and refund requests for me... :( Sep 17 13:15:41 Ge0rG: Why exactly does your app need to read from the radio logs anyway? Sep 17 13:15:48 I would consider that kind of an edge case Sep 17 13:16:03 lov: because there is no app-accessible API to find out if an incoming call is forwarded Sep 17 13:16:11 interesting. Sep 17 13:16:29 Ge0rG: drop support for the Galaxy Nexus in market until this is fixed is my suggestion. Sep 17 13:16:34 uncheck that box, sir Sep 17 13:16:47 I'm assuming that the device must be rooted? Sep 17 13:16:50 lov: there are also people upgrading their OS who already have the app Sep 17 13:16:53 lov: negative Sep 17 13:16:57 Hmm Sep 17 13:17:11 logcat is just a permission, no root required Sep 17 13:17:16 well Sep 17 13:17:19 except it fails on 4.1.1 Sep 17 13:17:19 READ_LOGS is just a permission Sep 17 13:17:29 logcat, up to that device, requires just that permission Sep 17 13:17:35 lov: I know Sep 17 13:17:42 however, you might want to take a look at AOSP and see if something's changed. Sep 17 13:18:01 lov: you can test with alogcat/catlog on a 4.1.1 nexus to reproduce Sep 17 13:18:02 Make an AOSP build, flash your phone, see if you can reproduce; if not, vendor problem. if you can, you can dig down deeper Sep 17 13:18:15 I don't have a 4.1 nexus unfortunately Sep 17 13:18:19 vendor = google in that case Sep 17 13:18:22 eh Sep 17 13:18:43 I wouldn't be surprised if sammy did something at the lower levels Sep 17 13:19:03 for the galaxy nexus? surprising indeed Sep 17 13:19:36 Well, the VZW galaxy nexus is basically NOT a nexus device Sep 17 13:19:43 considering it comes preloaded with garbage iirc Sep 17 13:19:58 I've got a maguro nexus where it fails Sep 17 13:20:15 well, I don't really have any extra information to give you. Sep 17 13:20:26 Flash an AOSP build with extra logging, see if you can track it down. Sep 17 13:21:10 I'm gonna ask a pretty hard question (not sure if it is really hard anyway). I see the everyme app does implement a flow in which a view gets resized when keyboard appears and another view gets floated over the keyboard. But I implemented this by using android:windowSoftInputMode="adjustResize", but what I observe from the everyme app is that the floated view stays there even if the keyboard is removed from foreground : http://i.troll.ws/b8b8927a.p Sep 17 13:21:11 ng Sep 17 13:21:13 Do anyone have any idea how to create this flow? Sep 17 13:22:31 napster: probably using windowmanager tricks Sep 17 13:22:39 napster: just the same, you want to recreate BROKEN behavior? Sep 17 13:22:56 lov: why it is broken? Sep 17 13:23:03 it is not broken at all :) Sep 17 13:23:12 "but what I observe from the everyme app is that the floated view stays there even if the keyboard is removed from foreground Sep 17 13:23:36 if you change your view to accomodate the keyboard, you probably want to change it BACK when the keyboard is gone. Sep 17 13:23:51 or, you can intentionally chop off 50% of the usable space just because, but hey, up to you. Sep 17 13:24:03 lov: not exactly, See the second screenshot in the image, that free area can be used for setting an image there :) Sep 17 13:24:44 maybe I'm misunderstanding. Sep 17 13:24:50 Do you want that extra space to ALWAYS be there? Sep 17 13:24:57 or do you want it to not be there until the keyboard comes up Sep 17 13:25:53 lov: I don't want it till the keyboard comes up, but as the textview is gonna get focused and anyway the KB is going to come up Sep 17 13:26:10 I just wanted to implement that flow as it is. Sep 17 13:26:10 ... assuming that the device only has a soft keyboard. Sep 17 13:26:18 if the device has a physical keyboard this may not happen. Sep 17 13:26:18 yes lov correct Sep 17 13:26:25 agreed Sep 17 13:26:32 you may also have custom keyboards which are only microphones, etc. Sep 17 13:26:34 anyway! Sep 17 13:26:38 you'll get your window adjusted Sep 17 13:26:44 keep track of your original size vs your new size Sep 17 13:26:51 yes Sep 17 13:26:53 this will give you an idea of what space the keyboard is taking Sep 17 13:26:56 and then relay out as appropriate Sep 17 13:27:01 re-layout Sep 17 13:27:06 yes re-layout Sep 17 13:27:12 you'll probably have to do significant trickery and tinkering to make this work nicely Sep 17 13:27:18 forcing views to certain heights, etc. Sep 17 13:27:54 when using setBackgroundDrawable for imageSwitcher, i cannot scale the image.. why? Sep 17 13:27:58 lov: Actually they are doing it very nicely, may be I should take a video of it now. Sep 17 13:28:08 yeah, please do, I don't really understand why you're bothering. Sep 17 13:28:43 on the other side, when using setImageDrawable, scaling works, but after two clicks i get out of memory exception Sep 17 13:30:36 SimonVT: I've just tried Canvas.drawText(CharSequence ...) since Spanned is a CharSequence, but it completely ignores any markup. Sep 17 13:31:48 j4hr0m: setBackgroundDrawable is View method, and has nothing to do with viewswitcher apart from it extending view Sep 17 13:32:08 Hey all... SQLiteOpenHelper opens a Writable database instance even if getReadableDatabase() is called. Won't this forbid opening the database multiple times? Sep 17 13:32:30 SimonVT: so, what could be a solution? Sep 17 13:32:42 Use smaller bitmaps Sep 17 13:33:31 Lachezar: it depends what you mean. Sep 17 13:33:40 Lachezar: if you mean multiple processes, please don't do that anyway! Sep 17 13:33:53 if you mean multiple times within the same app, a singleton is used so you're given the same object iirc Sep 17 13:34:22 lov: Well... I am having trouble with background synchronisation. Sep 17 13:34:56 lov: I hate singleton... I am following the tutorials, and an opening the database in onCreate() and closing it in onDestroy() Sep 17 13:34:56 Isn't that only the case when the database doesn't exist? Sep 17 13:35:54 lov: The problem arises from background synchronisation: I had to rework my aactivities to open a read-only database, so that they don't crash when I open them while synchronising (with a transaction). Sep 17 13:36:17 lov: But now... I am not sure if that actually makes sense :( Sep 17 13:39:55 Anyone know why sharp is rendered with excess space around it? It seems to have an extra space before and after it. Sep 17 13:41:09 SimonVT: could i use a simple ImagView instead? Sep 17 13:42:02 I don't know, can you? Sep 17 13:42:41 yeah, but it is still not scalable... Sep 17 13:42:42 Does it do what you want? Then you can Sep 17 13:43:00 Are you still trying to use setBackgroundDrawable? Sep 17 13:44:11 yeah.. :/ Sep 17 13:44:23 It's still a View method Sep 17 13:44:38 what does this mean? Sep 17 13:44:49 All views inherit it from View Sep 17 13:44:57 It simply sets the background image to the drawable you pass Sep 17 13:45:00 It does nothing else Sep 17 13:45:14 Seeing as I was trying to use Spanned for subscript decimal digits, I tried using the Unicode subscript digits 0..9. However, only 1, 2, 3, and 4 render, the others are missing and are replaced by a rectangle. Grrr! Sep 17 13:45:25 so what method should i use? Sep 17 13:45:35 For ImageView? setImageDrawable Sep 17 13:47:44 ok, this does scale my image, but i want to reuse the resources, i need only one image loaded at a time Sep 17 13:48:17 something like. recycle() Sep 17 13:48:57 How do I draw "F♯4" (F sharp subscript 4) on a canvas? Sep 17 13:49:45 Currently I get "F ♯ 4" (F space sharp space 4). Sep 17 13:50:38 SimonVT: thanks so far Sep 17 13:53:12 regarding my question, class A Extends Activity, Class B does not extend anything as i want to parse HTML with that class... Sep 17 13:53:15 ok, i think, i got it Sep 17 13:54:01 now trying to use imageswitcher Sep 17 13:54:39 lov: My Nexus is not rooted, so I'm unable to install any screen recorders. Sorry for that, but I have uploaded the video on youtube. Please take a look : http://www.youtube.com/watch?v=jeKOwp5DfSU Sep 17 13:55:54 napster: hahaha Sep 17 13:55:54 yeah Sep 17 13:55:58 they're doing any sort of overlay on top Sep 17 13:56:06 they're just re-laying out their layout Sep 17 13:56:13 except that they screw up when the keyboard is hidden Sep 17 13:56:15 this isn't a feature. Sep 17 13:56:16 but I wonder how! Sep 17 13:56:35 email them and ask. Sep 17 13:56:52 :) Like they are gonna respond! Sep 17 13:57:02 they might! Sep 17 13:57:38 Custom viewgroup and View.fitSystemWindows() .. Get the insets when you know the keyboard is visible, keep positioning your view there Sep 17 13:58:29 SimonVT: not sure I understand a thing! Can you elaborate a bit? Sep 17 13:59:52 "Called by the view hierarchy when the content insets for a window have changed, to allow it to adjust its content to fit within those windows. The content insets tell you the space that the status bar, input method, and other system windows infringe on the application's window." Sep 17 14:00:33 Hello there! Sep 17 14:00:35 insets.top would be the size of the status bar on a phone Sep 17 14:00:46 insets.bottom would be the size of the input method when that is visible Sep 17 14:01:14 or rather, insets.top would be the bottom position of the status bar.. insets.bottom would be the top position of the input method Sep 17 14:01:39 I want to send logs with ACRA. Sending by email works but sending to the google doc doesn't. Logcat says that acra sent it, but why doesn't it show up in the google doc? Sep 17 14:02:01 SimonVT: hmm somewhat understood, can you point me the docs for this stuff please? Or just tell which classes I should look up Sep 17 14:02:40 Well, you could look in View.. Under the method fitSystemWindows Sep 17 14:02:47 Has anyone set up acra to send to a google doc successfully? Sep 17 14:03:11 SimonVT: ty, let me look at it Sep 17 14:06:21 Forget it, found the problem. Sep 17 14:09:43 ham Sep 17 14:12:33 How would one force the the soft keyboard closed from switching to another fragment programmatically? It seems to ask for a IBinder and I'm not sure what to put. People seem to put EditText but i dont have one at that point. Sep 17 14:12:35 mehhh Sep 17 14:12:40 AsyncTask is annoying. Sep 17 14:12:49 do i really need to make a new class file for it? :s Sep 17 14:13:19 iSeeDeadPixels: no you can define it in the same class file Sep 17 14:14:05 iSeeDeadPixels: no, you can create inner classes, and anonymous inner classes Sep 17 14:14:28 new AsyncTask = new AsyncTask() { doInBackground() { .....} }.start(); Sep 17 14:14:38 er Sep 17 14:14:58 s/new AsyncTask =/AsyncTask task =/ Sep 17 14:15:01 So much fail right there Sep 17 14:15:04 ._. Sep 17 14:15:10 s/.start()/.execute()/ Sep 17 14:15:12 or just leave off the assignment, you don't need it Sep 17 14:15:14 WHATEVER Sep 17 14:15:16 I MAKE MY OWN RULES Sep 17 14:15:20 CAN'T STOP THIS. Sep 17 14:15:27 * lov segfaults Sep 17 14:16:32 * Hodapp looks at lov Sep 17 14:16:34 * adq does not allow segmentation fault Sep 17 14:16:58 (no memory space available to segfault :p) Sep 17 14:17:03 lov, SimonVT, http://pastebin.com/zWMrbEF0 Sep 17 14:17:24 * iSeeDeadPixels obviously fails. Sep 17 14:18:16 jsoup is awesome for scrapping from web to android app Sep 17 14:18:20 i'm just mucking around... Sep 17 14:18:33 yeah, that's what i am trying to do >< Sep 17 14:18:47 to be exactly, i'm trying this: http://www.novaprojecten.nl/roosters/lbl/basis/38/c/c00247.htm Sep 17 14:19:19 but i think i'm doing something wrong with putting TWO classes in one class file. Sep 17 14:19:37 no clue for that :) but "het is goed" ^^ Sep 17 14:19:58 dutch /o Sep 17 14:20:21 nee, but i was in your country few years :p dus ik kan spreke een betje ;-) Sep 17 14:20:28 All I can think when I read your method name: http://en.wikipedia.org/wiki/Rooster Sep 17 14:20:31 hi! I have a problem closing a ProgressDialog opened in a thread when the thread ends Sep 17 14:20:47 SimonVT, Rooster means Roster in dutch methinks >< Sep 17 14:20:58 iSeeDeadPixels: i dont even what are you Sep 17 14:21:05 lov, how so? Sep 17 14:21:07 He's dutch Sep 17 14:21:21 roster chicken :p Sep 17 14:21:33 but meh, what the hell am i doing wrong, eclipse is being annoying with all the errors. Sep 17 14:21:38 iSeeDeadPixels: oh, I misunderstood Sep 17 14:21:43 iSeeDeadPixels: this is totally cromulent. Sep 17 14:21:50 You can have private INNER classes Sep 17 14:21:57 you cannot, however, have multiple OUTER classes in the same file Sep 17 14:22:05 so! Sep 17 14:22:12 thanks =3 Sep 17 14:22:27 place your getRoosterTitleTask class INSIDE of your RoosterParser Sep 17 14:22:30 additionally! Sep 17 14:22:40 non-static inner classes contain a reference to the parent class Sep 17 14:22:42 Cromulent is a perfectly cromulent word Sep 17 14:22:47 if this is NOT what you want, you should make it a static inner class Sep 17 14:22:50 (use the static keyword) Sep 17 14:23:08 sonofab... not working >< Sep 17 14:23:42 HOW HARD CAN IT BE TO USE JSOUP IN THE > Honeycomb SDK :C Sep 17 14:23:53 WHAT IS THE ERROR Sep 17 14:23:55 WHY ARE WE YELLING Sep 17 14:23:58 stupid can't make web calls on the main thread :| Sep 17 14:24:03 network* Sep 17 14:24:16 SimonVT, i can't get that async task to work! :C Sep 17 14:24:31 so i can use jsoup, and download the frakkin' HTML! :C Sep 17 14:24:42 iSeeDeadPixels: several things. Sep 17 14:24:54 iSeeDeadPixels: first off, in your catch, you should probably use logcat to dump that error so that you get a nice stacktrace Sep 17 14:24:57 Does it literally say "I can't get that async task to work! :C" when it fails? If no, that's not really an error Sep 17 14:25:00 cant I use several different paths in a canvas when I use multiple paints? Sep 17 14:25:05 second, how are you invoking your asynctask? Sep 17 14:25:15 anything performed in doInBackground will NOT be in the UI thread. Sep 17 14:26:07 http://developer.android.com/reference/android/os/AsyncTask.html cannot be more clear & simple Sep 17 14:26:08 ahoy Sep 17 14:26:44 are there pitfalls when displaying a dialog in onPause() to display some kind of warning? Sep 17 14:27:09 best would be not to actually pause() but wait with that until the dialog has been confirmed by the user Sep 17 14:27:41 something like "You have unsaved data... [ Save ] [ Cancel ] [Quit ]" Sep 17 14:27:49 or is there an "android way" to achieve that? :) Sep 17 14:28:06 sounds annoying Sep 17 14:28:10 the dialog itself should prevent any other activity action by the user, until it is dismissed Sep 17 14:28:14 don't think you can do that Sep 17 14:28:18 .... huh? Sep 17 14:28:29 i use a dialog to prevent quitting and if user confirm on the dialog.. hop -> finish() Sep 17 14:28:37 so simple, if user uses back, it cancels and it does not quit Sep 17 14:28:51 you can't refuse to pause in onPause Sep 17 14:28:52 you have to draw a finite state automate rigid :) Sep 17 14:28:59 rigid: you can override the onBackPress event to display a dialog if necessary; just bear in mind that the user can also press the home button, which you CANNOT prevent. Sep 17 14:29:46 lov: ahm... i wanted to use the onPause() method for that reason... hm Sep 17 14:29:55 adq: lol Sep 17 14:29:58 you have to hook keypress Sep 17 14:30:07 so the home button will not be trigger by the os but first by your app Sep 17 14:30:29 er, what? Sep 17 14:30:35 adq: sounds hackish... i have the possibility to show a "read once dialog" at the start of the app, i'd rather do that then Sep 17 14:30:39 rigid, no joke, draw a little scheme and all is suddenly visible :) Sep 17 14:30:59 you *can't* block Home Sep 17 14:31:03 yes you can Sep 17 14:31:06 like back Sep 17 14:31:08 adq: what are you trying to point out? the activity lifecycle? Sep 17 14:31:10 or search Sep 17 14:31:45 public boolean onKeyDown(int keyCode, KeyEvent event) Sep 17 14:31:56 inside you check KeyEvent.KEYCODE_etc... Sep 17 14:33:10 if (keyCode == KeyEvent.KEYCODE_BACK) Sep 17 14:33:11 { Sep 17 14:33:11 show_exit(); Sep 17 14:33:11 return true; Sep 17 14:33:11 } Sep 17 14:33:24 yes, you can catch Back... but not Homne Sep 17 14:33:25 this prevent back from being used and pop a dialog as i described above Sep 17 14:33:32 you can do same with KEYCODE_HOME i think Sep 17 14:33:34 and it's trivial. Sep 17 14:33:36 ye gods use a pastebin Sep 17 14:33:47 come on it's 4 lines, but i will not do it again sorry Sep 17 14:33:59 er... 5 lines Sep 17 14:34:00 adq: you can't block home. Sep 17 14:34:13 you can get the keycode that the user presses, but the launcher activity will be started whether you want it to or not. Sep 17 14:34:29 if you try to interfere by launching your own activity on top or something, you are a shitheel and you deserve a long painful death. Sep 17 14:34:31 if you long press home, it launches the launcher activity right? Sep 17 14:34:37 no Sep 17 14:34:40 if you click home (in normal condition too), it goes to your desktop? Sep 17 14:34:40 if you PRESS home, period. Sep 17 14:34:44 hum ok Sep 17 14:34:49 if you long-press home, it shows the list of recent apps Sep 17 14:34:55 so I have an old repo checkout that still refers to android.git.kernel.org- is there a way to update the URLs without having to re-download the whole thing again? Sep 17 14:34:56 (except on devices which actually have a button for that) Sep 17 14:34:57 technically it sounded feasible :p Sep 17 14:35:00 it's not. Sep 17 14:35:01 and i see app doing it also iirc Sep 17 14:35:08 please, please, PLEASE don't try to block the user from pressing home. Sep 17 14:35:16 agreed it is against the guideline Sep 17 14:36:30 my mistake and lov is right about HOME key: "As per Android core concepts, no application can alter the behaviour of the Home button." Sep 17 14:36:59 any experienced game developer ? I have a question ... Sep 17 14:42:10 adq: At least not without root. Sep 17 14:43:09 How can I force the soft keyboard to close if I'm just swapping fragments? Sep 17 14:48:43 adq: I'm thinking of adding a lock mode to my app such that it activates the lockscreen underneath itself such that if it quits the phone is locked (like the clock app), and possibly also block all buttons and quit from menu to avoid a 'guest' accidently getting locked out. Sep 17 14:49:33 s/buttons and quit/buttons, and instead quit/ Sep 17 14:51:36 How do I draw "F♯4" (F sharp subscript 4) on a canvas? Currently I get "F ♯ 4" (F space sharp space 4). Sep 17 14:52:56 JamesJRH, Html.fromHtml ? Sep 17 14:53:02 sub & sup are supported tags i think Sep 17 14:53:49 adq: Yes, I have a Spanned but I don't know how to draw it to a Canvas. Sep 17 14:54:09 i read somewhere that textview does not use the "normal" draw method but a one inherited from Sep 17 14:54:16 http://developer.android.com/reference/android/text/Layout.html & http://developer.android.com/reference/android/text/DynamicLayout.html Sep 17 14:54:41 so it might be usefull to have the bricks for drawing formatted html on a canvas as textview is capable Sep 17 14:55:39 the canvas.drawText will probably fail with spannable resulting in what you described above Sep 17 14:58:09 ... Sep 17 14:58:27 adq: I'm so confused with this... Sep 17 14:59:14 on a custom view, using in onDraw method the canvas.drawText to display text will not work with Html.fromHtml to interpret supported tag and displayed them Sep 17 14:59:34 Is there really no way to force the soft keyboard hidden. Jesus christ. Sep 17 14:59:37 , but when we look at how textview is supporting html.fromHtml to properly display formatted content Sep 17 14:59:45 the trick is in: it's not the same ondraw method Sep 17 14:59:56 frankbro|work, yes there are ways Sep 17 15:00:13 anyone get the new Fire HD? and are you able to connect to ADB? Sep 17 15:00:28 adq: not thru InputMethodManager at least Sep 17 15:00:38 unless I go through a really hacky way, theres no force close Sep 17 15:03:10 adq: So I'm looking at Layout... I'm trying to work out how I can replace canvas.drawText with it... Sep 17 15:03:58 frankbro|work, http://stackoverflow.com/questions/1109022/close-hide-the-android-soft-keyboard <- one of their solutions should work for you :!) Sep 17 15:06:22 adq: I dont have a EditText. These methods need one except one, which doesnt work. Sep 17 15:07:20 JamesJRH, http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/TextView.java in the middle: Sep 17 15:07:24 Sets the string value of the TextView. TextView does not accept HTML-like formatting, which you can do with text strings in XML resource files. To style your strings, attach android.text.style.* objects to a SpannableString, or see the Available Resource Types documentation for an example of setting formatted text in the XML resource file. Sep 17 15:07:48 oO sounds complex little by little lol Sep 17 15:09:29 Gulp! Sep 17 15:12:00 adq: I could just show you the tiny bit of code I'm trying to improve. Lines 301..306 of https://gitorious.org/hexiano/hexiano/blobs/master/Hexiano/src/hexiano/HexKey.java#line300 , 'label' is now a Spanned rather than a String. Sep 17 15:12:38 hey you're doing something related to audio? :) Sep 17 15:12:46 Yes. Sep 17 15:12:53 cool ! Sep 17 15:13:00 :-) Sep 17 15:13:04 i'm coding an audio app right now :) Sep 17 15:13:18 a beatbox (tr 808) + bass line (tb 303) + many effects Sep 17 15:13:25 all in real-time \o/ Sep 17 15:13:43 but i don't have yet implemented midi protocol yet Sep 17 15:13:57 adq: Me neither. Sep 17 15:14:29 http://www.tuningbell.com/isokeys <- that is what you're forking so? Sep 17 15:14:30 adq: Is this any use?: https://github.com/kshoji/USB-MIDI-Driver Sep 17 15:15:03 thx i will look on it, it's not a big challenge to port midi (which is already ported in java i'm sure) to android :) Sep 17 15:15:08 there are midi2 also now iirc Sep 17 15:15:14 s/are/is/ Sep 17 15:15:40 adq: Sort of... I forked IsoKeys before TuningBell existed. Sep 17 15:15:53 ok! looks like fun Sep 17 15:15:59 IsoKeys is no longer Open-source. :-( Sep 17 15:16:01 maybe i will add an iso pad in my app :p Sep 17 15:16:13 JamesJRH, ah :( to be honnest, the app i dev is not open too :( Sep 17 15:16:26 i'm probably to afraid to show my code ;(-) Sep 17 15:16:31 too* Sep 17 15:17:21 adq "which is already ported in java i'm sure": Yes, but Android ripped that bit out IIRC. Sep 17 15:17:30 JamesJRH, https://plus.google.com/u/0/b/109567460627994201565/109567460627994201565/posts/4sR1wuEbfVb (DISCLAIMER: this is not promo or adv lol) Sep 17 15:17:44 yesterday first sounds from the bassline got out :D <- so glad Sep 17 15:18:47 my main problem is the performance ;( Sep 17 15:19:00 ui + audiotrack + few threads... android on the knees Sep 17 15:20:58 anyway, isomorphic kbd sounds crazy Sep 17 15:22:25 adq: Looks good, you're definitely better at this than me. Although, as a general rule, I tend to stick to FDroid apps unless I really need it and the permissions aren't to bad. Sep 17 15:23:08 f-droid is a good repo :-) Sep 17 15:23:09 adq: It is a little at first, but it's easier to learn. Sep 17 15:23:14 :-) Sep 17 15:23:48 yeah i don't care anymore perm because my device is rooted so i already enforce all the critical one Sep 17 15:23:51 You got kinda lazy with the sinus button, huh Sep 17 15:24:01 problem is some app crash sometimes because they don't handle properly a rejection Sep 17 15:24:30 SimonVT, lol yes :D it's totally a prototype, i plan to add it in next release Sep 17 15:24:45 problem is performance ;( perf perf perf ;( Sep 17 15:25:16 ^_^ Sep 17 15:25:49 adq: I've actually been aproached by FDroid recently, but there's a couple of issues first. Sep 17 15:27:21 for those who didn't know (i discovered that stuff recently.. shame on me lol), the strictmode is very usefull at finding UI lock: just add these 2 lines at beginning of onCreate: Sep 17 15:27:22 StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build()); Sep 17 15:27:23 StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build()); Sep 17 15:27:27 :thumb up: Sep 17 15:27:43 don't forget to remove them when not needed.. Sep 17 15:28:54 Aren't all the checks enabled on newer devices anyway? Sep 17 15:29:18 i have no clue, but it also impacts the performance to use the strictmode Sep 17 15:29:24 so i doubt by default it is enabled Sep 17 15:29:39 (started from API9) Sep 17 15:29:52 JamesJRH: I can't download the FDroid.apk. Anything I should know? Sep 17 15:29:53 I don't know if it Sep 17 15:29:54 's Sep 17 15:29:57 only debug builds Sep 17 15:30:01 But stuff like network is on Sep 17 15:30:05 Pretty sure disk read/write is as well Sep 17 15:30:06 yes normally it's for debug build Sep 17 15:30:09 i ommited few lines Sep 17 15:30:18 as "if (BuildConfig.DEBUG) {" Sep 17 15:30:20 * Lachezar apologises... Should send a personal message. Sep 17 15:30:21 As long as your targetSdk is appropriately high Sep 17 15:30:52 No, I mean. e.g. if your targetSdk is >= 10, it will detect network on main thread Sep 17 15:31:02 And I'm pretty sure the same is the case for disk read/write Sep 17 15:31:24 Might be wrong about those.. but network is Sep 17 15:31:39 i believe you :) Sep 17 15:32:52 Lachezar: What? From http://f-droid.org/ ? Sep 17 15:37:08 Lachezar: Download link in 2nd paragraph. Just realised there is a broken download link in the 'INSTALLING' section that just redirects to the current page. Sep 17 15:38:02 i confirm. Sep 17 15:39:13 JamesJRH: yes, the link is broken, but very weirdly... It just redirects to the home page. Sep 17 15:39:48 JamesJRH: And the QR Code contains th ebroken URL. Sep 17 15:41:05 Lachezar: I'll let them know. Sep 17 15:41:13 Hi All! Sep 17 15:42:21 I am trying to use RENDERMODE_WHEN_DIRTY but if I do not call renderRequest twice in a row it just extis the GLThread. Is this a known bug in GLSurfaceView? Sep 17 15:43:14 I'm working with a webView in android, and the thing is that my app needs to a load a site with an untrusted certificate, so for that I'm using the method onReceivedSslError --> handler.proceed(); Sep 17 15:43:33 JamesJRH: The version in the URLs is 'old' too :-/ Sep 17 15:43:40 but something times, the app crahes Sep 17 15:43:54 i'm getting really annoyed with asynctask and stuff :| Sep 17 15:44:00 guys, I know pretty advanced java and android but I want to get into game development. Should I learn some more advanced game development in java (I pretty much now the basics) or should I just learn the android game development and I'll learn both at the same time? (I'm a very fast learner) Sep 17 15:44:18 gonna use AndEngine Sep 17 15:44:44 and I received from logCat memory error of the WebView Sep 17 15:45:04 I am doing low frame rate video so I only have a frame to offer every 5-10 times the loop calls me. If I call renderRequest everytime it calls my onDrawFrame I get old buffers and studder, If I call renderRequest only when I have new data, the thread exits and it stops calling onDrawFrame. Sep 17 15:45:06 Lint & Docs are very worried about the evils of enabling JavaScript. How worried should I be? Sep 17 15:45:28 depends the level of security you need Ankhwatcher Sep 17 15:46:58 Hey guys. I have an issue with a progressDialog not going away when calling cancel() on it Sep 17 15:50:58 speakingcode-wor: how about dismiss() ? Sep 17 15:51:30 whoever invented progressDialog deservs serious beating. Sep 17 15:52:08 ...its users do so as well Sep 17 15:52:16 Whoever uses progressdialog deserves serious beating ;/ Sep 17 15:53:03 speakingcode-wor: oh, I just read the javadoc of cancel() and it seems to do the same + more Sep 17 15:53:08 SimonVT++ Sep 17 15:53:38 can somebody help me with the frikkin' asynctask, the code from google isn't working for me... Sep 17 15:53:48 well the thing is, in most scenarious it works Sep 17 15:53:53 and i just don't understand how the hell i should use it Sep 17 15:54:04 but there is a certain execution path that causes the dialog to hang Sep 17 15:54:09 out of curiosity, what exactly is wrong about progressdialog? Sep 17 15:54:09 stupid non-extended classes for html parsing... Sep 17 15:54:12 i've run in debugger, the reference is not null Sep 17 15:55:11 SimonVT - got a better way, for a 2.2 and under app? Sep 17 15:56:22 adq: well that's just it, I'm not sure what I need to secure against or how. I think I can use a custom WebViewClient to disable javascript once the user is off of my website. Sep 17 15:56:35 Something that doesn't block all interaction with the ui Sep 17 15:56:46 basically i'm doing mProgressDialog = ProgressDialog.show(...) Sep 17 15:57:08 There are cases where a progressdialog is fine.. But mostly it's just "Oh, I'm doing something that might take a big of time.. BETTER BLOCK EVERYTHING" Sep 17 15:57:09 Lachezar: Yes! 0.23 is nearly a year old! I think 0.22 was the 1st version I installed, and the latest stable is 0.33. Sep 17 15:57:14 grrrr.... Sep 17 15:57:19 hello Sep 17 15:58:06 Also, surely you are using a DialogFragment and not manually managing your Dialogs Sep 17 15:58:11 is there a way to get the sqlite files from an android-device? at least using the file explorer from the eclipse-plugin i cant access the /data directory Sep 17 15:58:22 then some async operations occur (pulling data from network) in another thread. when the work is done and the thread calsl back, i do mProgressDialog.cancel(), more or less. there's some abstractions and factorization i'm leaving out, but meh Sep 17 15:58:45 speakingcode-wor, i hate async and network stuff! Sep 17 15:58:46 well, no, Sep 17 15:59:06 i inherited this code, and it's for pre-3.x basically Sep 17 15:59:10 If you insite on using ProgressDialog directly, use Activity.showDialog(int)/dismissDialog(int) Sep 17 15:59:39 the thing is, it works in all cases except a certain scenario of a particular sequence of actions Sep 17 15:59:42 i feel so stupid '-_- why is it so hard to use Async and JSoup? :s Sep 17 16:00:17 and i can't figure out why it doesn't go away in this one sequence, as the reference to the dialog is not null Sep 17 16:00:52 any insight on when calling cancel() on a dialog wouldn't make it go away? there has to be something else happening, something with the view or something Sep 17 16:02:37 I'm working with a webView in android, and the thing is that my app needs to a load a site with an untrusted certificate, so for that I'm using the method onReceivedSslError --> handler.proceed(); Sometimes I get this memory error Fatal signal 11 (SIGSEGV) Sep 17 16:02:49 Can anyone help me please? Sep 17 16:04:42 anelrh26, google your stacktrace error Sep 17 16:04:59 I already did Sep 17 16:05:02 :( Sep 17 16:05:15 I had like 4 days on that Sep 17 16:05:26 SimonVT, sorry to ask again, but i'm not having any luck with the Async task in a Unextended class, and passing data back to the original Activity... Sep 17 16:05:46 the error isn't consistent Sep 17 16:08:26 hackkitten, advice? D: Sep 17 16:15:07 Lachezar: The link issue has been acknowledged. Oh and, my mistake, 23 was the versioncode and is only one version out-of-date. Sep 17 16:24:06 Ok, next question, how do i access a textview from Class A (extends Activity) from Class B (no extends) Sep 17 16:25:33 I hereby declare that it's worth writing Android apps - I just bought a groupon deal for frozen yogurt with my admob earnings! Sep 17 16:26:11 woo! Sep 17 16:26:27 I have stopped buying yogurt. Sep 17 16:26:47 too easy to make Sep 17 16:26:51 aim high! Sep 17 16:27:18 why investing in froyo if you can have jelly beans? Sep 17 16:27:20 5l bucket, 5l of milk, oven at 40c for a few hours, done Sep 17 16:28:18 well, and starter culture Sep 17 16:28:48 SpeedEvil: the culture is the most important part Sep 17 16:29:40 no oven here Sep 17 16:29:51 true. but one natural yogurt pot, frozen will give you culture for years Sep 17 16:30:03 room temp works fine Sep 17 16:31:25 Leeds? Sep 17 16:31:36 iSeeDeadPixels: yes? Sep 17 16:31:48 How do i access a webview from another class? Sep 17 16:32:03 erm... why are you asking me? Sep 17 16:32:08 TextView* Sep 17 16:32:28 you seem like a decent android developer with more experience than me. Sep 17 16:33:17 Leeds http://pastebin.com/auk80EWY Sep 17 16:34:22 Leeds, this is in my MainActivity#onCreate() http://pastebin.com/yttH6itj Sep 17 16:34:38 how i'm using it now doesn't work, sadly. Sep 17 16:35:29 Is there any way to stop/restart system service through an app? Sep 17 16:36:07 I'm getting the ABORTING: HEAP MEMORY CORRUPTION IN dlfree of WEBVIEW Sep 17 16:36:08 hmmm, looks like the progress dialog issue was due to a leaked activity reference Sep 17 16:36:28 anyone else have any ideas? Sep 17 16:38:41 Hi, does anyone know if I add additional screenshoots to my app Sep 17 16:38:57 on google dev eloper console do I have to unpublished and re-publish my app? Sep 17 16:39:14 cuz I just clicked 'Save" after I added those screenshots Sep 17 16:39:22 they should show up in a hour or so? Sep 17 16:39:54 calvinchan: they will show up, just click save Sep 17 16:40:20 calvinchan, propagation time is unknown Sep 17 16:40:24 f2prateek_: oic, so I don't need to re-publish right? Sep 17 16:40:31 and it's not even think between the android and web playstore Sep 17 16:40:35 sync* Sep 17 16:40:45 calvinchan: nope Sep 17 16:41:19 you should never need to re publish, editing descirption, adding images ro uploading new versions Sep 17 16:41:28 * for editing Sep 17 16:41:36 *or Sep 17 16:41:58 f2prateek_: so even if I update my apk i just need to save it? Sep 17 16:43:00 calvinchan: yeah you just have to deactivate the older one and activate the new on Sep 17 16:43:02 one Sep 17 16:43:26 oil, so the old one will still be up there Sep 17 16:44:14 calvinchan: yeah the old apks will stay up there, so you can reactivate them if you need to Sep 17 16:44:26 oic, thanks! Sep 17 16:45:11 anyone used openSL? Sep 17 16:47:57 Is this the right channel for android kernel build questions? Sep 17 16:48:21 not sure Sep 17 16:49:16 Does anyone have the goldfish-3.4 kernel building? I'm getting some yaffs2 compile errors Sep 17 16:49:42 mehhh Sep 17 16:49:56 anyone know if i can set the volume of a player in OpenSL? Sep 17 16:50:00 guys, i have one last problem and that's setting a TextView's text from another class :( Sep 17 16:52:01 mfisch: it isn't, really - this channel is for app development... #android is theoretically the right channel, but in practice it's a user channel - you probably need to be looking at google groups like android-building, android-platform and android-porting Sep 17 16:52:12 Leeds: thanks Sep 17 16:52:22 mfi Sep 17 16:52:43 how can I set a mock location on the device via something like adb? Sep 17 16:52:52 I can't telnet to 5554 (as in with emulator) Sep 17 16:53:28 might be able to adb shell w/same commands Sep 17 16:53:47 Has anyone seen getDefaultSensor return null on newer phones for the linear accelerometer sensor or rotation vector sensor? Sep 17 16:53:49 google ain't helpful either.. Sep 17 16:54:21 gutano: tried that without luck. Sep 17 16:54:28 =/ Sep 17 16:54:44 the context is that I'm doing automated testing on a device Sep 17 16:55:02 the ADT eclipse plugin has another way to do it Sep 17 16:55:08 worst case scenario I can write a custom mock location provider and register a broadcast receiver which can plug it in Sep 17 16:55:09 not sure if that is limited to emulators Sep 17 16:55:22 yes, but I have a kind of hacky control set up where I need to be able to do it via command line Sep 17 16:56:58 *nod*, I think I'm tapped for ideas =( if I was in that boat, I would probably pursue telnet a bit further Sep 17 16:59:06 right. Sep 17 16:59:07 ok Sep 17 16:59:51 yes, okay, that sounds good. thanks. Sep 17 17:02:57 [n00b warning] is it possible for an app to send a string right to another app's text input field? Sep 17 17:03:12 generally no Sep 17 17:03:18 hopefully while suppressing the on-screen keyboard Sep 17 17:03:22 that's what I suspected.. Sep 17 17:03:25 *possibly* if that app is registered as an accessibility app, maybe Sep 17 17:03:35 ah... Sep 17 17:03:50 would that require that it be signed by Google or anything like that? Sep 17 17:04:44 what is best way for make slide panel on android? slidingdrawer? Sep 17 17:05:06 question from view side Sep 17 17:09:59 SimonVT (or anyone) can you offer an explanation: the Activity with the hanging dialog was referenced in a static singleton to receive callbacks - the reference was being removed in onDestroy(). So, basically the activity gets recreated when the user goes from logged in to non-logged in mode (doesn't sound appropriate, but heh) onLogoutClicked() { logout(); finish(); intent blah blah Sep 17 17:09:59 startThisSameActivity(); } Sep 17 17:10:08 SimonVT (or anyone) can you offer an explanation: the Activity with the hanging dialog was referenced in a static singleton to receive callbacks - the reference was being removed in onDestroy(). So, basically the activity gets recreated when the user goes from logged in to non-logged in mode (doesn't sound appropriate, but heh) onLogoutClicked() { logout(); finish(); intent blah blah Sep 17 17:10:08 startThisSameActivity(); } Sep 17 17:10:16 sorry didn't mean to send twice Sep 17 17:11:20 anyway, when the activity starts, the progress dialog shows up, data gets pulled, then a call to cancel() the dialog is made once the data pull finishes. SO, anyway, putting that removal from the static singleton in another place that occurs before onDestroy() fixed the issue of the hanging updating dialog Sep 17 17:14:55 if i understand correctly, onDestroy() isn't called immediately when finish() is - it is just "queued up" for the looper to grab n destroy it Sep 17 17:16:34 so the activitity was being "leaked" momentarily while a new instance of it was created and shows the dialog - i don't quite understand why the old instance temporarily hanging around would cause the dialog created in the new instance to not go away... some knido f shared resource or something Sep 17 17:18:46 As I said, use Activity.showDialog/dismissDialog Sep 17 17:22:13 regardless, i am curious about the behavior Sep 17 17:22:41 i inherited this code to fix bugs and i don't have time or desire to rewrite it, it's not mine Sep 17 17:25:09 there's some amazing silly stuffi in here - a complete mimick of action bar using basic views and such. works surprisingly well but the code is ugly Sep 17 17:25:36 about 100 or so lines duplicated in each activity with slight differences, could have just parameterized it Sep 17 17:27:53 so dont rewrite it Sep 17 17:27:58 that sounds like code you shouldnt be touching Sep 17 17:29:56 just fixin the bugs Sep 17 17:32:49 when i'm tasked to fix things i'll touch what i damn well please ;-) Sep 17 17:46:31 https://gist.github.com/1310730c6a62e7d97c18 <-- so regardless of how I arrange the buttons here, the AlertDialog always shows them in this order: [Cancel][Two][One] ... is it possible to reverse that? Sep 17 17:47:45 No, that's the order on ICS Sep 17 17:48:02 You can reverse it by running on tnzr: yeah, don't change the order unless you hate your users Sep 17 17:50:32 oh I see Sep 17 17:50:43 I'm totally ok with that, didn't realize it was an ICS convention :) Sep 17 17:51:07 do you think it would be bad form to make it [Cancel][One][Two] ? Sep 17 17:51:51 The right one should be your "primary" action Sep 17 17:51:58 Middle one is just kind of extra Sep 17 17:52:02 Ahh ok cool Sep 17 17:56:36 Android prevents me from opening a closed cursor. I need a simple way of re-using a designated cursor. My guess is to register a ContentObserver, but have never used them. Sep 17 17:58:33 wurde: once the cursor is closed, the content is no longer available. Open a new cursor. Sep 17 17:58:36 wurde: you have to get a new cursor Sep 17 17:58:38 or .requery(), but it is recc to not do so Sep 17 17:59:10 ok, im thinking just using requery may solve my issue. Sep 17 17:59:39 is it possible to uninstall my app within my activity? Sep 17 18:00:09 porten: er, what? Sep 17 18:00:17 I'm getting this error 09-17 10:47:35.790: A/libc(14258): @@@ ABORTING: HEAP MEMORY CORRUPTION IN dlmalloc, when the browser is load a page with an unstrusted certificate in this method onReceivedSslError Sep 17 18:00:21 anyone? :( Sep 17 18:00:57 evancharlton: lol, is it possible to uninstall my apk remotly or within my activity? Sep 17 18:01:14 sort of like execute adb uninstall my.apk Sep 17 18:02:02 you can't do it silently, but you can bring up the uninstall dialog Sep 17 18:06:41 hi, I have an app providing some content as local html-pages including javascript (jplayer) to play video (webmv) and audio (various: m4a, oga, mp3). The html pages are shown by calling the default browser. It works on some older devices as well as on Nexus 7 tablets (using chrome as default browser). I only git problems with Galaxy Nexus. Their default browser does not play the audio files stored on local storage but works without pr Sep 17 18:06:41 oblems if the audio file can be reference as http://... The error message is "Failed to open file " from Tag Awesome Player (seems to be default on Galaxy Nexus and may be other devices). Surprisingly the Video-files (also stored locally, same rights, ...) work without problems. How can this be solved? What could be the reason for this? Sep 17 18:14:32 pffff >< Sep 17 18:26:05 finally... Sep 17 18:26:13 this should never be the right way... Sep 17 18:27:22 http://pastebin.com/am3PzHfk @ SimonVT, lov Sep 17 18:28:53 uh Sep 17 18:28:58 I'll give you an A for effort at least Sep 17 18:28:59 does this not work? Sep 17 18:30:20 lov, it does, but it just feels bad. Sep 17 18:30:36 since i now have to struggle parsing the whole file... Sep 17 18:30:48 http://www.novaprojecten.nl/roosters/lbl/basis/38/c/c00247.htm Sep 17 18:31:22 what would you rather do instead? Sep 17 18:31:33 dunno, i'm happy that i got asynctask to work. Sep 17 18:31:49 but now i have to change all that code to make it parse the whole damn thing. Sep 17 18:31:54 frankly, you might want to see if beautiful soup has some sort of pull parser functionality Sep 17 18:32:10 this way instead of getting the entire thing, you can check for content that you're interested in as you parse it Sep 17 18:32:27 anything doing dom parsing is going to parse the entire thing first Sep 17 18:32:35 (which means anything using xpath) Sep 17 18:32:40 hmpf.. Sep 17 18:32:52 i need to parse all those times and classroom data Sep 17 18:32:58 and not only from that file. Sep 17 18:33:45 scrap soup and try sax parsing it. There's a LOT of setup in sax but the result is you more or less stream process Sep 17 18:34:22 not gonna work, check the source... Sep 17 18:34:34 I'm a little confused at how a compatability library works. Say I want to GridLayout in a APK targetted for API 8. I link in gridlayout-v7.jar and support-v14 to my project, yes? Sep 17 18:36:34 and calculate all the rowspans and times etc. Sep 17 18:36:50 it's such a b*tch to show this in native android layouts.. Sep 17 18:37:04 I've done that, and it says it can't inflate "android.support.v7.widget.GridLayout", when I've declared it as such in my layout.xml. The APK must work on a 4.0.3 phone, too... so what am I doing wrong? Sep 17 18:38:31 freeone3000, wasn't answering your question lol... Sep 17 18:40:23 dragorn? Sep 17 18:40:23 hey what filesystem does android use? Sep 17 18:40:25 Ext3? Sep 17 18:40:41 iSeeDeadPixels: what? Sep 17 18:40:46 Wavesonics: http://stackoverflow.com/questions/2421826/whats-android-file-system Sep 17 18:40:58 yaffs or something, IIRC Sep 17 18:41:02 dragorn, sax isn't gonna work. Sep 17 18:41:03 iSeeDeadPixels, cool thx Sep 17 18:41:14 Wavesonics: internal flash, ext or a flash like yaffs. sd card, vfat Sep 17 18:41:27 iSeeDeadPixels: ok? Sep 17 18:41:38 dragorn, check the source of the page i'm going to parse ;) Sep 17 18:41:39 iSeeDeadPixels: then you're dom parsing the entire thing, or pattern matching and ignoring formatting Sep 17 18:41:49 iSeeDeadPixels: and if dom parsing works, then sax parsing would work fine Sep 17 18:42:31 dragorn, jsoup is told to be the only parser that can parse bad html Sep 17 18:45:31 hello guys.. anybody used BUMP in their apps? Sep 17 18:46:58 and the location changed of the html file.. http://www.novaprojecten.nl/roosters/lbl/basis/38/c/c00086.htm Sep 17 18:46:59 ugh ugh ugh Sep 17 18:47:08 dragorn, try to parse that... Sep 17 18:47:41 iSeeDeadPixels: I don't much care? Get them to give you a proper interface. Sep 17 18:47:56 fix an issue. go to lunch. come back. "hey i went n broke a bunch of other stuff cause i wanted to try to fix it in a different way" Sep 17 18:48:15 dragorn, not happening sadly Sep 17 18:49:36 whats so hard about parsing this, iSeeDeadPixels? Sep 17 18:50:07 speakingcode-wor, check the source. Sep 17 18:50:11 iSeeDeadPixels: "rooster" is dramatically different from "roster" in english, which makes me laugh about this whole thing. Sep 17 18:50:27 s/rooster/haan/ if you're not aware :> Sep 17 18:50:28 i need all the times, on what time what classes, etc. Sep 17 18:50:37 lov, i am aware Sep 17 18:50:49 that's why there's a nonfunctional app with a rooster as icon on the market. Sep 17 18:50:51 i'm lookin at the source, looks well formed Sep 17 18:51:16 https://play.google.com/store/apps/details?id=com.nova.novarooster_sb&feature=search_result#?t=W251bGwsMSwxLDEsImNvbS5ub3ZhLm5vdmFyb29zdGVyX3NiIl0. Sep 17 18:51:32 speakingcode-wor, but horrible to parse and get all the times, classrooms, etc Sep 17 18:52:08 what feeds this html file? Sep 17 18:52:12 is it static? Sep 17 18:52:24 or does something generate it Sep 17 18:54:52 anybody? Sep 17 18:55:50 mlechner: no idea. You're using a file:// uri? Sep 17 18:55:56 mlechneri didn't see your question Sep 17 18:56:01 mlechner: are the files on the SD card where the player has access? Sep 17 19:00:21 speakingcode-wor, something generates it, but it's static Sep 17 19:00:29 something generates static pages* Sep 17 19:00:42 iSeeDeadPixels do you have access to the code that generates it? Sep 17 19:01:01 lov, I tried relative and absolute pathnames (later only for testing) Sep 17 19:01:47 lov, what I really don't understand is that it works for video- but not for audiofiles. (pics and normal html is no prob, of course) Sep 17 19:03:12 bhjidhd ugh Sep 17 19:03:37 this dev on my team loves to convince marketing why it's a great idea to do things incorrectly Sep 17 19:04:28 mlechner: different apps are being used I'd assume Sep 17 19:04:29 * lov shrugs Sep 17 19:04:40 they get on baord and then i have to argue why its a terrible idea and they don't listen then comes back to haunt us most of the time Sep 17 19:04:43 speakingcode-wor, nope. Sep 17 19:04:46 speakingcode-wor: fisticuffs is the only solution Sep 17 19:05:07 haha Sep 17 19:05:36 if that were so, i'd be a director or vp Sep 17 19:05:39 * iSeeDeadPixels is getting annoyed by this html '-_- Sep 17 19:08:25 this guy doesn't know how to analyze, he just treats symptoms and ends up with buggy spaghetti and then he'll convince marketing that it's technocally a bad decision to do such and such because of how buggy his attempt to do it is Sep 17 19:08:31 uh crap, google just bought Nik software Sep 17 19:08:35 ffuuu Sep 17 19:08:52 speakingcode-wor, who? Sep 17 19:09:05 iSeeDeadPixels guy i work with Sep 17 19:09:17 ahh oka Sep 17 19:09:35 just getting annoyed cause it's happenign right now with this progress dialog issue i'm trying to help them with Sep 17 19:09:44 hmmmm :| Sep 17 19:10:01 speakingcode-wor: I think that we work for the same company Sep 17 19:10:17 lets hi five while we cry into our beers Sep 17 19:10:54 g00s: now Nik will have to use Google's abysmal e-commerce :( Sep 17 19:11:39 Codhisattva: i was looking at SilverEfex pro , etc. this is one of the best tools for b&w conversion Sep 17 19:11:53 g00s: buy it now before it's too late Sep 17 19:12:56 this probably has to do with android somehow. maybe hdr algorithms or something Sep 17 19:13:25 is anyone willing to help me setting up the parser? Sep 17 19:14:20 lov, what do you mean by different apps? Sep 17 19:14:40 APPS ARE DELICIOUS DOWNLOAD THEM TODAY Sep 17 19:14:53 Codhisattva: or maybe its because a lot of photographers use lightroom, and this allows that group to use nik instead on android tablets Sep 17 19:16:59 hey guys, what happens if you dont close a SQLiteDatabase? I'm closing all the cursors but I dont have a good place to close the db. What happens if I leave it open until the app process gets killed by the OS? Sep 17 19:27:18 mlechner: you mentioned that there's some app on the device that's handling your audio, and it's not working. Sep 17 19:27:29 does that same app handle your video? Sep 17 19:28:03 lov, the app just calls the standard browser with a locally stored html page Sep 17 19:28:13 .... yes, I understand this! Sep 17 19:28:17 And then you click on the audio link Sep 17 19:28:30 and the browser attempts to open another app to play the audio content Sep 17 19:28:32 and that app fails to play it Sep 17 19:28:34 is this correct? Sep 17 19:28:51 no the html-page is using javascript (jplayer) to play the audio and video files inPage Sep 17 19:30:28 the Video is played in the page (not fullscreen) and the audio plays on various devices besides Galaxy Nexus, telling me that the permission to the audio-file is denied. Btw, when I call the audiofile directly using file:/// it plays well! Sep 17 19:31:20 starting the audiofile is done by nice buttons: http://www.jplayer.org/ Sep 17 19:32:06 mlechner: oh uh Sep 17 19:32:15 does it work on other JB devices? Sep 17 19:32:45 mlechner: Sep 17 19:32:46 http://developer.android.com/reference/android/Manifest.permission.html#READ_EXTERNAL_STORAGE Sep 17 19:32:50 :> Sep 17 19:32:50 it might be as simple as that Sep 17 19:34:15 lov, JB? Sep 17 19:35:28 lov, well it's the default browser - I can not change the default browser on the users phone Sep 17 19:40:24 mlechner: Jellybean Sep 17 19:40:47 mlechner: create a webview inside of your app, display your content in that. Sep 17 19:41:00 don't use the default device browser since it's clearly not working Sep 17 19:42:42 lov, works great on Nexus 7 - Chrome as default browser ;) Sep 17 19:42:55 well fuck I don't know then. Sep 17 19:43:14 lov, webview does not work, because there's not enough js-support Sep 17 19:45:36 lov, thank you for your effort Sep 17 19:49:33 lov, how do i parse the second td from the table here? the "maandag" column? http://www.novaprojecten.nl/roosters/lbl/basis/38/c/c00086.htm Sep 17 19:51:20 iSeeDeadPixels: I have no idea why you're asking me. Sep 17 19:52:59 lov, i'm using jsoup, i've sent you a URL to the HTML page i'm trying to parse, do you have any idea how i can get all the text from the second column? Sep 17 19:53:08 or from the first row for that matter..? Sep 17 19:53:11 I don't use jsoup. Sep 17 19:54:05 :C Sep 17 19:58:24 woot, was a race conditon. god those are a pain to hunt down Sep 17 20:17:18 anyone willing to take a peek at my Stack question about android and jsoup? Sep 17 20:24:01 I am installing the Android SDK Manager. I selected Android 2.3.3 and Android SDK Platform-tools. I am mostly just wanting a simulator so I can test a website within the simulator. Is that included in the Android SDK Platform-tools ? Sep 17 20:24:01 can i change a textlabel's text from the onreceive method from a broadcastreceiver? Sep 17 20:26:26 foo: emulator, not simulator. Sep 17 20:26:31 it's a full arm emulator. Sep 17 20:26:46 and yes, once you've installed the 2.3 emulator image, you can create an AVD with it Sep 17 20:26:52 just bear in mind that the emulator is SLOW Sep 17 20:27:04 it's emulating an actual ARM VM, so it's gonna take a while Sep 17 20:27:13 fortunately, you don't have to kill it every time you push a build Sep 17 20:27:27 lov: aha, ok, do I need to select Android SDK Tools or Android SDK Platfor-tools under the Tools section if I want an android emulator for only web testing? Sep 17 20:30:50 for those who have, do you use a specific filechooser library or make your own? I need to have a file browser component to my app that will allow me to find a csv file and parse it. Sep 17 20:31:23 I started working on my own, but figured I would ask Sep 17 20:33:19 foo: Probably. Sep 17 20:33:34 lov: cool, it's going now. thanks man Sep 17 20:36:15 anyone have any ideas/preferences on a filechooser library or just build your own? Sep 17 20:38:20 use an intent Sep 17 20:45:05 lov, now i'm having issues with the ArrayAdapter xD i'm such a failure Sep 17 20:45:21 ok well best of luck. Sep 17 20:47:39 hello, when i use "finish()" from an activity or "System.exit(0)" it restarts my activity Sep 17 20:47:46 how can i have it actually exit the app? Sep 17 20:50:41 kaneda^ finish() should not restart your activity Sep 17 20:50:46 also, there's no 'exiting' the app Sep 17 20:55:36 Can ADB handle .obb files or APK's with expansions for side-loading Sep 17 20:57:53 answering self: nope. Sep 17 20:58:12 kaneda^: calling finish() won't restart your activity. Sep 17 20:58:17 kaneda^: please do not use System.exit Sep 17 20:59:36 lov, i'm just stating the facts jack Sep 17 20:59:40 so baby don't hurt me Sep 17 20:59:52 i know that it's a unity bug in reality Sep 17 21:00:04 but it exposes itself in very strange ways regarding my main activity and leaving the unity activity Sep 17 21:32:43 Does anyone have a preferred File Chooser library or do you build your own?? Sep 17 21:33:38 I fire off an intent to view a directory. Sep 17 21:34:26 freeone3000: only problem is that only works if you already have a file browser installed on your device. I am trying to not require that Sep 17 21:35:11 Is there any way to make an imageButton continue to look like when you press it (the edge is blue and glowy instead of gray) even after you pressed it? Sep 17 21:35:57 I have a ListFragment that gets its data from a SimpleCursorAdapter, tied to a CursorLoader. Sep 17 21:36:26 Each row in the ListView is pretty complex. I want to add a click listener to a button in the row. Sep 17 21:36:37 I can't figure out where that click listener will go. Sep 17 21:37:03 lut4rp: On the button. Sep 17 21:37:17 I have already created a ListActivity that can do the file browsing. I am currently having an issue with firing it on ActivityForResult, but I am working on that. I have just seen a few libraries out there that are very nice, but seem like a lot of functionality I don't need Sep 17 21:37:22 freeone3000, Indeed, but how do I "find" that button? Sep 17 21:37:44 I'll have to run findViewById on the ListView row's view. Sep 17 21:37:46 lut4rp: What's in charge of creating it? Seems like the SimpleCursorAdapter. Sep 17 21:37:51 was curious what anyone else did. I tried the intent option, but it obviously failed due to not having a file explorer on the device I am working with Sep 17 21:38:06 freeone3000, Yes, the SimpleCursorAdapter is. Sep 17 21:38:19 lut4rp: Does it have enough information to create the ClickListener? Sep 17 21:38:58 freeone3000, I don't know what you mean. Sep 17 21:39:23 lut4rp: Can your SimpleCursorAdapter create the ClickListener when it creates the Button? Sep 17 21:39:51 freeone3000, Hmm. Maybe. Let me try something. Sep 17 21:42:03 wow, so in china you can get an ics 7" tablet for about $45 usd Sep 17 21:42:10 :O Sep 17 21:43:22 g00s: You should look at their prices on jPhones! Sep 17 21:43:55 ok, I just downloaded android sdk. I selected my package of version Android to install. I am trying to create an avd with this: ./android create -avd -n phone1 -n 1 (but I get the help page instead). If I understand the process, I need to first create an avd then load it up with the emulator Sep 17 21:44:20 freeone3000, Hmm, so I made my own adapter that extends SimpleCursorAdapter, then "overrided" the bindView call to create the Listener. Sep 17 21:44:36 foo: that's mostly correct, but why do you set the -n option twice? Sep 17 21:44:37 freeone3000, It works, but now I can't figure out how to get the ListView row position :/ Sep 17 21:44:48 lut4rp: Count? Sep 17 21:44:57 freeone3000, count? Sep 17 21:45:05 lut4rp: The first is zero, the second is one, ... Sep 17 21:45:25 foo: i think you meant -t with the second one Sep 17 21:45:28 sampullman: ah, thanks, totally missed that. I did Sep 17 21:45:40 sampullman: ok, I tried -t 1 at the end instead and I'm still getting a help page Sep 17 21:46:39 foo: it's not 'android create -avd', it's 'android create avd' Sep 17 21:46:43 sampullman: I'm getting my example straight from the help page Sep 17 21:46:48 ahh Sep 17 21:47:07 sampullman: gah, you're right. thanks. lack of sleep is winning Sep 17 21:47:22 also, you can just do that through the android gui program, it's easier to set more complicated options that way Sep 17 21:47:38 What causes http://pastebin.com/MfBsnwLn ? I've got the android-support-v7-gridlayout.jar and android-support-v14.jar included in my APK. Sep 17 21:48:05 freeone3000: i just debugged that last night Sep 17 21:48:25 you have to include v7 as a support library Sep 17 21:48:28 sampullman: got it, thank you Sep 17 21:48:35 sampullman: Yeah. Did that. What now? Sep 17 21:48:58 well, how are you referencing it in xml? Sep 17 21:49:18 it should be: android.support.v7.widget.GridLayout Sep 17 21:49:22 not just GridLayout Sep 17 21:49:24 sampullman: http://pastebin.com/wkKp8U0w Sep 17 21:49:56 hmm Sep 17 21:50:37 oh, i mispoke at first Sep 17 21:50:47 you have to add it as a library project Sep 17 21:50:58 just the apk doesnt work Sep 17 21:51:44 android update project --target 1 --path ../ --library Sep 17 21:51:53 replace target with w/e Sep 17 21:51:58 and path Sep 17 21:57:13 lint is really nice about telling me i should use FloatMath.sin instead of Math.sin because i'm using float instead of double and cast costs performance, ok for this part Sep 17 21:57:24 sampullman: Same for v14? Sep 17 21:57:38 but i need also to use Math.PI which is not available in FloatMath as a double... (and of course many ppl use pi with sin..) Sep 17 21:57:44 dunno. you don't need v14 for GridLayout, though Sep 17 21:57:45 should i create a float const of PI ? Sep 17 21:57:52 or cast is not so bad? Sep 17 21:57:53 adq: No, you should stop using floats. Sep 17 21:58:03 freeone3000, double takes twice the space of a float Sep 17 21:58:06 adq: Yes. Sep 17 21:58:08 and we talk about limited memory :( Sep 17 21:58:20 it's not a workstation but a phone lol Sep 17 21:58:21 it takes a lot of doubles to run out of memory Sep 17 21:58:33 adq: We're talking about fitting 64 bits. 64 BITS. 4 bytes. Into 2 gigabytes. Sep 17 21:58:41 so i should convert everything in double instead of float? Sep 17 21:58:56 i just used float because i read it takes less space (i know the mantisse and exponent what it is.. ) Sep 17 21:59:05 but now i have to deal with casts everywhere oO Sep 17 21:59:08 adq: You skipped the bit where "Do I need to save space?" Sep 17 21:59:14 you only need floats for intense graphics apps Sep 17 21:59:21 i do intense audio app Sep 17 21:59:24 it's close to a game loop Sep 17 21:59:24 Anyone have any suggestions/libraries they like to use for choosing/opening and saving files. I have started writing my own and can open files, but just figured I would see what anyone else may have Sep 17 21:59:26 oh Sep 17 21:59:26 but with audio Sep 17 21:59:27 well Sep 17 21:59:30 Audio's quantized, though. Sep 17 22:00:07 freeone3000, i'm ok to compensate space costs if removing all this cast will really gain more than 1% of perf Sep 17 22:00:17 adq: Probably not. Sep 17 22:00:20 but i'm doubting and it's hard to find benchmark :| Sep 17 22:00:53 adq: That's because the JVM bytecode gets converted to dalvik bytecode gets compiled to phone-specific binaries, and it's really hard to point at machine-optimized ARM assembly and go "there's FloatMath.sin()!" Sep 17 22:01:10 adq: You'll probably get more performance by doing it NDK, actually. Sep 17 22:01:17 yeah i have even a class called Fastmath which does approximation to avoid costly maths op Sep 17 22:01:27 freeone3000, everything but not the NDK :p Sep 17 22:01:34 some ppl recommended me JNI too Sep 17 22:01:37 i might have a look Sep 17 22:01:41 adq: dump the heap with ddms when your app is running, and analyze it with mat. the memory cost for doubles will be twice what it is for floats Sep 17 22:01:46 but it's offtopic about float/double & cast cost Sep 17 22:02:08 sampullman, agreed and i was in ddms few minutes before Sep 17 22:02:14 i have also too many layouts :-( Sep 17 22:02:21 but that's another story Sep 17 22:03:31 believe me, AudioTrack is a bit[BEEP]ch! Sep 17 22:04:10 just write the app for iphone Sep 17 22:04:25 yeah they got better latency and api unfortunaltey :( Sep 17 22:04:32 but it's apple, they're famous for audio & graphics ;) Sep 17 22:06:02 thx all anyway! Sep 17 22:10:59 does anyone know how to find the class file for imagview? Sep 17 22:11:25 So I've added android-support-v7-gridlayout as a dependant project to my build. It's set to export, so it's included in my APK. I still get http://pastebin.com/MfBsnwLn when running. Why? Sep 17 22:12:09 http://i.imgur.com/s0JIU.jpg Sep 17 22:13:22 Now, I'm double-confused, because there *is* an R.java file, with a public class dimen { } declared in it. Sep 17 22:13:27 freeone3000: im not sure, but maybe you should update the gridlayout library project Sep 17 22:13:30 android update lib-project -p . Sep 17 22:13:37 try a big clean :-) Sep 17 22:14:41 Doesn't change anything. Sep 17 22:15:16 Support libraries *do* work, correct? Sep 17 22:15:23 im using it right now Sep 17 22:15:33 took me like 2 hours to get working last night, though Sep 17 22:15:39 painful Sep 17 22:15:59 Okay. Let me do it the way that goes against everything sane, and use Eclipse and Ant and all the tools that bring software development back to the turn of the century, and see if that fixes it. Sep 17 22:16:40 i don't use eclipse, just ant, if that makes a difference Sep 17 22:16:43 I'm using Jackson to process Json data. I would like to cast the data to a Java Class. Do I have to declare every property of the Json data in the Java class in order for it to cast correctly? There is extra data in the Json I will not use. Right now Jackson errors out when it hits a property I have not declared in my class. Sep 17 22:17:25 I'm still very noob at this, one day I'll use only VIM and ant ;) Sep 17 22:17:55 one day? Sep 17 22:18:12 seems like one day too long. Sep 17 22:18:25 some day Sep 17 22:18:32 Not sure why one would use ant at all. Sep 17 22:18:42 what else? Sep 17 22:18:44 Mavne. Sep 17 22:18:47 *maven. Sorry. Sep 17 22:18:51 a bot does not need eclipse per rexample Sep 17 22:18:54 (think of buildbot) Sep 17 22:18:57 yeah, ant is easy though, for small apps Sep 17 22:19:00 Or gradle, or buildr, or... Anything with dependency resolution. Sep 17 22:19:18 if i only have 1-2 dependencies ant is very simple to use Sep 17 22:19:19 i prefer vim but i'm using eclipse Sep 17 22:19:45 I'm confused as to why they ship a .JAR but I can't use it, and then double-confused as to why it's not exporting when I've parroted the ant scripts. Sep 17 22:20:04 did you check out the readme in the gridlayout folder? Sep 17 22:20:18 i agree, it's annoying as hell Sep 17 22:20:45 sampullman: Yes. It contains "Add it as a dependency project" (which I did), "Refer to it by its fully-qualified name", which I did, and "namespace your declarations", which I'm not using so there's nothing to namespace. Sep 17 22:21:28 It also contains a very telling line saying "We should change this once we have library support", which came and went. Sep 17 22:21:52 if you want, i can push my project to github, but i can't think of anything else Sep 17 22:22:18 oh Sep 17 22:22:28 what's you minsdk? Sep 17 22:22:33 should be >= 7 Sep 17 22:22:39 sampullman: 8 Sep 17 22:23:54 It's not finding R.class in the built APK for some reason. Sep 17 22:24:12 did you try updating the lib project? Sep 17 22:24:27 sampullman: It's updated to version 10, which is the lastest available in SDK Manager. Sep 17 22:24:46 i mean, through android update lib-project Sep 17 22:25:22 from the cmd line Sep 17 22:25:47 can dalvik VM be given option about thread scheduling ... my dalvik vm's threads are behaving quite strangely porintg a multi-thread java daemon on dalvik ... aparently some threads get starved for no reason ... any way i can control it? Sep 17 22:26:23 reenignEesreveR: No. Android is pure pre-emptive. Your applications, and application threads, can be killed at any time. Plan accordingly. Sep 17 22:29:12 freeone3000, but they should get their fair share of time quanta too ... its more like a thread doesn't get a chance for minutes Sep 17 22:29:34 and i've tried my best to figure out there is an issue with the code ... apparently there isn't ... same thing works well on the normal java vm Sep 17 22:30:10 reenignEesreveR: No, you're not guarenteed a fair scheduler. Sep 17 22:30:46 freeone3000, there is difference between "unfair" and "broken" Sep 17 22:30:51 sampullman: Okay, that gives me a build.xml in the gridlayout directory, which fails with a stacktrace and no error message. Sep 17 22:31:05 and it might just be an emulator issue though Sep 17 22:31:19 freeone3000: what fails? Sep 17 22:31:40 sampullman: C:\android-sdk\tools\ant\build.xml:1355: No message Sep 17 22:31:58 the update caused that, or what? Sep 17 22:32:15 sampullman: android update lib-project gave me a new build file which produces that error, yes. Sep 17 22:33:23 sorry, im confused.. when is that error produced? when you build your project? Sep 17 22:33:43 sampullman: When I build gridlayout Sep 17 22:33:53 you don't need to build gridlayout Sep 17 22:34:14 sampullman: Then I'm fully confused. What, should I just shove those files into my source tree? Sep 17 22:35:34 what files? no..just add it as a dependency. the way i did it (because i don't use eclipse/maven/etc) is: android update project --target --path ./ --library Sep 17 22:35:50 run that in your project's directory Sep 17 22:35:59 sampullman: What does "dependency" mean? Everywhere I see "dependency", it means "compile the project, then add its output". Sep 17 22:37:29 mmh. i think what ant does (in my case) is compile gridlayout together with my project Sep 17 22:37:38 i could be wrong though Sep 17 22:37:46 sampullman: Okay, so shove it all in the same source tree. Sep 17 22:38:00 but i definitely never compiled gridlayout myself, or shoved it in the source tree Sep 17 22:38:28 Hi @ all. Sep 17 22:38:39 sampullman: Yeah, because ant does it for you. Okay, with this generated file, which of the nearly-identical lifecycle goals do I want? Sep 17 22:39:15 lifecycle goal? Sep 17 22:39:37 Can someone help me with the android.intent.action.SEND ? Every time I'm calling intent.getStringExtra(Intent.EXTRA_HTML_TEXT); the app crashes. Sep 17 22:39:43 sampullman: Target. Sep 17 22:40:28 sampullman: Tried "Debug". Got "C:\android-sdk\tools\ant\build.xml:545: Failed to resolve library path: C:\android-sdk\extras\android\support\v7\gridlayout Sep 17 22:40:42 freeone3000: oh, heh Sep 17 22:41:24 freeone3000: i had to go into project.properties and modify the path to gridlayout to be relative Sep 17 22:41:29 awful, i know Sep 17 22:42:26 Here is the debug log:http://pastebin.com/taQGpGww Sep 17 22:42:28 sampullman: Relative to what? Sep 17 22:42:29 copy the gridlayout folder to the folder your project is in Sep 17 22:42:49 and change the appropriate line in project.properties to Sep 17 22:42:52 android.library.reference.1=../gridlayout/ Sep 17 22:43:04 or android.library.reference.1=./gridlayout/ , whichever the case may be Sep 17 22:45:23 sampullman: Changing it to forward slashes fixed that. Now it can find it. Let's see if it builds. Sep 17 22:45:48 hah, silly windows Sep 17 22:49:46 sampullman: Okay. How do I make it generate a file named Foo.apk? It's generating Foo.ap_, Foo-debug.apk, and so on. Sep 17 22:50:08 you want a release apk? Sep 17 22:50:24 sampullman: No, I want a debug APK named "Foo.apk". Sep 17 22:50:46 are you generating it with ant? Sep 17 22:51:07 sampullman: Yes. But I don't control the ant script, apparently. Sep 17 22:51:51 well, write a little script that does, ant debug, and then mv bin/Foo-debug.apk bin/Foo.apk Sep 17 22:52:10 sampullman: I shouldn't have to write a build script for my build script! Sep 17 22:52:12 what's wrong with Foo-debug.apk though? works just the same Sep 17 22:52:26 sampullman: Because my automated deployment process doesn't allow me to change the name it wants. Sep 17 22:52:33 sampullman: Then I'll have to copy things *manually*. Sep 17 22:53:06 there's probably some option you can set that will make ant do that, but i don't know how Sep 17 22:53:23 does anybody know a way to autscale image and keep aspect ratio? Sep 17 22:55:41 I have tried using separate layout to place my UI elemnts Sep 17 22:55:57 Does the android emulator come pre-rooted? Sep 17 22:56:06 I want to use a more elegant way to automatically scale and maintain the aspect ratio of an imgae Sep 17 22:56:54 nvm Sep 17 22:57:58 Okay. I finally got it to build and deploy with ant with the support lib as a library, and this is the result: http://pastebin.com/5NQppHW0 Sep 17 22:58:39 clean project Sep 17 22:59:07 Yes, it's the first line of the build. Sep 17 22:59:40 No, clean your project Sep 17 22:59:43 Then build again Sep 17 23:00:49 SimonVT: Okay. Did that manually, too. No change. Sep 17 23:02:31 Then I'm guessing you just copied the jar to your project "to get it to build" Sep 17 23:03:12 SimonVT: Nope! Used "C:\android-sdk\tools\android.bat" update project --path . --library "C:/android-sdk/extras/android/support/v7/gridlayout" Sep 17 23:03:58 freeone3000: can you pastebin me the contents of your project.properties? Sep 17 23:04:20 sampullman: http://pastebin.com/7wGkjw92 Sep 17 23:04:39 change that reference to a relative path Sep 17 23:04:46 not absolute Sep 17 23:04:50 sampullman: It's not complaining about not finding it. Why would a relative path help? Sep 17 23:04:57 just..try it Sep 17 23:05:14 then do a manual clean/etc Sep 17 23:06:50 sampullman: No change. Sep 17 23:07:40 well, that's all i've got. the things i mentioned are pretty much exactly what i did to make it work Sep 17 23:07:51 How do I boot an android emulator into recovery mode? Sep 17 23:08:02 are the permissions for the gridlayout folder appropriate? Sep 17 23:08:21 sampullman: Ran the build as hypervisor. No change. Sep 17 23:11:01 Do somebody know how to get the HTML code of the page recived in an android.intent.action.SEND ? Sep 17 23:12:32 Okay, screw it, I'm targeting v14 and will worry about this stuff later. Sep 17 23:24:29 Quick Poll: AndEngine or LibGDX?? Sep 17 23:28:31 Is this channel even alive? Sep 17 23:29:04 643 ghosts Sep 17 23:29:09 BOO Sep 17 23:29:25 quick poll: boxers or briefs? Sep 17 23:29:34 commando Sep 17 23:29:36 depends on the situation Sep 17 23:30:07 quick poll: light speed or warp 1? Sep 17 23:31:00 warp 1 Sep 17 23:31:07 ahhh Leeds and JakeWharton. Sep 17 23:31:38 so the channel is ok. I haven't been in it for a while. Seemed kinda dead when I joined. Sep 17 23:32:02 I haven't used either of the libraries in your question so that's why I didn't answer. Sep 17 23:32:03 dlaroche: it is dead. JakeWharton and Leeds are zombies Sep 17 23:32:41 sampullman: from my understanding LibGDX is way faster, and from reading through the source on both I don't see why I should choose AndEngine over LibGDX Sep 17 23:32:57 dlaroche: canadiancow has experience with andengine Sep 17 23:33:10 g00s: they are the ghost of this channel. they are always on and never sleep Sep 17 23:33:12 dlarouch: i was answering Leeds' poll, but I've heard the same Sep 17 23:33:16 never used either Sep 17 23:33:59 I'm working with one game using AndEngine right now. My next one will be with LibGDX. I guess I can decide then which one I like better. Sep 17 23:41:58 How do I boot the android emulator into recovery mode? Sep 17 23:46:16 why would you want to do that? Sep 17 23:46:33 I want to test a custom kernel Sep 17 23:46:56 possibly related: http://stackoverflow.com/questions/1809774/android-kernel-compile-and-test-with-android-emulator Sep 17 23:47:04 i don't think there's a "recovery mode" Sep 17 23:57:47 sampullman: it's been a while since i cared but I'm pretty sure one of the targets for building AOSP is an emulator image Sep 17 23:58:07 sampullman: so you'd probably do your kernel mods in there and just let it build an image Sep 17 23:58:27 wolfmitchell Sep 17 23:58:32 is the one who wanted to know Sep 17 23:58:35 oh so it was Sep 17 23:58:41 Yup Sep 17 23:58:41 wolfmitchell: read that. :P Sep 17 23:58:49 sorry. long day. Sep 17 23:59:08 tho like i said it's been quite a long time since I've cared. I think that's the route you'd want to take anyhow Sep 18 00:10:26 anyone know of any efforts to add x64 support to bionic libc? Sep 18 00:23:35 Any ideas why getDefaultSensor would work fine on pre-4.0 devices but return null on newer ones? From what I can tell the Sensor.TYPE constants haven't changed and there's no associated permission. Sep 18 00:31:31 I have a custom adapter that extends BaseAdapter, and I'm trying to use a custom layout with 3 TextView and 1 CheckBox inside of a custom view that extends LinearLayout and implements Checkable. The ListView has android:choiceMode="multipleChoice" but I can't click on the rows at all, and the boxes never get checked. Checking via code works with setItemChecked() though. If I change my adapter's getView to inflate from android.R.layout.s Sep 18 00:46:47 Any app developers in here willing to help me create an app on the base of profit share or trading for design work? Sep 18 00:48:49 it's hard without trust ;( and trust is hard to gain :| Sep 18 00:48:50 FallnShadw: please don't recruit in here Sep 18 00:49:12 Really? Sep 18 00:49:15 hard * hard = super hard Sep 18 00:49:20 FallnShadw: yes Sep 18 00:49:23 yes about recruiting, it's clearly stated in the topic Sep 18 00:49:24 Then there's no point for me to be here, farewell Sep 18 00:49:28 later Sep 18 00:49:46 *.* Sep 18 00:49:48 * evancharlton shakes his head Sep 18 00:53:11 hey someone at anddev.org needs to moderate the forum, tons of spam in it Sep 18 00:53:49 agreed Sep 18 01:04:36 . Sep 18 01:05:07 that pisses me off, I started a new account with anddev.org using my blog and it set my username to blog, I can't change it Sep 18 01:18:00 Why won't this work Integer minGpsUpdateDelay = Integer.valueOf(getString(R.string.gps_update_delay_mins)); Sep 18 01:19:10 qkzoo1978: ... why on earth are you putting an integer in a string? Sep 18 01:20:19 For some reason I thought that was the only way to store values in a resource, I take it I can store integers there, too, eh? Sep 18 01:26:09 ok, I don't get it. If I replace the CheckBox in my custom view used for each list item with a CheckedTextView and change nothing else (other than some casts from findViewById) the listview displays and functions perfectly fine. **** ENDING LOGGING AT Tue Sep 18 02:59:58 2012