**** BEGIN LOGGING AT Thu Jan 02 02:59:59 2014 Jan 02 03:00:35 <_genuser_> would you rather an activity does db work on it's own, or passes info back ot main activity and the main activity does the DB work? Jan 02 03:01:03 what kind of db work Jan 02 03:01:49 <_genuser_> creating one activity, so it can show newly retrieved list of items (from web), and existing list for a given group. Jan 02 03:02:10 <_genuser_> thinking of passing it the List in the intent before starting and it can change it and pass it back to MainActivity which can commit to DB. Jan 02 03:02:23 <_genuser_> this allows me to use the second activity as "add" and "edit" screen. Jan 02 03:02:51 you cant pass lists in an intent Jan 02 03:03:10 <_genuser_> I remember. I haven't quite figure that part out yet. Jan 02 03:03:12 <_genuser_> any ideas? Jan 02 03:03:58 <_genuser_> alternatvily, I could pass it the group ID, and second parameter indicating whether it should download the new data or fetch existing from DB for the user. Jan 02 03:04:12 <_genuser_> and then it could do it's own DB work. Jan 02 03:04:17 <_genuser_> *its. Jan 02 03:04:18 I'm trying to build the gstreamer tutorials, and in native_window.h I'm getting error:unknown type name int32_t Jan 02 03:04:34 I'm assuming I'm missing an include directory of some sort? Jan 02 03:20:39 hi all. I'm wanting to create an app that can identify 9 coloured squares of a rubiks cube using a devices camera. I'm wondering if anyone could point me in the right direction for resources and libraries etc. I have no prior experience with image analysis. Jan 02 03:21:23 (btw, I know apps like this exist already) Jan 02 03:21:57 Start reading up on opencv? That would probably be a good place to start. Jan 02 03:23:29 that looks very relevant. thankyou Jan 02 03:24:00 welcome :D Jan 02 03:34:47 hm, disabling gmail fixed my battery problem. Jan 02 03:35:49 g00s: not using an android device fixes my android device battery problems Jan 02 03:35:50 ;0 Jan 02 03:36:21 all of a sudden, beginning today, it started eating up the battery (25%) Jan 02 03:36:42 yeah, to have a good ux you need to disable everything :) Jan 02 03:41:01 <_genuser_> someitmes my phone will just drain battery fast. it's like something gets stuck. Jan 02 03:41:07 <_genuser_> a reboot usually fixes that tho. Jan 02 03:41:20 yeah, tried a reboot Jan 02 03:41:30 <_genuser_> also if you have auto scren brightness selected, instead of saving the battery it actually drains it super fast. Jan 02 03:41:49 <_genuser_> I know you already said it was gmail and it was fixed. just throwing out other culprits. Jan 02 03:42:24 is there a way to reset battery stats ? Jan 02 03:42:29 (without root) Jan 02 03:43:32 lame Jan 02 03:59:11 Hello, I'm deploying an app to my android device which is on the same network as my laptop, but when I try and make a network connection from the android device to my laptop I get a no route to host message Jan 02 03:59:40 Does anyone know how I can debug this problem, and make sure the network settings are correct so that my app on my android device can connect to my computer (I'm doing a client-server app) Jan 02 04:03:44 does it have the network permissions? is your laptop running any sort of firewall? Jan 02 04:04:35 dragorn: no firewall - it has the internet permission Jan 02 04:04:48 A firewall wouldn't return a "no route to host" message Jan 02 04:04:52 it would return a "connection refused" Jan 02 04:04:58 depends on how the firewall is configured Jan 02 04:05:09 well, not really Jan 02 04:05:11 No route to host means that it can't find the local IP Jan 02 04:05:17 so it wouldn't affect that message Jan 02 04:05:18 obviously you know more; good luck then Jan 02 04:06:22 (pro tip: a firewall that drops instead of rejects can definitely cause a no route to host since it effectively isn't present on the network and blackholes any traffic to it) Jan 02 04:07:00 Hello, sometimes when I run `gradle installDebug`, it hangs on the 'installDebug" task. A couple lines before it says "waiting until streams are handled...". What could be causing this hang? Jan 02 04:07:19 dragorn: yeah, I think you are right that it can send a different message than connection refused Jan 02 04:07:38 dragorn: but I think "no route to host" means the routing table doesn't have a route to the host, so it can't even attempt to start the connection Jan 02 04:07:45 Sometimes it works Jan 02 04:07:57 so maybe I'm doing something really bone-headed Jan 02 04:08:27 I just have a laptop running a server, an android device running an app, both on the same wifi network (and also connected via USB) Jan 02 04:09:51 cubahero: you'll get a NRTH when arp can't resolve, which could definitely be caused by a deny-all / drop-all firewall configuration. It's academic if a firewall isn't in play here. Sounds more like it doesn't have internet permission or you're mangling the IP and not talking to the right system. If it was me I'd throw a packet sniffer on the router and the laptop acting like a server and see if the packets are even egressing Jan 02 04:10:49 or your wifi doesn't allow inter-client communication (unlikely on a home AP, more likely on a college network or something, no idea what your situation is) Jan 02 04:13:09 dragorn: so, oddly enough Jan 02 04:13:13 I reran it and it worked Jan 02 04:13:17 with no changes... Jan 02 04:26:32 hey everyone Jan 02 04:26:51 it says no adveritsing, but im looking for some people to look at my android game and let me know if it looks pretty good for an android game Jan 02 04:26:57 is ther elike an android-dev social? Jan 02 04:31:22 Hello, i am developing a notepad-like app, a little bit more complex than the tutorial one though, and i wonder if i shall use a orm or write the database access by myself. Jan 02 04:31:28 I've been reading a lot Jan 02 04:31:34 but still in doubt.... Jan 02 04:31:40 any hint is very appreciated. Jan 02 04:42:12 well if anyones interested in a mobile multiplayer fps coop game Jan 02 05:00:04 tripknotix: nothing wrong with asking people to look at your app, I'd say Jan 02 05:01:21 well yeah but i didnt know if it was considered an advertisement, i just released it last monday so im looking for opinions , https://play.google.com/store/apps/details?id=net.RealDefinition.ZombieOpsOnline i mean if they dont get it then they only have screenshots to judge by really Jan 02 05:01:46 would love some feedback but i dunno if thats possible with just screenshots Jan 02 05:03:18 why no video? Jan 02 05:03:48 Hello, I'm wondering if anyone can help me out, or suggest how to go about solving an issue with UnsatisfiedLinkError. I'm getting the UnsatisfiedLinkError crash from specific devices, especially the Galaxy Note 8.0. What would you suggest to fix this problem? The UnsatisfiedLinkError does not show up in most of any other devices Jan 02 05:06:07 what library is missing ? Jan 02 05:07:46 tripknotix: also, your description is very basic... Jan 02 05:10:23 hey, is anybody running n AOSP-based rom on hammerhead here? Jan 02 05:11:08 something15525: does your app crash on that particular config or something? Jan 02 05:11:47 Leeds: no, i was more asking about a question about the camera Jan 02 05:11:52 specifically video recording Jan 02 05:12:01 anybody getting a green line down the left Jan 02 05:12:04 you have a camera app? Jan 02 05:12:05 and weird looking video? Jan 02 05:12:10 Leeds: no, the AOSP camera app Jan 02 05:12:14 this channel is for app development Jan 02 05:12:30 Leeds: oops, my bad Jan 02 05:15:29 <_genuser_> when one activity launches another with startActivityForResult, it listens for the result and reacts in onActivityResult, correct? Jan 02 05:17:54 I am confused about the android build tools. I have revision 19.0.1 installed, but here it says 0.7.0 was just released: https://android.googlesource.com/platform/tools/build/+/master/changelog.txt Which is it? Jan 02 05:18:13 bricker`LA actually 0.7.3 was just released Jan 02 05:18:29 And how do I install the latest? It keeps telling me Gradle 1.8 is required, but 0.7.0 says Gradle 1.9 is required. Jan 02 05:18:37 That's the android gradle plugin, not build tools Jan 02 05:19:06 SimonVT: oh - how do I install this? Jan 02 05:19:41 I see this http://tools.android.com/tech-docs/new-build-system/user-guide but there are no instructions on installation that I can find Jan 02 05:19:52 You don't install it Jan 02 05:19:57 It's pulled from maven central Jan 02 05:20:10 ohhhhhh Jan 02 05:20:42 SimonVT: now I understand what "'com.android.tools.build:gradle:0.6.3+'" that I copied and pasted actually means Jan 02 05:20:54 SimonVT: can you tell, I've been developing android apps for about 2 days :P Jan 02 05:24:05 ^_^ Jan 02 05:24:24 ahhhh, so much better, thank you! Jan 02 05:33:17 Leeds: are videos that important for games? Jan 02 05:33:33 tripknotix: somewhere between essential and must-have, I'd say Jan 02 05:34:27 o i c... Jan 02 05:34:42 hmmm Jan 02 05:35:09 start a whole franchise and make the movie + sequels ! Jan 02 05:37:44 Now how do I tell `gradle installDebug` to run on a running emulator? Jan 02 05:41:18 hit the bug Jan 02 05:45:48 anyone know of a way to enumerate only the user-imported entries of the certificate store ? Jan 02 05:57:30 finally android studio can import eclipse projects Jan 02 06:00:49 not very well apparently Jan 02 06:01:44 Hello, does anyone know if calling handleMessage inside the override of a subclassed handler call directly, or does it go on message stack? Jan 02 06:02:17 Eeeeeee hasnt it been able to since day one? Jan 02 06:02:23 I know intellij in general could Jan 02 06:02:31 nope Jan 02 06:02:38 Leeds: any recommended screen capture software or is fraps good enough? Jan 02 06:02:41 had to import to eclipse then export Jan 02 06:03:03 tripknotix: I think I'd be looking to use the built-in recording now Jan 02 06:03:04 hey ron_frown Jan 02 06:03:10 it wasn Jan 02 06:03:19 t able to convert to gradle before Jan 02 06:03:21 yo Jan 02 06:03:26 hohoho Jan 02 06:03:46 I say we invent more shit to solve more problems that dont exist Jan 02 06:03:51 thats the java engineer mindset Jan 02 06:04:38 well, i think you had to export eclipse adt project into some gradle thingy first, and then import into AS = i think they made it so AS imports directly now Jan 02 06:04:59 and then reorganize folders Jan 02 06:05:01 ron_frown: with more XML Jan 02 06:05:01 the thing I'm sarcastically referring to is of course gradle Jan 02 06:05:03 it's broken for me Jan 02 06:05:06 always more XML Jan 02 06:05:08 Leeds PRECISELY! Jan 02 06:05:27 put json in your xml .. solved ! Jan 02 06:05:31 I wish java would do the honarable tihng, and just go the fuck away Jan 02 06:05:36 just like its cousin product oracle Jan 02 06:05:40 just go the fuck away Jan 02 06:05:46 lol Jan 02 06:06:03 java can be written decent, but typical usage promotes terrible shit Jan 02 06:06:19 right now, i'm working with one of the most horrendous APIs in existence … JSSE … an abomination Jan 02 06:06:23 what they try to integrate into the newer versions is amazingly shitty Jan 02 06:07:05 hey, don't lump Java in with Oracle Jan 02 06:07:14 ron_frown did you hear about that M# thing from MS ? Jan 02 06:07:22 java and oracle are both shit Jan 02 06:07:27 I deal with oracle on a daily basis Jan 02 06:07:33 worst fucking rdbms I've ever used Jan 02 06:07:38 and I've dealt with mysql etc Jan 02 06:08:28 I do rather enjoy oracle announcing new features that litereally every remotely mainstream rdbms has has for 10+ years Jan 02 06:08:40 ahhaaha Jan 02 06:08:40 and touting it like its amazing new functionality Jan 02 06:09:00 that's what Apple does Jan 02 06:09:05 oracle just needs to do the right thing and perform seppuku publically Jan 02 06:09:46 you can hype it if you follow through Jan 02 06:10:25 I like how to seemingly competitive products like oracle and mysql can be so vastly different Jan 02 06:10:28 er Jan 02 06:10:29 mssql Jan 02 06:10:42 mssql can basically run undetected in low usage environments Jan 02 06:10:52 oracle will rape the fuck out of your machine, no matter what its doing Jan 02 06:11:08 oh well Jan 02 06:11:11 enough of that rant Jan 02 06:12:16 what build in recording leeds? Jan 02 06:12:50 http://developer.android.com/tools/help/adb.html#screenrecord etc Jan 02 06:13:03 g00s: Caused by: java.lang.UnsatisfiedLinkError: Couldn't load opvpnutil from loader Jan 02 06:13:34 dck28 are you providing that ? i didn't think android came with openvpn Jan 02 06:13:46 i'm providing it Jan 02 06:14:01 man I dont want to fuck with javascript, but I am gonna need it Jan 02 06:14:24 dck28 hopefully more info in the logcat Jan 02 06:14:25 if web is ever going to be mainstream, google/others better get browsers performing better on mobile devices Jan 02 06:14:40 mainstream as a replacement to a native app Jan 02 06:14:47 g00s: thing is... it works fine for most devices... only a few models are giving me trouble on this.. Jan 02 06:15:00 see the devices are just getting faster Jan 02 06:15:09 eventually the issues will just go away Jan 02 06:15:43 ron_frown the web served its purpose for google; now its all about their megaplatforms Jan 02 06:15:52 internet connected for sure, but open, meh Jan 02 06:16:08 I dont know Jan 02 06:16:10 and fb, etc Jan 02 06:16:22 they are shooting to do stuff like open standard dart Jan 02 06:16:31 dart is significantly faster than javascript vm Jan 02 06:16:44 whether it'll take off is another thing Jan 02 06:16:49 but it shows good intentions Jan 02 06:17:27 good intentions of what exactly :) Jan 02 06:17:43 making the web a better place Jan 02 06:17:55 I think people ar too afraid to shake shit up Jan 02 06:18:02 decision makers are a bunch of pussies Jan 02 06:18:14 the fact that javascript is still the standard web scripting environment Jan 02 06:18:30 it fucking sucks therefore anything that compiles to it, is going to fucking suck at best Jan 02 06:18:41 just gut it. Jan 02 06:19:16 transitive theory of sucking shit Jan 02 06:19:50 i didn't get the impression dart was going anywhere Jan 02 06:20:04 well everyone wants their own shit to take off Jan 02 06:20:31 mozilla basically doesnt want to play nice with anyone... they are touting asm.js which is a micro subset of js that they then optimize the shit out of Jan 02 06:20:34 probably candidate for spring cleaning :) Jan 02 06:20:45 but js is still js Jan 02 06:20:56 people think the new ecmascript is gonna be the fixer Jan 02 06:21:37 I dont really get the recent excitement with js... its slow, its actually not easier to write good code with than a real programming language Jan 02 06:21:56 its obfuscated at best, half assed module loading, no real multi-threading Jan 02 06:22:25 hello i am using configchanges to prevent activity destruction on rotation, etc. However I need to write some state to sqlite tables between activity instances. They say to use onPause but this would be overkill, since I really only need to write to the tables when the activity is going to be destroyed. Is there no other method I can use reliably (since onStop / onDestroy not garunteed to be called?) Jan 02 06:22:42 g00s make your big bucks yet? Jan 02 06:23:36 eh, never looking to make big bucks - just find interesting things to work on ;) Jan 02 06:24:26 hahah Jan 02 06:24:28 yeah I hear you Jan 02 06:25:01 my nosql db? 80%, my craigslist replacement... 90% Jan 02 06:25:11 my projects are interesting but unfinished Jan 02 06:25:14 collecting dust =) Jan 02 06:26:05 Weird, the Table 2 http://developer.android.com/guide/topics/sensors/sensors_overview.html#sensors-intro shows that Android 4.0 supports the TYPE_GRAVITY sensor. My 4.1.2 android tablet returns null for mSensorManager.getDefaultSensor(Sensor.TYPE_GRAVITY) Jan 02 06:26:37 ron_frown maybe you'll like this gigaom.com/2013/12/14/5-predictions-on-the-future-of-databases-from-a-guy-who-knows-databases/ Jan 02 06:27:32 I agree with a lot of those points Jan 02 06:27:53 I think rdbms's introduce a lot of retarded artificial constraints on stuff that they shouldnt Jan 02 06:27:59 however... Jan 02 06:28:05 nosql hasnt been done right Jan 02 06:28:16 gotta be some sort of hybrid Jan 02 06:28:26 and def about coming back to earth Jan 02 06:30:05 I havent created many databases, but I've examined the source of many, as a hobby Jan 02 06:30:58 lasserix why not onSaveInstanceState Jan 02 06:30:58 I've got 20yr doing db shit... and will be the first one to tell you I think enforcing constraints etc is bs... babysitting devs Jan 02 06:31:12 and sprocs ultimately negatively outweihg their benefits Jan 02 06:31:18 controversial opinions, I know Jan 02 06:32:31 g00s save instance state is called when onpause is called? Jan 02 06:33:41 g00s I have to save a couple thousand long arraylists Jan 02 06:33:47 Guys, if I have BOSCH BMC150 Acceleration sensor, am I supposed to have a gravity sensor? Jan 02 06:34:11 serializing those would (just assuming here) be slower than writing to a sqlite db? Jan 02 06:34:45 lasserix did you see Activity doc "Saving Persistent State" Jan 02 06:35:41 heh "mozilla basically doesnt want to play nice with anyone" :p Jan 02 06:35:43 yeah Jan 02 06:35:51 well normally i would just write it off in onPause Jan 02 06:36:10 but since the activity uses config changes, that would be more than i need to do, since I only really need to when the activity is destroyed Jan 02 06:36:49 i was thinking i could completly do away with even the sqlite tables by using onRetainNonConfigurationInstance Jan 02 06:37:09 Guys, I have an accelerometer Jan 02 06:37:32 Does that thing work as a gravity sensor? Jan 02 06:37:39 but even then it looks like i have to handle the application being destroyed Jan 02 06:37:41 lasserix i thought that was deprecated Jan 02 06:37:46 ohh Jan 02 06:38:00 maybe it is, never used it just thought i could avoid even the writing time to sqlite table Jan 02 06:39:11 ahh so if the activity is destroyed the retained fragment will still have the data? Jan 02 06:39:46 i think so; kinda forgetting Jan 02 06:41:48 It survives configuration changes Jan 02 06:41:58 only config changes Jan 02 06:42:01 that's already handled Jan 02 06:42:26 i need to persist data between activity instances (with config changes on for orientation, etc) Jan 02 06:42:46 however since the writing to the tables can take 60 seconds i didn't want to put it into onpause Jan 02 06:42:57 :O Jan 02 06:42:58 but instead only in onstop (preferably) but someone mentioned that does not always get called Jan 02 06:43:08 yeah catch 22 .. Jan 02 06:43:23 lasserix wut kind of data is this :P Jan 02 06:43:32 lots and lots and lots of strings Jan 02 06:44:15 for instance, 40k strings of the form "1111~2" Jan 02 06:44:50 but i guess if generating them on activity recreated is faster than saving and reloading them might as well just requery Jan 02 06:44:54 hmm Jan 02 06:45:07 form of 1111~2 ? Jan 02 06:45:16 yeah that's pid ~ version Jan 02 06:45:19 something seems crazy here ;) Jan 02 06:45:33 its for content observers on content providers Jan 02 06:45:45 O.O Jan 02 06:46:01 <.< Jan 02 06:46:04 >.> Jan 02 06:46:05 heh Jan 02 06:46:40 i managed to reduce query time from 180 seconds to 20 seconds expanding from 92 to 5000 records but that didn't satisify the higher ups ;! Jan 02 06:46:52 yeah no crap :) Jan 02 06:47:31 so what are all these entries again ? Jan 02 06:47:42 splain moar Jan 02 06:47:45 contact data Jan 02 06:48:08 Are you stealing user data? Jan 02 06:48:12 haha no Jan 02 06:48:18 I think you are Jan 02 06:48:44 if i were stealing it i wouldn't have to keep it current Jan 02 06:48:45 Anyway.. Save your data as it changes Jan 02 06:49:03 i am exploring android build system, i have a question. Example application is Calculator. I see the folder in packages/app/Calculator/Android.mk file, but this "Calculator" is not captured in the core.mk @ build/target/product/Core.mk Jan 02 06:49:19 yeah i had that working but it was causing 40s lag time which was not acceptable by higher ups Jan 02 06:49:28 could someone help me ? Jan 02 06:49:39 hence the catch22 problem of how to deal with when/where to save Jan 02 06:49:48 40s lag time? Jan 02 06:50:10 yeah if i write a table of 40k row entries, i have to read that too Jan 02 06:50:31 so i am switching to using in memory hashmaps, but istill need to keep this data around between activity instances Jan 02 06:50:43 How does that cause lag Jan 02 06:51:40 underlying architecture is not double buffered yet Jan 02 06:52:34 Define lag Jan 02 06:53:02 so far i was being niave and writing to the table as the data changes, Jan 02 06:53:42 but since this took 40s per change (and the changes are throttled) read operatings had to wait Jan 02 06:53:52 *operations Jan 02 06:53:55 for the writing to finish Jan 02 06:54:39 so i am refactoring it now simulating double buffering of the architecture i have to work with, but i kinda assumed calling a 40s sqlite table write everytime onpause was called was also no good Jan 02 06:54:50 So basically all 40k entries are changed every time Jan 02 06:55:03 no Jan 02 06:55:13 but the first time Jan 02 06:55:23 is what the higher ups care about Jan 02 06:55:41 One insert wouldn't take 40s.. A delete wouldn't take 40s.. I see no reason you can't save data as it changes Jan 02 06:56:33 i am moving to that now by using in run time memory data structures Jan 02 06:56:50 none of this is making any sense to me Jan 02 06:57:09 hmm Jan 02 06:57:45 i see your point simonvt, i was hoping to move all sqlite executions outside of the running of the app (ie in onpause) so that it will run (even) faster Jan 02 06:58:29 As for the first time, does querying the data take 40s? Jan 02 06:58:36 yeah Jan 02 06:58:57 well Jan 02 06:58:57 Not with your current implementation Jan 02 06:58:59 20 seconds Jan 02 06:59:02 The actual data you're getting Jan 02 06:59:05 yeah Jan 02 06:59:07 20 seconds Jan 02 06:59:09 Where are you querying it from? Jan 02 06:59:14 rawcontacts Jan 02 06:59:42 And it doesn't take 20 seconds when querying from your apps db? Jan 02 07:00:01 no cause for the content observer i just grab the pid and the dataversion Jan 02 07:00:39 the bottleneck with rawcontacts is (a) no table joins (b) the two dozen or so columns of data per entry Jan 02 07:00:56 (no table joins with tables not in the content provider) Jan 02 07:01:29 i was going to run it in a service Jan 02 07:01:45 but decided that would be determintal to battery life (possibly) Jan 02 07:02:47 anyways thanks for checking me, maybe i am just making it more complicated than it needs to be Jan 02 07:07:09 lasserix maybe you want to start from scratch and explain what you are trying to do. all i got was you had 40k of thingies and its taking too long Jan 02 07:10:40 i have to keep a list of "current state" for the content observer to distinguish what changed from some content providers. for security and speed, current state is usually the pid and the dataversion Jan 02 07:10:48 *for some Jan 02 07:11:01 sometimes this is a list can have 40k entries Jan 02 07:11:39 i need this list between activity instances, Jan 02 07:11:52 the activity uses configchanges for orientation etc Jan 02 07:11:56 god damn it Jan 02 07:11:59 so where to call and how to save this list Jan 02 07:12:00 ELI5 !' Jan 02 07:12:17 pretend i'm your manager, i dont give a fuck about your content observer Jan 02 07:12:25 WHAT ARE YOU TRYING TO DO Jan 02 07:12:44 quickly save a very very large list of strings between activity instances Jan 02 07:13:03 * g00s headdesk Jan 02 07:13:10 as simonvt pointed out, technically this should be easy once i initially write the list Jan 02 07:13:25 40k of anything is not easy on android Jan 02 07:13:30 haha Jan 02 07:13:57 if only the bags under my eyes and lack of vacation really showed through ;p Jan 02 07:14:06 what content observers? what state? Jan 02 07:14:09 why ! Jan 02 07:14:23 in this case its contacts and its for use in the app Jan 02 07:14:36 so you have 40k contacts ? Jan 02 07:14:54 no but rawcontacts.entities contains a dozen or so rows per unique contact Jan 02 07:15:08 ohh, k Jan 02 07:15:15 and while my implementation was working for "normal" people my boss has 5k contacts Jan 02 07:15:33 it would work well for me too ;) Jan 02 07:16:05 yeah, like i said the previous dev took 180 seconds to do just 100 contacts, i got up to 5k in 20 but they were like not good enough! Jan 02 07:16:36 though i have learned exponetially about java so i am happy :) Jan 02 07:17:00 anyways, i recall from my niave days of making my previous apps that serialization on this many strings is slow Jan 02 07:17:04 so you are trying to monitor a change in any entity of any contact ? Jan 02 07:17:12 yeah Jan 02 07:17:27 and when there is a change, then what do you care ? Jan 02 07:17:40 i need to know the change and the app needs to reflect that change Jan 02 07:18:58 "reflect that change" sounds like you are copying state though Jan 02 07:20:16 probably being as specific i can be :/ Jan 02 07:21:43 hmm Jan 02 07:22:33 i dont know much about the Contacts provider Jan 02 07:22:46 newer android versions will give you the URI that changed in the observer Jan 02 07:22:54 so lame, should have been there since API1 Jan 02 07:23:02 what dumbass made that decision ... Jan 02 07:23:04 dont assume cursor.isNull(index) is ever telling the truth! Jan 02 07:23:20 having a problem as well Jan 02 07:23:34 but if its a directory that changed, you can't really know which records Jan 02 07:23:39 its all stupid crap Jan 02 07:23:42 with fragments/contentprovider Jan 02 07:23:44 g00s i was under the impression that was just a directory uri Jan 02 07:24:00 is the new content observer also uri specific? Jan 02 07:24:06 *item uri specific Jan 02 07:24:19 ya Jan 02 07:24:30 http://developer.android.com/reference/android/database/ContentObserver.html#onChange%28boolean,%20android.net.Uri%29 Jan 02 07:24:32 eeeeee what's up? Jan 02 07:24:46 how new? 4.4? Jan 02 07:24:49 hey Jan 02 07:25:05 hmmm Jan 02 07:27:16 uri specificity seems inconsistent Jan 02 07:28:19 but thanks that seems it could be useful! Jan 02 07:34:14 as for databases seems like someone should use a genetic algorithm to develop the best database architecture Jan 02 07:34:54 works for antaneas and human relationships, why not databases? Jan 02 07:42:05 in this answer: http://stackoverflow.com/questions/4255859/touch-and-drag-image-in-android. onDraw() is called basically every tick of the thread, is this an acceptable way to do it or is it acceptable? Jan 02 07:42:59 lasserix what would the fitness criteria for "best" be ? Jan 02 07:43:14 onDraw() redraws a bitmap inside it Jan 02 07:43:27 fitness function for an antenna are simply s/n and sensitivity Jan 02 07:44:04 I am familiar with android widget spinner, but I want to place an icon/image on the screen and when tapped, it opens a list which originates from the point where it was tapped. I dont think spinner is the correct widget, any suggestions on the correct widget? Jan 02 07:44:41 *i mean is it an inefficient way to do it or is it acceptable Jan 02 07:48:09 no one? Jan 02 07:48:42 arcode: typically games shoot for 16 ms refresh rate, if you are doing something simple 20-30 will work fine Jan 02 07:49:03 ok thanks lasserix Jan 02 07:49:36 look at eshayne's comment Jan 02 07:49:41 if that applies use that Jan 02 07:49:59 zquad: i saw something that might be of some use in the action bar documentation Jan 02 07:50:02 because forcing a redraw every 1ms or 16ms or even 32 ms is a relative battery drain than only when needed Jan 02 07:50:09 i don't have his comment in chat history Jan 02 07:50:39 thanks se_busca_ayuda checking it out Jan 02 07:50:58 zquad: look under adding an action provider Jan 02 07:51:06 g00s: i dunno human tolerance for work to output ratio is not easy to measure Jan 02 07:51:07 lasserix: i thought it was resource heavy, i will try changing it to redraw only when the bitmap has moved Jan 02 07:51:29 arcode: good idea, you're app won't show up as draining battery then :) Jan 02 07:52:21 zquad there are several ways you could do that, but i think there is like pop up menu or something to do that the trick is positioning its display Jan 02 07:53:42 Hi is it possible to rotate a custom rendered map in Android WebView using the Gyroscope values ? Jan 02 07:54:23 thanks lasserix it called a popup menu, doesn't seen to work with anything < 11 though :(, my minimum sdk is 8 Jan 02 07:55:38 ubuntufreak: i would imagine so. you just have to use the output of the gyroscope like a matrix Jan 02 07:56:06 how does one navigate to a top level activity from a deeper level one using the side bar? the CLEAR_TOP flag wont do since there are multiple top level activities Jan 02 07:56:29 rhcake: did you try getActivity()? Jan 02 07:56:45 se_busca_ayuda: you mean pass the values to WebView and handle the rotation there using JS ? Jan 02 07:57:13 se_busca_ayuda pardon? Jan 02 07:57:14 ubuntufreak: why wouldn't you just use the java matrix package? Jan 02 07:57:25 rhcake: oh i misunderstood your question, sorry Jan 02 07:58:30 se_busca_ayuda: need to check that, are there any leads for that ? Jan 02 07:59:10 ubuntufreak: your linear algebra textbook from your CS undergrad :) Jan 02 07:59:40 ubuntufreak, http://developer.android.com/reference/android/view/animation/RotateAnimation.html Jan 02 07:59:50 one can apply rotation animations to views Jan 02 08:00:24 se_busca_ayuda: ah will find it then : ) Jan 02 08:01:55 PatrickBic: Thanks will check it Jan 02 08:02:44 PatrickBic: But the problem is that the rotation data needs to send to server and based on that map needs to be rendered. I feel it takes too much bandwidth in a mobile Jan 02 08:05:31 sorry was on the phone... Jan 02 08:05:49 ubuntufreak, you want a rotation like 47° ? Jan 02 08:06:48 if yes, sending a value/few values to the server is like ... nothing compared to the real data Jan 02 08:07:37 PatrickBic: Yep it's something similar to how the Google Maps render based on the direction the user moves Jan 02 08:08:01 well yea, shouldnt matter at all (sending this sensor-values) to the server Jan 02 08:08:06 after all it will be a few bytes Jan 02 08:08:59 PatrickBic: Ok would try that out Jan 02 08:14:23 <_genuser_> guys, I have a non-main activity which will show a listview with items. can click on them to edit/remove or add new. when done, this activity closes and the results need to be reflected back to the main. Jan 02 08:14:41 <_genuser_> should this activity do all the db modification and then just close leaving the main to refresh? Jan 02 08:14:54 <_genuser_> or should it pass data back to teh main which will updatd the db? Jan 02 08:15:17 <_genuser_> I'm split on what is the best approach. curious what others do in similar situation. Jan 02 08:16:52 i would go for saving stuff in the non-main-activity (with a shared db-class ofc). seems like a self-contained way of doing it Jan 02 08:17:36 <_genuser_> I see. should I pass teh db object reference to it? Or let it instantiate a new one and on notification to the main let it re-read from db? Jan 02 08:18:14 zquad there is a lower level pop up dialog or something i used to use Jan 02 08:18:33 lasserix... go on... Jan 02 08:18:51 i would go for re-reading from db because it doesnt need you to write more code (you have that code @startup already) and the time/performance penalty shouldnt be that big/hard Jan 02 08:19:35 <_genuser_> PatrickBic: nah, time performance would be minimal because this is something where I wouldn't expect more than 50 rows max. if the user was craaaaaazy in adding stuff. 10-15 max. Jan 02 08:19:56 yea i said "shouldnt be big" :P Jan 02 08:20:12 <_genuser_> PatrickBic: right, that was my agreement. got lost in text only communication. :) Jan 02 08:20:17 :P Jan 02 08:20:54 i would go for re-reading => clean state, won't be that much slower, each activity is like.. an unit by itself Jan 02 08:20:55 <_genuser_> I have designed this 3 times already in my mind. just can't seem to find the right balance in "automagic" and simplicity. Jan 02 08:20:58 How can I access Activity's menu from Fragment? Jan 02 08:22:01 <_genuser_> Pitel_IPEX: you're already created the menu and added to activity but want to access it runtime? Jan 02 08:22:08 _genuser_, well.. there are tons of patterns for every purpose :P Jan 02 08:22:35 _genuser_: Yup, I just want to change MenuItem's visibility. Jan 02 08:23:30 Hmm, even the Activity doesn't seem to have anything like getMenu() or something. Jan 02 08:23:35 <_genuser_> PatrickBic: main use, add a class, and each class has sections under it. Main interface has a nav drawer showing classes and sections under them but tabbed over. Jan 02 08:24:12 <_genuser_> PatrickBic: so I want to add a screen that will add class info, and show a listview where you can add more by hitting a plus which will launch a add_section activity. Jan 02 08:24:34 <_genuser_> PatrickBic: BUT, there's also a possibility that a provider will have a json file available that can be just downloaded, parsed and added. Jan 02 08:25:03 <_genuser_> PatrickBic: and I thought it would be nice to download the json file, parse, add, and then show them the same info in the edit screen so they can tinker with it before moving away from it. Jan 02 08:25:43 <_genuser_> PatrickBic: and originally I didn't want to add it to the db until they finish tinkering and give the final go ahead. But doing it that way forces to pass around List where E is serializable and just a kludge of crap passing between activities. :) Jan 02 08:26:11 do you instantiate the other activities from one main activity, right? Jan 02 08:26:23 why not keep a public variable ? ;-) Jan 02 08:26:23 <[E]sc> i'm trying to learn how to program in android, is this the proper channel to discuss that topic? Jan 02 08:26:32 <_genuser_> Pitel_IPEX: one approach: http://stackoverflow.com/questions/10579333/how-can-i-get-the-options-menu-of-my-activity Jan 02 08:27:15 <_genuser_> PatrickBic: make the main activity has a public var and just access it all over from other activities? Jan 02 08:27:24 <_genuser_> *have Jan 02 08:27:25 yep Jan 02 08:27:40 (or a map or whatever you want to have) Jan 02 08:27:44 <_genuser_> PatrickBic: so then I could have a separate list that can be ok'd by the user and then added.... Jan 02 08:28:06 <_genuser_> makes sense. I guess my c/c++ teacher is nagging me from 15years ago. Jan 02 08:28:17 <_genuser_> he would take off 10pts for any global vars. Jan 02 08:28:38 <_genuser_> everything must be passed around with a specific reference. Jan 02 08:29:01 gah >_> is the navigation drawer meant only for fragments, a side menu with activities is, like, unusable Jan 02 08:30:14 <_genuser_> PatrickBic: so then you think it's alright to make the public var basically static so I don't have to worry about passing about references? Jan 02 08:30:41 i think its ok.. not the best way of doing but why overcomplicate things? Jan 02 08:30:57 clients who dont spend time on making an android design and force an ios one are pretty frustrating :/ Jan 02 08:31:01 <_genuser_> yeah, why overcomplicate things. Jan 02 08:31:28 <_genuser_> I just wonder why android has been designed to be so..... odd. maybe google inherited it that way and just didn't wanna change it after introducing it to the market. Jan 02 08:32:51 <_genuser_> PatrickBic: thanks for listening and suggesting idears. :) I'm gonna think about this and just implement one thing and leave it be. Jan 02 08:32:54 <[E]sc> can anyone look at this code and tell me why this animation isn't running? http://pastebin.com/gPjZ3CbT the first image shows up but doesn't cycle through at all. i'm new and using 4.4, but was testing on a 4.3 Jan 02 08:33:31 _genuser_, you're welcome ;-) Jan 02 08:36:01 Does android:imeOptions="actionDone" bring the keyboard down when the user touches anywhere other than the selected edit text? Jan 02 09:14:05 how do i get multiple rows out of a sqlite database based on sequence of primary key ids? Jan 02 09:14:22 order by ? Jan 02 09:18:14 hey lasserix for the popup menu, how did you get around using it for devices where api < 11 ?? Jan 02 09:19:32 hi guys I have a menu item Jan 02 09:19:40 that is in the action bar Jan 02 09:19:45 is there any way to change the text color of those action menu item Jan 02 09:20:19 rohan yeah probably in styles Jan 02 09:20:23 i have a plus icon i am using and then when someone switches to landscape orientation it shows the text Jan 02 09:20:33 lasserix: i have tried literlaly everything Jan 02 09:20:36 with no luck Jan 02 09:20:38 zquad i think i used like popup dialog or something Jan 02 09:20:46 thats why i am asking assist Jan 02 09:20:51 something probably now deprecated Jan 02 09:21:14 lasserix more or less a floating dialog? Jan 02 09:21:20 yeah Jan 02 09:21:29 it was popup something if i can recall correctly Jan 02 09:21:55 ok I was hoping for that inplace popupmenu that is currently available but that can work Jan 02 09:23:53 lasserix: have any ideas? Jan 02 09:36:17 query jennie Jan 02 09:36:36 lasserix: still around Jan 02 09:37:06 anybody got any ideas Jan 02 09:40:24 for anybody who iddnt see my question Jan 02 09:40:43 i need to change the color of text in the menu bar Jan 02 09:40:43 for a menu item Jan 02 09:41:17 I have an actionbar inside a viewpager held together by a FragmentPagerAdapter that doesn't change the tab when I swipe, yet it does when I press the "next" button i implemented. Anyone know what I mnight need to change? Here's my fragmentpageradapter/actionbar listener package com.dream.Controller; Jan 02 09:41:22 import java.util.ArrayList; Jan 02 09:41:25 import java.util.Calendar; Jan 02 09:41:27 import java.util.HashMap; Jan 02 09:41:30 import java.util.List; Jan 02 09:41:32 import java.util.Locale; Jan 02 09:41:35 import com.dream.R; Jan 02 09:41:37 import data_structures.Hashtable; Jan 02 09:41:40 import android.app.ActionBar; Jan 02 09:41:43 import android.app.ActionBar.Tab; Jan 02 09:41:45 import android.app.Activity; Jan 02 09:41:48 import android.app.DatePickerDialog; Jan 02 09:41:50 import android.app.Dialog; Jan 02 09:41:53 import android.app.TimePickerDialog; Jan 02 09:41:53 oh boy Jan 02 09:41:55 import android.content.ContentUris; Jan 02 09:41:56 se_busca_ayuda: stop pasting code Jan 02 09:41:58 import android.content.Context; Jan 02 09:42:00 import android.net.Uri; Jan 02 09:42:03 import android.os.Bundle; Jan 02 09:42:05 import android.support.v4.app.DialogFragment; Jan 02 09:42:08 import android.support.v4.app.Fragment; Jan 02 09:42:08 haha Jan 02 09:42:10 import android.support.v4.app.FragmentActivity; Jan 02 09:42:13 import android.support.v4.app.FragmentManager; Jan 02 09:42:15 import android.support.v4.app.FragmentPagerAdapter; Jan 02 09:42:16 se_busca_ayuda: http://paste.ofcode.org/ Jan 02 09:42:18 import android.support.v4.app.FragmentTransaction; Jan 02 09:42:20 import android.support.v4.app.ListFragment; Jan 02 09:42:23 import android.support.v4.view.ViewPager; Jan 02 09:42:23 se_busca_ayuda: stop Jan 02 09:42:25 import android.text.format.DateFormat; Jan 02 09:42:28 import android.util.Log; Jan 02 09:42:30 import android.view.LayoutInflater; Jan 02 09:42:33 import android.view.View; Jan 02 09:42:34 osxorgate: were f***ed Jan 02 09:42:35 it's too late now it's in his buffer :p Jan 02 09:42:35 import android.view.ViewGroup; Jan 02 09:42:38 import android.widget.AdapterView; Jan 02 09:42:39 it's in god's hands now Jan 02 09:42:41 import android.widget.ArrayAdapter; Jan 02 09:42:43 import android.widget.Button; Jan 02 09:42:46 import android.widget.DatePicker; Jan 02 09:42:48 import android.widget.ListView; Jan 02 09:42:51 import android.widget.TextView; Jan 02 09:42:51 kick anyone? ;-) Jan 02 09:42:52 see you on the other side Jan 02 09:42:53 import android.widget.TimePicker; Jan 02 09:42:56 import com.dream.Model.*; Jan 02 09:42:58 import com.dream.View.Detail1Frag; Jan 02 09:43:01 import com.dream.View.Detail2Frag; Jan 02 09:43:03 import com.dream.View.Detail3Frag; Jan 02 09:43:06 import com.dream.View.MasterFrag; Jan 02 09:43:08 public class SectionAdapter extends FragmentPagerAdapter Jan 02 09:43:16 { Jan 02 09:43:24 PatrickBic: i wish we had a smart bot who could flag this moron Jan 02 09:43:39 anyone who can get op rights and kick him? Jan 02 09:44:44 PatrickBic: chances of those people being active are slim Jan 02 09:44:56 is there an easy way in android studio to change which device the app gets launched on? Jan 02 09:45:10 PatrickBic: mind helping me with something, a theming-related question Jan 02 09:45:32 if i can, why not? ;-) Jan 02 09:48:02 okay Jan 02 09:48:02 simple thing Jan 02 09:48:03 menu items in the action bar Jan 02 09:48:10 I have a plus icon Jan 02 09:48:15 and when I switch to landscape Jan 02 09:48:55 I get text Jan 02 09:49:00 besides the plus icon Jan 02 09:49:11 i want that text to be a different color Jan 02 09:49:20 instead of white (cause the background is white) Jan 02 09:49:39 any ideas on a solution Jan 02 09:49:50 text = textview view? Jan 02 09:49:59 for (int i=0; i if (mTabs.get(i) == tag) { Jan 02 09:50:04 vp.setCurrentItem(i); Jan 02 09:50:06 if (fa.getSupportFragmentManager().findFragmentById(R.id.pager_title_strip) != null) { Jan 02 09:50:09 ab.setSelectedNavigationItem(i); Jan 02 09:50:11 Patrick^ Jan 02 09:50:12 notifyDataSetChanged(); Jan 02 09:50:14 } Jan 02 09:50:17 } Jan 02 09:50:19 } Jan 02 09:50:23 PatrickBic: ^^^ Jan 02 09:50:31 se_busca_ayuda, god damnit, stop it Jan 02 09:50:32 storkme: we are f***ed again Jan 02 09:50:34 } Jan 02 09:50:37 /* Jan 02 09:50:39 public static class Master0Frag extends ListFragment implements OnArticleSelectedListener Jan 02 09:50:42 { Jan 02 09:50:43 need more code Jan 02 09:50:50 se_busca_ayuda: we will make sure you get banned Jan 02 09:50:50 obviously Jan 02 09:50:57 pduin: lol Jan 02 09:50:57 @pduin Jan 02 09:51:07 ;) Jan 02 09:51:08 i bet its a south american internet connection Jan 02 09:51:13 or 3rd world country Jan 02 09:51:14 se_busca_ayuda i see the problem, you need to call System.exit(1); right after you notifyDataSetChanged(); Jan 02 09:51:35 asfdd, no, right in onCreate Jan 02 09:51:35 asfdd: lol Jan 02 09:51:36 ;-) Jan 02 09:51:57 Rohan_Bhangui: http://stackoverflow.com/questions/18015010/action-bar-menu-item-text-color Jan 02 09:52:01 Rohan_Bhangui, is this text a textview ? Jan 02 09:52:04 hahaha you were able to decifer that mess Jan 02 09:52:10 its the action bar Jan 02 09:52:22 PatrickBic: ^ Jan 02 09:52:23 oh, didnt read that Jan 02 09:52:24 sorry Jan 02 09:52:35 look at lasserix's link Jan 02 09:52:40 it seems promising Jan 02 09:53:13 http://lmgtfy.com/?q=customize+action+bar+menu+text+color+android Jan 02 09:53:26 PatrickBic: got a bug in eclipse, when i clikc a line it erases as if the redraw for eclipse is messed up Jan 02 09:53:27 } Jan 02 09:53:30 oops sorry Jan 02 09:53:32 my bad guys Jan 02 09:53:34 haha Jan 02 09:53:35 here's the pastebin http://pastebin.com/JcQmq7pt Jan 02 09:53:37 chill out i just forgot to copypasta the url Jan 02 09:53:40 and cygwin's buffer is fucking HUGE lol Jan 02 09:53:40 pduin: he aint done Jan 02 09:53:45 storkme: there is in ecliipse. its under debug configurations. Jan 02 09:53:47 as sjpi;d have something similar Jan 02 09:53:50 *AS should Jan 02 09:53:52 Rohan_Bhangui: lol you don't even know how to change the color on a view. good luck nub Jan 02 09:53:53 *facepalm Jan 02 09:53:55 HUE HUE HUE nah that aint me Jan 02 09:53:57 :D Jan 02 09:53:58 lol mess? thats standard eclipse formatting, nub Jan 02 09:54:16 se_busca_ayuda: you calling me a noob i just started android programming, you cant even use a pastebin Jan 02 09:54:21 how sad is that Jan 02 09:54:24 se_busca_ayuda next time that happens it's easier to just disconnect :p Jan 02 09:54:46 (or use a /flushqueue command in your client if it has one) Jan 02 09:55:22 storkme: IRSSI on cygwin is an outdated version, it doesn't have all the features of the current ones Jan 02 09:55:51 ahh Jan 02 10:00:08 anybody had an issue with ADT (or eclipse) where when you click a line Jan 02 10:00:14 in an xml file Jan 02 10:00:22 the line gets deleted and shows on the line above Jan 02 10:00:25 Anyone know if i can use prepared statements to query content providers? Jan 02 10:01:06 it only happens when I press (ctrl + shift + f) <- reformat code Jan 02 10:02:12 lasserix: how do i definet he sherlock theme Jan 02 10:03:01 uhh Jan 02 10:03:06 sherlock theme is action bar sherlock Jan 02 10:03:20 which i dont know if it used much anymore since android api comes with support action bar Jan 02 10:03:34 but you just need to google how do i style my action bar Jan 02 10:05:50 whats the best way to handle settings that affect the layout? i.e. if the user changes a setting and presses back how do i propagate the changes in all of the past activities. Jan 02 10:06:44 lasserix: that link you gave me is the first page i tried Jan 02 10:06:47 its still white Jan 02 10:13:47 Silly gradle tries to build by filterscript with api level 11 despite AndroidManifest specifies minsdk 17 Jan 02 10:15:10 lasserix: no luck Jan 02 10:15:28 lasserix, storkme, PatrickBic; this is my theme http://paste.ofcode.org/33jtKUEPmLDzWFGE2izEQzf Jan 02 10:16:15 could it be because I need to place the styles within Jan 02 10:16:24 res/values-vXX/styles.xml Jan 02 10:17:15 there's apparently a 'targetApi' parameter but haven't yet worked out how to pass it... Jan 02 10:17:43 any ideas guys? Jan 02 10:18:14 what's the problem exactly? I think I missed the discussion Jan 02 10:18:28 he wants to change the color of the text in the actionbar Jan 02 10:18:47 android version? using appcompat or abs? Jan 02 10:19:26 fuu this gradle code is such oo masturbation... defaulttask > basetask > incrementaltask > dependencybasedcompiletask > red Jan 02 10:19:31 renderscriptcompile Jan 02 10:20:59 storkme: what? Jan 02 10:21:20 android version im building for is 4.4 Jan 02 10:21:23 4.4.2 Jan 02 10:22:05 @color/white Jan 02 10:22:09 PatrickBic, storkme : http://paste.ofcode.org/37p298HDNkAzAvuyk5P5VyH Jan 02 10:22:12 has the theme Jan 02 10:22:12 are you missing at line 13? Jan 02 10:22:28 lasserix: what? Jan 02 10:22:37 i tried the above line and it didnt work Jan 02 10:22:45 Rohan_Bhangui: http://stackoverflow.com/questions/5861661/actionbar-text-color first answer Jan 02 10:22:46 its there at line 23 Jan 02 10:23:03 the 'textColor' attribute needs to be under a TextAppearance style entry Jan 02 10:23:24 you don't set the text colour of the actionbar, you set the textcolor of the title text in the actionbar Jan 02 10:25:43 storkme: didnt work Jan 02 10:25:43 the menu item Jan 02 10:25:43 is still white Jan 02 10:28:20 wait, what text colour exactly are we trying to change? title text colour? Jan 02 10:30:04 storkme: created an image for you http://imgur.com/aGBeHxu Jan 02 10:30:18 see the text to the right of the plus button Jan 02 10:30:31 yep Jan 02 10:30:39 that is my target Jan 02 10:31:57 android:actionMenuTextColor ? Jan 02 10:33:15 Hello everyone Jan 02 10:34:57 Im using AlertDialog builder, is there a way to get and use the selected item of a setsinglechoiceitems function ? without using global variables ? Jan 02 10:36:01 storkme: sry i dosconnected Jan 02 10:36:05 *disconnected Jan 02 10:36:19 my last message was just: android:actionMenuTextColor Jan 02 10:36:40 i tried that Jan 02 10:36:46 where should i insert that line Jan 02 10:36:55 in the action bar style Jan 02 10:38:22 nope Jan 02 10:38:25 still white Jan 02 10:38:51 storkme: this is what it looks like now Jan 02 10:38:52 http://paste.ofcode.org/SA7g4PGAfZ49jvEz3HcbhM Jan 02 10:38:53 I feel like you must be overwriting it somewhere - Light theme with a Light actionbar should have black text *by default* Jan 02 10:39:00 line 28-30 are not used Jan 02 10:39:09 well Jan 02 10:39:12 thats the trick Jan 02 10:39:14 actually Jan 02 10:39:19 im overwriting the background color Jan 02 10:39:26 its actually a dark action bar Jan 02 10:39:36 see line 23 Jan 02 10:39:38 storkme: ^ Jan 02 10:39:47 btw msg me when you say somethign Jan 02 10:41:09 Rohan_Bhangui: if you're using a dark actionbar you should be inhering from Holo.Light.DarkActionBar, no? Jan 02 10:41:35 storkme: true, but it should be possible either way, because what im doing right now is an override Jan 02 10:43:05 storkme: can you give me the imgur link Jan 02 10:43:07 i lost it Jan 02 10:43:22 Rohan_Bhangui: http://imgur.com/aGBeHxu Jan 02 10:45:19 why this is not working i dont know Jan 02 10:45:38 nor I, I'm all out of ideas Jan 02 10:45:42 i trid loking at android theme generator Jan 02 10:45:46 for ideas nothign there too Jan 02 10:48:02 storkme: line 2-3 is that relevent Jan 02 10:48:04 http://paste.ofcode.org/SA7g4PGAfZ49jvEz3HcbhM Jan 02 10:50:15 Rohan_Bhangui: not if you're only targeting 4.4 and up Jan 02 10:50:24 well 4.3 and up Jan 02 10:50:29 well above the 14+ api requireent Jan 02 10:50:32 *requirement Jan 02 10:51:01 i assume that the textcolor property for menu items has been around from before 4.3 Jan 02 10:51:35 Rohan_Bhangui: this work? http://stackoverflow.com/a/10999726/167988 Jan 02 10:52:28 hmmmm Jan 02 10:54:18 storkme: like so? http://paste.ofcode.org/ScCRBBzP8auzGbBnyiQthM Jan 02 10:54:53 ^(that didnt work btw) Jan 02 10:56:16 Rohan_Bhangui: android:actionMenuTextColor under MyActionBar.MenuItem should just be 'textColor' Jan 02 10:56:47 nope Jan 02 10:57:00 PatrickBic: care to comment? Jan 02 10:58:06 oh, didnt follow the conversation :P Jan 02 10:58:46 although i dont know anything beside google'ing Jan 02 10:59:14 why is this such an issue Jan 02 10:59:17 it a simple ovrride Jan 02 10:59:48 it's not really a simple override, what you're doing is rewriting Holo.Light.DarkActionBar Jan 02 11:00:43 ya Jan 02 11:00:47 storkme: i know that Jan 02 11:00:58 im being a bit stubborn but it should be possible Jan 02 11:01:18 is there anyway i can take alook at the holo.light code Jan 02 11:01:24 like where it is located Jan 02 11:01:30 im guessing in the sdk Jan 02 11:03:57 any ideas guys? Jan 02 11:04:36 hmmm Jan 02 11:04:38 found somethig Jan 02 11:12:09 noope no luck Jan 02 11:14:36 Rohan_Bhangui, http://stackoverflow.com/questions/17589788/using-parent-androidstyle-widget-holo-light-actionbar-brings-the-dark-action Jan 02 11:14:46 first answer (two styles tags inside this code block) Jan 02 11:14:49 look at the second one Jan 02 11:18:12 PatrickBic: my code http://paste.ofcode.org/ydsye4AUYrqUQniFZFHvmg Jan 02 11:19:01 try @color/red or whatever Jan 02 11:19:09 @color/white <- Jan 02 11:19:19 wait what is the color add thingy Jan 02 11:19:21 like the tag Jan 02 11:19:40 what? Jan 02 11:20:13 nvm Jan 02 11:21:06 PatrickBic: still not resolved http://paste.ofcode.org/7uXnQQr2FRMs5CT4ceysaq Jan 02 11:21:43 PatrickBic: just had an idea, what if I go to the source, like look how holo.light is coding it styles Jan 02 11:21:54 after all i assume tis just antoher styles.xml file Jan 02 11:22:03 might help, no clue after all :P Jan 02 11:22:05 i just google myself Jan 02 11:23:40 PatrickBic: i also gonna assume that its written into each sdk Jan 02 11:30:09 no luck Jan 02 11:38:11 damn Jan 02 11:38:19 btw how do oyu ge the sherlock theme stuff working Jan 02 11:41:46 PatrickBic: i just did something Jan 02 11:41:48 holdtesting Jan 02 11:42:25 Hey. I need to figure out why my queries aren't working. My query ends up being something of the style: SELECT * FROM questions WHERE type LIKE 'm\_%' Jan 02 11:42:46 Can anyone see anything wrong with that? It is supposed to return all the questions with a type that start with "m_" Jan 02 11:43:04 you don't need the escape Jan 02 11:43:26 CallumTaylor, Without the escape, it was giving me a result of all the ones starting with just "m". Jan 02 11:43:30 Now it gives me nothing. Jan 02 11:43:49 do you have data in the set that actually matches the criteria? Jan 02 11:43:52 Yes. Jan 02 11:44:38 I can provide code, if that would help, but I checked and the SQL statement is returning 0 rows. Jan 02 11:44:47 strange Jan 02 11:45:02 PatrickBic: :( Jan 02 11:45:28 CallumTaylor, Also, the corresponding NOT LIKE query returns the result of everything in the database. Jan 02 11:45:54 PatrickBic: we are triumphant Jan 02 11:45:57 yes yes yes Jan 02 11:46:20 Is there a way to pass a value outside a public void OnClick without using global variables ? Jan 02 11:46:37 What do you mean outside? Jan 02 11:46:46 testing it in sqlitedatabase browser the query works without the escape Jan 02 11:47:09 storkme: we have done it Jan 02 11:47:10 not sure about on an android device, i'd expect the same behaviour Jan 02 11:47:19 Hm... I can try it without. Jan 02 11:47:23 try extracting your database onto desktop and opening it, try the query on that Jan 02 11:47:55 I was testing on my physical tablet. I'm trying it on the emulator now and then I'll try it on the desktop. Jan 02 11:47:57 Auv: i get the item selected inside the OnClick event. But i want to get this element (the object element or the indice of this element) outside this function Jan 02 11:48:22 he forces me to set the variable on final if i want to do that Jan 02 11:48:44 Unfortunately, my mutant tablet doesn't have the sqlite3 program installed. Jan 02 11:49:28 macTAR, If you're storing a "selected" item, that's generally instance-level state. Jan 02 11:49:58 that mean i cant ? :D Jan 02 11:50:24 I guess. It doesn't make much sense to store it anywhere other than in your object. The abstractness of your question makes it difficult to answer. Jan 02 11:51:01 Auv: i got a singlechoice item, i get the indice of the selected item inside the OnClick function Jan 02 11:51:21 And you want to store it to use it later? Jan 02 11:51:21 but to use this indice outside the OnClick i have to use global variables Jan 02 11:51:25 that i dont want to Jan 02 11:52:02 i want to use it on the setPositiveButon event Jan 02 11:52:14 on another onclick Jan 02 11:52:30 You're probably gonna have to have it in an instance-level variable, then. Jan 02 11:52:38 That's what they're for, after all. Jan 02 11:53:18 If by "global" you mean something static and accessible from anywhere, that's a code smell. :P Jan 02 11:54:29 by global i mean that the variable i declared in class declaration Jan 02 11:54:48 "private int selectedValue" Jan 02 11:55:15 Oh, yeah. That's not a bad thing to do sometimes. The fear of God instilled in programmers about anything that's not declared in a method is pretty silly. Jan 02 11:55:39 If the selected value is a property if what your class represents, then it should be instance-level. Jan 02 11:57:58 ok, sad but ok Jan 02 11:58:03 thx :) Jan 02 11:58:39 CallumTaylor, http://pastebin.com/06e2VMMf results from using emulator. Jan 02 11:59:01 This is a newbie question, but how do I pull the database down from a device? Jan 02 11:59:53 http://stackoverflow.com/questions/14714173/how-to-get-database-file-from-any-android-project-in-emulator-or-in-pc Jan 02 12:00:03 dab pull is a good one Jan 02 12:00:34 adb* Jan 02 12:00:57 CallumTaylor, Any idea on the results? Jan 02 12:01:02 really strange Jan 02 12:01:14 there's nothing obviously wrong with it Jan 02 12:01:34 try using m_mc instead of m\_% Jan 02 12:01:39 questions is declared as CREATE TABLE questions(_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, text TEXT, type TEXT); Jan 02 12:01:39 and see what that yields Jan 02 12:01:57 Okie dokies. Jan 02 12:02:55 hey Jan 02 12:03:04 CallumTaylor, I'm not using Eclipse. I'm on command line. adb pull isn't working to get the DB off device. Permission denied. Jan 02 12:03:42 try adb run-as Jan 02 12:03:50 sqlite> SELECT * FROM questions WHERE type LIKE "m_mc"; Jan 02 12:03:50 1|How was the match?|m_mc Jan 02 12:03:51 then adb pull Jan 02 12:03:58 so that one worked, very strange Jan 02 12:04:10 what about %mc Jan 02 12:04:18 that should give the same result Jan 02 12:04:30 sqlite> SELECT * FROM questions WHERE type LIKE "%mc" Jan 02 12:04:31 ...> ; Jan 02 12:04:31 0|What is your robot's favourite colour?|mc Jan 02 12:04:31 1|How was the match?|m_mc Jan 02 12:04:40 It also returned the "mc" one, which is expected. Jan 02 12:04:48 oh thats because both has mc Jan 02 12:04:49 ok Jan 02 12:05:21 run-as is a command on the adb shell, unfortunately. :\ Jan 02 12:05:31 oh yeah Jan 02 12:05:42 I don't know how to get the plain client (and the scp-like thing) running as a particular app. Jan 02 12:06:13 oh here we go Jan 02 12:06:14 http://stackoverflow.com/questions/7323162/sqlite-like-and Jan 02 12:06:21 possibly related Jan 02 12:06:28 AHA Jan 02 12:06:33 i'd like to write an app which can turn off device parts like wifi, cell signal. searching at the reference for 'cell' gave me info but only cellinfo, and such so i was wondering can i even do it? Jan 02 12:06:36 which is why you escape Jan 02 12:06:46 SELECT * FROM T Jan 02 12:06:47 WHERE FOO LIKE 'a\_b_c\%de%' ESCAPE '\' Jan 02 12:06:47 I figured out the bit with pulling the DB... Jan 02 12:06:55 try your query with the ESCAPE part Jan 02 12:07:19 http://stackoverflow.com/questions/13830034/android-sqlite-like-escape-wildcard Jan 02 12:07:24 yeah you need the escape clause Jan 02 12:07:31 never knew that even existed Jan 02 12:07:47 CallumTaylor, Wat. Jan 02 12:07:50 What the fudge. Jan 02 12:07:59 It worked. :P Jan 02 12:08:02 nice Jan 02 12:08:16 Thank you very much. :) Jan 02 12:08:37 np, the art of google searching Jan 02 12:08:39 im a pro at it Jan 02 12:08:49 hiya. I'm struggling with menu items and showAsAction. My item won't show in the action bar with either showAsAction=ifRoom or always. It's the only item in the menu and there is plenty of room, it doesn't show up in either portrait or landscape mode. any hints? Jan 02 12:08:55 * CallumTaylor searched for "android sqlite LIKE underscore" Jan 02 12:08:58 second link Jan 02 12:09:34 Ah. I spent around 3 hours Googling around and reading tutorials. >.< Jan 02 12:10:35 Anyway, I'm off on a plane to Paris XD. Jan 02 12:10:40 CallumTaylor: hey quick question I want to use textappearancespan to set multiple properties in one line is this possible Jan 02 12:11:45 wat Jan 02 12:11:56 er no idea Jan 02 12:13:44 can i not just do something like Jan 02 12:14:08 cause i cant find it anywhere Jan 02 12:16:50 is it a good practice to pass activity context to static methods ? Jan 02 12:17:04 does it release the object after the work is done ? Jan 02 12:17:48 I made a project with this: https://github.com/pocorall/scaloid#ui-layout-without-xml . Can I get some pointers on to how to make this into a library project? Jan 02 12:18:38 CallumTaylor: if I do a set span over the same range of chars using 2 differend styles it should work right? Jan 02 12:18:49 no Jan 02 12:18:54 er Jan 02 12:19:03 actually i think it will Jan 02 12:19:14 I'm not too sure i haven't done spans in a while Jan 02 12:19:29 hi CallumTaylor Jan 02 12:19:40 is it a good practice to pass activity context to static methods ? Jan 02 12:19:43 does it release the object after the work is done ? Jan 02 12:19:48 sure Jan 02 12:19:54 ok Jan 02 12:20:18 CallumTaylor: my case rests your honor http://stackoverflow.com/a/11479667 Jan 02 12:20:41 (y) Jan 02 12:21:41 "Notice that the showAsAction attribute above uses a custom namespace defined in the tag" fffffffuuuuuuuuuuuu Jan 02 12:25:50 CallumTaylor: damn doesnt work Jan 02 12:26:04 see I have 2 spereate strings so i am doing 2 sperate liens of the same set fo code Jan 02 12:26:06 let me show you Jan 02 12:26:15 are you trying to set the same part of text with multiple spans? Jan 02 12:26:26 because i don't think you can use multiple spans for the same indexes Jan 02 12:26:56 let me show you Jan 02 12:27:40 CallumTaylor: http://paste.ofcode.org/EKNin3vbnb7g7W9vEhAaDJ Jan 02 12:27:49 i dont thnk its working the way its suppose to Jan 02 12:28:04 i mean the large text vs the med. text is working Jan 02 12:28:06 the colors arent Jan 02 12:28:19 you're trying to set 2 spans for the same part of text i don't think it works like that Jan 02 12:28:59 well here is what i get Jan 02 12:29:02 let me updalod Jan 02 12:32:53 CallumTaylor: http://imgur.com/069m9WQ Jan 02 12:32:56 ^result Jan 02 12:33:03 http://paste.ofcode.org/bpuHin8aTYCUvEhFgu2S6a Jan 02 12:33:11 CallumTaylor: ^updated paste Jan 02 12:33:32 yes thats correct Jan 02 12:33:54 okay but the dk_grey and lt_grey1 are 2 differnt colors Jan 02 12:34:00 its not doing the second span Jan 02 12:34:11 why Jan 02 12:34:16 probably because there's already a span for that text location (0 - post.content.length) Jan 02 12:34:34 well they get added later together Jan 02 12:34:41 the titleSpan and the ContentSpan Jan 02 12:35:33 hello guys / girls - I have several async tasks that run parallel but I want to combine the after all effect on my current UI is it somehow possible to do that and what's the right way to do it ? Jan 02 12:35:44 CallumTaylor: updated: http://paste.ofcode.org/tiYfxuTihYDehWTphsjgjm Jan 02 12:35:50 so what should I do Jan 02 12:36:17 override the text appearance styles and apply your colours there Jan 02 12:36:24 then you only need to set span once Jan 02 12:37:19 nvm Jan 02 12:37:21 I got it Jan 02 12:37:33 what i did was set the color of the text view right off the bat Jan 02 12:37:36 as the darker gre Jan 02 12:37:39 *grey Jan 02 12:37:49 and then set the content to the light grey Jan 02 12:37:52 can you help me? im using android-studio and having problem with gradle Jan 02 12:38:05 eliminating the need for the second coloring of spans Jan 02 12:38:10 however Jan 02 12:38:35 he following classes could not be found: Jan 02 12:38:37 CallumTaylor: I dont understand what you mean (like I dont understand your solution , i just started android dev 2 days ago) Jan 02 12:38:38 - android.support.v4.widget.DrawerLayout (Fix Build Path, Create Class) Jan 02 12:38:46 when a refund occurs for an in-app purchase, how long does it usually take for the changes to propagate to the google play server? Jan 02 12:39:17 it may be worth learning about styles/themes then before diving straight into spans Jan 02 12:39:35 jackneill: what does your dependencies look like? Jan 02 12:39:35 also: org.gradle.tooling.GradleConnectionException: Could not execute build using Gradle installation '/home/jackneill/.gradle/wrapper/dists/gradle-1.9-all/3jdgemv0iv8uqohg3kcp2o88r1/gradle-1.9'.: Could not execute build using Gradle installation '/home/jackneill/.gradle/wrapper/dists/gradle-1.9-all/3jdgemv0iv8uqohg3kcp2o88r1/gradle-1.9'. Jan 02 12:39:58 im doing that right now, but a little more of an explanation of your solution might help Jan 02 12:40:05 alexfu: sorry totally getting started. where should i look for deps? Jan 02 12:40:20 build.gradle Jan 02 12:40:23 you can override the style android.R.style.TextAppearance Jan 02 12:40:36 there you put what ever else you want in, in this case the foreground colour Jan 02 12:40:52 you then use that style reference instead of android.R.style.textappearance when setting the span Jan 02 12:41:02 alexfu: classpath 'com.android.tools.build:gradle:0.7.+' Jan 02 12:41:31 alexfu: compile 'com.android.support:support-v4:19.0.0' Jan 02 12:41:34 compile 'com.android.support:gridlayout-v7:19.0.0' Jan 02 12:41:36 compile 'com.android.support:appcompat-v7:19.0.0' Jan 02 12:43:13 hi guys http://stackoverflow.com/questions/20883263/how-to-synchronize-the-progress-action-of-several-async-tasks-that-run-parallel Jan 02 12:43:17 jackneill: try to sync project w/ gradle files… Tools > Android > Sync Project with Gradle Files and do rebuild Jan 02 12:45:19 alexfu: Gradle 'SignalController' project refresh failed: Cause: org.gradle.internal.service.ServiceLocator. ([Ljava/lang/ClassLoader;)V Gradle settings Jan 02 12:49:27 jackneill: see if this helps: http://stackoverflow.com/questions/19874743/gradle-project-refresh-failed-after-android-studio-update Jan 02 12:51:31 anyone have any experience w/ in-app billing? Jan 02 12:56:56 Hello, is this channel also suitable for discussing development of android itself or just apps? Jan 02 12:57:26 jm15: app dev Jan 02 12:57:56 Leeds: ah ok, do you know of a channel where android os dev is discussed? Jan 02 12:58:22 there isn't really one - but do you mean os dev, or 'rom porting/cooking' sort of stuff? Jan 02 12:58:57 discussing extensions to the os itself Jan 02 12:58:59 there are a couple of google groups which might be relevant Jan 02 13:23:30 is it possible to have picasso load an image into a TextView's compound drawable? I want to display twitter profile pics in my list adapter Jan 02 14:00:00 anybody know how long it takes for a refunded in-app purchase to get propagated into the app? Jan 02 14:00:41 osxorgate: yes, use the target callbacks, which gives you the bitmap, then you can add it on draw Jan 02 14:02:07 jm15: Technically this is the appropriate channel, but you're not going to find anyone here that would really help. You're better off in one of the CM dev channels, sadly. Jan 02 14:02:44 alexfu: does it ever? Jan 02 14:04:15 mikedg: i've been waiting for about 2 days and querying the inventory, it says i still have the product sku and the status even says it's still purchased Jan 02 14:12:00 jaynewstrom: not quite sure how, i now have Picasso.with().into(imgView) but i don't quite see how to stash that into a textview Jan 02 14:13:59 you'll have to have a custom textview subclass. in the subclass you'll have to make the text view implement com.squareup.picasso.Target in the onBitmapLoaded, save it into a field in your custom textview subclass. then in onDraw use that bitmap Jan 02 14:14:00 http://square.github.io/picasso/javadoc/com/squareup/picasso/Target.html Jan 02 14:17:17 i see, thanks Jan 02 14:39:37 i'm trying to follow this example: http://www.codeproject.com/Tips/611985/Global-Variable-in-Android Jan 02 14:40:36 but when i try adding: android:name=".Global" to the manifest i have to replace the existing android:name attribute and the app won't launch Jan 02 14:41:29 does anyone know what's going wrong, or a better way to declare global variables? Jan 02 14:41:48 arcode: post your current manifest file Jan 02 14:42:05 arcode: that is a truly horrible tutorial/suggestion and I suggest that you burn your browser Jan 02 14:42:30 arcode: btw, that example could be simplified to just using static boolean variable Jan 02 14:42:43 Yes, you can create your own Application subclass and use that, but yeah, like alexfu said, you're probably more than OK just using a static variable. Jan 02 14:44:52 it's not really recommended to subclass Application for that kind of stuff either Jan 02 14:44:56 ^^ Jan 02 14:45:02 just singleton it Jan 02 14:45:12 lov: lol. i will go with static then thanks Jan 02 14:46:34 so my adapter now has this to load a pic using Picasso, but if the image is not found in cache, it does not show it. What's wrong? https://gist.github.com/xorgate/dfc2faeae2e485fd59c1 Jan 02 14:49:00 osxorgate: call requestLayout onBitmapLoaded Jan 02 14:49:17 in your opinion, when is it suitable to extend from Application? Jan 02 14:49:34 jaynewstrom: is that not overkill? Jan 02 14:49:44 it's worth a shot Jan 02 14:52:45 i think i should just use an ImageView instead of trying this Jan 02 14:59:14 Has anyone here integrated JS into an Android app? I'm deciding between Rhino and a hidden WebView with v8 Jan 02 15:00:30 alexfu: The usual case is when you need to do something on app (not activity or service) startup, though even that's usually something of an abuse. Jan 02 15:01:05 airlok8: i did. i used rhino. it was very easy to integrate. Jan 02 15:02:51 lov: such as.. loading SharedPrefs? Jan 02 15:05:47 ... no? Jan 02 15:05:58 Why would you need to do that on app startup? Jan 02 15:07:04 i'd be a curious to know why subclassing Application to store global vars would be somewhat considered abusive. Does subclassing Application have some sort of hinderance on the app? Jan 02 15:07:23 It's considered a huge code smell. Jan 02 15:07:34 for what reason Jan 02 15:07:53 There's no advantage that subclassing application provides for "Globals" that just using a singleton doesn't. Jan 02 15:07:55 brace yourselves for another singleton debate Jan 02 15:08:12 ah, wasnt expecting that :) Jan 02 15:08:21 suck it pduin. Jan 02 15:08:27 * lov fistpumps Jan 02 15:08:49 lov: other than, in my eyes, it would make more synatical sense Jan 02 15:08:58 no no, i was expecting something more like: "singletons are evil and if you use them you suck big time" Jan 02 15:12:53 singletons aren't evil, but they're abusable. Jan 02 15:13:44 Treating the Application class as a glorified singleton is, however, almost certainly evil. Jan 02 15:13:53 Why are singletons bad? Jan 02 15:14:05 DAOs for ORM are singletons, right? Jan 02 15:15:44 lov: so what's the correct coding pattern then? Jan 02 15:16:34 ColinTheShots: typically, just use a plain ol' singleton. Jan 02 15:16:54 It depends on what your use case actually is, obviously. Jan 02 15:17:16 alexfu: i agree with lov. we should always be striving to lessen dependency. and this is a poor excuse to be doing that. Jan 02 15:17:31 autrilla: singletons can make testing a PITA. Jan 02 15:17:32 but if you want to make sure a singleton gets instantiated regardless of what activity the user comes in through, why not do the instantiation from the Application object? Jan 02 15:17:53 ColinTheShots: What is the importance of the singleton getting instanciated, though? Why is it necessary that this happen? Jan 02 15:18:52 fmj47: agree in terms of? using a a singleton in an Activity vs Application? Jan 02 15:19:58 lov: you're depending on having exactly one copy... perhaps it's a networking library object or crash reporting... you don't want to replicate the code across every entry point activity Jan 02 15:19:59 With singletons you can have issues with asynchronous stuff since a fragment may not be attached to the exact same memory address of an activity after the fragment is recreated Jan 02 15:20:00 alexfu: don't extend the Application class Jan 02 15:20:29 fmj47: i just dont get what the whole fuss is about why subclassing Applications is so bad Jan 02 15:20:43 ColinTheShots: .... which is the point of having a singleton. Jan 02 15:20:51 OOP is not constructed to work well at all with singletons, and on any sizeable application will give you issues Jan 02 15:21:13 ColinTheShots: the typical singleton pattern is that the singleton is instanciated the first time that it's requested, and every subsequent request gives that particular instanciation. Jan 02 15:21:17 That's the point of a singleton :P Jan 02 15:21:48 yiati: that's not really a singleton-specific problem, that's just lazy coding :P Jan 02 15:22:24 lov: so why is that better than instantiating inside the Application object? Jan 02 15:22:26 Lazy coding is why people want to use singletons Jan 02 15:23:20 ColinTheShots: because then you're making the Application instance pull double duty for no clear reason. Jan 02 15:23:39 fmj47: it's true that subclassing Application for keeping global vars provides almost no benefit over using a singleton in an Activity, but why so against subclassing Application? Jan 02 15:23:43 From the outside, it might seem like there's some requirement for that singleton on the application class or context, but there isn't. Jan 02 15:24:14 it's sort of like saying "Why not just dump static variables into the first activity class you referenced them in?" Jan 02 15:24:34 you should access singletons when you need them Jan 02 15:24:40 http://stackoverflow.com/questions/3826905/singletons-vs-application-context-in-android Jan 02 15:24:54 putting them in application will mean they all get created when the app starts which can slow down your app startup time Jan 02 15:25:16 only things like authentication/user loading should go in application as its the very first thing that gets loaded Jan 02 15:25:26 CallumTaylor: Say it's crash reporting. Why wouldn't you want that at startup time? Jan 02 15:25:36 you would Jan 02 15:26:07 CallumTaylor: ok then we agree ;) Jan 02 15:26:32 crash reporter registering should be the absolute first thing you start because anything could cause a crash, you want it to report it Jan 02 15:26:49 its happened to me before where somethings caused a crash /before/ the crash reporter has been instantiated Jan 02 15:27:20 ColinTheShots: as mentioned before, it depends on your use case. Crash reporting is a good use of subclassing Application. There are very few good use cases, and a lot of bad use cases that mostly come from being lazy. Jan 02 15:28:14 lov: what do you mean by... "you're making the Application instance pull double duty for no clear reason" Jan 02 15:30:01 <[F457][F0RW4RD]> Hi Jan 02 15:30:15 alexfu: It depends on what your singleton is, but if you're just shoving something in there that doesn't actually rely on the nature of the Application class, there's no reason for it to live there as opposed to its own class. Jan 02 15:30:23 <[F457][F0RW4RD]> Is Eclipse the only way to develop Android Applications? Jan 02 15:30:29 [F457][F0RW4RD]: No. Jan 02 15:30:33 <[F457][F0RW4RD]> I got used to Visual Studio IDE.... Jan 02 15:30:56 <[F457][F0RW4RD]> What IDEs are good for Android? Jan 02 15:31:09 I don't know if you can use VS, but Android is moving towards Android Studio which is based out of IntelliJ. Jan 02 15:31:16 alexfu: all these concerns are for long term maintenance. what if in the future google decides to change the Application class such that it breaks your app. singletons are bad for the same reason globals are bad - uncontrolled access leading unexpected and untested usecaes Jan 02 15:31:32 That said, you can always build from command line scripts if you'd prefer. Jan 02 15:31:39 see http://developer.android.com/tools/workflow/index.html Jan 02 15:31:42 <[F457][F0RW4RD]> but based on your experience, is Eclipse good enought to make decenpt applications? Jan 02 15:31:49 Yes. Jan 02 15:31:51 i build my apps with 'mka bacon' Jan 02 15:31:55 iswydt. Jan 02 15:32:01 lov: gotcha Jan 02 15:32:28 <[F457][F0RW4RD]> I had alredy develop a "small" application Jan 02 15:32:42 <[F457][F0RW4RD]> But it bugs me to make "Activities" and Actions, and "STUFF" like that Jan 02 15:32:50 <[F457][F0RW4RD]> I haven´t see anything like this before Jan 02 15:33:04 that's unfortunate? Jan 02 15:33:09 ^ Jan 02 15:33:10 Android has a different lifecycle from what you're used to. Jan 02 15:33:10 wat Jan 02 15:33:23 It is a mistake to try to "fix" the lifecycle of your application. Jan 02 15:33:31 bah, random xml config files have always been a hallmark of java :P Jan 02 15:33:53 <[F457][F0RW4RD]> as far as I know. Activity = Form Jan 02 15:33:55 We should switch them all to YAML to be up to date with the ruby crowd! Jan 02 15:34:05 [F457][F0RW4RD]: not really true at all. Jan 02 15:34:22 [F457][F0RW4RD]: I'd very, very strongly recommend that you follow the trainings/tutorials before you do development in earnest. Jan 02 15:34:29 <[F457][F0RW4RD]> I did Jan 02 15:34:34 <[F457][F0RW4RD]> android tutorials Jan 02 15:34:36 <[F457][F0RW4RD]> didn´t help Jan 02 15:34:48 <[F457][F0RW4RD]> I just bought a book because of it... Jan 02 15:34:50 OK, feel free to ask specific questions Jan 02 15:35:00 http://developer.android.com/guide/components/fundamentals.html might help. Jan 02 15:35:11 http://developer.android.com/reference/android/app/Activity.html too Jan 02 15:35:27 it's really, really important to understand that Android is really heavily asynchronous. Jan 02 15:35:47 <[F457][F0RW4RD]> I know, each application is contained in a "Virtual machine" i guess? Jan 02 15:36:04 <[F457][F0RW4RD]> or sandbox or something... Jan 02 15:36:07 Incidentally, but you're thinking of process. Jan 02 15:36:14 Each app is its own process Jan 02 15:36:20 The process runs the DVM Jan 02 15:36:27 the thing that bites most beginners is rotation, your activity gets recreated by default Jan 02 15:36:29 (although you can mostly make your app native code if you prefer) Jan 02 15:36:50 you need an extra good reason to make that not the default Jan 02 15:36:53 (actually, you can make it all native code come to think of it if you use NativeActivity) Jan 02 15:36:53 Android isn't like writing a single step by step program for school. All you do is define what happens at certain points in an application. Once I got that through my head Android programming really clicked in my head. Jan 02 15:37:02 <[F457][F0RW4RD]> I rather not, i wont be always using my apps on ARM devices Jan 02 15:37:24 <[F457][F0RW4RD]> The thing that bugs me most is how to design a layout Jan 02 15:37:45 xml is fantastic Jan 02 15:37:45 <[F457][F0RW4RD]> I am looking for those "Cool interface apps" and all I got is some lousy textboxes en buttons :( Jan 02 15:37:46 [F457][F0RW4RD]: Good thing the compilers support both ARM and x86 Jan 02 15:37:54 [F457][F0RW4RD]: Hire a designer ;) Jan 02 15:38:00 <[F457][F0RW4RD]> But I would need to develop for both ARM and x86 Jan 02 15:38:05 nope? Jan 02 15:38:07 Just write C Jan 02 15:38:15 unless you really need to write asm for whatever reason Jan 02 15:38:15 no you'd compile for both arm and x86 Jan 02 15:38:35 <[F457][F0RW4RD]> oh i c Jan 02 15:38:36 then place the .so files into lib/armeabi, lib/armeabi-v7a, and lib/x86 Jan 02 15:38:41 <[F457][F0RW4RD]> I was thinking on making apps on asm Jan 02 15:38:44 i think there's a mips android device out there somewhere Jan 02 15:38:48 <[F457][F0RW4RD]> and you guys are thinking on c/c++ Jan 02 15:38:49 yeah, there's like 2 :P Jan 02 15:39:01 (who the heck even uses MIPS anymore?) Jan 02 15:39:09 <[F457][F0RW4RD]> lol, hate MIPS Jan 02 15:39:15 <[F457][F0RW4RD]> x86 without a pipeline.... Jan 02 15:39:19 lov: every consumer wireless router ever Jan 02 15:39:29 <[F457][F0RW4RD]> and some random hand helds still use MIPS Jan 02 15:39:35 but do they run andro- oh god they will now D: Jan 02 15:39:39 lol Jan 02 15:39:41 <[F457][F0RW4RD]> Motorola loves to sell new batteries to those... Jan 02 15:39:58 <[F457][F0RW4RD]> Is the worst eficient proceesor ever Jan 02 15:40:03 <[F457][F0RW4RD]> people should BAN it Jan 02 15:40:07 lov: 16MB of ram should be plenty for Android, right? Jan 02 15:40:16 zinx: hey, it was for DREAM. Jan 02 15:40:32 oh, you mean total, not per vm. Jan 02 15:40:36 :P Jan 02 15:40:41 <[F457][F0RW4RD]> anyways, any good links on how to design "Futuristic" or cool layouts on Android? Jan 02 15:41:03 <[F457][F0RW4RD]> Without having to draw every single pixel of my screen (Activity)? Jan 02 15:41:10 You've seen http://developer.android.com/design/index.html yes? Jan 02 15:41:15 <[F457][F0RW4RD]> Yes Jan 02 15:41:17 [F457][F0RW4RD]: draw some 9patches Jan 02 15:41:20 And you don't want to draw every pixel; always do relative layouts. Jan 02 15:41:39 You can have different relative layouts but never try to do pixel-perfect unless you're doing a preload. Jan 02 15:41:44 <[F457][F0RW4RD]> 9patches? Jan 02 15:41:49 honestly, i kinda hate those apps with custom graphics on everything though :P Jan 02 15:42:09 waste of memory and i'd rather have something that looks like the rest of my system Jan 02 15:42:22 [F457][F0RW4RD]: 9 patches are png files that are meant to be resized. They're great for rounded rects, etc. Look it up. Jan 02 15:43:11 <[F457][F0RW4RD]> the thing is that, when you develop for an end user, the "Visual artifacts" is everything that matters Jan 02 15:43:31 <[F457][F0RW4RD]> Your application may freeze, but if you show a pretty icon when it freezes and a mini game while freezed, the user will be happy Jan 02 15:43:43 i disagree Jan 02 15:43:53 <[F457][F0RW4RD]> You can even make your application Lie on why it stop working Jan 02 15:43:53 making an app that doesn't freeze is much better than an app that looks pretty Jan 02 15:44:06 <[F457][F0RW4RD]> I know its better CallumTaylor, i totally agree on that Jan 02 15:44:22 <[F457][F0RW4RD]> But some users are $%&$#%& and all they care are is the GUI Jan 02 15:44:24 design comes second, focus on getting your app functional first Jan 02 15:44:51 the android ecosystem is very different to IOS Jan 02 15:44:59 ^^ Jan 02 15:45:05 there's tons of apps that look like shit, which work well, and people rate 5 stars Jan 02 15:45:15 <[F457][F0RW4RD]> I have tried to focus on makinng every single requeriment (100% requeriments and user cases) Jan 02 15:45:29 <[F457][F0RW4RD]> and the user does not care if the app is not pretty and futuristic as Blade Runner 1980s Jan 02 15:45:36 most users on android don't really care what an app looks like, as long as its familiar and functional Jan 02 15:45:51 <[F457][F0RW4RD]> My coworkers only focus on like 50% + 1 of user cases and requirements Jan 02 15:45:52 you guys are reminding me i need to poke the keepass UI at some point, damn you. Jan 02 15:45:55 <[F457][F0RW4RD]> the other part they deal with UI Jan 02 15:46:00 don't get me wrong, nice design goes a long way, but it shouldn't be the absolute main focus Jan 02 15:46:02 * lov pokes zinx Jan 02 15:46:10 <[F457][F0RW4RD]> It shouldnt Jan 02 15:46:13 <[F457][F0RW4RD]> but the user is THE user Jan 02 15:46:24 <[F457][F0RW4RD]> I hate it, but is true Jan 02 15:46:26 [F457][F0RW4RD]: so give the customer what they want. Jan 02 15:46:32 sounds like you are marketing to children Jan 02 15:46:39 whats your target market? Jan 02 15:46:43 <[F457][F0RW4RD]> I aint Jan 02 15:46:46 <[F457][F0RW4RD]> just think on this Jan 02 15:46:48 <[F457][F0RW4RD]> WhatsApp Jan 02 15:46:57 <[F457][F0RW4RD]> Is a real dumb message application Jan 02 15:47:02 <[F457][F0RW4RD]> it has NOTHING new about it Jan 02 15:47:07 it's marketed to children :P Jan 02 15:47:09 <[F457][F0RW4RD]> And lots of people are willing to pay for it Jan 02 15:47:12 <[F457][F0RW4RD]> lol Jan 02 15:47:13 <[F457][F0RW4RD]> really? Jan 02 15:47:20 <[F457][F0RW4RD]> That explains a lot of my current users.... hmmmm Jan 02 15:47:25 hey guys, if VideoView calls onCompletion() - how do I restart video from there? Jan 02 15:47:50 I'm trying to implement RemoteViewsService.RemoteViewsFactory for an appwidget, but when the service tries to bind to it it says unknown component ComponentInfo{com.foo.bar.ViewsFactory} Jan 02 15:48:03 been using whatsapp for years, never paid Jan 02 15:48:26 [F457][F0RW4RD]: What's with your name? Jan 02 15:48:50 yiati: it's pretty and futuristic Jan 02 15:48:56 I must have left out something really simple Jan 02 15:49:02 but can't figure it out Jan 02 15:49:06 comparing with a sample etc Jan 02 15:49:30 <[F457][F0RW4RD]> my name? Jan 02 15:49:39 <[F457][F0RW4RD]> I tried to put [>>] as my nick name Jan 02 15:49:51 <[F457][F0RW4RD]> because Fast Forward (Reminds me of my VCR) Jan 02 15:49:55 <[F457][F0RW4RD]> But I cant use >> Jan 02 15:50:02 <[F457][F0RW4RD]> so i used [FF] Jan 02 15:50:07 <[F457][F0RW4RD]> put it seem very "dull" Jan 02 15:50:15 <[F457][F0RW4RD]> so i used [Fast][Forward] Jan 02 15:50:20 Leeds: I can't work out why some people have paid for it either Jan 02 15:50:24 <[F457][F0RW4RD]> and then I changed to leet caps Jan 02 15:50:39 <[F457][F0RW4RD]> Now i regret my desicion Jan 02 15:50:47 <[F457][F0RW4RD]> And I shoulded had [FF] Jan 02 15:51:00 <[FF]> I hope I dont get kick from here Jan 02 15:51:01 wabz: iOS people did, before it went free-to-play there... I've got close to expiry of free service, and I always seem to get an extension Jan 02 15:51:35 <[FF]> Why is it so "HARD" to develop Android Applications? Jan 02 15:51:47 its not Jan 02 15:51:49 <[FF]> Why cant it be as simple as making a Desktop Application? Jan 02 15:51:51 I just uninstalled whatsapp... why bother with it when stuff like hangouts works just as well for me Jan 02 15:51:56 Leeds do you live or from Leeds in the UK? Jan 02 15:51:56 you just need to learn Jan 02 15:52:02 [FF], uh, it's as easy as making a desktop application Jan 02 15:52:08 i live there thats all :D small world if so Jan 02 15:52:09 matt1982: from, haven't lived there since 1994 Jan 02 15:52:12 [FF], desktop applications have exactly the same gotchas as writing android applications Jan 02 15:52:13 [FF]: Keep at it, it will click eventually Jan 02 15:52:23 Leeds, ahh cool Jan 02 15:52:31 <[FF]> How long did it took you guys to make a "decent" android Application? Jan 02 15:52:34 if you claim you know how to write desktop applications, but android applications confuzzle you, you don't know how to write desktop applications Jan 02 15:52:45 a year, still in production Jan 02 15:52:51 (in my free time) Jan 02 15:52:54 matt1982: 1 year in Israel, 3 years at university in Liverpool, 7 years in London/Watford, and I've been living in Hong Kong for about 8.5 years now :) Jan 02 15:53:11 <[FF]> pfn, I had been developing web and desktop applications since 2006.... if that makes you sad, it does makes me sad as well :( I suck at Android Jan 02 15:53:11 ahh cool well guess you wouldnt recognise it now! Jan 02 15:53:15 [FF]: From scratch to first release was ~4-5months but it's quite a complex one Jan 02 15:53:15 Leeds: you needa ship me some cheap hardware Jan 02 15:53:24 Leeds: sorry, "gift"s Jan 02 15:53:27 zinx: paypal me, bro Jan 02 15:53:29 hehe Jan 02 15:53:31 <[FF]> I had even develop applications for Windows CE Hand Helds Jan 02 15:53:31 if VideoView calls onCompletion() - how do I restart video from there? Jan 02 15:53:40 <[FF]> And I find it easier than Android Jan 02 15:53:51 matt1982: well, I'm back once or twice a year - parents are still living off Harrogate Road Jan 02 15:53:54 from where osmij_? Jan 02 15:53:57 from scratch, my first android application took all of like 2 days Jan 02 15:54:07 <[FF]> pfd: Really? 2 days? Jan 02 15:54:08 save where it was up to and seek? Jan 02 15:54:12 zinx: actually, I'm happy to - but stuff here isn't all that cheap anymore, except for the lack of sales tax Jan 02 15:54:15 lol Jan 02 15:54:19 ahh cool Leeds thats nice Jan 02 15:54:24 Leeds: :( Jan 02 15:54:29 <[FF]> pfn but you had been working with similar Java enviorements, right? Jan 02 15:54:30 wabz: from onComplete() state. Simply calling .start() doesn't work. Jan 02 15:54:30 yeah, I had my first app on the market and making money after 24 hours Jan 02 15:54:38 and yum cha at kwun tong Jan 02 15:54:42 <[FF]> :( Jan 02 15:54:43 similar java environments? Jan 02 15:54:46 Leeds: all i know is there's stores on the interwebs with ridiculously cheap prices shipping from HK Jan 02 15:54:51 <[FF]> I feel like the slowest student of the classrom :( Jan 02 15:54:54 no, first mobile environment, and yes, I've been working with java forever Jan 02 15:55:04 how long have you been looking at android? Jan 02 15:55:05 zinx: actually, mostly there are shops shipping from the mainland and lying about their location Jan 02 15:55:08 you're not... it's just unlearning how you did desktop apps Jan 02 15:55:11 Leeds: ah Jan 02 15:55:12 it took me a couple months to learn Jan 02 15:55:13 <[FF]> like 1 month Jan 02 15:55:33 zinx: but if there's anything in particular you're after, I'm happy to have a quick look :) Jan 02 15:55:36 everything in Android is a state change of some sort Jan 02 15:55:37 <[FF]> But it feels weird... having lots of experience with .NET and finding that all you know is USELESS here on android Jan 02 15:55:40 no, actually, first mobile environment I wrote for was wince/pocketpc waybackwhen Jan 02 15:55:49 * Leeds did PalmOS in C Jan 02 15:55:59 <[FF]> I rather make LISP applications than Android :/ It really is that hard for me Jan 02 15:56:04 its the same with any new environment Jan 02 15:56:07 and I tried to tinker with palmos, but couldn't get into it Jan 02 15:56:08 released a couple of little utilities back then Jan 02 15:56:09 Leeds: i have a feeling anything i'd want would be of a more esoteric variety (i.e., the stuff they use to flash sdcard firmware :P ) Jan 02 15:56:22 [FF], you can make lisp applications in android using clojure or kawa Jan 02 15:56:43 <[FF]> pfn: I actually do Clojure applications for .NET (IronScheme) Jan 02 15:57:12 <[FF]> pfn: And none of that "knowledge" can help me out with Android :( Jan 02 15:57:15 ironscheme is not clojure and vice versa Jan 02 15:57:15 zinx: yeah, if it's not stuff that's easily available at retail, you're probably better off ordering direct... as an example, I went into three shops today to ask about a Qi charger - one said "what's that", one said they could order one, and one asked for US$60+, while dx.com has them for US$20 Jan 02 15:57:28 Leeds: ha Jan 02 15:57:33 <[FF]> pfn: but if you know Clojure, you know Scheme, if you know Scheme you knos Lisp, and etc Jan 02 15:57:53 [FF], right, I have a feeling you don't really understand what is what Jan 02 15:58:20 <[FF]> pfn: perhaps not as deep as you may want it, but I didn´t felt a massive change from one to another Jan 02 15:58:39 .NET is practically java anyway Jan 02 15:58:41 so you're half way there Jan 02 15:58:47 <[FF]> anyways... I wont be spaming this chat room with my gibirish... i will check your links and come back later Jan 02 15:58:53 <[FF]> Thank you guys so much! Jan 02 15:58:58 java + massive instruction bloat + poorly designed API Jan 02 15:59:22 + copyright lawsuits + slow vm Jan 02 15:59:31 at least the syntax is pretty Jan 02 15:59:40 .net is not the syntax Jan 02 15:59:45 c# is the syntax Jan 02 15:59:47 <[FF]> If you guys have any "Source" link of a decenpt Android Application, I will appreciate Jan 02 15:59:50 oh no i meant java Jan 02 15:59:57 java syntax isn't pretty... Jan 02 16:00:03 i like it Jan 02 16:00:14 it could be better, but its alright Jan 02 16:00:29 <[FF]> before leaving, I will like to show you guys why Java and C# sucks Jan 02 16:00:32 <[FF]> http://www.somethingofthatilk.com/comics/234.jpg Jan 02 16:00:45 <[FF]> Chao! Jan 02 16:01:27 quite true. Jan 02 16:01:38 i qualify for every tier of that so i can't be mad at anything but gravity :( Jan 02 16:02:34 [FF]: That link is objective truth. Jan 02 16:07:09 is android studio really that buggy? Just read this: "Caution: Android Studio is currently available as an early access preview. Several features are either incomplete or not yet implemented and you may encounter bugs." on their site and was wondering how true this is Jan 02 16:07:36 i've found it fairly stable Jan 02 16:07:39 +1 Jan 02 16:07:53 but any update could potentially break everything Jan 02 16:09:33 heh Jan 02 16:10:09 I was just curious. Im just starting out with android dev, im good with eclipse as I learn java years ago and used that. Jan 02 16:10:14 (however updates aren't forced on you, so no big deal) Jan 02 16:10:44 matt1982: then stick with eclipse for now Jan 02 16:10:54 ahh ok heh Jan 02 16:11:00 i liked the idea of the preview hehe Jan 02 16:12:43 when you become hardcore, you wont even need the preview Jan 02 16:12:51 you'll be able to picture what it will look like in your head Jan 02 16:15:29 Hardcore is a bit off yet haha Jan 02 16:15:47 I was like that back in the days of Java GUI development, man Swing and AWT sucked lol Jan 02 16:22:17 Hello Jan 02 16:22:59 What theme should I use for my Spinner for it to look like this : http://developer.android.com/guide/topics/ui/controls/spinner.html ? Jan 02 16:25:06 does android still not automatically send crash reports for applications distributed via Google Play? Jan 02 16:28:37 storkme: no i think it only does when the user hits send report Jan 02 16:29:42 I personally use https://code.google.com/p/android-remote-stacktrace/ Jan 02 16:29:55 vegetablesalad19: the default theme? Jan 02 16:30:23 storkme: crashlytics.com is nice too Jan 02 16:30:36 that's really shitty Jan 02 16:42:37 I've a big issue with Thread and wait()/notify(). I'm using a thread to send data wrote in a buffer to accessory streams so I will wait this thread till a data is pushed in buffer. The buffer class send a notify() to wait'ed thread when new data are available. To not block the thread (so I can exit programmatically) I'm using wait(ms) so every 200ms the thread should be wakeup. BUT using DDMS trace capture I SAW that thread is ALWAYS running with Jan 02 16:42:38 out respect wait command. Attached code: http://paste.debian.net/73829/ Jan 02 16:42:41 What I mistake ? Jan 02 16:45:06 uh Jan 02 16:45:18 A: Why are you even waiting? Jan 02 16:45:39 So, if I use Thread.sleep(200) I've correctly a thread suspended for 200ms. If I use wait(200) I've a thread which don't stop (sleep) never .... Jan 02 16:45:41 B: Yes, it's "running", but the thread is blocked on a signal, which is ok. If you pause the thread, you should see it blocked in some mutex thing. Jan 02 16:46:11 people, where do i find an example implementation of augmented reality for android ? Jan 02 16:46:33 hey,in dashclock extension my icon is not displaying.I have referenced it correctly. Jan 02 16:46:38 on the internet, by searching for "Android augmented reality implementation" ? Jan 02 16:46:45 when i search there are ads and implementations by other companies but i want a example which does not have any company names in it Jan 02 16:46:58 hey Jan 02 16:47:24 lov: do you know of any examples ? Jan 02 16:47:26 lov so when a thread is in wait it is running in infinite while for mutex differently than sleep which suspend it for the passed time ? Jan 02 16:47:56 solofight: Well, from typing that exact search string, clicking THE FIRST LINK, then clicking through to the first referenced SO question, I see http://stackoverflow.com/questions/1939318/augmented-reality-framework Jan 02 16:48:00 which MIGHT be helpful? Jan 02 16:48:06 shineworld: you haven't answered the question. Jan 02 16:48:10 shineworld: WHY IS YOUR THREAD WAITING? Jan 02 16:48:35 shineworld: the semantics are different but you'll have the same effect wrt power use, etc. Jan 02 16:48:50 lov: hi,in my dashclock extension.icon is not displaying..any idea? Jan 02 16:49:15 cr0: no. Jan 02 16:50:03 lov: it just shows some white square box instead of my icon Jan 02 16:50:05 lov: already looked at it Jan 02 16:50:51 AccessWriteThread is a thread which must wait a content in a buffer (wrotten by other threads) and push incoming data in Accessory stream buffers. The interval of new data in buffer can change between 20 to 200ms so I would like to suspend it till a new data is available. I guess I can put the thread in wait() when I've processed any available data and weakup it (from another thread) with notify() when new data is ready to be processed. Jan 02 16:50:59 cr0: Oh, well, in that case! I still don't know or care, sorry. Jan 02 16:51:20 shineworld: why not just make reading a blocking call? Jan 02 16:51:40 shineworld: also, I'm pretty sure the java multithreading tutorial has this consumer/producer model as its exact case. Jan 02 16:51:52 solofight: sorry, can't help then :( Jan 02 16:52:00 because blocking is threads are a problem when I need to close the app and close the running threads Jan 02 16:52:09 -is Jan 02 16:52:18 lov: o problem thanks for the time Jan 02 16:54:19 shineworld: most blocking operations are interruptible... an important exception is inputstream read which probably only interrupts on a close() Jan 02 16:54:43 socket reads aren't interruptible, unless you use a socketchannel Jan 02 16:54:50 or, like alankila says, you close it Jan 02 16:54:54 how can i have my android phone showing in choose devices dialog in android studio Jan 02 16:54:55 ? Jan 02 16:54:56 but an interrupt on a socket read also closes it Jan 02 16:55:21 as for blocking reads, use nio instead Jan 02 16:55:42 and if you're waiting on shared memory, use wait/notify or any other form of locking Jan 02 16:56:33 jackneill: you make sure drivers for your device are installed Jan 02 16:56:42 canvs2321: linux Jan 02 16:57:08 ok, still need the drivers. are you able to do adb devices in a shell and it list your device? Jan 02 16:57:15 jackneill: is adb debugging enabled on the device? Jan 02 16:57:17 i thought around here linux is the default until they say otherwise Jan 02 16:57:21 lov: no Jan 02 16:57:37 im novice sorry Jan 02 16:57:56 then enable usb debugging&go from there Jan 02 16:57:59 hey guys, do you recommend some content (portal, blog, site) about 'advanced' (beautiful) interfaces development? - of course, excluding official documentation. Thanks :) Jan 02 16:58:32 step one, enable debugging. step two, 'adb devices'. Fails? Read the section on the developer site about making udev rules (or google 'udev adb rule' or something) Jan 02 16:58:38 armoucar: what does advanced mean? if you are following the android design guidelines, you can tweak from there, but how are you wanting it Jan 02 16:58:53 Pratically I'm using Android Open Accessory protocol to how "transport layer" for another proprietary protocol (an industrial gadget) and I'm trying to optimize Android CPU usage in all threads required to manage various communications layers that I need. Till now I've used sleep() which isn't an optimized way to reduce idle time in a thread (I wend from windows world where I was used with WaitForSingle/Multiple Object).... Jan 02 16:58:54 jackneill: what dragorn said Jan 02 16:59:52 however I will search in Android docs about thread and blocking streams Jan 02 17:00:25 shineworld, java Jan 02 17:00:40 jackneill: http://developer.android.com/tools/device.html Jan 02 17:00:43 shineworld, wait/notify/notifyAll Jan 02 17:00:49 shineworld, or any of the locks in java.util.concurrent Jan 02 17:01:00 shineworld: what pfn said. This is java development, not android development, that you're worrying about. Jan 02 17:01:07 Don't search for "android locking", search for "java locking" Jan 02 17:01:17 thanks for info Jan 02 17:01:44 canvs2321: Just some other good place that talk specifically about android iinterface development. But, I understand you, design guidelines is the best place. But I want to see more techniques and code and less guidelines... Jan 02 17:02:26 ok pfn, lov, I was inspired to use wait / notify way (instead of sleep) just reading this web page : http://www.programcreek.com/2009/02/notify-and-wait-example/ Jan 02 17:02:55 4. wait() tells the calling thread to give up the monitor and go to sleep until some other thread enters the same monitor and calls notify( ). Jan 02 17:03:01 armoucar: cool, but what i'm saying is what does advanced mean to you? Jan 02 17:03:07 but seem android don't enter in any form of sleep calling wait() Jan 02 17:03:20 armoucar: like optimized, or animation tricks etc.. Jan 02 17:03:21 canvs2321: beautiful. Jan 02 17:03:55 canvs2321: animation tricks is a good start. Jan 02 17:03:57 shineworld: looked at your code. not enough info but i think you have it backward and you need to lock on synchronize on something. the worker thread locks and then when done, notifies waiter. the main thread waits Jan 02 17:04:07 armoucar: still pretty broad. beautiful as in graphically/visually, or beautiful flow Jan 02 17:04:39 when i say main i don't mean the ui thread... please don't do waits on the ui thread. Jan 02 17:05:18 usb debugging is disabled for me Jan 02 17:05:19 canvs2321: hey, let's talk in general so. Some another portal (except official guidelines) that provides a good reading about any kind of android interface creation. Jan 02 17:05:30 ok I will try adding synchronized(mythread) Jan 02 17:06:40 armoucar: check out some of the most recent google i/o youtube videos. they usually deal with making things beautiful. Otherwise, just google & read blogs of current that apply to your idea of beautiful UI/UX design. it's an ever evolving situation Jan 02 17:07:23 canvs2321: thank you so much, mate! ;) Jan 02 17:07:53 so to pinpoint one URL is obsolete the minute after it's created :), but i'm sure you can find tricks all over. But you need to dial in specifics, don't keep it so broad as a whole app, think of it more as i want a view to do this when a user does this Jan 02 17:08:01 fmj47, YOU are right... I've missed that wait() need synchronize to works... SO.. I'm a noob .... Jan 02 17:08:14 get detailed in your question of beautiful, and you'll find your searching more efficent Jan 02 17:08:20 thank you for help Jan 02 17:08:42 what to do when usb debugging is disabled on the device? Jan 02 17:08:48 enable it Jan 02 17:08:58 the option is disabled i cant Jan 02 17:09:04 take out the usb Jan 02 17:09:07 enable it Jan 02 17:09:09 * CallumTaylor put usb back in Jan 02 17:09:38 i see thanks Jan 02 17:09:46 in settings, if you don't have developer options, goto about phone, tab build like 7 or 8 times and it'll give you it Jan 02 17:09:56 go to system info and push 10 times on last item (kernel version) to enable developper status Jan 02 17:10:04 np. btw, that wait was waiting for "this", which it it has (signaled) so it flies right through it Jan 02 17:10:04 or dat :) Jan 02 17:19:14 I'm surprised the Messaging app works as well as it does: https://github.com/android/platform_packages_apps_mms/tree/master Jan 02 17:19:27 no wonder it was scrapped for Hangouts, it needed a total rewrite Jan 02 17:37:09 Anyone in here can help me with listviews and tabs not showing? Jan 02 17:37:47 helicopter88: don't ask to ask Jan 02 17:38:01 evanc, wanted to know just if there was someone avail Jan 02 17:38:17 2 secs and will paste the code Jan 02 17:38:21 just state what you're trying, what you're expecting, what you're seeing. If someone is around who can help, they'll answer Jan 02 17:39:19 JuiceSSH: I realise this is an hour after your suggestion but I just signed up for crashlytics, it seems a bit 'too good to be true'.. they're offering it all for free? Jan 02 17:40:15 http://pastebin.com/8gQ12dLu (irrelevant parts in the middle are skipped,setUpView() is called) Jan 02 17:40:45 TabHost doesn't seem to show as all I get is an empty black screen,instead there should be 3 tabs with each one containing a List Jan 02 17:41:25 (3 different lists) Jan 02 17:42:36 hey what the fuck is this gradle? sorry for my language. Jan 02 17:43:17 https://www.google.dk/search?q=define%3A+gradle Jan 02 17:47:06 helicopter88: are you tab's id's named tab1, tab2, tab3? Jan 02 17:47:12 yea Jan 02 17:47:40 and your lists are list0, list1, list2? Jan 02 17:48:13 listView0,1,2 Jan 02 17:50:35 shouldn't the tabs appear even if empty? Jan 02 17:59:54 has an offline speech recognizer become available? Jan 02 18:00:19 any sort of API i can tap into thats on the device Jan 02 18:05:27 test Jan 02 18:09:21 this doesn't make any sense,I even switched to a manual monotab setup.. Jan 02 18:20:28 guys, whats the best way to add a number badge (like ios) on a button ? Jan 02 18:23:48 use a framelayout or something to contain a button and badge Jan 02 18:24:02 easiest way Jan 02 18:24:23 harder way, implement your own button with statelist drawables that compose the button background and number badge Jan 02 18:25:10 pfn, can the badges be drawn programmatically, or i need to prepare before hand a handful ? Jan 02 18:25:25 you can do it programmatically, need to prepare some images first to make it easiest Jan 02 18:25:29 images in xml Jan 02 18:31:28 pfn, can the badges be drawn programmatically, or i need to prepare before hand a handful ? (sorry I got disconnected, unsure if you got this first) Jan 02 18:38:20 Does the nexus4 xhdpi with api level 19 work for anyone? Jan 02 18:38:42 Ok, nevermind it started this time Jan 02 18:41:16 Hello. Any ActiveAndroid user here ?, i am considering to use it but i wonder how mature is it. Would you recommend it over ORMLite or GreenDAO ? Jan 02 18:45:28 Does anyone have a good idea/method to sending a local file (mp4) to an external html5 video player? Jan 02 18:46:18 r0ver: I'm using GreenDAO and I love it Jan 02 18:46:58 jaynewstrom: what do you like most ? Jan 02 18:47:22 I have a ActionBar with a ViewPAger, but when I swipe, the selected ActionBar item doesn't highlight. here's the adapter for it that implements two interfaces: http://pastebin.com/qNdcqgZd Jan 02 18:47:33 r0ver: makes all the easy things easy. like an orm should. but gives you access to write custom queries for complicated things when needed. Jan 02 18:47:39 I am having an issue playing audio from file using a webview: "XMLHttpRequest cannot load file:///android_asset/mysound.mp3. Origin null is not allowed by Access-Control-Allow-Origin." Jan 02 18:48:51 almost as if there are xss concerns... Jan 02 18:50:11 lov: that's what I'm thinking, is there a way to toggle off the security in a webview? Jan 02 18:50:34 or purhaps another method to handle audio from html? Jan 02 18:55:29 I'm updating a library module. I can't make IntelliJ IDEA to import classes from updated library module. How do I do that?? Jan 02 18:57:11 also the library module has weird file icons in IDEA... Red "J" symbol - what does it mean? Jan 02 19:02:10 all gone? Jan 02 19:03:42 osmij_: for the red "J"... http://stackoverflow.com/questions/2728333/intellij-icon-over-project-files Jan 02 19:05:55 alexfu: Thanks!!! Jan 02 19:06:32 so simple... just mark src folder as source... Jan 02 19:11:07 how to properly restart video when it's finished? I need to restart a video stream and simply .restart() of MediaPlayer doesn't work... Jan 02 19:17:21 osmij_: 1) there isn't a restart() on MediaPlayer, 2) the docs say how to do this: While in the PlaybackCompleted state, calling start() can restart the playback from the beginning of the audio/video source. Jan 02 19:23:04 i do: mainListView.setBackgroundColor(color.background_dark); but my list items are still white. how do I set their color? and how do i set the color of the text? Jan 02 19:26:07 Hey guys! I am trying to find "up" through my device, but my device is lacking a gravity sensor. How could I find where is up and down without that sensor? I thought of using two values from the magnetic sensor, and calculate their cross product. That would give me a vector pointing up or down Jan 02 19:27:30 wilornel: gravity sensors aren't required? weird Jan 02 19:28:44 wilornel: Well, I have a samsung tablet. It's not a galaxy, it's cheaper Jan 02 19:29:02 evanc: Jan 02 19:30:24 wilornel: yeah, just looked at the current CDD and see that it says "Device implementations SHOULD include a 3-axis accelerometer." Jan 02 19:30:31 weird, I definitely thought it was required Jan 02 19:30:45 Well I have an accelerometer, but no gravity sensor Jan 02 19:30:51 evanc: ^ Jan 02 19:30:55 Is the `com.google.android:support-v4" on maven the same as the Android Support Library in the SDK? Jan 02 19:31:04 wilornel: those are one and the same, wilornel Jan 02 19:31:17 evanc: TYPE_GRAVITY and TYPE_ACCELEROMETER? Jan 02 19:31:34 wilornel: sitting on a table, the 3 axes should read out [0.0,0.0,-9.8] (in theory) Jan 02 19:31:44 evanc: Yes Jan 02 19:32:01 evanc: But TYPE_GRAVITY and TYPE_ACCELEROMETER aren't the same Jan 02 19:32:29 Wow. Bigger room than I would have guessed. Jan 02 19:32:29 oh yeah, TYPE_GRAVITY was added in API 9. Weird; I'll do some reading Jan 02 19:32:45 evanc: Sooo.... is my solution any good? Jan 02 19:33:11 in the meantime, can't you use the accelerometer to get "down"? Jan 02 19:33:24 evanc: Well, not if the user is in movement Jan 02 19:33:30 wilornel: why not? Jan 02 19:33:34 just poll the acclerometer Jan 02 19:33:45 [0,5,9.8] Jan 02 19:33:55 how do I know where is down? Jan 02 19:34:10 it seems way better than trying to do some magnetic field cross-product Jan 02 19:34:13 say it is, [0, 5.1, 9.7] Jan 02 19:34:25 Well, I don't see HOW through the accelerometer Jan 02 19:34:41 It might be better, I don't understand it Jan 02 19:34:58 ooooh, I'd need to use the orientation Jan 02 19:35:02 yeah Jan 02 19:35:10 Alright got it Jan 02 19:35:15 i do: mainListView.setBackgroundColor(color.background_dark); but my list items are still white. how do I set their color? and how do i set the color of the text? Jan 02 19:35:17 there are, of course, edge cases Jan 02 19:35:24 evanc: example? Jan 02 19:35:28 for example, if you're in free-fall, there won't be a "down" Jan 02 19:35:36 evanc: Obviously Jan 02 19:35:38 haha Jan 02 19:35:52 evanc: :P But I'm not planning to have my users jump of cliffs Jan 02 19:35:52 but it should work pretty reliably for 99% of cases Jan 02 19:36:02 evanc: Yeah, gotcha Jan 02 19:36:07 wilornel: hey, what you plan for and what users do isn't always the same Jan 02 19:36:10 :P Jan 02 19:36:18 evanc: hahahahah! XD Jan 02 19:36:20 crashlytics successfully integrated into my app, let's try that release again..... Jan 02 19:50:42 storkme: do you like crashlytics? thinking about adding it to our app Jan 02 19:51:04 ask me again in a week :) Jan 02 19:51:11 meh :) Jan 02 19:52:39 does anyone know how to force the actionbar overflow menu to show up in the actionbar on a galaxy s3? On a more stock phone, the actionbar menu shows up fine. Jan 02 19:52:58 haha, I'm on vacation all next week. how about 2 ;) Jan 02 19:53:36 sounds good to me Jan 02 19:54:04 The setup sucks bigtime Jan 02 19:54:09 i'm a shitty developer and some of my users are experiencing crashes i can't replicate, so i'm sort of running out of options here. Jan 02 19:54:33 hahahaha Jan 02 19:55:27 Unless you like unnecessary ide plugins (and gradle plugins if you're using that) Jan 02 19:55:55 storkme: they're not submitting crash reports? Jan 02 19:56:27 dragorn: noone does Jan 02 19:56:47 they didn't see the button apparently Jan 02 19:57:18 SimonVT: I've had moderate luck with people reporting things, but my audience is techy Jan 02 19:57:38 It's like a 100:1 ratio between crashes and reports in the dev console Jan 02 19:57:39 storkme: at least you're honest :3 Jan 02 19:57:59 i'm trying my best Jan 02 19:58:10 Which is, by your own admission, inadequate. Jan 02 19:58:20 indeed :( Jan 02 19:58:25 Gotta do betterer Jan 02 19:58:33 yep :( Jan 02 19:59:07 how do i set the color of a textView, i just cannot find it...? Jan 02 19:59:34 of the text itself? Jan 02 19:59:37 or do i set it at the parent view? Jan 02 19:59:44 no the text ic an set, but the background Jan 02 20:00:00 http://developer.android.com/reference/android/widget/TextView.html Jan 02 20:00:02 Search for "background" Jan 02 20:01:11 How can I add a DayDream to an app while keeping it compatible with API 7 (of course no DayDream on lower than 17) Jan 02 20:01:20 Only way I can think of is have 2 versions.... Jan 02 20:02:23 frankdrey: It should be possible. Check out backwards compatibility articles. Jan 02 20:02:32 Don't touch your dream code below api17 Jan 02 20:05:07 ok, reading the articles.. Jan 02 20:06:11 wait... Jan 02 20:06:21 IntelliJ suggested to put a "@TargetApi" Jan 02 20:06:26 * frankdrey looks up what that is :P Jan 02 20:06:36 That's just an annotation for lint Jan 02 20:08:40 ok, but if the older system never calls that service (cause it can't), it shouldn't cause any problems right? Jan 02 20:09:06 I was wondering what testFunctionalTest attribute available in gradle what exactly means/does. Any hint? Jan 02 20:09:36 right Jan 02 20:09:50 frankdrey: Right, as long as the classloading never happens for something you don't support, older devices won't have trouble. Jan 02 20:09:59 If the code isn't reached it will not crash Jan 02 20:10:25 ok, cool, thanks :) Jan 02 20:10:54 will it also ignore the service declaration in the manifest? Jan 02 20:11:34 It will see that there's a service, but unless something actually starts it there shouldn't be any issues Jan 02 20:11:44 hmm interesting, android studio actually can build android apps without gradle Jan 02 20:11:58 ok, thanks Jan 02 20:12:02 If you want to be sure you can add android:enabled and a bool in values/ and values-v17/ Jan 02 20:12:21 listview: i want my background black and my items black but i want a white separator between each item. how do i do that+ Jan 02 20:12:32 I think it's controlled by whether you have android, or android-gradle facet on the project Jan 02 20:12:37 or, well, module Jan 02 20:13:32 Where can I get a frame of a Nexus 5/4? Jan 02 20:13:36 Fritiof: just set black background and white divider. What have you tried? Jan 02 20:13:40 With actionbar and everything Jan 02 20:13:53 To design my app in photoshop Jan 02 20:14:39 though, I can't be sure. I guess I'll just work without gradle for now. Jan 02 20:17:28 strange... i'm getting a “IBitmapDescriptorFactory is not initialized” error even though my GoogleMap instance != null Jan 02 20:20:06 nvm, got it Jan 02 20:22:30 guys what does this mean? Jan 02 20:22:31 Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. Jan 02 20:22:51 hold up ill google it Jan 02 20:23:39 trying to write android apps while keeping line lengths < 80 characters seems like a futile effort. Jan 02 20:26:12 80 seems pretty low for any java Jan 02 20:26:38 If I want to color every second item item in a listView the same way, ie dark grey then light grey then dark grey how do i do that? Jan 02 20:27:20 %2 ==1 of ots even and == 0 if its odd Fritiof Jan 02 20:27:58 JesusFreke: Is there a standard line length for java? I always use 80 because of git Jan 02 20:28:08 Or a "suggested" line length, rather Jan 02 20:28:13 ListView.getCheckedItemPosition() I think Jan 02 20:28:20 and then check if its even or odd Jan 02 20:28:27 and change the color from their on your behalf Jan 02 20:29:10 I don't think there is a standard line length. I have a line over 150. Jan 02 20:29:47 Anyone here use HAXM? How's it going? Jan 02 20:29:52 According to this: http://www.javaranch.com/styleLong.jsp#length 120 is recommended. Jan 02 20:30:01 I just hate side-scrolling and wrapping text Jan 02 20:30:12 the language doesn't care. Your coworkers may. Jan 02 20:30:38 I think I use 100 Jan 02 20:30:55 and `git diff` isn't friendly with 150+ characters Jan 02 20:33:47 yeah i know how to do it modulus. but checkitemposition cannot be right. i have 4 items and i want to color them from the start Jan 02 20:35:23 http://lmgtfy.com/?q=android+listview+color+every+other+item Jan 02 20:39:29 Question. If I do a reset will it pull all changes until the most recent commet and remove all others? Jan 02 20:42:35 AndreYonadam: Git reset? Jan 02 20:42:57 yeah Jan 02 20:44:25 a git reset simply resets back to a specific commit. so if you reset to commit X, your project will have w/e was in commit X Jan 02 20:49:58 Any idea why when I try to find the orientation of the device using getRotationMatrix followed by a getOrientation, I have an azimuth that alternates between -0.4 and 2 all the time? Jan 02 20:50:18 Well, at a given position Jan 02 20:50:25 Suggestions for improvementes on this layout? http://gyazo.com/669d075e0347f1e7fe8873a4cffa8619.png Jan 02 20:51:20 If I rotate the device on my table, it start alternating from -0.8 and 2.3. Sometimes it goes up to 3.88 Jan 02 20:51:55 starts* Jan 02 21:00:49 hey when you start out making an app do you make all the activities first or do you do them one at a time. I have a wire frame design down on paper and was thinking of next making all the different screens quickly on the phone to see how it flowed on the actual phone. Jan 02 21:01:01 Just wondering how everyone else goes about it Jan 02 21:02:09 matt1982_ paper prototyping can be a smart thing to do; i doubt everyone does it the same way ;) Jan 02 21:02:56 yeah true i was just wondering how everyone sort of starts their app Jan 02 21:06:38 paper prototyping is a must, imo. Jan 02 21:06:44 (or whiteboard can work, too). Jan 02 21:07:00 What's the best way to come up with keys for http://jakewharton.github.io/DiskLruCache/ Jan 02 21:07:14 SHA1 or MD5 something Jan 02 21:07:34 or a URL if it'll never change contents Jan 02 21:07:48 actually don't use a URL Jan 02 21:07:51 lol Jan 02 21:08:04 the charset is forced to a-zA-Z0-9_- Jan 02 21:08:11 ah yeah Jan 02 21:08:16 does anybody mind if I post my shitty app in here? it's a very simply content app with few permissions (only internet), but I'd be greatful for any and all feedback (plus if you break it, I'll get sent a crash report so I can fix it :D) Jan 02 21:08:55 storkme: It's easier to ask for forgiveness than it is permission Jan 02 21:09:11 shouldn't that be the other way round? :p Jan 02 21:09:18 Anyone has any idea why getOrientaion when used along with getRotationMatrix gives values that sometimes differ to the median(or is it the mean?) Jan 02 21:09:29 differ from* Jan 02 21:09:58 storkme, yeah I find the paper way helps me personally. I was just wondering after that what would be your next step? Jan 02 21:10:17 stormke: http://en.wiktionary.org/wiki/it's_better_to_ask_forgiveness_than_permission Jan 02 21:11:13 Huh, apparently Grace Hopper is quoted as creating that saying Jan 02 21:11:42 after drafting out the user flow, I'd then go on to identify common elements (i.e. services or singletons) that multiple parts of the app might use, then I'd probably look for commonalities in the UI (e.g. seeing if I can write one single fragment to handle multiple cases) Jan 02 21:12:46 well, since nobody seems to be objecting... https://play.google.com/store/apps/details?id=org.storkme.db9 any and all feedback and criticism welcome. Jan 02 21:13:03 ahh cool thats good to know. Im enjoying learning other peoples methodologies on how they go about this task etc. I'm from a web world so I generally start with data and work back. Jan 02 21:14:49 matt1982_: personally I find that with apps, usually the experience is user-focused, so I like to plot out the main 'story arcs' people might take through the app, and then try and identify commonalities. Jan 02 21:15:54 matt1982_: this is focused for mobile web, but the general idea translates well to app design: http://mobile.smashingmagazine.com/2011/05/02/a-user-centered-approach-to-mobile-design/ (that website has a lot of other great design resources too.) Jan 02 21:16:16 <|Agent> Question about an activity's options menu: when the user selects a menu item and you return true from onOptionsItemSelected, does the OS close the menu, resulting in a call to onOptionsMenuClosed? Jan 02 21:16:25 ahh thanks storkme thats really good great stuff Jan 02 21:18:22 Im looking at an example with alternatig rowcolor for a menu but what is this: import com.example.com.pavan.customized_listview.R; ? Jan 02 21:18:22 http://www.pavanh.com/2013/07/android-listview-with-alternative-item.html Jan 02 21:20:20 Fritiof: it's the application specific R class Jan 02 21:20:53 Fritiof: which contains res IDs for all resources in your res/ dir Jan 02 21:22:14 Hey guys, I'm trying to determinate which vector would be pointing down from the device's coordinate system. How can I do so using the orientation sensor? Jan 02 21:23:13 wilornel: using your right hand, place your thumb along the short axis in portraid mode and your index along the long edge. Your middle finger points towards z. Jan 02 21:23:28 therefore, negative z values would point "down", that is, through the screen Jan 02 21:24:28 alternatively, if you meant "down" in terms of actual earth gravity, well, you already have that vector, it's what the accelerometer gives you Jan 02 21:34:47 alankila: Yeah, but what if the device is in movement? At such moment, the accelerometer will have the gravitational force and the acceleration of the user. Jan 02 21:35:41 I need two things. Filter out the gravitational force from the accelerometer and the dot product from that over the down or up unit vector, relative to the earth Jan 02 21:36:02 does the n7 wireless charger *have* to be fastened to something permanent ? Jan 02 21:36:22 yes... well, there is a more sophisticated answer which involves combining gyroscope and accelerometer into one synthesized orientation reading Jan 02 21:36:35 g00s: don't think so Jan 02 21:37:04 alankila: I don't have a gyroscope :/ Jan 02 21:37:51 JesusFreke seems like upside down trapezoid; no suction cups - i dont see how this stays stable otherwise Jan 02 21:37:55 well, then low-pass filtering the reading from accelerometer is probably the best you can do, or ignoring the problem entirely. Jan 02 21:38:26 So, the accelerometer provides me with three values which can be treated as a 3D vector. I need to separate 9.8N into the three axises depending on the orientation of the device Jan 02 21:38:33 g00s: what are you trying to fasten it to? a basketball? Jan 02 21:38:41 alankila: No, I can do better Jan 02 21:38:46 evanc hehe, my forehead Jan 02 21:38:50 I have the orientation and I have the accelerometer Jan 02 21:38:59 g00s: there's plenty of surface area on the bottom still Jan 02 21:39:05 nothing in particular actually. i want to be able to take it with me Jan 02 21:39:09 Thus, I can remove the 9.8N from the accelerometer, I just do not know how Jan 02 21:39:12 JesusFreke ok Jan 02 21:39:21 g00s: it's not like it's going to tip over or anything; it's only like 1/3" of an inch thick Jan 02 21:39:37 getOrientation gives me three values, but I do not know how to use them with 9.8N to remove the gravitational force from the accelerometeer Jan 02 21:39:46 ok, so its fine for charging on the go then - as long as i have a flat surface ? Jan 02 21:40:06 wilornel: I would suggest highpass-filtering the accelerometer reading in that case. A fixed component vanishes Jan 02 21:40:33 sounded like it came with some kind of adhesive Jan 02 21:41:09 i think my mini-usb port is starting to have too much play; i hate mini-usb ! Jan 02 21:41:13 the result from getorientation is not based on magic. it is just based on accelerometer and magnetometer most likely, and the general coarse location of the device to correct for magnetic declination Jan 02 21:41:41 what do you have that still uses mini-usb? Jan 02 21:41:57 the n7 port is mini-usb Jan 02 21:42:03 micro Jan 02 21:42:04 or micro? Jan 02 21:42:07 ah, k Jan 02 21:42:20 with micro, the spring is on the cord Jan 02 21:42:44 so you can probably just get a new cord Jan 02 21:43:03 with mini, the spring was in the port... which tends to be slightly harder to replace :) Jan 02 21:43:11 Micros are so nice. Jan 02 21:43:14 alankila: Alright so since the accelerometer is based on the orientation, I cannot use the orientation to remove the gravitational force from the device? Jan 02 21:43:22 ok; yeah i was worried about wearing out that port. maybe the cable just needs replacing then. thanks Jan 02 21:43:26 would some one be able to assist with a robolectric question? Jan 02 21:43:27 device's acceleloremeter readings?* Jan 02 21:44:31 no. The orientation is based on the acceleration, not vice versa. Jan 02 21:44:52 Anyone know how to bring the keyboard down when use taps out of editext? Jan 02 21:45:02 it is a far more higher order result. The acceleration is raw data Jan 02 21:45:28 and the acceleration is given in the device coordinate system Jan 02 21:46:11 removing this is simple if you had gyros, because that's exactly what the gyros would give you. Sadly, without gyros you simply have to high-pass filter the fixed acceleration out. I don't think you can do much better than that. Jan 02 21:47:35 one other point of note is that at least your typical accelration chip gives pretty noisy data out. IIRC one chip averaged 128 consequtive samples for each reported measurement and it was still jittery Jan 02 21:47:59 so those things suck Jan 02 21:48:07 What's the point of the appVersion in https://github.com/JakeWharton/DiskLruCache Jan 02 21:48:12 was called bcm150 or something like that. I can't remember, thoguh. Jan 02 21:48:21 yiati: bumping purges the cache Jan 02 21:48:34 it avoids migrations and supporting multiple versions of your cached data Jan 02 21:48:39 almost remembered it. BMA150 Jan 02 21:49:22 hmm okay Jan 02 21:51:20 how do i use strings defined in xml programmatically? Jan 02 21:52:05 context.getString(R.string.mystring); Jan 02 21:52:24 If I get support lib v 8 does that replace v4? Jan 02 21:52:52 AndreYonadam: the v means the version you are targeting. If you have v4, you're supposed to be compatible to api4 Jan 02 21:53:01 AHH Jan 02 21:53:07 Thanks! Jan 02 21:53:40 * alankila is kind of waiting for his phone to get v19 to take jdk8 features to a test drive Jan 02 21:54:07 Suggestions for improvements on this layout? http://gyazo.com/669d075e0347f1e7fe8873a4cffa8619.png Rating also appreciated Jan 02 21:55:00 autrilla: I would suggest adding a bottom half Jan 02 21:55:09 yiati, ... Jan 02 21:55:18 This is meant to be a serious channel! Jan 02 21:55:37 autrilla would be nice if "5 attending" was aligned with something Jan 02 21:55:50 seems kinda just floating out there Jan 02 21:55:51 g00s, yeah.. but with what...? Jan 02 21:56:14 either the middle of the diamond, or the middle of the box Jan 02 21:56:21 maybe created by and attending can be the same chunk of text Jan 02 21:56:44 and "created by" is probably noise Jan 02 21:56:45 design is minimalism. Perhaps. Jan 02 21:56:46 alankila: What phone do you have? Jan 02 21:56:53 eh, just a galaxy s2 Jan 02 21:57:06 getting long in the tooth I guess Jan 02 21:57:16 alankila: I own an iPhone for personal use because my parents brought me it but I'm getting a Gnexus today in the mail Jan 02 21:57:17 Can't wait Jan 02 21:57:21 g00s, by noise you mean not needed? (I'm not a native speaker) Jan 02 21:57:28 autrilla yeah Jan 02 21:57:30 I see the mail truck but its snowling like crazy so Idk how long its going to take him Jan 02 21:57:34 Probably, yes. Jan 02 21:57:51 I don't see a lot of interest from the user perspective in knowing who created it Jan 02 21:57:58 I'll just put the 5 attending there instead Jan 02 21:58:40 Guys I have another question. I created a really usefull class thats a view that graphs functions pretty niceley. I want to make this public. Should I make it a library? Jan 02 21:58:57 AndreYonadam, screenies Jan 02 21:59:34 If it really is good, I'd go ahead Jan 02 22:00:47 I have a ActionBar with a ViewPAger, but when I swipe, the selected ActionBar item doesn't highlight. here's the adapter for it that implements two interfaces: http://pastebin.com/qNdcqgZd Jan 02 22:00:58 autrilla: one sec Jan 02 22:02:10 Too much whitespace, maybe? http://gyazo.com/92af70b95c910d50dfc85e634e611f22.png Jan 02 22:03:12 Hey guys! What vector would I get if I just did cos on all the values returned by getOrientation or by the TYPE_ORIENTATION sensor? Jan 02 22:04:33 something between -1 and 1? :) Jan 02 22:04:59 the output of cosine isn't a vector Jan 02 22:05:31 JesusFreke: Hah! I was talking about taking all 3 values of the orientation sensor, cosining them and storing them in a vector Jan 02 22:05:40 the cos of each value would be stored as a value along an axis Jan 02 22:05:45 ah, gotcha Jan 02 22:05:59 vector1[0] = cos( event.values[0] ); Jan 02 22:06:05 as I'm sure you can guess, feel free to ignore my facetious answer :) Jan 02 22:06:08 would that give me a vector pointing up or down? Jan 02 22:07:09 See the coordinates system for the accelerometer? I want to find a vector pointing to the sky or to the ground in that coordinates system Jan 02 22:07:28 the ground is easy, that's just the values you already have Jan 02 22:07:36 the sky is easy, that's just all the values multiplied by -1 Jan 02 22:07:48 these vectors will be defined in the device coordinate system of course. Jan 02 22:07:51 "all the values" which ones?? Jan 02 22:08:13 well the accelerometer returns 3 values, typically called x, y and z. Those values. Jan 02 22:08:14 I do not care if it's the device coordinate system or not, I just need the coordinate system to be consistent Jan 02 22:08:29 alankila: Ah! For the accelerometer it's easy Jan 02 22:08:45 But I want to transform the angles provided by the orientation sensor into a vector Jan 02 22:09:10 That vector would be in the device's coordinate system if I just cosine every angle? Jan 02 22:10:33 Ugh! It's such a simple math problem Jan 02 22:10:36 the orientation sensor is that yaw, roll, pitch crap? Jan 02 22:10:52 alankila: I don't even know, there are so many ways to calculate the orientation Jan 02 22:11:27 it's deprecated anyway Jan 02 22:11:35 alankila: What replaced it? Jan 02 22:12:20 wilornel: http://stackoverflow.com/questions/10291322/what-is-the-alternative-to-android-orientation-sensor Jan 02 22:12:25 alankila: I'm not using the orientation sensor, I use Jan 02 22:12:35 that ^ Jan 02 22:12:35 hmm, I'm not sure what you are doing. Maybe if you're working with a call called getOrientation() you aren't using the actual TYPE_ORIENTATION thing Jan 02 22:12:48 exactly, I am using getOrientation() Jan 02 22:13:01 which is the replacement for TYPE_ORIENTATION Jan 02 22:13:12 which does work with pitch,roll, azimuth, yaw, paw, w/e Jan 02 22:14:25 So, now that I have a quaternion representation of my device's orientation, how do I transform that to a vector similar to one returned by the accelerometer? Jan 02 22:16:00 ... why don't you just use the result from accelerometer directly? For instance, is it important that you know the direction towards true North? Jan 02 22:16:46 It is important I know where is the sky or the groound Jan 02 22:16:48 ground* Jan 02 22:17:14 well as I mentioned, that information is easily obtained as the accelerometer hands you an estimate for that dozens of times per second if you ask it Jan 02 22:17:23 and sky is in the opposite direction of the ground, so that's easy too Jan 02 22:17:46 alankila: No, the accelerometer will not give me what I need if the user is moving Jan 02 22:17:49 http://www.pavanh.com/2013/07/android-listview-with-alternative-item.html <- how would you set the background for that program? i tried adding android:background to the linear layout but it has no effect Jan 02 22:18:36 you mean if the user is accelerating. But, there is no way the "getOrientation" can do any magic either. It's based on these same vectors, the orientation will change because without a gyroscope it's not possible to distinguish acceleration from gravity. Jan 02 22:19:04 oh. Jan 02 22:19:58 So there is NO way I can use the getOrientation solution to find out where is the sky or the ground? Fine, then I will calculate that through the gyroscope when the user is not accelerating Jan 02 22:19:59 I haven't really seen any code that combines accelerometer and gyroscope either. I'm wondering if there's some code in the SDK that accomplishes it -- a true orientation sensor system, or best effort for one Jan 02 22:20:26 that through the accelerometer* when the user is not Jan 02 22:20:28 you mean through the accelerometer, as you said you have no gyroscope Jan 02 22:20:43 brain farts everywhere... Jan 02 22:21:09 That lack of solutions is getting me pretty sad right now... Jan 02 22:21:42 I tried a cross product with two vector provided by the magnetic field sensor, it gave me whatever... Jan 02 22:22:19 If I have to vector pointing north, then a vector perpendicular to both of those vectors would be pointing to the ground or to the sky Jan 02 22:22:21 didn't work Jan 02 22:22:34 not the orientation sensor will not work if the user is accelerating, which is weird Jan 02 22:22:38 now* Jan 02 22:22:56 the cross between magnetic field vector and the acceleration vector is a third vector that I imagine points towards West or East. It could be used to build an orthonormal base Jan 02 22:23:02 no Jan 02 22:23:08 the cross between two magnetic field vectors Jan 02 22:23:18 err... what two magnetic field vectors? Jan 02 22:23:59 well, I was also considering a magnetic field vector and acceleration vector as you mentioned, but when I remembered the accelerometer takes the gravity into account, I thought it was impossible Jan 02 22:24:42 I thought it was impossible to calculate a vector pointing to the sky or the ground because not both the vectors are horizontal. I'd have to remove the gravitational factor from the accelerometer for that Jan 02 22:25:12 And to do so, I'd need to remove 9.8N total from the three forces provided by the accelerometer Jan 02 22:25:40 Anyways, I'll just have to use a low-pass filter when the user is not accelerating Jan 02 22:26:27 * alankila observes that there exists now a thing called ROTATION_VECTOR Jan 02 22:26:30 so how do i set the background of the mainactivity? Jan 02 22:26:39 this might be promising -- maybe someone does all the hard lifting to work out the orientation Jan 02 22:27:47 Hi, so I am messing around with BitmapFactory.decodeFile and getting OutOfMemory problem, which does not seams uncommon... I checked out the "Loading Large Bitmaps Efficiently" and did the according changes, but the application is still getting outofmemory exception... The funny thing is that is it not getting it the first time an image is loaded just the second time... is there some cache or anything else that I can clear? Jan 02 22:28:24 The work is performed in an AsyncTask that is nulled on destry Jan 02 22:28:29 TYPE_ROTATION_VECTOR does not exist on my device Jan 02 22:28:33 Ugh! Jan 02 22:29:25 It's imho a mistake to force users to deal with the raw sensors. They want useful data which makes best possible use out of the hardware available and reports back the quality of these values. Jan 02 22:29:54 What? Jan 02 22:30:18 The users being the developers? Jan 02 22:30:44 well, yes, the users of the SDK ... that would be the developers of applications Jan 02 22:31:53 alankila: have you looked at http://processing.org/ ? Jan 02 22:32:06 The idea is to allow the developers to use the data as freely as possible. But yeah, there should be some functions that make most of the work easier Jan 02 22:33:02 outlaw84: briefly Jan 02 22:33:24 wilornel: well the devices aren't standardized and this stuff is pretty tricky Jan 02 22:33:39 packaging the magic into easily used function seems like the kind of service lazy gits like me would appreciate Jan 02 22:33:49 True! Jan 02 22:36:55 alankila: As I understand that is exactly what "processing" does Jan 02 22:39:30 Hello Jan 02 22:39:39 what's the strategy to find out what an app crashes? Jan 02 22:39:56 it happened to me a few times today that an app crashes unexpectedly Jan 02 22:40:00 and the exception is not captured Jan 02 22:40:05 so eclipse prints the stacktrace Jan 02 22:40:10 and that's it Jan 02 22:40:24 it's impossible to find an error like that... Jan 02 22:42:05 Mattx: if you have the stacktrace, you know where it crashes Jan 02 22:42:19 no, actually Jan 02 22:42:30 I'm trying to find the last line of code that were executed Jan 02 22:42:48 but hmn.. what if it's due to the manifest, or a layout? Jan 02 22:43:31 Mattx: yes, that's what the stack trace tells you. Jan 02 22:43:46 an exception can't be "caused" by a manifest or layout, directly Jan 02 22:43:58 the exception happens in code Jan 02 22:44:19 it can be indirectly caused by the manifest or layout, of course. i.e. an exception in code that is reading the manifest/layout or something Jan 02 22:44:41 well, it's not that useful, let me see if I can paste it Jan 02 22:44:47 but you still have the stacktrace that tells you the exact line of code where the exception occured Jan 02 22:44:48 Too much whitespace, maybe? http://gyazo.com/92af70b95c910d50dfc85e634e611f22.png What would you change? Jan 02 22:45:51 http://www.apaste.info/4Q0w Jan 02 22:45:57 JesusFreke, have a look Jan 02 22:46:35 java.lang.IllegalArgumentException: eglChooseConfig failed EGL_NOT_INITIALIZED Jan 02 22:46:37 WTF? Jan 02 22:46:59 yeah, no clue on that one :) Jan 02 22:47:32 maybe it's an error in the emulator, I'll restart genymotion just in case Jan 02 22:48:09 http://stackoverflow.com/questions/13640139/egl-emulation-failed-to-establish-connection-to-host-android Jan 02 22:48:16 "Oh!.. a simple restart of the emulator solved the problem for me. :)" Jan 02 22:48:22 "What the hell? Same problem and definitely didn't solve it for me." Jan 02 22:48:23 lol Jan 02 22:50:11 worked for me Jan 02 22:50:12 weird Jan 02 22:52:25 Mattx i see that on genymotion once in a while Jan 02 22:52:44 not sure if its an android / emu / vbox issue Jan 02 23:00:06 hello. What android channel is the proper one to ask for android pdf-viewer application with available sources? Jan 02 23:21:19 la t Jan 02 23:24:08 How can I make an icon scale as much as it can to remove transparent border? Jan 02 23:24:21 It looks like this: http://gyazo.com/53d7ac2e2c07e44b9b94a15410d4fe4d Jan 02 23:38:44 FIXED! woohooooooooo Jan 02 23:47:54 Does Holo light have a gradient as a background? Jan 02 23:50:46 What's the preferred way to format a date string? http://stackoverflow.com/a/456941/885036 seems a little overkill Jan 02 23:51:38 http://stackoverflow.com/a/456941/885036 Jan 02 23:51:40 bricker, this one http://stackoverflow.com/a/456941/885036 Jan 02 23:51:41 oops my bad Jan 02 23:59:53 arg, I keep getting "incompatible types" when I try that method Jan 03 00:00:53 I worked around it but this seems a little messuy Jan 03 00:00:55 messy* Jan 03 00:00:56 oh well Jan 03 00:08:39 Has anyone experienced building on Eclipse only to have it hang up on Building Workspace: (66%)? Jan 03 00:26:07 Evil. Jan 03 00:27:17 so i'm looking to re-use portions of this compiled elf binary i have. I've never worked with importing a binary... someone please stop me Jan 03 00:27:34 don't do it Jan 03 00:27:38 damn Jan 03 00:28:17 trust elfs, don't do it Jan 03 00:29:42 i was already nervous about doing it becuase i don't really know arm, and not sure how well it manages memory etc for modules, if i would have a hard time updating internal structures lol, they actually export functions for most things though Jan 03 00:32:23 not sure theres even like a stdcall Jan 03 00:34:20 ninjaneo: is the binary compiled for arm? Jan 03 00:34:49 ninjaneo: if it's a statically compiled arm binary.. you might be able to use it. Jan 03 00:35:09 if it's not static (and doesn't link against android's libc), or isn't an arm binary, good luck :) Jan 03 00:35:11 err sorry (i was just telling you what you wanted to hear) Jan 03 00:35:26 its straight out of an apk Jan 03 00:35:34 i think it was the 17 abi Jan 03 00:36:17 oh, ok Jan 03 00:36:30 it should be.. nominally usable then Jan 03 00:36:55 i'm reading up on how to import, i will be impressed when its all running in the emulator lol Jan 03 00:37:01 assuming it's a java jni library, you need to define the class with the same native methods as what was used in the original apk Jan 03 00:37:27 and then just call System.loadLibrary or whatever it is (don't remember exact function name offhand) Jan 03 00:37:30 alright, i'm going to think of that as a .h =p Jan 03 00:37:50 this will be neat Jan 03 00:38:23 should i be using the same abi, for compatability, or are they backwards compatable etc Jan 03 00:38:52 eh i'll mess around a bit Jan 03 00:48:10 So, is it possible to find out where is up or down when the user is accelerating? Jan 03 00:48:34 (Using the orientation sensor? Or using .getOrientation along with getRotationMatrix ) Jan 03 00:51:34 the docs say " When using methods that use InetAddress or which return an unconnected socket, you MUST verify the server's identity yourself to ensure a secure connection." … any example of this? kinda nervous doing this myself for some reason Jan 03 01:01:30 idk what specifically they're refering to, perhaps that your connection could be MITM'd Jan 03 01:01:46 thats why theres standards like ssl Jan 03 01:03:12 ssl doesn't define how to verify the connected host Jan 03 01:03:50 How can I get my webview to scale images down to fit the width of the view, rather than scale the text down and image similarly? I cannot control incoming html content Jan 03 01:05:17 you can easily get MITM'd using ssl … incorrectly ;) Jan 03 01:07:33 well considering most people use self signed certificates with no public authority Jan 03 01:07:36 i guess Jan 03 01:07:46 and then the existence of md5 ca's Jan 03 02:08:07 has anyone here ran into this problem before? http://i.imgur.com/hzqiYH9.png Jan 03 02:08:14 i have the force error option unchecked Jan 03 02:08:25 and i have other libraries that include native code included the same way Jan 03 02:08:29 and they're working just fine Jan 03 02:08:54 (note this is a precompiled library, im not compiling it myself, and from the git repo it doesnt seem like anyone else is having this issue...) Jan 03 02:11:35 in my RemoteViewsService I have a simple return new RoomViewsFactory(this.getApplicationContext(), intent); in onGetViewFactory Jan 03 02:11:53 however, I see this in logcat (and don't see my view): Jan 03 02:12:56 com.android.launcher E/RemoteViewsAdapterServiceConnection﹕ bind(): Unknown component ComponentInfo{com.foo.bar/com.foo.bar.widget/RoomViewsFactory} Jan 03 02:13:23 this seems like I've not declared something in the manifest correctly Jan 03 02:13:32 but I can't figure it out at all Jan 03 02:14:04 so for davik instructions, what decimal would this be? i'm confused because it looks signed, but then the lit8?, add-int/lit8 v3, v3, -0x80 Jan 03 02:15:30 wabz: there's a perm you have to add for RVS Jan 03 02:19:26 is that 128? (0x80)? why is it signed heh Jan 03 02:22:52 wabz, too many / Jan 03 02:28:39 ninjaneo: #smali knows a lot about that Jan 03 02:28:44 oh thanks Jan 03 02:29:44 bankai_: bankai_ I have android:permission="android.permission.BIND_REMOTEVIEWS" in my service Jan 03 02:30:01 pfn: yeah, I don't know why it's doing that? I've tried declaring absolutely in the manifest too for the service Jan 03 02:30:28 like also just with .widget.RoomViewsService Jan 03 02:30:56 I don't actually declare the viewsfactory anywhere though, but I don't think I need to? Jan 03 02:31:55 wabz, your intent is wrong... Jan 03 02:32:35 hm Jan 03 02:32:38 Intent i = new Intent(context, RoomViewsFactory.class); Jan 03 02:33:37 You mean RemoteViewsService.class Jan 03 02:34:13 I hope so Jan 03 02:35:24 what would happen if someone reverse engineered chromecast and put out an apk that uses a hacked implementation? Jan 03 02:35:40 SimonVT/pfn: thanks! Jan 03 02:36:19 google would pat you on the back and offer you a job maqr Jan 03 02:36:28 they hood like dat Jan 03 02:36:33 or 15k Jan 03 02:36:57 i feel like that's unlikely :P Jan 03 02:37:01 looked recently and that was for the most severe ones Jan 03 02:37:58 as for the job, maybe after you find a couple lol Jan 03 02:38:45 http://www.google.com/about/appsecurity/reward-program/ Jan 03 02:39:13 that wouldn't really be a security issue though... you can chromecast from your browser to the device already Jan 03 02:39:20 it seems more like an undocumented protocol problem Jan 03 02:40:01 you were serious about that actually happening? Jan 03 02:40:10 in real life? Jan 03 02:41:44 Eeeeeee: yeah, it just doesn't seem *that* hard in fact, after a bit of googling, koush already did it: http://www.xda-developers.com/android/play-almost-any-video-on-your-chromecast-with-aircast/ Jan 03 02:41:46 i'm not familiar with chromecast Jan 03 02:41:50 i don't think he has a public library though Jan 03 02:42:03 ahh Jan 03 02:42:10 you said apk didn't know what you meant Jan 03 02:43:23 Eeeeeee: i've been using antennapod and i'd like to be able to broadcast it to chromecast, but it lokos like you need special google approval to do it in the proper way Jan 03 02:43:40 yeah Jan 03 02:43:49 they broke that guys way of doing it by changing the api Jan 03 02:44:08 ah Jan 03 02:44:17 or some other person, whoever came out with the way to pirate like almost immediately Jan 03 02:44:43 honestly I don't know how they think they're going to prevent it. Jan 03 02:45:02 i guess improving xbmc is more worthwhile than writing for chromecast anyway Jan 03 02:45:32 I think chromecast is gonna get big Jan 03 02:46:35 Eeeeeee: i was pretty much done with it as soon as i saw an ad on it... but recently i tried again now that i'm adblocking youtube via xposed, and i haven't seen an ad with that yet Jan 03 02:48:00 oh they're gonna come on strong with the ads Jan 03 02:49:08 i think that's a good thing, because they'll always be blockable :P Jan 03 02:49:53 haha Jan 03 02:50:00 You know I wasn't thinkign that far ahead Jan 03 02:50:26 if they can target precisely enough, most content will probably be 'free' with really intrusive ads... that's already what a lot of youtube channels are doing Jan 03 02:50:32 and you know they would never try their hand at tv lol Jan 03 02:51:28 reddit.tv is what i think the future of tv looks like... though it's broken for me at the moment Jan 03 02:52:31 they target demographically and by gender Jan 03 02:52:45 and I want to say by age but it's been too long Jan 03 02:54:10 I imagine with universal analytics they'll just follow you around the house Jan 03 02:54:45 the targeting will be scary good Jan 03 02:54:53 i think google says the more information you give them, the better your UX will be :| Jan 03 02:55:01 it's true Jan 03 02:55:32 at least when it comes to ads Jan 03 02:55:39 but i wonder if these techno-utopians need these mental prothesis of contextual computing to get out of bed in the morning Jan 03 02:55:57 i don't know what that means, but i'll take one Jan 03 02:57:20 is this safe? linearLayout.getChildAt(linearLayout.getChildCount()); Jan 03 02:57:30 using the same variable inside ? Jan 03 02:58:45 yes, but that will always return null **** ENDING LOGGING AT Fri Jan 03 02:59:58 2014