**** BEGIN LOGGING AT Thu Jan 26 03:55:12 2012 Jan 26 03:55:17 still getting the logcat error Jan 26 03:56:19 get the correct line number and corresponding source Jan 26 03:57:53 i am clicking its link... eclipse is taking me to the source highlighting the line for me. Jan 26 03:59:52 a null pointer exception is impossible on that line you pasted earlier Jan 26 04:03:00 whether it is or isnt im still getting nullpointer on it. Jan 26 04:12:09 just for your amusement i moved the line to a different spot of my code and logcat throws the error again on its new location Jan 26 04:12:17 well, you aren't gonna get any help until you can prove it by giving source and the stack trace in a pastebin Jan 26 04:12:38 the complete source for the exception in question Jan 26 04:15:41 i will just continue working with it myself. i would rather have no help than be belittled and challenged over something i have no reason to lie about. Jan 26 04:21:25 I've created a layout with an image and text and i want to repeat this a few times ( maybe 20 or so ) what's the easiest way to do this ? Jan 26 04:21:26 have fun Jan 26 04:21:53 use a list view Jan 26 04:22:02 i dont know if anyone has ever told you but you are quite a dick Jan 26 04:22:28 no patience for folks without clue Jan 26 04:23:05 not my problem Jan 26 04:23:26 get the fuck off the channel if you cant handle new developers questions and problems Jan 26 04:23:40 If you can't be bothered to properly indicate your problem I can't be bothered to take guesses at what's wrong Jan 26 04:23:52 i did properly indicate my problem Jan 26 04:24:10 not my problem you dont know the answer so have to call me a liar Jan 26 04:28:31 that's the problem, you are a liar because the exception on that line is impossible Jan 26 04:28:39 guess so Jan 26 04:28:55 because i have a lot to gain by lying about something so trivial Jan 26 04:29:52 well keep resisting doing the right thing then Jan 26 04:30:21 keep trying to cover up your mister magoo eyes Jan 26 04:30:25 not resisting. just rather not post my code for a complete dick. Jan 26 04:30:39 wtf are you talking about? Jan 26 04:31:04 (reviewing discussion), I have to agree with pfn. findViewById cannot possibly npe Jan 26 04:31:17 ieatgiraffe: i suppose you've never sought support on irc before, huh? Jan 26 04:31:43 plenty of times. most people are more mature though Jan 26 04:32:08 bankai_, inflate the view into a ViewGroup (container), you can repeat this process in a loop if you like Jan 26 04:32:28 ieatgiraffe, you have to work with us a bit if you're going to be helped here Jan 26 04:32:37 i understand that completely Jan 26 04:33:13 have you pasted a full copy of the file, or at least 10 or so lines around where the problem seems to be? Jan 26 04:34:05 i havent, the only person who was even speaking to me at the time was pfn. like i said... not handing my code over to that rat Jan 26 04:34:17 pfn, calling him a liar is no constructive either :-P it's possible something is just out of sync, or misrepresented. Jan 26 04:34:34 he is a dick to every single person ive seen come in here needing help on something Jan 26 04:34:56 oh thats not true. on occasion he's nice ;-) Jan 26 04:35:12 I said lies Jan 26 04:35:29 but seriously, pastebin or you cannot be helped here. Jan 26 04:35:30 not my fault you take offense at being wronv Jan 26 04:35:56 nobody wants your code, only to help solve problems Jan 26 04:36:02 asking people to troubleshoot code they cannot see is futile Jan 26 04:36:11 " that's the problem, you are a liar because the exception on that line is impossible" Jan 26 04:36:25 yes, I am not the "app-whisperer" Jan 26 04:36:46 yeah after you said you weren't a liar in response to "lies " Jan 26 04:36:48 ieatgiraffe, he's 100% correct Jan 26 04:36:54 im sure he is Jan 26 04:37:01 doesnt change my logcat output though Jan 26 04:37:04 anyway, I'm. home. discussion. over. Jan 26 04:37:22 Can't we all just get along? :-P Jan 26 04:38:15 any good, free, online flowcharting tools? Jan 26 04:38:25 i was using lucidchart but i'm going to hit the 60 object limit Jan 26 04:38:46 sadly no... I use GoogleDocs 'drawing' as a poor-mans version Jan 26 04:39:05 lucidchart is flash based, isn't it? Jan 26 04:39:27 i think so Jan 26 04:39:30 it worked very well Jan 26 04:39:31 yay I got scratchbox working properly. cross compiling native apps for arm, FTW! Jan 26 04:39:39 gliffy was slow as hell Jan 26 04:39:59 i would use paper but I always end up hitting an edge... Jan 26 04:40:11 hmm "chartify" ... if it doesn't exist, it should... just thought of that name ;-) Jan 26 04:40:38 JakeWharton, yeah, and no zoom out and undo (well, messy undo) Jan 26 04:41:24 i need an infinitely scalable whiteboard Jan 26 04:42:12 http://www.diagram.ly/ seems decent Jan 26 04:42:22 that would actually be a really cool idea for college classrooms, just saying Jan 26 04:42:37 ahh, appropriately hipster domain name Jan 26 04:42:56 ieatgiraffe, there are things like smartboard but they're not extremely intuitive Jan 26 04:43:01 nor responsive Jan 26 04:43:03 whats the best strategy to release a beta version of an app via website for limited time? I dont want it in the Android Market yet until its tested by a group of users. Jan 26 04:43:19 time check Jan 26 04:43:34 true, but they suck most the time haha Jan 26 04:43:41 QubeZ, "This beta has expired." -> redirect to beta website and/or market Jan 26 04:43:46 custom application class or base activity that checks the date onCreate/Resume/whatever and System.exit()'s if you're past the date Jan 26 04:43:57 sorry, i mean not limited use for a period of time. I want to release the app via my website but only allow few people to download it for a limited time (2 weeks) Jan 26 04:43:57 or redirects to market Jan 26 04:44:18 not limited, but limited? huh? Jan 26 04:44:25 post on xda and select the first couple of people who reply? Jan 26 04:44:38 diagram.ly saves offline to XML and allows opening XMLs which is interesting but there's no cloud storage (via dropbox or the like) which sucks Jan 26 04:44:45 trying to figure out how those sites generate tokens for users so its a unique URL i can email people that subscribe to a list for pre-release beta versions Jan 26 04:44:54 JakeWharton, save to your DropBox folder? Jan 26 04:45:00 could use mediafire or something. Jan 26 04:45:22 holy crap thats nice Jan 26 04:45:23 or megaupload...oh wait Jan 26 04:45:31 what's the catch? why free? Jan 26 04:45:46 looks wuite professional Jan 26 04:45:49 *quite Jan 26 04:46:05 (best of all, no flash) Jan 26 04:46:12 yeah i'm not sure. this is the website of the company that does it: http://www.mxgraph.com/ Jan 26 04:46:52 i guess they sell the library Jan 26 04:47:00 oh, tech demo site Jan 26 04:49:48 JakeWharton, i'd be nervous with no auto-save Jan 26 04:49:54 yeah Jan 26 04:50:03 i just played with lucidchart a bit more Jan 26 04:50:13 i may have to pony up the $4.95/mo or whatever Jan 26 04:50:25 yeah, you could always... *pay* for it Jan 26 04:50:35 *gasp* Jan 26 04:51:14 $40/yr Jan 26 04:51:18 that's not bad at all really Jan 26 04:51:46 *nods* Jan 26 04:52:01 14 day trial... I could easily complete my work in 14 days Jan 26 04:52:42 I've got an app which receives constant gps updates, each locations .getTime() is returning something 23h in the future (when compared with System.currentTimeMillis()) i assume this has something to do with UTC vs GMT and timezones etc. but is there an easy way to get a proper comparison? Jan 26 04:52:56 their new UI launched today too Jan 26 04:53:31 good night Jan 26 04:53:34 andre_pl: gps should be giving you times in UTC Jan 26 04:54:03 so.. you'll probably want to convert that to localtime. Jan 26 04:54:17 but, really depends on what you're doing. Jan 26 04:54:34 nullpuppy: according to the docs, System.currentTimeMillis is in UTC too though Jan 26 04:54:35 UTC = GMT Jan 26 04:54:59 hmm Jan 26 04:55:08 mrenouf: eh... close enough at least. Jan 26 04:55:27 are you somewhere in the middle of the pacific by any chance? Jan 26 04:55:38 lol, no, GMT-5 Jan 26 04:55:47 ok, so its not timezones Jan 26 04:57:23 i wonder if maybe its just my phone... I'll test another device Jan 26 05:03:27 it is just my phone... :S Jan 26 05:08:55 it's hard to flowchart when an interface or abstract class could be implemented by one of two classes Jan 26 05:09:40 UML Jan 26 05:09:52 really... i never bother with that any more though Jan 26 05:10:20 So I built AOSP, but I can't get voice input to work on the keyboard now. Is this the right place to ask about that? Jan 26 05:10:32 #android-root Jan 26 05:10:54 mrenouf, thanks. Jan 26 05:11:02 i'm trying to map the crazy lifecycle of the options menu in my library Jan 26 05:11:23 just for sanity Jan 26 05:12:54 oooh Jan 26 05:13:00 you want an interaction diagram Jan 26 05:13:25 sorry, sequence diagram Jan 26 05:13:26 http://en.wikipedia.org/wiki/Sequence_diagram Jan 26 05:13:51 hmm Jan 26 05:13:58 that might work actually Jan 26 05:14:24 except it still suffers from being 2d when I need almost a 3d implementation Jan 26 05:14:27 just dont try to incorporate polymorphism there, just deal in the API (interfaces, or superclasses) Jan 26 05:15:02 or you can just represent subclasses as another lifeline Jan 26 05:26:36 I can theoretically run something built with the 4.0.3 libraries on something older assuming I'm not using newer api calls, right? Jan 26 05:27:24 nullpuppy: yes, just set min-sdk-version in the manifest Jan 26 05:28:20 right, ok. that's what I thought. thanks. Jan 26 05:53:34 Hey, I'm trying to register listeners for an accelerometer and magnetic field sensor to the same SensorManager. The register calls work individually, but when I try to do both, I get a NullPointerException Jan 26 05:54:24 my code is: http://pastebin.com/k65jTLRG Jan 26 05:56:01 where are you getting the exception? Jan 26 05:56:52 nullpuppy: in .onSensorChanged . I'll see if I can pastebin the whole exception from eclipse Jan 26 05:57:57 exception is here: http://pastebin.com/TVYPZ6j6 Jan 26 05:58:09 ooo Jan 26 05:58:30 just read it properly, it's in the remapCoordinateSystem thing. I can probably figure this out Jan 26 05:58:41 k :) Jan 26 05:58:47 good luck. Jan 26 05:59:03 thanks Jan 26 06:01:58 I haven't used the android.hardware.camera before and I was wondering if I can write an application that allows me open the camera and show the preview of the scene thresholded ? Jan 26 06:02:28 sure. Jan 26 06:02:40 nullpuppy: fair enough :-) Jan 26 06:03:08 :) figure out how to talk to the camera, process it, then display. Jan 26 06:03:23 all in a "live" preview of a scene ? Jan 26 06:03:43 I can process each frame before displaying it to the user .. right ? Jan 26 06:04:02 should be possible. depending on what you want to do, lag might be a concern, but otherwise. Jan 26 06:04:24 cool Jan 26 06:04:24 will just be a matter of processing each frame fast enough. Jan 26 06:04:28 nullpuppy: thanks a lot Jan 26 06:04:32 no prob. Jan 26 06:05:12 you'll probably want to investigate threading and do your image processing in a thread outside your ui thread. Jan 26 06:05:23 otherwise bad things will probably happen :) Jan 26 06:06:30 nullpuppy: Thanks again for the tip Jan 26 06:21:00 Is someone developing an application related to math? Jan 26 06:21:25 you think all developers of Android apps hang around here? Jan 26 06:21:43 or that people in general would reveal their business plans in advance? Jan 26 06:22:00 I don't think so. Jan 26 06:22:13 I'm just asking.. Jan 26 06:34:41 uniconv -in z00 -decode Spanish -encode java | sed 's/\\u00\(.\)\(.\)/\&#x\1\2\;/g' Jan 26 06:34:45 That does the trick Jan 26 06:34:53 paper camera does realize Jan 26 06:34:59 realize Jan 26 06:35:16 gah autocorrect Jan 26 06:35:35 realtime processing on the camera preview Jan 26 06:35:58 It seems like I spend 90% of my time converting things from one format to another Jan 26 06:39:52 pfn: ah yeah, good point, I forgot about that app. Jan 26 07:31:42 How can I specify an image view to have a height equivalent to some percentage of the screen height? Jan 26 07:35:10 I imagine this must be possible Jan 26 07:38:02 http://stackoverflow.com/questions/4986861/android-layout-weight Jan 26 07:39:56 Snuffel, Isn't that only for placement? Jan 26 07:40:09 I need it for scale of an image view. Jan 26 07:41:12 Snuffel, which, might be placed pretty much anywhere within a frame layout Jan 26 07:41:56 rufsketch1: why not do it in the onCreate or something Jan 26 07:42:07 calculate everything and do a findViewById Jan 26 07:42:38 DashCC, yeah I was wondering if there was a way to do it without that Jan 26 07:42:48 but alright, I'll just do it manually I guess Jan 26 08:38:29 hmm, is the honeycomb emulator (3.2) supposed to support wifi? Jan 26 08:51:38 . Jan 26 08:53:27 i have problem porting a rom to my device - or better how do i add a device to vendor list in ics Jan 26 08:54:36 i found a lot of tuts but i sttuck at that point: adding a device Jan 26 08:55:04 am i in the wrong channel? Jan 26 08:56:54 klingel: yes. try #android-root Jan 26 08:57:04 thx Jan 26 09:09:37 http://pastebin.com/3dUmZCRc this was auto reported to be by one of my apps, any ide what can cause that ? Jan 26 09:21:24 Hi! How can I upgrade android in Samsung Galaxy S?? Kies says that my device cannot be upgrade by app Jan 26 09:21:27 Hello all Jan 26 09:21:53 I have an issue with Android 3.x / Fragments Jan 26 09:22:18 adrub: wrong channel. this is for development of Android apps, mainly such that are in Java. not for administering or "rooting" Android devices Jan 26 09:22:58 I have a TabHost/TabWidget where selecting a Tab shows a Fragment under the tabHost Jan 26 09:23:16 tml_, for development of android I need firstly upgrade it;) Jan 26 09:23:29 Zhelyazko: there's your problem, tabhost/tabwidget is kind of deprecated Jan 26 09:23:39 better not to use it if you can avoid it Jan 26 09:24:23 it's a small project for a private use in a company Jan 26 09:24:45 everything works fine, but the background of one of the fragments is gone Jan 26 09:25:32 everything doesn't work fine, and tabhost is hell to debug Jan 26 09:26:48 http://android-developers.blogspot.com/2011/08/horizontal-view-swiping-with-viewpager.html if you want to do it properly Jan 26 09:29:13 Yes, I know about it, but we are at the end of the project and it's too late to change to ViewPager Jan 26 09:29:49 sure, hope you can figure it out Jan 26 09:31:27 the issue is that the background of a fragment disappears or goes transparent. If the user interacts with the views in the fragment, parts of the background are shown Jan 26 09:31:32 has anyone had experiences where the TCP receiver is only receiving the beginning of a packet even though there's enough space to fit the entire packet? Jan 26 09:32:01 I don't even know how to debug this ... Jan 26 09:32:04 the background is explicitly set to #FFF in the parent containers of the views Jan 26 09:32:25 Zhelyazko: again, fragments were never meant to be used with tabhost Jan 26 09:32:35 any unexplained behavior and you're pretty much on your own Jan 26 09:33:03 unless anyone here has experience with this combination, which I doubt Jan 26 09:34:40 frankly, tabhost and viewpager look almost the same from coder's point of view. I'm impressed someone was able to make tabhost show fragments. But not so morbidly curious I'd actually want to know how it was done Jan 26 09:36:05 it's similar to this http://developer.android.com/resources/samples/Support4Demos/src/com/example/android/supportv4/app/FragmentTabs.html Jan 26 10:04:05 hey, anyone doing in app billing? I'm looking at the example, dungeons, and it uses onStart in BillingService, but the docs say that has been deprecated in favor of onStartCommand- anyone know what the proper onStartCommand code should be? Jan 26 10:21:56 Hello guys, I'm not able to put a a background image from a file to my custom View, this how I tried to do it in my custom View's onDraw() handler: http://pastebin.com/tLk6Cc0P Jan 26 10:22:49 I reaylly get stuck on this. Jan 26 10:24:51 you aren't drawing the bitmap, how could it possibly show up? Jan 26 10:25:34 nx5, so I'm missing a fundamental step? Jan 26 10:26:10 does anyone know how to check file permissions in android? SecurityManager is "deprecated" Jan 26 10:26:52 not just a fundamental step Jan 26 10:27:12 your code makes no sense, why are you even _loading_ a bitmap in ondraw? Jan 26 10:28:46 nx5, cause my custom view has no setImage() method, and I already did some drawings succesfully in the onDraw(). I just didn't show you in the link, that was just a piece of code in onDraw() Jan 26 10:29:09 my custom View is extended from View Jan 26 10:29:33 load the image before and keep it as a local variable Jan 26 10:29:37 draw it in ondraw Jan 26 10:30:20 nx5, ok, but how to set it as a background image of my custom View, that's the biggest problem I face now Jan 26 10:31:03 let's assume I don't draw at the background image at all, I just want to show a background image from my file on my custom View. Jan 26 10:31:19 you don't "set" it, you draw it. if you're usign a custom view it's because you want control of it, that means taking responsibility of what it does not expecting it to magically "set" setuff Jan 26 10:31:31 stuff Jan 26 10:31:36 A lot of example are based on Resource that doesn't modify Jan 26 10:32:02 nx5, ok I understand and totally accept the concept you describe Jan 26 10:32:19 ok then take that example and load from file Jan 26 10:32:35 so this means I have to draw the background image in onDraw every time, right? Jan 26 10:32:54 depends on what you want to do exactly but yes Jan 26 10:34:00 well, than we come to my link again, I try to set (or "draw") the background in onDraw which was previously retrieved from a file (like in a constructor as an example) Jan 26 10:35:02 you don't understand anything about what you're doing, read the documentation Jan 26 10:35:06 so Canvas has setBitmap and drawBitmap, but the latter one I don't know how to use it. Jan 26 10:35:34 you don't need to ask and make us waste our time you need to read Jan 26 10:36:19 nx5, if you don't want to help, than just say sorry I can't help you. I appreciate your effort anyway and I don't want to waste your time. Jan 26 10:38:52 how can I access the new ICS switch toggle images? Jan 26 10:40:12 no idea what that is :/ Jan 26 10:40:34 does anyone know how to check file permissions in android? SecurityManager is "deprecated" Jan 26 10:40:35 those flat diagonal type buttons to turn things on/off in settings Jan 26 10:41:43 ah that iphone ripoff thing... try to look at the settings source code or something. but check the documentation first... Jan 26 10:49:16 is it possible to change the directory where ndk-build puts the compiled libraries? from the default of "obj"? Jan 26 10:51:05 NDK_APP_OUT, got it! Jan 26 10:54:11 anyone keen to guide me getting a cURL request to work as a httppost(or like) ;) Jan 26 10:54:17 ? Jan 26 11:04:57 this is what i have tried: http://pastebin.com/7dq5417K Jan 26 11:05:16 and http://pastebin.com/jtzyceEt Jan 26 11:05:47 i get a 500 error on the server Jan 26 11:32:49 From the perspective of having a little C experience (one intro to c class) and no Java experience, where would be the best place to start? I understand the concept of object oriented programming, I just haven't actually written anything with it. Jan 26 11:34:29 tanlaan: read a good introductory book on the Java language (with *no* platform specific stuff) Jan 26 11:34:53 tanlaan: then read a good introductory book on Android development Jan 26 11:35:03 then read sample code Jan 26 11:35:09 tml_: have you heard of Thinking In Java? Jan 26 11:35:27 I have heard, haven't read it Jan 26 11:35:27 tanlaan: don't know what do you exactly mean by 'place to start', but have you read "Head First Design Patterns" by Eric Freeman and Elisabeth Freeman? I would recommend it. Jan 26 11:36:03 dfrank: I'll look into it, thanks :). I'm just looking for resources really. Jan 26 11:36:34 dfrank: stackoverflow has been okay, but I figured checking with the IRC would let me talk to some people with more experience than I. Jan 26 11:37:15 Hi, I building an app that uses a 5MB SQLite database. I don't want to publish the app to Android Market with the database inside the APK. So I need to know how can I download the SQLite database from the application and replace the current database (if exists)? Jan 26 11:41:48 How can I check if data file exists, delete it and extract the new downloaded data file? Jan 26 11:42:12 what pastbin is king here?? Jan 26 11:42:38 why would it make any difference? Jan 26 11:44:00 tml_: maybe there is a bot linked Jan 26 11:46:20 Downloading a SQLite datafile as a zip file and replacing the current data file is the best approach when the file has about 5MB? Jan 26 11:46:31 http://pastie.org/3255832 Jan 26 11:46:51 if anyone has some time Jan 26 11:52:49 guys, I'm confused about how to open some activity (from another app, by the way) and provide callback for calling activity. I can put some data in Intent using Extras, but there's no way to put reference to calling class. What am i trying to achieve: I have app "A" with Activity that displays list of some params. This app needs to be able to select params to display from a huge list. Jan 26 11:52:51 Another app "B" provides Activity for selecting param. So, Activity from "A" should send an Intent to open activity from "B", and when user will select param, Activity from "A" should apply this change. How to achieve this? Jan 26 11:53:29 dfrank: sounds like onActivityResult and startActivityForResult. Jan 26 11:54:06 alankila: oh, it seems to be what i am looking for. thanks! Jan 26 11:54:06 Why I don't get any answeer here? Jan 26 11:55:07 Matsumy: because nobody feels like explaining to you that embedding sqlite databases as binary is probably going to break one day Jan 26 11:55:36 and replacing them in binary form isn't such a great idea either. Also assets have a size limit, something like 1 MB Jan 26 11:56:18 the most certain solution to work might be to download it from some URL in some textual form and then apply it as insert statements. Jan 26 11:58:22 How can I intercept the frames in my camera preview and manipulate them before they are displayed ? Jan 26 11:59:17 alankila: one of the database tables have 10k rows. Are there any batch insert option? Running 10k INSERT INTO's seems to be really slow. Jan 26 11:59:35 That's why I'm thinking about downloading the .DB file as a ZIP file and replacing the current. Jan 26 11:59:40 there's some helper class which can improve insert speed Jan 26 11:59:56 TablesHelper or something, doesn't immediately come to mind Jan 26 12:00:17 don't commit after each insert... Jan 26 12:00:55 10k row insert will take a while, maybe 20 seconds. I wouldn't expect it to go much faster than that. Jan 26 12:01:31 although I have not actually benchmarked raw insert speed, and it does depend on bunch of factors Jan 26 12:02:08 20 seconds as a background service is acceptable in my case Jan 26 12:02:38 Ok, I'll check this helper class. Thank you alankila and sensille! Jan 26 12:02:44 to get reasonable performance you'll be using the helper and do the insert in a transaction, and maybe not enable foreign key checks if you have any Jan 26 12:03:29 Didn't know SQLite have this option to turn FK checks off Jan 26 12:03:43 they aren't done by default, afaik. Jan 26 12:04:05 at least I found this out when I relied on "on delete cascade" working and found out it deleted nothing Jan 26 12:04:44 Matsumy: you need to remember to do the inserts in single transaction Jan 26 12:04:53 ok Jan 26 12:05:07 because otherwise each insert will get its own transaction, killing your performance Jan 26 12:05:10 it's also possible to drop indices before work and recreate them after Jan 26 12:06:52 In desktop apps many rows in a single transaction caused problems for me in the past. I hope this works today. Jan 26 12:07:41 http://developer.android.com/reference/android/database/DatabaseUtils.InsertHelper.html Jan 26 12:07:44 Matsumy: Use multiple transactions, each bunching together X rows Jan 26 12:07:53 that's the bastard Jan 26 12:08:16 Great Jan 26 12:09:32 Just one more question, do you know if SQLite has any option like tables partition like SQL Server? Jan 26 12:11:21 the default answer when it comes to sqlite is "it doesn't support that". Jan 26 12:11:50 I'd imagine that is the case for partitioning tables too, if that means placing them in separate containers according to some selection criteria Jan 26 12:12:10 there's no partitioning in SQLite Jan 26 12:12:21 if you need it, you're looking at wrong DB engine Jan 26 12:12:37 Matsumy: what are you trying to do? Jan 26 12:12:57 on-phone sharding? O_o Jan 26 12:13:14 here: http://www.dropbox.com/gallery/2634647/1/efleetdemo?h=ed64a3 Jan 26 12:13:30 oh sorry, wrong channel, just read till #android... :D Jan 26 12:14:08 MDijkstra: I'm new to the Android platform, and I'm trying to learn how best I can optimize my app. Jan 26 12:14:35 Matsumy: ah, Jan 26 12:16:42 My first test querying this 10k rows table (with indexes created) took about 6 seconds...I'm trying to find best options to optimize this. Jan 26 12:18:44 have you looked at http://stackoverflow.com/questions/364017/faster-bulk-inserts-in-sqlite3 Jan 26 12:20:09 I'm looking at it right now. Thanks for the link. Jan 26 12:20:11 6 seconds for 10k seems excessive. Table scans from 65k have taken less for me. But I have quite short row length Jan 26 12:20:49 alankila: Emulator or mobile phone? Jan 26 12:21:02 I got this 6 seconds on emulator Jan 26 12:21:27 oh. Real device, samsung galaxy s. Jan 26 12:22:14 yeah, expect an order of magnitude improvement on a real device or something. The emulator is amazingly slow. Jan 26 12:22:30 Matsumy: depending on the data, you might want to simply not use SQLite :) Jan 26 12:22:37 alankila: Galaxy S really is a REAL device :D. Now I only have a Galaxy Mini (600Mhz processor) Jan 26 12:23:11 Matsumy: and it's not even a real Galaxy... iirc it got Qualcomm SoC ;) Jan 26 12:23:11 p_l: What options do I have? Another db engine or flat file? Jan 26 12:23:16 1 GHz armv7 or bust. Jan 26 12:24:23 Matsumy: among possible alternatives, are things like CDB (read-only k/v database), tokyocabinet or BDB (k/v, non-relational table databases as well with TC) Jan 26 12:27:22 Matsumy: any reason why it needs to be this fast? Jan 26 12:27:35 Matsumy: I mean, 6 seconds on an emulator seems kind of reasonable Jan 26 12:28:47 MDijkstra: It's more about discovering what is possible or not on the platform. But I also don't want my users to see the ANR. Jan 26 12:28:52 :) Jan 26 12:29:06 ANR? Jan 26 12:29:12 app not responding? Jan 26 12:29:17 Exactly Jan 26 12:29:20 please, for the love of god do this in a background thread lol Jan 26 12:29:34 lol Jan 26 12:30:02 That's the topic for a new question here soon. Jan 26 12:30:04 you'll never get an ANR, can display a nice progress window Jan 26 12:31:51 For the update process I've tried to use AsyncTask. Jan 26 12:32:55 I saw some options to run long tasks on different threads, but I'm still not abble to choose which fits best. Jan 26 12:34:00 AsyncTask does Jan 26 12:34:53 I want to show the user the progress during the database update (also in notification area), and the user shouldn't be abble to use the application features (all data-based) during the update. Jan 26 12:35:27 Can I achieve this using AsyncTask? Jan 26 12:37:21 Matsumy, yeah, you can :) Jan 26 12:38:09 Great Jan 26 12:47:38 Matsumy: show a noncancelable ProgressDialog from asynctask's onpreexecute, remove it at onpostexecute Jan 26 12:54:23 alankila: I'll check this too Jan 26 12:54:53 and be sure to grab a new database cursor Jan 26 12:55:03 don't reuse the one you created in the UI thread Jan 26 13:01:26 Does the usage of getReadableDatabase instead of getWritableDatabase improve the performance? (I assume that from a desktop app developer vision) Jan 26 13:02:12 With Windows based data frameworks, read-only cursors (Read-Only Forward-Only) are faster Jan 26 13:02:35 you're inserting data with a read-only cursor? Jan 26 13:02:42 good luck with that :p Jan 26 13:03:06 No no Jan 26 13:03:11 is there a way to recognize a 9-patch image? Jan 26 13:03:38 My code is using getWritableDatabase, always. Jan 26 13:03:38 lnostdal_: .9.png? Jan 26 13:04:23 when can a received Location have no accuracy? Jan 26 13:04:42 MDijkstra, that's the way android "knows" it's a 9-patch image? Jan 26 13:04:52 I think so, yes Jan 26 13:04:54 So I need to wanted to know if this impacts performance. If so (like I really think), I'll have to add an option to tell the DbAdapter class to open it as read-only or writable. Jan 26 13:05:22 Matsumy: have you tried any of the earlier suggestions? Jan 26 13:05:36 ie, test on device, wrap in transaction Jan 26 13:05:47 use asynctask Jan 26 13:06:12 it seems a bit strange to optimize something before you know whether the performance is a problem in real-world scenario's Jan 26 13:07:51 ie, if you're having issues with ANR, the way you should be fixing this is making sure it doesn't run on the UI thread Jan 26 13:07:57 MDijkstra: Alright, you got me. :P I'll try everything you suggested. Jan 26 13:08:06 not by making it fast so it doesn't show the warning :p Jan 26 13:08:39 I agree with you Jan 26 13:09:30 if it's still unacceptably slow on device after this Jan 26 13:09:34 have a look at http://blog.quibb.org/2010/08/fast-bulk-inserts-into-sqlite/ Jan 26 13:10:22 ok. thank you Jan 26 13:11:03 how to disable the system keyguard set by KeyguardViewMediator? Jan 26 13:11:43 (my app has the platform signature) Jan 26 13:16:18 [08:04:23] when can a received Location have no accuracy? <-- depending what provider it comes from Jan 26 13:23:37 I'm trying to create a button that has a small icon on the left, text in the middle and a small icon ('>') on the right Jan 26 13:23:58 I hoped a 9-patch would be an option, but it doesn't seem to work (I can only stretch it horizontally) Jan 26 13:24:32 also, the text is positioned oddly, padding doesn't seem to have the desired effect (makes the button stretch even more) Jan 26 13:24:57 is creating my own view the only option or does anyone have alternatives? Jan 26 13:30:14 iivvoo, look at ... ugh... one sec Jan 26 13:30:32 hmm, drawableLeft/Right perhaps? Jan 26 13:30:35 android:drawableLeft="@drawable/leftIcon" Jan 26 13:30:36 yea Jan 26 13:31:34 right Jan 26 13:31:36 Now, a question about ListView :) Jan 26 13:31:37 just tried it Jan 26 13:31:46 looks workable Jan 26 13:32:15 well the alternative is like a linearlayout wiht a button's background, containing two images and a textview Jan 26 13:32:24 but drawableLeft/Right is better :) Jan 26 13:33:46 canadiancow|work, that's what I was considering initially Jan 26 13:34:09 but I wasn't sure how hard it would be to get correct "Active" (selected, pushed, etc) behaviour Jan 26 13:34:38 anyone know how to see "old" navteq maps? Jan 26 13:34:56 like what was available a year ago Jan 26 13:37:03 short of buying a one year old garmin device Jan 26 13:38:26 I defined the layout for listview items with a HorizontalScrollView inside. The HorizontalScrollView will have several clickable TextViews. I need to show a popup using this pattern: http://www.androidpatterns.com/uap_pattern/quick-actions Jan 26 13:39:30 I don't know where I must add the click event listener. I've tried on ArrayAdapter class and Activity class, but it doesn't work. Jan 26 13:40:33 I don't have the error message right now, but randomly I also get an error that crashes the app Jan 26 13:41:18 Matsumy: you should add it in getView() method of an adapter. Jan 26 13:42:34 Ok. And what widget/control can I use to create this popup for the Quick Actions pattern? Jan 26 13:43:32 i think it's a normal view placed over a list view. But maybe there is a widget especially for quick actions. Jan 26 13:44:11 guys, is it ok to specify Actifity as a nested public static class? I mean, just like that: http://goo.gl/uNUfW And in AndroidManifext.xml it is specified so: android:name=".SelectParam$SelectClass" It works, but i'm just asking is such app design not bad? Jan 26 13:44:32 why Jan 26 13:51:10 I did a factory reset on my phone and now eclipse won't see it! Jan 26 13:51:24 turn on usb debugging? Jan 26 13:51:26 I made sure unknown apps is checked and USB debugging is on Jan 26 13:53:21 argh I need the app on my phone in 40 minutes. Isnt there a way to download it from a website? Jan 26 13:53:46 i have a strange problem... got a view class that extends LinearLayout... in the constructor i want to inflate an xml layout: inflater.inflate(R.layout.ap_simple_payment_details, this, true);... the xml layout contains other layout and text elements, but for some reason it only shows the first text element... any ideas ? Jan 26 13:54:57 canadiancow|work, do you know if the drawables can scale along with the button? It seems somewhat fixed-size Jan 26 13:55:11 not sure Jan 26 13:57:31 how do I output an apk file to install onto the device? Jan 26 13:58:29 geestring: how do you build an app if you *don't* get an .apk file? Jan 26 13:58:47 that's what Ant (and, I assume, Eclipse) produces when building an Android app... Jan 26 13:59:58 yes sorry, it is in the bin folder Jan 26 14:01:43 mornin folks (east coast US anyway) - is there any way to find out by phone model which android version is most widely deployed? Jan 26 14:04:30 is there a way for me to draw a circle on a canvas where the circle has a border of x pixels and the rest (the filling) is in another color? Jan 26 14:04:36 or do i need to draw 2 circles Jan 26 14:10:38 Im getting an ActivityThread erorr ont he performLaunghActivity. Any clues? I haven't done anything to the code since I launched it last! Jan 26 14:10:56 could it be possible there's something wrong with my phone? Jan 26 14:11:27 damn... developing UIs is like fencing with a magic wand, one never knows what will happen. Jan 26 14:12:39 true, but like in fencing: the more you practice the better you get in predicting what might happen ;) Jan 26 14:20:55 good day everybody Jan 26 14:21:04 diebagger: true true... but oh the training is hard. :) Jan 26 14:22:44 I think I have a fairly straightforward question: is there a way to tell the android build scripts where to look for the keystore file while performing a DEBUG build? Jan 26 14:23:46 for release builds this can be done by defining a variable key.store in your build.properties file, but for debug builds I cannot find such a variable Jan 26 14:24:02 extra info: I'm using sdk r12 Jan 26 14:24:45 also: an issue was reported about this (http://code.google.com/p/android/issues/detail?id=14056) and although it was tagged for r11 or r12, it was never closed (nor reassigned for a later release) Jan 26 14:29:45 Did somebody get the GreenDroid library to actually work ? Jan 26 14:30:03 Im getting weird effin Error inflating class exception Jan 26 14:30:04 s Jan 26 14:33:59 hmpf, setting a scale drawable as drawableLeft doesn't seem to work at all Jan 26 14:45:27 hm got a parent layout with 720 height... in the childlayout i say layout_height = "fill_parent", but child layout gets a height of 500.. wtf ? Jan 26 14:50:38 fill_parent was deprecated in 2.2 Jan 26 14:50:42 you should use match_parent Jan 26 14:51:41 huh? Jan 26 14:52:49 fill_parent -1 The view should be as big as its parent (minus padding). This constant is deprecated starting from API Level 8 and is replaced by match_parent. Jan 26 14:55:24 oh ok, thx Jan 26 14:57:48 canadiancow|work, since fill_parent still works and it's aliased to match_parent... how does this help his problem? Jan 26 14:58:03 it doesn't Jan 26 14:58:07 i was just making a statement Jan 26 14:58:21 i say it every time someone mentions "fill_parent Jan 26 14:58:31 as for the actual problem, is there something else in the parent blocking the child? Jan 26 14:58:34 how can i check if a Window supports a certain pixelformat? Jan 26 14:58:37 what is the parent? Jan 26 14:58:40 what is the child? Jan 26 15:00:17 ever tried a 1920x1080 emu? Jan 26 15:00:32 fuck no Jan 26 15:01:18 that would probably take 20 years just to boot Jan 26 15:01:30 When I create constructors for a custom view, then super(context, attrs) works differentially than super(context, attrs, 0). First one is ok, but second removes original style of a view. Jan 26 15:01:30 o.O 1920X1080 oh my Jan 26 15:01:45 Do I misunderstand docs or is it a bug in Android? Jan 26 15:02:02 Is it related to: http://code.google.com/p/android/issues/detail?id=12683 ? Jan 26 15:02:14 hey brutall Jan 26 15:02:15 long time Jan 26 15:02:26 canadiancow: hi Jan 26 15:04:00 I think I have a fairly straightforward question: is there a way to tell the android build scripts where to look for the keystore file while performing a DEBUG build? Jan 26 15:04:04 for release builds this can be done by defining a variable key.store in your build.properties file, but for debug builds I cannot find such a variable Jan 26 15:04:08 extra info: I'm using sdk r12 Jan 26 15:04:10 also: an issue was reported about this (http://code.google.com/p/android/issues/detail?id=14056) and although it was tagged for r11 or r12, it was never closed (nor reassigned for a later release) Jan 26 15:11:28 I'm trying to automate application building using a GIT hook with apache's ant. I'm having an issue where i can't build because aapt doesnt have sufficient memory. How much RAM is required for aapt? Jan 26 15:11:31 ndroid-sdk/platform-tools/aapt": java.io.IOException: error=12, Cannot allocate memory Jan 26 15:19:32 hm so onSaveInstanceState has no guarantee of being called? Jan 26 15:23:07 xorgate, when do you expect it is be called? Jan 26 15:23:30 i was hoping for around onPause Jan 26 15:23:52 or at least at portrait->landscape Jan 26 15:29:47 xorgate: it isn't called in that case? Jan 26 15:30:13 i was wrong, it is Jan 26 15:30:31 now i'm wondering when onRestoreInstanceState gets called Jan 26 15:32:39 xorgate: does it not get called for you in some case where you expect it to? Jan 26 15:33:29 i guess my expectations are wrong :) what i want is to save a few settings when the app goes to background, and restore them when it returns Jan 26 15:33:36 i could put them in preferences Jan 26 15:33:43 but i was hoping for a bundle Jan 26 15:34:30 http://developer.android.com/guide/topics/fundamentals/activities.html#Lifecycle explains it pretty well I think Jan 26 15:35:40 get our prime for development today... yeah Jan 26 15:40:09 hi. how can i hide day picker in android DatePicker view ? Jan 26 15:41:14 hmm odd.. i save instancestate like expected. i hit home button and then click app icon again, oncreate is called but the bundle that's passed is null. Jan 26 15:45:19 Hi, I was wondering if there is a way to define a expandable listview in purely XML I know you can do it with a regular listview. Jan 26 15:48:49 xorgate: perhaps you've setup the activity/task to not be reused or something? http://developer.android.com/guide/topics/fundamentals/tasks-and-back-stack.html Jan 26 15:49:38 appel1 not that i know of... i think i'll just save in preferences Jan 26 15:50:10 xorgate: if it is a setting you want to always have persisted that is the way to go Jan 26 15:50:31 it Jan 26 15:50:43 's things like what coordinate the mapview is currently looking at Jan 26 15:51:14 what does it mean "considering the terms in the Fibonacci sequence whose values do not exceed four million" Jan 26 15:51:32 meaning adding 1 to n of the fibs? Jan 26 15:51:49 meaning the values in the sequence that are smaller than 4 million Jan 26 15:52:49 im still confused. value meaning adding that number plus every number lower than it? Jan 26 15:53:30 no Jan 26 15:53:45 let's say it said values do not exceed 8 Jan 26 15:53:58 1 1 2 3 5 ................. 3999999 4 million+ Jan 26 15:54:01 then you would be looking at 0 1 1 2 3 5 Jan 26 15:54:03 8 Jan 26 15:54:54 SharedPreferences.Editor y u no store double Jan 26 15:55:45 canadiancow|work, oh ok. so it literally means all the fibs up to 4 million.... Jan 26 15:55:59 confused by "whose values" i guess... Jan 26 15:58:14 term = an item in the sequence. value=what is this number Jan 26 15:58:18 2.value = 2 Jan 26 15:59:03 xorgate, guess i just dont see why it couldnt be written as "considering all the fibs from 1 to 4mm..." Jan 26 15:59:35 i guess it's just the way mathematics is best described Jan 26 16:13:28 Does anyone have a good swipe animation library for android ? Jan 26 16:21:30 * iivvoo managed to create a reasonable compound button implementation Jan 26 16:32:16 Hello Everyone, I'm trying to make a simple Android Chat app, but I'm newbie, I don't know how to start. Sorry about my english, that is not my mother tongue. Jan 26 16:33:06 1. Learn english 2. Read the doc on d.android.com 3.Do it ! Jan 26 16:33:32 I will do that Ivru Jan 26 16:33:42 Good luck ;) Jan 26 16:34:02 Ok, if I have any question I'll post here Jan 26 16:36:23 java.nio.BufferOverflowException Jan 26 16:36:27 getting a lot of these Jan 26 16:36:33 eclipse/avd Jan 26 16:36:44 no bueno Jan 26 16:37:22 i am trying to make a qrcode for my business card and no matter how many times i tried scanlife reader or qr droid just doesnt fill my first name and surname in contacts properly... what could be the issue ? Jan 26 16:43:31 lets try again :) how can i find out which pixelformats are supported for a Window? I'd like to set the window to ARGB_8888 but dunno about older crappy screens Jan 26 16:45:13 so i saw that " Jan 26 16:45:18 stupid enter key Jan 26 16:45:24 so i saw that "android" tablets account for 39% of the market Jan 26 16:45:31 but a "large" part of that is hte kindle fire Jan 26 16:45:57 where do we store model files in android project structure, under assets or res? Jan 26 16:46:15 can i add an onClickListener to a view that is inflated from an xml before adding in to the actual layout ? Jan 26 16:47:12 ANdi`` its added when its inflated, you can not find the view until its inflated, so no Jan 26 16:47:32 but why would u want to? Jan 26 16:47:34 Either define the click listener in xml, or inflate the view, set clicklistener, add it to your layout Jan 26 16:47:47 Anyway, why does it make a difference Jan 26 16:48:37 The layout isn't drawn until after the method you're in finishes Jan 26 16:50:36 its a dynamic layout that isnt directly used when the activity is loaded... i have a method registerListeners where i register all listeners... so i would like to inflate it from xml, register listener for a button in it.. and then add it to the layout at a later point in time Jan 26 16:51:29 Okay, next question. Why are you inflating layouts before they're needed? Jan 26 16:51:50 Anyway, if you have it cached somewhere.. Just add the listener? Jan 26 16:52:09 yes, but i think it looks cleaner that way Jan 26 16:53:09 SimonVT duh Jan 26 16:53:18 if you inflate all your layotus in the application's oncreate Jan 26 16:53:22 then you can save time later Jan 26 16:53:24 like come on Jan 26 16:53:27 i thought you were smart Jan 26 16:53:28 :o Jan 26 16:53:46 :( Jan 26 16:54:06 :P Jan 26 16:54:21 Gotta use up all that memory available Jan 26 16:54:30 I like to load a few bitmaps just for the heck of it Jan 26 16:55:23 ANdi``: whats your question Jan 26 16:55:25 yes it's doable Jan 26 16:55:32 why don't you trust try it instead of asking Jan 26 16:56:16 for public boolean onOptionsItemSelected(MenuItem item){} : should I normally return false or true? Jan 26 16:56:18 SimonVT heck yea, everybodies doing it Jan 26 16:56:30 shurane look at docs Jan 26 16:56:45 ANdi``, of course you can add a listener if it is an actual object Jan 26 16:57:10 I have a Samsung Galaxy S2 that im trying to use for development on a mac with osx Lion. But eclipse debugger keeps disconnecting all the time. It has been very unstable. Any tip on something that might solve this problem? Jan 26 16:57:22 hello Jan 26 16:57:46 i tried to use a GridView as someone suggested here. Jan 26 16:58:02 I modified HelloGridView and got this result Jan 26 16:58:04 http://netskink.blogspot.com/2012/01/grid-view-notes.html Jan 26 16:58:16 i don't know why the vertical spacing is off though. Jan 26 16:58:21 any ideas? Jan 26 16:59:21 Im using CM7 Jan 26 16:59:51 Jug6ernaut: it doesn't quite suggest one or the other, so I dunno. but alright. Jan 26 17:02:09 boolean Return false to allow normal menu processing to proceed, true to consume it here. <- aka, should other onOptionsItemSelected implementations get a chance to handle this selection? Jan 26 17:03:33 sqlCommand.append(" WHERE ").append( ... Jan 26 17:03:34 sigh Jan 26 17:03:43 and there are such nice query() methods on Sqlitesomething Jan 26 17:04:15 ;d Jan 26 17:04:56 I do some queries using sqlite3 in android. what do you need? Jan 26 17:07:56 He needs people to stop manually building queries, and use the helper methods Jan 26 17:13:49 shurane ital say that to return true to pass on the even or something like that, i dont remember exactly Jan 26 17:15:24 if i want to make an application to communicate with a server in the local network (via wifi), authenticate and do database access, what is the best way? having a mysql database and php scripts on the server? Jan 26 17:18:57 Is there a way to have the footer view that I add to my listview highlight upon selection like my main listview items do? Jan 26 17:20:19 giorgiline: are you the guy who asking about this on android-developer mailing list? the one for a school project as author notes or something? Jan 26 17:21:39 giorgiline: regardless, my sql in android as been limited to a database local to the device. my php/sql experience has been relative to server only. Jan 26 17:21:55 mmmmmm, i dont remember, how can i check that? Jan 26 17:22:29 if you know php/sql and your database is local on the server, why not simply format your webpages suitable for a mobile device. Jan 26 17:22:39 I doubt you'd ever want the phone to query a remote db directly Jan 26 17:22:58 you generally go through a webserver Jan 26 17:24:26 Ah, nevermind, I figured it out. Jan 26 17:24:40 jrr just put the sql root credentials in the app Jan 26 17:24:41 hardcoded Jan 26 17:24:50 canadiancow|work: ah! good idea. Jan 26 17:24:56 so it can be obfuscated so instead of SQL_USERNAME="root" it's A="ROOT" Jan 26 17:24:58 maybe shell account too, just in case Jan 26 17:25:54 davis, a web-mobile page it's not nice Jan 26 17:26:40 giorgiline: webserver spits out xml or json or something, client app parses and displays nicely Jan 26 17:28:24 sorry but I can't seem to remember how to do * string = R.id.stringHere * Jan 26 17:28:43 jrr, ok, so you didn't mean using web browser on the phone Jan 26 17:31:16 can someone please help me with: where do we store model files in android project structure, under assets or res? Jan 26 17:32:08 probably res/raw/ Jan 26 17:32:38 assets or res/raw ? Jan 26 17:34:22 k... where can i populate some values for fields on a form, from other xml files? Jan 26 17:34:33 sorry how can i populate ? Jan 26 17:35:13 giorgiline: correct **** ENDING LOGGING AT Thu Jan 26 17:46:57 2012 **** BEGIN LOGGING AT Thu Jan 26 17:48:20 2012 Jan 26 18:27:58 heyho folks! i've got a ListFragment and i'd like to have it fading edges. this i've accomplished, but right now i hardcoded a custom fadingEdgeLength - is there a way to retrieve android's default fading edge length? Jan 26 18:28:43 as i have to set the length programmatically, i'd need to access the default value programmatically as well ... Jan 26 18:32:22 hah fun fact, if you don't set the edge length but merely enable fading edges, Android seems to take a default value for the length ... Jan 26 18:42:33 what's a fading edge? Jan 26 18:43:03 An edge that fades Jan 26 18:43:16 thanks captain obvious :) Jan 26 18:43:18 which edge? Jan 26 18:43:22 yw Jan 26 18:43:24 like the top and bottom of the list? Jan 26 18:43:33 Yeah, the scroll direction edges Jan 26 18:43:40 storkme: if the view does not fit into the parent and you have to scroll, the edge in which direction you'd scroll .. well, get's faded Jan 26 18:43:57 okay Jan 26 18:45:13 call get[vertical|horizontal]FadingEdgeLength before you change it, save the value in your class? Jan 26 18:46:35 storkme: never mind my problem is solved, i thought that i'd HAVE to provide a fading edge length in order to get the fading at all. i don't want to use a non-default length at all :) Jan 26 18:46:52 oh, okay Jan 26 18:47:04 do i get points for trying Jan 26 18:49:14 help! Jan 26 18:49:29 no Jan 26 18:49:35 in after skynet Jan 26 18:50:07 skynet? Jan 26 18:50:41 oh a person Jan 26 18:51:37 http://stackoverflow.com/questions/9016655/curl-to-httppost-java-in-android-and-debug-output-from-request Jan 26 18:53:16 by 'debug output you mean you want to see the http response? Jan 26 18:53:55 also why are you using system.out and not Log? Jan 26 18:58:14 Wait, I am supposed to use async tasks etc. inside services, right? i.e. it's not proper to do blocking tasks (such as downloading a file) inside onStartCommand(), right? Jan 26 18:58:20 yes Jan 26 18:58:27 services run on the main thread Jan 26 18:58:57 Okay, thanks.. I guess I'm still confused why you need a service in these cases.. To tell Android not to kill the process? Jan 26 19:02:00 pehlert, effectively Jan 26 19:02:39 I seem to be having some strange behaviour from a textview within a dialogfragment. I have set the width to wrap content, but its is a lot small and I can scroll horizontally to view the text. How can I stop this? Jan 26 19:03:40 pfn: So starting a service is kind of like setting a flag on the process "service running, don't kill"? Jan 26 19:04:06 Android internals still confuse me a lot ;) Jan 26 19:04:15 pehlert, that is one of its effects, yes Jan 26 19:04:37 pfn: Great, that helps me a lot with my understanding :) Jan 26 19:05:09 services and activities are the main lifecycle managed objects, as long as a service or an activity is running, the process has a lower chance of getting killed Jan 26 19:05:22 I guess there's providers, too, but I haven't use them Jan 26 19:05:51 hi folks. I want to write a roguelike for android and need to write a console-like gui. anybody has a hint for me how to do that? in the net I have not seen any library/example Jan 26 19:06:01 pfn: I was just wondering how that may work internally, but that flag thing makes sense I guess :) Jan 26 19:10:22 i made my own broadcast receiver that listens for phone state changes and it looks like when a call is in progress and another icoming call comes in i get another ringing state but only when both calls have finished to i get the one idle state, im trying to figure out the best way to save that 2 calls have just ended Jan 26 19:12:01 does anyone have any ideas on figuring out that n calls have just ended when a user is talking on multiple calls? Jan 26 19:15:19 http://domino.research.ibm.com/comm/research_people.nsf/pages/sevitsky.pubs.html/$FILE/oopsla08%20memory-efficient%20java%20slides.pdf presentation on java memory efficiency courtesy of romainguys twitter Jan 26 19:16:06 lotus notes ... how nice Jan 26 19:16:07 terrible url Jan 26 19:17:27 interesting, why is hashset larger Jan 26 19:17:28 didn't realise this was the Jan 26 19:17:44 #tim-burners-lee-fanclub Jan 26 19:18:34 Huh, HashSet is backed by a HashMap Jan 26 19:18:53 Probably why :p Jan 26 19:19:24 hmm, I guess so Jan 26 19:19:32 I thought it's because of the fake value object they use Jan 26 19:19:47 but yeah, that's obviously the case if I step back a level Jan 26 19:20:04 (i.e. was ignoring the fact that hashset contains hashmap ref) Jan 26 19:20:06 there's a lot of concurrency stuff built in too so i'm not surprised Jan 26 19:20:22 storkme, hashset is completely a wrapper for hashmap Jan 26 19:20:29 so it has nothing to do with "concurrency stuff" Jan 26 19:23:49 well the "concurrency stuff" implies that there's gonna be more memory usage involved now doesn't it Jan 26 19:27:18 storkme, there is no concurrency stuff in collections Jan 26 19:27:28 other than a single "bookkeeping" field Jan 26 19:29:44 balls, I was thinking of a hashtable, not a hashset, sorry Jan 26 19:29:47 long day at work Jan 26 19:30:26 i was under the impression old collection objects (vector, hashtable) were thread safe Jan 26 19:32:45 they aren't thread safe Jan 26 19:32:48 they are synchronized Jan 26 19:38:21 hey so, i'm working on an app that several other people created.... currently there's no use of styles or themes, i'm planning on putting them in place but i'm wondering if there's anything to really watch out for. anyone go through this before? Jan 26 19:38:32 that's kinda semantics isn't it Jan 26 19:38:48 thread safe implies they're synchronized and will function fine when called from different threads Jan 26 19:38:59 dunno why you seem to be going out of your way to try and correct me Jan 26 19:46:11 storkeme hi Jan 26 19:47:26 because they aren't thread safe Jan 26 19:47:55 they will fail badly I you modify them from many threads Jan 26 19:48:03 is that like microwave safe? Jan 26 19:48:06 in what whay? Jan 26 19:48:10 way Jan 26 19:48:20 final DateFormat dateFmt = android.text.format.DateFormat.getDateFormat(getActivity()); Jan 26 19:48:24 final DateFormat timeFmt = android.text.format.DateFormat.getTimeFormat(getActivity()); Jan 26 19:50:21 storkme: you can use ConcurrentHashMap if you want a thread safe hashmap Jan 26 19:50:23 anybody else with Nexus S that hasn't gotten the ICS update yet Jan 26 19:50:52 iOS is so much more intuitve than android Jan 26 19:50:58 videos show up in the photos app Jan 26 19:51:04 thats so much better than a stupid name like "gallery" Jan 26 19:51:15 canadiancow|work, huh? Jan 26 19:51:21 but isn't it a misnomer, seeing as how videos appear as well? Jan 26 19:51:22 Jan 26 19:51:29 gallery is more generic, and supports both ideas.. Jan 26 19:51:31 oh. I see Jan 26 19:51:33 :P Jan 26 19:51:41 i had to ask a colleague where my video is Jan 26 19:51:44 that i just recorded Jan 26 19:51:48 becuase it wasnt in the videos app Jan 26 19:51:52 that's just for itunes downloads Jan 26 19:51:56 heisenmink, as far as I know ICS was pulled on Nexus S Jan 26 19:52:11 I'm just curious how a hashset isn't thread safe Jan 26 19:52:30 so HashTable i believe was threadsafe Jan 26 19:52:33 so every method was synchronized Jan 26 19:52:35 Mavrik, Yeah but that was back in december Jan 26 19:52:36 but thats not very useful Jan 26 19:52:37 http://stackoverflow.com/questions/9016655/curl-to-httppost-java-in-android-and-debug-output-from-request Jan 26 19:52:40 > a month ago Jan 26 19:53:07 why would android devs be concerned about thread safety? Jan 26 19:53:45 if they use threads Jan 26 19:53:51 storkme: do you understand atomicity? Jan 26 19:54:01 omg sry for the pasted garbage earlier, didn't notice it at all :/ Jan 26 19:54:06 yeah, more or less Jan 26 19:54:18 peterretief, because you need to use threads if you don't want your software to work slow as ass and show "this app is not responding" screens? Jan 26 19:54:38 HashMap for one will even throw an exception in the event that you try to modify it concurrently while the iterator is iterating. Jan 26 19:54:50 but, if you're curious, read the source. Jan 26 19:54:52 i would assume threads would be abstracted Jan 26 19:55:21 another good one to use is Collections.synchronizedList() :) Jan 26 19:55:22 peterretief, threads are abstracted Jan 26 19:55:30 peterretief, that doesn't mean thread safety issues go away Jan 26 19:55:34 [14:53:45] if they use threads Jan 26 19:55:35 returns a concurrent list impl with the generic List interface. Jan 26 19:55:37 and you can just write all over without locking :) Jan 26 19:55:39 i was trying to come up with something witty Jan 26 19:55:44 ha Jan 26 19:55:52 lol Jan 26 19:56:22 Hashtable is a synchronized implementation of Map. All optional operations are supported. Jan 26 19:56:38 so how is it not thread safe? Jan 26 19:56:48 yeah... even though new way of doing it is to use Collections.synchronizedMap(new HashMap<>) Jan 26 19:57:09 is this a fight ?! Jan 26 19:57:13 no Jan 26 19:57:14 i know this, i'm just curious as to why a hashtable isn't considered thread safe if it is 'synchronized' Jan 26 19:57:16 storkme: HashMap, HashSet, and Hashtable are three different classes. Until now, we haven't discussed Hashtable at all. Jan 26 19:57:42 storkme: pfn and storkme did, earlier ;) Jan 26 19:57:47 19:30 < storkme> i was under the impression old collection objects (vector, hashtable) were thread safe Jan 26 19:57:51 19:47 < pfn> because they aren't thread safe Jan 26 19:57:53 storkme, Hashtable is thread safe but teprecated Jan 26 19:57:56 *deprecated Jan 26 19:58:01 i know it is deprecated Jan 26 19:58:02 damnit, i'm too tired, can't even highlight the right person ... Jan 26 19:58:04 i can see the docs :p Jan 26 19:58:11 I use this: http://developer.android.com/reference/java/util/concurrent/ConcurrentHashMap.html Jan 26 19:58:14 no it is not thread safe Jan 26 19:58:26 they are naively synchronized Jan 26 19:58:35 i will check the source Jan 26 19:58:44 does the same broadcast receiver get instantiated when receiving an intent or is it a new instance every time? Jan 26 19:58:46 <45PAAOY94> Hashtable is not deprecated Jan 26 20:01:26 are hashtables malloc safe? Jan 26 20:02:24 so I'm scanning through the source of Hashtable and noting that most every method is market synchronized Jan 26 20:02:38 marked* Jan 26 20:03:05 seems kinda thread safe to me (albiet naively, like you said) Jan 26 20:03:25 man these ZoomControls are buggy as hell Jan 26 20:04:36 storkme, just because something is marked synchronized does not mean that it is thread safe Jan 26 20:04:37 last try anyone help with cURL to android?? curl -H 'content-type:application/json' -d '{"userrequest": {"username": "testname", "status": 1}}' http://http://employeestracking.appspot.com/clockin.add_clockin Jan 26 20:04:47 that's exactly what it means you clown Jan 26 20:06:11 storkme: thats a bit mean Jan 26 20:06:55 i have no problem with being wrong but if you're gonna tell me I'm wrong at least tell me why.. this is a developer channel after all Jan 26 20:07:39 why fight over threads Jan 26 20:08:45 rather help me get this dumb httppost service to work Jan 26 20:08:53 if a method is marked synchronized it can only be executed by one thread at a time, right? meaning any changes to internal state will happen one after the other Jan 26 20:09:16 storkme, no, because as soon as you do .values(), .keys(), .getEnumerator() your collection is no longer threadsafe Jan 26 20:09:25 .iterator(), etc. Jan 26 20:09:33 that is not the case with ConcurrentHashMap and co. Jan 26 20:09:42 storkme: if a method is synchronized it guarantees that executions of that method on the same object will not interleave. Jan 26 20:09:46 that's all it means Jan 26 20:10:08 thus making the method thread safe, readme Jan 26 20:10:10 anybody else with Nexus S that hasn't gotten the ICS update yet? Jan 26 20:10:12 it's /naively/ synchronized, but it is not threadsafe Jan 26 20:10:13 oops http://en.wikipedia.org/wiki/Thread_safety Jan 26 20:10:42 storkme: it's possible for two synchronized methods to touch the same data on the same object and interleave, therefore, the object is not necessarily thread-safe just because all the methods are synchronized Jan 26 20:11:06 furthermore for the first 90% of this argument you tried to defend HashMap and HashSet as being thread safe, only to bail onto Hashtable later. Show some humility please. Jan 26 20:11:46 and I apologized and corrected myself on realising my mistake, show some reading comprehension ability please. Jan 26 20:11:58 *yawn* Jan 26 20:12:07 readme: i see what you mean though Jan 26 20:12:59 synchronized methods in a member have no shared lock -- so different threads can call different synchronized methods in the member at the same time? Jan 26 20:13:15 no Jan 26 20:13:21 No, I just checked that Jan 26 20:13:25 that was my mistake Jan 26 20:13:32 synchronized methods on the same object never interleave, period Jan 26 20:13:52 so if you had an object, and all the methods were marked synchronized, it would be thread safe, right? Jan 26 20:13:53 the problem is that as soon as you work on the enumerator, or values or keys, then it is not synchronized Jan 26 20:13:54 Can you find usages in Eclipse of a method? Jan 26 20:14:09 well, it's still possible to make it un-threadsafe by incredibly bad design Jan 26 20:14:11 pfn: because the returned collections have a different lock, right? Jan 26 20:14:29 the returned collections have no locking Jan 26 20:14:42 like, if you went out of your way to stick threads that ran internally inside of the object.. Jan 26 20:14:46 it returns Collections.synchronized* in values() at least Jan 26 20:14:56 sooo, synchronization. What's the best way to syncronize in two separate processes? FileLock? Jan 26 20:15:05 storkme, that doesn't protect you, though Jan 26 20:15:15 storkme, because the values collection is synchronized on values Jan 26 20:15:18 not on the original hashtable Jan 26 20:15:27 maybe not Jan 26 20:15:30 so it's a different lock? Jan 26 20:15:30 I guess it's a little smarter Jan 26 20:15:50 pipedstreams Jan 26 20:15:50 http://javasourcecode.org/html/open-source/jdk/jdk-5.0/java/util/Hashtable.java.html i'm just looking at this at the mo (I couldn't find the source for the android one) Jan 26 20:16:38 romainguy romainguy_: Know of anybody of note thats going to the NY GTUG at Google tonight? Jan 26 20:17:43 storkme, it should be the same lock Jan 26 20:17:48 storkme, android is in libcore/luni Jan 26 20:18:31 storkme: it looks like you can cause a ConcurrentModificationException in the worst case Jan 26 20:18:48 by calling that rehash() method while you are iterating over the values Jan 26 20:18:53 yeah, that makes sense. Jan 26 20:19:12 which is the same for HashMap, etc. but ConcurrentHashMap will handle that behavior fine Jan 26 20:19:23 I find it weird that some of the methods in this class aren't synchronized, like remove() for instance that also iterates over the array of entries Jan 26 20:20:08 Gsingh: finding usage of methods: place cursor on the method (call, definition, whatever) + ctrl shift g (at least this is the default mapping, i guess?) Jan 26 20:20:25 storkme, because they've figured that they should to it in the concurrenthashmap and gave up on making hashtable sane Jan 26 20:20:30 The code is severely ugly Jan 26 20:20:33 makes sense Jan 26 20:20:35 remove is real ugly Jan 26 20:20:42 yeah Jan 26 20:20:46 hi, i'm trying to loaddatawithbaseurl into a webview with a flash object. the swf accesses a website, but although the swf is embedded no data seems to be sent out - is there a sandbox i have to switch off for this? Jan 26 20:20:51 no wonder they recommended against people using it in java lol Jan 26 20:21:18 eww flash Jan 26 20:21:56 i know, but you try playing an rtmp stream without it Jan 26 20:22:29 http://www.docjar.com/html/api/java/util/Collections.java.html looks like the Collections.synchronizedMap method returns a wrapper for map that uses a single lock object for every method call Jan 26 20:22:44 Hashtable by comparison is just fucking backwards Jan 26 20:23:51 that depends Jan 26 20:23:56 on what way you are facing ;) Jan 26 20:24:07 Is there any way to turn off the mindSdkVersion < targetSdkVersion Eclipse warning? Jan 26 20:24:10 storkme, no, remove is synchronized Jan 26 20:24:12 Macha, no Jan 26 20:24:17 Macha, edit adt Jan 26 20:24:57 .. when you call values() or entrySet() or keySet() on a SynchronizedMap (returned by Collections.synchronizedMap(Map)) it passes in the same lock object to the created Set Jan 26 20:25:18 so when they say it's thread safe they mean it's bulletproof, heh. Jan 26 20:25:45 oh yeah you're right pfn Jan 26 20:26:02 (the formatting of that code is so bad I missed the synchronized block entirely) Jan 26 20:26:28 pfn you nub, you can filter it out ;/ Jan 26 20:26:29 storkme, it's not that it's so bad, there's just lots of inner classes Jan 26 20:26:52 SimonVT, oh yeah, there's some text filter you can do Jan 26 20:26:54 pretty lame Jan 26 20:26:58 I'd rather edit the adt source ;-) Jan 26 20:27:03 wait, no I didn't Jan 26 20:27:07 wait, yes I did Jan 26 20:28:39 hi all. Why does the Webview is so slow? It gets more than 10 secs to load a page. I've looked around and tried everything I found like disabling cache and raising rendering priority but nothing worked Jan 26 20:28:42 any idea? Jan 26 20:30:10 http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html Jan 26 20:30:12 please do Jan 26 20:30:36 Ghiottone, don't test in the emulator Jan 26 20:30:54 pfn, I'm testing on my Nexus One, with wifi Jan 26 20:31:03 simplify your html then Jan 26 20:31:55 pfn, it is a third party webpage, I don't have access to it Jan 26 20:32:07 well, if the web page is complex, it takes a long time to render Jan 26 20:32:36 but why it is so much slower than phone's browser ? Jan 26 20:32:47 is it slower? testing the same page? Jan 26 20:32:48 i dunno actually, the code I'm looking at for hashtable looks pretty darn thread safe to me Jan 26 20:33:00 storkme, maybe it is now... I guess I'm wrong, bummer Jan 26 20:34:09 possible to just get the keyboard to overlay an activity instead of resizing when the layout is in a scrollview? Jan 26 20:34:23 this is 1.5 java source I'm looking at though, may well be different to what android uses Jan 26 20:34:35 doesnt quite work Jan 26 20:34:40 test test :P Jan 26 20:34:46 i just learnt a lot about thread safety in java Jan 26 20:35:13 if someone knows how to play an mp4 delivered via rtmp in android i'd love to hear it Jan 26 20:36:01 pfn I'm testing it again. webkit is slower but not that much at the moment Jan 26 20:36:11 webview* Jan 26 20:36:29 probably browser has some stuff cached then Jan 26 20:39:25 pfn looks like both are around the same time now. Perhaps I got the wrong impression Jan 26 20:40:06 pfn do you know of any faster alternatives to webview? or any working method for speeding it up? for example like making it ask for compressed web pages? Jan 26 20:40:23 I imagine the slow speed is processing the page, not transferring the data Jan 26 20:40:31 compressing it would make it slower, if that is the case Jan 26 20:41:18 pfn I get your point. But could be useful for those interested in saving bandwidth Jan 26 20:41:31 Ghiottone, how about not requesting images, that might speed up rendering Jan 26 20:42:34 pfn yes, that's an option I've already implemented for saving bandwidth but it did not occur to me that it could also speed it up. I'm going to check it right now Jan 26 20:43:00 i thought stackoverflow limited you to 200 rep points per day ;) Jan 26 20:44:36 pfn, it is slightly faster, about 10-15% Jan 26 20:45:31 They can't take away my menu button! Half my phone is my menu button. Jan 26 20:46:09 hi Jan 26 20:46:58 Yeah, I liked the menu button as well Jan 26 20:47:13 this is bs.. pandering to the lowest common denominator of users who can't figure out to use the menu button. Jan 26 20:47:20 oh well, inevitable when a product is popular. Jan 26 20:47:53 that's not the problem Jan 26 20:48:00 the problem is that half the time, you don't know a menu is available Jan 26 20:48:27 actionbar > menu button Jan 26 20:48:30 >>>>>>>>>>>>>>>>>>>>>>>>><<<< Jan 26 20:48:33 my modus operandi was to assume it was, and if it wasn't, uninstall the lousy app that didn't implement it Jan 26 20:48:34 -<<<< Jan 26 20:48:43 readme, not the case Jan 26 20:48:44 meh, more screen clutter Jan 26 20:48:44 why would a normal "run" in eclipse constantly result in a debug build? Jan 26 20:48:53 e.g. did you know that you could bring up the menu in the wifi settings page? Jan 26 20:48:58 actionbar > iphone titlebar Jan 26 20:49:09 pfn: this is a valid point Jan 26 20:49:23 or any settings page in android at all Jan 26 20:49:27 i'm going to go out on a limb and propose an alternate solution. illuminate the menu key when it is available. Jan 26 20:49:31 that would be slick Jan 26 20:49:36 The actionbar is hardly clutter. It's very subtle, and provides a lot of functionality Jan 26 20:49:39 there were lots of times the menu was available, but I figured everything was on screen Jan 26 20:50:15 readme, interesting, but I prefer the ics solution Jan 26 20:50:31 actionbars with overflow menus, and compatibility indicators for menu items Jan 26 20:50:42 * pfn wonders how the menu is surfaced for apps that don't have an actionbar Jan 26 20:50:43 Is there a "normal" way of sharing a SQLite database between an Activity and a (simple, in-the-same-process) Service? Instantiating a different connection in each seems a bit untidy -- or is that something I shouldn't be worrying about? Jan 26 20:50:47 does it fallback to compatibility automatically Jan 26 20:51:10 No Jan 26 20:51:43 Target 14+ and it's actionbar or implement your own Jan 26 20:51:43 so how are menu items surfaced when there's no actionbar Jan 26 20:51:52 They aren't Jan 26 20:51:53 e.g. programmatically, or by setting theme noactionbar Jan 26 20:52:00 that's kinda lame Jan 26 20:52:02 You can show it programmatically I suppose Jan 26 20:52:08 Not really Jan 26 20:52:43 hi Jan 26 20:55:11 01-26 19:19:27.460: E/AndroidRuntime(8134): android.database.sqlite.SQLiteException: Can't upgrade read-only database from version 0 to 1: /data/data/sms.send/databases/db Jan 26 20:55:38 i have a problem with my DB Jan 26 20:55:40 please help me Jan 26 20:57:50 android.database.sqlite.SQLiteException: Can't upgrade read-only database from version 0 to 1: /data/data/sms.send/databases/db Jan 26 20:58:00 SimonVT, if the compat fallback can be forced to show programmatically, that's reasonable Jan 26 20:58:11 KScorp_, the answer seems straightforward, "can't upgrade read-only database" Jan 26 20:58:12 pfn, oh, it can't Jan 26 20:58:16 On a related action bar note, have there been any phones announced with a keyboard and no menu buttons? Jan 26 20:58:23 But I suppose there's a way to show the menu programmatically Jan 26 20:58:47 that's back to being pretty lame Jan 26 20:58:53 Imo no :P Jan 26 20:59:51 what should i do to upgrade my data base? Jan 26 21:00:01 get a writeable database Jan 26 21:00:08 pfn: what should i do to upgrade my data base? Jan 26 21:00:28 KScorp_, make your database writable Jan 26 21:00:34 SimonVT: how? Jan 26 21:00:46 sorry i'm beginner Jan 26 21:00:51 How'd you get a readable one? Jan 26 21:01:57 SQLiteDatabase db=this.getReadableDatabase(); is this your mean? Jan 26 21:02:28 So if that's a Readable database, how would you get a Writeable one? Jan 26 21:03:00 SimonVT: SQLiteDatabase db=this.getWriteableDatabase(); ? Jan 26 21:03:12 anyone have any idea how to prevent this ? Jan 26 21:03:13 http://pastebin.com/3PdKwrGn Jan 26 21:03:15 How can you verify that without asking? Jan 26 21:04:25 from searching on googie it suggest that it comes from dialog box or web view. i a, using both, tho i am doing everythnig correct acording to the results i founed Jan 26 21:05:21 How are you showing your dialog? Jan 26 21:05:45 SimonVT: let me paste thgat one sec Jan 26 21:06:28 http://pastebin.com/5ZyqRmKn Jan 26 21:06:43 pfn, looks like you're right. Most of the time is spend rendering the page. Any idea on how to speed that up? alternatives to Webview? Jan 26 21:07:06 Ghiottone, there aren't any alternatives, really Jan 26 21:07:10 Huh, why are you manually showing it in onResume? Jan 26 21:07:13 Ghiottone, maybe take firefox and see if you can strip it out Jan 26 21:07:52 iirc, once you call showDialog, the framework should handle showing it Jan 26 21:08:05 pfn, do you think it would be faster? Jan 26 21:08:08 SimonVT: showDialogOnResume is indended to be if a dialog box was requested to be shown while the app was in background Jan 26 21:08:09 is there a swf sandbox on android where swf's run from the assets dir can't access external files? Jan 26 21:08:17 oh Jan 26 21:08:28 Ghiottone, install firefox mobile, run it and see how long it takes to render vs. phone browser Jan 26 21:08:36 Ghiottone, if there's an improvement, then there's your alternative Jan 26 21:08:43 eg from a AsyncTask Jan 26 21:08:44 although it'd take quite a lot of legwork to implement Jan 26 21:09:18 pfn will try. If it does I'll look around to see if someone already implemented it. thanks a lot Jan 26 21:09:28 SimonVT: say if the AsyncTask display an error. i dont want to hide it but display next time the user resumes Jan 26 21:09:40 Ghiottone, alternatively opera, but I don't think opera is opensource Jan 26 21:10:08 yeah it ain't Jan 26 21:10:10 fanno: Hmh, how do you handle orientation change then? Jan 26 21:10:52 pfn ok thanks. what about some libraries that do some pre-rendering or html simplification on server side? Jan 26 21:11:08 SimonVT: hmmm should that matter ? Jan 26 21:11:09 I could implement a prefetch service that does some pre rendering work Jan 26 21:11:21 Well, orientation change will destroy the activity and recreate it Jan 26 21:11:23 I don't know of any that are open source Jan 26 21:11:46 I suppose if the asynctask is an inner class and tries to access the outer activity after an orientation change it could fuck up Jan 26 21:12:02 pfn, ok. thanks a lot again Jan 26 21:12:24 that's what skyfire does... Jan 26 21:12:59 SimonVT: i see, tho i am locking the orientation android:screenOrientation="portrait" Jan 26 21:13:24 ah Jan 26 21:13:26 Well, no idea Jan 26 21:14:13 SimonVT: i founed a few other posts that talk about webview that could cause similar error Jan 26 21:14:14 fanno, show the dialog in onPostResume if there is such a thing Jan 26 21:14:21 but nothing spesefic Jan 26 21:14:26 I never worked with webview Jan 26 21:14:27 fanno, either that or handler.post(new Runnable() { showdialogonresume }) Jan 26 21:14:55 Shouldn't onResume be fine? Jan 26 21:15:02 apparently not? Jan 26 21:15:10 post it and see if the exception goes away Jan 26 21:15:18 if it does, then that's your answer Jan 26 21:15:19 Hi there Jan 26 21:17:16 pfn: so change the onresume to onpostresume ? Jan 26 21:20:22 pfn I tried both firefox and skyfire. both are better than webview and skyfire is slightly faster than firefox, but it still takes 7-10 seconds on the Nexus One Jan 26 21:21:02 Is there someone to help me to do a jersey client... ? Jan 26 21:21:33 sporta: GTL Jan 26 21:21:38 i've this error... .getEntity(String.class); =>java.lang.NullPointerException and i don't know how can i do :s Jan 26 21:23:41 fanno, if there is such a callback yes, if not, then you'll need to post it Jan 26 21:23:49 So.. 20 minutes of debugging.. Was missing a break; in a switch case Jan 26 21:24:34 SimonVT: i hate it when that happens i have been there also Jan 26 21:24:39 ouch SimonVT Jan 26 21:25:04 If I had just run checkstyle on my app it would have caught it Jan 26 21:25:54 romainguy_, nice preso link earlier Jan 26 21:27:28 whats the problem with my sql query Jan 26 21:27:30 01-26 21:25:46.960: E/AndroidRuntime(12340): android.database.sqlite.SQLiteException: near "Group": syntax error: CREATE TABLE IF NOT EXISTS Group ( id int , name varchar , count int ); Jan 26 21:29:18 Thanks SimonVT and pfn for the help =) i will try with onPostResume Jan 26 21:32:49 how do i remove the titlebar in an activity from code? Jan 26 21:33:10 are DialogFragments generally not tied to an activity (i.e. getActivity() == null) or am i doing something wrong? Jan 26 21:33:21 The_Coolest, setTheme App.NoTitleBar Jan 26 21:33:36 oh, thanks Jan 26 21:33:42 android.database.sqlite.SQLiteException: near "Group": syntax error: CREATE TABLE IF NOT EXISTS Group ( id int , name varchar , count int ); Jan 26 21:33:51 thomasr2, actually, Theme.NoTitleBar Jan 26 21:34:12 pfn:android.database.sqlite.SQLiteException: near "Group": syntax error: CREATE TABLE IF NOT EXISTS Group ( id int , name varchar , count int ); Jan 26 21:34:52 KScorp_, group is a reserved word Jan 26 21:35:04 pfn: Theme.NoTitleBar cannot be resolved? Jan 26 21:35:19 thank you pfn Jan 26 21:35:25 thomasr2, android.R.style.Theme_NoTitleBar Jan 26 21:35:33 ahh Jan 26 21:36:22 Theme_Transparent Jan 26 21:36:24 ftw Jan 26 21:36:40 Theme_Dialog Jan 26 21:38:50 antianno: It should be tied to an activity like any other fragment Jan 26 21:38:52 works a treat - thanks pfn Jan 26 21:39:37 SimonVT: then i guess the problem is that i'm instantiating the dialog fragment in another fragment (and not in the activity directly)? Jan 26 21:40:12 No that would not be the problem Jan 26 21:40:59 I'm searching the android source and I cannot find how to make a drawable for the indeterminateDrawable of a SeekBar in order to make the bar BLUE instead of GREEN Jan 26 21:41:58 Ah wait maybe i need Jan 26 21:42:06 Yep, found it Jan 26 21:42:14 lol Jan 26 21:43:09 SimonVT: at which point does the fragment get tied to the activity, anyway? is it the task of the fragment manager, does this happen when i commit the according transaction? Jan 26 21:43:22 When onAttach is called Jan 26 21:43:29 un-tied in onDetach Jan 26 21:43:47 (onAttach is the first method called in its lifecycle) Jan 26 21:43:52 for listviews with images, is it a horrendous idea to store the image data as blobs in the db when the other data is in the db too? Jan 26 21:44:13 they're thumbs for books - so not really user data as such i guess Jan 26 21:44:34 SimonVT: yeah those are the callbacks, but what calls them? o_o Jan 26 21:44:42 The fragmentmanager Jan 26 21:44:55 Can someone explain to me how you are supposed to make sure that you still have a valid C2DM registration in your app? It happens to me that C2DM just stops working (messages aren't delivered anymore). Although the registration id seems to be still known to the google servers Jan 26 21:45:03 The fragmentmanager you pass to show Jan 26 21:45:07 It's really annoying and almost impossible to debug as it seems Jan 26 21:45:38 SimonVT: i guess, during the fragment transaction ... (ah i think i found my error, let's see) Jan 26 21:50:04 SimonVT: BAM, works :> thanks! Jan 26 21:50:14 np :) Jan 26 21:51:26 weirdly enough, in another fragment i save a (casted) reference to getActivity() in a member var, and i do this _in the constructor_ of this fragment, and there it worked. in my dialog fragment, it didn't (which honestly makes sense) Jan 26 21:52:10 If you need to cast Activity, do it in onAttach Jan 26 21:52:20 Remove the reference in onDetach Jan 26 21:52:31 yikes caching activity pointers scares me Jan 26 21:52:48 lol Jan 26 21:53:16 ctate: mh, why is that? the fragments in question and the activity are tightly coupled ... by design. still scary? Jan 26 21:54:06 ctate: http://developer.android.com/guide/topics/fundamentals/fragments.html#EventCallbacks Jan 26 21:54:08 :p Jan 26 21:55:04 oh i know Jan 26 21:55:17 i haven't gotten over the instinctive twitch yet :) Jan 26 21:55:32 antianno, if you're in a fragment, just getActivity() Jan 26 21:55:38 and anyway, right now i create all my fragments (if they weren't found in the fragment manager) using the constructor. is there any downside to this, should one use Fragment.instantiate instead? Jan 26 21:57:05 pfn: i'd like to avoid all the casts (since i'm using custom methods of my activity in the fragments) ;) Jan 26 21:57:34 If I am making changes to frameworks/base and I build that mmm frameworks/base … is there anyway to repackage up system.img without doing a full make? Jan 26 21:57:36 antianno, so write a simple method to cast for you Jan 26 21:57:52 public MyActivity getActivity() { return (MyActivity) super.getActivity()) } Jan 26 21:57:57 Caching Activity in onAttach should be safe Jan 26 21:58:28 onCreate, not so much Jan 26 21:58:30 speaking of which, I should write a simple implicit convertor so I don't have to cast everywhere Jan 26 21:58:55 implicit def toMyActivity(activity: Activity) = activity.asInstanceOf[MyActivity] Jan 26 21:58:59 hmm, win Jan 26 21:58:59 e.g. a retained fragment would get a reference to the new activity on orientation change on onAttach Jan 26 21:59:02 and since field access is supposed to be faster than getter methods ... this was my motivation Jan 26 21:59:14 If it was cached in onCreate, it wouldn't Jan 26 21:59:16 antianno, unless you're calling it a bajillion times, it isn't bad Jan 26 21:59:49 SimonVT: ah good hint! Jan 26 22:01:04 anyone here able to help me understand some layout stuff ? Jan 26 22:01:34 mainly action bar Jan 26 22:03:57 what's the best/easiest way to profile some drawing code in android? Jan 26 22:12:24 SimonVT: may i repeat my question if it's a bad habit to create fragments using the constructor directly (as opposed to Fragment.instantiate)? Jan 26 22:12:51 It's fine Jan 26 22:13:05 yay Jan 26 22:13:20 Check the javadocs: Create a new instance of a Fragment with the given class name. This is the same as calling its empty constructor. Jan 26 22:14:15 iirc it just uses reflection to instantiate the class name you pass Jan 26 22:14:42 so, as a matter of fact, using the constructor should be even faster, i guess. Jan 26 22:15:26 If I need to pass args to the fragment I often make my own static method for instantiation Jan 26 22:16:34 in which you'd call setArguments()? Jan 26 22:16:51 Yeah Jan 26 22:17:03 is speed that big of an issue? Jan 26 22:17:15 depends on what you're writing Jan 26 22:17:42 In which I'd new Fragment, setArguments, return fragment Jan 26 22:21:15 Heh, makes sense. instantiate is used by the FragmentManager when restoring state Jan 26 22:27:10 Is there any way to detect if a toast is currently on screen? I'm trying to write some tests, but having a toast on screen is messing it up Jan 26 22:27:34 (So, I need to wait for it to go away) Jan 26 22:32:45 sooo, how would I build aosp with homebrew instead of macports? I'm not familiar with mac packages and I can't find stuff like libsdl and bison Jan 26 22:43:46 I've got an UI (ExpandableListView) backed with a custom contentprovider, which sometimes gets hundreds of updates in a very short time frame. every update is causing the UI to reload, freezing the app. is there a way to mitigate? Jan 26 22:45:24 post a delayed Runnable to call notifyDataSetChanged Jan 26 22:45:38 if one already exists, don't call it again Jan 26 22:46:05 set the delay to something appropriate Jan 26 22:46:11 50ms, 100ms, 250ms, whatever Jan 26 22:46:14 JakeWharton: alright, thanks. Jan 26 22:46:25 JakeWharton: I was pondering how to mitigate it on the UI side, but you are right. Jan 26 22:46:30 havent thought about going that way Jan 26 22:52:20 JakeWharton: they really should have mentioned abs in the latest a-d blog thing eh Jan 26 22:53:29 haha Jan 26 22:53:29 nah Jan 26 22:53:37 too many compromises Jan 26 22:53:45 i knew JakeWharton sounded familiar! JakeWharton, thanks for sherlock! Jan 26 22:53:48 plus they have their own compat action bar Jan 26 22:53:54 you are welcome good sir Jan 26 22:53:55 it's awesome! Jan 26 22:53:57 or maddam Jan 26 22:54:01 sir ;) Jan 26 22:54:34 well I am hard at work on the next major version so keep an eye out the next couple weeks for a release candidate Jan 26 22:54:47 will do :> Jan 26 22:56:16 https://sites.google.com/site/androiddeveloperlabs/sydney anyone here going to this one? Jan 26 23:00:41 happy new day to everyone in the CET timezone \o/ Jan 26 23:07:58 ooh, we just switched to sherlock too. Jan 26 23:08:21 I was told by one of my coworkers that the creator idled in here, so, now I know who that is. Jan 26 23:10:14 what he doesnt' want you to know is that his name is really JakeMoriarty Jan 26 23:10:25 the "Wharton" business is just a front Jan 26 23:11:00 lol Jan 26 23:14:22 the creator of what? Jan 26 23:14:54 action bar sherlock Jan 26 23:15:49 cool Jan 26 23:19:59 Wow. Verizon Galaxy Nexus [with contract] for $99. http://www.amazon.com/gp/product/B0061R2A1S/ref=as_li_ss_tl?ie=UTF8&tag=androidamazon-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0061R2A1S Jan 26 23:20:17 ctate, on a new contract Jan 26 23:20:26 interesting that samsung doesn't enforce MAP Jan 26 23:20:32 you never see that happen with iphone Jan 26 23:21:47 any of you tried out jackson for doing streaming json parsing? i'm considering trying it out to do some parsing of very large json objects (~5mb or more) Jan 26 23:25:09 Escherial: err, only the other way around (json generation into a stream), but THIS works like a charm, if it helps. Jan 26 23:25:15 Best compiler for android? (Not trying to start an argument, just trying to start programming) Jan 26 23:25:31 Escherial: in general jackson works very smoothly on android. had no problems so far. Jan 26 23:25:40 EvilBore, there's only one compiler Jan 26 23:25:44 o.O Jan 26 23:25:49 Eclipse, then? Jan 26 23:26:02 Eclipse is the IDE, not the compiler. Jan 26 23:26:47 although, eclipse is also implements its own compiler... Jan 26 23:26:56 fair enough :) Jan 26 23:26:57 Ahh, that's right. I should rephrase then. Which IDE is the best/works well for starters Jan 26 23:26:59 isn't it compile to java bytecode, then translate to dalvik? Jan 26 23:26:59 so I guess saying there's only one compiler is kinda misleading as well Jan 26 23:27:09 SuD, yes Jan 26 23:28:47 Escherial: if i finally find the time to optimize the parsing section (wouldn't scale right now, as it reads everything into memory at once), and i won't forget it, i might tell you if it works later. Jan 26 23:29:45 SuD: compile to java bytecode; compile the java bytecode to dalvik bytecode Jan 26 23:31:21 so all in all, fragments are awesome. Jan 26 23:31:45 antianno, if you can ignore some glaring design limitations, heh Jan 26 23:32:52 pfn: eg the need to provide a default constructor, the need for fragments to be public classes etc? Jan 26 23:33:07 antianno, no, those aren't design limitations Jan 26 23:33:22 antianno, the biggest design limitation is the inability to nest fragments Jan 26 23:33:29 ah i see Jan 26 23:42:53 ok then cu folks Jan 26 23:47:06 slow day in here Jan 26 23:48:42 google code search is gone ? well, i guess so, thats what it says Jan 26 23:53:18 ah, blah, thanks, antianno, even though you're not here to see it :\ Jan 26 23:55:36 If I'm referencing a project like ActionBar Sherlock in my buildpath for eclipse how can I do the same in apache's ant? Jan 26 23:59:31 what is the limit on the number of bluetooth devices that an Android phone can connect to? Jan 27 00:09:41 EvilBore, probably 7 Jan 27 00:10:28 ctate, haha Jan 27 00:10:34 just catching up on my scrollback buffer Jan 27 00:11:15 Escherial, I've used Jackson quite a bit Jan 27 00:11:40 Medjai, you should just be able to add it to project.properties Jan 27 00:11:43 and ant will pick it up Jan 27 00:11:56 what line do i use Jak_o_Shadows Jan 27 00:11:59 err JakeWharton Jan 27 00:12:22 JakeWharton: So 3 or 4 devices is not unreasonable to any extent? Jan 27 00:12:50 * Jak_o_Shadows goes back to sleep Jan 27 00:13:11 EvilBore, i don't think so. I believe bluetooth support 8 devices per "thingy" and the device (the phone in this case) takes up one Jan 27 00:13:23 at least, that's why the PS3 can only support 7 controllers instead of 8 Jan 27 00:13:43 Medjai, it's like... library.1=path/to/ActionBarSherlock/library Jan 27 00:14:00 ok thank you I'll try that now Jan 27 00:14:04 JakeWharton: Ah okay. I am building small bluetooth modules that will have a max of 5 things that simply say whether or not a switch has been thrown. Jan 27 00:14:26 android.library.reference.1=../../library Jan 27 00:16:34 pfn, fragments are just views... if you really thing you need to nest fragments just make smarter views Jan 27 00:16:45 I tell people to think of them like newspaper columns Jan 27 00:16:56 you can't nest newspaper columns Jan 27 00:17:04 but you can rearrange them in order to fit best on the page Jan 27 00:18:00 JakeWharton, yeah, just don't like that model Jan 27 00:18:36 nested fragments would create hell on the backstack Jan 27 00:19:00 and more so on noob devs Jan 27 00:19:51 dart is changing their == operator to be: Jan 27 00:19:52 If x === y then return true. Otherwise Jan 27 00:19:52 if either x or y is null, return false. Otherwise Jan 27 00:19:53 return the result of x.equals(y) Jan 27 00:20:04 full. of. win. Jan 27 00:20:42 is it better to use a bitmap or a view that has the background of the bitmap? in respect to efficiency, what you can do with it and resizing on different screen sizes and densities Jan 27 00:20:43 ? Jan 27 00:22:44 anybody know? Jan 27 00:23:44 JakeWharton, i'm getting an error when ant tries to resolve the library Jan 27 00:23:59 Hey. Anyone have any experiences of HeyZap from a developer perspective? Jan 27 00:24:01 Medjai, i've never used ant. I'm afraid I won't be of much help Jan 27 00:24:18 I see... Jan 27 00:24:20 does ICS do everything in hardware? even the stuff that older versions specifically would not do? Jan 27 00:24:26 no Jan 27 00:24:34 you have to target API 14 to enable hardware by default Jan 27 00:24:39 JakeWharton, do you mind taking a look at the error and if you can't then it's ok? Jan 27 00:24:42 or you have to target 11+ and specifically say you want hardware Jan 27 00:24:51 hm hm Jan 27 00:24:59 Medjai, sure, pastebin it somewhere Jan 27 00:25:00 cause i see my app is doing strange things on ics Jan 27 00:26:00 https://gist.github.com/1686110 Jan 27 00:26:04 ooh, why didn't I do this earlier Jan 27 00:26:27 (doing that, can get a LayoutInflater by calling .service[LayoutInflater] Jan 27 00:28:13 case class o_O Jan 27 00:28:25 i guess im a java noob Jan 27 00:28:44 hello Jan 27 00:28:47 everyone Jan 27 00:28:48 xorgate, that's not Java Jan 27 00:28:58 oh that's comforting Jan 27 00:29:45 it looks rather androidy Jan 27 00:30:13 anybody have an answer? who knows android graphics well? Jan 27 00:30:19 xorgate, it's not java Jan 27 00:30:26 it is Android Jan 27 00:30:30 xorgate, and that is for android Jan 27 00:30:46 eddi3x3 if you use a Drawable it might be better Jan 27 00:31:05 a drawable like a bitmap? Jan 27 00:31:14 a drawable can be many things Jan 27 00:31:30 users can force ICS to run all apps with hw accel, btw Jan 27 00:31:39 there's a toggle in developer settings for that Jan 27 00:31:48 oh hmmm i should have tried that Jan 27 00:32:19 Sorry I took so long i had to go to the bathroom lol Jan 27 00:32:26 here you go JakeWharton : http://pastebin.com/JdfdyZ8j Jan 27 00:32:40 so I make a drawable object? or extend one of my current objects with drawable? sorry I'm a noob Jan 27 00:33:22 uhh.... Jan 27 00:33:26 I don't understand how or why i would reference cl_app Jan 27 00:33:28 i see in the emu the problem arises when i check the 'use gpu' thing Jan 27 00:33:49 eddi3x3 then dont worry which is better Jan 27 00:40:18 I would like to build something that sends data to a phone via bluetooth. The data is pretty simple, relaying the value of a switch. What/Where is an inexpensive bluetooth module? Jan 27 00:41:49 rank newbie with question - have only completed "hello world" app - how to listen for a touch on a section of the screen and move the hello text if touched. pointer to sample app? Jan 27 00:43:18 EvilBore check the sdk there's a bluetooth example Jan 27 00:44:15 xorgate - I am currently looking for the hardware that would accommodate this need. I am a decent programmer, so I am not worried about that at the moment. Jan 27 00:44:34 bosco_ id suggest trying other projects before something like that.. its more complex than it seems Jan 27 00:45:00 ah i assumed, since this is a develop chan :0 Jan 27 00:45:05 EvilBore, computer bluetooth module? there's lots of those, monoprice.com has a bunch for under $10 Jan 27 00:46:15 Right before my application crashes, I get a number of: "JNI: unpinPrimitiveArray(0x40608f60) failed to find entry (valid=1)" error messages in logcat, any idea why that might be? Jan 27 00:46:20 ok. well, homework due tomorrow sigh. In a android dev class, and this is assignment 1 I have worked my way through have a book so for Jan 27 00:46:20 pfn - not computer bluetooth. bluetooth modules that get attached to microcontrollers.. not sure if this is the right channel tho Jan 27 00:46:37 xorgate: hmm, that's quite trivial with GestureDetector Jan 27 00:46:55 EvilBore, not the right channel Jan 27 00:47:06 @zgreg thnks will look at GestureDetector Jan 27 00:52:17 <`teh1> hey Jan 27 00:52:36 <`teh1> i used eclipse to export my signed android app, and i uploaded it to a URL so i can download straight to my phone Jan 27 00:52:52 <`teh1> i click INSTALL when it prompts me for permissions, then it says "installing" Jan 27 00:52:59 <`teh1> after a second, it says "Application not installed" Jan 27 00:53:02 <`teh1> am i missing something? Jan 27 00:53:22 there's even a special GestureDetector for multitouch (two-finger) pinching, and it can be combined with a normal gesturedetector Jan 27 00:54:14 so it's unlikely that you need to come up with your own low-level touch event handling code unless you're doing something obscure Jan 27 00:54:25 i think all he wants is an OnClickListener... Jan 27 00:56:38 `teh1: do you want to offer the apk for download to others? Jan 27 00:57:51 for this assignment I need to process single tap and double tap only Jan 27 00:59:06 when creating a notification in an asynctask, should the second argument to notificationIntent be the primary class of the app or the class that called it? Jan 27 01:00:28 anyone seen this error message? "JNI: unpinPrimitiveArray(0x406a9448) failed to find entry (valid=1)" Jan 27 01:00:58 I seem to get spammed by a number of them right before my application crashes Jan 27 01:04:49 is there a difference between saying android:background="@null" and not saying anything about the background? Jan 27 01:05:40 xorgate: if you're talking about an ImageButton, if you don't put android:background="@null", you'll get a generic button background Jan 27 01:06:04 oops yes i mean FrameLayout for example Jan 27 01:06:28 i don't think it would make a difference on a framelayout Jan 27 01:06:35 <`teh1> zgreg: yes Jan 27 01:06:45 <`teh1> works when i install with adb Jan 27 01:06:57 xorgate: I assume that depends on the style? Jan 27 01:08:37 http://www.theverge.com/2012/1/26/2742560/gmail-logo-designed-night-before-service-launched? Jan 27 01:08:39 i love shit like that Jan 27 01:08:59 xorgate, depends on what Jan 27 01:09:23 most containers have no background Jan 27 01:09:28 and some widgets Jan 27 01:10:34 yeh i'm not even sure thats my problem Jan 27 01:10:47 http://i.imgur.com/AY6Iw.png Jan 27 01:10:53 there can be had a teensy speed-up if you draw a fullscreen background in front of the window background Jan 27 01:11:02 both these things use the same framelayout thing to round the edges Jan 27 01:11:13 only it fails sometimes on ics, when using gpu Jan 27 01:11:18 but only sometimes.. Jan 27 01:11:26 is that the Square technique? Jan 27 01:11:28 yes Jan 27 01:11:46 haven't had a change to test that one myself yet Jan 27 01:11:54 saw his talk though, lots of cool stuff Jan 27 01:12:03 i ran it on my buddy's tablet and noticed the corners Jan 27 01:12:14 so i think its related to gpu but then why not the top oine Jan 27 01:12:47 does anyone know how to customize the notification dropdown to not show the large icon? Jan 27 01:14:22 i do know it's not the paint of the border because i made it blue and the little corder still is black Jan 27 01:15:49 so maybe it's a bug in the hw accel stuff Jan 27 01:16:41 xorgate, create a tiny test case Jan 27 01:16:54 you could also talk to Eric on G+ about it Jan 27 01:17:08 bleh g+ Jan 27 01:17:12 or email, if you're old fashioned Jan 27 01:17:18 What does this mean, and how do I fix it? JNI: unpinPrimitiveArray(0x405fb040) failed to find entry (valid=1) Jan 27 01:17:37 i think i'd better talk to romain about it :0 Jan 27 01:18:12 doesnt seem to be a gpu thing Jan 27 01:18:23 unless i cant trust the emu on these matters Jan 27 01:18:45 can you ever? Jan 27 01:18:52 its just something not being transparent when i think it should be Jan 27 01:20:06 the emulator does not do hw-accelerated drawing Jan 27 01:20:16 ever Jan 27 01:20:32 ViewPager needs the option to show more than one page Jan 27 01:20:39 by the way, I want to speed up my opengl application by reducing the size of the rendering surface. however, on my device, rendering actually *slows down* if I reduce the size of the surface. what's up with that? Jan 27 01:20:43 anyone know how to write to the framebuffer on Android? or atleast overlay something across the screen from native code. Jan 27 01:20:53 hm i think maybe my framelayout is not telling the thing it's in that it needs to invalidate Jan 27 01:21:00 I've tried the standered linux method, but it doesn't work. Jan 27 01:21:08 I'm calling setFixedSize() on the SurfaceHolder of my GLSurfaceView. Jan 27 01:21:21 http://developer.android.com/guide/topics/graphics/hardware-accel.html#unsupported fwiw Jan 27 01:21:58 only if I reduce the size quite a lot (1/4 of the 1:1 pixel size), it actually is faster Jan 27 01:22:06 what's up with that? Jan 27 01:22:15 LoveMHz: you can't Jan 27 01:22:31 has to be someway. even if it's not offically supported Jan 27 01:22:33 certainly not portably across different chipsets Jan 27 01:22:37 err, no? Jan 27 01:22:58 hmm okay then. well any idea how I could overlay without direct access to the framebuffer Jan 27 01:23:04 i mean, you can certainly write an app that has a transparent native-accessible window that you can draw to Jan 27 01:23:09 but of course that's still just an overlay Jan 27 01:23:11 JakeWharton, do you know if anyone was able to successfully use Actionbar Sherlock with ant? Jan 27 01:23:27 and you can't overlay other apps' UIs Jan 27 01:23:35 I just want to know if I'm wasting my time.. i keep fixing issues but they lead to even more issues lol Jan 27 01:23:59 LoveMHz: might be possible with crazy hacking and root access Jan 27 01:24:28 1. get root access 2. write to /dev/fb 3. ??? 4. profit? Jan 27 01:24:39 but that's probably not what you want Jan 27 01:24:41 Medjai, tons of people do Jan 27 01:24:44 ask on the mailing list Jan 27 01:24:48 http://abs.io/forum Jan 27 01:24:52 chmod /dev/graphics/fb0 777 Jan 27 01:25:09 there is no /dev/graphics Jan 27 01:25:09 char* buffer = open(...) Jan 27 01:25:12 ioctl crap Jan 27 01:25:14 this isn't Xwin Jan 27 01:25:50 many devices have direct framebuffer access, usually at /dev/fb0, IIRC Jan 27 01:26:06 I installed some battery app the other day briefly which seemed to "overlay" something which was permanently visible, even when playing video Jan 27 01:26:06 the closest you can come is to open a system-layer window and draw to that Jan 27 01:26:06 zgreg: but not portably Jan 27 01:26:20 and often not for app-level uids Jan 27 01:26:40 [at least, we'd consider it a major security problem if an app could access the framebuffer directly] Jan 27 01:26:55 if app uids would have write access to that it would be a serious security issue Jan 27 01:27:03 and yeah, not portable... Jan 27 01:27:28 ctate: that'd be PERFECT for phishing and the like Jan 27 01:27:31 well the great thing about open source projects is theres less evil in direct framebuffer access Jan 27 01:27:49 ... Jan 27 01:28:11 I don't think framebuffer access is much of a security issue for an app that requires root anyways Jan 27 01:28:57 sure it is Jan 27 01:29:05 you're just relying on your users to trust the app Jan 27 01:29:48 [specifically, trust the app itself to be secure against being hijacked] Jan 27 01:30:10 * LoveMHz shuts up Jan 27 01:30:11 that's why i would never run any app that relies on being able to do su-level operations Jan 27 01:30:32 even though i routinely use phones that have an 'su'-capable adbd Jan 27 01:32:28 "the closest you can come is to open a system-layer window and draw to that" any pointers to doing that? Jan 27 01:33:13 does an invalidate() on a viewgroup trigger invalidate() on its children? Is there a way for me to have a widget detect an invalidate on itself and tell its ViewGroup to invalidate a certain rect? Jan 27 01:33:20 I have no idea why I'm getting a ClassNotFound exception when my code tries to access a class in a jar Jan 27 01:33:47 The path is right, the capitalization is correct, and the spelling is correct. anyone have any ideas? Jan 27 01:34:43 LoveMHz: some parts of the UI are unresponsive while you're doing that, too Jan 27 01:35:00 basically, anything that says it needs to rely on not being clickjacked Jan 27 01:35:10 Main focus is for it overlay ontop of a OpenGL game Jan 27 01:35:15 what are you actually trying to do? Jan 27 01:35:29 game trainer Jan 27 01:35:35 an OpenGL game that is running in a different app? Jan 27 01:35:42 yes Jan 27 01:36:11 might work and might not; i don't quite know Jan 27 01:36:35 figured there had to be an easier way than hooking OpenGL ES FBO Jan 27 01:36:39 probably, i guess, though maybe at a performance penalty because now there's an extra composite happening Jan 27 01:37:42 bah Jan 27 01:37:45 f-in dreamhost hack Jan 27 01:37:56 just failed my release because it couldn't scp Jan 27 01:39:49 extra compositing = sucky drawing performance Jan 27 01:40:24 (honeybar lags the launcher and some apps a bit until it somehow re-accelerates itself) Jan 27 01:40:53 haha Jan 27 01:40:59 you have dreamhost too JakeWharton Jan 27 01:43:53 there's #ifdef'd code for COMPOSITION_BYPASS in surfaceflinger Jan 27 01:44:00 does that even work by the way? Jan 27 01:44:09 would be nice to avoid composition for fullscreen opengl Jan 27 01:44:58 especially on my shitty gpu with little fill rate (adreno 200) Jan 27 01:46:45 hello Jan 27 01:47:45 if i have an app that listens for incoming sms from a specific number , how do i prevent the sms from being captured by the android messaging app ? Jan 27 01:50:17 hey Ken still there? Jan 27 01:50:34 hi Jan 27 01:51:30 IM not sure if my answer is 100% right, but i think it is, and if not im hoping someone that does know might correct it - Jan 27 01:51:36 But, you basically cant keep it from knowing Jan 27 01:51:44 the user must turn off android notifications, Jan 27 01:51:54 otherwise, it has to be a built in system app, or to a sort Jan 27 01:52:10 to prevent the SMS from actualling making it into the android msg app Jan 27 01:53:09 ok thanks docvile Jan 27 01:53:41 again not 100% sure, but i think thats the way it is Jan 27 01:53:55 pretty much Jan 27 01:54:15 because for a broadcast intent like that you cannot be sure of what order the broadcast recievers will be called Jan 27 01:54:25 thats what im talken about , ^- that guy knows whats up Jan 27 01:54:40 and you cannot prevent the system from calling all of the ones that are registered, nor can you unregister one that doesn't belong to you Jan 27 01:54:47 there are ordered broadcast as well Jan 27 01:55:10 man, I am having an odd issue, I got break points set and they are not getting hit Jan 27 01:55:11 ok Jan 27 01:55:31 I wish sms back end were pluggable Jan 27 01:55:34 ( BankZ ): are you launching in debug mode? Jan 27 01:55:43 Y Jan 27 01:56:05 did you make a flaw in your logic and put a breakpoint in unreachable code? Jan 27 01:56:20 and in the DDMS perspective, I see its being debuged Jan 27 01:56:25 no Jan 27 01:56:29 so that I could use a different sms front end to google voice for example Jan 27 01:56:49 Im at the start of a funcation and I see logcat coming from it Jan 27 01:57:32 debugger might not be attaching for some reason Jan 27 01:57:54 shows attached in the debug prespective Jan 27 01:58:13 gonna relaunch Jan 27 02:00:01 I wish quick responses in I c s could be sent using google voice Jan 27 02:00:38 Yeah why is that not the case? Jan 27 02:01:26 ok, I dont get it Jan 27 02:01:52 I see the messages being written but no breakpoints getting hit Jan 27 02:02:05 because sms back end art pluggable Jan 27 02:02:37 maybe you somehow turned off pausing on the breakpoints? Jan 27 02:02:40 check the hit counters Jan 27 02:17:00 it seems to only break in the on create on the main activity Jan 27 02:17:02 odd Jan 27 02:19:46 Is there anything odd about debugging a service? Jan 27 02:22:12 can i mess with an XML in my assets folder after compiled and running? Jan 27 02:22:42 i know it doesnt get turned into java code after runtime, but not sure if i can mess with it while on the go? Jan 27 02:25:12 is it possible for the PC in a crash dump to be wrong? It is crashing on some code that should never crash. Jan 27 02:41:30 Question about sqlite3. I have only one instance of DBhelper and my app is single-threaded. I'm getting lots of "DB is locked" errors when I am trying a delete right after a begintransaction/dostuff/endtransaction. should i assume the endtransaction command does not return until the db operations are COMPLETED? Or do i need to watch the db with isDbLockedByCurrentThread() to know when its safe to go on? Jan 27 02:48:35 hmmm... looks like all the devs are asleep. ;( Jan 27 02:51:43 any sqlite3-saavy devs in here? Jan 27 02:53:12 how could you possibly have a "db is locked" thing if you are operating single-threaded, indeed? Jan 27 02:53:18 I know mySQL Jan 27 02:53:25 the database is in-process. The calls are synchronous. Jan 27 02:55:57 you've probably left a cursor open or something Jan 27 02:56:55 any Android plugin users here? Jan 27 02:57:01 er, whoops, wrong room Jan 27 02:57:45 in the IRC world, we call them 'channels' **** ENDING LOGGING AT Fri Jan 27 02:59:57 2012