**** BEGIN LOGGING AT Sat Apr 28 03:00:00 2012 Apr 28 03:01:54 writing to the memory address that the phone stores live gps data into is in what app? Apr 28 03:02:02 each phone is different im guessing Apr 28 03:14:57 meh, robolectric knows nothing about the support library... Apr 28 03:22:37 I've traced the warnings my exiInterace code generates (the encoding warnings at least) http://pastebin.com/AnEpJEMP to this block of the android GPS handling code: http://www.androidcodesearch.com/acs/source/external/jhead/gpsinfo.c#270 but I'm still unclear on what the proper encoding is meant to be... Can anyone shed some light on this? Apr 28 03:36:44 damnit, the stuff of robolectric I want to use, I can't :( Apr 28 03:36:50 rather, the reason I want to use it Apr 28 04:00:37 oh yeah, baby. I just edited AbsListView.java to have fast scroll always enabled, even if an app tries to disable it. Apr 28 04:00:42 Now I don't have to suffer through multiple flings to get through a large listview, like for Settings->Manage Applications, or Play store. Apr 28 04:01:01 No idea why fast scroll thumb would be disabled by default, having it permanently on has made my life so much easier when dealing with large lists that don't have fast scroll Apr 28 04:01:44 also, no idea why such central and core apps as Settings or Google Play wouldn't have such a simple-to-enable and very useful feature turned on Apr 28 04:02:00 android is such an amateur system full of wonky design choices Apr 28 04:02:53 but at least the source is available and buildable Apr 28 04:02:58 its only saving grace Apr 28 04:10:04 hello all Apr 28 04:47:31 i need to store some information that can be retrieved when the user closes an app and returns to it later. i need to store 3 pieces of information, all as strings. id prefer a secure format for storing them. whats the best way to do that ? Apr 28 04:51:26 hi Apr 28 04:56:44 devslash, encode and store in sql database? Apr 28 04:58:21 does java include crypto classes ? Apr 28 04:59:13 don't know, just google it Apr 28 04:59:40 there seems to be some maximum image size that a webview (or is it the image decoder in general?) will handle, beyond that stuff gets scaled down and renders fuzzy... any idea what that limit is and if its documented? I've got a 240x8640 image that renders fine, but then a 480x7560 one that doesn't so it doesnt seem to be as simple as a maximum width and height... Apr 28 05:18:37 spifff: it might be simply the size in bytes Apr 28 05:20:42 . Apr 28 05:23:06 if devs spent half as much time developing as they do bitching about development we'd have some really good apps Apr 28 05:24:04 p_l, hm yeah most likely uncompressed size in memory though Apr 28 05:24:16 i don't think compressing my jpg more will make any difference Apr 28 05:30:41 "Tests run inside the JVM on your workstation in seconds" Apr 28 05:30:59 thats great if harmony didn't have so many bugs :) Apr 28 05:31:01 hm the limit seems to be around 2MP on my hdpi device Apr 28 05:35:10 g00s: is that from Robolectric? Apr 28 05:35:16 yeah Apr 28 05:35:35 we started abstracting logic into POJOs and just JUnit testing those Apr 28 05:35:47 i'll test on the platform where the bugs are :) Apr 28 05:35:47 Robolectric is more hassle than it's worth if you're doing anything remotely interesting Apr 28 05:36:42 so JakeWharton , its been 1 or 2 weeks of solid exercise on rising in the morning, right ? Apr 28 05:36:44 right ? Apr 28 05:36:46 :) Apr 28 05:36:49 uh Apr 28 05:36:50 yeah Apr 28 05:36:52 sure Apr 28 05:36:53 exactly Apr 28 05:37:57 I'm giving a presentation in a few weeks and slides are due Tuesday. What should I talk about? Apr 28 05:38:19 what kind of things can you talk about ? Apr 28 05:39:14 anything Apr 28 05:39:20 Android-related, of course Apr 28 05:39:24 ha Apr 28 05:41:25 "How To Write Apps That Don't Suck" Apr 28 05:41:37 Step 1. Quit bitching and program Apr 28 05:41:38 1) use abs Apr 28 05:41:53 Step 2. Stop fighting the platform and libraries Apr 28 05:41:53 2) use guava Apr 28 05:41:55 3) profit ! Apr 28 05:42:35 i used to bitch a lot, but i don't much these days since i don't case as much Apr 28 05:42:56 why get mad? there are other platforms Apr 28 05:43:01 most people are unable to complain constructively Apr 28 05:43:47 hopefully you are not at work now :) Apr 28 05:44:03 why? Apr 28 05:44:20 <.< Apr 28 05:44:22 >.> Apr 28 05:44:28 nothing ;) Apr 28 05:46:48 "Man's eyeball plucked out in spat over radio" Apr 28 05:46:59 omg, i'm about to throw up Apr 28 05:56:14 ... Apr 28 05:58:46 my inet connection is driving me nuts Apr 28 06:01:47 It seems that an Ipad3 cannot use WiFi 802.11N if QoS/WMM is disabled on the router Apr 28 06:02:03 which I find quite stupid Apr 28 06:02:19 but I can enable it for a weekend while my sister is visiting Apr 28 06:02:48 android was plagued with dhcp bugs from 2.1 - 3.1 Apr 28 06:03:23 my grandparents 2Wire router/gateway DNS is just fubar Apr 28 06:03:33 if you use straight dhcp you won't be able to do shit Apr 28 06:03:41 you have to manually set DNS Apr 28 06:03:53 even if I manually set the DNS on the router, dhcp clients still fail Apr 28 06:04:34 http://www.net.princeton.edu/android/android-stops-renewing-lease-keeps-using-IP-address-11236.html Apr 28 06:04:47 "The bugs can cause the Android device to disrupt service to other devices on the network.". yey ! Apr 28 06:05:19 "Through March 26 2012, we have not received word from Google that any Android fixes for these bugs have been released." Apr 28 06:05:30 android ftl Apr 28 06:07:23 lols Apr 28 06:10:26 Also, why do they even still make 10/100 mbit routers, wireless or not Apr 28 06:10:31 they should all be gigabit minimum Apr 28 06:11:36 * g00s just had an awesome idea for an app :D Apr 28 06:17:06 and g00s stays quiet about it hehe Apr 28 06:19:30 :D Apr 28 06:25:21 hey QubeZ Apr 28 06:27:54 hey devslash Apr 28 06:28:06 god damn my inet connection and comcast Apr 28 06:28:14 getting a whole 1/2 Mb Apr 28 06:28:26 and thats not 1 or 2, that is half Apr 28 06:35:41 wow Apr 28 06:35:44 thats why i hate em Apr 28 06:35:53 on the other hand my app is starting to come along nicely Apr 28 06:38:34 which one? Apr 28 06:41:09 the mapping app Apr 28 06:41:25 what does it do? Apr 28 06:41:37 it will hopefully keep track of your location at a regular interval and plot in on a map in google maps Apr 28 06:41:47 and eventually maybe have some kind of sharing feature Apr 28 06:45:32 cool Apr 28 06:45:39 i've dealt with a lot of mapping, its fun Apr 28 06:47:28 yea it is Apr 28 06:47:39 I've always ended that kind of stuff for some reason Apr 28 06:47:44 maps always fascinated me Apr 28 06:47:56 same here Apr 28 06:48:12 err always been interested in Apr 28 06:56:30 hm, how to set the focus follow mouse behavior on lion Apr 28 07:00:07 http://incubator.apache.org/openmeetings/ Apr 28 07:00:08 :O Apr 28 07:00:33 looks like it replaces webex Apr 28 07:04:39 any suggestions on opening a twitter page? Apr 28 07:59:00 hi Apr 28 08:01:59 I'm using these two functions here http://pastebin.com/5FLpYVbK to have a fade in/ fade out in my image view, but one of my images is bigger and so makes the canvas bigger also when switching back to smaller image Apr 28 08:02:11 how to resize the canvas ? Apr 28 08:02:38 (I'm using TransitionDrawable) Apr 28 08:09:35 g00s: did you figure out the focus/mouse in lion? Apr 28 08:09:46 QubeZ: no :( Apr 28 08:09:53 i'd like to know if you did Apr 28 08:10:12 i thought snow leopard had this … weird Apr 28 08:19:29 Can I set a OnClickListener for all Buttons off a xml-Layout at once? Apr 28 08:22:09 Everything I found about that in the www is to use the same Listerne for multiple buttons, but that is not what I mean. Apr 28 08:26:31 maybee there is an Array of Button-IDs? Apr 28 09:47:44 Hmm Apr 28 09:49:19 If I'm to let the user draw figures in my app, should I go for a Path? Apr 28 09:55:43 Also, I'd like to know if the user input is in the path at times, but I can't seem to find a Path.containsPoint(Point) or similar. Apr 28 09:55:52 * n20 only found a method in iOS-world Apr 28 10:07:42 AudioTrack streaming: is there a way to tell how much of the buffer is available? Apr 28 10:27:27 hi Apr 28 10:27:51 There are a command line to convert an AndroidManifest.xml to a build.xml ? Apr 28 10:36:14 Clouclou, try something like this: android import --path . --target android-7 Apr 28 10:37:32 Clouclou, maybe it's update instead of import Apr 28 10:37:59 zpmorgan, none of worked Apr 28 10:38:10 what did it say? Apr 28 10:38:16 Flag '--path' is not a valid global flag. Did you mean to specify it after the verb/object name? Apr 28 10:38:50 try "update project" instead of "update" Apr 28 10:39:12 it's seem better Apr 28 10:39:54 android-7 refers to android 2.1, you might want something else. Apr 28 10:41:18 yes i changed to 14 (4.0.0) Apr 28 10:41:36 that must be nice :/ Apr 28 10:41:50 but now i have an isssue with "android list targets" who does not print anything Apr 28 10:42:14 hello Apr 28 10:42:19 s/targets/target/ Apr 28 10:42:41 no that the command given by the android update... Apr 28 10:42:52 does anyone know if the built-in android JSONObject loads up all data right when it's constructed from source (string), or if inner objects (e.g. arrays etc.) are constructed later when requested via getJSONarray etc.? Apr 28 10:43:14 i installed the ndk/sdk but the android command does not seem to "see" it Apr 28 10:45:18 did you do "android list target" or "android list targets"? Apr 28 10:45:50 both with the same result, ie printing no target Apr 28 10:47:26 maybe it's because i installed the sdk from eclipse ? Apr 28 10:48:06 yes. you need to set $ANDROID_HOME and update your PATH Apr 28 10:48:48 export ANDROID_HOME=$HOME/codestuff/android-sdk-linux_x86 Apr 28 10:48:49 export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools Apr 28 10:48:55 that's what I do Apr 28 10:52:35 zpmorgan, yes i did it but it didn't change anything Apr 28 10:53:57 i'll search it must be an env variable problem Apr 28 10:54:02 thanks for the help :) Apr 28 10:54:14 sure thing Apr 28 11:01:09 zpmorgan, it was an env problem, now i have my build.xml i can automaticaly build my apk :) Apr 28 11:01:56 Clouclou, nice! Apr 28 11:09:21 I have a couple of activities. Suppose a user goes like A -> B -> C -> D -> A how can I clear all the activities in between the first and second occurance of activity A Apr 28 11:09:21 ? Apr 28 11:10:26 I have 3 ImageView with images of different size in my ViewFlipper, the ViewFlipper takes the size of the biggest one, how to make it have the size of its current child ImageView instead ? Apr 28 11:20:27 maxagaz: give some fixed layout_width & height to the child imageview? Apr 28 11:20:57 in other words, how to force a FlipperView's layout height to match its current child's height Apr 28 11:23:48 napster: I just tried, but it's still taking the biggest size Apr 28 11:24:07 maxagaz: can paste the xml? Apr 28 11:25:26 napster: http://pastebin.com/APLePtp9 Apr 28 11:28:22 So don't use a viewflipper if it doesn't work like you want ;O Apr 28 11:28:24 maxagaz: Its bad to do so but I set some absolute values to the flipper size : http://pastebin.com/0q4c9Kzz test this and Apr 28 11:28:33 SimonVT: :) Apr 28 11:29:33 maxagaz: basically remove the "wrap_content" from he ViewFlipper Apr 28 11:34:22 SimonVT: what else would you suggest me to use to use ? Apr 28 11:34:55 napster: setting absolute values didn't help Apr 28 11:35:51 I don't know Apr 28 11:35:55 Custom view? :p Apr 28 11:41:13 it works when I do a removeView on the biggest Apr 28 12:10:04 hi all Apr 28 12:10:36 something wrong here ... the element of my ViewList are refreshing for a sec after I move the ViewList ... then they stop Apr 28 12:11:06 and I have to touch the list to have them refreshed again for a sec Apr 28 12:12:31 I am adding element at runtime and I call notifyDataSetChanged ... then each element is refresh calling postInvalidate() Apr 28 12:12:39 isd that wrong ? Apr 28 12:54:20 * napster thinks What happens if he setResult(RESULT_OK) inside his onBackPressed(); :D Apr 28 13:00:11 hello,I have a question Apr 28 13:01:01 is it possible to make a database and put it somewhere on a server, and then access it trought your android app? if yes ...how exactly? Apr 28 13:02:13 there are various ways Apr 28 13:03:24 You could expose an api for accessing the dp via a "listener" page Apr 28 13:03:41 and android could sent http posts to that page Apr 28 13:04:05 db* not dp Apr 28 13:05:13 can I make somehow a fizical database to upload it or smth... Apr 28 13:05:19 that's a way i've done it and would cover all but very critical interactions (i.e. doing financial transactions) Apr 28 13:05:33 I only know hot to do a local db trough the code Apr 28 13:05:50 and how you do it? Apr 28 13:05:55 a program or someting? Apr 28 13:06:00 you're trying to create a database on a remote server through android? Apr 28 13:07:07 ye,I'm trying to make a database on a server (for example like a list of tings to sell) so that i can modify it trough the phone... Apr 28 13:07:57 I pretty much don't know how to make it and access it exactly... like i told you ... I only know how to make a local one trough the code Apr 28 13:10:14 you probably want more than one opinion (due to security concerns), but I would have the server listen for HTTP Posts (on example.com/androidlistener.php for example) and have android send queries or inserts or whatever to that page Apr 28 13:11:46 you can encapsulate data using JSON as it is well supported in android and server side scripts (i'm at least sure php supports it) Apr 28 13:13:42 You don't want to have your app directly log into your database because there wouldn't really be much you could do to stop someone from figuring out the login info. So having a page on the server interpret requests and determine if they are valid is safer Apr 28 13:17:18 well for exampe if I just make a database witch stores username+passwoerd when someone signs up/in ....what I use to make the db? Apr 28 13:19:13 just make the db on the server side first Apr 28 13:19:21 Or use parse.com Apr 28 13:19:25 and then interact with it through android Apr 28 13:20:05 Is there an IPC mechanism on Android? Similar to COM or DBUS? Apr 28 13:22:21 MouseTheLuckyDog: Intents Apr 28 13:25:04 Thanks Jeppy. Apr 28 13:27:15 hi guys, i have project on core java can i port it to android, Apr 28 13:27:38 it will be great work to rewrite it Apr 28 13:27:40 devish: probably going to have to redo the UI at least. Apr 28 13:27:55 Depends a lot on your app. Apr 28 13:28:49 it has whole ui in singelton Apr 28 13:31:04 what i mean is, can i port all my jars into it, or will there will be some dependecy Apr 28 13:31:32 Most jars will work, providing they don't depend on things that Android doesn't support (notably Swing / AWT but there's more) Apr 28 13:32:01 I.e. in my experience, 90%+ of all open source libraries that come as a .jar work fine in Android. Apr 28 13:32:32 Whether yours will work depends on what exotic libraries or features you use. Apr 28 13:32:43 so dependent libraries can be imported too Apr 28 13:33:05 Yeah, it works the same as "regular" jars. Apr 28 13:33:23 If a jar depends on another, just add that to the build path too. Apr 28 13:34:27 thanks The Trash, need to experience it first Apr 28 13:54:42 Guys do you have ever developer with youtube apis? Apr 28 13:55:05 is there a way to get mp4 of the stream? because 3gp are really, really low quality Apr 28 14:07:33 herro fellas. Apr 28 14:49:51 I'm having a problem. When I press any button in my application it closes. Current function bound to any button is "mark" look at this: http://pastebin.com/rQKYvyqC Apr 28 14:50:00 I don't get it. Should work :/ Apr 28 14:50:54 Anyone here? Apr 28 14:57:12 what's your error? Apr 28 14:58:27 It just dies, "unfortunately blah has crashed" Apr 28 14:58:34 What's your error. Apr 28 14:58:40 Stacktracke Apr 28 14:58:42 trace* Apr 28 14:59:00 I'm more novice than you expect me to be :/ Apr 28 14:59:21 when an application crashes, the stacktrace is printed out to the log Apr 28 14:59:25 ah Apr 28 14:59:27 so use logcat to go see what it is Apr 28 14:59:56 this? http://pastebin.com/AS1LPH1v Apr 28 15:00:36 Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x6f Apr 28 15:01:00 com.hnefatafl.mattias.HnefataflActivity.mark(HnefataflActivity.java:53) Apr 28 15:01:12 so what's line 53? Apr 28 15:01:18 Guys do you have ever developer with youtube apis? Apr 28 15:01:19 is there a way to get mp4 of the stream? because 3gp are really, really low quality Apr 28 15:01:21 because you must have not pasted the whole thing Apr 28 15:01:46 yeah I didn't paste the whole thing. Apr 28 15:02:14 But line 53 is just4dos else Apr 28 15:02:14 { Apr 28 15:02:14 firstx = x; Apr 28 15:02:14 firsty = y; Apr 28 15:02:14 currentbutton.setText(board[x][y]); Apr 28 15:02:15 Toast.makeText(getApplicationContext(), "Click on another square to move the piece", Toast.LENGTH_SHORT).show(); Apr 28 15:02:18 } Apr 28 15:02:20 the first bracket. Apr 28 15:02:53 have you changed anything since building/installing the app to your test device? Apr 28 15:03:15 no but I can run it again and see if it's the same line if you want Apr 28 15:03:24 because I'm willing to bet it used to be currentbutton.setText(board[x][y]); Apr 28 15:03:59 http://pastebin.com/uvNEmbnQ Apr 28 15:04:01 new logcat Apr 28 15:04:01 since you're passing a char to the method, I'm willing to bet it's casting it to an int and trying to use it as a resource ID Apr 28 15:04:33 hmm ok Apr 28 15:04:47 yea, it's line 56 now Apr 28 15:04:50 so I'l just make it a string? Apr 28 15:04:54 yea Apr 28 15:04:58 great :) Apr 28 15:09:55 Thanks. It works now. Not as intended but it doesn't crash. Apr 28 15:26:51 why if i have the progressbar set is the color not honored http://pastebin.com/jFQcZAKk Apr 28 15:28:53 hi all, does anyone knows when doing canvas.drawBitmap() data is copied or referenced (in other words - can i instantly do bitmap.recycle() after drawing it on canvas)? Apr 28 15:30:52 qisur, idk, but if your wanting to do that imo most likely your doing something wrong :\. unless ur not going to be updating the canvas after that time. I would think you would be able to recycle it right after drawing it though. Apr 28 15:36:42 Jug6ernaut, well the thing is, i'm drawing various bitmaps on screen that are constantly created/recycled; on my onDraw() method, i check if image is still available (not null & not recycled) and try to draw it -- but app still crashes, so i'm trying to figure out if it's related to recycling image while it's still on the canvas (from the previous draw operation).. oh well, i'll try to investigate it further Apr 28 15:37:13 why if i have the progressbar set is the color not honored http://pastebin.com/jFQcZAKk Apr 28 15:37:13 what error is it throwing? Apr 28 15:37:38 Jug6ernaut, actually it crashes with signal 11 (SIGSEGV) Apr 28 15:37:48 k Apr 28 15:38:06 it might be bc of the recycling then Apr 28 15:38:25 recycling is good for the environment Apr 28 15:38:32 omega 3 fatty acids are good for your heart Apr 28 15:38:38 only you can prevent forest fires Apr 28 15:39:51 qisur if you are recreating your images every frame, it might be better to go opengl & native where u can better manager your memory. IDK how effecent constantly allocating and deallocation bitmaps is goign to be, expecially at the rate you need to do it Apr 28 15:42:38 Jug6ernaut, probably you're right... meh, i guess it's time to learn opengl... Apr 28 15:43:17 if i may, what are you drawing? Apr 28 15:43:19 opengl is super easy Apr 28 15:43:32 just be thankful it's nothing like directx Apr 28 15:43:59 lol Apr 28 15:44:19 well opengl es1.1 is easy, 2.0 is a little confusing Apr 28 15:44:42 hi, if someone can answer to that : http://stackoverflow.com/questions/10359606/android-wifi-p2p-unsupported-wifidirect Apr 28 15:45:03 Jug6ernaut, essentially it's a huge image that user can zoom/scroll/etc - that is chopped in small chunks, and those chunks that are in the view are loaded (if not done before) and those who are out of the view - recycled Apr 28 15:45:23 since nobody will answer my question about progress bar bot accepting my color does anybody have a link how to modify gtalk or add custom themes to it Apr 28 15:46:18 qisur so the images arent being "created" just loaded? Apr 28 15:47:42 Jug6ernaut, well, both... they are loaded but have to be coppied to different bitmap so they're mutable (i have to access pixel data) Apr 28 15:48:15 hmm Apr 28 15:48:27 how big is the total image Apr 28 15:48:58 it's about 3 inches Apr 28 15:49:02 why? Apr 28 15:49:23 Jug6ernaut, huge.. around 5000x3000 now, but might be even bigger Apr 28 15:49:42 lol ok Apr 28 15:49:49 that's not huge Apr 28 15:51:10 Jug6ernaut, it's a world map (with countries being masked with different color - so accessing pixel data i can check which country was "selected").. anyhow, i guess a simple canvas and draw won't do the trick here.. sigh Apr 28 15:51:49 well canvas should be fine for that, Apr 28 15:52:20 you just need to keep track of your bitmaps, keep a set amount, how ever many needs to be on the screen at a time, and load/recycle them as needed Apr 28 15:53:35 Jug6ernaut, that's exactly what i'm trying to do right now.. well, back to coding... thanks for your help, appreciate it Apr 28 15:54:04 qisur when loading your bitmaps you are loading JUST whats need directly from file right? Apr 28 15:55:08 Jug6ernaut, what do you mean? i load the bitmap, then I manipulate some pixels (need to change some colors from the original file) Apr 28 15:55:36 so you are loading the entire image into a bitmap? Apr 28 15:55:48 Jug6ernaut, correct Apr 28 15:56:40 yea i would try to find a way to load just what is needed for each tile directly from the file, trying not to load entire image into a bitmap, would use ALOT of memory Apr 28 15:57:25 Jug6ernaut, oh.. wait, ehm.. i load the entire file into a bitmap, but the file itself is just a small chunk of the whole picture.... if that makes sense :) thus i'm loading 300x200 images or so Apr 28 15:57:40 o ok Apr 28 15:57:51 so the image is already split up into tiles Apr 28 15:58:00 Jug6ernaut, yup Apr 28 15:58:09 yea it should be straigh forward then, just need to manage your bitmaps :) Apr 28 15:59:35 Jug6ernaut, frankly i don't really have any memory issues (after fighting with VM for like a day.. arghh...) - keeping everything tidy and way under the VM limits, so yup, now just need to find a flexible way to keep images from getting recycled while they're still on the canvas... again - thanks for your help Apr 28 16:02:26 np Apr 28 16:02:51 If dissmissDialog is depreciated, what are we supposed to use now? Apr 28 16:03:09 i assure you, it has not depreciated Apr 28 16:03:22 lol Apr 28 16:03:47 I'm developing an app that makes use of the camera. I place the snapped image in an ImageView of an Activity. Apr 28 16:03:59 coolbeans Apr 28 16:04:02 are saturdays always like this Apr 28 16:04:09 yep :\ Apr 28 16:04:16 s/saturdays/every day/ more likely Apr 28 16:04:17 I'm having a few issues with keeping the quality high of the snapped image, without exceeding the vm budget. Apr 28 16:04:18 * Jug6ernaut should be like canadiancow Apr 28 16:04:31 canadiancow, then why is eclipse telling me it is? Apr 28 16:04:51 i assure you, it is not Apr 28 16:05:04 drlaban well, the images you take are going to be well beyond the screen size Apr 28 16:05:13 so dont load them bigger then they need to be Apr 28 16:05:15 At the moment I'm downsampling the image, and for the most part it looks fine, but when someone snaps an image with the front facing camera, the quality is usually horrible. Apr 28 16:06:04 I'm just trying to figure out how to keep the images as small as possible so I won't exceed the VM budget but still present a sharp image. Apr 28 16:07:16 so cr5315, the word you are looking for is deprecated Apr 28 16:07:21 and if you read the docs: Apr 28 16:07:26 final void dismissDialog(int id) Apr 28 16:07:27 This method is deprecated. Use the new DialogFragment class with FragmentManager instead; this is also available on older platforms through the Android compatibility package. Apr 28 16:07:49 Dialog.dismiss(); Apr 28 16:07:57 showDialog/dismissDialog/whatever was a really poor implementation Apr 28 16:08:09 is that a reason to deprecate it ? Apr 28 16:08:21 yes? Apr 28 16:08:24 absolutely Apr 28 16:08:25 when there is a better implmentation yes Apr 28 16:08:26 It's aparent that my downsampling is making the image quality horrible for front-facing or low MP cameras, but how can I make the downsampling/image presentation consistent? Apr 28 16:08:37 what other reason is there to deprecate something? Apr 28 16:08:48 canadicancow is dialogfragment complicated? only fragment work ive done is with abs & viewpager :\ Apr 28 16:08:48 why not deprecate the whole SDK while at it. Apr 28 16:09:00 because there are not better implementations Apr 28 16:09:19 Jug6ernaut|work, it's just a normal fragment that extends DialogFragment isntead Apr 28 16:09:28 then you get it in your backstack etc Apr 28 16:09:28 whould be funny if all functions were deprecated without replacement Apr 28 16:09:53 ahh Apr 28 16:10:05 yes, hilarity will ensure and we'll all slap each other on the backs and go out for a beer Apr 28 16:10:10 ensue Apr 28 16:10:51 +1 Apr 28 16:11:13 this is not google+, damnit Apr 28 16:11:18 +1 Apr 28 16:11:30 Like Apr 28 16:11:32 its not? Apr 28 16:11:41 Close enough Apr 28 16:13:47 i need to shave Apr 28 16:13:48 and eat Apr 28 16:13:53 maybe shower while im at it Apr 28 16:13:55 <3 weekends Apr 28 16:15:06 not at same time i hope Apr 28 16:15:45 heh lol Apr 28 16:16:24 * Jug6ernaut|work goes back to crap work Apr 28 16:17:12 what are you working on? Apr 28 16:17:22 I haven't shaven in 2 years Apr 28 16:17:31 I estimate I've saved about $12,000 on razor blades. Apr 28 16:17:55 i dont need to shave often, but i cant imagine what 2 years would do Apr 28 16:17:58 :| Apr 28 16:18:00 and $12k? lol Apr 28 16:18:08 you spend >$100 on razor blads a week? Apr 28 16:18:20 yea my $40 lasts me like 6 months or something Apr 28 16:18:28 lol yea same here Apr 28 16:18:34 i only shave like once a week tho xD Apr 28 16:18:37 * Jug6ernaut|work hates shaving Apr 28 16:18:37 Sissies. Apr 28 16:18:55 pragma- u must have shaved like 3times a day or something Apr 28 16:19:02 * pragma- is macho like that. Apr 28 16:19:06 thats some hardcore beard action Apr 28 16:26:08 pragma- i use my whal clippers then shave Apr 28 16:26:31 whale clippers? Apr 28 16:27:06 lol Apr 28 16:28:20 best gsm phone on the market currently, go! Apr 28 16:30:35 is the sgs3 gonna be gsm? Apr 28 16:31:03 ofc Apr 28 16:33:21 anyone know how to do a tri-state checkbox? im playing around with drawable states and not getting very far Apr 28 16:34:13 what are the three states? Apr 28 16:34:31 well im adding a X delete icon to a edit-text Apr 28 16:34:52 so ive extended CheckedTextView with the basic code from EditText Apr 28 16:35:11 so now i can show or hide the X with setChecked Apr 28 16:35:26 works fine, but i also need to hide it when its not needed Apr 28 16:35:40 i suppose i could setCheckmarkDrawable(null); Apr 28 16:39:03 whal clippers @prama- Apr 28 16:39:24 there top of the line salon quality :) Apr 28 16:46:06 Jug6ernaut|work ;) Apr 28 16:46:15 now i can control the saturday crowd Apr 28 16:47:13 nice Apr 28 16:50:39 Hi. I have some data that represent: table number, and customer's order. I want to do have a screen that display all orders which are not "done" yet, and display them as tabular data. next to each order, a button to be clicked upon completion Apr 28 16:51:22 you want a ListView Apr 28 16:51:31 data gets passed in through an adapter Apr 28 16:52:32 and using a timer, i can fetch data and update the list, right? to get the latest orders Apr 28 16:52:54 yep Apr 28 16:53:18 Ok great, I'll look this ListView up Apr 28 16:53:45 probably will use AlarmManager to schedule something to fire then in a receiver you can run your update task (asynchronously) Apr 28 16:54:29 a lot of people get into complicated Timer code for that but AlarmManager works just fine to schedule something to fire on regular fixed interval (or you can trigger it of course) Apr 28 16:54:47 does it just fire an intent? Apr 28 16:55:40 Cool :) Apr 28 17:02:42 THE COW IS A LIE Apr 28 17:04:02 lol Apr 28 17:04:47 lol JakeWharton Apr 28 17:07:58 support library is nothing but problems for ABS Apr 28 17:08:50 ? Apr 28 17:09:21 abs is useless without it :( Apr 28 17:11:03 ICS is useless without it. Apr 28 17:11:05 wth Apr 28 17:11:19 canadiancow|work op :| Apr 28 17:11:46 I need getSupportFragmentManager().dispatch(int what, Object value) Apr 28 17:12:40 why isn't fragment manager an event bus :( Apr 28 17:12:47 Why do you need that Apr 28 17:13:01 * Jug6ernaut|work nees makeMeAMillionare().execute(); Apr 28 17:13:03 so I don't have to shove the menu shit through the native callbacks Apr 28 17:13:23 ah Apr 28 17:14:45 Jug6ernaut|work: but first you need iNeedSpellChecker().preExecute(); Apr 28 17:14:58 i need that a long time ago Apr 28 17:15:05 heh Apr 28 17:15:13 needed* Apr 28 17:15:36 sadly i have yet to find one for mirc hehe Apr 28 17:16:20 who still uses mirc? whoa dude :) Apr 28 17:16:45 i do :( Apr 28 17:16:57 damn kindle fire Apr 28 17:17:12 no gps and my app gets rejected for kindle fire compatibility Apr 28 17:17:35 hmm how do I make gps optional? I didn't put it in my manifest as , its just a permission Apr 28 17:17:51 not necessary for my app to function since network is good enough Apr 28 17:22:18 mirc \o/ Apr 28 17:22:43 ): Apr 28 17:24:12 o.O Apr 28 17:24:23 canadiancow has the +o hat? Apr 28 17:25:59 * t0mless tips the cow and runs! Apr 28 17:26:13 substitute op Apr 28 17:26:19 ,oO( +o is not a hat, its an at... ) Apr 28 17:26:54 QubeZ: are you using google maps library in your app? Apr 28 17:27:01 Ge0rG: yes Apr 28 17:27:15 ah, looks like a quava eventbus bug i found has been patched Apr 28 17:27:42 QubeZ: thats your problem. the gmaps library is what blocks installation, not gps Apr 28 17:27:53 * g00s sees tipped cow, uses as place to sit Apr 28 17:29:16 * SimonVT tips cow, sits on g00s Apr 28 17:30:08 sigh Apr 28 17:30:29 Ge0rG: ahh makes sense, i see now that the google mobile services are not avail Apr 28 17:30:40 how crippling that is for kindle Apr 28 17:30:49 Android running device w/o google mobile services Apr 28 17:30:50 lame Apr 28 17:31:16 any how, i'll keep chugging along and just be on the appstore for all other devices Apr 28 17:31:45 poor canadiancow|work...never sw the tipping coming until he was already on his side :\ Apr 28 17:34:36 why does HTC's default IME suck so hard :( Apr 28 17:35:06 i like it actually Apr 28 17:35:24 what i mean is, they dont implement imeOptions=actionDone Apr 28 17:35:32 it does nothing, so i have to do it in code Apr 28 17:35:35 what Apr 28 17:35:43 what do you need that for Napalm Apr 28 17:36:13 what its used for, after entry to hide the ime or perform an action Apr 28 17:42:08 anyone know if there is a generic way to turn on mass usb storage from the adb command line? (broken buttons and digitizer.... need to recover data) Apr 28 17:52:20 anyone know of a good reference for making a view parcelable? Apr 28 17:52:38 There is none Apr 28 17:52:46 Cus that's most likely not a good thing Apr 28 17:53:15 e.g. you can't parcel a context Apr 28 17:53:49 you should only parcel your own data, not the whole view Apr 28 17:53:55 Hmm Apr 28 17:54:03 would i need a separate object for that? Apr 28 17:54:15 How about you say what you want to do Apr 28 17:55:00 But yeah, as Ge0rG said, save the state, not the view Apr 28 17:55:26 I have a compound control I made. It has 2 fields in it. I create an array of these objects, and I want to parcel them up so I can save the data in savedInstanceState Apr 28 17:56:01 View has onSaveInstanceState that is called automatically by the framework Apr 28 17:56:05 As well as onRestoreINstanceState Apr 28 17:56:21 can you append another query to a cursor? or can you query more than one table? im trying to build a cursor that contains my whole database to use in my search activity... not sure how its supposed to be done... Apr 28 17:56:25 Handle your state there Apr 28 17:56:43 SimonVT, Hnadle the data save in the my custom view? Apr 28 17:56:50 yes Apr 28 17:57:16 It's the views state, it should handle it itself Apr 28 17:57:19 using this i get one table in the cursor "cursor = database.query("Table1", fields, null, null, null, null, null);" anyway to get Table2 and Table3 at the same time? Apr 28 17:57:24 oooh. Ok. how about for saving the objects themselves in the parent activity? Right now I'm just adding them to a linearlayout. I don't have them in an array or anything. Apr 28 17:57:45 you can't save the view Apr 28 17:58:06 You can just keep the data in your activity if you want, then restore it from there as well Apr 28 17:58:34 Hmm. So keep just the data and then recreate the views at restore time? Apr 28 17:58:41 Sure, if you want Apr 28 17:59:34 Would it be more efficient to create another class to hold the data, or just keep it in arrays? Apr 28 18:00:21 Keep it in your activity Apr 28 18:01:44 looks like wozniak loves wp , and thinks its better than android in many respects http://www.osnews.com/story/25882/Wozniak_loves_Windows_Phone_7_5 Apr 28 18:02:20 the elementys in my ListView stop to refresh after 1 sec I touch the ListView Apr 28 18:02:31 is it strange ? Apr 28 18:02:52 and I am invalidating them each time Apr 28 18:05:33 Hey, I'm getting an uncaught exception and shutdown on a service after a random >long< duration. Any ideas on what it could be? Apr 28 18:06:24 GaussJordan gotta get the exception ;) Apr 28 18:06:39 or any ideas on how I can easier debug it. I have to wait something near an hour before it happens :/ Apr 28 18:07:18 just capture the exception, replace the uncaughtexcption handler with your own, capture the exception, then pass to default handler Apr 28 18:08:42 Ah, that certainly leads me onwards :) Thanks Apr 28 18:09:43 np Apr 28 18:12:05 hello Apr 28 18:13:06 can any one help me? Apr 28 18:13:13 ehm Apr 28 18:13:18 good start! Apr 28 18:13:25 Looool Apr 28 18:14:04 i am developing an android application that has an alarm that notify me every 10 minutes Apr 28 18:14:43 also when it notify me , the dialog will appear and when i click button in dialog Apr 28 18:14:53 SimonVT, you will love that question : "usually you have Model.setView(...) or a View.setModel(...) ?" Apr 28 18:15:05 something wired happen Apr 28 18:15:19 my project name is appear in the middle of screen Apr 28 18:15:30 and i can not do anything Apr 28 18:15:37 until i press back button Apr 28 18:15:47 and i have no idea what should i do Apr 28 18:15:54 any one help me please? Apr 28 18:16:14 dfdfdf, I don't see any question Apr 28 18:16:23 :( Apr 28 18:16:29 help you in what ? Apr 28 18:16:30 ok Apr 28 18:17:17 http://stackoverflow.com/questions/10128194/alarm-will-cause-weird-error-until-i-press-back-button Apr 28 18:17:31 can you please check this aleSD Apr 28 18:17:39 dfdfdf, I am a nooby Apr 28 18:17:47 * g00s is a nobody also Apr 28 18:18:01 what? Apr 28 18:18:04 nobodies unite ! Apr 28 18:18:37 aleSD did u check the link? Apr 28 18:19:31 Custom Components | Android Developers, List4.java and List6.java all say that building child views of a Compound Component can be done in XML, but neither explains to nor refers to how. my question is thus: how? Apr 28 18:20:24 aLeSD: Usually I do it how it's recommended instead of trying to apply my own patterns where it isn't needed Apr 28 18:27:20 SimonVT, and how it's recomended ? Apr 28 18:27:31 Do I need to explicitely save the values of views that don't change from layout to layout in onSaveInstanceState? Without overriding that method at all, they seem to stay... Apr 28 18:27:33 Whatever you're doing is not it Apr 28 18:28:21 mmmm ... it's 1 month I am trying to understand ... and I am doing always wrong .. Apr 28 18:28:22 damccull: Framework views save their own state Apr 28 18:28:38 SimonVT, so EditText I don't need to automagically do? Apr 28 18:28:44 just a min Apr 28 18:28:54 joel135, are you talking about combining several controls into a custom view? Apr 28 18:29:16 damccull: Right Apr 28 18:29:23 SimonVT, thanks Apr 28 18:29:43 textviews save their text, listviews save their scroll position, etc Apr 28 18:29:43 Model extends Observable{...}; View implements Observer { public setModel(Model m){ m.registerObserver(this); this.model = m;}} Apr 28 18:29:45 damccull: yes Apr 28 18:30:01 joel135, And you want to build the layout with xml right? Apr 28 18:30:18 SimonVT, I think my code it's pure MCV Apr 28 18:30:21 or MVC Apr 28 18:31:38 ok ... is that a stupid, wrong, smelly code ? Apr 28 18:31:56 Still trying to make a listview? Apr 28 18:32:06 why would you make a listview? Apr 28 18:32:10 the framework provides it for you Apr 28 18:32:11 damccull: yes, i want to group TextViews etc into a MyView using xml, and then use multiple MyViews in main.xml, for example Apr 28 18:32:19 SimonVT, no ... it's not working for me... came back to scrollView Apr 28 18:32:25 joel135, http://pastebin.com/8TYDP62A Apr 28 18:32:43 Watch the google io talk on how to make a listview Apr 28 18:32:47 And drop everything you got now Apr 28 18:33:04 SimonVT, it doesn't update and I have many elements that are glSurfaceView ... strange behaviour Apr 28 18:33:32 SimonVT, me ? Apr 28 18:33:37 Yes Apr 28 18:33:38 another time ? Apr 28 18:33:44 No, right now Apr 28 18:33:47 damccull: looks like I intended. thanks! Apr 28 18:34:02 np. i found it on stackoverflow somewhere. Apr 28 18:34:16 You're trying to apply a pattern on top of a pattern, and things are breaking Apr 28 18:34:19 you have to use the constructor like that so you can get to the inflater Apr 28 18:34:21 Instead, stick to the intended pattern Apr 28 18:34:42 Your whole implements Observer, setModel etc is horrible. Trying to put it in a scrollview is even more horrible Apr 28 18:34:46 ListViews are nice and simple Apr 28 18:34:57 awesome* Apr 28 18:35:26 SimonVT, I created a BasicAdapter and passed it to the ListViews ... the adapter representy the data in the model Apr 28 18:35:30 all works ... but Apr 28 18:35:38 it stops on 1 sec Apr 28 18:35:39 Go watch the listview talk Apr 28 18:35:42 ok Apr 28 18:35:54 lol Apr 28 18:36:08 SimonVT where were u when i was first trying to figure out listviews? Apr 28 18:36:13 * Jug6ernaut|work wasted so much time Apr 28 18:36:16 Probably right here Apr 28 18:36:20 lol Apr 28 18:36:22 You just didn't ask the right questions :p Apr 28 18:36:23 probably Apr 28 18:36:27 you know Apr 28 18:36:29 does the viewholder stuff really save that much performance? Apr 28 18:36:34 ur probably 100% right xD Apr 28 18:36:44 ugh dont use a "viewholder" as a tag Apr 28 18:36:50 storkme_: On a G1 it did Apr 28 18:36:56 just make a MyView extends RelativeLayout or whatever Apr 28 18:36:57 Hi Apr 28 18:37:00 and have that class reference everything Apr 28 18:37:01 On a GN, not so much Apr 28 18:37:07 SimonVT, I really did it in the right way Apr 28 18:37:08 canadiancow|work: .. really? Apr 28 18:37:20 :ººººººº Apr 28 18:37:37 aLeSD: The listview talk is 1 hour long, I only told you 2 minutes ago Apr 28 18:37:40 really what? Apr 28 18:37:44 yes really Apr 28 18:37:58 SimonVT, it's the third time you tell me to watch it Apr 28 18:38:04 setTag actually leaks activities in 2.x Apr 28 18:38:06 and 1.6 Apr 28 18:38:09 oh Apr 28 18:38:14 not sure about 3.x Apr 28 18:38:17 aLeSD: Yet you still implement Observer and Observable Apr 28 18:38:30 I am not dtoring references to the view : WeakReference <---- cause I am pro Apr 28 18:38:53 SimonVT, I am doing it cause I had to change to ScrollView Apr 28 18:39:00 ok Apr 28 18:39:24 but what I noticed is that ListView is faster Apr 28 18:39:32 but: Apr 28 18:39:43 1) it doesn't refresh my Views Apr 28 18:39:59 2) it draw glsurfaces in strange ways Apr 28 18:40:31 glsurface view in a listview...thats...going to be interesting Apr 28 18:41:08 wtf Apr 28 18:41:15 you sure thats going to work at all Apr 28 18:41:23 probably not :P Apr 28 18:41:45 listviews "share" memory for the views, i have no idea what kind of effects this will have with a glsurface view lol Apr 28 18:41:48 HELP Apr 28 18:42:01 HJALP Apr 28 18:42:10 erm. Apr 28 18:42:11 dfdfdf: 1. pick a real nick. 2. ask a question, don't just say HELP Apr 28 18:42:11 CARP Apr 28 18:42:30 yes i typed "carp" Apr 28 18:43:06 I have no idea how to change my nick Apr 28 18:43:10 canadiancow|work work day is almost done :D Apr 28 18:43:13 ok well ignore that one Apr 28 18:43:18 also i already ask twice Apr 28 18:43:19 ./nick yourNewNick Apr 28 18:43:21 is this SystemClock.sleep(500); the equivelant of thread.sleep? Apr 28 18:43:29 it doesn't work Apr 28 18:43:30 well if no one answered, it's probably because you asked poorly or no one knows Apr 28 18:43:38 Jug6ernaut|work i havent actually done any work today Apr 28 18:43:43 hehe Apr 28 18:43:44 i just have my work laptop out while im watching tv Apr 28 18:43:52 #winning Apr 28 18:43:54 ./nick Alarm Apr 28 18:43:58 a Apr 28 18:44:01 /nick NEW_NICK Apr 28 18:44:01 protected Void doInBackground(Intent[] paramArrayOfIntent) { Apr 28 18:44:02 mins the . Apr 28 18:44:02 no . Apr 28 18:44:16 ... Apr 28 18:44:19 are you kiddin gme Apr 28 18:44:25 lolol Apr 28 18:44:29 try: Apr 28 18:44:33 /nick I_AM_DUMB Apr 28 18:44:40 :/ Apr 28 18:44:52 that works too Apr 28 18:45:00 dominicdinada ur nick is to long imo :P, & thats not a question at all Apr 28 18:45:19 DUMB* Apr 28 18:45:24 =/ Apr 28 18:45:25 ... Apr 28 18:45:31 the one day i have +o Apr 28 18:45:37 Jug6ernaut|work: use the tab key to autofill :) Apr 28 18:45:40 someone tries to change their name to canadiancow_IS_DUMB Apr 28 18:45:59 my other nick is droidbuster Apr 28 18:46:01 Jug6ernaut|work, so I can't put the glSurfaceView inside the ListView Apr 28 18:46:15 please i wanna help in develop an alaram Apr 28 18:46:33 an alarm? Apr 28 18:46:36 like a clock? Apr 28 18:46:41 you know the clock app's source is... open Apr 28 18:46:46 i am already develop an alarm that works every 10 minutes Apr 28 18:46:51 this better ? Apr 28 18:46:55 no it is not like the clock Apr 28 18:46:59 do all intents get passed when your using search dialog? Apr 28 18:47:43 no it is not clock Apr 28 18:48:07 gah i need to decompiler gtalk Apr 28 18:48:09 or is it only the text entered in search popup... Apr 28 18:48:21 so i can modify its theme etc Apr 28 18:48:29 well what is it like alaram_developer... if you want help, you need to ask questions Apr 28 18:48:51 this is my question Apr 28 18:48:59 http://stackoverflow.com/questions/10128194/alarm-with-back-button-will-cause-weird-error Apr 28 18:49:04 please check it Apr 28 18:49:23 I have an alarm in my app that notifies me every 10 minutes, it works fine but each time when the alarm notifies me, my application name will show as box in the middle of the screen, and i can't press anything until i press the back button. It's really weird! Apr 28 18:49:39 Is it possible to implement ListActivity inside an activity using relativelayout? Currently, Ive got an Activity, has some buttons and textviews, and part of it is a ScrollView - can I replace the scrollview with listactivity-like-ish thing? Apr 28 18:50:02 SimonVT, r u there ? Apr 28 18:50:14 @candiancow did u understand me Apr 28 18:50:47 I have an alarm in my app that notifies me every 10 minutes, it works fine but each time when the alarm notifies me, my application name will show as box in the middle of the screen, and i can't press anything until i press the back button. It's really weird! Apr 28 18:51:04 ok : may I use glSurfaceView inside ListViews ? Apr 28 18:51:37 lol Apr 28 18:51:53 if no/me is not lolling Apr 28 18:52:14 no alaram_developer, you've done something very strnagely, very wrong Apr 28 18:52:20 i do not know what the solution is Apr 28 18:52:29 really? Apr 28 18:52:29 i do not have time to read through and fix all your clothes Apr 28 18:52:31 err code Apr 28 18:52:35 wow i cant believe i just said that Apr 28 18:53:06 can anyboy help me Apr 28 18:53:12 anybody* Apr 28 18:53:19 and u cow Apr 28 18:53:26 please just shut up Apr 28 18:53:31 :) Apr 28 18:54:06 lolk Apr 28 18:54:26 canadiancow, he asked me how to register his nickname 10 minutes ago Apr 28 18:54:48 i wonder if he'll realize he can just rejoin Apr 28 18:55:01 me either Apr 28 18:55:17 canadiancow|work, I think you are a pro Apr 28 18:55:23 may I use glSurfaceView inside ListViews ? Apr 28 18:55:44 i doubt it Apr 28 18:55:56 i mean it's possible i suppose Apr 28 18:56:02 but what are you trying to do with them? Apr 28 18:56:15 a list of glSurfaceView ? Apr 28 18:56:25 but why Apr 28 18:56:52 show the output of several sensor at same time Apr 28 18:57:08 why do you want to do it with opengl Apr 28 18:57:10 I have a vector in 3d that is pointing Apr 28 18:57:30 I have several Views ... one is a VectoView Apr 28 18:57:45 I mean I am putting in the ListView several differents Views Apr 28 18:58:00 well have you tried this? Apr 28 18:58:08 yes Apr 28 18:58:08 i mean a GLSurfaceView is a GLSurfaceView, and a ListView is a ListView Apr 28 18:58:12 and does it work? Apr 28 18:58:38 In a way yes... but I am nooby and I dunno if I am doing something wrong elsewhere Apr 28 18:58:46 I explain Apr 28 18:59:01 each View is an Observer of the Model Apr 28 18:59:15 and the listView is an observer of the modelstructure Apr 28 18:59:27 listview views should not be directly tied to anything like that Apr 28 18:59:37 unless you're resetting it every time in getview Apr 28 18:59:37 I add an Observable to the model and the ListView add a View Apr 28 19:00:01 wait Apr 28 19:00:23 the model nofity that there are a new element and the view redraw the views Apr 28 19:00:41 each view is an Observer of one of the Observables of the model Apr 28 19:00:43 so what i would do is just have a textview or something Apr 28 19:00:47 that displays a numeric value Apr 28 19:00:52 and get tha tworking, becuase i know that will work Apr 28 19:00:55 the Observables postInvalidate the view Apr 28 19:01:37 using ScrollView works Apr 28 19:01:37 once you have it working with textviews, then try to use opengl Apr 28 19:01:46 oh ok Apr 28 19:01:50 then youre just using listview wrong Apr 28 19:01:52 :) Apr 28 19:02:01 yes ... that's my prob Apr 28 19:02:25 for example you have Views inside the ListView and you inbvalidate them ... do they refresh ? Apr 28 19:02:35 have you watched the world of listview video? Apr 28 19:02:49 :ººº Apr 28 19:02:51 you should never act upon a view in a listview outside the getview method unless you REALLY know what you're doing Apr 28 19:03:04 I REALLY dunno Apr 28 19:03:23 so ... I can't use ListView Apr 28 19:03:27 http://www.youtube.com/watch?v=wDBM6wVEO70 Apr 28 19:03:28 yes Apr 28 19:03:28 you Apr 28 19:03:29 can Apr 28 19:03:29 T_T Apr 28 19:03:50 I can't use getView Apr 28 19:03:57 ? Apr 28 19:03:59 my views are Observers of hte Model Apr 28 19:04:15 i think you're completely missing the point Apr 28 19:04:21 go watch that video Apr 28 19:04:25 show me thge light Apr 28 19:04:28 ok Apr 28 19:04:30 if you ask another question within the next hour, i know you havent watched it Apr 28 19:04:32 3rd time Apr 28 19:04:38 lol Apr 28 19:04:44 ok Apr 28 19:05:12 go do a simple lsitview tutorial or something Apr 28 19:07:42 canadiancow|work, just the last thing Apr 28 19:07:47 before the video Apr 28 19:08:01 may I update the views inside the ListView ? Apr 28 19:08:33 and if the problem is that the ListView is releasing the Views I know it Apr 28 19:08:44 you can do it if you're careful Apr 28 19:09:03 canadiancow|work, is it about a null reference ? Apr 28 19:11:40 no, it's about view recycling and references Apr 28 19:12:46 so, if i were to travel with my android phone and cross time zones, does it automatically adjust the time ? Apr 28 19:13:05 i'm trying to figure out what the timezone offsets are, given gps coordinates Apr 28 19:13:34 JakeWharton, I know it ... I am using a WeakReference in the model to notify the View Apr 28 19:13:43 g00s: yes Apr 28 19:14:22 aLeSD: what happens when the view is recycled for another row? Apr 28 19:14:23 and I am checking if View v = WeafReference.get(); if (v == null) return; else v.newdataNotify(); Apr 28 19:14:35 you have two models referencing the same view Apr 28 19:14:49 JakeWharton, I impremented my own BaseAdapter .. no recicling up to noiw Apr 28 19:15:22 that defeats the whole purpose of a ListView Apr 28 19:15:27 and it will be incredibly slow Apr 28 19:15:33 Anyone know of a good article on consuming twitter tweets into a ListView or the like? Apr 28 19:15:57 JakeWharton, so ... my goal will be the scrollView Apr 28 19:16:05 if you say so Apr 28 19:16:09 lol Apr 28 19:16:27 no .. really . I think I am trying to use ListView out of its purpose Apr 28 19:17:06 you are solely because you're not adhering to the constraints and behaviors of the ListView Apr 28 19:19:47 You have to respect the ListView. Only then can you truly appreciate it Apr 28 19:20:51 and then you tame it to shit like a wild beast Apr 28 19:21:07 one must submit Apr 28 19:21:10 * g00s watches storkme_ take listview by the reigns ! Apr 28 19:32:17 storkme_ v ListView - This saturday on #android-dev Apr 28 19:32:41 hm, so there is no way to get tmz from lat/long w/o using something like geonames ? Apr 28 19:35:08 Probably not Apr 28 19:39:50 Hey - what's the appropriate place/way to define a global variable like a URL prefix? i.e. all of my requests go to something like "http://domain.com/path/goes/here" - I want to define http://domain.com/ as a prefix for all requests Apr 28 19:40:52 I use a singleton Apr 28 19:41:02 Util.getDomain() Apr 28 19:41:33 that way every activity can access it and I dont have to bundle everything through each activity Apr 28 19:41:45 have any of you created a database using SQLite? Apr 28 19:41:50 yes Apr 28 19:42:15 i created a database using SQLiteOpenHelper. where does it get saved ? Apr 28 19:42:33 ./data/data/com.whatever/databases Apr 28 19:43:04 com.whatever being your package Apr 28 19:44:19 damn. now i wish i hadn't made my package name so long Apr 28 19:44:30 :p Apr 28 19:44:38 its com.ohmygodyoukilledkenny.youbastard Apr 28 19:44:38 I know the feeling Apr 28 19:44:43 o.o Apr 28 19:47:16 my app is coming a long nicely but i have a lot of work to do on it still Apr 28 19:47:34 My concern is porting my app to iPhone x.x Apr 28 19:48:38 lol why ? android development is easier to write and deploy, not restricted like Apples system is Apr 28 19:49:01 I need to make a version of my app for iPhone Apr 28 19:50:20 what does it do? Apr 28 19:50:29 Its a game Apr 28 19:55:22 Anyone work with consuming a Twitter feed before? Apr 28 19:56:37 I can't believe how fucking slow it is to run a JSON search against their API... Apr 28 19:57:12 I even enabled my WiFi, but I'm sitting here sucking eggs waiting... Apr 28 20:04:33 spankbot lol Apr 28 20:04:42 ive never been a big fan of twitter Apr 28 20:04:46 it never really took off in canada Apr 28 20:04:53 my boss uses it - that's about it Apr 28 20:05:17 Hey guys I'm trying to port my root tool to linux but i cant get damn adb to work Apr 28 20:05:36 trter10, sounds like a better question for #android-root Apr 28 20:05:44 Ah ok thanks Apr 28 20:16:38 candiancow .. dude, wtf? I'm shooting for 12 tweets now onCreate and loading the rest from a background thread. Apr 28 20:25:08 network calls cannot be done on the UI thread Apr 28 20:28:10 JakeWharton.. yeah I know, but the point of the matter is, I've got my device directly plugged into a FiOS fiber line and it still takes time. Apr 28 20:28:35 exactly Apr 28 20:28:42 so do all network calls on a background thread Apr 28 20:31:07 you should use a loader. they rock Apr 28 20:33:01 hm. need to switch to loaders as well, now that I'm using ABS and compat anyway. Apr 28 20:35:11 they're super useful Apr 28 20:37:09 loaders make some things pretty easy. just be aware that when CursorLoader is being refreshed, there will be 2 cursors with the full data in memory Apr 28 20:37:31 never used cursor loader Apr 28 20:37:46 JakeWharton: which one are you using ? Apr 28 20:37:53 i wrote my own Apr 28 20:37:57 :) Apr 28 20:38:05 basically AsyncTaskLoader that doesn't suck Apr 28 20:39:18 not that it's *that* bad, just wasn't good enough Apr 28 20:46:52 Meh, it's nice and convenient :p Apr 28 20:48:15 except you're left to whatever executor the current API uses by default Apr 28 20:49:28 Like with a lot in the framework, it only takes you so far Apr 28 20:56:42 and never far enough Apr 28 20:57:40 Hey guys, when I'm using managed dialogs, how do I updateProgress from an AsyncTask? Apr 28 20:57:56 I can't just say thisDialogIHaveAPointerTo.setProgress(bleh) Apr 28 20:58:17 no idea Apr 28 20:58:21 I'm new :/ Apr 28 20:58:29 but I have a question also Apr 28 20:59:31 could someone possibly help me with listViews? Apr 28 20:59:53 nlaveck: no idea, but /i/ have a question also ! Apr 28 21:00:14 nlaveck: What's your question? Apr 28 21:00:29 I'm trying to make a listView that dynamically grows based on the contents Apr 28 21:00:53 So you want to add elements through code, rather than XML Apr 28 21:01:11 well I am adding elements through code, but I have the layout specified in the XML Apr 28 21:01:17 Perhaps this will help? http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List4.html Apr 28 21:02:04 I'll take a look Apr 28 21:02:07 thanks Apr 28 21:03:31 that's a bit more complicated than mine Apr 28 21:03:42 I'm just using an ArrayAdapter Apr 28 21:03:53 and I have the row layout specified in an XML file Apr 28 21:04:03 Just.. add to the adapter. Apr 28 21:04:10 yeah I did Apr 28 21:04:12 Might have to notifyDatasetChanged() Apr 28 21:04:19 I did that too Apr 28 21:04:26 it's an issue with my layout Apr 28 21:04:59 huh Apr 28 21:05:06 because when I strech the height of the container that the ListView is in to 300dp I can see all the items Apr 28 21:05:20 but I want the container to wrap to the list Apr 28 21:05:30 To add to my question: I'm creating a ProgressDialog from an AsyncTask launched from a fragment. I've never used DialogFragment, but would that make this any easier? Apr 28 21:06:42 maybe you could create a custom Dialog by extending the Dialog class? Apr 28 21:07:00 I don't get it Apr 28 21:07:30 are you talking to me? Apr 28 21:07:38 or JavaDog Apr 28 21:07:45 Not really any need, the dialog functions as I need it to. It's a simple test program... where can I upload my project for quick sharing? Apr 28 21:07:52 you :) Apr 28 21:08:31 I'm trying to make the list grow dynamically based on the number of items in the list Apr 28 21:09:20 and for uploading I would use http://www.2shared.com/ Apr 28 21:10:58 I don't want the list to scroll, because I have buttons in another ViewGroup to add and remove strings to the list Apr 28 21:11:12 but when I try to wrap the list contents it only shows the first element Apr 28 21:11:27 What's the deal? "android.view.ViewRoot$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views." When updating a ListView from Thread, the Adapter exists within the thread and is not called anywhere else. Apr 28 21:12:58 Why are you using a ListView if you don't want it to scroll? Why not a LinearLayout? Apr 28 21:13:14 maybe the data comes from an adapter? Apr 28 21:13:18 we do that in one place Apr 28 21:13:19 yeah that's what all the forms say too Apr 28 21:14:38 the problem with LinearLayout is I want to have the choiceMode: singleChoice attribute that a list has Apr 28 21:15:14 and if I did a LinearLayout I'd have to build an adapter to handle all that and I don't really want to do that for such a simple task Apr 28 21:16:37 Anyone know how I could implement hackbod's post here while using a progressdialog? http://stackoverflow.com/a/8550351/1079597 Apr 28 21:18:43 I have my button (to launch an AsyncTask) inside a fragment like so: http://pastebin.com/yzx60GQF Apr 28 21:19:30 what's the problem that you're having with your progressDialog? Apr 28 21:20:09 Well everything works, I just can't rotate the screen. Apparently fragments "make it easier," but I don't know how Apr 28 21:21:28 what happens when you rotate the screen? Apr 28 21:22:00 The activity is destroyed and recreated Apr 28 21:22:04 well yeah Apr 28 21:22:09 that's normal behavior Apr 28 21:22:20 so what's wrong with that? Apr 28 21:22:41 do you lose your progressDialog? Apr 28 21:23:08 yes, and it crashes Apr 28 21:23:23 wait, no Apr 28 21:24:17 It works now, but I don't know why... Apr 28 21:24:21 ha Apr 28 21:24:22 and only partially Apr 28 21:24:27 I wish mine worked :/ Apr 28 21:24:36 my projects due Monday Apr 28 21:24:44 and I still have a lot to go Apr 28 21:24:48 I wish I had a class on this stuff Apr 28 21:24:52 I learn much faster in classes Apr 28 21:25:12 I guess it's losing its reference to the dialog and can't dismiss it, because activity.dismissDialog(0); isn't working Apr 28 21:25:26 Need to update a ListView from a background thread Apr 28 21:25:26 just save it in the Bundle Apr 28 21:25:49 is that an answer to my question? Apr 28 21:25:52 Handler is blowing it's load Apr 28 21:26:06 or a question Apr 28 21:26:09 spankbot talking about loads being blown... Apr 28 21:26:17 lol Apr 28 21:26:40 JavaDog yeah, and I'm the handler Apr 28 21:27:21 ListViews need to be reworked... Apr 28 21:27:29 there's not enough functionality Apr 28 21:27:58 I'm about to print off this fucking blog about threading and then shape it into a bird's nest... then blow my load into it, because the solution is not clear. Apr 28 21:28:21 haha Apr 28 21:28:22 yeah Apr 28 21:28:26 forums suck Apr 28 21:28:30 and blogs Apr 28 21:28:49 web is useless for android issues Apr 28 21:29:00 everyone has the same problems and noone has good solutions Apr 28 21:29:27 AHA, SUCK IT ASYNCTASK Apr 28 21:29:34 how'd you fix it? Apr 28 21:29:37 sorry about that, I'm just very happy that I actually solved that Apr 28 21:29:46 if(aTask != null) aTask.updateActivity(getActivity()); Apr 28 21:29:56 in the onCreate Apr 28 21:30:04 nlaveck dude.. it's a direct hit on Google "ListView Threading" and the mother fucker is talking about posting messages to a TextView, noting about ListView Apr 28 21:30:34 that sucks Apr 28 21:30:44 it sux eggs Apr 28 21:31:01 that makes sense Apr 28 21:31:24 because when you rotate the screen and it redraws the activity you need to reassign that object Apr 28 21:31:34 I still have a question though. I have a nice spinner ProgressDialog, but I want one which displays progress. I just don't know how to post progress to it. Apr 28 21:32:00 I saw one of those earlier today Apr 28 21:32:02 hold on Apr 28 21:32:15 I have everything in place for it: http://pastebin.com/Rtr8pQhX Apr 28 21:32:47 see: //What the hell do I do here Apr 28 21:32:47 From the orientation sensor, what is the X value supposed to be as I hold the device straight up (i.e as if I looked at it straight on)? Apr 28 21:33:17 setProgressStyle(ProgressDialog.STYLE_HORIZONTAL) Apr 28 21:33:19 try that Apr 28 21:33:34 I have that, nlaveck Apr 28 21:33:36 oh Apr 28 21:33:40 It's just posting progress to it that's the issue Apr 28 21:33:50 well what do you want? Apr 28 21:33:55 xarxer: Why not have your app display the current values the sensors are outputting and play with the device to see what you need? Apr 28 21:34:21 that's why IRC wr0x, when there is the right mix of developers who have experienced similar issues... some of my biggest load blowing issues have been tackled on #android-dev.. fuck the blogs.. they're starting to all remind me of MSDN forums, never the right answer, just a bunch of fucking sea lawyers giving advice on new techniques that have nothing to do with the solution. Apr 28 21:34:44 JavaDog: That's just it.. I'm outputting the values right now.. And when I hold it straight up it says ~330, which seems kind of odd to me.. Apr 28 21:34:46 nlaveck: Check out my onProgressUpdate method Apr 28 21:35:16 oh Apr 28 21:35:18 I missed that Apr 28 21:35:20 hold on Apr 28 21:35:31 xarxer: I believe the latest emulator supports sensor emulation, try to see if that corresponds maybe? Apr 28 21:35:39 can I find the java signature of an Android API method like "javap -s -p Class" would shot it? Apr 28 21:35:54 JavaDog: Okay, I'll try that Apr 28 21:36:05 i searched for the android.media.AudioRecord class to get it's signature, but couldn't find it anywhere Apr 28 21:36:17 this probably is a newbie pitfall :) Apr 28 21:36:27 s/shot/show Apr 28 21:37:56 what happens when you leave that method empty? Apr 28 21:39:26 nlaveck: I get a simple spinner, like this: http://imgur.com/Iipwm Apr 28 21:41:13 setProgressPercent(progress[0]); Apr 28 21:41:15 try that Apr 28 21:41:48 Well it's a bit more complicated, because this is from within a fragment Apr 28 21:41:56 Drakonite: http://techcrunch.com/2012/04/27/social-networking-and-gaming-mobile-apps-are-now-neck-and-neck-for-time-spent-on-android-ios/ Apr 28 21:42:02 I dunno Apr 28 21:42:06 I'm new to this stuff Apr 28 21:42:13 I just started on my project 2 weeks ago Apr 28 21:42:20 I show the dialog with context.showDialog(0);, and "context" is the main activity Apr 28 21:42:34 I started android about that long ago as well :p Apr 28 21:42:37 you need to do something with setProgressPercent Apr 28 21:43:42 that's not a method of Activity, though Apr 28 21:43:53 yeah Apr 28 21:44:24 it's a method of AsyncTask Apr 28 21:44:45 Y u no use DialogFragment Apr 28 21:44:55 Because I have no idea what I'm doing, simon Apr 28 21:44:58 Teach me Apr 28 21:44:59 please Apr 28 21:45:05 *emotional breakdown* Apr 28 21:45:09 Extend DialogFragment Apr 28 21:45:13 or wait Apr 28 21:45:20 new YourDialogFragment().show(...) Apr 28 21:45:32 Managed by the fragmentmanager Apr 28 21:45:40 Anyone know how k9 data killer works ? Apr 28 21:45:40 SimonVT: Will it survive orientation changes? Apr 28 21:45:49 can someone help me make a dynamic listView? Apr 28 21:45:49 getSupportFragmentManager().findFragmentByTag to get a reference Apr 28 21:45:50 Yes Apr 28 21:46:06 You can take your existing dialogs Apr 28 21:46:07 that resizes based on the number of list items Apr 28 21:46:11 Copy paste them to onCreateDialog Apr 28 21:46:13 And that's it Apr 28 21:46:19 You got yourself a DialogFragment Apr 28 21:46:48 Easy access to your activity as well, since it's a fragment Apr 28 21:46:52 If you need that Apr 28 21:47:14 wait what? Apr 28 21:47:19 I'm not talking about dialogs Apr 28 21:47:24 I'm talking about a listView Apr 28 21:47:38 And I'm not talking to you Apr 28 21:47:42 oh Apr 28 21:47:51 SimonVT: Thanks, will give it a shot Apr 28 21:47:57 you should use the .newInstance() pattern rather than instantiating fragments directly Apr 28 21:48:08 And that Apr 28 21:49:52 ....what? Apr 28 21:50:12 use a .newInstance() static method as a factory to create new instances of fragments Apr 28 21:50:17 you shouldn't be calling their constructors directly Apr 28 21:50:25 :/ could I please get some help with my ListView? I don't want to beg but I'm in a time crunch and I've been trying to get this for a while :( Apr 28 21:53:07 nlaveck: I have yet to see a decent app do what you're asking.. just saying Apr 28 21:53:14 Do you mean Fragment1.instantiate( ? Apr 28 21:53:32 well what would be a better alternative? Apr 28 21:53:41 Just match_parent Apr 28 21:54:21 JavaDog: No Apr 28 21:54:24 JavaDog: http://developer.android.com/guide/topics/fundamentals/fragments.html Apr 28 21:54:26 so have the list defined within a statically sized container? Apr 28 21:54:27 Check the example Apr 28 21:55:18 nlaveck: Just fill the height with your listview Apr 28 21:55:43 but it's container is wrapping the contents Apr 28 21:56:01 android:id="@+id/sectionMeds" Apr 28 21:56:01 android:layout_width="match_parent" Apr 28 21:56:01 android:layout_height="wrap_content" Apr 28 21:56:01 android:layout_margin="20dp" Apr 28 21:56:02 android:background="#DDDDDD" Apr 28 21:56:02 android:orientation="vertical" Apr 28 21:56:03 android:visibility="gone" > Apr 28 21:56:07 ... Apr 28 21:56:08 that's what it's nested inside Apr 28 21:56:10 So don't do that Apr 28 21:56:11 sorry Apr 28 21:56:21 didn't mean to spam like that Apr 28 21:56:40 ok Apr 28 21:57:00 thanks Apr 28 21:58:46 that doesn't work either... Apr 28 21:59:25 it's all inside a scroll view so I think I need to use something other than a ListView but I want to have selection capabilities Apr 28 21:59:53 Yeeeah, definitely don't do that Apr 28 22:00:04 Don't put a listview in a scrollview Apr 28 22:00:29 but can I use a scrollview in a list view item? :D Apr 28 22:00:34 * JesusFreke ducks Apr 28 22:00:34 Maybe rethink what you're doing Apr 28 22:00:38 There's probably a better way Apr 28 22:00:58 JesusFreke: You can burn in a fire :p Apr 28 22:01:12 oooo Apr 28 22:01:16 * JesusFreke gets some matches Apr 28 22:01:31 Also, don't play with fire.. You'll wet your bed Apr 28 22:01:46 hmm. how about my 1w laser instead? Apr 28 22:02:17 As long as you aim it at your eyes Apr 28 22:02:38 damnit Apr 28 22:02:44 now I can't see the monitor to talk to you Apr 28 22:03:02 No, loss, going to bed anyway :p laters Apr 28 22:03:12 - , Apr 28 22:03:13 thanks for your help Apr 28 22:03:18 imposter jf ? Apr 28 22:03:53 ? Apr 28 22:04:06 maybe not Apr 28 22:04:12 can someone help a complete noob with a database query? First time ever using a database and really new to programming in general, i have an activity thats just a listview and i want to add search functionality Apr 28 22:04:15 I'm the only JesusFreke that I'm aware of :p Apr 28 22:04:26 author of smali.. used to do rom stuff on the g1 :p Apr 28 22:04:41 this is my query to grab all items and populate list database.query("Spices", fields, null, null, null, null, null); Apr 28 22:04:44 good cause any jf imposter would be a tool :) Apr 28 22:05:06 how can i query using a text filter? Apr 28 22:05:27 do i have to do a raw query? Apr 28 22:06:00 JesusFreke: i was around back in those days :) Apr 28 22:06:19 had a crappy g1 lol Apr 28 22:07:31 now a days smali doesnt parse some packaged but thank u for all your work in the day Apr 28 22:08:49 droidbuster: if it doesn't, then file a bug Apr 28 22:09:10 http://code.google.com/p/smali/issues/list Apr 28 22:09:11 :p Apr 28 22:09:11 * Ge0rG experimenting with andromadus ICS on the G2 now... Apr 28 22:09:40 JesusFreke: i am not sure where the problem actually lies could be the secure package tools Apr 28 22:10:13 I will Apr 28 22:10:17 is there a way to see the logcat from before a reboot because of a crash? Apr 28 22:10:27 I've ran across and fixed a few issues like that, that people were using to prevent baksmali/smali from being used on it. Apr 28 22:10:52 baksmali is an awesome tool :) Apr 28 22:11:00 thanks :) Apr 28 22:12:17 * canadiancow sets mode: +b SimonVT!*@* Apr 28 22:12:41 * JakeWharton sets mode +DGAF Apr 28 22:12:48 Helps noobs in the game learn shit. Apr 28 22:13:14 :O Apr 28 22:15:41 JesusFreke: http://code.google.com/p/smali/issues/detail?id=94 Apr 28 22:16:18 That is the issue.... some jars are not extracted correctly or damaged so the transition to jdgui doesnt happen Apr 28 22:17:16 like today i decompiled k9datakiller to review source how to block my kids fb bs.... even market bs Apr 28 22:18:16 droidbuster: that has nothing to do with smali/baksmali Apr 28 22:18:48 JesusFreke: the issue i sent a link to? Apr 28 22:19:18 droidbuster: yeah. that is very likely an issue with either dex2jar or with the decompiler in question Apr 28 22:22:29 Within my AsyncTask's onPreExecute, I want to "new ProgressDialogFragment().show(...)", but I don't know what to put for the first argument of show() Apr 28 22:23:28 "The method getFragmentManager() is undefined for the type AsyncTask1" Apr 28 22:24:05 don't call the constructor directly Apr 28 22:24:12 use a static newInstance() factory Apr 28 22:24:53 I did that Apr 28 22:25:53 StackOverflow is da bomb! Apr 28 22:26:12 ... and so is Stella Artois Apr 28 22:26:16 JakeWharton: That's not the issue though, I don't think Apr 28 22:26:28 correct Apr 28 22:26:29 but that's a whole other story Apr 28 22:29:04 @Override protected void onPreExecute() { new ProgressDialogFragment().show(manager, tag) } Apr 28 22:29:09 What do I do with this? Apr 28 22:29:23 SimonVT is gone and he gave me the idea, but I don't know what to do Apr 28 22:35:42 JavaDog what are you attempting? Apr 28 22:35:45 SimonVT is gone? Apr 28 22:35:47 no he isn't Apr 28 22:35:52 maybe he's just hiding from you :) Apr 28 22:36:44 He said he was going to bed Apr 28 22:36:57 oh Apr 28 22:37:01 i guess it's late there Apr 28 22:37:04 And I'm attempting to show a DialogFragment from within an AsyncTask Apr 28 22:37:09 "within" ? Apr 28 22:37:18 why dont you show it before you start it, and hide it when it finishes Apr 28 22:37:24 Well yes Apr 28 22:37:33 Within the onPreExecute method Apr 28 22:38:39 the first method is getFragmentManager() from your activity Apr 28 22:38:49 this is why you should show it from the activity/fragment/whatever Apr 28 22:38:54 not within onPreExecute Apr 28 22:39:11 But I can still dismiss it in onPostExecute? Apr 28 22:39:26 well you have a callback right? Apr 28 22:39:31 something that calls the ui thread Apr 28 22:39:35 you can dismiss it from there Apr 28 22:40:19 No, it's just a simple app I'm learning fragments with Apr 28 22:40:55 and yet you have an asynctask? Apr 28 22:41:41 Well I also wanted to learn about dealing with dialogfragments Apr 28 22:41:47 And asynctasks Apr 28 22:42:05 JesusFreke: so the for that tick should file on the other tools? Apr 28 22:42:20 http://pastebin.com/KACpc4g3 Apr 28 22:42:24 ok, so generally you have a callback in an asynctask Apr 28 22:42:32 so that you can do things like update the ui, dismiss fragments, blah blah Apr 28 22:43:13 Just a method in the activity that I call to say "hey I'm done"? Apr 28 22:43:47 Or is there some standard way to do it? Apr 28 22:46:32 new AsyncTask() { @Override protected void onPostExecute(Whatever result) { dialog.dismiss(); } }.execute(); Apr 28 22:46:39 droidbuster: yeah, I would Apr 28 22:47:51 If you can run the deodexed jar without any problem, then it's almost certainly not a problem with baksmali Apr 28 22:48:22 canadiancow: This might complicate things, but the AsyncTask is launched from a fragment Apr 28 22:48:55 why would that complicate things? Apr 28 22:49:07 Because I'm new and I overthink everything Apr 28 22:49:55 I overthink overthinking things. Apr 28 22:50:04 "hmm. should I overthink this or not?" Apr 28 22:50:18 Yeah exactly Apr 28 22:50:56 canadiancow: Call me a java noob, but I actually have no idea how to implement that with the way I've set this up. My async class is external Apr 28 22:51:20 new MyAsyncTask() { @Override protected void onPostExecute(Whatever result) { super.onPostExecute(result); dialog.dismiss(); } }.execute(); Apr 28 22:51:56 case R.id.f1_button1: aTask = new AsyncTask1(); aTask.updateActivity(getActivity()); aTask.execute(); } Apr 28 22:53:39 new AsyncTask1() -> new AsyncTask1() { @Override protected void onPostExecute(Whatever result) { super.onPostExecute(result); dialog.dismiss(); } } Apr 28 22:53:48 anyway i gotta head out Apr 28 22:53:50 good luck Apr 28 22:53:54 you don't have to call super Apr 28 22:53:57 Ah alright, thanks Apr 28 22:54:10 JakeWharton, what if he has code in his AsyncTask1? Apr 28 22:54:46 JesusFreke: plus all my decopilers were all old versions as in apktool. smali... baksmali :/ doesnt help things either lol Apr 28 22:57:12 oh i see Apr 28 22:57:15 wasn't paying attention Apr 28 22:57:25 clearly Apr 28 22:57:25 bye Apr 28 22:58:15 The method onPostExecute(String...) of type new AsyncTask1(){} must override a superclass method Apr 28 22:59:07 * JakeWharton sets mode: -oh-face canadiancow Apr 28 23:01:45 Would it be too difficult to write an app that attaches to google talk, and if it sees a received message that contains a certain string, then it plays an alarm? Apr 28 23:20:03 http://www.infoq.com/news/2012/04/sdtimes-soa-is-dead Apr 28 23:20:19 … But the trend, has shifted away from services to APIs. Apr 28 23:20:29 can someone explain that to me ? Apr 28 23:21:39 i was never able to understand what the hell 'SOA' was anyway Apr 28 23:21:51 most esoteric TLA and/or buzzword ever Apr 28 23:21:53 joffe: Standard Operator Answer Apr 28 23:22:06 i thought it was 'system something architecture' Apr 28 23:22:09 i forget what it stands for Apr 28 23:22:33 ah, you mean the service-oriented architecture, aka "let's tack a new buzzword on old thing and sell it again" Apr 28 23:22:34 oh, no, service-oriented architecture Apr 28 23:22:38 yeah Apr 28 23:23:05 to me SOA has always been start of authority :( Apr 28 23:23:24 i'm just so glad my job is physical, old, and simple Apr 28 23:23:36 i could never deal with working in IT, i'd die of an aneurysm Apr 28 23:24:15 I work in IT but I make things that most normal people can understand :) Apr 28 23:25:57 joffe, a physical job? and you're hanging around in #android-dev? Apr 28 23:26:58 How can I update the progress of a DialogFragment ProgressDialog? Apr 28 23:28:02 Ginto8: happens Apr 28 23:29:38 so... are there any intent filters I can use to detect when the device connects to bluetooth? I haven't been able to figure it out from the docs or the developer's guide Apr 28 23:30:42 i'm trying to scan wifi networks -- wifi permissions have been added to manifest. Still getting: "java.lang.RuntimeException: Unable to start activity ComponentInfo{wifi.scan/wifi.scan.WifiScanActivity}: java.lang.NullPointerException" Apr 28 23:30:57 seems a common problem, but no answers i can fin :/ Apr 28 23:31:20 Nevermind on my question, I was overthinking it Apr 28 23:32:20 i can put up a paste if somoneone's gonna lok @ it Apr 28 23:34:41 What in the Mother Fuck? pulling a JSON feed from Twitter and tried to include the twit user's ((JSONObject)t).get("profile_image_url").toString() and the ListView just crawls... very slow, remove the profile image and it's fast, I can't believe this is struggling on Android. Apr 28 23:35:41 you are downloading an image on the UI thread? Apr 28 23:36:38 here's the paste --> http://pastebin.com/5vVxAs5h Apr 28 23:37:54 JakeWharton, from onCreate I call a Handler at 1 second.. private Runnable mUpdateAdapterTask = new Runnable() { get tweets n' stuff } and this Handler is set to run every 45 seconds. Apr 28 23:39:47 JakeWharton but as soon as I comment out all the profile graphic references, the ListView flies!!! I wonder if some of these profile graphics are huge in size, I'm only pulling the last 15 posts based on my criteria. Apr 28 23:40:20 i think i got it -- it's in the onCreate of the activity. Apr 28 23:40:28 that might give me a null pointer, right? Apr 28 23:41:13 ummm Apr 28 23:41:21 that would definitely give you a null pointer Apr 28 23:41:33 since in java, a null pointer is literally the same as a null anything Apr 28 23:41:41 WifiManager wifi = null; Apr 28 23:41:41 boolean startScan = wifi.startScan(); Apr 28 23:41:45 insta-crash Apr 28 23:42:24 so even tho it's of type WifiManager, it's still null? Apr 28 23:42:26 hrm Apr 28 23:42:57 jimjim, in java, anything non-primitive is actually a reference Apr 28 23:43:16 so you don't actually have a WifiManager, you have something that CAN (but doesn't always) point to a WifiManager Apr 28 23:43:31 k..coming from php >> c++ >> java so this is taking abit Apr 28 23:43:36 when it's null, there's no valid WifiManager to use Apr 28 23:44:16 jimjim, think of every java object of type T as an automatically dereferenced T* Apr 28 23:45:44 so i need to instantiate the WifiManager ? Apr 28 23:45:51 yes Apr 28 23:46:10 or in this case, you probably need to retrieve one Apr 28 23:46:30 because I don't think you can actually create a WifiManager; I think the system provides one for you Apr 28 23:46:54 oh ok Apr 28 23:46:57 hunting for that atm Apr 28 23:47:02 Context.getSystemService(Context.WIFI_SERVICE) Apr 28 23:52:24 closer -- setWifiEnabled works Apr 28 23:53:36 k -- i think i'm out of the wifi problems now -- just pointers etc Apr 28 23:53:41 thanks Ginto8! Apr 28 23:54:04 JakeWharton I've got to either figure out a way to reduce the profile graphic size or scrap the damn thing from the List View... blows my mind this is so ineffective. Apr 28 23:55:15 jimjim, pointers are annoying in almost every language; often even moreso because each language has different ideas about how they should be represented and handled Apr 28 23:56:24 yeha -- trying to port my brain from c++ is makin sum friction Apr 28 23:58:54 JakeWharton hmmm.. they're all 48px by 48px, profile graphic size is not the problem. Apr 28 23:59:08 how are you even getting the images? Apr 28 23:59:34 JakeWharton oh yeah, they're coming in just fine Apr 28 23:59:45 how though Apr 28 23:59:55 JakeWharton but scrolling is crazy slow. Apr 29 00:00:15 how are you downloading the images? Apr 29 00:01:26 JakeWharton >> Here is how so: http://codehenge.net/blog/2011/05/android-programming-tutorial-a-simple-twitter-feed-reader/ Apr 29 00:02:09 you are downloading every image on the UI thread then Apr 29 00:03:30 is "Request a scan for access points. Returns immediately. The availability of the results is made known later by means of an asynchronous event sent on completion of the scan." refering to onReceive()? Apr 29 00:04:43 JakeWharton : if private Runnable mUpdateAdapterTask = new Runnable() being called from OnCreate, then Yes. Apr 29 00:05:04 that downloads the JSON Apr 29 00:05:11 you still have to download every image Apr 29 00:06:25 JakeWharton they are already downloaded when the listview is loaded.. do you think when I scroll the ListView the Adapter is trying to re-download everything..? Apr 29 00:06:39 where are you calling getBitmap() Apr 29 00:10:41 JakeWharton it's being called in the "updateTweetList()" method: http://pastebin.com/JPZjAMNR Apr 29 00:11:04 getBitmap() Apr 29 00:12:54 JakeWharton it's being called within the TwitterAdapter from "updateTweetList()" Apr 29 00:13:17 JakeWharton http://pastebin.com/JPZjAMNR reference, of course Apr 29 00:13:56 where Apr 29 00:14:01 i see no getBitmap references Apr 29 00:14:23 coming Apr 29 00:14:29 JakeWharton http://pastebin.com/QzBDchnf Apr 29 00:14:41 alright, that's on the UI thread Apr 29 00:14:42 JakeWharton in the Adapter Apr 29 00:15:03 therefore, when scrolling, the entire screen has to wait until the image downloads before it can repaint itself Apr 29 00:15:05 hence, slowness Apr 29 00:16:20 JakeWharton omg.. that's silly , but if I drop this to a background thread that won't help either. The Adapter needs to be cached Apr 29 00:16:42 anything that touches a view must be done on the UI thread Apr 29 00:16:47 anything that hits the network must be done on a background thread Apr 29 00:16:56 you need to download the Bitmaps on another thread using some other means Apr 29 00:18:07 g00s: considering the amount of overlap in the two... Apr 29 00:18:19 JakeWharton no problem, don that but then I get Threading issues when I attempt to update the ListView from a background thread. Apr 29 00:18:43 spankbot, did you understand what he just said? Apr 29 00:18:51 <JakeWharton> anything that touches a view must be done on the UI thread Apr 29 00:19:01 don't touch the ListView from the background thread Apr 29 00:19:20 Ginto8, ic Apr 29 00:19:54 I don't know how you'd "send" the Bitmap between threads, but you have to do it to prevent weird threading issues Apr 29 00:21:27 Ginto8 it appears the Adapter is the hinge pin here... only solution that comes to mind is 1) Bind the Adapter to ListView on UI while 2) run a background to save the data to SQLite and have the Adapter read from a Collection pulled from SQLite. Apr 29 00:22:26 no Apr 29 00:22:38 Ginto8 or 3) stop everything and do some serious reading on Android threading, but there really isn't anything. Apr 29 00:23:18 threading is actually the easy part Apr 29 00:23:23 it's dealing with recycled views Apr 29 00:23:35 and what happens when they're recycled before the asynchronous image download finishes Apr 29 00:26:31 so i have to overide onRecieve() ? Apr 29 00:33:04 can fragments be nested? Apr 29 00:34:20 no Apr 29 00:35:07 :/ Apr 29 00:38:39 I can always thank JakeWharton for assistance... Apr 29 00:38:50 I'm Oscar Mike Apr 29 00:42:00 I'm writing a library that will do this for you Apr 29 00:42:05 it'll be done in a week or two Apr 29 00:42:31 a library that nests fragments? Apr 29 00:42:44 not you Apr 29 00:42:46 overiding onReceive(Context context, Intent intent) keeps asking me to remove the overide -- onReceive() is a superfunction, rigiht? Apr 29 00:42:50 nesting fragments is a bad idea Apr 29 00:42:58 hmmm Apr 29 00:43:19 I'm not used to the GUI standards yet Apr 29 00:43:36 not sure what is acceptable vs what is foo bar Apr 29 00:45:18 could I update an action bar in a parent activity from a fragment via public method calls? Apr 29 00:45:27 yes Apr 29 00:45:31 sweet Apr 29 00:45:32 getActivity().getActionBar() Apr 29 00:45:56 oh Apr 29 00:46:10 so I can actually pass the entire action bar into the fragment as an object? Apr 29 00:46:14 changed compliance lvl to 1.6 Apr 29 00:46:22 no Apr 29 00:46:24 still wont override Apr 29 00:46:26 you are calling up to the activity Apr 29 00:46:33 yeah Apr 29 00:47:40 getActivity().getActionBar() would return the ActionBar object that's associated with the activity right? So I could store it to a variable and refrence it from within the fragment Apr 29 00:48:12 you don't need to store it Apr 29 00:48:23 just call getActivity().getActionBar() anywhere in the fragment Apr 29 00:48:54 alright Apr 29 00:50:33 ohhh -- Activity has no onReceive() method Apr 29 00:52:41 looks like i need to create a broadcast receiver Apr 29 00:55:56 8 lines to send toast message in native code Apr 29 01:40:34 how do you do chain together backtracing activities? Apr 29 01:41:39 huh Apr 29 01:44:24 like say I have a bunch of activities for registration to navigate trhough Apr 29 01:44:45 what would be be the best way to navigate back to the login screen? Apr 29 01:44:56 startActivity + clear top Apr 29 01:45:55 clear top? Apr 29 01:46:01 it's a flag Apr 29 01:46:04 intent flag Apr 29 01:47:35 startActivity(getIntent().addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));? Apr 29 01:48:04 Intent login = new Intent(this, LoginActivity.class); Apr 29 01:48:09 login.setFlag(clear top); Apr 29 01:48:12 startActivity(login); Apr 29 01:48:27 oh duh Apr 29 01:48:31 thanks Apr 29 01:50:16 so -- my broadcastReceiver is all set up -- but i'm having trouble with the intent: 04-28 21:47:57.103: E/AndroidRuntime(12625): java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.wifi.SCAN_RESULTS } in wifi.scan.WifiScanActivity$1@4051f098 Apr 29 01:50:36 line is: registerReceiver(this.myWifiReceiver, new IntentFilter( Apr 29 01:50:36 WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)); Apr 29 01:55:32 any ideas -- intent is a new thing for me Apr 29 01:58:24 currnt --> http://pastebin.com/TZiTQBsw Apr 29 02:01:54 Any ideas or where I should put the code for my REST client in my app? Apr 29 02:02:04 I'm thinking of just making a java app for it Apr 29 02:02:24 class* Apr 29 02:02:32 nlaveck: see the i/o presentation on android & rest Apr 29 02:02:49 they never released any code, but it should give you some ideas Apr 29 02:03:00 sweet thanks Apr 29 02:03:17 Square has a cool library for RESTful stuff Apr 29 02:03:46 https://github.com/square/retrofit Apr 29 02:04:23 scroll down to "HTTP Usage" Apr 29 02:04:28 alright Apr 29 02:05:37 restlet is also ported to android Apr 29 02:05:49 its heavily maintained Apr 29 02:05:59 heavily maintained? Apr 29 02:06:06 that sounds like a bad thing Apr 29 02:07:10 i should say, actively maintained industrial strength ;) Apr 29 02:07:31 plus there are books about it, if you would like to read up some more Apr 29 02:07:36 that doesn't speak to its quality Apr 29 02:07:46 Spring is heavily maintained and industrial strength Apr 29 02:07:49 and there are books about it Apr 29 02:07:59 and it's crap :) Apr 29 02:08:54 for a while spring was awesome, way better than guice Apr 29 02:09:08 not sure what is going on these days Apr 29 02:09:22 i used spring core, and spring integration, they worked well Apr 29 02:09:53 spring and guice compete very little Apr 29 02:09:54 nice this is how they bundled it, you only needed the jars for the specific functions Apr 29 02:10:08 not in the ioc sense, at least when i evaluated it Apr 29 02:10:16 i means, they did have different philosophies Apr 29 02:10:42 spring has DI/IOC but that's like 1% of its monolithic framework Apr 29 02:10:43 is that interface all their is to setting up a connection to a web server on the android side? That seems way too light Apr 29 02:10:52 spring is not monolithic Apr 29 02:10:58 nlaveck: yes Apr 29 02:11:05 That's sweet Apr 29 02:11:33 I should publish the .jars to GitHub Apr 29 02:11:33 definately using that Apr 29 02:11:41 you have them? Apr 29 02:11:47 I'd greatly appreciate it Apr 29 02:11:53 you can download it and build them yourself Apr 29 02:11:55 it's really easy Apr 29 02:11:59 oh Apr 29 02:12:03 details are at the bottom of the readme Apr 29 02:12:11 I downloaded the source Apr 29 02:12:15 but I wanted the jar Apr 29 02:13:11 making me do work on the weekends... Apr 29 02:13:17 :) Apr 29 02:13:35 :p sorry I'm a an Android noob Apr 29 02:13:48 you can just ignore me if I get too annoying Apr 29 02:14:23 if you're a noob that means there's still time to save you from going down the wrong paths Apr 29 02:14:37 ha Apr 29 02:14:50 you actually might be better off with this library: http://loopj.com/android-async-http/ Apr 29 02:14:54 it's a bit simpler to set up Apr 29 02:14:57 once you have graduated from noob, you can not be saved any more :) Apr 29 02:14:58 and actually has instructions Apr 29 02:15:27 but that inteface for square looked sooo simple :( Apr 29 02:15:52 it requires Guice though Apr 29 02:15:56 which is a whole other ball of wax Apr 29 02:15:59 oh Apr 29 02:16:01 alright Apr 29 02:16:05 it's some badass wax, but you're probably not there yet Apr 29 02:16:41 there's an awesome I/O presentation by Jesse Wilson about it if you're ever interested in Guice though Apr 29 02:17:59 is that the one they did on RESTful web services & Android? Apr 29 02:18:26 I watched a bit of that but I'm kind of in a time crunch to be watching hour long movies Apr 29 02:18:35 haha, no this is about Guice and why it's useful Apr 29 02:18:47 oh alright Apr 29 02:18:54 they are long, but they're extremely informative (usually) Apr 29 02:18:58 I'll look that up once I'm a bit smarter Apr 29 02:20:22 hmm.. restlet doesn't look that useful Apr 29 02:20:31 at least not from the client perspective Apr 29 02:20:49 * Jug6ernaut yawns Apr 29 02:22:08 any recommendations on a server side REST implementation Apr 29 02:22:29 I'm planning on using C# with ASP.net Apr 29 02:22:40 that'll work Apr 29 02:22:43 server side is pretty simple Apr 29 02:22:48 ok Apr 29 02:22:54 good to know Apr 29 02:23:26 i must be misunderstanding intent -- cause that relaly seems like it should work Apr 29 02:34:03 what is the best practice for not repeating yourself in several activities with the same query method using a content provider? Apr 29 02:34:44 I say singleton class but I'm probably wrong Apr 29 02:37:29 anyone know how to get a null value back from a column using db.getXXX method's if null is in the value for that column? I have a column that is integer and usually empty (parentId). However, I use getInt method on the cursor and it returns 0 instead of null. I understand why its doing this because its getInt but how to make it null? Apr 29 02:38:29 I'm making a row copy so now i have a row like: 1|test|| and the other is 2|test|0| Apr 29 02:43:32 do I need to get JSON for Async to work? Apr 29 02:44:34 what do you mean by "get" Apr 29 02:45:16 QubeZ: on desktop Java there's an .isNull or .wasNull method Apr 29 02:45:27 on what are you calling .getInt? Apr 29 02:45:50 Cursor? Apr 29 02:45:51 http://developer.android.com/reference/android/database/Cursor.html#isNull(int) Apr 29 02:46:19 JakeWharton: ya like c.getInt(c.getColumnOrThrow(Constants.PARENT_ID)); Apr 29 02:47:05 nvm Apr 29 02:47:13 I didn't realize it was an included package Apr 29 02:47:44 public static Integer getIntOrNull(Cursor c, int index) { return c.isNull(index) == null ? null : c.getInt(index); } Apr 29 02:48:06 getIntOrNull(c, getColumnOrThrow(Constants.PARENT_ID)); Apr 29 02:48:17 hmm thanks dude Apr 29 02:48:48 er Apr 29 02:48:58 return c.isNull(index) ? null : c.getInt(index); Apr 29 02:48:59 rather Apr 29 02:49:18 ya got that, thanks man Apr 29 02:56:45 I'm new to android development, just trying to make a simple calculator Apr 29 02:57:13 is there a way to set the width of a button proportional to the size of the View? Apr 29 02:57:22 for example, 1/4 the width of the screen Apr 29 02:57:38 set all four children to have a width of 0dp and a weight of 1 Apr 29 02:57:52 what exactly is the weight attribute? Apr 29 02:58:05 and dp? I've noticed px works also Apr 29 02:58:06 http://blog.stylingandroid.com/archives/297 Apr 29 02:58:13 yes, but get in the habit of never use px Apr 29 02:58:15 *using Apr 29 02:58:58 why so? and what's dp stand for? Apr 29 02:59:06 density-independent pixel Apr 29 02:59:13 it autoscales based on the density of the screen Apr 29 02:59:35 a 160dp object will be exactly 1" on a medium density screen and an extra-high density screen **** ENDING LOGGING AT Sun Apr 29 02:59:58 2012