**** BEGIN LOGGING AT Fri Jan 27 02:59:57 2012 Jan 27 03:00:15 im very careful to close all cursors. would the actual device's I/O or disk subsystem being slow CAUSE the "error 5: db is locked" thing? Is there a timeout variable I can set/increase somewhere? Jan 27 03:00:37 im not multi-threaded and I only have one instance of dbhelper, and i'm closing all my cursors. this is driving me nuts Jan 27 03:02:09 RyanMcDonald: I do not see how it is possible that the db is locked if indeed you are single-threaded, personally. Jan 27 03:02:14 will a 3.0+ device use the 'new' (3.0) method of rendering view hierarchy even for <3.0 apps? Jan 27 03:02:31 it doesn't even matter if you have a transaction open or not (or shouldn't) because your queries would just run against the current transaction. Jan 27 03:03:20 xorgate: the hardware acceleration? No, the manifest had to turn it on. It's default after targeting certain api level, probably 4.0 Jan 27 03:03:29 alankila, i have an asyncbackground thread and a main gui thread, but the gui thread never interacts with the db. Jan 27 03:03:48 the plot thickens. Jan 27 03:04:03 alankila no i mean the way views invalidate themselves and their parents and create displaylists out of that ( http://www.youtube.com/watch?v=v9S5EO7CLjo ) Jan 27 03:04:12 just released new versions for 4 projects Jan 27 03:04:25 captain morgan pose to celebrate Jan 27 03:04:47 hey would anyone be wiling to look at my android code and give me advice and suggestions to make the drawing time I get of 10 miliseconds more consistent? Jan 27 03:05:05 xorgate: okay, sounds like something I don't really know about all that well. Still, if there are refresh bugs they will be easy to fix as whatever works in that new displaylist mode will work on the older devices too Jan 27 03:06:00 RyanMcDonald: how do you guarantee that the gui never actually does interact with the db? You have an intentservice or some message passing system to your thread? Jan 27 03:06:10 http://pastebin.com/HRf3SeUu Jan 27 03:07:32 eddi3x3: well at least take things like resource decoding out of onDraw, cache those bitmaps. Jan 27 03:07:42 alankila, hmmm.. it looks like the gui thread CAN get a readonly cursor at unpredictable times. if the asyncbackground task is looping on an even interval every few seconds refreshing the db (begintransaction/dolotsofwrites/endtransaction), could this cursor being open cause problems? also... this seeme to only happen as my db gets more and more thrashed/fragmented. I do LOTS of delete/insert/modifies. Jan 27 03:08:33 eddi3x3: I don't see how you do animation, or where you use these fps variables you have derived Jan 27 03:09:07 RyanMcDonald: so are you now telling me that you do use the db from multiple threads? Jan 27 03:09:39 RyanMcDonald: in any case, db.enableWriteAheadLogging() could solve the concurrent access problems if so Jan 27 03:10:36 alankila. yes. I was wrong. I have an AsyncTask thread and a main gui thread. i assume that if the gui thread has an open cursor, the AsyncTask thread can error out on making transactions? Jan 27 03:11:29 alankila, I thought with one global instance of DBhelper, you really didnt need to worry about threads. i thought everything go serialized into a single "buffer" of commands . not so? Jan 27 03:12:12 probably not. Just do the db.enableWriteAheadLogging(), it will permit concurrent access even when a transaction is happening. Jan 27 03:12:19 I use System.out to see the fps but I took it all off Jan 27 03:12:20 I think the state seen by other threads is as if the transaction wasn't happening Jan 27 03:12:28 awesome! looking it up right now on goog Jan 27 03:12:50 jakewharton: did you make updates to the stuff on the site? Jan 27 03:13:02 what site? Jan 27 03:13:15 abs? or jakewharton.com Jan 27 03:13:17 captainmorgan.com? Jan 27 03:13:20 haha Jan 27 03:13:36 I'm trying to look through google how to cache the bitmaps Jan 27 03:13:46 i did not, wasn't ABS related or very large releases to warrant a blog post Jan 27 03:13:50 I did post on G+ though: https://plus.google.com/108284392618554783657/posts/BpxGxzbdmGt Jan 27 03:13:56 if I try to make those bitmaps out of the onDraw method it doesn't compile Jan 27 03:13:59 eddi3x3: that's easy, just decode once and reuse the Bitmap object Jan 27 03:14:19 ah perfect Jan 27 03:14:20 so I just did a bunch of adt/sdk updates, now in avd manager I see "Android 4.0.3 - API Level 15" and "Google APIs (Google Inc.) - API Level 15 -- what's the difference? Jan 27 03:14:26 congrats sir Jan 27 03:14:42 and has the compat. lib been renamed or something? I can't see how to get/update it Jan 27 03:14:42 wabz, the latter contains maps Jan 27 03:14:48 yes, it's support lib Jan 27 03:14:56 ahh. thanks Jan 27 03:14:56 it's down at the bottom Jan 27 03:15:49 I decode once in the onDraw method then right? Jan 27 03:21:08 alankila, if I add a db.enableWriteAheadLogging() immediately after my getwritabledatabase(), is that enough? the documentation suggests I need to stop using BeginTransaction and start using beginTransactionNonExclusive() ? is this so? Jan 27 03:23:53 I am actually not sure how this method call behaves. Should each thread now have multiple db handles? I am only using one global handle and it still works for me. Jan 27 03:24:36 I only know that I needed to call that method in order to make it possible to read the database in one thread while there was ongoing transaction in another. Jan 27 03:24:49 some more systematic approach would be required, I admit. Jan 27 03:25:04 are you using BeginTransaction() or beginTransactionNonExclusive() ? Jan 27 03:25:24 I'm using beginTransaction. Jan 27 03:26:09 ever do db.execSQL("VACUUM") just for good measure from time to time? Jan 27 03:26:13 I'm going to guess that the sqlite internal database handle is a threadlocal with the writeahead logging feature. That seems to be how it behaves to me: the operations made in another thread seem invisible to the other until the commit has occurred. Jan 27 03:26:24 No. Jan 27 03:27:51 do any of your db apps thrash like mad as part of their NORMAL operation? my app will insert/update/delete thousands of times per use, storing pretty large (2kbyte) BLOBS Jan 27 03:28:00 think a VACUUM might be in order? Jan 27 03:28:36 I look into the implementation now Jan 27 03:28:41 It's not a threadlocal Jan 27 03:32:08 The enableWriteAheadLogging basically just causes android to track a pool of free database connections for you. If no query is currently executing, it will pick a handle. If query is executing on all handles so far allocated, it will pick a new one Jan 27 03:32:31 interesting issue here...I am using a simple timer for somthing and for some reason the result is counting correctly but the format is showing the hours at 19 Jan 27 03:32:43 startTime = SystemClock.elapsedRealtime(); Jan 27 03:32:53 long interval = SystemClock.elapsedRealtime() - startTime; Jan 27 03:32:58 In theory if I wanted to write this competently I would get rid of this writeaheadlogging shit Jan 27 03:33:00 hmm.. is there a way for a ViewGroup to tell its children to invalidate the ViewGroup whenever they themselves need to be validated? Jan 27 03:33:15 +in Jan 27 03:33:28 using "HH:mm:ss.S" in simpledateformat Jan 27 03:34:24 I quite expected a ThreadLocal. :-/ Jan 27 03:35:12 now transaction isolation isn't guaranteed. I may have a transaction going in one handle... I need to read more code to determine if indeed it is possible that I could get a handle with ongoing transaction from the pool Jan 27 03:35:36 db.enableWriteAheadLogging() results in "The method enableWriteAheadLogging() is undefined for the type SQLiteDatabase" Jan 27 03:35:39 ?????? Jan 27 03:39:55 lalalalala Jan 27 03:40:50 alankila, it looks like this was introduced in api level 11. did you ever use this prior to honeycomb? Jan 27 03:44:11 Hmm. It's tricky implementation. Jan 27 03:44:30 the writeaheadlogging feature causes transactions to occur on the main sqlite database handle, the pool is used by other threads (which can't begin a transaction of their own) Jan 27 03:44:48 no, I suppose I did not use it before Jan 27 03:46:08 so amazingly what you have in the writeaheadlogging feature is actually pretty cool kind of concurrency: transactions work, but only one thread can enter transaction (others are forced to wait until the transaction ends). In the meantime, all other queries succeed without a transaction against a pool of handles, which are allocated as necessary to fit the concurrency demands placed by the app Jan 27 03:46:39 and the pool is even smart enough to try to look which database handle might have cached the sql statement you try to execute and prefers that handle if it is free Jan 27 03:48:14 hello everyone Jan 27 03:51:17 RyanMcDonald: in any case, I do not really worry about the db fragmentation or other internal cleanup. Maybe you can run vacuum once a day if you think it helps, but I wouldn't care. The algorithms used by databases place reasonable bounds at the maximum inefficiencies you will get anyway, so the optimization work might not even pay for itself -- or at least you can't blithely assume that it will Jan 27 03:51:33 I'm pretty sure that if the rate of vacuum is low enough, it might become a win Jan 27 03:57:40 alankila, I must stay at >=API8. So I wont be able to use writeaheadlogging. I serialization good enough to keep the multithreads happy or would you do something like "while(db.isDbLockedByCurrentThread() || db.isDbLockedByOtherThreads()) { loop } Jan 27 03:58:00 typo: IS serialization..... Jan 27 04:03:07 Can anyone direct me to a resource for learning to write a Clockwork recovery script to strip out all Google apps from custom roms I flash? Jan 27 04:03:30 I would just synchronize all methods that use the database on the db object or something Jan 27 04:03:40 if you don't truly need concurrency, this will work. Jan 27 04:03:59 if you need true concurrency, you open a handle per thread that accesses the database and use the writeaheadlogging pragma on the sqlite manually. Jan 27 04:05:20 how do i determine the api level of the device? Jan 27 04:05:38 alankila, i dont really need true concurrency. i also dont mind if I have to wait a few ms to get access. heck, i dont even care if i read old (pre-commit-from-another-thread) data. i just dont want to throw and exception and FC. ;) Jan 27 04:06:24 just use the synchronize keyword on all methods that use the database then or something. Jan 27 04:06:54 serious people say that you shouldn't just synchronize on the object but on a proxy of the resource, or the actual resource being contested for Jan 27 04:07:07 but I usually just write synchronize, because my designs are small, simple and stupid Jan 27 04:07:33 alankila, is it possible to have a call WAIT for access by changing some global property on the connection (max timeout or something)? Jan 27 04:08:50 just synchronize Jan 27 04:09:25 no point to draw it out or make it complex, imo Jan 27 04:12:20 again, a more serious advice here would say something along the lines of "never use the database directly from the ui thread. Send a message to your db worker thread, have it perform the query, then ping the ui thread with results when ready" Jan 27 04:12:32 but I'm not offering that advice because it tends to generate so much code from so little work Jan 27 04:12:57 even if asynctask, properly subclassed, would yield a very beautiful version of this design Jan 27 04:16:17 my db operations in my gui thread are VERY lightweight. i dont see them blocking the ui ever. but i totally understand why you say that' Jan 27 04:16:45 im not familiar with synchronized. code snippet for the stupid? ;) Jan 27 04:17:22 i see examples, but i dont understand if I synchronize my entire function, or just when i use methods on my db. Jan 27 04:20:11 "public synchronized void doDatabaseOperation() {}" "public synchronized void doAnotherDatabaseOperation() {}". Jan 27 04:20:23 arrange your method such that they do one complete unit of work against the database Jan 27 04:20:37 for instance, one complete transaction, or one query with a Cursor, reading the result set, or something. Jan 27 04:21:04 if you actually return a Cursor, then I think it gets more complex, you'll be needing per-thread database handles and can't do this Jan 27 04:21:25 did layoutopt go away? Jan 27 04:26:01 Anyone know how to change auto-rotate delay? Jan 27 04:27:17 public void invalidate (Rect dirty) ... ... This method is destructive to dirty. Jan 27 04:27:24 what's "destructive" exactly? Jan 27 04:27:47 that it modifies the object passed in as argument Jan 27 04:28:21 (It's bad form to have mutable objects for fairly basic types like Rect. WTF, android?) Jan 27 04:29:03 i think what happens is that a new rect is created from top/left/bot/right-mosts Jan 27 04:33:59 must. find. way. to fix. auto-rotate delay. Jan 27 04:37:37 alankila, pardon what is most likely a stupid question but..... to synchronize my calling of db.methods, ill have to declare a synchronized function and do all my work in that function? no way to "synchronize" the actual execute statements in-line? the reason i ask is that if i have to isolate all my db "work" into discreet functions, thats gonna mean a lot of passing of data structures in out of these new func Jan 27 04:37:38 tions Jan 27 04:38:33 wouldnt placing a "while(db.isDbLockedByCurrentThread() || db.isDbLockedByOtherThreads()) { loop }" just before my exec statements do basically the same thing? Jan 27 04:39:01 and by "loop" i mean sleep a few ms Jan 27 04:39:03 RyanMcDonald: it is possible to define a synchronized block Jan 27 04:39:10 stop thinking in terms of tests and loops like that. Jan 27 04:39:54 synchronized (object) { } will automatically sleep if somebody else has synchronized on that object. Jan 27 04:40:02 so if i have a SINGLE function that does a whole bunch of stuff, I can just create a block of synchronized code WITHOUT moving it out of my current function and into another one all by itself? Jan 27 04:40:07 that is the very primitive you seem to want here, except there's no while and no explicit sleep Jan 27 04:40:39 alankila, my biggest problem is that I'm a Python programmer, not a Java one. ;) But I'm learning! Jan 27 04:41:31 i just cant see the implementation in my head and google is not turning up any easy to follow examples of using synchronizing with sqlite Jan 27 04:41:49 in fact, the synchronized keyword on an instance method is exactly same as wrapping the whole method body inside "synchronized (this) {}" Jan 27 04:42:56 know of any code examples showing this implmentation. im just now getting the hang of the way java does instanciations and classes/subclasses. im a damn newbie Jan 27 04:43:18 hey where does eclipse install my debug application? Jan 27 04:43:32 no, don't think so. As I mentioned, I don't care about old androids so I use enableWriteAheadLogging which just happens to solve the problem of concurrent access in a reasonable way Jan 27 04:43:57 the general use of synchronized is not something you'll probably find any sqlite-related references with. You just have to understand how it works. Jan 27 04:44:32 The rule is very, very simple: synchronized (object) { ... some code here ... } guarantees by locking on the object, that only one thread has it locked, and executes the code block only while holding that lock. Jan 27 04:44:38 so it's a way to build exclusion Jan 27 04:44:56 you can guarantee that only one thread is executing any of the synchronized blocks (which synchronize on the same object) Jan 27 04:45:30 if a thread sees that the object is already locked, it will wait until the earlier synchronization ends. Jan 27 04:48:09 oh i think i get it.... lets say i instanciate a global variable "protected int MyLock = 0;". then, in any function, i can simply wrap any lines of my choosing in synchronized (MyLock) {......} and thats it? No moving code into new functions/classes? Jan 27 04:48:24 additionally the java memory model guarantees that operations that require changes in memory will have occurred after passing a synchronization barrier. Jan 27 04:48:44 I am a bit depressed with android as of late Jan 27 04:48:55 so if two threads want to read the same variable, they both must execute a synchronized, the one changing must synchronize after change, the one reading must synchronize before read Jan 27 04:49:01 had to write some ios code, and even though you can do a hell of a lot less with it, and the apple communities suck Jan 27 04:49:24 RyanMcDonald: no, the MyLock is not an object. It must be an object that you synchronize on. Jan 27 04:49:25 I am really enjoying the lack of having to pass contexts all over the place for no apparent reason Jan 27 04:49:35 protected Object lock = new Object() is very popular Jan 27 04:49:43 even with its memory managemnet, it seems easier to write code that doesnt leak (as opposed to android) Jan 27 04:51:15 alankila: thanks. gonna try it now...... Jan 27 04:51:20 ron_frown: yes, the rules on android: never cache a reference to any platform object. Pass applicationcontext whenever you can. Jan 27 04:55:31 alankila my point is why is it that way in the first place Jan 27 04:55:47 why does there have to be 200 ways to do everything and many of them will eff you over Jan 27 04:56:26 thats what i hate Jan 27 04:57:09 you have to know all these little holes everywhere otherwise you are bound to fuck it up Jan 27 04:57:19 yes. You need to simply learn the rules. Android's primary goal is memory efficiency above all things, including programmer convenience. Jan 27 04:57:46 thats my point... obj memory management is far more involved Jan 27 04:57:56 and yet with little experience it already just makes more sense Jan 27 04:58:01 things like dialogs Jan 27 04:58:24 if you have to manage them because it cant handle rotation by itself? Dont let people pop dialogs in a non-managed form Jan 27 04:58:29 I mean I am all about freedom Jan 27 04:58:37 but my coworker still insists on not using managed dialogs Jan 27 04:58:51 and insists on not doing fragments with the newInstance() model Jan 27 04:59:48 dont get me wrong Jan 27 05:00:03 I really like android, I like the openness Jan 27 05:00:18 I just dont understand why some of these problems exists Jan 27 05:00:21 and continue to exist Jan 27 05:01:01 well, deprecation and removal of bad APIs sounds like the way to go Jan 27 05:01:06 you should be able to gradually unfuck it Jan 27 05:01:24 and fragment shit I havent touched since 3.0 sdks Jan 27 05:01:35 but imo fragments was fantastic idea Jan 27 05:01:40 worst possible implementation Jan 27 05:01:46 I haven't personally used managed dialogs because I dislike confusing the dialog code with the activity code. seems just so god damn dirty Jan 27 05:01:53 but if the activity changes then things might fuck up, it is true. Jan 27 05:01:55 it was like if you didnt do exactly what they did in the 2-3 examples for fragments Jan 27 05:01:58 it wouldnt work Jan 27 05:02:58 I should test if applicationcontext can serve as context for a dialog. Probably not, with android being all forms of shit that it is Jan 27 05:03:30 well the more I dove into that... the less I understand the choices to have contexts you pass around... let alone a contextwrapper and activity Jan 27 05:03:48 I mean why not have a service you get a reference to and pull resources Jan 27 05:04:17 the only thing that makes me interested about applicationcontext is the promise that the beast is always there as long as your application is alive. And it's a singleton. Jan 27 05:04:25 Therefore the actiivty lifecycle problems can not occur with applicationcontext Jan 27 05:04:42 the only question is: how much of the API can be salvaged by use of applicationcontext Jan 27 05:04:55 well I've done lots of stuff with UI Jan 27 05:05:12 and while the avg person doesnt run into the same problems (I write os apps etc custom os features) Jan 27 05:05:42 there are a lot of cases I've encountered where I needed to pop a dialog, or pop a new window, or jump to an intent Jan 27 05:05:44 etc Jan 27 05:05:55 and applicationcontext often times didnt work if you passed a reference around Jan 27 05:06:00 and if you were passing a reference around Jan 27 05:06:08 or rather cache a ref Jan 27 05:06:13 you def run the risk of leaking it Jan 27 05:07:00 anyway, I do think that fragments salvage most of the API, in sense that the fragment can be set to retained, and the activity's role can be aggressively minimized Jan 27 05:07:14 each time a context is required, getActivity() will provide you one Jan 27 05:07:32 like I said I really like the idae of fragments Jan 27 05:07:35 the only trouble are those bits which internally cache it, as they should be notified of the new context Jan 27 05:07:49 I wish they'd figure out a diff way than the static constructor (new instance) shit Jan 27 05:07:59 but I am not sure how serious a problem that is Jan 27 05:08:03 Hell World Jan 27 05:08:08 How goes it? Jan 27 05:08:15 I wish they would really solidify the fragment transaction stuff so that if I tell it to add/remove replace etc Jan 27 05:08:18 it just does it Jan 27 05:08:28 I know on several occasions without copying and pasting Jan 27 05:08:50 I'd tell it to replace, it did, replace another frament and it did Jan 27 05:08:55 then replace with the original Jan 27 05:09:01 "fragment already exists" Jan 27 05:09:03 try to remove Jan 27 05:09:08 "fragment does not exist" Jan 27 05:09:22 honestly if it already exists just replace the fucker Jan 27 05:09:29 or use it instead Jan 27 05:09:42 I've personally just used replace and it has always worked Jan 27 05:10:21 hello everybody... Jan 27 05:10:59 a stupid question:: why there is no 'official' support for 'Native Video Calls' even in Android 4.0? ofcourse the big-ones do have their own arrangements. but the deprived ones or cheap ones are struggling without it. Jan 27 05:11:20 but yes, the android's primary problem is excess complexity, and broken ways to do things. Maybe google would admit having made mistakes and would begin a deprecation campaign to flag broken APIs and suggest more robust replacements. Jan 27 05:11:27 good night Jan 27 05:11:59 If they were decent-minded folks they would do everything they can to help the ISVs write better software on android. That doesn't involve writing more code into android -- there is already too much of that. It would involve deleting code, and make the remaining pieces work together better Jan 27 05:12:23 well you know what I think honestly other than the constructor bit Jan 27 05:12:33 fragments would just need fixed implementations Jan 27 05:12:42 Fragments need to be constructible by the framework, so there's no way to make constructors work normally Jan 27 05:13:40 I dont believe that Jan 27 05:13:43 so you do new Fragment() followed by setArguments(b), and then in onCreate you must construct the objects you indicated in your b, which you would like to pass as the ctor args Jan 27 05:13:47 that is just how it is. Jan 27 05:13:55 I get why they did it that way Jan 27 05:14:32 even if a fragment just had a Dictionary for parameters/viewstate Jan 27 05:14:36 alankila, my proof of concept code works. thanks! now..... another question.... my background asynctask does lots and lots of db operations. my main gui thread gets a cursor from time to time when a user presses a button. if I synchronze these two, I might end up with a dead click in my gui, if the gui has to wait on asynctask to give up the lock. is there a way to READ a single record from the db when a tr Jan 27 05:14:37 ansaction is curretnly in progress? Jan 27 05:14:38 it might be that if we standardized on, say, viewpager, then the viewpager's adapter could always construct the fragments in question, for instance. And if all fragments were set to retained, forced. Jan 27 05:14:38 or something Jan 27 05:15:04 We *could* make ctors work, but right now android expects the capability to construct objects. Jan 27 05:15:33 well it doesnt really HAVE to be via a constructor Jan 27 05:15:54 RyanMcDonald: probably not. It sounds like you need multiple db handles and write ahead logging. Suggest you get on with it. Jan 27 05:15:58 (basically, im not sure what operations, if performed currently by different threads, would actually generate a DB BUSY exception Jan 27 05:16:21 alankila, unfortunately, I have to support API8 Jan 27 05:16:27 RyanMcDonald: yes, you do it manually. Jan 27 05:17:14 enableWriteAheadLogging is just a method that emits specific pragmas into the db and enables certain pooled database handle model. Nothing you couldn't emulate on your own. Jan 27 05:17:16 is there a way to read a record without using cursor? (make an atomic call that does not result in a handle)? Jan 27 05:18:09 RyanMcDonald: no, I doubt it. If you write long-runnning transactions, and these freeze an UI, then you need to either make the DB access concurrent or shorten your transactions Jan 27 05:18:13 I see no way around it. Jan 27 05:20:13 seems like SOME operations would be thread safe (like reading?) is there an official documented list of what is NOT thread safe? ie. you have a cursor, then try to delete a record that the cursor points to. Jan 27 05:20:26 I got no idea. Jan 27 05:21:15 seems like you could take out multiple cursors concurrently from different threads and that would be ok, but you shouldnt be able to delete a record from the "cursorset". Jan 27 05:21:33 arrrr... this is frustrating Jan 27 05:21:53 enableWriteAheadLogging sounds WONDERFUL Jan 27 05:21:59 wish i could use it... ;) Jan 27 05:22:09 It's not very hard to emulate you know Jan 27 05:22:29 unfortunately, im not up to it yet. still learning java. Jan 27 05:23:46 well, im just gonna synchronize everything and see if my gui pays a price Jan 27 05:24:24 if you put synchronization barrier just across a single operation like db.insert(), or db.delete(), and synchornized around db.query() calls, you'll probably be able to access the db very concurrently Jan 27 05:24:31 im still a little skeptical, since everthing WITHIN my thread#2 is safe unto itself. and the only thing i do in thread#1 is take out a cursor for a few milliseconds Jan 27 05:24:38 I mean, it doesn't take a whole lot of time to just insert one row or something Jan 27 05:25:09 but if you synchronize over inserts of 1000 rows, then you'll be prepared to wait a while Jan 27 05:25:18 however, 1000 individual synchronized inserts are no problem Jan 27 05:25:33 I'm assuming you can tolerate reading partially inserted records though Jan 27 05:26:56 for a typical "BeginTransaction {loop} SetSuccessful, EndTransaction" structure, would you synchronize the ENTIRE block, or are you suggesting it would be safe to synchronize each operation discreetely? if you did this, would getting cursors in the other thread fail becuas the is still a pending transaction? Jan 27 05:28:09 I do not expect that there are any problems. I assume all problems are related to multiple threads trying to call into the native code concurrently, but the thread id itself makes no difference to the native code. Jan 27 05:29:06 that transaction is open doesn't matter for your query, although I would advice you to read the cursor and close it in one atomic operation (inside a single synchronized block). Jan 27 05:29:33 asked another way.... say thread#1 has a cursor. thread#2 does a "BeginTransaction {loop} SetSuccessful, EndTransaction" thing that might include deletes. Is it correct to say that I shouldnt expect a DB LOCKED error until i actually do the EndTransaction? or would it be earlier on when i actually tried to do a delete inside the transaction block? Jan 27 05:31:40 I think the locked is because the native code is performing something. Jan 27 05:31:49 not because you have a transaction Jan 27 05:32:21 I don't think the native code knows or cares which thread calls into it. To prevent from crashing, I'm guessing here -- I could read the source, though -- android's java bits enforce synchronization in some way first. Jan 27 05:32:45 I'm trying to install the ADT Plugin on Ubuntu and I'm at this step --> http://developer.android.com/sdk/eclipse-adt.html#installing but I get the following message when I try to install the ADT Plugin -- what gives? Cannot complete the install because one or more required items could not be found. Jan 27 05:32:45 Software being installed: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) Jan 27 05:32:45 Missing requirement: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found Jan 27 05:33:42 i think i had the same problem the other day Jan 27 05:33:57 but i dunno how i solved it.. maybe another version of eclipse? Jan 27 05:34:31 xorgate: I see -- how do I get another version of Eclipse for Ubuntu? Do you have any suggestions on what works? Jan 27 05:34:52 idunno im more of a windows guy.. apt-get ? :0 Jan 27 05:34:55 aLearner: using ubuntu packages? just download a real version from eclipse.org Jan 27 05:35:25 never use any distro-packaged eclipse, it's invariably horribly broken by the packaging process because these people have a mindset that makes it OK to break software for sake of making it possible to package them Jan 27 05:35:42 they disable the update functionality Jan 27 05:35:55 in their minds only their chosen package manager has any right to update the software Jan 27 05:36:15 alankila: Thank you for your input. Not sure what do you mean? That I shouldn't use the 'Software Center' to get Eclipse? Jan 27 05:36:21 it's a reasonable position, I guess, but terrible when it comes to software that is built to do self-update Jan 27 05:36:51 aLearner: yes, precisely. You download the .tar.gz or similar file and decompress it on your Desktop folder and just doubleclick on the nice eclipse icon there from now on Jan 27 05:36:55 it's self-contained and will work Jan 27 05:37:27 alankila: Ah, I see. I didn't realize that it was that easy. I was mistaken into thinking that the 'Software Center' was the 'right' thing to do. I'm a newbie (of course) Jan 27 05:37:49 alankila: Do you have any versions you'd recommend for Ubuntu 11.10? Jan 27 05:37:52 yes, I agree that it would be better if they did not offer crippled versions of eclipse, or most other software in truth Jan 27 05:38:02 I have a whole rant bubbling about how much I hate the linux packaging mindset Jan 27 05:38:08 xorgate: Thanks for your help. alankila is helping me! Jan 27 05:38:15 right on Jan 27 05:38:33 alankila: How is a newbie like me supposed to know all this? It's so surprising to read...If you were not there, I would be lost! Jan 27 05:38:50 who knows maybe after a while you'll even use intellij :0 Jan 27 05:38:59 aLearner: oh, I'm just corrupting you. I still speak the truth when it comes to this, though. Jan 27 05:39:12 anyone used lejos? Jan 27 05:39:23 xorgate: I was on Windows but I ditched that in favor of Linux :-) Jan 27 05:39:39 alankila: I've had a hard time getting things to work on Linux so far. But it's been fun! :-) Jan 27 05:39:43 aLearner your beard must be bigger than mine Jan 27 05:40:01 whenever i spend time in linux i start foaming at the mouth Jan 27 05:40:06 I just use OS X myself. It's like linux, except it actually has serious software Jan 27 05:40:16 xorgate: I need to do PHP work too and it seemed to be easier to dev work on Linux. Windows is OK - but Linux seems better! Jan 27 05:40:19 lol alankila Jan 27 05:40:24 I can still install the playware and some good bits via macports or homebrew or what have you Jan 27 05:40:33 alankila: Looks like the only thing I've NOT tried is OSX... Jan 27 05:41:30 linux>mac>ms imho Jan 27 05:41:33 alankila: Hopefully I can get things working on Ubuntu and do actual dev work Jan 27 05:41:36 but games exist for os x, and complex software too. And the hardware is pretty sweet. On linux, everything is broken every few years so nobody ever writes that much complex software for it. And it keeps on being broken every few years because there are no competent people to get enough of the fundamental pieces of the architecture right. Jan 27 05:42:10 alankila, whats your qualification to make such statements Jan 27 05:42:35 I'm the newbie -- so this is an intereting debate! Jan 27 05:42:41 linux runs 95% of the web Jan 27 05:42:44 std0s: I'm an old linux user. You can't have greater detractors than people who became turncloaks Jan 27 05:43:14 std0s: For dev work is Linux better than Windows at least? :-? Jan 27 05:43:18 its only broken if i break it.. Jan 27 05:43:42 depends what "dev work" you mean Jan 27 05:43:55 std0s: Also any recommended version for Eclipse to do Android dev work? Jan 27 05:44:09 latest probably Jan 27 05:44:16 anyway, for clarification, I do limit my discussion to desktop largely. Linux on server is quite alright. Jan 27 05:44:35 std0s: By 'dev work' I mean Android dev work + doing module development work in PHP for the Drupal community Jan 27 05:44:37 unlike ms lol Jan 27 05:45:26 std0s: Thank you. Will download the latest version. It seems like everyone in Drupal is either on Mac or Linux - and Windows was too broken to do any serious coding... Jan 27 05:46:21 aLearner, use the latest - also drupal <3 linux not ms Jan 27 05:48:26 Folks, does this seem like the right thing to download? ---> http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigosr1 Jan 27 05:48:39 std0s: Thank you. Jan 27 05:48:49 alankila: Thank you for sharing your thoughts and for your help! Jan 27 05:48:50 I have tried doing java development on windows and surprisingly it works about just as well as on os x or linux. It is a cross-platform system, after all Jan 27 05:49:14 I've had *most* difficulty on java development with linux, incidentally, because SWT and GTK+ have had more issues than the other toolkits SWT supports Jan 27 05:49:50 maybe I hit it at a bad time, linux getting 64-bit support, the move to client-side windows in GTK+ ... but both thing made eclipse crash or dialog stop responding and there were other glitches too that just don't occur on other platforms Jan 27 05:50:01 alankila: The reason I move away from Windows was because I recently did a Java update and it broke my dev environemnt. I was on JDK 6 and I moved to 7 and couldn't get it working...So I thought Linux might be better! Jan 27 05:50:09 aLearner, you can install that eclipse then add all the specific plugins you need Jan 27 05:50:50 std0s: RIght. Thank you for checking it out. I hope this is the right move to shift over to Linux! I've just left Windows behind Jan 27 05:51:11 but even swing's gtk+ native look and feel has layouting issues so I'm thinking that the common denominator of having to deal with GTK+ may be the problem. Perhaps that toolkit *is* bad. Jan 27 05:51:37 and that swing thingy is some kind of emulation Jan 27 05:52:00 so maybe it's some other issue. IDK. Jan 27 05:52:30 alankila: Are there any devs here that use Linux routinely to develop Android software? Jan 27 05:52:45 \0/ Jan 27 05:52:46 I'd guess significant fraction of them Jan 27 05:53:11 alankila: So you're saying it's doable - but maybe painful - right? Jan 27 05:53:28 std0s: I'm guessing you're one of them? Jan 27 05:53:46 linux=lifestyle choice Jan 27 05:53:47 aLearner: nah, I'm just saying that I've had more issues on linux than on the other operating systems. Jan 27 05:54:03 its harder Jan 27 05:54:09 the setup complexity seemed mostly the same to me Jan 27 05:54:23 linux is stupid with android phones though and requires you to write some stupid udev rule for the usb access Jan 27 05:54:39 but easier in some ways Jan 27 05:54:46 alankila: I'm having a harder time getting things setup on Linux than on Android Jan 27 05:54:50 this canonical, I don't know what kind of chums they have working in there, but if the fools do not recognize that people install their OS to do android development, they are fools indeed Jan 27 05:54:52 easier access to you own hardware Jan 27 05:55:18 easy alankila lets not get flamey Jan 27 05:55:38 I'm just saying that they are missing an opportunity Jan 27 05:55:44 ubuntu has many uses Jan 27 05:55:50 std0s: I see - it took a while for Linux to recognize my hardware - but I'm glad ADB does now Jan 27 05:56:19 they could support android development better. AS soon as the guy sticks his first debugging-enabled android phone into his box, it could show you a dialog that would setup the whole damn thing. Jan 27 05:56:27 adb is lots of fun Jan 27 05:56:54 std0s: Yep - I somehow liked the challenges of setting things up - but it can be frustrating - this forum is my only savior :-) Jan 27 05:57:06 and what developer tools does ubuntus wonderful competitor provide?? Jan 27 05:57:09 alankila: Things can be made smoother Jan 27 05:57:27 std0s: I beg your pardon? Jan 27 05:58:14 std0s: This may be a dumb question but what exactly is the ADB -- it's some kind of Android bridge -- but what is it in plain English? Jan 27 05:58:57 its a client server connection between your phone and your computer Jan 27 05:59:00 maybe it was a question to me? All I'm saying is that on the other operating systems, you don't have to dick with udev rules in order to be able to connect to your phone. You install android sdk and it starts working. :-/ only on linux it's difficult because people on linux pretend that android phones aren't hardware users want to regularly interact with. :-/ Jan 27 06:00:34 linux users are used to its eccentricities is all I can offer alankila Jan 27 06:01:37 I just see it as a tremendous wasted opportunity. You are looking at a phone that is soon if not already the majority operating system on phones. And you have one obvious linux everyone installs, and then developers run into pages of instructions on how to get the SDK working that works out of the box on the competing operating systems. Jan 27 06:02:56 i dont see android as having a gentle learning curve Jan 27 06:03:16 "install 32-bit libraries" "write udev rules" "don't use the eclipse provided by the software installation facility built in the operating system". Jan 27 06:05:39 compared to "write android app" that seems quite simple Jan 27 06:06:07 maybe, but I still think that the complexity of the initial setup is an embarrassment Jan 27 06:06:47 I really dont see whats complex - its application development Jan 27 06:07:04 if it was easy it wouldnt be well paid Jan 27 06:07:37 you may be missing the point. Jan 27 06:07:46 We were talking about why linux is shit (on the desktop). Jan 27 06:08:11 for development? Jan 27 06:08:17 I'm offering the complexity of the initial setup of the android SDK to the point it actually works as a good example. Jan 27 06:09:08 if I'm developing a website whytf would I use windows? Jan 27 06:09:33 because the website will run on linux Jan 27 06:10:42 so - android development - what platform do all android phones (without exception) run on?/ yes you guessed it - linux Jan 27 06:10:43 I'm just saying that the ADT install story is a prime example where linux lacks, even when used for development purposes. Jan 27 06:11:32 alankila, dont use linux - but dont cuss it because you cant be bothered Jan 27 06:11:47 you are missing the point. Jan 27 06:11:48 I dont use linux cos its easy Jan 27 06:12:03 use it because its good and powerful Jan 27 06:12:15 I'm saying that this is objective evidence for lack of serious thinking about how using linux should appear to the masses. Jan 27 06:12:30 are you still arguing about os Jan 27 06:12:40 maybe you shou7ld beon the board on canonical Jan 27 06:13:25 perhaps. I'd be happy to use my iron fist to force a number of incredibly unpopular changes. Jan 27 06:13:41 pity nobody made me a dictator yet Jan 27 06:13:54 * aLearner is listening to the conversation Jan 27 06:14:04 sorry xorgate - I wanted to ask how to cater for both 2.2 and 4.0 - will I need 2 versions? Jan 27 06:14:22 define cater Jan 27 06:14:38 incompatible methods Jan 27 06:14:51 I want the app to at least work Jan 27 06:15:10 std0s: forward compatibility should be guaranteed Jan 27 06:15:10 make it for 2.2 it will work on 4.0 Jan 27 06:15:36 although networking on UI thread has started crashing since 3.0, there's some manifest attribute to disable that check though Jan 27 06:15:50 although i did run into some issues with my code running om 4.0 but romain said it's my own fault :) Jan 27 06:15:59 hmm, I'm using some deprecated methods Jan 27 06:16:08 I think they need attention Jan 27 06:17:03 anyway I need sleep Jan 27 06:18:17 alankila, just not returning and noticing the great platform war i missed! Jan 27 06:18:35 btw, I develop on Linux exclusively and I did not have any problem getting ADB to work! ;) Jan 27 06:19:04 RyanMcDonald: good for you. Not even an initial "adb kill-server; sudo adb shell" trick? :-p Jan 27 06:19:26 never. I run Gentoo Linux and adb worked right out of the gate. Jan 27 06:19:39 RyanMcDonald: I had trouble getting things to work on Ubuntu Jan 27 06:19:45 impressive. They must have added the required udev rules -- or you use your operating system as root. Jan 27 06:19:55 RyanMcDonald: But thanks to the kind people here things are now working with ADB Jan 27 06:20:08 my problem with linux is that you need to know a ton of stuff before you can do anything Jan 27 06:20:44 xorgate: which is why I think that the right way would be to just detect common things people do, like want to do android development, and run some python script that executes the 10 commands or so it takes to convert an ubuntu system to adt capable one Jan 27 06:20:45 xorgate, yea I guess. I use my Gentoo Linux desktop at work for everything. (I'm an IT director for a 200 employee outfit) Jan 27 06:21:18 i wouldnt dream of using Win or Mac personally. I work on them, but they will never be whats on MY desk Jan 27 06:21:32 like i installed ubuntu om my netbook and after a while i was presented with a blinking cursor and nothing else i mean come on Jan 27 06:21:52 xorgate: not even X? Jan 27 06:21:55 its free stop whinging Jan 27 06:22:11 alankila eh... idunno? :0 Jan 27 06:22:17 heh, okay. Jan 27 06:22:32 it's like it's trying to fight me Jan 27 06:22:43 good night folks. THANKS ALANKILA. I'm off to sign my code and upload the latest vers to the market. then bedtime Jan 27 06:22:45 i somehow managed to get an ndk project compiling Jan 27 06:23:13 It's interesting how divided people are here on Linux :-) Jan 27 06:23:44 well, I'm an old user... I used it for about a decade, then got thoroughly sick of it and tried to switch a windows and switched to os x Jan 27 06:23:49 I wouldn't say the setup was horrible even for a newbie like me -- it was scary -- disappointing -- but not bad at all! Jan 27 06:24:08 alankila: Well, that's a lot of time - 10 years! Jan 27 06:24:24 what made me lose faith was observing that linux doesn't really advance forwards. It seems to be stuck in continuous rewrite cycle of same old basic functionality, which never gets done right and therefore will be replaced forever Jan 27 06:25:28 I thinke jamie zawinsky called it "cascade of attention deficit teenagers" when he noticed that his bugreports are closed after the software components they govern get rewritten, but nobody actually tries to solve the bugs Jan 27 06:26:38 I'd like to have beautiful fonts so I've been paying some attention what happens on gamma correction front, and it seems to me that this will never get done either. Small handful of people understand the problem, but because the solution is not in their domain but requires changes in X, and nobody will make those changes in X, the problems never get solved. Jan 27 06:27:17 any ideas why showing an AlertDialog (every time i show it, i use an AlertDialog.Builder, since the message changes) shows it once for every time the dialog has run before? for example, runs 1 time, all is good, press Yes or No closes the dialog correctly. Second time, press Yes (or No, doesnt matter) and it closes one dialog but then there's one below it. Third time, there's 3 dialogs, and so on. Jan 27 06:27:46 any ideas why doing dialog.dismiss(); in the onClick handler of the positive/negative buttons doesn't destroy the dialogs? Jan 27 06:28:10 perhaps when finally there is no X, but all gets done in-process using opengl operations, the time will come when it's possible to fix the alphablending routine in a single toolkit and get beautiful fonts on linux. Or at least undo the core damage which currently breaks the possibility of having beautiful fonts. Then there's still the 10+ year of kludges to reverse which try to paper over more fundamental issues. Jan 27 06:33:02 alankila: Once I ge the tar.gz file I just uncompress it and install? Like an 'exe'? Jan 27 06:33:17 alankila: It took a while to download Eclipse... Jan 27 06:34:03 just uncompress it, it spits a directory, inside the directory is a file that is the primary launcher, run it Jan 27 06:35:01 does this make sense to anyone? here's the code that runs the dialog: http://codepad.org/DxdzidOS Jan 27 06:36:34 alankila: Ah -- OK got it. Thanks! Jan 27 06:42:25 Yuyo: i'm not sure what the problem is, but have you tried using 'cancel()' instead of 'dismiss()'? I'm not actually sure what the difference is, but it's worth a shot Jan 27 06:42:41 yeah, tried it.. same behavior Jan 27 06:44:52 i fixed it by only creating 1 instance of the dialog, and changing the message Jan 27 06:45:00 weird though Jan 27 06:45:07 is there a reason you're keeping a reference to it via the confirmDialog variable? Jan 27 06:45:42 i wasn't before.. but then i wanted to try just creating it once Jan 27 06:45:44 I unfortunately do not understand either. The dialogs I have constructed have behaved logically. I can only assume that multiple dialogs get constructed somehow Jan 27 06:46:44 alankila: You were dead right. I'm now installing ADT...The Eclipse that came with Ubuntu didn't allow for updates and didn't have ADT! Jan 27 06:46:46 i've always had issues with dialogs...not this particular issue unfortunately :P Jan 27 06:47:00 alankila: Interesting to note for a newbie! Jan 27 06:48:11 aLearner: it's the distro mentality, approximately the greatest single disastrous mistake they all make Jan 27 06:48:31 the notion being that they must package and provide a snapshot of the entire open source world on their mirrors Jan 27 06:48:57 alankila: So why disable updates? Jan 27 06:49:04 alankila: I don't follow that part Jan 27 06:49:09 and they have very strict rules to make this manageable, and they enforce them. If application can't be molded to fit, it's alright to break it, because this logic they have is apparently more important than the fact that the app would actually work Jan 27 06:49:46 alankila: All I can say is that I'm confused and don't understand the logic -- :-/ Jan 27 06:49:53 alankila, sounds like you had a negative experience Jan 27 06:49:54 maybe it's part of the reason why you can manage dialogs via the activity through the "showDialog" and "dissmissDialog" methods in the Activity class...something to do with the way dialogs are implmented? i really don't know Jan 27 06:49:57 aLearner: it's just the rules they follow. They don't think application can be allowed to update itself, or package its own libraries, or write files where they are convenient, they rather want to manage the updates, want to use one common set of libraries, and the files are stored according to their category all over the filesystem Jan 27 06:50:45 aLearner: it doesn't make sense. It is the distribution mentality, the notion of centralized package management. It works fine for some 99 % of software, but they don't recognize the 1 % of software which it fucks up royally, and unfortunately eclipse belongs to that 1 % set Jan 27 06:50:55 barbs, I would guess it the stack lifecycle Jan 27 06:50:57 they should have the honesty to admit that this will make eclipse suck and not package it Jan 27 06:51:34 browsers are another application that distributors are hell bent on breaking Jan 27 06:52:12 std0s: how do you mean? Jan 27 06:52:15 they REALLY hate this useless application which breaks their rules, so they are usually unable to for instance package any version of google's chrome without doing a significant effort of breaking it first. Jan 27 06:52:55 but here, imo, they do the right thing: for instance fedora has refused to package the open source chromium. Better not package it than to break it. Jan 27 06:53:23 something internal in the dialogue system you might need to override Jan 27 06:53:52 barbs: i thought those were deprecated Jan 27 06:53:58 alankila: OK. Thank you. That makes things clearer. Jan 27 06:54:02 before google's chrome was a problem, firefox was the issue. The trouble is that distros want to offer the same web browser binary for basically 5 years if they can, yet the web evolves rapidly and new versions of browser should be sent to the masses. That was very painful, they wanted to keep it in deep freeze mode and only accept security fixes, but mozilla wouldn't provide them Jan 27 06:54:10 big fight later, they now update firefox even if behavior changes due to update Jan 27 06:54:18 std0s: do you mean the activity stack in a task? or stack as in the memory allocation area? Jan 27 06:54:21 alankila, why are you spreading so much fud about linux? Jan 27 06:54:56 std0s: as I said, I'm an old user. I'm trying to illuminate the parts where it doesn't work, as aLearner for instance just found out that ubuntu-packaged eclipse is broken Jan 27 06:55:04 I'm now trying to illuminate the mindset that results in packaging broken software Jan 27 06:55:10 Woohoo! Now I have the Android SDK installed. Jan 27 06:55:18 the short of it is that distributions do not always make the right choices. Jan 27 06:55:25 I mean in an android context barbs Jan 27 06:56:00 alankila, if you've used linux before you know it always changes Jan 27 06:56:17 std0s: you are not reading what I say carefully enough to really understand what I'm trying to say, I think. Jan 27 06:56:22 You hate what I say, so you don't read it, I think. Jan 27 06:56:36 ubuntu is constantly changing, and frequently the updates rquire a reboot... which i thought for the most part was now unnecessary Jan 27 06:57:24 debian ended up with a big fight on mozilla and packaged their version of firefox as iceweasel. That story is another illuminating story about how distributions can sometimes do rather stupid things Jan 27 06:57:40 I see what you are saying alankila but the obstacles are worth the effort imho Jan 27 06:58:04 Yuyo: yeah they are...they tell you to use fragments instead, I'm just not as familiar with them >< Jan 27 06:58:19 the problem was that firefox used trademark rights to control how distributions were allowed to modify firefox, and to follow mozilla's model would have meant that you need to package firefox differently to all the other software. They rather packaged an iceweasel (which they have trouble maintaining) than firefox (which is what all users actually want) Jan 27 06:58:23 like, in the past i've used that showDialoag/dismissDialog system Jan 27 07:00:05 linux!=(debian || firefox/iceweacle||eclipse) Jan 27 07:01:55 can anyone tell me the name of an object... it's basically an opengl texture rectangle Jan 27 07:02:58 hello all Jan 27 07:03:27 anyone here played with the Tasks API? I looked at some sample code which woks but I'm curious why the clientID and client secret are not in the source... yet it still works. Only uses the API key. Jan 27 07:04:00 all of the official google tasks snippets looks like cilentid and secret are set but not in the other same activity provided by them on their api site. Jan 27 07:04:31 Hiraghm: GLSurfaceView? Jan 27 07:04:49 no, that's the canvas. Jan 27 07:04:55 basically Jan 27 07:05:08 There was some new 4.0 textured thing in that SDK, but I forget its name Jan 27 07:05:15 what I'm talking about is an opengl object that is just a texture rectangle. Jan 27 07:05:19 oh well, thanks :) Jan 27 07:05:49 TextureView maybe Jan 27 07:08:08 What's the naming convention for packages? com.mywebstite.myAppName? Jan 27 07:08:21 *com.myWebsite.myAppName? Jan 27 07:08:48 aLearner: you can, i typically do com.mydomain.android.appname just because i write other things besides android Jan 27 07:09:01 i.e. com.controlledsenility.android.myapp Jan 27 07:09:37 Quebez: I like that idea. Thank you so much Jan 27 07:09:55 Quebez: Thanks again for your help! Jan 27 07:10:08 np Jan 27 07:17:10 I think what I'm after is DrawTexture, but I'm not sure Jan 27 07:23:03 draw_texture.... I think that's what I'm looking for Jan 27 07:23:06 thx Jan 27 07:25:44 The emulator for HelloWorld seems to be taking forever to load Jan 27 07:26:36 Is that normal? I can hear my CPU going at it but it's been a few minutes and all I see is 'ANDROID_' on the screen Jan 27 07:26:58 This is the first time I'm running the emulator on Linux Jan 27 07:27:21 aLearner: What kind of a CPU do you have? Jan 27 07:27:32 I have a duo core 2.1 GHz Jan 27 07:27:35 I took a solid 5-6 minutes for my P4 1.9 to boot a emulator. Jan 27 07:27:43 It didn't used to take this much time in Windows? Jan 27 07:27:54 First time usually takes longer. Jan 27 07:28:08 de_jean_7777: Cool. Good to know. I'll be patient then Jan 27 07:28:17 de_jean_7777: Thanks for your help! Jan 27 07:28:22 no problem Jan 27 07:28:43 de_jean_7777: It's now showing 'ANDROID' with the light effects :-) Jan 27 07:28:51 de_jean_7777: Still no 'Hello World' though Jan 27 07:30:00 de_jean_7777: I see it now! Jan 27 07:30:07 Great. Jan 27 07:30:08 de_jean_7777: Woohoo! :-) Jan 27 07:31:58 Turns out with default android, its quite difficult to implement a nice swipe gesture view Jan 27 08:36:33 How can I disable a scrollview from being scrolled? Jan 27 08:45:18 How can I disable a scrollview from being scrolled? Jan 27 09:04:17 How can I disable a scrollview from being scrolled? Jan 27 09:07:23 myb people will answer if u ask agaibn Jan 27 09:59:25 Hello World! Jan 27 10:03:59 Quiet in here Jan 27 10:21:44 does anybody know where the new Gerrit is? Jan 27 10:22:10 the old https://review.source.android.com points to nowhere Jan 27 10:23:09 Hi guys, I use a framelayout to do some custom drawings, so I have the following main.xml: http://pastebin.com/7bih8VNV The problem is, FrameLayout is covering my TextView, I assume that's because I have Framelayout set as fill_parent for Height property. How can I get Framelayout below TextView without hardcoding height value (it should behave the same on different screensizes). Jan 27 10:23:27 marcreichelt, what's a Gerrit? Jan 27 10:24:00 did anyone get the Android Open Accessory to work on a Galaxy SII? Jan 27 10:24:43 marcreichelt: android-review.googlesource.com Jan 27 10:27:00 thanks romainguy_ :) Jan 27 10:29:04 by the way: I need assets in library projects, which currently is not supported by the framework. But I found that two patches are already submitted that should fix this problem: https://android-review.googlesource.com/#/c/24161/ and https://android-review.googlesource.com/#/c/24162/ Jan 27 10:30:44 Is there any way I can help these patches to be submitted? Or do I still need to wait? It's not good to see that the solution is *there* - but it's not reviewed yet (and the patches are more than half a year old)... :-/ Jan 27 10:31:09 the SDK team is working on it Jan 27 10:32:03 yay, that's good to hear :) Jan 27 10:37:46 anyone has used upnp on an android app? Jan 27 10:39:49 how can I add property of an element to fill up the space that's left over? When I do fill_parent it fills the complete parentlayout. Jan 27 10:43:25 Number5: what is the parent layout? Jan 27 10:43:50 RelativeLayout Jan 27 10:44:21 http://pastebin.com/7bih8VNV Jan 27 10:44:29 then align the right edge of the child with the right edge of the parent Jan 27 10:44:35 layout_alignParentRight="true" Jan 27 10:45:13 My temporary solution would be calculating the textview's height and set the height with theresult Jan 27 10:45:28 just align with the parent Jan 27 10:45:28 ok, i'll try Jan 27 10:47:35 romainguy, you mean like this: http://pastebin.com/MhpSxKef Jan 27 10:47:58 This doesn't change its behaviour, textview is still covered by framelayout Jan 27 10:48:23 you've set the framelayout's height to fill_parent Jan 27 10:48:23 so yes Jan 27 10:48:42 remove the layout_height for the framelayout Jan 27 10:48:49 and use alignParentBottom="true" Jan 27 10:48:59 ok Jan 27 10:51:55 romainguy_, in this case I still have to set width and height for framelayout as I use my custom draw to draw with widht and height of the parent (which is the relativelayout). So the suggestions you gave me won't do much as it already does if I just change its height with wrapcontent. Jan 27 10:52:16 relativelayout = framelayout Jan 27 10:52:45 no you don't have to set the width and height Jan 27 10:52:45 anyway, thank you fro your help. Jan 27 11:01:31 romainguy_, what I mean with setting width and height is when I draw a circle in my custom view, the size of the circle is based on the size I get from FrameLayout. If height of FrameLayout is small (because it's set to wrap_content) the circle will be small too. So I have to calculate screenheight - textview.height and than set FrameLayout height with the result, so my Circle is big enought (could also pass the height to circle, wo Jan 27 11:01:31 uld be the same). But thank you for your help. Jan 27 11:15:08 Hi Jan 27 11:15:24 could anyone point me where to get Tegra 2 250 AP20H bootloader docs ? Jan 27 11:15:37 bootleader/boot sequence Jan 27 11:44:52 who has Tegra 2 TRM ? Jan 27 11:51:32 I have a fragment that is only shown in portrait. However my activity tries to create it in portrait as the fragment is still in the back stack. How can I stop this behaviour? Jan 27 11:52:08 ideally I would remove it from the backstack in the on destroy but I get an error showing that I cannot do that after the onsavedstate has been called Jan 27 11:54:05 no ideas? Jan 27 11:55:25 i have a tablet which uses an internal sdcard to install android, 2.3.1 is already installed on it, i have removed that microsd card mounted it on my laptop and it shows that its a vfat type partition. Why is it that i'm not able to view any of the android OS files? Jan 27 12:59:37 Can anyone here explain why the call setBackgroundDrawable(gradiantBackColor); makes the onDraw method being stuck in a infinite draw loop? Jan 27 13:03:51 EvilBore: since changing the background will invalidate the view Jan 27 13:04:48 Ahh ok, so I should just move taht call outside the draw method, and it would be ok? Jan 27 13:06:37 Ahh, works perfectly. Thank you appel1 Jan 27 13:07:02 great! Jan 27 13:09:25 how can i avoid having ??????? as the serial number on my phone Jan 27 13:09:30 what did i need to start as root? Jan 27 13:18:48 especially-corn: you probably want to ask in #android-root ? Jan 27 13:19:01 i dont want to root my phone Jan 27 13:19:05 i want to make apps for my phone Jan 27 13:19:18 it didn't sound like that Jan 27 13:19:19 or at least try to make pointless text apps for a while Jan 27 13:19:29 especially-corn: Jan 27 13:19:37 i needed to start adb as root in order to get privileges Jan 27 13:19:44 http://developer.android.com/guide/developing/device.html Jan 27 13:20:00 Do the "Setting up a Device for Development" Part Jan 27 13:20:33 how do i get the abstract screensize (small, normal, large, xlarge) from code. is there anything like the displaymetrics for density that applies to screensizes? Jan 27 13:42:47 thanks DashCC Jan 27 13:47:40 no problem Jan 27 13:49:30 Hi, the method getFocusAreas() of Camera.Parameters - from which API level it is available? Jan 27 13:49:38 Is there some way to override the set density? I have some users having a 240x320-resolution, and mdpi, could I force ldpi for them? Jan 27 13:51:05 Bambr: http://developer.android.com/reference/android/hardware/Camera.Parameters.html just enable the API level filter and hover over getFocusAreas and it will tell you what level it was introduced in Jan 27 13:51:25 Bambr: change to API level 1 before hovering Jan 27 13:52:21 aspic: don't think so, it is something the device manufacturer sets I believe Jan 27 13:53:02 hmm.. Jan 27 13:53:40 appel1:thanks, is there any way to implement manual focusing for camera at API level 10? Jan 27 13:54:16 I want to have a certain view as an overlay above my other one, but animated.. the ViewFlipper doesnt seem to support that Jan 27 13:55:08 Bambr: I don't know Jan 27 13:56:57 aspic: with rooted devices though all bets are off since then things like that can be set to anything :\ Jan 27 13:57:06 Hi, does anyone know how to clear local storage from an android web browser? Jan 27 13:57:19 html5 localStorage Jan 27 13:57:34 > Jan 27 13:58:58 appel1: true. But this is kinda of a big problem, since the application will load resources from "the wrong" folder. :/ Jan 27 13:59:27 If people override this with rooted devices, they have themselves to thank =) Jan 27 14:00:16 [08:49:38] Is there some way to override the set density? I have some users having a 240x320-resolution, and mdpi, could I force ldpi for them? Jan 27 14:00:24 i think you're missing the point of density Jan 27 14:00:24 hi! I'm trying out development with android and I'm wondering what IDE u guys prefer. I know IntelliJ really well so if I'm not missing too much from Eclipse I want to go with that. any thoughts? Jan 27 14:00:26 aspic: unfortunately a lot of people don't realize that rooting and randomly changing stuff can break apps :\ Jan 27 14:00:40 canadiancow|work: yeah, could be. Jan 27 14:01:08 if the device is mdpi, you want to treat it as mdpi Jan 27 14:06:01 canadiancow|work: buut, lower resolutions and physical screen size makes the application load higher-res images? :/ Jan 27 14:06:26 Since the density becomes larger. Jan 27 14:06:49 err Jan 27 14:06:55 higher resolution for the same physical screen size Jan 27 14:07:08 like my phone is 1280x720, and my tablet is 1280x800 Jan 27 14:07:14 one is 4.65", one is 10.1" Jan 27 14:07:20 almost identical resolutions Jan 27 14:07:23 but very different densities Jan 27 14:26:11 canadiancow|work: hmm, so why don't my app scale correctly? For instance a 320x480 with mdpi shows nicely. But then a 240x320 with mdpi looks like crap. The button sizes are physical the same on my screen (when looking at the two emulators side by side). Jan 27 14:26:45 That's the point of dp units Jan 27 14:26:48 yea... Jan 27 14:26:52 :3 Jan 27 14:26:52 1dp is a PHYSICAL size Jan 27 14:26:55 its like 0.8mm Jan 27 14:27:00 i did the math once Jan 27 14:27:25 That's some big pixels Jan 27 14:27:35 0.15875mm Jan 27 14:27:36 whatever Jan 27 14:27:40 :p Jan 27 14:28:07 but yea, if you specify in dp, it will be the same physical size on any device Jan 27 14:28:27 aspic, 240x320 mdpi is a "small" device Jan 27 14:28:41 for what it's worth, our games explicitly dont support small devices Jan 27 14:28:59 but you could always do layout-small/whatever.xml Jan 27 14:29:28 canadiancow|work: yeah, but that would mess up the 240x320 with ldpi (which show fine) ? Jan 27 14:30:07 240x320 ldpi isn't small Jan 27 14:30:08 it's normal Jan 27 14:30:28 are there any *popular* devices with that ? :) Jan 27 14:30:31 aaaah Jan 27 14:30:32 http://developer.android.com/resources/dashboard/screens.html there are no small-mdpi devices :p Jan 27 14:30:37 http://developer.android.com/guide/practices/screens_support.html Jan 27 14:31:57 not true SimonVT, that's only devices that have accessed the market :P Jan 27 14:31:59 arg Jan 27 14:32:03 but you still hve a good point Jan 27 14:32:10 Is there a way I can actually overlay a view over a google map ? Jan 27 14:32:10 I see now. I misunderstood density completely. Jan 27 14:32:18 (or, did not understand) Jan 27 14:32:24 right now it just sits there burying everything under it Jan 27 14:32:47 Meh, canadiancow|work Jan 27 14:33:01 In my world there's only devices with market access :P Jan 27 14:33:01 co-worker: "You should reply and tell him 'you're very dense'" Jan 27 14:38:58 Is there any way of getting at the layoutResId of android.preference.Preference? I need to replace com.android.internal.R.layout.preference with something more than a ListView. (I want a PreferenceActivity in another view, and for it to inflate the hierarchy of preferences in that view instead of only showing the default ListView). Through PreferenceActivity I can get the PreferenceManager, but PreferenceManager.getPreferenceScreen is package-private. Preferenc Jan 27 14:41:14 Well, fuck. Was wondering why my project was so out of sync.. git said it was up to date.. Apparently I have two folders for the same project.. Loaded one in intellij, tried to git pull the other Jan 27 14:41:21 lol Jan 27 14:56:03 SimonVT: this must be the exception of the rule? http://www.gsmarena.com/sony_ericsson_xperia_x10_mini-3125.php Jan 27 14:56:15 (240 x 320 pixels, 2.55 inches (~157 ppi pixel density)) Jan 27 14:56:32 Seems to be a bit of a special case. Jan 27 14:56:34 That's mdpi Jan 27 14:56:57 hm Jan 27 14:57:01 Shit phone anyway :p Jan 27 14:57:16 wooord. Jan 27 14:59:31 you know the hardest part of development? Jan 27 14:59:35 naming things Color instead of Colour Jan 27 14:59:39 Neighbor instead of Neighbour Jan 27 14:59:45 Maybe they just put it in the normal bucket Jan 27 15:00:05 lawl Jan 27 15:00:10 I hate that extra u Jan 27 15:01:50 Hi Jan 27 15:02:02 someone please help me Jan 27 15:02:02 Phone Exclamation Point Computer :( < - I manage to get to download mode Jan 27 15:02:02 I downloaded a official fw from sammobile version 2.3.6 now when I try to flash with Odin Jan 27 15:02:02 http://pastie.org/3263665 Jan 27 15:15:51 any android audio people around? Jan 27 15:16:06 NDK and Audio stuff.. Jan 27 15:22:41 hello Jan 27 15:23:27 if you wanted to create tree widgets within a single horizontal layout, which had this type of alignment Jan 27 15:23:42 |xxxx yyyyy zzzzz| Jan 27 15:23:50 where the | are the sides of the screen Jan 27 15:24:04 how do you package a sqlite database in an apk and then use it as a database Jan 27 15:24:05 i thought you would just set gravity and alignment prefs Jan 27 15:24:12 just put it in assets and copy it to /databases ? Jan 27 15:24:18 yes Jan 27 15:24:23 that will work cow Jan 27 15:24:25 Yea, but you probably shouldn't :p Jan 27 15:24:40 the database in your apk is your template Jan 27 15:24:57 i want a dictionary Jan 27 15:24:59 schema and maybe some constant data. Jan 27 15:25:01 it doesnt change Jan 27 15:25:15 its how i do it. Jan 27 15:25:24 i'll get you a link, one se c Jan 27 15:25:42 http://www.codeproject.com/KB/android/AndroidSQLite.aspx Jan 27 15:25:47 I think it was pfn who made the point that you can't guarantee the phone can read it Jan 27 15:25:48 i used that guys work as a guide Jan 27 15:25:54 canadiancow|work: if it doesn't change... and is a dictionary... why not CDB? Jan 27 15:26:04 what's cdb? Jan 27 15:26:46 constant database, basically, a k/v store you compile and ship with your app as read-only Jan 27 15:27:06 http://cr.yp.to/cdb.html <-- you might need to look for java bindings or port Jan 27 15:27:28 http://www.strangegizmo.com/products/sg-cdb/ <--- pure java lib Jan 27 15:28:44 thanks i'll take a look Jan 27 15:28:53 canadiancow|work: did you look at that link i gave you? Jan 27 15:29:15 oh sorry i missed it Jan 27 15:29:25 scroll back Jan 27 15:29:37 ok that has nothing to do with m yquestion Jan 27 15:29:39 i used that guys guide to put a sql database in my app Jan 27 15:29:42 i know how tu se a db Jan 27 15:29:46 how to use* Jan 27 15:29:52 i have a db Jan 27 15:29:56 i want it pre-loaded in the app Jan 27 15:29:57 well it shows you how to put in your apk and then use it Jan 27 15:30:17 which is precisely what yo uwant Jan 27 15:30:26 where does it show how to put it in Jan 27 15:30:43 read it. its there. Jan 27 15:30:49 failed to copy '/dev/graphics/fb0' to 'fb0': Device or resource busy --- sigh Jan 27 15:31:26 i dont believe you Jan 27 15:31:54 lol, well i ignore you. i win. Jan 27 15:32:13 Uh, that link shows how to use SQLiteOpenHolper, nowhere does it show how to copy from assets ;/ Jan 27 15:32:17 Helper* Jan 27 15:35:47 p_l the license isnt exactly what we want Jan 27 15:35:49 :P Jan 27 15:36:35 canadiancow|work: what, BSD 3-clause? Jan 27 15:36:50 that's the one without advertisement requirement Jan 27 15:37:09 nearly the same as MIT in most countries Jan 27 15:37:45 my mistake, from code here is where I do the open of the readonly copy Jan 27 15:37:47 InputStream myInput = myContext.getAssets().open(DB_NAME); Jan 27 15:37:52 no it has the requirement Jan 27 15:37:59 you must reproduce the copyright notice Jan 27 15:38:13 and the open of the write for the readonly copy Jan 27 15:38:21 OutputStream myOutput = new FileOutputStream(outFileName); Jan 27 15:38:33 canadian: almost all open source licenses contain that clause Jan 27 15:38:38 canadiancow|work: you drop that at the end of any license agreement or whatever Jan 27 15:38:39 String outFileName = DB_PATH + DB_NAME; Jan 27 15:38:48 i guess Jan 27 15:38:51 i'll keep it in mind Jan 27 15:39:01 canadiancow|work: BSD4-clause required that to be included in much more materials, iirc Jan 27 15:39:15 then its just a loop reading/writing the readonly to writable copy Jan 27 15:39:15 im overriding onkeydown to handle an in activity event, when this activity opens a new intent, the back button press from that intent is additionally being fired in my override, why is it seeming to happen twice Jan 27 15:39:19 though even then Windows just drops it in readme.html on CD :) Jan 27 15:40:03 test Jan 27 15:40:27 can i just put a readme in the assets directory? :P Jan 27 15:41:05 :D Jan 27 15:41:53 anybody feel like doing some ndk work? Jan 27 15:42:07 canadiancow|work: Google+ puts that in Settings, in "About" section, after build version Jan 27 15:42:37 one of the licenses involved is BSD3 Jan 27 15:45:08 so if I use the ICS icons (like these: http://1.bp.blogspot.com/-sUzHJNpXDkw/TyGwS1y-asI/AAAAAAAABGc/5_dEJ8DfhCA/s400/icon_samples.png ), I have to distribute the apache license that's included with them, right? Jan 27 15:45:23 (inane question) Jan 27 15:45:27 possibly Jan 27 15:46:17 Or is it only if I modify them? Licenses, I dunno anything about 'em. Jan 27 15:49:45 Also, where would I go if I want to talk more about the source, and not so much application development? Jan 27 15:51:00 note to self: dont start working on a branch you haven't touched in a while without pulling from master Jan 27 15:51:27 shurane: are those not included as like android.R.drawable.whatever? Jan 27 15:51:34 join #hup.hu Jan 27 15:51:45 whoops haha Jan 27 15:51:52 shurane: supposedly #android was the place, but right now? I don't think there's any place, because a lot of questions will make people redirect you to to the dead place known as #android-root Jan 27 15:52:05 oh boy! dead channels Jan 27 15:52:38 I thought #android-root is for rooting/hacking/mods/ROM replacement stuff. Jan 27 15:52:45 Like #cyanogenmod, but more general Jan 27 15:53:33 shurane: yes. There's a lot of overlap of platform-level stuff with what is done in mods Jan 27 15:54:10 #android, last time I checked, ended up being a general chat with people mainly lacking clue Jan 27 16:49:13 hi Jan 27 16:55:14 Anyone familar with monkeyrunner? Am I not able to define other imports? 'import json', ImportError: No module named json Jan 27 16:59:59 Hi, when running new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/my/file.txt").mkdirs() from a test project, it fails. I have the WRITE_EXTERNAL_STORAGE permission. Any ideas why this isn't working? Jan 27 17:00:56 what is error message? Jan 27 17:01:15 btgw u know with this method, fdile.txt will be dirfectory? Jan 27 17:02:36 wraithguard01: uh Jan 27 17:02:41 and need check lot of status, extstorage can be not avaiable, junmounted, read only Jan 27 17:02:56 none, it just returns false, and then further calls fail Jan 27 17:03:02 wraithguard01: A) You should be doing new File(Environment.getExternalStorageDirectory(), "my/file.txt").mkdirs(); Jan 27 17:03:11 wraithguard01: B) I'm not sure what's going to happen with what you're doing Jan 27 17:03:23 ok, i'll redo Jan 27 17:03:32 Java's File class handles directory relationships nicely. Jan 27 17:03:39 don't fuck it up by insisting that you turn everything into a string Jan 27 17:03:43 that's a horrible antipattern Jan 27 17:04:09 if mkdirs fails, try to figure out why. Use the debugger, look at the absolute path that's present. Jan 27 17:04:17 and yeah Jan 27 17:04:24 mkdirs is going to try to make that file as a folder Jan 27 17:04:29 you should probably do Jan 27 17:05:09 File parent = new File(Environment.getExternalStorageDirectory(), "my"); if(!parent.exists()) parent.mkdirs(); File child = new File(parent, "file.txt"); Jan 27 17:06:25 Ok, I'll try that Jan 27 17:07:07 I wasn't actually aware of that constructor in File. TIL. Jan 27 17:07:15 huh, this is wierd. I have an app i'm writing, it's suppose to be an alarm clock. So I launch it when I go to sleep, it's got a wake lock so the phone stays on, but by the morning, it's not on the screen. No crash dialog, nothing. it's as if someone hit the back button. Jan 27 17:07:22 2 nights in a row now Jan 27 17:12:30 Wavesonics: you didn't ensure that it won't get killed... play with Alarm service or whatwasitsname? Jan 27 17:13:01 anyone here played with the Tasks API? I looked at some sample code which woks but I'm curious why the clientID and client secret are not in the source... yet it still works. Only uses the API key. Jan 27 17:13:09 p_l, why would it get killed, it's running on a Galaxy Nexus, plenty of RAM Jan 27 17:13:16 all of the official google tasks snippets looks like cilentid and secret are set but not in the other same activity provided by them on their api site. Jan 27 17:15:19 Wavesonics: doesn't matter, you need to use AlarmManager to avoid all of that Jan 27 17:16:40 this nomedia file doesn't seem to be working... Jan 27 17:16:44 Wavesonics: this will give you *reliable* wakeups, or at least as reliable as it can get Jan 27 17:18:07 p_l, interesting, So in addition to the Clock Activity, I have an Alarm Service, which starts sticky, and schedules the actual alarm via the AlarmManager Jan 27 17:18:33 Wavesonics: with AlarmManager you could get away with the sticky, I think Jan 27 17:21:46 it's difficult debugging something that happens in the middle of the night :P Jan 27 17:23:00 i guess i've never dealth w\ such a long running app, but i've actually never seen a foreground app killed like this b4 Jan 27 17:23:09 uh, its easy Jan 27 17:23:26 just set your system time to near midnight at a convenient time Jan 27 17:24:08 Ok, still can't get that working, but Environment.getExternalStorageState() is returning "mounted" Jan 27 17:24:15 usually its enough to just review the logcat from midnight Jan 27 17:24:27 pragma_, I don't think it's the explicit time, i think its the length of time its running for Jan 27 17:24:46 how long does logcat go back? Jan 27 17:25:10 as long as you have storage space Jan 27 17:26:49 pragma_, it must be capped @ something... Jan 27 17:28:46 adb logcat -g Jan 27 17:29:24 How long it goes back depends on what size the rom has set, and how much it's spammed Jan 27 17:31:17 Hey dudes. Jan 27 17:31:27 What version of Android started implementing multi-touch for pinch and zoom on maps? Jan 27 17:31:37 2.0/2.1 Jan 27 17:31:47 The convention has always been double-tap to zoom, but at what version did it become less of a convention? Jan 27 17:31:56 Fastest answer ever. Jan 27 17:32:04 Hello everyone, can anyone point me to an example of DataSetObserver used in a custom ListAdapter? A simple one would be great. Jan 27 17:32:09 I think it's still a convention, though Jan 27 17:32:17 Think it still makes sense to implement double-tap to zoom, even if you're targeting say... version 2.1? Jan 27 17:32:32 VonRath: definitely Jan 27 17:32:40 because pinching is sometimes annoying Jan 27 17:32:44 like one handed Jan 27 17:32:47 yep Jan 27 17:32:50 Thanks p_l! Jan 27 17:32:55 Yes, I agree. Jan 27 17:33:02 Trying to build a case at work for needing double-tap. Jan 27 17:33:05 You just made it. :) Jan 27 17:33:15 * p_l uses pinch... only in maps, and even then double-tap is my first go Jan 27 17:35:10 Ok, so I changed it to just write to the root of the external storage, and I get permission denied. So, that's obviously a more core problem. What would cause that? Jan 27 17:35:20 Where can I set the keystore file for my app to use in the emulator? Jan 27 17:35:56 nm i found it Jan 27 17:36:00 geestring: that's something that gets set at compile-time.. Jan 27 17:37:27 I created a keystore file myself Jan 27 17:38:02 I'm using the mapactivity, and it only works one emualtor. I think it's because the map api key is only associated with that particular key Jan 27 17:38:30 so I want all my emulators to use the same keystore, so I can use the map on every emulator Jan 27 17:44:35 geestring: keystores are used by your compiler instances, not your emulators Jan 27 17:44:36 You sign your app with the keystore when you build it Jan 27 17:44:50 so if you develop on more than one computer, you need to make sure that they use the same keystore Jan 27 17:44:54 if you have anything tied to the keystore Jan 27 17:44:58 you need to make sure you use the api key from the md5 fingerprint of the keystore you are using Jan 27 17:45:12 then it'll work on all emulators... as people have said, its app specific not emulator Jan 27 17:47:19 anyone here played with the Tasks API? I looked at some sample code which woks but I'm curious why the clientID and client secret are not in the source... yet it still works. Only uses the API key. Jan 27 17:48:13 specifically, I'm trying to understand this code: http://code.google.com/p/google-api-java-client/source/browse/tasks-android-sample/src/main/java/com/google/api/services/samples/tasks/android/TasksSample.java?repo=samples Jan 27 17:49:10 only real info in there is the API Key, but i thought for googleapi's you need API + clientID and client secret to do OAuth Jan 27 17:49:20 mmm taco Jan 27 17:49:21 Ok, I'm getting MapActivity couldn't get conenction factory client, with my emulators. Jan 27 17:49:41 geestring: i get that error all the time but my map still works Jan 27 17:49:50 i actually separated out my mapactivity into another process Jan 27 17:50:24 with the android:process directive in manifest for that activity Jan 27 17:51:27 sorry, what exactly does that do? Do I have to create a "process"? Jan 27 17:51:35 I've seen sampel apps do this, but I'm not sure what it does Jan 27 17:52:07 it launches the actiivty in a separate process outside of the app process Jan 27 17:52:26 i've heard its the way to prevent issues with maps in your app... its worked for me thus far Jan 27 17:52:54 what does I put as a process? Jan 27 17:53:13 anything you want the name to be: Jan 27 17:53:15 mine is... Jan 27 17:53:33 android:process="com.controlledsenility.android.myapp.mapproc" Jan 27 17:53:33 hey how can I make my app assume the behavoir of a desktop dock app? like how the home button takes you too that app untill its exited Jan 27 17:55:01 oh I thought it had to point somewhere. Jan 27 17:55:49 i registered a listener for desktop dock events Jan 27 17:56:00 so when youre debugging you can attach to that process specifically or have logcat show you info related to that activity by setting a filter Jan 27 17:56:18 im going through the ActionBarCompat sample to add in ActionBar support for pre-API 11 devices and i have targetSdkVersion set to 14 but when i compile i get no resource found that matches the given name 'android:style/Theme.Holo.Light' Jan 27 17:56:43 QubeZ, so when I'm about to build for marketplace I should create an api key for the keystore I'm going to use? Jan 27 17:57:48 geestring: for market, you 1) generate new keystore 2) use keytool to get the md5 keyprint 3) generate a new maps api key from that keystore 4) plug that into your mapview apiKey directive 5) build your new apk signed with your new keystore Jan 27 17:58:10 why do we even need the stupid maps api keys Jan 27 17:58:17 they stopped requiring them in the JS api ages ago Jan 27 17:59:26 Cus your face Jan 27 17:59:39 haha Jan 27 18:00:47 despite the lol value of http://www.youtube.com/watch?v=hV0qs1gz8mo , is that thing a sensible Android tablet to get for development? (for actual use I stick to my iPad, thanks;) Jan 27 18:00:59 (well, ask one's employer to get for oneself) Jan 27 18:01:32 tml_: Eee Pad was IMHO the best tablet of the original Honeycomb-on-Tegra2 generation Jan 27 18:01:54 oh, so it is obsolete already? Jan 27 18:02:49 tml_: no, but there's Prime coming out which has much more powerful hw (because Tegra2 was ... dissappointing) Jan 27 18:03:01 On January 27, 2012 we have launched a new feature in your Developer Console. Now you can view the user reviews filtered by the user's language, device, app version and star rating. The Developer Console will show this information about each review. You'll also be able to set up filters to view only the user reviews that meet the criteria you select. We hope you'll find this feature useful when in Jan 27 18:03:02 vestigating specific issues and making improvements to your apps. Jan 27 18:03:16 ok. maybe when that one is out (and available in EU), should hint that maybe I need actual hardware... Jan 27 18:06:02 If I make drawable-mdpi resources, when a user downloads the app, will they only download the mdpi resources? Jan 27 18:06:16 no Jan 27 18:06:25 you can, as part of your build, generate different apks for different configurations Jan 27 18:06:28 so an mdpi only build, etc Jan 27 18:06:28 Your apk is not modified by market Jan 27 18:06:29 Then why make mdpi resources, it would only make the app huge! Jan 27 18:06:33 ... Jan 27 18:06:36 lov Oh ok Jan 27 18:06:48 Awesome. Jan 27 18:06:49 because you can probably do a better job drawing your resources than the runtime can by just scaling them Jan 27 18:06:59 if you want to just dump a bunch of stuff into xhdpi go knock yourself out Jan 27 18:07:04 it'll look like garbage in mdpi but w/e Jan 27 18:07:06 Right right Jan 27 18:07:20 same thing for drawable-landscape, etc Jan 27 18:07:26 there's a lot of potential configurations Jan 27 18:07:58 I'm looking for a decent example that uses a vector graphic as an Image Map, using "Rectangle" coords to plot various points. Jan 27 18:08:16 Anyone see why maybe this layout is crashing the program? http://paste2.org/p/1885665 Jan 27 18:08:30 explodes: afaik recently you can make multiple APKs that will be served depending on the device Jan 27 18:08:51 Ok Jan 27 18:10:28 Seion: Look in logcat Jan 27 18:12:07 explodes: since images are dimension^2 size, only highest resolution size really matters. so i'd complain with mdpi devices downloading big resolutions, not the other way around Jan 27 18:12:34 Right, and that they would bad as well. Jan 27 18:13:07 Although my app already covers 71% of devices, those other 30% are still p significant Jan 27 18:13:18 explodes: hey it's up to you, you can make app download images from *your* server if you *want to* Jan 27 18:13:59 If it's really an issue, do as lov said. Make different apk's for the different configurations Jan 27 18:14:03 You CAN put multiple APK's in the market for the same app, but each with different target devices. Jan 27 18:17:04 hmm is there any way to set text indentation on wrapped text in a text view Jan 27 18:18:23 SimonVT where did you see the thing about filtering reviews Jan 27 18:18:30 canadiancow|work: Dev console Jan 27 18:18:33 How do i open up Android sample apps in Netbeans 7.1 with the nbAndroid plugin? There is no 'new project from existing source' option. Appears there's been a feature request for this for ~2 years... Jan 27 18:18:38 One of those messages in the top Jan 27 18:18:53 sand2silicon, I guess there's your answer :p Jan 27 18:19:20 You download intellij idea instead and use create from existing source Jan 27 18:19:21 pfn: makes me think there's a simple work-around I'm not finding. Jan 27 18:19:34 someone shold mention it in the bug report Jan 27 18:19:40 SimonVT: hahaha Jan 27 18:19:54 sand2silicon: installing intellij Jan 27 18:21:32 Any idea why i would get a: "error: device not found" even as root? (dev's listed under lsusb too) Jan 27 18:21:40 jasta: a new version of ffmpedg was released Jan 27 18:21:41 is logcat only part of the emulator or can I access that on my phone too Jan 27 18:21:59 thanks Jan 27 18:22:01 Seion, you can access it on your phone, I like using catlog Jan 27 18:22:07 Meh I'm also getting usb 1-7: usbfs: USBDEVFS_CONTROL failed cmd adb rqt 128 rq 6 len 256 ret -71 Jan 27 18:22:10 sigh Jan 27 18:22:10 since alogcat seems to drop messages (wtf) Jan 27 18:22:41 pfn: you sure it's not filtering? Jan 27 18:22:45 any tips how to configure eclipse the mouse pointer autofocus? Jan 27 18:22:45 you can put alogcat in filter mode Jan 27 18:23:01 Lars_G, yes, it's not filtering Jan 27 18:23:13 Lars_G, I think its parser isn't robust enough and fails to parse particular lines Jan 27 18:23:29 java.lang.IllegalStateException: Circular dependencies cannot exist in RelativeLayout Jan 27 18:23:36 alogcat seems to spam the log with GCs, which is kinda useless Jan 27 18:23:37 only thing I don't like about catlog is that it tries to kill its process everytime it starts Jan 27 18:23:39 Endless loop :P Jan 27 18:23:53 in the layout? Jan 27 18:23:55 and when it does that, it logs a useles exception Jan 27 18:24:18 hi, on new cm9 build for sgs2 i have no baseband anymore! Jan 27 18:24:22 Seion: You can't position a view relative to a view that's relative to the first view :p Jan 27 18:24:33 hmm, looks like there's no way to indent wrapped text, boo Jan 27 18:24:57 insert lots of spaces! Jan 27 18:25:09 if you can identify where the text will wrap, maybe Jan 27 18:25:25 I guess Icould extend textview with my own, possibly Jan 27 18:25:34 and override how it does text wrapping Jan 27 18:25:38 You just measure 1 char at a time, until it adds up to view width :p Jan 27 18:25:52 DocMAX: #cyanogenmod is → that way Jan 27 18:26:06 (or was that #cyanogen?) Jan 27 18:26:26 ok works now Jan 27 18:26:33 had to turn off phone Jan 27 18:26:39 and on again Jan 27 18:26:46 I wish I had an easy mapping to make use of symbols more Jan 27 18:28:20 wft? Jan 27 18:28:29 netsplit Jan 27 18:28:35 yarr. Jan 27 18:28:35 SimonVT: layout_alignParentLeft="true" <-- you mean the second set of these? Jan 27 18:29:59 anyone looked into self-hosting android? Jan 27 18:30:06 http://www.youtube.com/watch?v=kfVsfOSbJY0 Jan 27 18:30:09 jrr what? Jan 27 18:30:22 compile android dev tools to run *on android* Jan 27 18:30:37 that's not so interesting Jan 27 18:30:38 java would be a hurdle Jan 27 18:30:39 Seion: If view1 is positioned relative to view2, you can not position view2 relative to view1 Jan 27 18:30:44 Find where you're doing that, and stop doing that Jan 27 18:30:51 it'd be an interesting exercise, but not real practical Jan 27 18:31:01 SimonVT, sure you can!!!! Jan 27 18:31:14 because i want 1 beside 2 Jan 27 18:31:17 AND i want 2 beside 1 Jan 27 18:31:53 Zynga can Jan 27 18:31:54 TextView.java is 11592 lines of code Jan 27 18:31:56 awesome! Jan 27 18:32:22 jrr: I remember self hosting from my palm days. Jan 27 18:32:45 SimonVT: how so? Jan 27 18:32:51 jrr: I think someone did it Jan 27 18:33:01 there's terminal IDE Jan 27 18:33:06 jrr: for certain stuff the sl4a would suit you better Jan 27 18:33:07 but that's not completely "self-hosted" Jan 27 18:33:20 canadiancow|work: Special zynga case used for positioning listviews next to listviews inside scrollviews Jan 27 18:33:42 g00s: damn another one? didnt they just do 0.9? Jan 27 18:33:50 jasta: yeah Jan 27 18:33:56 lol SimonVT Jan 27 18:33:56 I think self hosted dev on android should be totally doabe. the cpu and system bellow is strong enough. what you'll probably hit against is flash space Jan 27 18:34:03 but you can work on sd with symlinks Jan 27 18:34:07 ffmpeg releases are pretty often... Jan 27 18:34:09 it was g00s: the changelog doesnt seem to affect me anyway this time Jan 27 18:34:35 Lars_G, not an issue on a phone like galaxy nexus or any of the tablets Jan 27 18:34:42 jasta: ok, cool. just thought i'd let you know Jan 27 18:34:55 thanks :) Jan 27 18:34:57 SimonVT: I think its like 39 55 Jan 27 18:35:02 :) Jan 27 18:35:02 39 through 55 Jan 27 18:37:27 Hi. Why won't eclipse not accept changes of id's in strings.xml, in my java activity? Jan 27 18:37:43 It might be me that is not fully understanding eclipse at this point Jan 27 18:38:08 rebuild R.java Jan 27 18:38:50 no one fully understands eclipse Jan 27 18:38:52 p_l, the one under the gen foldeR? Jan 27 18:38:58 :) Jan 27 18:39:01 its crappy but i just cant move away from it Jan 27 18:39:23 the first step is admitting you have a problem Jan 27 18:39:28 hehe Jan 27 18:39:28 p_l, how do I rebuild the R.java file? Jan 27 18:39:37 clean -> build Jan 27 18:40:28 hmm... I am not that familiar with eclipse... where should I put my cursor? Jan 27 18:40:29 Java makes me miss RAII Jan 27 18:40:44 Is RAII an language? Jan 27 18:40:44 nickoe: project -> clean then project -> build Jan 27 18:40:53 or if you have build automatically checked then it will do that after the clean Jan 27 18:41:17 nickoe, no, it's a common idiom in C++ http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization Jan 27 18:41:27 Ahh, thank you very much, that has been bugging me a lot. Jan 27 18:42:33 it's such a nice safe way of dealing with resources. Jan 27 18:42:54 when you don't have nice things like the (with-* ...) macros Jan 27 18:43:03 has anyone downloaded the new ics 4 icon pack ? Jan 27 18:43:11 when coupled with stack allocation, it's an exceptional way of handling complex things Jan 27 18:43:17 ics_icons.ai only seems to have one icon in it Jan 27 18:43:49 g00s: where can I get that? Jan 27 18:44:02 QubeZ: http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+blogspot%2FhsDu+%28Android+Developers+Blog%29 Jan 27 18:44:08 'search for 'they are here' Jan 27 18:45:15 i should have put http://android-developers.blogspot.com/2012/01/say-goodbye-to-menu-button.html Jan 27 18:45:31 Anybody know where I can hire somebody to photoshop me a few quick assets? Basically, I've got a simple gradient map pin that I need in a few different colors. Jan 27 18:46:07 Is there a good place to post simple things like this online and pay for them? Jan 27 18:46:16 (Please don't say TaskRabbit.) Jan 27 18:46:40 VonRath: you could do it in inkscape easily Jan 27 18:46:48 Wavesonics, I see Jan 27 18:46:52 VonRath: odesk.com, vworker, google for "freelancer job site" :) Jan 27 18:48:16 VonRath: anywhere but here Jan 27 18:48:20 amazon mechanical turk Jan 27 18:48:30 but that's a little too complicated for them maybe Jan 27 18:48:35 VonRath: bear in mind that you can create gradients programatically with android Jan 27 18:48:39 (can and in fact probably should) Jan 27 18:49:08 VonRath: http://developer.android.com/guide/topics/resources/drawable-resource.html#Shape Jan 27 18:49:11 take a look at that Jan 27 18:49:17 depending on how complex your needs are, that might be it Jan 27 18:52:08 anyone know what the difference between api-15 res/drawable/tab_bottom_left.xml and tab_bottom_right xml are ? Jan 27 18:52:19 i don't get the left/right thing, and the 9patches look identical Jan 27 18:52:29 There's probably a center as well Jan 27 18:53:11 anyone has android api reference chm offline? Jan 27 18:53:42 brainv: an offline searchable form of the docs would be great Jan 27 18:53:55 g00s, thanks Jan 27 18:53:57 my offline version has autocomplete in the search box, but thats it Jan 27 18:54:18 ok Jan 27 19:00:43 i can't wait for 4.0 to be >50% Jan 27 19:00:50 sick of all this legacy crap Jan 27 19:00:55 heh Jan 27 19:01:38 maybe xmas time this year ? Jan 27 19:01:51 thats probably optimistic Jan 27 19:02:09 well, most people buy phones on two year contracts Jan 27 19:02:42 i would imagine it would follow the adoption rate of gb Jan 27 19:03:27 well, a fair number of 2.3 phones will be upgraded to ics Jan 27 19:03:37 think so? Jan 27 19:03:38 so it doesn't require a phone upgrade Jan 27 19:03:54 jrr, of course, that's already been announced Jan 27 19:04:07 rezound, razr, droid4, sony's 2011 xperia line, etc. Jan 27 19:04:13 sgs2 Jan 27 19:04:47 Nearly 20% of my users are on 3.0+ Jan 27 19:04:59 i really wonder why the support library doesn't have _something_ to help with the action bar too Jan 27 19:05:06 20% of 5 isn't very many Jan 27 19:05:07 ;-) Jan 27 19:05:26 jasta, the answer is pretty simple there, for old versions, no actionbar, just menus Jan 27 19:05:28 Damn, it's my own phone then Jan 27 19:05:29 jasta: yes, its very frustrating (about the ab in the support library) Jan 27 19:05:35 pfn: yet it can be simulated very easily Jan 27 19:05:52 they even created the ActionBarCompat sample Jan 27 19:05:55 why not at least shove that code in there? Jan 27 19:05:58 that's also removes the impetus for mfr's to upgrade Jan 27 19:06:02 s/'s// Jan 27 19:06:14 Very frustrating that third parties supply pretty much complete ActionBar backports instead of Google, indeed Jan 27 19:06:33 pfn: oh come on, you dont believe that Jan 27 19:06:41 jasta, I do Jan 27 19:06:46 SimonVT, YES Jan 27 19:06:56 SimonVT, why isn't it part of the compat lib!! Jan 27 19:07:00 SimonVT: yeah, i very much want to convert to this paradigm, but technically i'm torn Jan 27 19:07:16 I was joking Jan 27 19:07:18 ActionBarSherlock is just not meeting my requirements. Jan 27 19:07:19 I don't see the issue Jan 27 19:07:19 jasta, it's worth it, and Actionbar Sherlock makes it easy Jan 27 19:07:29 ah crap Jan 27 19:07:39 SimonVT, well... you're wrong Jan 27 19:07:43 Wavesonics: it doesn't use a native implementation on ICS. Jan 27 19:07:55 Current version does Jan 27 19:07:59 ABS4 will as well Jan 27 19:08:05 jasta, huh... ya i thought it did Jan 27 19:08:09 no it doesn't, i talked to jake about this Jan 27 19:08:19 reguardless i'm using it to great success currently Jan 27 19:08:20 4.0-wip doesn't, yet Jan 27 19:08:35 on 4.0.2 back to 2.2 Jan 27 19:08:48 SimonVT: oh really? so the current released version supports it, but the wip stuff doesn't> Jan 27 19:08:52 right now, i'm using the approach iosched 2010 took which kinda sucks Jan 27 19:08:57 let me clarify, uses the native ICS impl? Jan 27 19:09:38 Yes, current release should, unless he only uses native on HC tablets, which doesn't make sense Jan 27 19:09:43 g00s, 2010 or 2011? Jan 27 19:09:53 SimonVT: i think that is the case, actually. the styling is slightly different. Jan 27 19:09:57 pfn: 2010. they did things a little differently in 2011 Jan 27 19:10:05 SimonVT, jasta, so the WIP version will not use native when its released? Jan 27 19:10:07 I see Jan 27 19:10:24 ABS4 will use native on 4.0+ Jan 27 19:10:34 ah ok, Jan 27 19:11:02 jasta: got a bug update for your adt issue :) looks like it will be fixed in adt 17 Jan 27 19:11:24 (library dependencies) Jan 27 19:11:54 http://techcrunch.com/2012/01/26/distimo-getting-featured-in-the-android-market-can-boost-apps-ranking-by-172-while-featured-828-after/ Jan 27 19:12:01 g00s: i saw that. Jan 27 19:12:04 very surprised, but happy Jan 27 19:12:10 :) Jan 27 19:12:11 Wavesonics: it will when it's finished, but currently does not Jan 27 19:12:20 (that's the plan i received from jake) Jan 27 19:12:30 jasta, got ya Jan 27 19:13:05 only a 172% jump? Jan 27 19:13:28 pfn: "Note that this report only looked at the top 100 most popular apps in any category – the gains in less popular apps could be quite different." Jan 27 19:13:38 so it;s about the effect on already popular apps Jan 27 19:13:46 romainguy__, indeed Jan 27 19:13:52 my concern with abs, is that at a technical level there are probably (correct me here) too many weird hacks to make things work, while at the community / project level there is not enough participation. i'm hesitant to rely on this library, and if things go wrong, you're pretty dependency on it Jan 27 19:13:54 * pfn doesn't have popular apps, phooey Jan 27 19:13:54 :p Jan 27 19:14:06 jasta: Just checked, current master does wrap native implementation on HC+, not just HC Jan 27 19:14:10 is this possible? position the TextView with value from accelerometer? Jan 27 19:14:15 g00s, it's open source if you want to continue working on it Jan 27 19:14:23 g00s, and best case, you can remove the library in 1 year Jan 27 19:14:27 worst-case, 3 Jan 27 19:14:29 pfn: yes i know that, but i don't have time to do that Jan 27 19:15:00 SimonVT: then something is wrong with the styling, because the light theme doesn't look right. Jan 27 19:15:47 It probably is, he uses custom attributes, I'd guess he proxies them to the native implementation as well Jan 27 19:16:14 And styling is probably based on HC light theme Jan 27 19:22:17 hmm, the gn spare battery+charger set is finally available Jan 27 19:22:23 but i only comes with the 1850 battery, meh Jan 27 19:23:21 pfn: sounds like the gn would really benefit from mr fusion Jan 27 19:23:38 certainly would Jan 27 19:24:13 mr plow, mr plow.. Jan 27 19:24:25 in HC/ICS, what's the thing called that shows the thumbnail of all your apps Jan 27 19:24:28 and you can swithc into them Jan 27 19:25:41 recent apps? Jan 27 19:26:18 The app switcher? Jan 27 19:26:23 someone called it the "alt-tab thing" Jan 27 19:27:34 has anyone had any luck getting a web server running on android? Jan 27 19:27:49 like what is the best way to push the HTML files to a client Jan 27 19:28:17 just curious I have something working I was seeing if someone else had a better way of doing it Jan 27 19:30:57 dantheman: ... what are you trying to do> Jan 27 19:30:58 ? Jan 27 19:31:27 push logs out via http Jan 27 19:31:34 I have something working Jan 27 19:31:47 but its a String that is basically HTML Jan 27 19:31:50 why does that involve running an HTTP server on android? Jan 27 19:31:58 because that is a requirement Jan 27 19:32:03 don't ask why Jan 27 19:32:07 .. wat Jan 27 19:32:27 i mean it works Jan 27 19:38:17 I'm firing off a startActivity() intent, and I only want it to start the activity if it is not currently running, so I added these two flags: Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP Jan 27 19:38:28 will that do it? or are they contraditory? Jan 27 19:39:17 hm, the adt xml formatter goof ups the formatting of some types of drawables Jan 27 19:39:25 *goofs up Jan 27 19:40:59 yeah it does Jan 27 19:41:19 layer lists inside selectors are broke as hell Jan 27 19:42:12 yeah, thats the one Jan 27 19:42:24 layer lists by themselves too Jan 27 19:43:02 dantheman ive written a server on android but it wasnt a web server Jan 27 19:43:32 I've actually have one written and it works I'm just trying to get it to load files instead of loading a string.. Jan 27 19:44:08 umm Jan 27 19:44:27 read the get request, find the file, open it? Jan 27 19:46:57 i guess i'm just dumb, but even after all this time i have a hard time looking at something like res/drawable/minitab_lt.xml selector and visualizing wtf this is going to look like Jan 27 19:47:30 the tooling definitely sucks around this area, imho Jan 27 19:47:43 previews would be nice Jan 27 19:47:51 yeah Jan 27 19:47:53 storkme: yeah it isn't that easy Jan 27 19:47:55 but ok Jan 27 19:48:08 i mean they render fine in the gui layout editor Jan 27 19:48:33 seems like itd be pretty trivial in comparison to rendering a whole layout Jan 27 19:52:44 dantheman maybe you should explain better what the issue is :] Jan 27 19:53:01 yeah im on a train so my net keeps cutting out Jan 27 19:53:07 there isn't an issue Jan 27 19:53:11 I have working code Jan 27 19:53:18 I wanted to see if there was another way of doing it Jan 27 19:53:30 idk Jan 27 19:53:44 oh Jan 27 19:53:58 another way of doing what Jan 27 19:54:08 another way of TAKING OVER THE WORLD Jan 27 19:54:34 ^^ Jan 27 19:54:55 in b4 android.conquer.skynet Jan 27 19:58:03 yer I'm gonna take over your bases by running a web server in the background of angry birds and use reverse DNS to put it on the web then dump your data Jan 27 19:58:52 well I mean dynamicDNS Jan 27 19:59:29 mother of god Jan 27 19:59:57 dantheman: I literally don't understand what you're asking Jan 27 20:00:01 especially the files vs string part Jan 27 20:00:10 you're trying to run an http server on the client device itself? Jan 27 20:00:15 you're not trying to connect to a remote server Jan 27 20:00:20 you're trying to run the server on your phone Jan 27 20:00:47 lov: yes Jan 27 20:00:54 welp Jan 27 20:00:57 ServerSocket Jan 27 20:00:59 glhf Jan 27 20:01:03 dur Jan 27 20:01:15 enjoy the carrier NATing your phone so youcan't get to it from the outside world anyway Jan 27 20:01:46 I'm just having an issue with my resource identifier Jan 27 20:01:55 lov: reverse proxy Jan 27 20:02:25 nothing is impossible Jan 27 20:03:24 I don't see what resources have to do with an http server at all Jan 27 20:04:00 um…the html file? Jan 27 20:04:02 come on now Jan 27 20:04:45 why does that need a web server? Jan 27 20:04:54 file:/// ? Jan 27 20:05:37 nevermind Jan 27 20:06:08 ... Jan 27 20:06:08 Sheesh, storkme Jan 27 20:06:11 Look what you did Jan 27 20:06:30 I can't wait to see the app he's going to release Jan 27 20:07:31 'load a file instead of a string' Jan 27 20:10:23 lo Jan 27 20:10:31 l Jan 27 20:10:32 I have an android/java app that is running from my android tablet that i'm trying to connect to a php script located on an apache server running from my desktop. Jan 27 20:10:43 does anyone know why I'm getting the exception "Error in http connection android.os.NetworkOnMainThreadException" Jan 27 20:10:51 I know that line 55 is causing it. But does my URL look right on line 53? http://pastebin.com/XJWiz0Tm Jan 27 20:10:54 You're doing networking on the main thread Jan 27 20:11:00 I am able to access the URL via my tablets browser Jan 27 20:11:02 Use an AsyncTask or a Thread Jan 27 20:11:18 don't do blocking I/O on your main thread Jan 27 20:11:26 okie, i'll google. thanks. Jan 27 20:11:35 that's a StrictMode complaint, fwiw Jan 27 20:11:43 if you're looking for google search terms :) Jan 27 20:12:05 thanks :) Jan 27 20:12:06 Just don't google how to turn it off Jan 27 20:12:10 lol Jan 27 20:12:13 ugh Jan 27 20:12:19 isn't the exception straightforward? Jan 27 20:13:03 yeah i guess so Jan 27 20:13:30 if i pull in an external swf does the app cache it? i've updated it on the server, but the app is still using the old version :( Jan 27 20:15:21 is there anything else you need to do (other than connect your android phone to your computer via usb) in order to debug an app? Jan 27 20:17:05 you have to actually build the app and all :) Jan 27 20:17:11 and run some sort of debugging tool; typically your IDE Jan 27 20:17:22 and enable USB debugging on the device Jan 27 20:17:31 but that's about it, yes Jan 27 20:17:46 how do i enable usb debugging? Jan 27 20:17:51 that must be what i'm missing Jan 27 20:18:59 Settings / Development settings Jan 27 20:19:01 or something like that Jan 27 20:19:18 is it possible to control the intensity of vibration? I only found android.os.Vibrator, where only patterns can be controlled Jan 27 20:19:27 Also you might have to install drivers for your phone Jan 27 20:19:33 ah, in ICS it's "Settings / Developer options" Jan 27 20:19:47 oh yeah you do need to install the SDK's "adb" support stuff Jan 27 20:19:54 sensille: nope Jan 27 20:20:16 :( thanks Jan 27 20:20:22 thanks ctate Jan 27 20:20:32 hiyas Jan 27 20:20:37 sensille: almost no devices have controllable intensity; the vibrators are typically just a tiny motor with an offset cam, and all the hardware can do is a binary on/off toggle. Jan 27 20:22:04 I have a galaxy s2, and have the strong feeling the device can control it and it is configurable via settings menu Jan 27 20:22:11 Just turn it on and off really fast! :p Jan 27 20:22:48 sensille: last time I looked, it wasn't there Jan 27 20:22:55 yes, you should be able to do some half-assed PWM Jan 27 20:23:08 also, different devices might have various non-standard extensions Jan 27 20:23:40 oh, you mean _really_ fast Jan 27 20:24:00 like sub-ms Jan 27 20:24:01 http://developer.android.com/reference/android/os/Vibrator.html Jan 27 20:27:33 Some roms e.g. Cyanogenmod have variable vibration settings in notifications for various apps. like multiple short, long vibrate, stuff like that. Jan 27 20:29:20 under settings/sound I can configure vibration intensity. and it really just feels like different intensities, not different patterns, not different speed (the frequency of the humming doesn't change) Jan 27 20:37:37 sensille: that is an OEM customization for that specific phone Jan 27 20:37:42 it's not part of the portable OS Jan 27 20:39:35 ah, ok Jan 27 20:43:27 Hello, I'm encountering some issues in the development of a custome adapter based on BaseAdapter: I'm trying to access a TextView resource in a layout for an AdapterArray , but I can't seem to get access to it Jan 27 20:43:44 Logcat complains that the resrouce cannot be found Jan 27 20:44:33 "Resource ID ..... type 0x12 is not valid" Jan 27 20:45:35 I'm trying to use a TextView resource that is contained inside a RelativeLayout Jan 27 20:46:25 which is saved as item_header.xml in the layout resource dir Jan 27 20:49:23 ctate have you played dream zoo? Jan 27 20:49:29 never heard of it Jan 27 20:49:45 https://market.android.com/details?id=com.zynga.dreamzoo Jan 27 20:49:46 i'm sure that is totally not what you wanted to hear Jan 27 20:49:52 meh i didnt work on it Jan 27 20:49:58 but its the first game like this that weve put out on android Jan 27 20:50:35 oh geez, wakelock permission? Jan 27 20:50:36 dudes Jan 27 20:50:38 just Jan 27 20:50:39 use Jan 27 20:50:39 the Jan 27 20:50:43 window flags Jan 27 20:51:39 im actually surprised at that Jan 27 20:51:50 Start at boot Jan 27 20:51:51 Nice Jan 27 20:51:55 shit Jan 27 20:52:00 maybe i shouldnt have linked that Jan 27 20:52:03 without giving it a review first Jan 27 20:52:04 lol Jan 27 20:52:12 :p Jan 27 20:52:43 You're in a dev channel, what did you expect :p Jan 27 20:52:52 i expected it to have reasonable permissions Jan 27 20:53:00 :D Jan 27 20:53:37 does it have gameplay? Jan 27 20:53:47 canadiancow|work: i had no idea you were still that naïve :) Jan 27 20:53:48 I'm suspicious of games like this Jan 27 20:53:53 It has a pretty giraffe Jan 27 20:54:08 ctate, well i know the guys who wrote it... Jan 27 20:54:09 like, tinytower and farmfille aren't games according to my definition Jan 27 20:54:14 they're grinds with slow art asset reveals Jan 27 20:54:28 *ville Jan 27 20:54:40 jrr: tbqh i'm expecting it to be "Zooville" and pay-to-play Jan 27 20:54:40 perhaps this is unfair of me Jan 27 20:54:55 that is a relatively charitable way of putting it Jan 27 20:55:04 the uncharitable way is to call them "skinnerboxes" Jan 27 20:55:25 i say this as someone who has spent a certain nontrivial amount of time on 'City of Wonder' fwiw Jan 27 20:55:26 never heard that Jan 27 20:55:36 http://en.wikipedia.org/wiki/Operant_conditioning_chamber Jan 27 20:56:10 ctate: BRILLIANT. Jan 27 20:56:17 this is a perfect analogy of these "games" Jan 27 20:57:01 ftr i think you have too narrow a definition of 'game' Jan 27 20:57:11 would it be possible for a user to read some System.out.println(); that i forgot to remove from the program? Jan 27 20:57:20 bluezone: Absolutely Jan 27 20:57:29 terrible Jan 27 20:57:31 lol Jan 27 20:57:40 if they're printing to logcat, which i believe is the case for apps Jan 27 20:57:53 the traditional way to make people play your games is to make them fun Jan 27 20:57:55 Is there an easy way to create a single pixel vertical line (as a separator) without using an image for a ListView row? Jan 27 20:57:59 if it shows up in the log, it's readable by apps on the device Jan 27 20:58:01 but we've learned recent that it's not the only way! Jan 27 20:58:37 ctate: i guess i should remove System.out.println(password); then haha Jan 27 20:58:46 indeed Jan 27 21:06:22 Am I doing something wrong? the repo init command at http://source.android.com/source/downloading.html is giving me 'fatal: branch 'stable' has not been signed'? Jan 27 21:10:42 does putting a paypal "donate" button in the app violate google TOS? Jan 27 21:11:08 bluezone: afaik no. Using it to unlock extra functionality would Jan 27 21:11:20 okay Jan 27 21:16:32 bluezone, could do the donate thing as an in-app purchase even Jan 27 21:16:42 Wavesonics: how? Jan 27 21:16:52 oh Jan 27 21:16:53 hmm Jan 27 21:17:51 bluezone, http://developer.android.com/guide/market/billing/billing_overview.html Jan 27 21:22:11 whats honeycomb ? Jan 27 21:22:11 what do you guys think is the easiest way to make tabs like http://developer.android.com/design/building-blocks/tabs.html in froyo ? Jan 27 21:22:33 i already know about abs ;) Jan 27 21:24:36 I'm very confused. why would json think that my String result has a Boolean value of true in it? line 88 is throwing an exception because of this Jan 27 21:24:38 http://pastebin.com/U8XZ0m19 Jan 27 21:25:32 *sorry line 85 Jan 27 21:25:39 g00s, which tabs? Jan 27 21:25:46 the market tabs or the ics tabs? Jan 27 21:26:01 g00s, steal the tab_indicator_holo drawables from ics, and then use them in your own project Jan 27 21:26:13 pfn: yeah, the ones in the fixed tab section Jan 27 21:26:36 TextViews in a LinearLayout Jan 27 21:26:36 g00s, yeah, just grab tab_indicator_holo and all of the associated resources from aosp Jan 27 21:26:41 what are the smallest devices' screen sizes? Jan 27 21:26:43 k,thx Jan 27 21:26:53 xertoz, qvga on 2.x"? Jan 27 21:27:02 I'm trying to figure out which android phone to get with a small screen as possibly, basically :p Jan 27 21:27:21 interesting, why? Jan 27 21:27:23 for testing? Jan 27 21:27:36 testing, development of online features Jan 27 21:27:54 so what I want is as cheap as possible, as small screen as possible with 2.3+ Jan 27 21:28:37 definitely won't find anything small with >2.3 Jan 27 21:28:56 as that means 3.x or 4, which is solely tablets and newest nexus Jan 27 21:29:16 2.3+ as in 2.3 and above Jan 27 21:29:29 smallest one I find is a htc chacha on 2.6" Jan 27 21:29:57 neato Jan 27 21:29:57 but that takes the keyboard off the screen and stuff Jan 27 21:30:06 hvga Jan 27 21:30:18 what? Jan 27 21:30:18 might be able to enable on-screen keybd Jan 27 21:30:26 half vga 480x320 Jan 27 21:30:54 lol that's one of the ones with a facebook button Jan 27 21:31:43 how many phones lack a front facing camera btw? Jan 27 21:31:56 yum, new git build for mac ;) Jan 27 21:32:13 g00s: that's just. wrong. Jan 27 21:32:27 xertoz: Most of them Jan 27 21:32:40 this doesn't make any sense. how could toString every return a Boolean Jan 27 21:33:23 erebel55: because it doesn't? Jan 27 21:33:29 erebel55: huh? Jan 27 21:33:49 g00s: (yum is a linux package manager) Jan 27 21:34:29 exactly :S my compiler thinks it is..unless there is something i'm missing Jan 27 21:34:45 erebel55: awesome bug report. Jan 27 21:34:49 How about you give us the exact error? Jan 27 21:35:43 No user found org.json.JSONException: Value true of type java.lang.Boolean cannot be converted to JSONArray Jan 27 21:35:59 this is a compile time or a run time exception? Jan 27 21:36:05 give us the exact lines too please Jan 27 21:36:10 http://pastebin.com/U8XZ0m19 Jan 27 21:36:19 line 85 is throwing that exception Jan 27 21:36:29 and it's at run time Jan 27 21:36:44 .... Jan 27 21:36:48 what is the content of "result" Jan 27 21:36:49 (check) Jan 27 21:37:06 JSONArray throws the exception if it isn't a valid JSONArray Jan 27 21:37:09 $5 says that it's not what you think it is. Jan 27 21:37:16 Make sure it isn't a json object either. Jan 27 21:37:21 i wrote it out in log and it says the content is true Jan 27 21:37:29 .... Jan 27 21:37:38 lawl ;O Jan 27 21:37:43 That's a boolean, dawg Jan 27 21:37:44 erebel55: is the content a valid JSON Jan 27 21:37:48 here's what you do. Jan 27 21:37:52 you attach the debugger Jan 27 21:37:55 and you step through your code Jan 27 21:37:58 and you see what you're actually getting back Jan 27 21:38:02 erebel55: plug the output in here http://jsonlint.com/ Jan 27 21:38:10 anyone here used AccountManager and OAuth? Is the only difference is that AccountManager uses the project API key and thus is limited for queries per day (say to GTasks API) vs OAuth being user specific and wont count against your daily totals? Jan 27 21:38:18 oh ahahahaha Jan 27 21:38:19 found it Jan 27 21:38:20 sBuilder.append(reader.readLine() != "\n"); Jan 27 21:38:21 boy Jan 27 21:38:24 wonder what that did Jan 27 21:38:31 MYSTERY SOLVED. Jan 27 21:38:35 lulz Jan 27 21:39:18 There's your problem :p Jan 27 21:39:20 >_< woops Jan 27 21:39:22 lol Jan 27 21:39:55 thanks for spotting that. sorry for noobing it. Jan 27 21:42:42 i've spent the last month trying to make my app look nice on froyo <--> ics, and this whole experience has absolutely fucking sucked Jan 27 21:43:56 i'd like to see google take one of their apps like maps or market, which seems to look nice everywhere, and disect the techniques they used to do so Jan 27 21:44:14 i know there is stuff scattered in blogs and google+, but even together, they don't go far enough Jan 27 21:44:25 g00s: have dedicated UI/UX designers Jan 27 21:45:00 Use custom views Jan 27 21:49:30 Hello, I want to add a chars layout to HTC IME keyboard, I'm using android Froyo, How can I do that? Jan 27 21:50:41 soomsoom: #android-root Jan 27 21:50:43 not here. Jan 27 22:05:57 does anyone happen to know if there's a max limit on the size of a sql query? Jan 27 22:06:16 42 Jan 27 22:06:22 so if aosp compiling has been hanging for the last 30 minutes, does that mean it's still going on or is there some serious bug? I'm not getting any feedback :( Jan 27 22:06:23 (i mean the literal string that eventually gets passed to sqlite, e.g. "delete from records where id in (huge,list,here...)") Jan 27 22:06:30 42?! what a coincidence! Jan 27 22:06:35 :3 Jan 27 22:06:35 varchar(255)! Jan 27 22:08:45 It'll take a long time, shurane :p Jan 27 22:09:33 And i'm only doing make -j4. My coworker gets a lot faster -- or hits errors a lot faster -- with his make -j8 and his shiny new imac Jan 27 22:13:39 alas, oh well. Jan 27 22:13:39 When syncing with say Google Tasks, is a Service preferred that runs at some interval or is it better to upstream/downstream update based on entering/exiting an activity? Jan 27 22:13:55 meaning, say user gets into Activity A, it populates new or updates existing tasks Jan 27 22:14:01 QubeZ: what about a mix of both? Jan 27 22:14:27 shurane: so I'd need to write and register a service then? Jan 27 22:14:46 i've never written an Android service, just getting into this now because of gtasks syncing with my app Jan 27 22:15:11 Twitter has a cool way to refresh updates using 'pull-to-refresh'. look it up. Jan 27 22:15:19 But I'm not suggesting anything. Jan 27 22:15:29 yea i've seen that in Facebook app too Jan 27 22:15:44 Only really works well for timeline kinda content Jan 27 22:16:26 in my case, i have a list of tasks in listview... im just trying to figure out what mix (service, activity entry) to use and how to best design this sync with gtasks Jan 27 22:16:51 right now i've got an activity setup that pulls my gtasks and also inserts it into my main db table so its in my other activity... now looking at next steps Jan 27 22:18:50 Unless you need notifications or something when not in the app, just sync when the activity is entered Jan 27 22:19:12 sounds good Jan 27 22:19:26 maybe later i can break out into a service but want to keep it simple and working right now Jan 27 22:19:39 as i learn more, i can make better design decisions Jan 27 22:19:58 QubeZ: if you are inserting into a db from an activity, i would recommend a service anyhow :) Jan 27 22:20:08 Can still use a service even though you only refresh when in Activity Jan 27 22:20:14 since you would not be doing it on the main thread :D Jan 27 22:20:23 And maybe a CursorLoader to get notified Jan 27 22:20:46 g00s: but if I launh ASyncTask, that's still off the thread right? Jan 27 22:20:51 or you mean when the actual db is inserted? Jan 27 22:22:54 g00s: so I should write service to always stay in sync, maybe every couple of hours based on the user preference ... this would be downstream and upstream updates then also update downstream / upstream when user enters an activity so they have the latest info as the enter it while the updates are still hapenning in the bg while they are out of the app? Jan 27 22:23:00 like shurane said, a mix Jan 27 22:23:24 QubeZ: You can start the service when you enter your activity Jan 27 22:23:30 Maybe use an IntentService Jan 27 22:23:47 Send intent, let it sync, CursorLoader in Activity Jan 27 22:23:48 ok but when they exit the activity and app, what happens to the service? Jan 27 22:23:54 let's say i want to keep it running Jan 27 22:24:04 IntentService gets killed when it finishes handling the intent Jan 27 22:24:30 ya figured, so i'd need two? IntentService and Service? Jan 27 22:24:31 QubeZ: check out the sample sync adapter in the demos Jan 27 22:24:38 Why do you want to keep it running? Jan 27 22:24:43 http://developer.android.com/resources/samples/SampleSyncAdapter/src/com/example/android/samplesync/syncadapter/SyncService.html Jan 27 22:24:58 also, whats the difference between IntentService and me just making an ASyncTask to lauch in the bg to update the listview based on insert/delete from DB during sync? Jan 27 22:28:30 For this, I guess there would be no difference. It's just convenient. Fire and forget Jan 27 22:29:15 SimonVT: I'd like to keep it running because let's say a user goes onto gmail and goes into their tasks and updates a due date/time for one of their tasks. I'd like to have that updated if they are not my application. Jan 27 22:30:00 since my app is going to set a reminder or update a reminder, it needs to know this information to update the reminder/notification time Jan 27 22:30:30 Schedule sync interval with AlarmManager Jan 27 22:30:50 Have it start your IntentService Jan 27 22:31:40 so AlarmManager will keep querying my DB and update alarms based on any data changed? Jan 27 22:32:05 im also interested in inserting tasks as users enter new tasks online while outside the app... for this, i see no way around using an actual Service Jan 27 22:32:09 You can use AlarmManager to schedule a task every X minutes/hours/whatever Jan 27 22:32:41 ahh ok use alarmmanager to fire my intentservice every x hours Jan 27 22:32:44 got it Jan 27 22:35:02 Can I add the optional featured image later if I don't do so when I first submit? Jan 27 22:35:11 yes Jan 27 22:35:23 cool thanks Jan 27 22:35:43 SimonVT: would this work... user enters the application and sets a preference to sync gtasks every 3 hours lets say. I then register with AlarmManager to fire my IntentService every 3 hours which will sync alarms/reminders from my DB and also insert new tasks from gtasks directly into the DB? Jan 27 22:36:00 Sure Jan 27 22:36:28 ok i'll go down that road... thanks Jan 27 22:40:47 Is it just me or is the default res for the ice cream sandwich emulator not a perfect 480x800? Jan 27 22:42:01 hello Jan 27 22:42:42 geestring: the 480x800 includes the system UI bar Jan 27 22:42:46 geestring: Did you count them? Jan 27 22:43:27 the tabs at http://developer.android.com/design/building-blocks/tabs.html have divider's, yet i can't find a call to setDividerDrawable anywhere. anyone know where this little divider is coming from ? Jan 27 22:44:16 QubeZ: NB: service alarms don't automatically get wakelocks held for you during startup; only broadcast alarms do. Jan 27 22:45:07 so if I register an alarm via a service, the alarm may not fire? Jan 27 22:46:11 ctate: I'm basically trying to get to... how do I design my application to sync with gtasks whether user is in or out of the activity. When the user manipulates the task in my app, I can handle this by doing the update right there on the spot. But getting new tasks from gtasks and setting alarms is my main concern. Jan 27 22:46:44 g00s: The divider is from linearlayout Jan 27 22:47:12 SimonVT: O.o ? Jan 27 22:47:25 api11+ Jan 27 22:48:13 QubeZ: you definitely want to run the sync from a service Jan 27 22:48:37 if you want this to happen while the phone is in someone's pocket, then you need to be aware of wakelocks and their proper use Jan 27 22:48:44 SimonVT: oh, i see ... but why would there be linearlayouts in the tab indicators? they are just text views i think Jan 27 22:49:03 g00s: The parent viewgroup Jan 27 22:49:08 is the tabwidget using them ? Jan 27 22:49:26 is the new android os's faster for the older tablets ? Jan 27 22:49:32 ctate: so I have to get the wakelock myself? Essentially, phone is in user's pocket and new gtask task comes inbound from service. I grab a wakelock then set the alarm all from the service? Jan 27 22:50:06 when a broadcast alarm is sent by the Alarm Manager, a wakelock is held on your behalf for the duration of your onReceive() method's execution Jan 27 22:50:22 so you know you're going to keep running at least until you return from onReceive() Jan 27 22:50:47 what people typically do is take that opportunity to acquire their *own* wakelock in onReceive(), and then start the service to do the real work Jan 27 22:51:11 then don't release the wakelock from onReceive() -- hand off ownership of the wakelock to the service, and don't release it until the service's work is complete Jan 27 22:51:40 so my onReceive would simply be 1) acquire wakelock 2) fire my service to get new tasks into the DB and register for alarms Jan 27 22:51:46 g00s: Well, it extends from LinearLayout Jan 27 22:51:50 basically a bootstrap Jan 27 22:52:15 not sure why i need the broadcast receiver... guessing its for when the phone is rebooted just to get the service to run right? Jan 27 22:52:42 g00s: do you want style="?android:attr/buttonBarStyle" on the layout being used as the button bar? Jan 27 22:53:14 * ctate can't remember how exactly this works Jan 27 22:58:20 ctate: hmm, maybe, i'll look. thanks Jan 27 22:59:10 wow, so thats cool that LL has those divider thingies Jan 27 22:59:22 i have been making 1px views :( Jan 27 23:03:15 ctate, has anyone written documentation on how and works in-depth? Jan 27 23:05:06 erm. what you see is what you [currently] get, i believe Jan 27 23:05:33 yeah, i always find that stuff confusing. i wind up about 2 levels down in the rabbit hole and get confused Jan 27 23:06:29 ctate, indeed, i.e. no real documentation Jan 27 23:06:37 R.attr is the only thing I'm really vague on Jan 27 23:06:42 g00s: here's how a static button bar is done for one of the simple bits of ICS Jan 27 23:06:43 http://pastebin.com/xtEnHnvC Jan 27 23:06:52 pfn, easiest is to just find an example where Jan 27 23:06:56 g00s, so, published yet? Jan 27 23:07:03 SimonVT, I know, I use it, I still don't understand it :p Jan 27 23:07:08 and then the buttons themselves just have: style="?android:attr/buttonBarButtonStyle" Jan 27 23:07:10 unless I'm looking at it all the time Jan 27 23:08:22 Ok, I'm trying to share screenshots, the screenshots are perfectly valid (they share with bluetooth using this intent: http://pastie.org/3266289 ) but the image doesnt share with email or facebook, what gives bro Jan 27 23:08:49 g00s: in this particular activity, the button bar is along the bottom of the activity Jan 27 23:09:31 When sharing with twitter, it says "Image could not be loaded" Jan 27 23:10:31 pfn, not something I can remember off the top of my head either, but it's rather simple to use :p Jan 27 23:11:29 thanks ctate Jan 27 23:12:05 pfn: no :( i was about to release when google put out their new design guidelines, and i wanted to use as much as possible even though my app targets froyo Jan 27 23:12:20 so i had to make a few tweaks, not many, since there is not all that much i can do Jan 27 23:12:21 Does it have something to do with "Intent.FLAG_GRANT_READ_URI_PERMISSION" that the next activity cannot read from my packages cache?? Jan 27 23:12:31 But Bluetooth sure can... Jan 27 23:13:23 g00s: Froyo? ::sob:: Jan 27 23:13:32 ::sob:: indeed Jan 27 23:13:51 but thats what my phone is, and i need it since the app uses bt (so can't really use the emu) Jan 27 23:15:03 actually, its not that hard to look nice. i re-authored all of my icons as monochromatic front facing , they look very ics - ish Jan 27 23:15:10 g00s, man, taking quite some time eh Jan 27 23:15:24 they are all svgs, and my build system rasterizes them for all dpis Jan 27 23:16:17 g00s, fancy, what tool are you using to rasterize? Jan 27 23:16:27 pfn: build system just calls inkscape Jan 27 23:16:49 I see Jan 27 23:17:10 you just give an object an id, and you can tell inkscape to rasterize that object Jan 27 23:17:24 neat Jan 27 23:17:34 without showing the ui of course ;) Jan 27 23:17:46 * pfn had problems with an older version of inkscape not rasterizing and saving with a transparent background properly Jan 27 23:17:57 * pfn installs inkscape on his vm Jan 27 23:18:08 i didn't have that with 48.1 or 48.2 Jan 27 23:18:34 ctate: going back to the topic of service for a minute. I already have a broadcast receiver setup to run when phone reboots to reinstate the alarms. Can I just launch my service from there instead of using another receiver? Jan 27 23:18:47 absolutely Jan 27 23:19:00 just remember what i said about wakelocks :) Jan 27 23:19:10 cool, so now im going to watch the Markana tutorial on service then look at some examples + wakelocks Jan 27 23:19:20 does ics fix that old wakelock handoff thing ? Jan 27 23:19:21 your service *will not run* when the phone is asleep unless you take explicit action to cause that Jan 27 23:19:26 g00s: nope Jan 27 23:19:30 it's on my list; i hate that shit. Jan 27 23:19:36 indeed Jan 27 23:19:55 IMO service alarms shoudl hold the wakelock for you until onStartCommand() or whatever returns. Jan 27 23:21:06 there are a lot of edge cases involved around various sorts of failures etc, which is why it hasn't happened yet, but as i said it's on the list :) Jan 27 23:21:42 http://i.imgur.com/3yDQZ.jpg this looks rather tasty Jan 27 23:22:02 dunno about tasty, but kinda neat Jan 27 23:22:35 needs baco Jan 27 23:22:37 *bacon Jan 27 23:22:42 yes, needs bacon Jan 27 23:22:56 thats the answer to everything Jan 27 23:23:10 Bacon and ketchup Jan 27 23:23:17 i remember on that shark tv show where people invest in ideas... this guy had a bacon alarm clock Jan 27 23:23:28 cooked bacon for you when the alarm went off so you could wake up to it Jan 27 23:23:32 didnt go off to well Jan 27 23:23:44 you know that if aliens visited our world, it would not be for our resources - they would be after our bacon Jan 27 23:23:58 bacon is our resource Jan 27 23:24:12 well I'm Muslim, I dont eat bacon but still find it amusing Jan 27 23:24:19 :) Jan 27 23:29:36 anyone happen to know why an automatically generated textView would have commas at random places (even though i'm not explicitly telling it to put them) Jan 27 23:31:12 hmm i think i know why Jan 27 23:54:41 android:shape="line" for can only do a horizontal line ? wtf Jan 27 23:57:16 is a shape drawable less efficient than a 9-patch png as a drawable somehow ? Jan 27 23:57:29 * g00s is terrible at 9patches Jan 27 23:59:52 ctate, hmm, is there a place to store feature.xml files aside from /system/etc? Jan 28 00:00:12 /system/etc/permissions/ Jan 28 00:00:41 does anyone know if there is a way for an app to have a file that only it can edit, even if the user has root access? Jan 28 00:00:53 Amphoras, no Jan 28 00:01:08 Sure, just dont keep it on the device Jan 28 00:01:17 pfn: thought so, just wanted to check thanks Jan 28 00:02:07 tbh actually, for what i'm thinking if someone wants to go to that effort then the app wouldnt help much anyway Jan 28 00:02:24 what's the app doing? Jan 28 00:03:44 pfn: to hide the su binary and app, and have a password to put it back again so you could restrict root access even more Jan 28 00:04:20 well, if you hide the su executable then root access is effectively blocked Jan 28 00:05:56 yeah, i was thinking that the password would have to be stored somewhere and someone could edit it, but they would have to do that before it was hidden so it would be a bit pointless Jan 28 00:06:32 so its probably not really a problem Jan 28 00:08:26 Quick question, if i wanted to change ASCII decimal values to chars in xml, how would I do it? did a little bit of searching and couldn't find anything Jan 28 00:16:38 Hey, will this span open an intent whenever it's clicked: http://pastebin.com/d3MAnUYA Jan 28 00:17:12 Hiyer Jan 28 00:17:51 Whats the quick way to send an int to a handler thread? is it setData(int x)? Jan 28 00:18:14 (If it doesn't, how can I finagle it to?) Jan 28 00:24:14 The_Fred: overnight mail Jan 28 00:24:49 how can i change decimal values into chars in xml Jan 28 00:25:22 g00s, nope - ive found what i needed after chasing a tangent of SO posts Jan 28 00:26:22 The_Fred: why are you using a Handler instead of all the methods that ASyncTask provides you? Jan 28 00:26:46 because a handler is all i need for now Jan 28 00:27:00 can no one help me?!?! :'( Jan 28 00:29:04 Zacharias3690, write the string values to a text file? Jan 28 00:33:12 i have a SurfaceView attached to a Camera instance, and like every other naive camera implementer out there, i'm struggling with rotating the camera's preview image 90*. is there actually a way to rotate the preview, instead of redesigning my activity to actually-be-landscape-and-just-look-like-portrait? i have to imagine there's some way to just attach a rotation matrix to the surface. Jan 28 00:35:32 tophyr: that's how the stock camera app works (stays portrait but draws its buttons sideways) Jan 28 00:36:55 evancharlton: i understand that, and that's pretty much the solution offered to every joe coder who asks on SO. however, my activity isn't fullscreen - it's more dialog-style Jan 28 00:37:05 if i rotate the screen, everything under it will go wonky Jan 28 00:37:16 tophyr: ah Jan 28 00:37:59 there's gotta be *some* kind of way i can subclass SurfaceView, or interject some sort of filter, or *something*, to let me munge each frame of the surface Jan 28 00:39:02 i also need to crop the image returned; i don't want the end-result-image to depend on the camera's aspect ratio, but i figured worst-case i could simply handle that with overlaid opaque Views Jan 28 00:40:47 tophyr, what is the differenc between a SurfaceView and a View??.. Jan 28 00:42:02 many differences... in this case i'm just talking about overlaying them so instead of <--View--><--SurfaceView--><--View-->, it'd be <--View-->rfaceVie<--View--> Jan 28 00:42:26 hah Jan 28 00:45:23 ...possible? Jan 28 00:46:08 romainguy__ might know, he's a ui guy..? (possible to crop/rotate surfaceview?) Jan 28 00:50:30 you cannot rotate a surfaceview Jan 28 00:55:16 crap Jan 28 00:55:27 you can however rotate a TextureView (Android 4.0+) Jan 28 00:55:35 hm Jan 28 00:56:16 what i'm after is a way to show a camera preview, oriented correctly for how the user should see it with their eyes, without forcing the layout into either portrait or landscape Jan 28 00:56:41 the activity i'm trying to build will ideally be dialog-themed, so it'll show the previous activity behind it Jan 28 00:56:52 if i force landscape, and i was in portrait, that'd go wonky Jan 28 00:57:30 every answer ever on SO involves simply forcing the orientation, and "faking" portrait mode. Jan 28 01:01:35 ... impossible? Jan 28 01:05:42 what is the standard way to notify the user they entered the wrong username/pass? Jan 28 01:05:46 a popup window? Jan 28 01:05:54 erebel55: i use a toast Jan 28 01:06:43 tophyr: thanks Jan 28 01:07:04 toast or a dialog...dunno if there's a standard per se... Jan 28 01:07:57 thanks :) and sorry i've only been using android for a couple days Jan 28 01:09:07 no need to apologize, all good ^^ Jan 28 01:09:15 :D Jan 28 01:20:33 Toasts are almost always the wrong answer Jan 28 01:20:46 never use a Toast if it is something that might be important that the user see. Jan 28 01:21:26 I like how a lot of websites simply display the login page but with a message field informing the user. Jan 28 01:21:39 Should translate pretty well to an Android form as well. Jan 28 01:22:01 you mean like Hint? Jan 28 01:22:13 THe message will stay there so it will always be read, but no action is required and the user can try again right away. Jan 28 01:23:54 that's how we did it with the ios version of ours Jan 28 01:24:47 i find it a little irritating that it stays there forever, but that's a personal preference Jan 28 01:30:20 i'm trying to create aToast, but i need to a context to do so. should i be using getApplicationContext() or getBaseContext() ? Jan 28 01:30:48 activities are contexts, just use "this" Jan 28 01:31:08 how would i go about changing decimal values to characters in xml? i have some characters like ⌠Jan 28 01:31:16 oh cool thanks :) Jan 28 01:34:14 anyone? Jan 28 01:34:39 Zacharias3690: look up htmlencoding Jan 28 01:34:45   etc Jan 28 01:35:06 \u0020 ... if that's what you mean Jan 28 01:35:09 tophyr: is there a better way to use "this" then what I'm doing? http://pastebin.com/PCgX70WB Jan 28 01:35:14 also that Jan 28 01:35:36 i had to create Context myContext = this; because of where I'm creating my toast in my code Jan 28 01:35:52 having to encode space at start and end of strings is annoying Jan 28 01:35:52 erebel55, OuterClass.this Jan 28 01:35:56 erebel55: replace myContext with LoginActivity.this Jan 28 01:37:21 thanks :) Jan 28 01:51:48 anybody know about the functionality of device-added- event in init.rc (init language)?? It looks like it is not catching the trigger by ueventd Jan 28 01:51:57 whois bhowisu Jan 28 01:53:08 hm it doesn't like that i added that line within that thread Jan 28 01:53:41 Can't create handler inside thread that has not called Looper.prepare() Jan 28 01:53:46 guess i should look that up Jan 28 01:54:45 you can only create a Handler on a HandlerThread Jan 28 01:54:47 erebel55: didn't really read your code for purpose earlier. don't create your own thread to do an asynchronous task, android provides an AsyncTask concept for this Jan 28 01:54:49 or the main thread Jan 28 01:55:32 ahh ok sorry for all the tedius questions, thanks for clearing that up Jan 28 01:57:11 you can create a handler on any thread that you call looper.prepare on Jan 28 01:57:31 storkme, unless you're writing framework, you'll rarely be creating threads that you call Looper.prepare on Jan 28 01:57:39 pfn++ Jan 28 01:57:43 or otherwise using a HandlerThread Jan 28 01:57:54 i did it, it works Jan 28 01:58:01 I didn't say it doesn't work Jan 28 01:58:11 it's just pretty rare, and not very idiomatic given that there's a HandlerThread Jan 28 01:58:15 yes you did Jan 28 01:58:25 four minutes ago Jan 28 01:58:36 oh, the only on a Handler thread Jan 28 01:58:42 fine on any thread on which Looper.prepare has been called on Jan 28 01:58:48 but that was obviously the case from the error message already Jan 28 01:59:42 but you pretty much said something that contradicted the rather clear error msg Jan 28 01:59:59 right, but I'm saying it's rather rare to do so Jan 28 02:00:05 http://images.dpchallenge.com/images_challenge/0-999/488/800/Copyrighted_Image_Reuse_Prohibited_329135.jpg Jan 28 02:00:14 and most people that call Looper.prepare on their own shouldn't Jan 28 02:00:29 ok Jan 28 02:01:17 i did it once because i wasnt aware of handlerthread Jan 28 02:02:26 oddly theres some example code on the dev site that specifies that as the way to do it, seems like theyd be better off linking to handlerthread instead Jan 28 02:02:41 * pfn shrugs Jan 28 02:02:47 sample code is of terrible quality :( Jan 28 02:03:43 yeah some of the sample code needs refreshing Jan 28 02:03:49 yeah its on the api page for looper Jan 28 02:04:00 but I think the dev site is OSS; either file bugs or submit patches :P Jan 28 02:04:00 inconsistencies ftw Jan 28 02:04:18 well, being on the page for looper is somewhat excusable Jan 28 02:04:23 since they're illustrating how you'd use looper Jan 28 02:04:33 i guess Jan 28 02:04:57 handlerthread should be called out clearly in the docs for handler, though Jan 28 02:06:15 youre pretty much only gonna use a looper with a handler anyway so using the code they show is just silly Jan 28 02:08:10 another day in androidbdevelopment Jan 28 02:11:06 is there some kinda system log for crashes? Jan 28 02:11:11 logcat Jan 28 02:12:14 well logcat isn't helping at all :/ (I know this is the wrong channel), my phone gets stuck and then reboots at every boot, 8-10 seconds after the lock screen shows up Jan 28 02:12:35 and the last thing in the logcat is the amazon.appstore activity thread Jan 28 02:13:01 galaxy nexus btw Jan 28 02:13:03 stock too :/ Jan 28 02:14:38 all i can do atm is uninstall packages while the system is booting using adb Jan 28 02:15:48 iesus thats nastt Jan 28 02:15:58 could be hardware... Jan 28 02:16:18 battery ok? Jan 28 02:16:29 could be a widget Jan 28 02:16:32 yeah it's plugged in Jan 28 02:16:39 are the official docs the best place to start learning how to write apps? i already know java, but don't have much experience with android other than as a user Jan 28 02:16:54 lol, dunno about the best but they're a good resource :p Jan 28 02:17:33 lol well if there's some better out there, i'd rather use that ;/ Jan 28 02:18:38 yes, they're by far the best resource :) Jan 28 02:18:51 All the books are out-dated in like a week Jan 28 02:19:03 yeah, that's what i noticed Jan 28 02:19:05 Afzal, if you've unlocked your boot loader, boot up clockwork mod Jan 28 02:19:12 like i looked for some tablet dev info, but it was all honeycomb Jan 28 02:19:12 then you can adb from there Jan 28 02:19:14 no ics Jan 28 02:19:16 Afzal, doesn't sound stock if it's bootlooping, though Jan 28 02:19:37 pfn, it is stock...didn't even have cwm on it until some minutes ago to see what's going on Jan 28 02:19:40 CQN, honeycomb and ics are effectively the same thing in terms of development Jan 28 02:19:45 kk Jan 28 02:19:51 Afzal, sounds like you should get the phone exchanged... Jan 28 02:20:04 i've been using it for the past month Jan 28 02:20:09 without problems Jan 28 02:20:20 i don't have a tablet yet, but when i upgraded from a droid 1 to a gn, i noticed that things were _very_ different Jan 28 02:20:32 ok, one thing...i do have the email app disabled Jan 28 02:21:51 undisable it then Jan 28 02:22:32 CQN, honeycomb and ics are really similar in terms of ui Jan 28 02:22:54 pfn: what about ics phone vs tablet? it's supposed to be pretty similar, right? Jan 28 02:23:18 tablet vs phone ui development isvery different Jan 28 02:23:36 what about on the backend? Jan 28 02:23:53 It's all the same apis Jan 28 02:25:01 pfn it just says "killed" when i execute "pm enable com.google.android.email" :/ but it doesn't enable it :/ Jan 28 02:25:14 this sounds really bad :/ lol Jan 28 02:25:56 probably can't run that in recovery Jan 28 02:26:46 nope, pm doesn't run in recovery Jan 28 02:30:30 meh whatever, time to flash Jan 28 02:33:25 I wonder what triggered your boot Jan 28 02:34:03 loop **** ENDING LOGGING AT Sat Jan 28 02:59:59 2012