**** BEGIN LOGGING AT Wed Oct 16 02:59:58 2013 Oct 16 03:00:18 my favorite is how it fails to execute because of manifest merging failing, see console for more info, and then theres nothing worth noting Oct 16 03:01:29 uhh manifest merging is really simple Oct 16 03:01:44 usually one manifest has higher minimum sdk than another Oct 16 03:04:45 hello everyone Oct 16 03:05:06 Does anybody have experience with the galaxy S4, specifically with "high security" mode? Oct 16 03:05:31 it seems that once you turn on high security mode in the settings you can't turn it off (the settings panel tells you it is off but it really isn't) Oct 16 03:05:56 I have also tried factory resetting my device and reloading the OS using ODIN and neither has reset it to before... so that's fun :) Oct 16 03:06:54 desmin88: i dont think thats the case (for the manifest files...) do i have to take the build.gradle matters into account as well? Oct 16 03:06:57 I was wondering, does anybody know of any truly HARD resets which can be performed, like perhaps the file I loaded through ODIN wasn't a full image? (it didn't even delete the apps from my phone so I'm guessing this must be stored in anothter partition?) Oct 16 03:07:09 briswolf: #android Oct 16 03:07:36 SimonVT: ok, sorry for th OT Oct 16 03:13:55 otiose: Are you sure you manifestfiles have compatible min sdk? Oct 16 03:14:43 pretty sure; although I'm just looking at the one that it errored on, and then looking at its dependencies (from the gradle file to see what it builds), and then checking to make sure those min SDKs are lower Oct 16 03:18:50 And the first time it came up with that error; so I fixed it. Now when I build, it still says the execution failed for the same reason Oct 16 03:18:53 but the error doesnt come up Oct 16 03:19:19 cannot resolve manifest? Oct 16 03:19:25 or something similar? Oct 16 03:19:48 <^cheeky> hmm .. JNI . is it worth it to .. use it for sorting algorithms .. or is it just used for gaming Oct 16 03:20:13 ^cheeky: Probably not worth it for sorting Oct 16 03:20:41 Error: Gradle: Execution failed for task ':my_app_framework:src:InternalFramework:processDebugManifest'. > Manifest merging failed. See console for more info. Oct 16 03:20:55 but theres no info in the console (previously there was, before I fixed the min sdk error that came up before) Oct 16 03:21:07 Run with --stacktrace Oct 16 03:21:10 yeah. Check a) sdk in manifest and b) the version of the sdk in the build.gradle Oct 16 03:21:22 has anyone here used exp4j with android? I'm using the jar from their site, and it isn't working >:c Oct 16 03:21:26 <^cheeky> but it seems pretty cool i mean seriously use, c++ with your apps. but guess ill just wait, thank you Oct 16 03:21:46 do I have to compile a jar specifically for android? Oct 16 03:22:16 ZettaBlade: does it give an error? Oct 16 03:22:21 like a build error? Oct 16 03:22:33 otiose: you've got a different sdk in the gradle file somewhere; check compilesdkversion and buildtoolsversion Oct 16 03:22:39 I would say, check the order and export tab and make sure export is clicked for the jar, otherwise I don't know :) Oct 16 03:22:42 otiose: at least, when i had that problem, that was why Oct 16 03:23:15 <^cheeky> any intresting videoz for android anyone could recommment Oct 16 03:23:18 <^cheeky> recommend Oct 16 03:23:23 ZettaBlade: sorry, that's the order and export tab for the build path configuration Oct 16 03:23:39 gah, I'm on a tablet using AIDE, the diagnostic tools are apparently limited. Oct 16 03:23:55 dragorn: so i DO have to look in the gradle file as well... but I'm guessing that if I compile for 16 and I really want it at 8, then it wont work in 8 will it? Oct 16 03:24:16 otiose: should be fine so long as you don't use any APIs not defined in 8 Oct 16 03:24:17 ^cheeky: http://twit.tv/show/all-about-android/130 Oct 16 03:24:23 otiose: generally you want to compile for the latest platfor Oct 16 03:24:31 theres 130 shows to watch there ;) Oct 16 03:24:39 but i still want it to error for using old APIs :) Oct 16 03:24:45 err, new APIs Oct 16 03:25:15 <^cheeky> 0oo nice ... shmooz cheers will check it out, my chicken should be done in a few mins hungyyyyyy!!!! Oct 16 03:25:21 show #131 should be up tonight sometime Oct 16 03:26:14 or here's the listing page http://twit.tv/show/all-about-android Oct 16 03:27:48 <^cheeky> nice , episode i clicked on Oct 16 03:27:53 shmooz is that about android dev or android phones? Oct 16 03:28:05 kindof both, mixed Oct 16 03:28:12 <^cheeky> malware, srsly !!! java malaware is hella increasing !! Oct 16 03:28:15 its general, but they talk dev stuff too Oct 16 03:28:28 i don't care about the phones at all Oct 16 03:28:48 yeah, the minSdkVersion in the manifest goes 4->7->8->8, and the compileSdkVersion in build.gradle is all 16 Oct 16 03:28:55 seriously why is there such a big community around the newest phone, people will buy a new one every year Oct 16 03:28:57 i can't really find anywhere it would want to complain Oct 16 03:29:06 you can also watch all the Google IO vids on youtube for dev stuff Oct 16 03:29:11 they don't change much at all... what's the difference between nexus 4 and 5? Oct 16 03:29:31 <^cheeky> seand: its the marketing and phycological aspect of things Oct 16 03:29:50 i guess i am impervious Oct 16 03:29:52 JakeWharton: You there? Oct 16 03:29:59 AAA isn't about dev at all - it's purely user stuff Oct 16 03:30:33 hmm ok, it was because one of the things in the middle had a targetSdkVersion when the others didnt; now i've got other problems.... Oct 16 03:30:42 <^cheeky> seand: i guess i am not, i just like that with droid, its kinda yours, you can create and share :) Oct 16 03:31:40 don't get me wrong, i love creating stuff on android... i like app development, i'm just not much of a consumer Oct 16 03:31:52 <^cheeky> i think having crazy malware, for the drois is freaking awsome Oct 16 03:32:15 i'm hesitant to get a nexus 7 because i know i won't use it at all except for development, but i want to get it because i want my app to support tablets... Oct 16 03:33:22 <^cheeky> seand: think i get what you mean .. coz i have always been consumer of android, and i even waited till android matured alot to actually purchase a phone, but being a consumer i think .. just my opinion might make you a better developer, Oct 16 03:33:51 yea you're probably right Oct 16 03:33:56 <^cheeky> coz i dont like crappy apps or even want to download them into my phone, or hinders what i want to do , hence i know my developent sucks soooo badly now hahaah Oct 16 03:34:38 do you have any apps on the play store Oct 16 03:34:56 seand: I'm using my Nexus 7 FHD more than I thought I would, thanks to xbmc ;) Oct 16 03:35:20 hmm, what is that? Oct 16 03:35:47 <^cheeky> xmbc .. oh fun memory on my first xbox, Oct 16 03:35:47 http://xbmc.org xbox media center re-written for other platforms Oct 16 03:35:52 <^cheeky> *memories Oct 16 03:36:24 I've still got an original xbox here with it installed - haven't power it up for years, of course, and a raspi makes a better xmbc machine nowadays Oct 16 03:37:26 you need version 13.0 Gothan alpha 7 to get hardware decoding (smooth playback) on Android Oct 16 03:37:35 <^cheeky> heh, Oct 16 03:38:30 Scumbag raspberry pi xbmc.. Loses power - corrupts install Oct 16 03:38:49 meh, just do a dump of your SD card in advance if you're worried about that Oct 16 03:39:08 <^cheeky> i need to get a proper tablet, but all i have is the Chinese version i got for dev, tis will do , coz when i do shell out for a proper 10 > tab i would hopefully be able to create, to actually use the tab for my liking Oct 16 03:39:31 I got tired of it after having to reinstall it 3 times or something Oct 16 03:39:34 Dont use it anymore Oct 16 03:39:40 hmm interesting Oct 16 03:48:45 picasso> auil Oct 16 04:13:51 <^cheeky> off night :) # Oct 16 04:29:00 is an intent just a string? Oct 16 04:29:12 is there anything more to it? Oct 16 04:29:38 i'm sorry, I mean an intent actino Oct 16 04:29:43 *action Oct 16 04:31:06 so that, as long as I use the same random string for the intent action between two applications, then the caller and callee will respond to each other only? Oct 16 04:32:01 yes, the action is just a string Oct 16 04:43:47 i thought it interesting that all the N7's at my BestBuy had a mfg date of 2013.7. i guess thats not too long ago Oct 16 04:44:10 i was looking for some kind of hw rev code Oct 16 04:44:37 would probably have to pry it open and look at the pcb :) Oct 16 05:18:47 Am I just doing it wrong? Picasso doesn't seem to be loading the image I'm giving it.. Oct 16 05:18:58 you're doing bug reporting wrong. that's for sure Oct 16 05:19:00 more info Oct 16 05:19:27 Haha i know I was gathering Oct 16 05:19:35 is it loading a different image - a picture of a cat, say? Oct 16 05:19:47 there are code paths which prioritize cat pictures Oct 16 05:19:53 accidental hardcore pornography Oct 16 05:20:01 latter. jk Oct 16 05:20:29 Okay, here is my adapter. http://pastie.org/8405616 I printed out the image URL I'm giving it and verified it to be this "http://www.ucatholic.com/wp-content/uploads/2013/10/Saint-Teresa1-240x240.jpg" Oct 16 05:20:32 which is valid. Oct 16 05:20:51 JakeWharton: incidentally, I saw a Square reader in a 7-11 in Japan, and thought of you :) Oct 16 05:21:06 oh, nice! i never check how Japan is doing Oct 16 05:21:17 JakeWharton: Is there any way to specify which request have priority in Picasso? Like adding something to the top of the queue, or to the last place? Oct 16 05:21:24 no Oct 16 05:22:10 desmin88: seems fine on first glance Oct 16 05:22:10 :( Oct 16 05:22:18 thats what i said Oct 16 05:22:36 all images don't load? or just some? Oct 16 05:22:45 All. Oct 16 05:23:09 JakeWharton: Another thing, is there any way to get the error why an image couldn't be loaded? the okhttpdownloader seems to eat the error... it has a if result > 300 disconnect() return null Oct 16 05:23:29 already filed as an issue Oct 16 05:23:34 desmin88: do the placeholder show up? Oct 16 05:23:41 Yes. Oct 16 05:26:55 there's a global failure listener, but you have to create your own Picasso instance to add it Oct 16 05:26:58 that's annoying Oct 16 05:27:00 and my fault Oct 16 05:27:12 are the images massive? Oct 16 05:27:38 240px x 240px? Oct 16 05:28:33 yep Oct 16 05:28:36 just checked Oct 16 05:30:08 try adding .fit().centerCrop() Oct 16 05:30:15 sure can do Oct 16 05:31:48 it still desont seem to wkr Oct 16 05:31:50 work* Oct 16 05:32:24 JakeWharton: But will that exception have the "HTTP status code" that it was returned when the image failed? Oct 16 05:32:26 placeholders are showing up however Oct 16 05:32:50 that's annoying ---> Why do you think that's annoying? Oct 16 05:33:06 because you can't attach a listener to the global singleton Oct 16 05:33:30 JakeWharton: Ah ok... I'm using my "own" singleton, so I don't care xD Oct 16 05:34:03 JakeWharton: Out of curiosity, why can't you attach it to the global singleton? You just didn't put the getter, or is there any "better" reason? Oct 16 05:34:11 it's immutable Oct 16 05:34:21 JakeWharton: nice :( Oct 16 05:34:24 JakeWharton: nice :) Oct 16 05:34:37 the only thing you can toggle dynamic is the debug indicators Oct 16 05:34:50 JakeWharton: k Oct 16 05:35:51 JakeWharton: Another thing... Given that your fetch doesn't has a callback, I implemented my own "fetch" by using into(target) and defining a callback inside the target... Will that behave the same as the fetch logic? Oct 16 05:35:58 nope Oct 16 05:36:06 what will be the difference? Oct 16 05:36:17 target is held with a weak ref Oct 16 05:36:23 if nothing else refs it it'll be GC'd Oct 16 05:36:40 JakeWharton: That's nice to know :)... What about the ImageView? Oct 16 05:37:13 JakeWharton: did I show you waht we did in the end? Oct 16 05:37:20 with the SmsManager? Oct 16 05:37:25 thepoosh: yes Oct 16 05:37:28 oh Oct 16 05:37:31 Gavilan3: also weakref Oct 16 05:37:33 so I'm not cool anymore Oct 16 05:37:36 :) Oct 16 05:37:39 when GC'd the request is auto-cancelled Oct 16 05:37:45 anyway, now that I think of it, I have a reference to the target :p just because I might need to cancel the request... BTW: When you remove requests, do you compare targets by == or by .equals() ? Oct 16 05:38:14 .equals, implicitly Oct 16 05:38:29 implicitly? You mean because it's in a map? Oct 16 05:38:40 yeah. Oct 16 05:38:42 k Oct 16 05:38:43 weak map Oct 16 05:38:53 needs to hit the gym Oct 16 05:38:56 get buff Oct 16 05:39:12 another thing... Is there any way to clear the cache? If I run into a low memory scenario? Oct 16 05:39:30 JakeWharton, to figure out the cause of it not loading images, you said I need to make my own picasso instance? Oct 16 05:39:32 I hoping to reduce the OOM with the lib, but who knows Oct 16 05:39:39 desmin88: i got a guy on it. give me a few Oct 16 05:39:55 oh, just wondering, thanks Oct 16 05:39:57 Gavilan3: make your own, keep a reference, call .clear() Oct 16 05:40:02 k Oct 16 05:40:16 JakeWharton: The initial size for the LRUCACHE is that mem size or disk size? Oct 16 05:40:24 mem Oct 16 05:40:26 1/7th heap Oct 16 05:40:38 do you know what's the maximum safe value to use for that? Oct 16 05:40:51 there's no golden rule Oct 16 05:41:03 But will my app crash if I put 100% of the heap? Oct 16 05:41:21 yes. where will the app live? Oct 16 05:41:36 desmin88: it's loading locally Oct 16 05:41:44 JakeWharton: Eventually some images will give OOM error... and I'd hope that picasso will start freeing the cache xD Oct 16 05:42:02 JakeWharton: oh? Oct 16 05:42:15 JakeWharton: do you have some logic like... open image, if I get OOM, free some things from the cache, then retry to load the image? Oct 16 05:42:16 Gavilan3: it won't. if you OOM you have other problems. clearing the cache would just delay a crash Oct 16 05:42:25 we will catch an OOM and abandon decode of an image, however Oct 16 05:42:33 Oh :( Oct 16 05:42:34 we never free Oct 16 05:42:55 JakeWharton: Is there any way for me to know that you got an OOM? The global listener will get it? Oct 16 05:43:03 don't remember Oct 16 05:43:06 k Oct 16 05:43:15 should be easy to find out in source Oct 16 05:43:33 desmin88: working all over the place. are you on device? anything in logs (especially saying "skia")? Oct 16 05:43:35 JakeWharton: It's really easy to find out stuff in your own source :) not so easy in someone elses :/ Oct 16 05:43:37 i thought OOms were not recoverable Oct 16 05:43:44 (jvm errors) Oct 16 05:43:49 g00s: I plan to catch them :p Oct 16 05:43:50 JakeWharton: on a device, yes, let me look for skia Oct 16 05:44:09 g00s: if you try an decode a 100,000px * 100,000px bitmap and OOM we can catch, abandon the decode, and your app will chug along just fine Oct 16 05:44:40 if you catch OOMs in a generic fashion and try to stop your app from crashing, it will eventually just blow in your face Oct 16 05:45:14 JakeWharton: I can't find anytiing resembling skia in the logs Oct 16 05:45:15 JakeWharton: Technically, you can catch them... But you need to be sure that the catching code isn't allocating new memory :p Oct 16 05:45:26 JakeWharton: If you do that properly, It'll never blow in your face Oct 16 05:45:39 it will Oct 16 05:45:51 if you're OOMing you've done something severly wrong Oct 16 05:46:03 JakeWharton: It won't.... Although not being able to allocate new object instances is a very bad drawback :p Oct 16 05:46:26 the chances of you making something useful after that are slim to none :) but it won't blow up in you face Oct 16 05:46:45 desmin88: you can attach a global failure listener to Picasso but it requires making your own Picasso instance (via its Builder) and using that instead of Picasso.with() Oct 16 05:46:59 ok i will try that. Oct 16 05:47:39 JakeWharton: another question... does okHTTP has caching for it's requests? Oct 16 05:47:50 yes Oct 16 05:47:58 disk cache is at the HTTP client level Oct 16 05:48:08 JakeWharton: And how do you cache the "transformed" version of a bitmap then? Oct 16 05:48:17 in memory Oct 16 05:48:23 not in disk? Oct 16 05:48:28 no Oct 16 05:48:38 that sux for me :/ Oct 16 05:50:56 desmin88: try setting error drawable Oct 16 05:50:59 see if that shows up Oct 16 05:51:09 JakeWharton: Does okHTTP have memory cache? Oct 16 05:51:11 no Oct 16 05:51:18 desmin88: also make sure you're on 2.1.1 Oct 16 05:51:26 I am Oct 16 05:51:39 JakeWharton: Is it possible to disable the disk cache in okHTTP? Oct 16 05:51:47 yes Oct 16 05:51:56 JakeWharton: Great! how do I do it? Oct 16 05:52:28 JakeWharton: Mmmm damn... you probably are using sync access for the memory cache :$% Oct 16 05:52:38 http://square.github.io/picasso/javadoc/com/squareup/picasso/OkHttpDownloader.html#OkHttpDownloader(com.squareup.okhttp.OkHttpClient) Oct 16 05:52:43 of course we are. it's in memory Oct 16 05:53:00 JakeWharton: I was planing on putting the disk cache there :$ so I store the transformed version Oct 16 05:54:55 mmmmmm: the transformations are executed in background I assume right? Oct 16 05:54:59 yes Oct 16 05:55:06 desmin88: is that the only image failing or is there a bunch? Oct 16 05:55:16 I Oct 16 05:55:22 I've only tested the one image Oct 16 05:56:02 ohh... then I might be able to do this... After I finish the transformation, I write the bitmap to the disk, and then I modify the downloader to check the disk cache before downloading it again :p that will work as expected... (I just need to put some logic in the transformation to not re-transform something that came from disk) Oct 16 05:56:29 just fork Picasso and change it to do what you want Oct 16 05:57:00 JakeWharton: I'd really like to avoid doing that... Oct 16 05:57:15 JakeWharton: Forking is a mess.... Then it's difficult to get your new versions.... Oct 16 05:57:16 JakeWharton: Changed a couple images, it fails to load all, leaving me with a placeholder. I've tried to use my own picasso instanc but im not getting aynthing from the listener Oct 16 05:57:29 what about the error drawable? Oct 16 05:57:29 JakeWharton: I prefer trying to make this work with the public API :) Oct 16 05:57:39 Gavilan3: square peg, round hole Oct 16 05:57:52 forgot to set it, dan Oct 16 05:57:53 damn* Oct 16 05:58:00 JakeWharton: That's what I'll use an adapter for the square peg Oct 16 05:58:01 can anyone explain to me what is the difference between FLAG_CANCEL_CURRENT and FLAG_UPDATE_CURRENT? Oct 16 05:58:23 the middle word Oct 16 05:58:27 wow Oct 16 05:58:30 ell o ell Oct 16 05:58:30 you saved the day Oct 16 05:58:35 super jake Oct 16 05:58:43 desmin88: user error? :D Oct 16 05:58:55 JakeWharton: set error drawable, but its still the placeholder Oct 16 05:58:59 interesting Oct 16 05:59:27 desmin88: how long do you wait? Oct 16 05:59:48 HttpUrlConnection defaults to never timeout actually Oct 16 05:59:56 ive waited a fair bit Oct 16 06:00:03 we might cap that actually... Oct 16 06:00:14 can't remember if that's retrofit or picasso Oct 16 06:00:44 yeah we cap it. connect timeout is 15s Oct 16 06:00:50 it'll retry 3 times by default Oct 16 06:00:56 did you wait ~50s? Oct 16 06:01:02 not that long Oct 16 06:01:21 lets wait and see Oct 16 06:01:23 brb Oct 16 06:01:26 JakeWharton: what will make me choose one over the other? they seem to do the exact same thing Oct 16 06:01:35 JakeWharton: Is it possible to modify something to make the okHttp downloader only have a try? not retries? Oct 16 06:01:41 thepoosh: i don't even know what you're referring to with those flags Oct 16 06:01:46 hmmm Oct 16 06:01:53 Gavilan3: no Oct 16 06:01:58 http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT Oct 16 06:02:02 :( damn! thanks.... Oct 16 06:03:54 JakeWharton, still not loaded Oct 16 06:04:19 desmin88: and your error drawable is different than your placeholder, right? Oct 16 06:04:28 yes Oct 16 06:04:32 and no logs? Oct 16 06:04:38 no callback to failure listener? Oct 16 06:05:00 none. Oct 16 06:05:10 device? Oct 16 06:05:28 droid dna Oct 16 06:06:05 hmm we don't have that Oct 16 06:06:35 desmin88: try other images please Oct 16 06:06:54 will do Oct 16 06:07:11 are you using okhttp? or just picasso by itself? Oct 16 06:08:03 just picasso Oct 16 06:08:59 JakeWharton: Is the okhttp protocols code included in the okhttp jar or is it a different jar? Oct 16 06:09:25 different Oct 16 06:09:41 where do I download it? Oct 16 06:09:53 tried a couple different images, still on the placeholder Oct 16 06:10:16 desmin88: drop okhttp into the app. picasso will pick it up automatically. http://repo1.maven.org/maven2/com/squareup/okhttp/okhttp/1.2.1/okhttp-1.2.1-jar-with-dependencies.jar Oct 16 06:10:27 Gavilan3: search.maven.org Oct 16 06:10:31 or grab the one i just linked Oct 16 06:11:28 thx Oct 16 06:11:40 JakeWharton: What are the advantages of maven over an eclipse project? Oct 16 06:11:50 not using Eclipse Oct 16 06:12:04 not that those are mutually exclusive Oct 16 06:13:05 JakeWharton: Sorry, can you repeat the previous line before: not that those are mutually exclusive ? Oct 16 06:13:15 you can use Maven with Eclipse Oct 16 06:13:17 JakeWharton: ok, ive done so Oct 16 06:13:30 JakeWharton: Yes, but what's the advantage of maven with eclipse over eclipse project? Oct 16 06:13:48 no idea Oct 16 06:13:52 i haven't used eclipse in years Oct 16 06:14:20 what do you use? Oct 16 06:14:23 IntelliJ IDEA Oct 16 06:14:31 paid version or free one? Oct 16 06:14:44 i have a license, but I just use CE Oct 16 06:14:49 k Oct 16 06:14:59 can you do commercial stuff with the CE? Oct 16 06:15:34 no idea. i don't see why not Oct 16 06:16:08 I meant license wise.... Oct 16 06:16:35 VMWare personal is free for personal use, but not for commercial use Oct 16 06:17:02 i don't know. i'm sure their website would tell you Oct 16 06:18:10 CE is released as open source (apache license) Oct 16 06:18:31 which implies there are no commercial restrictions Oct 16 06:18:51 or rather, pretty much guarantees it :) Oct 16 06:19:15 brb Oct 16 06:19:35 desmin88: anything change with okhttp? Oct 16 06:20:38 what should i be looking for? image loading isnt working Oct 16 06:21:45 what the hell Oct 16 06:22:16 am i just a failure at life Oct 16 06:23:38 are you sure you have the internet permission? Oct 16 06:23:50 oh Oct 16 06:23:51 m Oct 16 06:23:52 god Oct 16 06:24:08 i am a failure at life. Oct 16 06:24:09 * Gavilan3 gives desmin88 a price Oct 16 06:24:58 Shouldn't that show up in the logs? And switch to the error drawable on failure? Oct 16 06:25:08 probably Oct 16 06:25:11 in a list view, I have a bunch of images, and I notice that they change color or something when I touch the view or something... I don't know if it's trying to select stuff, or focus stuff, or giving some touch feedback... any idea how to configure which colors are used on those occassions? Oct 16 06:25:23 listSelector Oct 16 06:25:29 ok, retrying with internet permission. Oct 16 06:25:29 JakeWharton: thx Oct 16 06:25:30 + state-list drawable Oct 16 06:25:42 f2prateek: yeah. it should throw IOException Oct 16 06:25:53 guess. what. just. worked. Oct 16 06:26:31 so happy this is fixed, thanks a bunch guys. Oct 16 06:26:33 i don't even know what to say Oct 16 06:26:36 glad it's working haha Oct 16 06:27:01 it literally didnt even cross my mind the internet permission Oct 16 06:29:23 gosh im so bad at this Oct 16 06:30:04 Okay, 1 final question before i go to bed and stop bugging you guys Oct 16 06:30:47 Does roboto support unicode chars? Oct 16 06:30:57 Because my textviews that are roboto dont seem to Oct 16 06:32:27 And i cant seem to find any thing too relevant online Oct 16 06:32:39 JakeWharton: running this by you before posting to the robolectric mailing list Oct 16 06:33:02 http://pastebin.com/fNUK2ycV : Resources$NotFoundException. Apparently can't find my app theme. Is there any additional configuration required for robolectric? This is my directory structure http://pastebin.com/1Mkc7VQE Oct 16 06:33:23 Using your test plugin with roboelectric 2.1.1 Oct 16 06:34:47 uh Oct 16 06:34:51 i stopped using that plugin Oct 16 06:34:59 so i don't really know! Oct 16 06:35:53 To the mailing list then Oct 16 06:36:05 now I just annoy Xavier about pushing unit tests into the official plugin Oct 16 06:36:28 I should probably do that too Oct 16 06:36:35 JakeWharton: Does picasso do this stuff: http://developer.android.com/training/displaying-bitmaps/manage-memory.html ? Oct 16 06:36:37 How are you guys unit testing your gradle based apps? Oct 16 06:36:43 Gavilan3: yes Oct 16 06:36:59 JakeWharton: How do you know when to recycle/release a bitmap? Oct 16 06:37:03 we don't Oct 16 06:37:12 GC takes care of it Oct 16 06:37:15 how do you call release then? Oct 16 06:37:24 recycke I meant Oct 16 06:37:29 recycle Oct 16 06:37:36 pool them Oct 16 06:37:44 the GC handles that Oct 16 06:37:46 or you can call release i think Oct 16 06:38:02 night all Oct 16 06:38:12 JakeWharton: That page is all about not letting the GC handle things :/ Oct 16 06:38:29 JakeWharton: So if the GC handle stuff, then you are probably not doing the stuff suggested there Oct 16 06:38:36 guess not Oct 16 06:38:48 O_o ok Oct 16 06:39:08 JakeWharton: who creates/decode bitmaps in picasso? bitmap hunter from network? Oct 16 06:39:18 yes Oct 16 06:39:27 is there any way to put my own implementation there? (with the public API) Oct 16 06:39:42 no Oct 16 06:39:44 recycle() just marks the bitmap as dead and available for GC Oct 16 06:39:58 https://developer.android.com/reference/android/graphics/Bitmap.html#recycle() Oct 16 06:40:05 f2prateek: In old android versions it releases the bitmap memory Oct 16 06:42:02 Silly question, but whats a common use of a 'comment' divider to put in between sections of java code? Oct 16 06:42:19 in objective-c I like to do // followed by 78 -'s, but i think it looks silly in java Oct 16 06:42:46 intellij has an option for that Oct 16 06:42:55 well, between methods Oct 16 06:43:18 what a weird thing to care about Oct 16 06:43:27 Gavilan3: any documentation for that? Would be nice to know the differences between versions Oct 16 06:43:35 f2prateek: pre-HC allocated off the heap Oct 16 06:43:52 recycle would instantly free Oct 16 06:46:05 hi all! Oct 16 06:46:07 JakeWharton: That would be a cool feature for picasso xD Oct 16 06:46:29 no thanks. 1000+ lines of code for reference counting and the value-add is little Oct 16 06:47:08 JakeWharton: 1000? you are crazy... Oct 16 06:47:30 does anybody know what the proper way is to reference an external apk expansion obb is in Android 4.3? documentation says getExternalStorageDirectory() plus /Android/obb//; but, that leads me to a directory that doesn't exist and File.exists() is false… i'm getting /storage/emulated/0 as the external storage directory which doesn't exist. seemed to work fine in previous versions of os. Oct 16 06:47:36 no. i am the author of the library. i know what it would take to add that feature properly Oct 16 06:47:56 JakeWharton: so what's the advantage with the new approach? I guess not having to references ourselves would be one.. Oct 16 06:48:06 *keep references Oct 16 06:48:21 there is no advantage but the disadvantage is negligible Oct 16 06:48:37 and for almost all uses cases, completely moot Oct 16 06:50:16 reference counting would involve the LRU cache (and it's public API), the transformations (and their public API), and into()'s callback and Target support (also a public API) Oct 16 06:50:46 once the reference leaks beyond our control (very frequently, as you can see) we can NEVER know when to call recycle. Oct 16 06:54:50 JakeWharton: It'd be easy if you return PicassoBitmap and force people to use PicassoImageViews in their apps :p Oct 16 06:54:58 yeah. that'll never happen Oct 16 06:55:41 JakeWharton: If you put a hook point in the bitmap hunter, it might be possible to implement it as a module on top of the public API Oct 16 06:56:21 no need. the GC works just fine Oct 16 06:57:08 JakeWharton: The recyclce thing is probably not that great Oct 16 06:57:26 JakeWharton: But pooling bitmaps? That seems like a good one.... Oct 16 06:57:33 PRs welcome Oct 16 06:57:36 i'm done talking about this Oct 16 06:57:52 every week people bring this up thinking they have great insight into the library Oct 16 06:58:26 JakeWharton: I never claimed to have great insight into the library Oct 16 06:58:40 JakeWharton: I actually know almost anything about it... Oct 16 06:59:27 Still, bitmap allocation/deallocation seems to be an expensive operation, so pooling seems like a great idea Oct 16 06:59:44 the memory will eventually get fragmented Oct 16 06:59:45 pooling is the same problem as reference counting Oct 16 07:00:09 JakeWharton: It uses references counting, yes Oct 16 07:00:11 only works for extremely homogenous images and we're a general purpose library therefore don't bother Oct 16 07:00:34 JakeWharton: I'd think most apps tend to use images of the same size Oct 16 07:01:17 blind speculation doesn't make for good implementations Oct 16 07:01:55 JakeWharton: I know :) Oct 16 07:01:56 but my arm chair is sooo comfortable! Oct 16 07:02:09 i did notice volley had some sort of byte[] pool Oct 16 07:02:17 didn't see where they used it though Oct 16 07:02:41 stream reading Oct 16 07:02:44 having an issue with dex and an already added class Oct 16 07:02:46 ah, ok Oct 16 07:02:47 they consume the entire response stream before decoding Oct 16 07:02:51 morning. something seems to be wrong with the method calculating potential xp gain in my mini game. can someone spot the error ? https://gist.github.com/anonymous/9d36f3cb8ec8b1020278 . if winning player is lvl 2 and losingplayer is lvl 1, then winning player gets 10xp and losing gets 5... Oct 16 07:02:52 its weird. Its buildconfig.java Oct 16 07:03:18 so this jar has a buildconfig.java but when i set it as a android library and build it it re-builds a 2nd buildconfig.java in the same namespace Oct 16 07:03:37 lite_: that method would be cognitively easier to read if you pull common math calculations into temporary variables Oct 16 07:03:37 er, namespace = class…path? Oct 16 07:05:46 Anyone work with making custom IME's? I am just curious about speed and allocation, ie can I legitmatly use "lots" of objects? Oct 16 07:06:16 JakeWharton: better? https://gist.github.com/anonymous/6f45fdd7c0fc6fca94f8 Oct 16 07:08:47 JakeWharton: BTW: The fact that the android developer guide advises you to pool the bitmaps, seems like a good indicator that it will be useful Oct 16 07:09:10 JakeWharton: id like to determine the "multiplier" by looking at the difference in level between the losing and winning oplayer. if the winning player is say 2 levels below the losingplayer(and as such weaker) i give a 20% xp bonus. if however the winner is 2 levels higher than the loser theres a 20% xp penalty Oct 16 07:09:20 Gavilan3: by the time the images left the LRU to be able to be pooled the content would no longer be on the screen Oct 16 07:09:38 https://gist.github.com/anonymous/e49731c5165f0f222505 Oct 16 07:09:44 plus we wouldn't know we could pool them without the crazy reference counting anyways Oct 16 07:11:00 lite_: what happens if the user is 11 levels above the loser? do they end up losing 10% xp (-110%) despite the fact they won? Oct 16 07:11:21 JakeWharton: well, anything above 100% penalty just results in 0xp Oct 16 07:11:50 JakeWharton: You *need* the crazy reference counting... There is no way to do it without it, that's 100% clear.... Oct 16 07:12:32 JakeWharton: I'm not arguing about that, I'm just saying that I think it's probably worth it to implement it... Or put some hook points so the users of the libraries can implement it if they want :) Oct 16 07:12:35 Gavilan3: except, like i said, and like we spent months studying internally before creating and releasing this library, by the time the image becomes available to pool it's not actually useful to retain Oct 16 07:12:41 anyone care to help a noob Oct 16 07:12:56 JakeWharton: Why wouldn't it be useful? Oct 16 07:12:59 how do i program in c++ with android Oct 16 07:13:32 My program has a lot of images with the same size, that might be the reason why I think this is useful... Oct 16 07:13:32 because you either have decoded all the images in the list of size which remain in memory or you've moved on in the app and are somewhere completely different where there are no images of that size Oct 16 07:13:46 i need to create response macros for all these things Oct 16 07:13:56 O?o Oct 16 07:14:05 anyone Oct 16 07:14:11 JakeWharton: I agree with you, that it's not a general case/use thing Oct 16 07:14:38 JakeWharton: But in my app, I'd be extremelly useful... During normal usage I probably show 300 images of the same size Oct 16 07:15:33 So maybe you don't need to implement it, just add hook points so if someone wants to implement it for their program, they can :) Oct 16 07:16:16 you can easily do this yourself. write a custom transform that does the resize and pulls from a pool Oct 16 07:17:53 JakeWharton: is there any way for me to know when you remove something from the LRU cache? Oct 16 07:18:30 no. you'd have to create your own Cache implementation that's an LRU Oct 16 07:18:33 JakeWharton: You mean the general transformer on picasso right? Oct 16 07:18:36 yes Oct 16 07:18:39 k Oct 16 07:18:46 how do i program in c++ with android Oct 16 07:18:51 That transformer takes the getInputStream, and returns the bitmap right? Oct 16 07:19:01 can i use a full c++ program in android Oct 16 07:19:29 linuxuz3r: NDK Oct 16 07:19:35 or do i have to use some sort of code conversion to program in c++ Oct 16 07:19:47 linuxuz3r: Android NDK is what you're looking for Oct 16 07:20:05 seitensei, i still have to use java to utilize c++ right using the ndk? Oct 16 07:20:22 linuxuz3r: Depends Oct 16 07:20:38 But yeah, you'll need to touch Java Oct 16 07:20:49 linuxuz3r: http://en.wikipedia.org/wiki/Java_Native_Interface Oct 16 07:21:12 linuxuz3r, there is no concept of a C++ app in Android Oct 16 07:21:15 no. it takes a Bitmap and returns a Bitmap Oct 16 07:21:27 ok Oct 16 07:21:29 linuxuz3r, you can write a library which is called from Dalvik Oct 16 07:21:37 linuxuz3r: http://developer.android.com/tools/sdk/ndk/index.html Oct 16 07:21:47 and you have NativeActivity which gives control to C/C++ code right after startup Oct 16 07:22:00 lite_: what if they're the same level? Oct 16 07:22:09 no bonus Oct 16 07:22:12 or penalty Oct 16 07:22:25 linuxuz3r: You're not going to get too much out of it unless you learn the Java side of things Oct 16 07:22:30 JakeWharton: https://gist.github.com/anonymous/15c4b49ff4ff0379a307 ? Oct 16 07:23:06 linuxuz3r: The typical use case is that you won't need to bother with C/C++, and having all dalvik code, you don't have to do anything messy to get your code to work on MIPS, ARM, and x86. Oct 16 07:24:21 JakeWharton: I thought that the general transformer took a Response and the by request took a bitmap Oct 16 07:24:32 lite_: 45 and 15 are the xp you get for winning and losing, respectively? Oct 16 07:24:38 yes Oct 16 07:24:42 Gavilan3: no. Bitmap -> Bitmap Oct 16 07:24:49 or well that + playerlevel*5 Oct 16 07:24:59 JakeWharton: Do you know how fast/slow createScaledBitmap is? will the user notice if i scale the bitmaps on the background before showing them? Oct 16 07:25:41 the network download time makes transformation time negligible Oct 16 07:25:47 orders of magnitude difference Oct 16 07:25:48 k, thx Oct 16 07:26:02 after that's it's all in memory Oct 16 07:26:39 k, thx Oct 16 07:26:50 well, I'll continue playing with picasso, trying to optimize my app :) thanks! Oct 16 07:27:40 lite_: i think it's something like this: http://pastie.org/8405780 Oct 16 07:27:47 to be honest, i'm not sure i understood all the rules Oct 16 07:28:04 make this method static and unit test it! Oct 16 07:46:56 I have a TextView with a drawable, and I would like the drawable and the text to be -right- next to each other, and centered within the view Oct 16 07:47:26 is this possible without wrapping them up in a superview? Centering the gravity seems to spread them apart Oct 16 07:51:26 otoise drawable Oct 16 07:51:39 err compounddrawable Oct 16 07:51:47 you can set one for left, top right bottom Oct 16 08:00:46 JakeWharton: No need for response macros, but an FAQ. Oct 16 08:02:38 a* Oct 16 08:06:16 how do I get the height of a view during onCreate() Oct 16 08:08:06 view.getHeight returns 0 Oct 16 08:08:44 Hi everyone. I have been develop my own library. This library beiong Oct 16 08:10:15 Hi everyone. I have been develop my own library. This library being initialized in Application class. I need to know about activities on each view on Activity (touch, click, change text, etc) How Can I make it? Oct 16 08:12:55 how can you get the height of a view during onCreate()? Oct 16 08:16:46 why the fuck is rremoveGlobalOnLayoutListener depricated and what should I use instead... Oct 16 08:18:53 wuppy21_: It's always mentioned in the docs Oct 16 08:19:03 And pretty sure the JavaDoc inside your IDE tells you, too. Oct 16 08:21:20 lasserix: Thanks. Actually, what I have is a Oct 16 08:22:18 this doesn't seem to work.. Oct 16 08:22:20 http://pastebin.com/12JfYdrg Oct 16 08:32:42 Is this the only way of getting a date preference? http://mikeburnscoder.wordpress.com/2010/09/27/datepreference-an-android-library/ Oct 16 08:33:04 The post I found referencing that was from 2010, I was hoping perhaps android itself had a preference now? Oct 16 08:37:25 hi guys. does anyone know if it's possible to debug a webview's contents without injecting javascript into it/ Oct 16 08:49:18 Using opensl/es is it possible to create a mp3 decoding player with a bufferqueue input and bufferqueue output? I have ouput working fine with a URI input but switching to a BufferQueue crashes the program. Oct 16 08:51:45 wuppy i use a handler and repost the runnable to get the view Oct 16 08:54:44 otiose: yeah xml, if you want to change it in code you can use compounddrawable Oct 16 08:55:15 Hm, why isn't there a TimePickerPreference and a DatePickerPreference? Oct 16 08:55:22 It seems like something a lot of applications use Oct 16 08:58:35 I have seen people stream from the web to a temporary file and then decode from that. So that may be how I have to approach the buffer->decode-> buffer problem Oct 16 09:13:17 Uh, I have a Preference Screen (fragment) using XML, with a EditText Oct 16 09:13:30 but is there a way I can get that to show the current string that is set? Oct 16 09:13:49 Like make the summary for the edittext contain the text the preference is set to for example? Oct 16 09:17:01 My partner wants to use comic sans in the promotional content for the app Oct 16 09:18:34 lasserix: now would be a good time to shoot him in the facce Oct 16 09:18:53 lol Oct 16 09:19:16 possibly with a blunderbuss, for comic-style hilarity Oct 16 09:21:19 are you guys using DiskLruCache or something else for photo caching? Oct 16 09:22:21 hehe yeah Oct 16 09:22:35 Anyone done custom IME? Oct 16 09:29:07 We're using the bog standard LRU cache. Not looked at JW's. Oct 16 09:29:22 Any opensl gurus around today? Oct 16 09:44:07 About starting a service from a broadcast receiver.. I am looking at this, http://www.vogella.com/articles/AndroidBroadcastReceiver/article.html#startingservices_alarmmanager which is very good (as are all vogella.com tutorials), but some of the code for AndroidManifest.xml is looking a bit odd. The names of the receivers do not match up with the names in the java code :/ Oct 16 09:44:48 Desarun: what kind of strategy do use use to decide size limit for the cache? Oct 16 09:46:42 Three times the available space. Oct 16 09:49:01 you are so funny Oct 16 09:51:12 Thanks, I like to think so, too. Oct 16 09:51:22 Disk or Memory Cache? Oct 16 09:52:01 You can take a look at how Picasso does memory caching and decides the limit. IIRC they use 1/7th of the available memory. Oct 16 10:17:48 karlo We use 1/8th Oct 16 10:18:20 karlo: We did have it as 1/4 but were running into a ton of OOM crashes Oct 16 10:18:28 if I have an intent-filter to catch a BROWSABLE action in the Activity level, who catches it? Oct 16 10:29:09 does drawtext in canvas use the passed x,y as the top left or bottom left ? Oct 16 10:43:57 hello, i'm struggling with a multimodule (app and library) project and gradle. Here my setup: http://pastebin.com/t3ZiNBvc I'm able to build just the library but I can't figure out how can I build the application. From my setup is there something wrong? Oct 16 10:44:12 gentlemen: I am working on my first android app. ondebugstart() I am seeing an error asking to force close for my app Oct 16 10:44:26 weird I checked the logcat and see tons of errors such as PackageManager﹕ Unknown permission com.diotek.penmemo.util.PenMemoProvider.permission.READ in package com.sec.android.gallery3d Oct 16 10:44:35 should I be alarmed by all these errors? Oct 16 10:49:23 Have you declared the required permissions in the manifest? Oct 16 10:49:47 no Oct 16 10:50:01 I am guessing that most of these errors are not generated by me Oct 16 10:50:13 and what I am looking at it all android errors Oct 16 10:50:20 for every app and the entire system Oct 16 10:50:36 I can give you a full dump if you like Oct 16 10:59:21 what's the line under the "FATAL: " in logcat? Oct 16 11:39:16 * wmealing_ waves Oct 16 11:39:19 http://i.imgur.com/77gMYHg.png Oct 16 11:39:51 wondering how i can align "colored plates" to the the internals of the spinners text Oct 16 11:39:56 which in itself, seems to be centered Oct 16 11:52:06 hi all, does the Activity go through onPause and onResume if the hardware volume button is clicked? Oct 16 12:03:43 is it ok to use openjdk 6 with android dev? I read conflicting reports Oct 16 12:04:03 its not ok :) Oct 16 12:04:19 thepoosh: don't think so Oct 16 12:05:02 rgr, should actually work i guess Oct 16 12:05:21 i dont use the openjdk though Oct 16 12:05:46 rgr why do you want to use the openjdk? Oct 16 12:06:51 installed with distro Oct 16 12:06:54 less messing around Oct 16 12:07:20 that and it doesn't require going through oracles ugly site Oct 16 12:07:40 getting actual updates from your vendor without being annoyed via a toolbar Oct 16 12:07:52 through a unified update service Oct 16 12:13:29 Mhmm.. i try to write to the Global.Settings by using Settings.Global.putInt(). My App is a SystemApp and WRITE_SECURE_SETTINGS, Change_SETTINGS is in manifest. It works for some settings but for some i still get security-problems. Any idea what may be wrong? is it true that it does NOT work anymore since 4.2 even as Systemapp? Oct 16 12:25:10 Hello everyone, I'm generating a pushnotification when my application is idle, so I'm registering a PendingIntent (no flags, with a unique id) and I'm adding a bundle with the message to that intent and appon clicking the push notification I'm opening the activity and I call getIntent().getExtras() to get the message. But when I send 2 notifications the previous extras are gone and I only get the last Bundle in the Activity, why Oct 16 12:26:19 Hey Oct 16 12:27:12 Hi Oct 16 12:27:23 hi guys Oct 16 12:27:32 i have a doubt... whenever you update an apk with a new version, i mean in the market, does it sends an automatic message for actualization or should i add some peace of code? Oct 16 12:29:24 fonko, as soon as your new apk gets approved, the play store notifies the users for an update Oct 16 12:30:18 awesome, thanks ! Oct 16 12:30:27 if my app is using GCM, I need to register its package name with the GCM service - is it possible to change the google account to which that app is registered later on? Oct 16 12:30:47 compengi, you shouldn't have more then one notification per app, meaning that if you have 2 you should group them (changing the pending intent to contain both the messages) Oct 16 12:32:30 compengi, that said, probably your activity is singleTask/Top, if it receive a new intent it receive it in onNewIntent() and you should handle it there. Personally I found the onNewIntent() handling a little hard to grasp, it depends on so much settings (activity start mode, intent flags).. experiment a little Oct 16 12:35:27 Hi Android Dev. I've just read this post from hackbod in 2008 and wanted to know if it still applies in 2013. Are sticky broadcasts evil? and what other way can you create an event bus over ipc https://groups.google.com/forum/#!topic/android-developers/8341SaXhvmY Oct 16 12:36:58 mastro, how do I group them? And I guess you mean I have to get the previous extra from the previous intent and add both of them to a new one? Oct 16 12:37:47 mastro, this is what I'm currently doing http://paste.ubuntu.com/6245413/ Oct 16 12:49:12 You don't save the messages anywhere? If you did that, you could just keep track of which messages the user has seen Oct 16 12:49:52 Mhmm.. i try to write to the Global.Settings by using Settings.Global.putInt(). My App is a SystemApp and WRITE_SECURE_SETTINGS, Change_SETTINGS is in manifest. It works for some settings but for some i still get security-problems. Any idea what may be wrong? is it true that it does NOT work anymore since 4.2 even as Systemapp? Oct 16 13:00:36 compengi, https://developer.android.com/guide/topics/ui/notifiers/notifications.html Oct 16 13:01:18 compengi, see update notification Oct 16 13:01:52 what in your opinion is the best way to store a UUID in SQLite? Oct 16 13:02:02 soo... I just had to go from for-each loops to simple iterator indexing to avoid constant GC triggering -.- Oct 16 13:02:04 compengi, how to recover the previous message is up to you, you can store it in a db or shared preference or whatever suits you Oct 16 13:02:25 thepoosh, TEXT?? Oct 16 13:02:41 that is tone of the worst options for seaching by it Oct 16 13:02:45 *searching Oct 16 13:02:49 is there a better way? Oct 16 13:19:18 thepoosh, why is that? just create an index for the UUID column Oct 16 13:20:57 thepoosh is it just a one off installation ID, or are you storing *lots* of them? Oct 16 13:31:41 hi, i'm developing a DTO for android, some idea for example... Oct 16 13:40:00 thepoosh, Desarun is right, if this is just a single UUID you want to store there are better ways then sqlite Oct 16 13:41:08 is there a way to filter the profiler display by thread? Oct 16 13:43:02 mastro: I'm trying to create a row that can be searched and indexed by that will produce the best results Oct 16 13:43:13 is saving the hashCode a solution? Oct 16 13:45:57 thepoosh, is that a single row and will always be? or you have many rows, each with it's own UUID? what you need to do? WHERE uuid = ? Oct 16 13:46:26 there are many different entries but one row only Oct 16 13:48:21 O_o Oct 16 13:56:16 is there a method to get View with a string ... view.findViewById(R.id[variables]); Oct 16 13:57:49 mastro, Alright, I'm on it Oct 16 13:59:45 mastro, I just wonder the system is not just re-using the previous intent and just adds the new extra to it. Isn't how it supposed to work? Oct 16 14:02:02 can I not start a service on an emulator? I've been trying for two day to start a simple service Oct 16 14:02:36 compengi, nope. Every intent is sent on it's own, with it's own bundle. The system figure out which activity can handle it, then decide if it should open a new activity instance, reuse the old one sending onNewIntent or just bring the already existing activity in front discarding the previous extra. Oct 16 14:02:47 compengi, I can't go in detail because I didn't studied it in deep. Oct 16 14:03:00 compengi, but I really advise you to use notification aggregation/replacement Oct 16 14:04:31 mastro, that's okay, I'm on it :) Oct 16 14:16:45 Question: Can I force my application to start over every time it's resumed after a minimize? I know it isn't the android way, but it's pretty much the only way I can guarantee the state of the application and the state of the server I'm using are compatible. Oct 16 14:20:08 hi Oct 16 14:20:53 I need to read the code of someone else and add comment for things to rewrite, is there a special way to make important comment like code to rewrite ? Oct 16 14:21:01 guys I am having a major issue. For some reason I cannot start any android services or dont know if the services are running. Here is my setup: http://pastebin.com/R2tY6LzZ what am I doing wrong? Oct 16 14:21:03 so that the developer can find it easily ? Oct 16 14:22:36 maxagaz, most IDEs recognise "FIXME", "TODO" and "XXX" comments and can summarize them Oct 16 14:24:12 Mavrik: thanks Oct 16 14:30:58 anyone? Oct 16 14:31:13 anyone got time to check out a build error for me real quick for compiling ParanoidAndroid? Oct 16 14:31:58 Moopz you could make a call to the LaunchActivity in every Activity's onResume method, but listeners would be a bazillion times better. Oct 16 14:32:27 Desarun: What kind of listeners? Oct 16 14:32:50 Well how are you talking to the server? Oct 16 14:33:30 Through XML-RPC. Oct 16 14:35:00 You could have some sort of background service listening for changes, and when a change is detected, broadcast it to any receivers. Oct 16 14:35:03 http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html Oct 16 14:36:01 help me :) eheh, i need some example of DTO implementation Oct 16 14:37:06 Desarun: I'm not sure I follow. The server is passive, thus nothing happens unless it receives a command. Oct 16 14:44:18 Hey guys, I am using a layerDrawable, but a parameter of it is Drawable[], I want to use an image of mine, and the color red. How can I use the color red as a drawable? Oct 16 14:44:44 With a ColorDrawable Oct 16 14:45:09 Ah… didn't know they existed. Thanks SimonVT Oct 16 14:46:51 Question: guys I am having a major issue. For some reason I cannot start any android services or dont know if the services are running. Here is my setup: http://pastebin.com/R2tY6LzZ what am I doing wrong? Oct 16 14:52:53 I'm having a really strange problem Oct 16 14:53:12 I display a notification on login with a pending intent to some content Oct 16 14:53:32 then if the user does some stuff a second notification is shown with a pending intent to other content Oct 16 14:53:47 now if I click on the first notification it goes to the second set of content Oct 16 14:54:08 ?!? Oct 16 14:59:33 SimonVT: I am trying to create a new ColorDrawable, but it needs an int. Is this int an RGB value? Oct 16 15:08:45 eghdk: http://developer.android.com/reference/android/graphics/drawable/ColorDrawable.html Oct 16 15:09:31 Moopz: Yeah, I realize that but, for the parameter it just says "The color to draw". Oct 16 15:09:46 I'm just not sure how to give it the color to draw in an int. Oct 16 15:10:40 eghdk: There's several ways. You could use Color.RED for example. You could also use the Colors resource if you've added your wanted color to there. Oct 16 15:11:52 Moopz: I want this color to be customizeable (the user can change it in the settings). What would be the best way to go about it? I wouldn't want to use a color ressource file… right? Oct 16 15:13:09 eghdk: Why not? Basically the color resource file is simply a collection of defined colors. Oct 16 15:14:26 I have a color picker inside of my application, and I want the user to choose from this "unlmited" amount of colors. Oct 16 15:15:59 eghdk: Well than that's another story. But even then, the color the color picker returns, should still be an int, no? Oct 16 15:16:30 Right now it gives me an RGB. Oct 16 15:16:49 An RGB? Is that a datatype? Oct 16 15:17:09 The color picker I'm using gives me an RGB as a string. Oct 16 15:17:22 I guess I can look for another one that gives me an int or something. Oct 16 15:17:25 What does this string look like? Oct 16 15:18:58 It'd surprise me if it's anything other than the HEX associated with the color. Oct 16 15:19:13 Sorry, it does output a HEX. My bad. Oct 16 15:19:30 Then you can just parse that to an int as use that :) Oct 16 15:19:44 You can parse a hex to an int? Oct 16 15:19:49 That's awesome. Oct 16 15:20:02 Didn't you say it was a string? Oct 16 15:20:09 mastro, Implemented :) Oct 16 15:20:17 yeah, the hex because of the # Oct 16 15:21:06 Ah. I mistook that as well. It's hex, but not the web hex color codes I'm used to. Oct 16 15:21:07 Well then you simply make a substring of that, and parse it to an int, There you should be able to use it as a color. Oct 16 15:22:41 okay, i will look into it. Thanks Moopz Oct 16 15:23:08 eghdk: No problem :) Oct 16 15:27:43 compengi, good ;) Oct 16 15:47:33 <^cheeky> freaking headache !cool Oct 16 15:53:12 hm. I need to perform two adb commands on my endusers' phones. are normal phone usb drivers sufficient or are additional drivers required for adb? Oct 16 15:56:02 additional drivers, on windows Oct 16 15:56:40 are they part of the SDK? Oct 16 15:57:27 it depends on the phone, AFAIK Oct 16 15:57:40 whats a good distro to develop for android (on a virtual machine) Oct 16 15:57:52 luist: why not use a real machine? Oct 16 15:58:12 so it comes down to a 10-step howto for my poor users. mkay Oct 16 15:58:27 adb's not an end-user tool Oct 16 15:58:30 Leeds: because i dont want to install thousands of devel junk all over my macbook :P Oct 16 15:59:47 Leeds: I am well aware of it. But it is the only way short of rooting to get a function on Android that was present on all other business-class phones for decades... Oct 16 16:06:29 being? Oct 16 16:06:50 Leeds: indication of forwarded calls Oct 16 16:08:23 Ge0rG, don't require users to do stuff over adb... Oct 16 16:08:25 that sucks Oct 16 16:08:54 pfn: my choices are a) cease support for 4.1+, b) enforce ROOT or c) tell the users about adb Oct 16 16:09:16 <^cheeky> aahhh where is that link, to git, where it was an online tutorial Oct 16 16:09:34 pfn: you tell me which one sucks less Oct 16 16:09:59 I dunno, why do you want forwarded call indication... Oct 16 16:10:17 you don't need tons of development junk Oct 16 16:10:20 just intellij, and android sdk Oct 16 16:10:34 and if you use ports/brew, I would {port|brew} install sbt Oct 16 16:10:34 :p Oct 16 16:10:55 <^cheeky> so use, intellij instead of android studio ? Oct 16 16:11:04 pfn: just because you don't doesn't mean it is a non-feature. many people forward their business line to their private smartphone and need to distinguish them Oct 16 16:11:24 telcos generally don't provide that information... Oct 16 16:11:35 pfn: sure they do. at least on GSM-based networks Oct 16 16:11:55 pfn: on android, it happens to land in the radio_log. good luck getting it out of there though Oct 16 16:12:16 indeed Oct 16 16:12:46 anyway, my app did just that, until in Android 4.1 somebody made it impossible to access the radio log (because SECURITY!!) Oct 16 16:13:09 require users to root, then Oct 16 16:13:16 better than requiring them to use adb Oct 16 16:13:23 pfn: not sure about that Oct 16 16:14:00 ^cheeky, if you want stable and working IDE, yeah (imo), android studio has more android features though... but new intellij release is just around the corner Oct 16 16:14:19 #1 reason for using intellij, if you do *any* non-android development at all Oct 16 16:14:21 do not use android studio Oct 16 16:14:35 if *all* you will ever do is android, then using android studio is a great idea Oct 16 16:14:44 Or use AS for Android, IDEA for non-Android Oct 16 16:14:51 yeah, that's pretty terrible Oct 16 16:14:57 Not really Oct 16 16:15:08 <^cheeky> Zharf: yeah i know, i really like it, but after trying to get volley to work , it messed up all my work .. and not i am in a dirty dirty messss Oct 16 16:15:19 volley works fine in intellij for me ;-) Oct 16 16:15:24 I don't even have to keep a copy of volley locally Oct 16 16:15:46 (no source, nor jar) Oct 16 16:16:23 Stop trying to make sbt happen, it's not going to happen Oct 16 16:16:28 so you say Oct 16 16:16:32 sbt? Oct 16 16:16:34 users on my sbt plugin increase every day Oct 16 16:20:57 hello, i'm struggling with a multimodule (app and library) project and gradle. Here my setup: http://pastebin.com/t3ZiNBvc I'm able to build just the library but I can't figure out how can I build the application too. In your opinion, in my setup is there something wrong? Oct 16 16:21:02 <^cheeky> pfn: hoowwww , my coding f00 and knowledge f00 is weak, i even extracted the folder and dumped the files, but then it didnt find all the packages it needed, even put it in the same package as my files i was working with still no -go , and then gradle was tapping my shoulder and nagging about some problem blaaah Oct 16 16:21:22 yeah, but that's because you're using gradle, which everyone seems to have problems with Oct 16 16:21:23 ;-) Oct 16 16:21:46 gradle doesn't like to build normal android-style projects Oct 16 16:21:50 not without a lot of massaging Oct 16 16:22:23 pfn, so should I migrate to the new project layout? Oct 16 16:23:13 <^cheeky> whaaaaaaat Oct 16 16:23:16 <^cheeky> :( Oct 16 16:23:17 I dunno Oct 16 16:23:23 <^cheeky> so i need to dissable gradle Oct 16 16:23:25 you need to set all the source paths in gradle Oct 16 16:23:34 in order to build volley Oct 16 16:23:56 <^cheeky> see including picasso and GSON was easy peasy , just add it in dependencies and it grabbed it all nice and tidy Oct 16 16:26:21 <^cheeky> i did, i opened , up IO sched app .. and looked at thier, gradle config so i copied the jar into the libs folder then in gradle mentioned,mentioned for compile files "/libs/volley.jar" Oct 16 16:28:53 yeah, they built volley with ant, and included it directly Oct 16 16:31:43 Is this a joke? Facebook SDK now requires that you build the project with Android Studio? Oct 16 16:31:53 Does anyone just have an SDK 3.5 jar? jeez Oct 16 16:33:20 requires? Oct 16 16:33:33 That what their installation instructions suggest Oct 16 16:33:43 that doesn't sound like requires Oct 16 16:34:16 Ahhhh crap I am reading the wrong docs Oct 16 16:35:30 is there a way to re-position a wallpaper image when the screen rotates? Oct 16 16:38:50 hey guys Oct 16 16:38:58 anybody here in US can help me out for a bit? Oct 16 16:38:59 <^cheeky> 2 beers last night and a head ache like i did a 100 seconds keg stand or something da hell !!!!!!! i want my appp!!!!!!!!! Oct 16 16:39:15 alexfu: if theres way to detect screen position I'd say yes Oct 16 16:39:31 I need to test whether the functionality is displaying on android Oct 16 16:40:24 guys? Oct 16 16:40:42 meetoman what functionality Oct 16 16:41:09 can you download https://play.google.com/store/apps/details?id=com.about.CalorieCount&hl=en Oct 16 16:41:19 and sign in, then slide left, to go to remove ads? Oct 16 16:41:35 I am in china right now and apparently I can not download the app since it's grayed out in china? errr Oct 16 16:41:56 meetoman: it's available here in Hong Kong Oct 16 16:41:59 you dont need to purchase Oct 16 16:42:15 I know, google play distribution has hong kong available, but not china Oct 16 16:42:26 i am in shenzhen right now and its not available Oct 16 16:42:37 well get to the border and it'll be available! :P Oct 16 16:42:41 why is it not available in china Oct 16 16:42:50 dirty shenzhen Oct 16 16:43:47 (I say dirty mainly because the last time I was there, someone helped themselves to my phone out of my pocket... also, parts of it are quite dirty - but other parts are very nice) Oct 16 16:44:23 meetoman i went to remove ads, now what Oct 16 16:44:35 can you click on it to see whether it pops up? Oct 16 16:44:54 yeah it pops up Oct 16 16:45:22 hmm wait a sec Oct 16 16:45:32 alright, thanks Oct 16 16:45:34 thats all i need Oct 16 16:45:36 then i pressed back out of the popup, now the "Remove Ads" button is grayed out Oct 16 16:45:47 and it says purchase unavailable at this time Oct 16 16:46:16 that seems like a bug Oct 16 16:46:37 oooh, i'll fix that Oct 16 16:46:52 meetoman you're the developer for this app? Oct 16 16:47:18 exit the activity and click again, its fresh again Oct 16 16:47:21 yah, whats up Oct 16 16:47:28 wow, respect Oct 16 16:47:33 thanks :) Oct 16 16:47:40 not perfect, a lot of areas of improvement Oct 16 16:47:52 getting there Oct 16 16:48:05 wish it looked more HOLO-ish. Oct 16 16:48:27 also, is it safe to use com.about as your package? Oct 16 16:48:27 sigv, will do, and adding the new pull to refresh next update Oct 16 16:48:33 meetoman: nice. Oct 16 16:48:35 yes, about.com owns this app Oct 16 16:48:39 oh! Oct 16 16:48:44 caloriecount.about.com Oct 16 16:48:59 i m just a dev lol Oct 16 16:49:06 i didn't check. thought you randomly picked com.about :D Oct 16 16:49:21 well, props to you, man Oct 16 16:49:46 #helpanoobcyanogenmod Oct 16 16:49:49 how many devs work on calorie count? Oct 16 16:49:56 just me for android Oct 16 16:49:56 calorie counter* Oct 16 16:50:02 one for iOS Oct 16 16:50:04 oh, wow Oct 16 16:50:06 charley__: uh? Oct 16 16:50:10 2 for backend and one for testing Oct 16 16:50:35 cm channel wont chat. Oct 16 16:50:50 not sure what help you are seeking. Oct 16 16:51:08 building cm kernel for unsupported device Oct 16 16:51:08 meetoman: kind of a small team for such a high profile app Oct 16 16:51:20 charley__: maybe #android-root? don't know for sure. Oct 16 16:51:23 lg viper Oct 16 16:51:37 charley__: this is kind off the app dev channel. Oct 16 16:51:40 s/off/of/ Oct 16 16:51:53 charley__: we also don't use hashtags in irc Oct 16 16:52:01 im trying to use WallpaperManager.setWallpaperOffsets, but it request an IBinder as an argument. since im using WallpaperManager from a service, there's no view I can get a window token from... how/where do I get an IBinder in this case? Oct 16 16:52:05 seand: well, that isn't specific to this channel. Oct 16 16:52:16 sigv, they care more about revenue heh Oct 16 16:52:26 meetoman: makes sense #money #swag Oct 16 16:52:39 sigv, and I am just pushing for quality, look at the screenshots, that was the old app Oct 16 16:52:44 I've changed the feature one by one Oct 16 16:53:09 are the screenshots not representative of the real app? Oct 16 16:53:10 crashes are down to like less than 10 a day now Oct 16 16:53:16 ... Oct 16 16:53:20 sigv, nope, those are old version Oct 16 16:53:21 an app should never crash. Oct 16 16:53:30 well, admob crashes Oct 16 16:53:37 nothing I can do Oct 16 16:53:42 bump the screenshots asap. talk to mgmnt about switching ad providers? Oct 16 16:54:12 i did, we are still going through admob sdk Oct 16 16:54:22 does anyone have experience with implementing sync in their app? Oct 16 16:54:45 there is no known crashes coming from code other than that. some SQL Lite crash too Oct 16 16:55:14 and phone specific ones I cant do anything about, like motorola blur devices can not find it's own resources Oct 16 16:55:20 moto blur Oct 16 16:56:16 thanks so much for the help, couldnt do it without you guys since I am in china till next tuesday? err... Oct 16 16:56:32 good night :) Oct 16 17:02:30 ugh Oct 16 17:02:47 i wish renderscript let you blur with a higher radius than 25 Oct 16 17:03:12 it gets computually expensive Oct 16 17:03:29 Oct 16 17:03:32 inkscape lets you blur the heck out of stuff. lags system very hard Oct 16 17:03:36 i see Oct 16 17:03:43 right now I have to do 3-4 passes to get the same effect Oct 16 17:03:56 im tryign to duplicate an effect that iOS 7 has built in for free Oct 16 17:04:13 tnzr: the one making everyone sick ? Oct 16 17:04:20 shmooz: the one and only :) Oct 16 17:05:03 its not really too bad to make 3-4 passes Oct 16 17:05:29 i guess it is pretty bad actually..noticeably slower Oct 16 17:05:43 I wonder if I coudl use the NDK to do it instead, if it would be any faster Oct 16 17:06:03 RenderScript seems to already allocate it to multiple cpus so not sure how the NDK would help in that regard Oct 16 17:17:12 hey guys :) Oct 16 17:17:54 <^cheeky> hey guys, i know you guys prolly going think i am a tard, prolly deserve it, but last time i guess i was so into trying to solve for memory leaks and looking at memory analyzer, and i managed to reduce the amount of objects initiated specially the adapter class which is an inner class, so i made it a public static class, but then i read that all static references get destroyed .. Oct 16 17:18:32 a question has anyone successfully play embedded youtube videos on the Android 4.0 API? have tried with the webchromeclient, hardwareaccelerate and setpluginstateon but nothing yet, sometimes de video plays and sometimes it doesn't, any help would be appreciated Oct 16 17:18:52 need some help with bluetooth pairing.. Oct 16 17:19:06 How exactly do I trigger the pairing dialog.? Oct 16 17:20:20 I cant find a good resource that explains bluetooth communication.. Any help? Oct 16 17:20:23 cheeky you use images in your application? Oct 16 17:21:12 <^cheeky> ohhh yess alooot of them Oct 16 17:21:33 your bring them from internet or you use them within the application? Oct 16 17:21:45 <^cheeky> from the internet Oct 16 17:22:05 how do you manage the load of the images and their compression? Oct 16 17:22:17 <^cheeky> i am about to run it on my chinease tablet version of my nexus 7 .. lets see how well ii works with my wifi-connection :( Oct 16 17:23:01 but do you compress the images and manage their memory correctly or you just assign them without doing any compression process? Oct 16 17:23:08 How would it be optimal to structure the XML for a list with date and a title in Android such as the one depicted in this mock-up? http://io.ej.is/RzIV Oct 16 17:23:59 <^cheeky> i used picasso, so my setup is a gridview -> then icon clicked- initiated an intent to a view pager , and then viewpager gets bunch of photo ids for the items in the current gridview, and then i use picasso again to load the image but this time a bigger image since its supposed to be a gallery app Oct 16 17:24:28 well because usually memory leaks are associated with bad memory management of the images Oct 16 17:24:39 since I started using the UniversalImageLoader from nostra all my problems stopped Oct 16 17:26:11 <^cheeky> i havent used, that but picasso seems to be doing a good job, but looking running my app on the tablet .. i think the loading of the large image view in the view pager is too slow :( Oct 16 17:27:06 you are using asynctasks to manage the load right? Oct 16 17:27:08 <^cheeky> daam, i am not satidfied, taking to long and when i swipe .. some images load fast but then others .. freaking loading time is annoying and boggy , even tho i am using picasso ,hmmmm Oct 16 17:27:13 <^cheeky> how what do i do now .. Oct 16 17:27:26 ^cheeky what app are you working on Oct 16 17:27:32 <^cheeky> looking @ logcat i see alot og GC_CONCURRENT ... Oct 16 17:27:35 you should really check the UniversalImageLoader Oct 16 17:28:45 <^cheeky> oh its this stupid app i thought ill venture into .. so i can learn android, but i think it was mistake, coz its alot of cool parts i need to accomplish but i dont have time , i should have just stuck to making a flash light app, which is free and no advertisments, and i need a flash light hehe, i am nocturnal :P Oct 16 17:29:30 well any help for me and my problem of embedding a youtube video that actually plays in a webview =(? Oct 16 17:30:11 it's really AMAZING how GOOGLE can't make YOUTUBE to work decently ANDROID WEBVIEWS Oct 16 17:30:42 ^cheeky there are tons of flashlight apps out there though Oct 16 17:30:54 and i doubt you would learn much from that Oct 16 17:31:08 <^cheeky> yeah but i really need one thats no -adds Oct 16 17:31:11 <^cheeky> ads Oct 16 17:31:41 <^cheeky> yeah your rght this app , tho wowie !!!!! so much to learn and so many moving parts and it soo freaking cool but i guess . i am not smart enough Oct 16 17:31:49 <^cheeky> but i dont want to give up either hehe Oct 16 17:31:55 edespinoza: isn't there an android youtube player API that doesn't involve using webviews? (because webviews suck) Oct 16 17:32:01 edespinoza: https://developers.google.com/youtube/android/player/ Oct 16 17:32:29 <^cheeky> hmmm yeah .. keep swipping and its taking to long to load every image into the fragment , not cool Oct 16 17:32:40 it's amazing that you would try to run youtube in a webview, wtf Oct 16 17:32:40 <^cheeky> in the view pager Oct 16 17:34:48 <^cheeky> wow, i am comparing it to the flikr app and man every swipe has the new image loaded or the loading is awsomely fast :( Oct 16 17:34:53 i know what you mean, i'm trying to implement syncing in my app and can't find any good pre-existing open source examples of what i'm trying to do Oct 16 17:35:07 so i'm just playing around with ideas trying to see what will work Oct 16 17:35:19 and it doesn't feel robust at all Oct 16 17:35:23 evanc yes I know but we are reading a json feed and we are trying to play the youtube video embed in there Oct 16 17:35:50 since is supposed to be some sort of news app Oct 16 17:36:09 i'm really sorry to say this since i'm a huge android fan Oct 16 17:36:18 but iOS webviews do this without any sort of issue Oct 16 17:36:36 so why do this in a webview? Oct 16 17:36:46 just because it's a json feed doesn't mean it needs to be in a webview.... Oct 16 17:36:48 doing it wrong is doing it wrong Oct 16 17:36:50 orders from my boss Oct 16 17:37:00 boss is wrong is boss is wrong Oct 16 17:37:03 he doesn't wants people to leave the app Oct 16 17:37:59 <^cheeky> hehe, oh man . this is sad, maybe its because i am storying the imageview as weak reference Oct 16 17:38:21 edespinoza: er, what? did you read what I linked to? Oct 16 17:38:30 edespinoza: playing using real APIs doesn't mean leaving the app Oct 16 17:39:13 edespinoza: evanc can show you the world... Oct 16 17:39:14 evanc: sorry I was about to but first I was replying... Oct 16 17:39:21 shining, shimmering, splendid Oct 16 17:39:23 now I am xD Oct 16 17:39:29 edespinoza: always a good strategy. Ready, fire, aim! Oct 16 17:42:19 hmm this seems really interesting Oct 16 17:42:23 thanks a lot evanc Oct 16 17:42:28 looks like this will do the work :) Oct 16 17:46:42 <^cheeky> hmmm nifty , picasso debugging showing me its network issue Oct 16 17:48:08 evanc: a question Oct 16 17:48:14 this API requires Jelly Bean? Oct 16 17:53:37 edespinoza: I doubt it Oct 16 17:53:41 edespinoza: read the docs Oct 16 17:55:35 edespinoza: the provided sample has minSdkVersion="8" Oct 16 17:57:03 the only requirement is the phone has to have 4.2.16+ of the youtube app Oct 16 17:57:18 which apparently can be used on android 2.2+ Oct 16 17:57:29 Hey, anyone seen this? Trying to upload a new APK for testing to Google Play. It uploads, I get "Your application has been saved.", but the only uploaded APK shows as the last one, which was uploaded 2 weeks ago Oct 16 17:57:46 ok thanksª Oct 16 17:58:42 doppio|work did you wait a few hours before checking google play after upload? Oct 16 17:59:02 No — this isn't a published build though, just a test build Oct 16 17:59:06 It still takes a few hours? o_O Oct 16 17:59:08 there should be an rss feed for app reviews Oct 16 17:59:38 oh i see what you're saying... if you refresh the developer console it doesn't show up? Oct 16 17:59:59 No — I'm uploading version 1.1.0 (last one listed on Google Play is 0.87) Oct 16 18:00:03 Shows the upload date as October 1 Oct 16 18:00:08 <^cheeky> what would be the way to debug , the network issue i am facing right now ? Oct 16 18:00:30 AFAIK uploads/changes in the developer console always take a few hours to show up in google play Oct 16 18:00:35 Despite the "Your application has been saved" confirmation.. :/ Oct 16 18:00:47 whether you're uploading a new apk or changing some text in the description Oct 16 18:01:09 Right, but shouldn't my new build at least show up in the developer's console immediately after uploading? Oct 16 18:01:24 Even a "Pending upload for version 1.1.0, uploaded today"? Oct 16 18:01:26 stupid question but can you change a textview without an onclick event but just by calling setText? cos mine's not changing Oct 16 18:01:34 i'm not sure, sorry Oct 16 18:01:43 That's alright, thanks anyway.. hrm Oct 16 18:05:45 thanks for the help guys see you later Oct 16 18:14:25 Am I wrong, or does the roboto font not support unicode? Oct 16 18:18:38 desmin88: you are wrong. but it probably does not support _all_ of unicode Oct 16 18:20:06 'Á' Oct 16 18:20:11 Is not supported then Oct 16 18:30:18 pure java question: is it a "good" practice to call "new Thread(this).start()" inside a method (not run) in a class which implements runnable? Oct 16 18:37:48 <_the_surfer_> hello... need little help from someone who have any experience developing android apps in sencha touch framework... please pm... thx Oct 16 18:39:27 fr4nk: that is the proper way Oct 16 18:44:05 vedu, asked in the java channel and they said the total opposite, so now i am confused as hell :D Oct 16 18:48:50 happy hump day Oct 16 18:49:28 ,.. hump day? Oct 16 18:50:29 wednesday is called hump day. Oct 16 18:50:37 after today, it's all downhill into the weekend when I can work on my own Android projects. Oct 16 18:50:37 :-) Oct 16 18:52:45 oh, it is hump day Oct 16 18:55:07 fr4nk: oh wait. i misunderstood Oct 16 18:56:00 fr4nk: it won't lead to undersired results but it means a flawed design. u need to think of changing your architecture Oct 16 18:56:20 fr4nk: but for now you can use it as a hack if its really necessary Oct 16 18:57:29 yeah but i have no idea how to to it the right way, i want to implement a api class which makes a http request, so i want to use threads as suggested Oct 16 18:58:14 I am using the Instrumentation.onException but it doesn't seem to work. I forefully throw an exception but the method is never called Oct 16 18:58:39 moreover, even though I return true, my app still crashes Oct 16 19:00:32 fr4nk: you should read the tutorials. A thread should be created from another class. like new Thread(threadObj).start(); Oct 16 19:01:33 jeah but so i have to inject the command as a parameter for the constructor for example Oct 16 19:02:43 new Thread(new Api("command")).start(); --> figure out in run() method of Api-class what cmd is given -> call function.. Oct 16 19:03:05 this would be end up in a very huge if-elseif-else construct Oct 16 19:03:42 so i thought i can call methods which invoke the thread..hm i have to think about the whole thing again Oct 16 19:11:25 hey guys how do you make a service that doesn't die? Oct 16 19:11:40 that's impossible Oct 16 19:11:53 well Oct 16 19:12:00 one that is independent from my activity Oct 16 19:12:15 sure, use default behavior, lookup START_STICKY Oct 16 19:12:16 however, reincarnation may be a possibility :-) Oct 16 19:12:17 like the google play service Oct 16 19:17:55 START_STICKY doesn't work with bound services? Oct 16 19:26:45 if a service is bound it implies that it is not sticky Oct 16 19:27:00 since bound services only last as long as the activity that has bound to it Oct 16 19:27:09 generally Oct 16 19:27:15 or maybe always Oct 16 19:28:27 "When the last client unbinds from the service, the system destroys the service (unless the service was also started by startService())." Oct 16 19:28:32 from http://developer.android.com/guide/components/bound-services.html Oct 16 19:29:51 hi Oct 16 19:31:38 I want to start android dev soon. Is commonsware's book still the best? (or at least it is the bigger :P) Oct 16 19:33:42 <_the_surfer_> anyone have experience with sencha touch framework and developing android apps from there? Oct 16 19:34:04 yeah Oct 16 19:34:13 hot tip: don't do it Oct 16 19:34:36 +1 to what timroes said Oct 16 19:35:29 timroes: why? (just curious) Oct 16 19:35:54 (but for some more objective reasons: it's slow, scrolling lag like hell, you only get out ugly apps (ugly = ppl won't like it, because it breaks the design consistency on their devices), you spend nearly as much time getting the app fit to a specific platform, than you need developing it native Oct 16 19:36:09 fair enough Oct 16 19:36:23 <^cheeky> blaaah, AS new update is finicky bloody helll mew Oct 16 19:36:36 you have too little access to several system "stuff" to make good apps, e.g. no access to intents on andriod, so if you want share buttons you habve to hardcode => worst usability ever Oct 16 19:37:04 that applies to phonegap for example? Oct 16 19:37:13 imagine how users will like it, if you offer a share with G+ button, they habe the g+ app installed and use it frequently, and everythign you can do, is open a link in the browser for them that askes them to log into g+ in the browser :) Oct 16 19:38:08 Foxandxss: Phonegap has some possibility to access native stuff (like camera, and such) the other arguments of still stay valid, and also it doesn't have acecss to everything Oct 16 19:38:22 I see Oct 16 19:38:27 if i rember correctly, phonegap neither can create share intents the way it should be done in android Oct 16 19:38:34 I am a web dev, so I was tempted to try phonegap, but I like native stuff Oct 16 19:38:37 (so the user has a list of all his favorit share apps) Oct 16 19:39:00 seems like there is a plugin for phonegap for intents Oct 16 19:39:01 webintent Oct 16 19:39:27 that's why cordova is good. Oct 16 19:39:40 * Foxandxss searches Oct 16 19:39:43 there are some reasons to do webapps: e.g. you have a client, who doesn't have any idea what platform the result will run on - makes native pretty senseless - but to qutoe roman nurik: [very free quotation] if you have to make web app stuff, don't package it native Oct 16 19:40:07 just give the user a page, a user won't kill you for some slow animations in the browser, but if you fake them a native app.. Oct 16 19:40:17 seems like you can use cordova + angular, cool Oct 16 19:40:26 just an example: https://play.google.com/store/apps/details?id=de.hetzner.robot_mobile Oct 16 19:40:43 server management app from my datacenter Oct 16 19:40:52 I agree, with all the evolution in responsive design, a web page works good in every mobile Oct 16 19:40:54 cordova + node == fucking great Oct 16 19:40:55 with less problems Oct 16 19:41:05 all the one star apps say: don't put that kind of design crap into the market Oct 16 19:41:24 timroes: that looks like jquery mobile AFAIK Oct 16 19:41:27 Foxandxss: it really doesn't and trust me my group is working on exactly what we are talking about right now and less problems my ass Oct 16 19:41:38 Foxandxss: it is Oct 16 19:41:46 I have 5 web devs that would cry bloody murder if you said that to them Oct 16 19:41:48 not bad imho timroes Oct 16 19:42:07 Tsama: yes, to developers, but that is meant for designers :P Oct 16 19:42:39 true, but then you don't get the independent design and feel for each platform. Your app begins to feel like a web page which is nasty IMHO Oct 16 19:42:47 unless you build out the different containers Oct 16 19:43:00 Tsama: cordova seems cool, I never saw it Oct 16 19:43:01 to translate the first 3 comments "epic fail. whoever done that should be fired. i wished a native app with widgets, bigest fail ever", "webapps DON't belong into the market. you have a reasonable api for your stuff, so get a good app please", .. Oct 16 19:43:02 cordova works well because you can still use native code with it. Oct 16 19:43:09 as I said, I want to start doing stuff for android soon Oct 16 19:43:26 don't start with cordova, phonegap any that shit. Learn the sdk first Oct 16 19:43:38 no need to say that Oct 16 19:43:48 Tsama: you have experience with cordova? Oct 16 19:43:54 yes Oct 16 19:44:00 was thinking about commonsware's book, but it is 2500+ pages Oct 16 19:44:03 you could recommend it? Oct 16 19:44:12 Foxandxss why is that a bad thing Oct 16 19:44:37 seand: is not, I like big books, but 2500+ is a next step :P Oct 16 19:44:37 cause i have to prototyp soon a webapp, and i have only bad expirience with phonegap and senchatouch Oct 16 19:44:40 what's the convention for mixing an image and a shape drawable into a layer list if you want to specify the dimensions of the image? Oct 16 19:44:42 I have a subscription since... 2012 or so Oct 16 19:44:42 yes if you have very limited resources or don't want to go much native. For information processing it is good. But, dynamic content is shit Oct 16 19:45:04 (and yeah ofc we tried everythign to get the cleint go native, but i must say, in his case it really doesn't make much sense to go native) Oct 16 19:45:06 it does what it needs to but the way we're doing it embedding cordova in an app and only use certain parts for it. Oct 16 19:45:11 oh, yeah i recently got a subscription Oct 16 19:45:29 I was checking some ios earlier, but damn, java is lovely comparing to objc Oct 16 19:45:29 I still don't like 100% web-apps Oct 16 19:45:40 uh Oct 16 19:45:46 I think they are too clunky and nothing every works how it is supposed straight. close but not exactly Oct 16 19:45:47 Tsama, I respectfully disagree Oct 16 19:46:04 i'm having the same experience with a cordova hybrid app (clunky, nothing works how it's supposed to, etc) Oct 16 19:46:07 Foxandxss: not really objc is pretty damn decent along with the tools you get is damn nice Oct 16 19:46:35 Tsama: well, at least the emulator is better. The android one is awful to say the least :P Oct 16 19:46:42 tnzr: tbh it was a bland statement I can't say an exact reason as to why a web-app is terrible. Oct 16 19:46:47 does anyone know what this app was created with? https://play.google.com/store/apps/details?id=com.cube.arc.fa Oct 16 19:46:49 Foxandxss: Xcode beats the shit out of eclipse Oct 16 19:47:00 instruments is a gift from god Oct 16 19:47:02 Agree, that is why I prefer android studio Oct 16 19:47:10 +1 Foxandxss Oct 16 19:47:18 the sdk is pretty decent and with android you get a reduced version of java Oct 16 19:47:24 which I never tried tbh, but I have a long experience with jetbrains IDEs Oct 16 19:47:26 I have still not used the android studio Oct 16 19:47:39 back in my rails days :P Oct 16 19:47:56 everyone knows how to not call onRestoreInstanceState() when poping back a fragment transaction? Oct 16 19:48:07 anyone* Oct 16 19:48:15 I saw it came out, but I have to reason to switch now. My android project is about to be shut down and re-written. I might try studio when I rewrite it. Oct 16 19:48:30 Tsama: sounds like a good idea :) Oct 16 19:48:31 Tsama don't bother until release Oct 16 19:48:35 AS still has bugs Oct 16 19:48:43 everything has bugs Oct 16 19:48:50 .. Oct 16 19:48:51 anyway, it is still 0.2 Oct 16 19:48:55 seand: eclipse doesn't have huge bugs Oct 16 19:49:05 i would recommend intellij, personally Oct 16 19:49:14 android studio is just intellij IDEA with android plugins and some extras Oct 16 19:49:22 I can't have major bugs in what I am working on especially not in my IDE. I'll be damned if I pull out vim and start coding. Oct 16 19:49:26 yea if by extras you mean bugs Oct 16 19:49:35 heh Oct 16 19:50:23 what about TDD? Is that easy? I guess some kind of junit port or something Oct 16 19:54:06 ah, robolectric Oct 16 19:54:14 sup Oct 16 19:54:22 from jasmine guys it seems Oct 16 19:54:24 * Foxandxss likes Oct 16 19:58:55 hi, is it possible to use an intent inside a android.content.AbstractThreadedSyncAdapter? Oct 16 20:05:56 define "use an intent" Oct 16 20:07:29 do a startActivityForResult(), to be concrete i want to use AGP inside an or better from an android.content.AbstractThreadedSyncAdapter Oct 16 20:09:16 AGP? Oct 16 20:09:22 advanced graphics port? Oct 16 20:09:27 anyone else have an issue where android studio says "Class requires API level 1 (current min is -1)" Oct 16 20:09:45 i get that ion eclipse as well Oct 16 20:09:55 check your manifest API node Oct 16 20:10:04 its at -1? lol Oct 16 20:10:11 that's definitely a problem Oct 16 20:10:49 emdete check this out https://developer.android.com/reference/android/content/AbstractThreadedSyncAdapter.html Oct 16 20:11:39 I have android:minSdkVersion="8" Oct 16 20:11:46 agp = android pgp ;) Oct 16 20:12:24 jaynewstrom: sounds like a bug as seand said :P Oct 16 20:13:10 well, at least I don't plan on pushing any updates for a week or two. hopefully it will be fixed by then. Oct 16 20:13:11 current min is -1 lol Oct 16 20:13:28 I was using Android studio .2.10 and it was stupid slow, so I had to update Oct 16 20:16:58 nubish: i read that. but there is no hint in how to use an intent via startActivityForResult inside for example onPerformSync Oct 16 20:22:23 for an intent an activity is needed as far as i understand. an activity is an gui thing. that would mean if you have an app without a gui you can't use intents, right? Oct 16 20:23:23 whats a good lightweight distro to develop for android on a virtual machine? Oct 16 20:34:37 does anyone use WindowManager.addView? is it a bad idea? Oct 16 20:38:58 luist: i would go for a stripped down debian with lxde Oct 16 20:39:28 why virtual machine? Oct 16 20:42:09 Foxandxss: cuz i dont wanna install tons of devel junk on my macbook :T Oct 16 20:42:26 fair enough Oct 16 20:44:00 Are messages that are sent through the SMS API don't appear in the Messaging app? Oct 16 20:45:20 Hi :) Oct 16 20:48:26 When i connect real HID device like keyboard to the android powered device is it possible in application to get characters only from this keyboard ? So in real world user will use virtual keyboard and via HID will be transfered other data that should be received by application in background. Oct 16 20:50:38 hetii: I'm not positive. The app might be able to use the usb host APIs to "grab" the HID keyboard and handle the data itself, preventing it from being processed normally Oct 16 20:50:41 I'm not positive though Oct 16 20:50:53 which I already said, so forget I said it again. :) Oct 16 20:52:14 Hmm, ok then :) Oct 16 20:54:22 hmm is possible at least to recognize the sources of data from HID ? eg is it virtual keyboard or real one ? Oct 16 20:54:35 not positive Oct 16 20:55:57 ok thx ;) Oct 16 20:56:26 Sure, always happy to provide ambiguous, non-helpful answers :) Oct 16 21:01:44 me too! Oct 16 21:12:31 has any of you ever worked with maven+android? Oct 16 21:12:40 ant for great win Oct 16 21:13:16 i'm experiencing an "Error setting up environment variables" when i run mvn clean install via command line, anyway everything works great if i launch the same command using eclipse Oct 16 21:13:46 guys need your help again xD Oct 16 21:13:47 what is maven ? Oct 16 21:13:52 and what is ant ? Oct 16 21:13:57 build systems Oct 16 21:14:12 how can I make the youtube app play embed youtube videos in a webview? Oct 16 21:14:31 blacklight: no further information in that error ? Oct 16 21:14:39 bankai_: http://sprunge.us/ALGK Oct 16 21:15:15 edespinoza, evanc already told you not to use webview and instead use the youtube player api Oct 16 21:15:42 edespinoza you cant. Oct 16 21:15:50 i could not find any details about this online...something similar related to disk issues, but that's not my case, because everything works fine if mvn is launched from eclipse Oct 16 21:16:24 does -X tell you more? Oct 16 21:17:09 yeah seand but unfortunately have like 1 hour to upload the app and the api is not helping ;( Oct 16 21:17:36 also you need to send it the code of each video you want to play Oct 16 21:17:47 and we don't have a dedicated field of that + we can't destroy the webview content Oct 16 21:17:59 you have 1 hour to get embedded videos playing in your app? Oct 16 21:18:06 yup =( Oct 16 21:18:11 life is evil =( Oct 16 21:18:18 is this for a job? Oct 16 21:18:23 yup =( Oct 16 21:18:48 bankai_: not much http://sprunge.us/gCTV Oct 16 21:18:59 everything seems to go fine until the exception finally comes out Oct 16 21:22:28 no clue about the reasons...probably strace would help me more, but debugging all the syscall for checking what fails would take ages... Oct 16 21:23:01 @seand ... use the default media player. Oct 16 21:23:08 screw it. Oct 16 21:23:25 i suppose they want it *tested* too ... Oct 16 21:24:25 coderroadie: the default media player plays youtube? Oct 16 21:24:38 blacklight: obviously eclipse is injecting some kind of config there. I've never used this plugin before ... Oct 16 21:25:03 bankai_: how to find out what's the difference between what is launched by eclipse and what by cmd? Oct 16 21:25:20 give eclipse the -X maybe? Oct 16 21:25:42 or see if it is writing some kind of temp pom.xml Oct 16 21:28:32 @edespinoza ... no it does not ... sorry I wasn't on to hear that detail. Oct 16 21:28:41 inside an OnCreate or OnItemSelected if i initialize a ProgressDialog why is it always done last ? no matter how high up i do it it just shows up after everything else has finished ?! Oct 16 21:29:32 probably because the OS has control at that point. Oct 16 21:29:33 JakeWharton: You there? Oct 16 21:29:43 partially Oct 16 21:29:45 why do you want a progress bar to interrupt onCreate? Oct 16 21:29:59 or onItemSelected for that matter? Oct 16 21:30:46 JakeWharton: Using picasso, everytime I scroll through the list and the pictures get reloaded, it gets progressively more stretched and bigger each time Oct 16 21:31:00 when i click an item i want a little dialog to popup with a loading spinner... call things etc. etc. and at the end just dismiss it. Oct 16 21:32:31 Zylinx do you have some code Oct 16 21:32:40 yeah il paste bin it Oct 16 21:34:01 JakeWharton: its hard to describe but its like as each list item gets redrawn, the picasso loaded img starts stretching out each time Oct 16 21:34:24 http://pastebin.com/zfA3G3mi Oct 16 21:34:54 the stuff inside the if statements call things which do a whole heap of stuff Oct 16 21:35:42 desmin88: stretched more and more each time? Oct 16 21:35:45 @Zylinx - just a suggestion: use a Handler to show/hide the dialog. Oct 16 21:36:06 Hi everyone :) , Oct 16 21:36:17 JakeWharton: yes, atm it stretches 3 times for each redraw, then it resets Oct 16 21:36:40 it's not clear in your code that you're loading any data. looks like you're telling a fragment to switch views. Oct 16 21:36:45 ... or something like that. Oct 16 21:36:57 ... or start an activity ? Oct 16 21:37:12 yeah coderroadie but inside the onCreates of those fragments etc. lots is being done Oct 16 21:37:32 gotcha ... Oct 16 21:37:39 iv moved this code as high up as possible just to try and get it to work Oct 16 21:37:45 its not where it is intended Oct 16 21:38:07 "No JVM installation found. Please install a 64-bit JDK" , i have defined the JAVA_HOME to "jre7" , but it is x86 , where to get the right 64-bit JVM or JDK :) ? Oct 16 21:38:23 but still, that dialog pops up after everything else has been completed even though its miles behing Oct 16 21:38:25 behind Oct 16 21:38:39 right. you can expect that with the way you have it . Oct 16 21:38:51 so, one way you can solve the problem. Oct 16 21:39:03 the code in onCreate that does all the work - move it to its own function. Oct 16 21:39:27 it is in its own function Oct 16 21:39:28 use a Handler to show and hide the progress bar (dispatch a message to the handler). Oct 16 21:39:36 ahh Oct 16 21:39:47 il try that Oct 16 21:39:48 and it looks like you're displaying an activity from onItemSelected. Oct 16 21:39:49 ? Oct 16 21:40:02 that will cause problems with the progress bar. Oct 16 21:40:31 where do you want to code in onCreate to run ... ? what triggers that? Oct 16 21:40:33 desmin88 perhaps you can take some screenshots? Oct 16 21:41:08 Pulling some right now Oct 16 21:41:54 Zylinx: http://stackoverflow.com/questions/3484320/progressdialog-doesnt-appear/3484937#3484937 Oct 16 21:41:57 @Zylinx ... oops ... not where ... but when do you want it to run? Oct 16 21:42:46 Correct sizing: http://gyazo.com/5af8bd23edb644f562d70bb92c48bb5b After redraw: http://gyazo.com/0cd0b5e13823e8501ea053c34e2020f2 After 3 redraws it returns to normal and starts over Oct 16 21:43:02 hm ? Oct 16 21:43:06 Also that unicode error is weird because roboto font should support the character im giving it Oct 16 21:43:47 Is it possible for a fragment to utilize the actionbar's tabbed swipe navigation? Oct 16 21:43:49 @desmin88 do you have a weight problem ? Oct 16 21:44:07 umm Oct 16 21:44:08 no Oct 16 21:44:37 it almost looks like the UI is stretching the image to fill a parent. Oct 16 21:44:44 So for example I would want one activity to hold multiple tabbed swipe navs that can be loaded like a fragment? Oct 16 21:44:58 its wrapped Oct 16 21:45:04 i wonder what would happen if you set weight=1.0 on the view that contains the text ... Oct 16 21:45:24 upper or lower text Oct 16 21:45:29 .. and remove any weight from the image view. Oct 16 21:45:43 ... or set the width to a fixed parameter (e.g. 150dip) Oct 16 21:46:02 any help :) ? Oct 16 21:46:11 "No JVM installation found. Please install a 64-bit JDK" , i have defined the JAVA_HOME to "jre7" , but it is x86 , where to get the right 64-bit JVM or JDK :) ? Oct 16 21:46:41 Mezo40: talking about what Oct 16 21:47:03 where to get the right 64-bit JVM or JDK :) ? Oct 16 21:47:11 from oracle Oct 16 21:47:13 oracles website Oct 16 21:47:30 Mezo40 google 64-bit jdk and like the first 3 options will show you how to download and install it Oct 16 21:48:04 yes , i know , but i want the right version that makes android studio launches because the size of JDK is not small , so i don't want to install and uninstall Oct 16 21:48:19 just download the latest 64bit jdk Oct 16 21:48:51 http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html ? Oct 16 21:48:58 yes Oct 16 21:49:20 hm , ok , thanks a lot :) Oct 16 21:49:28 coderroadie: im using a relativelayout so i cannot use weight params Oct 16 21:58:04 im just going to set it to a fixed width Oct 16 22:01:20 what is maven ? Oct 16 22:01:49 first time I'm using AS and I'm getting an "error running build target module is undefined". Anyone ? Oct 16 22:02:08 teo123: uhh, gonna need more info than that.. Oct 16 22:02:24 can you load a fragmentactivity just like a fragment? Oct 16 22:02:51 some of these questions are easily google-able Oct 16 22:03:34 tonyMontana9099: "google: what is maven" Oct 16 22:03:50 desmin88, nothing on google :( and don't know how to provide more info. Just installed AS, create a default 'Hello world' and build it... Oct 16 22:04:12 desmin88 nice idea. lemme try. Oct 16 22:04:13 anyone? I am just kind of confused as to what a fragmentactivity actually is Oct 16 22:04:35 tab1293: that is also a question you could google d: Oct 16 22:05:10 desmin88, i already did. Its still not clear after going through fragmentactivity's reference and looking at some stackoverflow posts Oct 16 22:05:27 basically what I want to know if you can load a fragment activity like a fragment Oct 16 22:05:38 or does it need to be started like an activity Oct 16 22:05:46 I need some input. Which of tese icons in the listview of this picture http://imgur.com/aLhiyTB best portrays the ability to open up a dialog window? Oct 16 22:06:39 overflow Oct 16 22:06:48 the icon on the right is icon for settings Oct 16 22:07:03 I know. And the icon on the left is the icon for overflow. Oct 16 22:07:31 im saying overflow is best Oct 16 22:07:35 Ah Oct 16 22:08:14 settings icon looks out of place, doesn't really indicate anythign about a dialog Oct 16 22:08:22 overflow icon is generally used for opening menus Oct 16 22:09:25 desmin88: Thanks for the input :) Oct 16 22:09:27 yw Oct 16 22:10:00 Moopz don't use it to open a dialog Oct 16 22:10:26 if you're using the overflow then open a menu which has an option for opening a dialog Oct 16 22:10:34 otherwise i would go with a different icon Oct 16 22:11:17 seand: Well opening a menu with the sole purpose of opening a dialog with a second click would be pointless. But I'm unsure what kind of icon to use then. Oct 16 22:11:33 what is the dialog supposed to do Oct 16 22:11:54 It really just gives additional input options for each listview item. Oct 16 22:12:35 hmm Oct 16 22:13:03 the affordance used on PCs (in windows, at least) for opening dialogs is generally ellipses (...) Oct 16 22:13:17 maybe you could rotate the icon? Oct 16 22:13:42 <^cheeky> if anyone used, picasso, when debug is on .. all my images show green , even though they loaded fast.. is this the norm .. or i have a newrok issue ? Oct 16 22:13:54 green is memory cache Oct 16 22:13:58 yellow is disk cache Oct 16 22:14:01 red is from network Oct 16 22:14:25 <^cheeky> sorry sorry i mean red Oct 16 22:14:30 seand: I'll look into it. Thanks for the input :) Oct 16 22:14:39 <^cheeky> the images loaded fast .. but still red Oct 16 22:14:51 if you're not using okhttp or Android 4.4 they'll never be yellow Oct 16 22:15:06 @tab123 - just treat fragmentactivity like an activity. Oct 16 22:15:15 they still might have been loaded from disk, but we can't tell Oct 16 22:15:15 Moopz: sure. another option might be a cog or cogs Oct 16 22:15:26 <^cheeky> oh .. hmmm Oct 16 22:15:28 thats peculiar "san-serif-light" is not the same in my textview on my device than in the AS view renderer.. Oct 16 22:16:06 seand: I tried finding a decent one of those yesterday, but couldn't find anything that fit. Oct 16 22:16:16 <^cheeky> so , okhttp, needs to be used .. though when i call Picasso.with().load woudl initiat okhttp Oct 16 22:16:39 you don't need to use it. i just said we can't tell they were loaded from the disk cache but they probably are Oct 16 22:16:46 In app: http://gyazo.com/9b71bdc1727c0f7bb81eac93eb60d91d In AS: http://gyazo.com/054341ad4db2a75368da442ca01963bb Oct 16 22:16:48 If okhttp is added as a dependency it will be used Oct 16 22:16:48 hoping someone can confirm this for me. should run-as in adb shell be able to see the /storage/emulated/0 path (assuming the read permissions have been granted in the package manifest)? Oct 16 22:16:49 if you do include okhttp, you don't have to do anything. it's picked up automatically Oct 16 22:17:08 Moopz: you mean fit with the theme of the rest of the icons? Oct 16 22:17:57 does anyone know what size the action bar logo is supposed to be? Oct 16 22:17:57 <^cheeky> JakeWharton: okhttp is not in packaged with Picasso ? Oct 16 22:18:05 no. Oct 16 22:18:15 it's not required for use (as you've seen) Oct 16 22:18:47 it's unclear whether it's the same size as action icons (32x32 with 24x24 optical square) or if it has other sizing rules Oct 16 22:19:00 <^cheeky> so then its prolly my code thats flagging picasso to show red maybe Oct 16 22:19:07 what? no Oct 16 22:19:12 i told you twice what's happening Oct 16 22:19:34 we can't determine whether or not an image was loaded from disk on Android <4.4 or if you're not using OkHttp Oct 16 22:19:39 JakeWharton: Is okhttp going to be included in 4.4? Oct 16 22:19:39 seand: Yeah and fit the rest of the application. It's rather hard when you have to scrounge for free to use icons. Oct 16 22:19:50 <^cheeky> sorry, Oct 16 22:20:07 SimonVT: it's been in AOSP for ~6 months so theoretically, yes Oct 16 22:20:22 <^cheeky> some images, show green , i even made the imageview that i use with picasso , a weak reference, still did not cut it Oct 16 22:20:27 Moopz: yeah. there is a cog in the android developer icons set but it's not free ($25) Oct 16 22:20:40 JakeWharton "or Android 4.4", and who use it? ;) i think it is not released, but i read that feedly added support Oct 16 22:20:48 JakeWharton: Just behind the scenes, backing URLConnection? Oct 16 22:20:54 SimonVT: yes. Oct 16 22:21:01 Cool Oct 16 22:21:06 Http(s)UrlConnection, specifically Oct 16 22:21:15 seand: Yeah I found some good icon sets as well but this isn't really something I want to spend money on so. Oct 16 22:21:36 <^cheeky> 4.4 kittttyyyyy cant waitzz Oct 16 22:22:25 "Is okhttp going to be included in 4.4?" lol what?!?!?! Oct 16 22:22:54 OkHttp has been in AOSP master for 6 months backing HttpUrlConnection Oct 16 22:23:10 if not 4.4, then it'll be in the next one Oct 16 22:23:48 Will that conflict with bundling okhttp in your app? Oct 16 22:24:42 I guess not, since they would have picked that up during testing Oct 16 22:25:00 I don't understand, it OkHttp will by accessible as api for 4.4 (next one) android? Oct 16 22:25:17 SimonVT: right Oct 16 22:25:31 xgear: it backs HttpUrlConnection Oct 16 22:25:41 OkHttp is an HttpUrlConnection implementation Oct 16 22:26:09 oh, clear Oct 16 22:27:38 I have already used volley, so my next project will be use OkHttp Oct 16 22:27:48 you can use OkHttp with Volley Oct 16 22:27:50 SimonVT: https://android.googlesource.com/platform/external/okhttp/+/master/jarjar-rules.txt Oct 16 22:28:03 JakeWharton: Ah, of course Oct 16 22:28:10 Obvious solution Oct 16 22:29:49 JakeWharton why i should use both? i mean where is a profit? Oct 16 22:30:08 they're two different things Oct 16 22:30:22 xgear probbaly so you dont have to have weird switch logic depending on the api level to use httpclient or httpurlconnection Oct 16 22:30:30 OkHttp is an HTTP client. Volley is an HTTP abstraction. Oct 16 22:31:00 https://gist.github.com/JakeWharton/5616899 Oct 16 22:32:47 oh Oct 16 22:33:43 thanks, i will investigate it deeper :( Oct 16 22:34:23 as i know by default volley choose which stack to use based on android api level Oct 16 22:34:33 apache or url connection Oct 16 22:34:41 correct Oct 16 22:50:13 JakeWharton can you suggest architectural solution for secure communication with rest service. I mean using tokens (or something else), adding custom certificates, use or not use autologin, save password (encoded) on client. i ask for best practices. Oct 16 22:51:54 ROT13 Oct 16 22:53:05 at least twice Oct 16 22:53:37 Secure communication with rest service -> use https with a PROPER certificate Oct 16 22:55:43 So if i add features which described here (http://developer.android.com/training/articles/security-ssl.html) it will be enough? Oct 16 22:57:05 and how about session, relogin when session is expires and etc? Oct 16 23:10:52 :| Oct 16 23:14:49 anyway, thanks for answers guys. Oct 16 23:30:32 if I am trying to load all the artists in the mediastore and filter by there ids what would the selection statement in the cursorloader look like? Oct 16 23:50:06 someone check this build error out ? http://pastebin.com/raw.php?i=d7Dk5RiQ Oct 16 23:53:33 it sure is an error Oct 16 23:54:02 yes. my question is.. what needs to be done.. Oct 16 23:54:20 everything seems to be checking out.. Oct 16 23:59:57 Making a delete method for my app, what's the best way to make a dialog asking if "you're sure you want to delete ___"? Oct 17 00:01:14 http://developer.android.com/guide/topics/ui/dialogs.html Oct 17 00:06:43 how would you pass data to a fragment since the constructor parameters need to be empty/ Oct 17 00:11:00 Fragment#setArguments Oct 17 00:12:09 who said the constructor had to be empty ? Oct 17 00:12:31 Everyone Oct 17 00:17:17 pretty much Oct 17 00:20:04 I'm confused, I have a separate class named FileManager dedicated to file manipulation like creating and deleting Oct 17 00:20:32 I'm trying to make a warning dialog for deleting, but I have no idea what I should put in for the builder context Oct 17 00:21:14 activity context Oct 17 00:21:28 application context Oct 17 00:21:31 a valid context Oct 17 00:22:03 Activity, pretty sure application wont work Oct 17 00:22:35 SimonVT why wouldn't it require an Activity then? (though your probably right) Oct 17 00:22:58 Because e.g. a ContextThemeWrapper isn't an Activity Oct 17 00:23:09 But the Context it wraps could be Oct 17 00:23:36 eh, fair enough. Oct 17 00:25:13 This is a separate class, pardon my lack of knowledgue but how would I call my MainActivity context for the builder? Oct 17 00:25:48 I think it has to do with not being able to have Windows in the Application context Oct 17 00:26:30 You would pass your Activity to the class/method that shows the dialog Oct 17 00:26:55 yup Oct 17 00:34:37 Okay, so how does this sound? I created a Context object of name context and then defined it on creation as this.getApplicationContext() Oct 17 00:35:05 Now I'm going to be calling it from my filemanager class for the alertdialog builder context Oct 17 00:35:44 No, pass your Activity to the builder Oct 17 00:35:58 Is there a way to stop a while(true) loop from the outside? (in a accepted manner) Oct 17 00:36:39 SimonVT: I'm not sure what you mean, new to app dev and I didn't start off the app Oct 17 00:37:12 MegaYo not anyway you should, unless you stop the whole thread. Oct 17 00:37:38 or you have some object within the while loop that is accessible outside of the while loop Oct 17 00:37:45 what are you trying to do Oct 17 00:38:05 reason is, I'm going to shut down the inpustreams and scanner that are in the while(true) loop. at application onDestroy(). Oct 17 00:38:33 but if I close them, the loop continue and tries to read a inputsream that is empty Oct 17 00:38:46 and it throws an exception that causes an error 5 sec after application is closed Oct 17 00:39:27 line = inputScan.nextLine(); if ((line == null) { CLOSEALL STREAMS } I have that inside loop Oct 17 00:39:58 problem is that nextLine is still read the last time before exit, thus throwing the damn exception Oct 17 00:40:27 what is this running within Oct 17 00:40:37 a new thread Oct 17 00:40:57 hacky, but you could make the while loop check a boolean and if line == null you close all streams and set the boolean as false Oct 17 00:41:17 but line still has to read first Oct 17 00:41:40 line = inputScan.nextLine(); <---- I need to read first to check if it's empty Oct 17 00:41:52 and the reading is causing the error Oct 17 00:41:56 SimonVT: will my method work though? Oct 17 00:42:38 MegaYo just use a final object within a synchronization block check if you should exit, then let thread finish. Oct 17 00:42:41 MegaYo: maybe use something from java.util.concurrent -> latch something while you do your readLine(), and fail if you can't obtain it. onDestroy() -> prevent latch from being acquired. Oct 17 00:43:46 http://stackoverflow.com/a/11387729/1293179 looks like a decent option also. Oct 17 00:44:47 theoretically, that doesn't prevent further operations on the string from running; but maybe that's irrelevant :) who knows Oct 17 00:45:38 kbs one step at a time :P Oct 17 00:45:59 ok, because the proper way would be to stop the loop -> close streams and readers -> stop thread Oct 17 00:46:00 ? Oct 17 00:46:21 well you obviously want to do all the proper cleanup Oct 17 00:46:34 yes! Oct 17 00:46:55 I read that thread.stop(); has been deprecated Oct 17 00:47:16 yup Oct 17 01:01:18 I just added a if check before the read.nextLine() so that if the app is closing it would not try to read next line Oct 17 01:01:20 and no error Oct 17 01:09:59 hi all Oct 17 01:12:46 Anybody have any idea how to create an animation for changing number of columns in grid view? It goes like this. Column number is changed from 4 to 2. Animate by increasing the size of each item until only 2 items can fit per row. The remaining 2 columns will be animated as well with an addition another animation which rearrange to the subsequent row. Oct 17 01:41:56 Guys - is anyone in here good at and willing to check my regex for email validation - checked over at #regex but nobody seems to be home. Oct 17 01:44:58 All good - I've found a tool online and it checks out on every type of email address I can think of Oct 17 01:48:36 Anthaas: could you share the link with me Oct 17 01:48:36 ? Oct 17 01:48:43 please Oct 17 01:48:54 The link with checking regex? Oct 17 01:48:54 Why does the 'origin' of the text in a TextView change when the background is a drawable instead of a color? Oct 17 01:48:55 Sure Oct 17 01:49:07 oh crap Oct 17 01:49:09 nevermind, 9patch Oct 17 01:49:19 http://www.regexplanet.com/advanced/java/index.html Oct 17 01:49:29 Maziz: Oct 17 01:53:27 thanks Oct 17 01:57:28 View people - is there a way to change the layout/background color/text colour/top bar colour/error drawable on an EditText's setError dialog? Oct 17 01:59:19 Red and Black doesn't really go with the look of my app :( Oct 17 02:00:37 I literally only want to change the colours Oct 17 02:00:38 that is it Oct 17 02:01:52 greetings. I'm having a conversation with an app developer over an issue that's causing a problem, and I'm not entirely sure if what I'm saying makes sense or not. I wanted to ask here about getExternalStorageDirectory() and sdcard0 and sdcard1 Oct 17 02:02:22 The way to do things around here is to just ask, not ask to ask :-) Oct 17 02:02:29 thanks Oct 17 02:02:53 There's an app I use that I can't use on my new phone because the phone has an internal storage and an external SD card. I have android 4.1.2 stock (manufacturer was a purist) Oct 17 02:03:00 Not entirely sure I'll be able to help, but somebody here will :-) might have to be patient for an answer though! A lot of people here are either at work, at home, or asleep :-) Oct 17 02:03:17 Most do. Oct 17 02:03:29 My app I need to work tries saving files to the internal storage instead of the external SD card Oct 17 02:03:30 Not a legitimate reason to NOT be able to use an application. Oct 17 02:04:05 when I asked the app dev about it, he said that getExternalStorageDirectory() is the way to detect that Oct 17 02:04:17 Are you developing or are you an end user? Oct 17 02:04:29 end user, but i'm savvy Oct 17 02:04:35 Ok cool. Oct 17 02:05:06 the developer thinks they're perfectly fine with the code they're using, using getExternalStorageDirectory() to find the SD card, but should they be using something else? Oct 17 02:05:24 So, internal storage is your phones hard drive essentially, external is like an SD card Oct 17 02:05:25 What do you mean by internal storage Oct 17 02:05:34 Do you mean external storage that's not removable? Oct 17 02:06:11 ./storage/sdcard0 is the internal storage (non removable extra storage) that is returned by getExternalStorageDirectory() Oct 17 02:06:23 ./storage/sdcard1 is the real SD card Oct 17 02:06:35 Okay, so external storage that's not removable Oct 17 02:06:42 ^ Oct 17 02:06:59 is this typical? Oct 17 02:07:04 Android has internal storage and external storage. Internal storage is not accessible to the user, external storage is. External storage can be removable, but isn't necessarily. Oct 17 02:07:28 The Android API only supports one external storage, which is found by calling getExternalStorageDirectory Oct 17 02:07:58 Some device manufacturers then decides to do add an sd card that's not accessible through the API Oct 17 02:08:04 Unless you hardcode paths or parse mount Oct 17 02:08:12 Which is just stupid Oct 17 02:08:27 ^ which is why the dev should always check (if he hasnt already) whether the external media he has found is writable. Oct 17 02:08:41 So the developer is right. getExternalStorageDirectory finds the external storage. Your device has two external storage points Oct 17 02:09:05 aren't there a *lot* of devices using this hardware configuration, though? Oct 17 02:09:21 I keep seeing this problem come up across the board Oct 17 02:09:29 It's hardly the norm Oct 17 02:09:38 Not uncommon either though Oct 17 02:09:43 But, it's a limitation in the Android API that some manufacturers chose to ignore Oct 17 02:10:22 so, it's the manufacturer's responsibility to set the mountpoints correctly in the ROM? Oct 17 02:10:38 (In case anybody didn't see my question earlier - is there a way to change the colours that appear on the dialog and drawable when calling setError on an EditText?) Oct 17 02:11:58 Surely android should have some kind of adaptation that expects this problem? Oct 17 02:12:11 They can't change where getExternalStorageDirectory points based on whether an sd card is inserted or not Oct 17 02:12:34 That doesn't make much sense Oct 17 02:12:57 They just shouldn't have made two external storages when the API doesn't support it Oct 17 02:13:13 Or, they should have pushed Google to support it already Oct 17 02:13:13 well, I mean, the external storage directory is the directory that has no media inserted, then all of a sudden does? Oct 17 02:13:43 anyone here know anything about gradle? Oct 17 02:13:53 * pfn avoids it as much as possible Oct 17 02:13:53 What? Oct 17 02:14:26 If external storage is removable, it might suddenly appear Oct 17 02:14:31 Android has APIs to handle that Oct 17 02:14:39 I take it changing the colours of the setError message and drawable is not possible? Oct 17 02:14:55 yeah, but that's on par with removable storage anyway Oct 17 02:15:16 anyone know why an app built through android-studio would work but the same app built via gradle assemblerelease would have problems loading in fragments? Oct 17 02:15:49 code identical-- but android-studio "generate apk" works fine... gradle build completes but the app fails. Oct 17 02:15:51 crashes Oct 17 02:15:56 what I mean is that android should be able to distinguish between a removable storage directory and a non-removable one... Oct 17 02:16:34 anyway, in that case, I should request that my manufacturer change this... where is the configuration for this sort of thing stored? Oct 17 02:17:25 or, at least, in an educated way, how would I make this point to the manufacturer so they know the exact problem to fix Oct 17 02:17:26 Uh, no.. Android shouldn't care.. External storage is external storage Oct 17 02:18:12 ^ The manufacturer didn't make the storage compatible with Android, not vice versa. Oct 17 02:19:28 Why do you think there's a problem to fix? Your device apparently has two external storage points.. There's no "right" external storage then Oct 17 02:19:58 Ideally, Android would support that.. I'm surprised it doesn't already, devices started doing that years ago Oct 17 02:20:42 As long as that isn't the case, it doesn't make much sense to do it.. Other than a few people on the internet screaming for sd cards Oct 17 02:20:44 Realistically, the developer would have made sure that the storage he is attempting to write to is writable. Oct 17 02:21:12 well, the developer's app is writing to what he thinks is the SD card, but is not Oct 17 02:21:35 and eventually the media fills up because there's not enough room for everything Oct 17 02:22:09 he actually mentions that an SD card is required, not just an External Storage Oct 17 02:22:27 (In case anybody didn't see my question earlier - is there a way to change the colours that appear on the dialog and drawable when calling setError on an EditText? I want to change the red to blue, and the black to a different shade of blue) Oct 17 02:22:35 Oh and the text to white Oct 17 02:22:44 (Its already white by default) Oct 17 02:23:02 Anthaas have you checked stackoverflow Oct 17 02:23:08 many a time Oct 17 02:23:21 what about the source code Oct 17 02:23:25 Everyone has come up with a solution to a different problem - not being able to see the text on 2.3.3 Oct 17 02:23:45 Can't say I've done that - although I dont know where that is? Oct 17 02:24:10 https://github.com/android Oct 17 02:24:26 usually i just google for class names and end up at the github Oct 17 02:24:45 i hope this question isnt to vague. for testing purposes for a dev on a budget, is there a good reason to spend ~200 bucks extra to get a galaxy 4 instead of a 3? Oct 17 02:26:00 Alright, well, other than this problem, I do have another question... I'd like to get into app development. I have some experience with java so far, but I was wondering what a good point to start would be. Oct 17 02:26:04 The developer is correctly writing to the external storage, as returned by getExternalStorageDirectory Oct 17 02:26:26 Silivrenion: http://developer.android.com/training/index.html Oct 17 02:27:15 THERE IS NO SIMPLE FIX :( Oct 17 02:27:27 The current style looks so ugly in my app :( Oct 17 02:28:29 Silivrenion: get the big nerd book Oct 17 02:29:40 i wouldn't really bother with a book until you get serious about it, because the docs do a pretty good job Oct 17 02:30:05 and then stackoverflow answers any questions you might have that the docs don't or aren't obvious about Oct 17 02:30:20 meh Oct 17 02:30:31 i guess each person is different Oct 17 02:30:35 the only thing i hated about java was that classes were stupid sometimes about variables declared in methods from other classes Oct 17 02:30:40 some people like more structure Oct 17 02:31:26 Silivrenion what do you mean Oct 17 02:31:45 g00s: ... the paralysis of choice. I finally got all my new stuff, now I am paralyzed... partitioning it Oct 17 02:32:13 back when I did java in school, I'd have a method and class that did one thing, then another class and method that tried to use the data from the other class, but couldn't access it for some wierd reason Oct 17 02:32:26 private? Oct 17 02:32:34 different package and protected? Oct 17 02:32:48 pebkac Oct 17 02:32:55 no use of get methods of the appropriate visibility? Oct 17 02:33:04 well, it's funny, when I changed the security of the method and class, it broke things more Oct 17 02:33:16 i dont exactly remember why they broke Oct 17 02:33:23 it was a while ago Oct 17 02:33:36 was this an intro course for non CS majors or something Oct 17 02:33:40 it might be a good idea to revisit java again Oct 17 02:33:45 beyond intro Oct 17 02:35:13 * ^cheeky smoooth scrolling Oct 17 02:38:25 Hello, if i have a checkbox inside a linear layout like this: http://pastebin.com/T3S59U7t how can i call it when i try to do something like this: checkBox=(CheckBox)findViewById(R.id.checkBox_login); Oct 17 02:38:50 seand: I have found the method, and found the drawable used within the edittext, but I can't find A) how to change the look of the popup, B)mEditor within EditText to be able to see its setError method. Oct 17 02:39:02 Its all in TextView, not EditText*** Oct 17 02:39:47 i don't know much about overriding drawables, sorry Oct 17 02:39:56 but i think if it's internal you're out of luck Oct 17 02:40:05 This is soooo....gahhhhh Oct 17 02:40:13 You MUST be able to change the popup Oct 17 02:40:31 For Android to ASSUME you want black and red just doesnt seem very....Androidy Oct 17 02:44:33 The Editor class isn't imported, nor is it in the View class... Oct 17 02:46:10 well Anthaas, it is an error popup, so red makes sense... you could just write your own if you really wanted Oct 17 02:46:47 I don't agree. If red does not go with the look and feel of the application, it doesn't make sense at all - same with the black background. Oct 17 02:47:06 I want it to look exactly as it does, just different colours Oct 17 02:49:58 i don't understand your point. i would actually argue the color should differ from the standard colors of the app because it represents an extraordinary case and should draw the user's attention Oct 17 02:50:04 so no one has a strong opinion of galaxy s4 vs. s3 for development? Oct 17 02:52:51 The fact that there is a window on the screen where it never used to be, in the way of the next field should draw enough attention Oct 17 02:53:05 my app is light blue and white Oct 17 02:53:09 the error window is black and red Oct 17 02:53:14 it looks stupid Oct 17 02:53:38 are you using the holo light theme or is it completely custom? Oct 17 02:53:43 holo light Oct 17 02:53:59 weird, i would have guessed the error would have a light background in holo light Oct 17 02:54:10 Thats what I would have thought Oct 17 02:54:39 Such a minute detail, but I've been looking how to change it for a few hours now Oct 17 02:54:43 I really don't like it **** ENDING LOGGING AT Thu Oct 17 02:59:58 2013