**** BEGIN LOGGING AT Fri Mar 28 02:59:59 2014 Mar 28 03:04:50 anyone tried AS 053 yet? Mar 28 03:05:00 broken or awesome Mar 28 03:05:01 ? Mar 28 03:06:40 I have a javascript in my assets that I an trying to load and run in my webview by foing webview.loadURL("file://android-asset/js/myjsscript.js") but its not loading it. I know that the javascript code doesnt have any errors. has anyone done this before? Mar 28 03:08:55 alex_PP: g00s has tried it, its borked according to him Mar 28 03:09:30 i'm re-installing from scratch Mar 28 03:09:36 will see in a few moments Mar 28 03:09:59 i was getting an endless 'can't connect to adb' dialog; there was no way to dismiss it Mar 28 03:10:09 no matter what you chose, it came back up Mar 28 03:10:19 which is, to me, a total showstopped Mar 28 03:10:27 *showstopper Mar 28 03:11:09 i'll wait then Mar 28 03:18:28 devslash: did you call setJavaScriptEnabled(true) ? Mar 28 03:18:54 yea Mar 28 03:20:27 is it possible to change things like text size based on whether a control is activated/disabled/etc? through a style Mar 28 03:20:27 is it possible to rotate a rectangle with the canvas? Mar 28 03:20:39 then your app does not have perm to access that folder. Mar 28 03:21:06 leslie i doubt through style, but probably through code Mar 28 03:21:16 hm, that sucks Mar 28 03:21:35 I know you can change images and colours, but I haven't found the same for anything else Mar 28 03:22:35 do i need to allow a soecial permission for that ? Mar 28 03:22:59 leslie yeah, there is http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList Mar 28 03:23:14 yup, I know about that one Mar 28 03:23:18 but you want to change the font size, not drawable Mar 28 03:23:47 I guess I'm just wondering how they do it in the play store. in the drawer, the selected item is bold Mar 28 03:26:38 leslie did you see http://stackoverflow.com/questions/3682224/custom-button-change-style-when-pressed Mar 28 03:26:47 nope, lemme look Mar 28 03:26:49 "I see, you actually need a separate selector for the text, it works exactly the same way as the drawable. Only you do it in android:text field instead of background. Sorry for the mix up" Mar 28 03:26:57 last comment by schwiz Mar 28 03:27:36 ooh, that looks like it might be it Mar 28 03:27:43 oh, huh Mar 28 03:27:47 well because … https://code.google.com/p/android/issues/detail?id=8941 Mar 28 03:27:49 :( Mar 28 03:28:14 oh, boo Mar 28 03:28:46 I guess I've been spoiled by css Mar 28 03:29:53 but you can't have text/styles in a state list... Mar 28 03:30:11 devslash: you probably need loadDataWithBaseUrl to specify file:// scheme Mar 28 03:30:28 you can do colors, and pretend to be bold Mar 28 03:30:40 what format ? i tried it but it didnt work Mar 28 03:30:45 eg unelected is some variant of gray Mar 28 03:30:55 and selected is black Mar 28 03:30:58 yeah, pfn, I've only seen drawable/color state lists. which is a shame Mar 28 03:31:24 it'll look close enough to bold for govt worm Mar 28 03:31:27 work Mar 28 03:31:46 I guess so Mar 28 03:38:24 samuel: rotate() method rotates the canvas. so rectangle (and everything else) will rotate Mar 28 03:39:05 teksal: can I "put" a rectangle on the canvas? Mar 28 03:39:18 yes, sure Mar 28 03:39:25 you draw a rectangle Mar 28 03:39:51 aaah ok! thanks! that makes my collision detection much easier! Mar 28 03:40:21 fillRect() and strokeRect() Mar 28 03:41:51 interesting, AS only throws an internal IDE error when accessing Project Structure without the maven plugin enabled .. but when the project is open Mar 28 03:42:10 if i close the project, i can have maven disabled and project structure dialog comes up fine Mar 28 03:43:20 samuel: erm, I was talking about the html5 Mar 28 03:43:41 hmmm Mar 28 03:43:44 sorry Mar 28 03:44:05 ok, thanks Mar 28 03:44:48 android (or rather intellij) reports me error on T type in public void startFragment(T fragment) { } Mar 28 03:48:15 gordon_, need a little more to go on than that Mar 28 03:48:26 pastebin some code? Mar 28 03:58:22 alex_PP: http://pastebin.com/tEMa6P7r Mar 28 03:58:53 got this code from http://blog.nikhaldimann.com/2013/10/10/robolectric-2-2-some-pages-from-the-missing-manual/ Mar 28 03:59:22 I would like to test some fragments but need to have context inside Mar 28 04:05:24 there's no type for T Mar 28 04:05:34 replace T with Fragment and it should work Mar 28 04:05:39 or read up on generics Mar 28 04:05:47 *java genereics Mar 28 04:11:01 if i mark a method as synchronized and two threads call it is one call abandond or stalled? Mar 28 04:11:09 i would like it to be abndoned Mar 28 04:11:33 it blocks until the other finishes Mar 28 04:11:50 any way to make it not block? Mar 28 04:11:57 (blocking means waiting while unable to do anything else) Mar 28 04:12:04 i know what blocking means Mar 28 04:12:05 test before? Mar 28 04:12:16 erm. how do i test? Mar 28 04:12:35 a semapgore mught be what you want Mar 28 04:12:36 http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Semaphore.html Mar 28 04:12:46 no. too much hard work Mar 28 04:13:00 i could just put an if statment around the call Mar 28 04:13:29 same think, but a semampgore gives you a thread safe way to do it Mar 28 04:13:37 *same thing semaphore Mar 28 04:13:45 erm let me rtfm that Mar 28 04:14:09 I440r use ReentrantLock Mar 28 04:14:36 you can try to acquire the lock; and upon failure decide what to do Mar 28 04:14:39 or set a timeout Mar 28 04:14:42 or keep waiting Mar 28 04:14:51 alex. this 245692873654972364 line simple snippet is classic java example code Mar 28 04:14:57 :/ Mar 28 04:15:10 I440r ay yes, you with the huge numbers Mar 28 04:15:17 i would want the timeout to be .00000000000001 seconds Mar 28 04:15:27 thers a nice small one for you :P Mar 28 04:15:30 always 27866757625476235745237846523874 things to consider Mar 28 04:15:54 google dev: "we need to show an example of how to play audio in an application" Mar 28 04:16:15 manager: ok write a fully networked multi player space invaders game using opengl and.. .. . . Mar 28 04:16:40 also, g00s' idea is better, a lock Mar 28 04:17:02 alex_PP well, i can't get that adb cycle of death again, so i guess … proceed with caution Mar 28 04:17:06 its rare you see a SIMPLE example of how to do somehting :/ Mar 28 04:18:17 OT , but I have to say these sanyo eneloop XXs kick ass Mar 28 04:18:22 Question: When displaying multiple fragments, how could I pause 1 fragment? Mar 28 04:18:44 devslash: how about .loadData("", "text/html", null) Mar 28 04:19:15 i do that via webview.loadData ? Mar 28 04:19:26 yes Mar 28 04:19:39 not sure bout src parameter Mar 28 04:23:05 that doesnt seem right Mar 28 04:24:01 yea. reentrant lock was one of the examples that was simple. just how i need them :) Mar 28 04:26:06 I440r but any solution involving a lock will cost more than .0000000000000000000000000000000000000000000000000001 seconds Mar 28 04:26:14 damn Mar 28 04:26:16 maybe you need a lockless data structure Mar 28 04:26:52 and don't fuck up your cache, that will cost you another .000000001 Mar 28 04:26:57 really i need to find out why thers a delay between my mashing on a button and the code associated with that button running Mar 28 04:27:21 tho. running this emu on this laptop has one of my cores pegged Mar 28 04:28:54 alex_PP did you see the new support lib? i has a new pull to refresh class Mar 28 04:30:51 eugh Mar 28 04:30:56 not a fan Mar 28 04:32:25 i REALLY need to be editin these source files on my laptop and launcing the emulator to test the code on my desktop Mar 28 04:32:38 I440r try genymotion ? Mar 28 04:32:41 cannot run the editor on the desktop because i need to do taht over a vnc session and editing over Mar 28 04:32:56 the vnc session is utter fail because the control key doesnt work Mar 28 04:33:24 g00s no because i they have rpm. they have .deb. they dont have .tgz so i cannot create an ebuild and im not installing ***ANYTHING*** behind the back of portage Mar 28 04:33:38 hi i have 50 image FullHD, i put in drawable, what is the best choise: 1) assets, drawable 3) sdcard to improve memory and responsive UI Mar 28 04:33:41 oh, you use gentoo eh Mar 28 04:33:55 i filed a bug report and they got back to me with a questionair "wny should we do this" i explained why and they said... next release it will be in there Mar 28 04:34:23 i dunno what the tgz looks like, i use a mac Mar 28 04:34:38 but even using gentoo, i threw shit in /opt and used gnu stash Mar 28 04:34:47 fucking ebuilds Mar 28 04:35:55 your a gentoo user? Mar 28 04:36:02 err, gnu stow Mar 28 04:36:07 i used to be, not any more Mar 28 04:36:58 btw, GNU stow FTW Mar 28 04:37:16 i think Stow is powered by Eneloops Mar 28 04:38:09 g00s, cyou can give me some advice? Mar 28 04:38:12 stow? Mar 28 04:38:21 eneloops? Mar 28 04:38:26 I440r yeah, its a symlink farm manager Mar 28 04:38:42 i put something in /opt, and it gets symlinked to /usr/local Mar 28 04:38:48 so i can untangle shit Mar 28 04:39:03 great when there is no ebuild Mar 28 04:39:12 screw that. im not fscking over my entire system by tieing it into that kind of fucked up gordian knot Mar 28 04:40:21 what are you talking about. you install some tarball in /opt, and say 'stow my_package' and the symlinks go into /usr/local Mar 28 04:40:33 you can delete /op/my_package any time Mar 28 04:40:50 your /usr/local should probably be empty anyhow Mar 28 04:41:02 unless you threw shit there yourself already :) Mar 28 04:41:30 devandroid i dunno, you have to ask Mar 28 04:42:30 I440r the whole point of stow, is to augment your package manager. it doesn't replace it, or throw stuff where your pacman would usually put things Mar 28 04:42:33 i have a gallery with 70 image FullHD, i push all in drawable... now i think.. is it best to puh in assets or sdcard to improve Gallery Mar 28 04:42:45 they are totally separate Mar 28 04:43:14 yea im not going to let anyone but portage fuck with that kind of thing. Mar 28 04:43:23 besides it doesnt really help me Mar 28 04:43:27 I specify minsdk=19 targetsdk=19, yet ADT still injects support lib v4 at the end of create app wizard. Why? Mar 28 04:43:49 I440r its totally outside of portage, unless portage is putting stuff in /usr/local Mar 28 04:44:19 alex_PP: I know what generics are Mar 28 04:44:49 g00s im not letting anything install anything other than portage - the one consession i SOMETIMES make is ~/bin Mar 28 04:44:59 I support Android 2.3 and up... what support .jar should I be using? android-support-v4.jar or v13, v19 ect? Mar 28 04:45:14 I440r fine; make ~/usr/local or ~/local Mar 28 04:45:15 ...in my Eclips proj Mar 28 04:45:19 hehe Mar 28 04:45:40 anyhow Mar 28 04:46:00 g00s no. portage is in charge of everything outside ~ Mar 28 04:46:21 ive broken this policy a few times and it has ALWAYS ended up causing me grief Mar 28 04:46:44 i know. i used gentoo starting when daniel robbins founded it Mar 28 04:46:55 i used it for, a long long time Mar 28 04:47:11 i know how it works, how to break it. you are just being … particular :) Mar 28 04:47:28 alex_PP: I know what I was missing not FragmentTestCase but FragmentTestCase Mar 28 04:47:58 i used redhat for about a month. migrated to debian, spent a few years on debian, was sick of the "rtfm" answers to every question from the devs and their stupid nickometer Mar 28 04:48:08 migrated to gentoo about the same time potato was released Mar 28 04:48:28 never looked back. tried other distros in vms and hated every one of them. SPECIALLY the debian based ones Mar 28 04:48:30 Can I target Android 2.3 if I use "android-support-v13.jar" ? Mar 28 04:49:08 I440r: arch Mar 28 04:49:15 zezba9000: no Mar 28 04:50:32 no Mar 28 04:50:33 gordon_: I am confused as I only have v4, v7 and v13 in my SDK folder. But the manager says I have v19.1 installed Mar 28 04:50:37 arch cannot be trusted. Mar 28 04:50:47 99% of every useful package is in AUR Mar 28 04:50:58 aur is insecure Mar 28 04:50:58 I440r: for example ? Mar 28 04:51:26 only package I got from AUR is jdk and firefox-kde-opensuse Mar 28 04:51:43 in about 30 years when arch has the same number of devs working on it as gentoo has and AUR is only 3 or 4 packages... THEN it will be trustworthy Mar 28 04:52:05 gentoo is more complicated Mar 28 04:52:07 thats my only gripe with arch, it is the strongest contender Mar 28 04:52:11 gentoo is simple Mar 28 04:52:12 so it needs more devs Mar 28 04:52:29 USE flags are really not that simple Mar 28 04:52:35 at least that's my experience Mar 28 04:52:36 most devs maintain packages not develop gentoo Mar 28 04:53:02 if you dont have the support base for packages the only thing you can do is drop them in AUR and let the community manage it Mar 28 04:53:14 Can I use Android support v7 and target Android 2.3? Mar 28 04:53:17 i.e. unmanaged Mar 28 04:53:21 insecure Mar 28 04:53:22 zezba9000: yes Mar 28 04:53:24 untrustworthy Mar 28 04:53:50 zezba9000: v7 means the version of SDK which is support until current version Mar 28 04:53:51 gordon_: So v7 just is Android 2.1 and above Mar 28 04:54:01 so v7 is supported from version 7 until current Mar 28 04:54:03 So there is only v4, v7 and v13? Mar 28 04:54:05 besides. i have no desire to abandon gentoo Mar 28 04:54:10 zezba9000: yes Mar 28 04:54:24 ok, just wanted to make sure I wasnt missing something Mar 28 04:54:26 tnx Mar 28 04:54:33 I440r: I dont say that gentoo is bad, I like arch :) Mar 28 04:54:44 also big respect to gentoo devs and it's community Mar 28 04:55:10 arch is good. it just cannot be trusted. there are far too many packages i use that are NOT in main and are relegated to AUR Mar 28 04:55:26 If I use v7, do I include all three .jar files, or just what I need, such as "gridlayout" Mar 28 04:55:32 i dont hate arch. i just dont trust it Mar 28 04:55:57 I440r: that's fine too, always look at pkg file when installing from AUR :) Mar 28 04:56:09 I440r: manjaro linux :) Mar 28 04:56:21 zezba9000, no Mar 28 04:56:46 zezba9000: if you need gridlayout you need to import it as android project and add support v4 and v7 Mar 28 04:56:59 I should try Puppy linux since I like dogs Mar 28 04:57:29 oh my, gentoo is #42 on distrowatch Mar 28 04:57:32 gordon_: but I don't need v4 if i'm targeting Android 2.3 and above..? Mar 28 04:57:49 i remember, back in the day, when I used it - it was like #7 or something Mar 28 04:58:04 zezba9000: gridallyout needs v4 Mar 28 04:58:13 fragments are in v4 AFAIK Mar 28 04:58:13 I wonder where Slackware is these days. Mar 28 04:58:22 Probably got pushed off the top list by Arch or something Mar 28 04:58:31 what i reallY REALLLY REALLLLLLLLLY need is a way to run a fucking editor and not have to do mousy mousy clicky pointy mousy draggy droppy clicky clicky ok now ive CUT some stuff Mar 28 04:58:51 mousely clicky dragy clicky pointy pointy clicky.. there now ive pasted it Mar 28 04:59:20 Wow, it's still in the top ten. Mar 28 04:59:20 That is kind of amazing. Mar 28 04:59:21 gordon_: So in a way v4 is only not used when using v13+ then? Mar 28 04:59:28 slackware was my first … installed from floppy disks Mar 28 04:59:56 Mandrake 6.5 was my first. Mar 28 04:59:56 I have the CD for it here. Mar 28 05:00:03 I think I understand how its designed now Mar 28 05:00:06 zezba9000: from my experience, yes Mar 28 05:00:48 k cool tnx Mar 28 05:01:36 hm, mandrake. didn't that become Mandriva, and now mageia ? Mar 28 05:02:00 http://www.mageia.org/en/ Mar 28 05:02:13 Ok i'm going to update my AdMob to use GooglePlayServices version. Does GooglePlayServices also replace IAP system? Mar 28 05:04:02 Does googlPlayServices Wallet replace google play billing v3? I didn't think it did, but they have merged so much into services i'm just not sure. Mar 28 05:05:33 ic Wallet is only for Web Apps then? Mar 28 05:09:54 I specify minsdk=19 targetsdk=19, yet ADT still injects support lib v4 at the end of create app wizard. Why? Mar 28 05:10:10 coz it's using support fragments Mar 28 05:11:06 is that different from http://developer.android.com/reference/android/app/Fragment.html Mar 28 05:11:14 slightly Mar 28 05:11:49 why do I need that in API-19? Mar 28 05:11:56 What I don't understand is why Google-Play-Services is not a .jar file. Why do they make us include the proj into our sln/workspace...? Mar 28 05:12:02 coz support fragments contain stuff the regular framework doesn't Mar 28 05:12:18 you don't need support fragments, but there's lots of useful stuff in the support libs Mar 28 05:12:44 if it's so useful why not included in core? Mar 28 05:12:53 viewpager, drawer layout, slidingpane, view drag helper, etc Mar 28 05:12:57 it's updated separately Mar 28 05:13:11 because then you can't use it in old versions Mar 28 05:13:53 oh lame. BluetoothDevice.getAlias() isn't public, so i Guess people rename their devices and they want us to show the old name , ugh! Mar 28 05:14:06 and I think it's probably viewed as a mistake that fragments are in framework Mar 28 05:14:07 then what's the point of specifying minsdk? Mar 28 05:14:34 use logic, and think about it Mar 28 05:15:19 I specify minsdk=19 and targetsdk=19 and still you say it's there so you support old versions. what logic is that? Mar 28 05:15:38 what are you talking about Mar 28 05:16:10 there's no point in putting in framework because it's not useful for older versions Mar 28 05:17:27 lu all Mar 28 05:17:39 then don't evolve the core, develop everything new in support libs? Mar 28 05:18:13 that's basically what's happening, except for very core features Mar 28 05:19:12 then why should I target the latest APIs while developing new? Mar 28 05:19:37 don't you want to use new features? Mar 28 05:20:32 if more device drivers were open source... we could just update the device OS and not have to worry about these things... Mar 28 05:20:35 the support libs already have it. let's all work on 2.2 aonly Mar 28 05:20:57 anyway, your questions bore me, they're all faq Mar 28 05:22:43 god I have to copy the google-play-services project just to use what should be already a compiled .jar file...? Mar 28 05:23:01 I rly don't understand the logic in that Mar 28 05:23:10 sounds like a hack Mar 28 05:23:54 use gradle and the aar Mar 28 05:23:59 No hack Mar 28 05:24:06 no thanks, that is a hack Mar 28 05:24:20 .dll's and .jar's are not hacks Mar 28 05:24:31 and it can't just be a compiled jar file Mar 28 05:24:44 aar is no hack Mar 28 05:24:48 no if something changes, like files moving around, I will have to delete the whole thing and re-copy Mar 28 05:25:00 >.> Mar 28 05:25:12 quit using adt/ant Mar 28 05:25:13 If I need a tool, too reference what should be a simple single file... thats a hack Mar 28 05:25:27 it isn't a simple single file Mar 28 05:25:43 It could be is the point Mar 28 05:25:46 so, how do you build android apps if you don't have a tool Mar 28 05:26:08 so, you magically compile code in your mind without a compiler Mar 28 05:26:16 teach me great master Mar 28 05:26:39 how do you not hack source into compiled artifacts without tools?! Mar 28 05:27:05 if you use emacs, it just butterflies and stuff Mar 28 05:27:15 pfn: I mean, what could/should be a simple compiled lib file ready to use... has become a process that is/should not be required. Mar 28 05:27:18 It wasn't before Mar 28 05:27:50 Before I could include simple .jar files to use AdMob... now I have to inlcude a dumpy proj?? Mar 28 05:27:54 How is that logical Mar 28 05:28:44 how, to force you to migrate to the correct tools for the platform Mar 28 05:29:13 You don't understand... Mar 28 05:30:26 i don't understard why in Android Studio rearrange entry doesn't work.. old command ctral+shift+F Eclipse Mar 28 05:30:27 You can migrate to the correct tools and still keep the simple lib reference model Mar 28 05:30:27 pfn: I don't know of ANY API that requires this on any other platform I have used... Mar 28 05:32:40 zezba9000, they use tools Mar 28 05:32:50 pods on iOS Mar 28 05:33:29 pfn: its not about tools... I made that clear Mar 28 05:33:41 your experience is limited Mar 28 05:33:51 it's all about tools Mar 28 05:33:52 so is yours Mar 28 05:34:18 Its about how you USE the API in your project that was my point. Mar 28 05:34:33 Its how the tools work thats the issue Mar 28 05:34:38 Its a bad design Mar 28 05:34:46 I use an aar, no copying directories Mar 28 05:34:58 Name me ONE API that requires a DUMPy proj? Mar 28 05:35:02 this is your problem not mine Mar 28 05:35:10 other then googlePlayServices Mar 28 05:35:17 it doesn't require a dummy project Mar 28 05:35:25 you're a dummy Mar 28 05:36:05 Umm yes it is: "google-play-services_lib" "UnusedStub.java"... dumpy project Mar 28 05:36:14 Just go look at the project Mar 28 05:36:40 The docs say to COPY and add the proj to your workspace Mar 28 05:36:45 http://developer.android.com/google/play-services/setup.html Mar 28 05:36:50 Thats a dumpy proj Mar 28 05:37:30 i thought all you needed to add play services to your project was a single line: compile 'com.google.android.gms:play-services:4.0.30' Mar 28 05:37:53 what is this talk of copying projects and nonsense Mar 28 05:38:24 http://developer.android.com/google/play-services/setup.html: "Make a copy of the Google Play services library project." Mar 28 05:39:06 ic there is a "google-play-services.jar" that already exists... but why on earth then do I need to copy/include a dumpy proj... Mar 28 05:39:20 did you see " If you are using Android Studio, skip this step." Mar 28 05:39:23 so use AS Mar 28 05:39:27 Maybe I don't as this is for a Unity3D plugin... maybe its only needed for a native java app.. Mar 28 05:40:23 they are just asking you to import a library project in eclipse Mar 28 05:40:28 g00s: I'm not using Android Studio... but hey, that makes me think the assertion I don't need it may be valid Mar 28 05:40:32 you know, you don't have to really copy it Mar 28 05:40:44 you'll just get some eclipse metadata shit in your extras/ folder Mar 28 05:40:53 But then it might break the Android updater Mar 28 05:41:15 what is the android updater :| Mar 28 05:41:24 Because this is for Unity3D... I'm just going to try not including the proj and only the .jar Mar 28 05:41:24 uh, hey … newsflash, use gradle Mar 28 05:41:33 i think pfn said , stop using ant Mar 28 05:41:55 I'm not using ant Mar 28 05:42:05 I'm using Eclips Mar 28 05:42:11 well, yeah ok Mar 28 05:42:26 android updater aka "Android SDK Manager" I mean Mar 28 05:42:26 protip: your release builds should be command line Mar 28 05:42:43 which means, you should have a build system, and not rely on the eclipse builder Mar 28 05:43:47 This is for a Unity3D plugin... I don't need anything complex. Mar 28 05:43:49 it is fucked up now, that eclipse ADT still doesn't have gradle support. so you have these 2 parallel ways of doing things Mar 28 05:44:36 But I hate eclipse, so I may take your advice later. Mar 28 05:45:21 without going to dl that crap, what i am thinking is ... Mar 28 05:45:42 the play services' project is a .jar or something with some stub java files Mar 28 05:46:20 eclipse / ant handle library projects in very lame fashion Mar 28 05:47:40 I wish I could just use xamarin studio to handle my builds of the .jar library Mar 28 05:48:25 after hearing MS Office is on iOS now, i wonder if they are buying xamarin to port office to android Mar 28 05:49:22 g00s: They are buying Xamarin. But MS Office is not on iOS yet. I think they are still working out some deal with Apple about all that stuff that involves Xbox Live Mar 28 05:49:36 i wonder if myke is upset they ported Office to iOS before supporting some crappy GingerBread device Mar 28 05:49:37 hey guys, how can i pass context to a class Mar 28 05:49:39 one sec Mar 28 05:49:43 let me get gist Mar 28 05:50:16 Windows is going to come out with android devices still I think Mar 28 05:50:21 Just not dual booted ones Mar 28 05:50:24 jareddlc just google, that question has been asked like 783657893465789643785678346598 times (using I440r 's estimating technique ) Mar 28 05:50:49 google keep putting features on iOS before android too Mar 28 05:50:54 so I can't imagine they could be that upset Mar 28 05:51:16 zezba9000 MS wasn't happy with dual booted android/windows devices; i doubt it. and google doesn't like it either. they are pressuring OEMs not to do it Mar 28 05:52:02 https://gist.github.com/jareddlc/9826195 here the code guys Mar 28 05:52:07 Ya they wont dual boot the OS, they official said that I think. But I don't think they said they are going to stop making Android devices that feel like WP8 Mar 28 05:52:28 zezba9000 you mean Nokia? Mar 28 05:52:52 Well ya Nokia. Mar 28 05:52:57 where Nokia fucked up, is their Android device doesn't have Play Mar 28 05:52:58 samung's newest stuff looks like wp8 Mar 28 05:53:05 hehe Mar 28 05:53:12 i like metro design language ;) Mar 28 05:53:27 I like Aviate launcher Mar 28 05:53:28 you mean XAML? Mar 28 05:54:00 (I do work for yahoo, but aviate really does seem like the first launcher that doesn't work against me) Mar 28 05:54:05 Windows has the best API design by far I think. But they keep F'in up when it comes to being open and such Mar 28 05:54:26 zezba9000 with their new ceo, that could change Mar 28 05:54:36 he seems more open to uh open source, etc Mar 28 05:54:41 g00s: could you take a look, and tell me what i should google? Mar 28 05:54:45 Yes I pray the the mighty GOD it does LOL Mar 28 05:55:01 omg the linux guys will go nuts, after all MS is the enemy and now they … might not be Mar 28 05:55:28 jareddlc: java 101? Mar 28 05:55:36 yep wabz n00b Mar 28 05:55:38 g00s stop stealing my thunder! Mar 28 05:55:40 (tm) Mar 28 05:55:48 ive been doing JS too long today. long day at office Mar 28 05:55:54 also im just n00b in Java Mar 28 05:56:11 g00s: I will go nuts if MS starts open sourcing more stuff Mar 28 05:56:25 wabz: do u know what it is called so i can look it up? Mar 28 05:57:20 member variable? Mar 28 05:57:43 g00s: So far they have open sourced, the ASP.NET framework stack, Micro .NET and some other stuff... there is talk they may open source M# (aka C# on crack, aka System programing in C#) Mar 28 05:57:54 jareddlc that code demonstrates you have profound misunderstandings Mar 28 05:58:48 g00s: where did i go wrong, and what do i look up? Mar 28 05:58:49 zezba9000 i think Google should be more concerned with MS than Apple. Only MS has a search engine, and its not getting /worse/. MS is capable of quite a bit. Mar 28 05:59:08 jareddlc i don't know where to begin :| Mar 28 05:59:19 you need to study java, references, memory leaks Mar 28 05:59:49 :( okay Mar 28 06:00:00 anyone else have any pointers where i can start to look up Mar 28 06:00:08 thx g00s Mar 28 06:00:44 jareddlc from 2008 ! http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/ Mar 28 06:00:48 g00s: Yes I agree. right now WP8 is the 2nd biggest in some countries and 3rd in the US. But MS is never going to beat Google unless they start going open source I think Mar 28 06:00:49 come on :| Mar 28 06:01:39 zezba9000 i think lots of people held back on WP8, because they heard bad things about WIndows 8 Mar 28 06:01:50 google is too evil to be beaten by anyone Mar 28 06:02:04 everyone i know that has WP is "very happy' with it Mar 28 06:02:25 MS release WP8 before it was rdy. Mar 28 06:02:27 but their store, is , shit Mar 28 06:02:52 which leads me to … my friends in mobile devs shops say they are seeing the most growth in work on WP Mar 28 06:03:09 I440r: google understand open source way more then MS does. MS is stupid when it comes to that Mar 28 06:03:37 ms is stupid. other than that u said too much Mar 28 06:03:48 that summed the entire statement up Mar 28 06:04:07 Ya WP8 is a very clean and fast design... but there APIs were not rdy.. most of them are still WP7 silverlight stuff and not WinRT stuff Mar 28 06:04:39 so g00s from what i read, non-static innerclass = bad, and dont keep context alive for more than needed. Mar 28 06:04:40 if a windows phone cost $10 and an android phone cose $200 i would take the android phone Mar 28 06:04:49 i trust the underlying architecture WAY MORE Mar 28 06:05:12 in fact i dont trust anything microsoft ever produced Mar 28 06:05:14 ever Mar 28 06:05:24 but i dont know how i would use those functions without grabbing a context Mar 28 06:05:41 private static Context context; // i want to remove this THIS IS BAD!!? Mar 28 06:05:48 remove that Mar 28 06:05:54 I440r: android suffers because its like WinCE in that drivers are closed source even though people can use the OS for free, there is no way to upgrade the OS. MS and Apple and BB10 have control over this and can get around it. Mar 28 06:06:04 in your fragment onCreate(), just say getActivity() to get the context --- and don't hold on to it Mar 28 06:06:30 asus rampage iv extreme with a 4.7 ghz extreme lga2011 and 64 gigs of ram. will the android emulator run faster than my 1ghz phone ? Mar 28 06:06:43 android suffers because there are too many players in the 'virtuous cycle' that have conflicts of interest Mar 28 06:07:00 which makes it an unvirtuous circle Mar 28 06:07:02 :D Mar 28 06:07:22 google has no virtues Mar 28 06:07:26 google, oems, carriers, they are all at odds Mar 28 06:07:33 and none of them give a fuck about the users Mar 28 06:07:42 at least, apple gives a fuck about the users Mar 28 06:07:42 thx g00s , so then this is also bad sPrefs = new SavedPreferences(getApplicationContext()); Mar 28 06:07:43 g00s: well ya, thats what I mean. So they close source there hardware drivers... but if there was a phone that used open source drivers, thats the phone I would use. Mar 28 06:07:57 so will this emu run faster than my physical phone? Mar 28 06:08:11 jareddlc WHHWYYYYYYY Mar 28 06:08:20 stop trying random shit and understand what you are trying to do Mar 28 06:08:42 i am asking so that i learn :| Mar 28 06:09:11 i wasnt sure by keeping, if it means inside a global variable of some sort Mar 28 06:09:13 or in scope Mar 28 06:09:16 i dont use fragments. i dont understand them Mar 28 06:09:24 there is asking when you have a question not answered by DUE DILIGENCE of studying Mar 28 06:09:43 and there is asking from laziness :) Mar 28 06:10:27 g00s, would this emu run faster than my physical phone? Mar 28 06:10:32 I440r yes Mar 28 06:10:38 damn Mar 28 06:11:02 i got some bottlenecks to iron out. well i knew that :/ Mar 28 06:11:39 tomorrow. Mar 28 06:11:42 time to zzz Mar 28 06:11:56 g00s: im reading that page u sent Mar 28 06:12:00 and im just trying to understand it Mar 28 06:12:03 with some of the code i have Mar 28 06:13:03 it says if i want a long lived item to use application object Mar 28 06:13:31 jareddlc you are in a fragment Mar 28 06:13:44 a fragment only exists within the context of an activity Mar 28 06:13:48 an activity is a context Mar 28 06:13:59 there are some corner cases, where you should ask if getActivity() == null Mar 28 06:14:16 but for the most part, if your fragment needs a context, just say getActivity()' Mar 28 06:14:24 and dont store that Mar 28 06:14:47 getActivity().getPreferenceManager().getSharedPrefs(). blah Mar 28 06:14:50 when you say store, in that in same scope Mar 28 06:15:15 well, sure you can assign it a to a local and let the method end, thats harmless Mar 28 06:15:46 so in the scope of that method Mar 28 06:15:56 but don't store it class or object scope Mar 28 06:16:58 so doing this line is fine sPrefs = new SavedPreferences(getApplication()); just as long as sPrefs isnt stored as stated above Mar 28 06:17:13 not to confuse, but where getActivity() returns null might be after onDetach() Mar 28 06:17:36 i dunno, what is SavedPreferences ? Mar 28 06:17:57 just … access the preferences Mar 28 06:18:14 its a helper class that loads preferences Mar 28 06:18:33 probably not i got to rethingk my design Mar 28 06:18:44 be as stateless as you can Mar 28 06:18:45 im used to JS where Mar 28 06:18:54 i try to make modules, Mar 28 06:19:02 seems like cant quite do it in Java Mar 28 06:19:54 reason i wanted a simple way to load sharedPrefs in both the fragmentPrefere and in my service Mar 28 06:19:54 where do android apps get launched from (if I want to access my shaders in /res/shaders is it ./res/shaders ./shaders or something else entirely?) Mar 28 06:21:24 thx g00s Mar 28 06:21:27 im calling it a night Mar 28 06:21:33 ;) Mar 28 06:21:41 sorry if i annoyed you Mar 28 06:22:11 i dont have much time, and i decide to use that time to try to learn as i go :| Mar 28 06:23:41 hm, seems no way to get the bluetooth device alias Mar 28 06:23:43 freezway: That sort of depends on what you're trying to do. Mar 28 06:23:44 this sucks Mar 28 06:23:44 Are you trying to get at something under assets, your project's res directory, or something else? Mar 28 06:24:32 g00s: you mean the name? Mar 28 06:24:36 and not the mac? Mar 28 06:24:39 no Mar 28 06:25:06 ah ok Mar 28 06:25:10 and even better - i renamed my bluetooth device, and it took for a little, but went back into BT settings and reverted back to the old name Mar 28 06:25:16 so that seems like a bug with android Mar 28 06:25:31 and i didn't even recycle the BT adapter, which usually shuts down the BT service ... Mar 28 06:25:32 Yay, only about an hour left before Steam finishes downloading Max Payne 3's colossal ass Mar 28 06:25:43 which empties caches like names and SDP records Mar 28 06:25:58 :| im not even there yet Mar 28 06:26:05 im just grabbing mac and name :) Mar 28 06:26:14 Nilium, forgive, I'm new to android development and don't know where things should go. I have shader files (for openGL) that I need to be able to load. where should I put them Mar 28 06:26:30 alright im off thx again g00s for being patient Mar 28 06:27:15 freezway: Probably by sticking them in assets and then loading them through that. Mar 28 06:27:37 i.e., use AssetManager Mar 28 06:27:49 AssetManager? (brb googling) Mar 28 06:28:17 And if you're on OS X, you should probably install Dash for the sake of quickly reading documentation. Mar 28 06:28:21 do things in assets still have a max size? wasn't it like 1mb a long time ago Mar 28 06:28:45 I didn't know they had a max size. Mar 28 06:28:49 Nilium, im not on OSX Mar 28 06:28:59 Then your road is fraught with many browser tabs Mar 28 06:29:09 the zipinputstream would blow up or something Mar 28 06:29:25 Huh, apparently there is or was a 1mb limit Mar 28 06:29:54 so the way AS sets things up, res is inside /src, should assets be under src as well or should it be under app? Mar 28 06:29:58 Should be easy enough to break things up into chunks, though. Mar 28 06:30:10 it might be fixed now Mar 28 06:30:27 Anyone use AS/Gradle know about that? Mar 28 06:30:27 *and know Mar 28 06:31:34 Apparently the limit is only for specific types of assets. Mar 28 06:32:16 http://stackoverflow.com/a/3178151/457812 ⇐ That answer has a list of all extensions that don't get compressed and so the limit doesn't apply, I guess. Mar 28 06:33:15 In addition, you can apparently add your own extensions on the commandline, so that's handy Mar 28 06:34:54 Is there a way to make SwipeRefreshLayout disabled - not refreshable? Mar 28 06:43:21 * g00s tries Dash Mar 28 06:45:25 nice it works with 10.7 still Mar 28 06:48:26 i have an activity which contains a fragment with some input text fields and a submit button at the bottom. when the keyboard comes up, i want the submit button to scroll up too Mar 28 06:48:29 how do i do that? Mar 28 06:48:46 i tried setting adjustResize in the windowsoftinputmode of the manifest Mar 28 06:48:51 but that doesn't seem to help Mar 28 06:59:27 rohan: do you use transparent nav bar and/or status bar? Mar 28 07:00:03 yoavst: no Mar 28 07:00:13 i am using a SherlockFragmentActivity Mar 28 07:02:31 rohan: full screen mode? Mar 28 07:07:12 yoavst: no, with the stauts and nav bar dispalye Mar 28 07:14:25 rohan: so sorry, i have no idea :| Mar 28 07:14:50 but try: android:windowSoftInputMode="stateVisible|adjustResize|adjustPan" Mar 28 07:16:48 yoavst: ok, let me try that. thanks Mar 28 07:18:17 didn't help, in fact, now the keyboard is always up :( Mar 28 07:21:11 anyone here using AS (0.5.2 or 0.5.3) and having weirdness with the Darcula theme ? Mar 28 07:21:26 basically black text on dark grey stuff Mar 28 07:21:33 but not everywhere Mar 28 07:26:16 that's a common problem with intellij plugins Mar 28 07:26:37 that or light text on light background Mar 28 07:29:35 hm; just using the android plugin Mar 28 07:34:41 good morning Mar 28 07:35:40 Is there a way to make SwipeRefreshLayout disabled - not refreshable? Mar 28 07:55:52 I have a strange issue. Iv'e updated AdMob to the GooglePlayServices version. Ads loads and refesh callback gets called, but NOTHING shows up. Mar 28 07:56:11 So I hit the home button pause the app, come back into the app and its now showing. Mar 28 07:56:37 No code onPause or onResume is getting called. Mar 28 07:58:12 zezba9000 are you planning on shipping millions of copies ? Mar 28 07:58:20 if not, i'd ditch the adds ;) Mar 28 07:58:42 g00s: I'm updating a Unity3D plugin Mar 28 07:58:47 So I must have ads :) Mar 28 07:58:52 as its not for me Mar 28 07:58:59 ok Mar 28 07:59:26 g00s: why do you say that, do ads make sense only at that scale? Mar 28 07:59:26 I'm thinking it might have something to do with the layout f'in up with the new ad framework somehow... Mar 28 07:59:38 ok, 10K + Mar 28 08:00:24 RelativeLayout.LayoutParams is still good to use on the main contentView is it not? Mar 28 08:00:32 g00s: below that? Mar 28 08:00:48 a better business model - instead of adds - might be to ask the user if you can do some bitcoin mining on their spare CPU hah Mar 28 08:01:06 g00s: hah, or do that without asking them, as many apps seem to be doing Mar 28 08:01:12 g00s: for a phone app lol? Mar 28 08:01:15 rohan i don't know the exact cutoff; ads work in your favor when you have tons of views Mar 28 08:01:43 zezba9000: it's not a joke, there was a report that rogue apps use your phone cpu for mining bitcoinds Mar 28 08:02:12 wow, well i'm not surprised I guess Mar 28 08:04:15 hey whats the difference if you get their OK; ads use CPU and network. Mar 28 08:04:23 and therefore battery Mar 28 08:05:42 is anyone using robotium here ? Mar 28 08:05:52 maybe there's something better now than robotium Mar 28 08:33:20 Well looks like there is a Bug in AdMob for GooglePlayServices, but not in the old one (scroll to bottom): https://groups.google.com/forum/#!topic/google-admob-ads-sdk/avwVXvBt_sM Mar 28 08:33:33 So I have to do some hack to get the first Ad to show Mar 28 08:34:09 ...or (best guess) it doesn't set the size of the adView Mar 28 08:35:33 or not to bottom of page, but to the line with "if(firstTime)" Mar 28 08:38:04 how can I create and show a notification from wtihin a service? Mar 28 08:38:25 did someone work with SwipeListLayout from new v4? Mar 28 08:39:50 SuperNoeMan NotificationManager? Mar 28 08:40:15 g00s: yeah I know about notification manager Mar 28 08:40:38 and I've read the documentation on it, but I think there's something about being in a service that makes it different from showing a notification from an activity Mar 28 08:41:04 not that i'm aware of. if you use a foreground service, you have to provide a notification Mar 28 08:41:31 SuperNoeMan, it's not different. Mar 28 08:41:35 it works just the same. Mar 28 08:41:43 recheck your code, make sure you're not doing something silly Mar 28 08:42:01 in the creation of my service, I try to create and show a notification... Mar 28 08:42:06 I'll give you the onCreate function Mar 28 08:42:58 https://gist.github.com/anonymous/7c40c9ddc1daabe8e6af Mar 28 08:43:10 that's the oncreate method from my object that extends IntentService Mar 28 08:43:29 yes you might wanna let your service initialize first. Mar 28 08:43:37 and then create a notification. Mar 28 08:44:13 Mavrik: alright, I'm running it to try and test it Mar 28 08:44:29 I have the HAX extension installed, so it shouldn't be but a minute Mar 28 08:44:38 oh awesome Mar 28 08:44:40 yeah it worked Mar 28 08:44:43 thanks so much sorry guys Mar 28 08:45:11 :) Mar 28 08:45:26 one little mistake... 2 hours of searching Mar 28 08:45:28 gah Mar 28 08:46:29 it worked one time... I gotta add a couple of unit test buttons to make sure that it works the next time by starting and stopping the service Mar 28 08:46:45 SuperNoeMan yeah, don't do stuff requiring context before onCreate :D :D Mar 28 08:47:12 super.onCreate() specifically Mar 28 08:47:29 g00s: it doesn't seem to always show the notification. It showed it one time... Mar 28 08:48:20 but I know that it's entering the onCreate function Mar 28 08:48:38 i remember the old days of froyo, i could reboot my device with a malformed notification Mar 28 08:50:01 g00s: hold on... let me paste again... Mar 28 08:50:51 yea it doesn't seem to be running the actual onCreate function anymore Mar 28 08:51:39 Whats usually the smallest portrait aspect ratio we have to deal with? Mar 28 08:53:16 dammit... it worked like one time, now it wo't... Mar 28 08:53:19 *sigh Mar 28 08:53:24 apple741 does a 1" square count (watch) Mar 28 08:53:50 SuperNoeMan maybe … you aren't stopping the service, so its not getting created :) Mar 28 08:53:54 (again) Mar 28 08:54:16 g00s: well I thought that every time you restart the AVD it would get created right? Mar 28 08:54:26 oh yeah :| Mar 28 08:54:29 lol I didn't even think of that but probably won't be supporting watches anyway Mar 28 08:54:55 hello, anything similar for android/java http://api.rubyonrails.org/classes/ActiveSupport/Inflector.html Mar 28 08:55:00 apple741 hey, soon google is going to ding us for not supporting watches like they do with tablets :D Mar 28 08:55:03 g00s: yeah, it seems to only start the service when I'm not installing it again in order to run it Mar 28 08:55:21 like if I run it from eclipse, it triggers an install automatically, which I suppose stops it from starting the service that corresponds to it Mar 28 08:55:31 anyway, that's sufficient for my purposes Mar 28 08:56:35 Good point g00s! But for now I'm limited by time and lack of knowledge :D Mar 28 08:56:50 did someone work with SwipeListLayout from new v4? Mar 28 08:56:51 i'm limited by not caring :) Mar 28 08:57:21 (about google's shenanigans in Play) Mar 28 08:59:25 hehe don't blame you :) Mar 28 09:06:58 So I can do "FrameLayout.LayoutParams adViewParams = "..."; ContentView.addView(adView, adViewParams);" Mar 28 09:06:58 But can do: "adView.setLayoutParams(new FrameLayout.LayoutParams" as it want to cast to LinearLayout Mar 28 09:07:24 I'm confused as to how I can add the view with one, but can't update the view with the same type of Layoutparams Mar 28 09:19:21 When calling dlopen within native code. Do I have to preload the dynamlic library using System.loadLibrary in java? Mar 28 09:24:16 guys, how do you name your private boolean field? Mar 28 09:24:20 mIsConnected? Mar 28 09:24:24 or just isConnected ? Mar 28 09:24:45 isConnected. Mar 28 09:25:13 Both, depending on the code base. I work on a project using the m-prefix and on one not using it. Mar 28 09:25:54 I go by Scala rules: no m prefix. Mar 28 09:26:22 okay. Thank you, no exact answer. > boolean without m prefix I see Mar 28 09:26:29 Declaring something generates accessor methods for me, no point naming it something other than what it is. Mar 28 09:26:36 Though I think if it's private it gets inlined as direct field access.. not an important detail anyway. Mar 28 09:27:04 Private to the instance, anyway. Mar 28 09:27:04 hi Mar 28 09:27:27 does anyone know how to bring up the 'Access Point Names' settings under 'Mobile network settings'? Mar 28 09:27:35 could there be an intent for it? Mar 28 09:29:17 What does the Hangouts App do when you click "Access Point Names" in the Settings (Settings -> SMS, last item) Mar 28 09:29:29 I don't have SMS enabled in it, so I can't check. Mar 28 09:29:47 kate_r: Probably want to look at android.provider.Settings Mar 28 09:31:01 I'm using go sms for access points Mar 28 09:32:26 Nilium, well i've read through them and none of them seems to come even close Mar 28 09:33:05 So, the one for APNs doesn't work? Mar 28 09:33:18 Nilium, hmm maybe i've missed it :( Mar 28 09:33:28 Nilium, is there one? Mar 28 09:33:39 Might not be an intent for it if that doesn't work. Mar 28 09:33:39 Or at least no publicly documented one I'm aware of. Mar 28 09:33:52 Look at the Settings documentation and search for "APN" Mar 28 09:33:57 there's an app out there that acts as a shortcut to Mobile Network settings Mar 28 09:33:58 https://play.google.com/store/apps/details?id=diewland.settings.mobilenetworks Mar 28 09:34:12 but i can't seem to find an intent to bring up even that screen Mar 28 09:34:12 Since I closed that tab already Mar 28 09:34:47 I don't know if APN in that case means access point names, but I'm also not sure if there's any other APN in this context that'd make sense. Mar 28 09:35:28 Nilium, oh yes there is.. ACITON_APN_SETTINGS. i was reading Settings.System Mar 28 09:35:33 thanks. i'll give that one a try Mar 28 09:36:53 Nilium, that works indeed. thanks a lot Mar 28 09:37:03 Goody Mar 28 10:30:35 How can I add a device to the google play store? I'm trying to install the android wear preview, but only my private device shows up (which is to old), not the one I use at work which should be new enough. Mar 28 11:09:43 morning Mar 28 11:12:02 afternoon Mar 28 11:23:40 does an android activity correspond 1:1 to the uml activity ? Mar 28 11:24:15 no Mar 28 11:24:31 if i remember corrctly Mar 28 11:24:42 i haven't touched uml in like 4 years :( Mar 28 11:24:48 uml activity ? O.o Mar 28 11:25:10 uml activity is like a flowchart for a use case right? Mar 28 11:25:35 yes.. it talks of states Mar 28 12:03:49 Hi all, is there a default icon for NFC? Mar 28 12:10:42 is it possible to somehow show ContextMenu from code? (not from click on view)? Mar 28 12:11:36 how can I parse current hour and minutes to long ? Mar 28 12:23:18 are the graphics missing only for me ? http://android-developers.blogspot.com/2011/11/new-layout-widgets-space-and-gridlayout.html Mar 28 12:24:15 OMG .. this qa girl .... i hate ppl that think they are always right Mar 28 12:26:29 im trying to make a carousel (only form images) and was wondering is it a good idea to implement it on a surfaceView. or would the "right" thing be to try and make it with natvie views :/ Mar 28 12:34:35 is it interactive? Mar 28 12:35:32 just spinning and clicking Mar 28 12:35:58 spints automatically or with touch? Mar 28 12:36:04 touch Mar 28 12:36:16 is it fully revolving? like when you hit the end it goes to the beginning Mar 28 12:36:37 a full circle, all items visible at once Mar 28 12:37:56 When calling dlopen within native code. Do I have to also load the dynamlic library using System.loadLibrary in java? Mar 28 12:38:45 yes] Mar 28 13:21:57 Hi all. I'm kinda new at this, I have some questions. Mar 28 13:22:18 Is there a way I can subclass the application menu Mar 28 13:23:15 and 2, how does one to a "basement" page. or a left-right swipe like in the facebook app where there are activities on the sides Mar 28 13:30:51 Scrop1us: what do you want to achieve by subclassing the application menu? Mar 28 13:31:04 *Scorp1us Mar 28 13:31:43 a dynamic menu at the top that reflects the current activity Mar 28 13:33:05 I guess I could code a menu per activity? Mar 28 13:33:50 Also, I might be required to implement a more iOS-y menu. But I'm arguing against that. Mar 28 13:34:05 ansgarm: what would you recommend? Mar 28 13:36:45 I can recommend this library https://github.com/SimonVT/android-menudrawer Mar 28 13:37:34 and I would use fragments with one activity that contains the menu Mar 28 13:38:52 that SimonVT is a scammer Mar 28 13:39:00 he's a real nigerian prince, i wouldnt trust his libraries Mar 28 13:41:41 mikedg: why? Mar 28 13:42:02 mikedg: is that true? Why would a nigerian prince be writing android libraries? Mar 28 13:42:26 Scorp1us thats exactly the questino you should be asking' Mar 28 13:49:17 mikedg: do you have valid reasons? or is is just a bad feeling? Mar 28 13:49:37 no valid reasons, i live under a bridge though Mar 28 13:53:03 Hi Mar 28 13:53:10 anybody help with this code? Mar 28 13:53:23 left my app running all night in an emulator, random mob spawns, despawns endlessly right up until the system sent a sig 3 to my app. what is sig 3? Mar 28 13:53:27 public void setAutojoinChannels() Mar 28 13:53:27 { Mar 28 13:53:27 this.sendRawLine("/Join #chat"); Mar 28 13:53:27 } Mar 28 13:53:40 no work Mar 28 13:54:41 ansgarm: thank you, both these suggestions will work nicely Mar 28 13:54:47 /join isn't really a raw irc command Mar 28 13:55:12 also, case sensitive? Mar 28 13:55:21 i keep telling my cat.. thats a MOUSE pad, not a cat pad... he dont listne good Mar 28 13:55:32 MooGoo: what? Mar 28 13:55:34 its true Mar 28 13:55:37 its really Mar 28 13:56:01 sign 3 is sigquit Mar 28 13:56:21 I440r: android shut your app down Mar 28 13:56:31 b0t: http://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands#JOIN Mar 28 13:56:36 I440r: http://www.linux.org/threads/kill-commands-and-signals.4423/ Mar 28 13:56:50 i have the command in a class Mar 28 13:56:57 the command work Mar 28 13:57:02 this code not working Mar 28 13:57:10 scorplus yea i now.. the questionw as WHY lol... rtmf the link... brb Mar 28 13:57:25 b0t: perhaps you need a newline? Mar 28 13:57:36 nop Mar 28 13:57:39 the original code is Mar 28 13:58:05 I440r: Android's internals are mysterious and magic. No one knows why. Problably, if I had to guess, you exahusted the ram and it quit you. Mar 28 13:58:14 public void setAutojoinChannels(ArrayList channels) Mar 28 13:58:14 { Mar 28 13:58:14 autojoinChannels = channels; Mar 28 13:58:14 } Mar 28 13:58:21 this is the original Mar 28 13:58:24 i.e. a memory leak Mar 28 13:58:54 i need join a #chat for default Mar 28 13:59:06 b0t: we need to see more code than that. pastebin it Mar 28 13:59:06 Scorp1us, THATS a possibility lol. let me profile my apps memory usage over time Mar 28 13:59:25 is yaaic Mar 28 13:59:33 waiting Mar 28 13:59:43 *wait Mar 28 14:00:43 Scorp1us: Mar 28 14:00:45 https://github.com/pocmo/Yaaic/blob/master/application/src/org/yaaic/irc/IRCConnection.java Mar 28 14:00:48 line 130 Mar 28 14:00:59 err i forgot the adb shell command to get meminfo lol Mar 28 14:01:57 dumpsys meminfo yay Mar 28 14:03:14 b0t: youa re using the api incorrectly. Mar 28 14:03:25 whattttttttttt Mar 28 14:03:41 well wait.. hrm. Mar 28 14:05:04 why are you doing "/join #channel" the api just says joinChannel("#channel") Mar 28 14:05:28 yes but raw line is join... Mar 28 14:05:36 its equals Mar 28 14:06:52 seems, every time i update a info textview (debug info in my app) which is displayed in a nice 9 patch bubble i get a NEW instance of the font im using cached Mar 28 14:07:31 i guess i need to create ONE instance of this textview and set its font and just reuse the same textview over and over Mar 28 14:07:39 I440r: bingo Mar 28 14:08:10 not sure if this is "the" memory leak but if the font caches are not cleaned out entirely before the next batch of info... . . Mar 28 14:08:30 why does android cache a new instance of the SAME FONT it already has cached? Mar 28 14:08:40 b0t: how do you know that joinChannel calls this.sendRawLine("/Join #chat"); Mar 28 14:08:47 or.. is there a System.UncacheFont() thigie i could use Mar 28 14:08:48 ? Mar 28 14:09:01 I've figured out a solution to this problem, but both I and the person on SO who looked at it could not figure out how the behavior could be different. It is really eating at me... (http://stackoverflow.com/q/22671690/1747491) Mar 28 14:11:16 Scorp1us: https://github.com/pocmo/Yaaic/blob/master/application/src/org/yaaic/command/handler/JoinHandler.java Mar 28 14:12:55 b0t: that doesn't tell me anything Mar 28 14:13:37 show me the implementation of joinChannel. You can't unless you show me PircBot's source. Which is not int he pagage they give you Mar 28 14:14:31 Scorp1us: Mar 28 14:14:32 if it does not work. I wish to enter a # chat, I just need that. Mar 28 14:15:05 https://github.com/pocmo/Yaaic/tree/master/application/src/org/jibble/pircbot Mar 28 14:15:10 b0t: https://tools.ietf.org/html/rfc2812#section-3.2.1 Mar 28 14:15:41 so the difference is there is no /, join is all caps Mar 28 14:16:19 the / is for your client to know it's a command and not a message Mar 28 14:16:29 it's not part of the IRC command Mar 28 14:17:09 mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm Mar 28 14:17:22 its JOIN Mar 28 14:17:53 b0t: but you wrote this.sendRawLine("/Join #chat"); Mar 28 14:18:32 therefore, I think sendRawLine("JOIN #chat"); is what you want. Mar 28 14:18:37 its my error Mar 28 14:18:42 Is there a way to limit voice input to numbers in android wear? Mar 28 14:20:22 How would one mock an NFC tag ? Mar 28 14:20:55 in api lvl 19 Mar 28 14:22:02 I tried the right way but does not work Mar 28 14:22:31 public void setAutojoinChannels() Mar 28 14:22:31 { Mar 28 14:22:32 this.server.getId(); Mar 28 14:22:32 this.sendRawLine("/JOIN #chat"); Mar 28 14:22:32 return; Mar 28 14:22:32 } Mar 28 14:23:26 I can create the channels list so if it works? ---> public void setAutojoinChannels(ArrayList channels) Mar 28 14:23:34 no / Mar 28 14:24:52 Scorp1us: as I can create the "channels" so get the array list? Mar 28 14:25:15 I could stick # chat and other channels there Mar 28 14:25:28 ///////////////// Mar 28 14:25:59 slash Mar 28 14:26:12 b0t: you're on your own now. i've said it like 3 times Mar 28 14:27:24 b0t should have been on his own a long time ago Mar 28 14:28:44 http://stackoverflow.com/questions/1005073/initialization-of-an-arraylist-in-one-line Mar 28 14:28:47 -_- Mar 28 14:34:03 Is it possible to mock an NFC tag in SDK v19 ..? Mar 28 14:35:47 yea now i only have one insance of the font cached... /me twiddles thumbs for 28484 hours to see if my app crashes... damn wish i was being PAID for this debug session.. }:P) Mar 28 14:35:52 }:) even Mar 28 14:35:55 (tm) Mar 28 14:36:19 Click66 stfu Mar 28 14:36:35 :) Mar 28 14:36:40 :'( Mar 28 14:37:44 but its not displaying exactly the same as it was before, the font is squished in horizontally more. how do i set character spacing in a textview? Mar 28 14:46:25 ansgarm: how do I use this menuy drawer library? Mar 28 14:46:45 why use a menu drawer library instead of the drawerlayout? Mar 28 14:46:50 bugger. seems android doesnt allow setting character spacing only line spacing Mar 28 14:47:09 only reason I'd use menu drawer is if I was using menu drawer before drawerlayout was released Mar 28 14:47:15 pfn: because I have no idea what I am doing Mar 28 14:48:39 i know java, nothing of android Mar 28 14:48:45 I440r: Character spacing is a property of the Font. Mar 28 14:49:03 Scorp1us: https://github.com/SimonVT/android-menudrawer#left-menu Mar 28 14:49:51 ansgarm: I can't figure out hwo to build it Mar 28 14:50:13 i've always just worked with jars before for libraries Mar 28 14:50:20 well thats weird because NOW the spacing is different from what it was before. almost as if i could not have actually been using this font before. Mar 28 14:50:34 i got gradle to work, but it built nothing Mar 28 14:50:40 (that I can find) Mar 28 14:52:29 pfn: thanks, this will also work nicely. Mar 28 14:52:32 I440r: That's possible. Lots of fonts look similar. Mar 28 14:52:54 I440r: And porportional fonts frequently change their character spacing based on the font scale. Mar 28 14:53:20 actually i think im not using it NOW. i just removed the setfont and it looks exactly the same. i think something isnt quite rite here Mar 28 14:53:52 I440r: setFont() with a Font that doesn't exist fails silently. Mar 28 14:53:54 the font is cached (once now not repeatedly) but i dont think something is working rigth Mar 28 14:54:14 I440r: Err, setTypeface() Mar 28 14:55:33 Scorp1us: if you're building with gradle you have to write build files first Mar 28 14:56:52 ansgarm: well that's jsut what the library came with, gradle files that don't even work Mar 28 14:57:17 ugh, I wish the download manager would spit out a reason why a download failed Mar 28 14:57:18 oh well. I'm just going to use the new layout since I only care about v4 devices Mar 28 14:57:41 uh, why would the library come with gradle files that build your project for you... Mar 28 14:57:49 you have to create your own build... Mar 28 14:59:18 well, usually a library is added to a program it doesn't become part of it. Mar 28 14:59:37 like, if I go anf get xbar library, I get a jar. Mar 28 14:59:46 or I can get the source and make a jar. Mar 28 14:59:52 then I use the jar. Mar 28 15:00:06 that's still the case here... Mar 28 15:00:17 ok so what am I missing? Mar 28 15:00:31 everything... Mar 28 15:00:51 right. so fill me in. Mar 28 15:00:54 please Mar 28 15:01:13 it seems as if I'm expected to drop this into my project somehow. Mar 28 15:01:40 no, I'm not here to handhold you through the process Mar 28 15:01:56 You're expected to know how to add android library projects as dependencies in whatever build system you chose to use Mar 28 15:02:13 Hi, i have a drawerlayout, listview for a menu. Can I perform a selection in the menu even if the menu (listview) is closed? seems not to work with setSelection(index, true) Mar 28 15:02:27 FrancescoV, of course it works Mar 28 15:03:00 SimonVT: right, but i have never heard of gradle until now. Mar 28 15:03:21 Scorp1us: Are you using Eclipse? Mar 28 15:03:23 i guess eclipse is hiding it Mar 28 15:03:25 yeah Mar 28 15:03:47 Do you have the gradle plugin installed? Mar 28 15:03:48 eclipse doesn't work with gradle Mar 28 15:03:58 there's a gradle import plugin? fancy Mar 28 15:04:22 I am trying to get AlarmManager to work I tried to follow this, http://developer.android.com/training/scheduling/alarms.html This is my implementation http://pastebin.com/iW1Et9xR I used a static method for the init, since I wanna be able to init the alarm from more then one place. The init method is being called but I am never getting a call to the onHandleIntent Mar 28 15:04:32 Gradle in Eclipse: http://stackoverflow.com/a/20760550/3420189 Mar 28 15:04:33 ansgarm: no. SimonVT 's pacjage has a gradew script that I ran though. Mar 28 15:04:51 Any idea what could be wrong? :( Mar 28 15:04:52 Scorp1us, why would that build your project... Mar 28 15:05:11 I'm not trying to build my project with it, I'm trying to build his library Mar 28 15:05:33 mihalybak, you never registered the service in manifest Mar 28 15:05:34 pfn: but the menu isn't changing wit setselection Mar 28 15:05:43 FrancescoV, then you're not calling it Mar 28 15:06:15 Scorp1us: The library can't be packaged into a *.jar file as it contains android resources Mar 28 15:06:44 pfn: I did http://pastebin.com/H360uDz3 Mar 28 15:06:54 however it could be compiled into an aar package, that (afaik) only works with gradle Mar 28 15:06:58 ansgarm: oh Mar 28 15:07:16 mihalybak, oh, you did getBroadcast Mar 28 15:07:23 you need getService Mar 28 15:07:46 so how do I "use" the library (I'm not talking API, i'm talkign about adding it to my project) Mar 28 15:07:58 you can import the menudrawer folder (https://github.com/SimonVT/android-menudrawer/tree/master/menudrawer) into eclipse Mar 28 15:08:00 by using gradle Mar 28 15:08:06 by adding as a library project Mar 28 15:08:10 by using maven Mar 28 15:08:13 aaaaah ok Mar 28 15:08:14 your choice Mar 28 15:08:33 but you have to mark it as an library project afterwards Mar 28 15:08:46 pfn: thanks, that seams like a problem :) will try it out now Mar 28 15:08:52 ok thanks Mar 28 15:10:27 Has someone experience with writing a REST persistence layer in Android? Mar 28 15:10:33 respectively, reusing one like JAX-RS Mar 28 15:11:23 persisting to what Mar 28 15:11:25 pfn: works fine now :) Mar 28 15:12:02 hey Mar 28 15:12:34 is there a way to run a method inside my Fragment from a Service? Mar 28 15:12:42 I want to set an alarmmanager to run it every day Mar 28 15:13:18 take it out of the fragment :P Mar 28 15:13:42 wait Mar 28 15:14:01 This whole fragment thing is really confusing me Mar 28 15:14:07 AlexAbraham: http://developer.android.com/training/scheduling/alarms.html Mar 28 15:14:48 jug6ernaut: Not persisting. REST -> Java Objects on your Android phone Mar 28 15:15:04 I changed up my app to use a ViewPager and a FragmentPagerAdapter so that i could have tabs Mar 28 15:15:04 AlexAbraham: cant you just send an Intent to your fragment from the service? Mar 28 15:15:05 you don't want to write all the HttpGet Requests and JSON parsing for all the time yourself Mar 28 15:15:41 platzhirsch are u wanting to hit a rest api from android? Mar 28 15:15:42 so i send an intent to the service from the fragment and then send an intent to the fragment back from the service? Mar 28 15:15:50 jug6ernaut: exactly Mar 28 15:16:03 platzhirsch ah, check out square's Retrofit Mar 28 15:16:04 AlexAbraham: exactly Mar 28 15:16:06 its awesome Mar 28 15:16:12 jug6ernaut: sweet, thanks Mar 28 15:16:18 I am a little confused Mar 28 15:16:22 np Mar 28 15:16:35 i have a method tht runs an asynctask and then updates a listview Mar 28 15:16:40 that is inside my fragment Mar 28 15:16:42 Yeah that looks very slick Mar 28 15:16:45 AlexAbraham: don't be ;) it is all good :) Mar 28 15:16:54 i want to run that every day even if the app is not open Mar 28 15:18:15 i set an alarmmanager with an intent pointing to the service Mar 28 15:18:18 AlexAbraham: override onActivityResult(int pRequestCode, int pResultCode, Intent pData) inside your fragment and have the run the metod you want Mar 28 15:19:09 AlexAbraham: https://developer.android.com/training/run-background-service/report-status.html Mar 28 15:19:15 so i just send an intent back from the service and then use startActivityForResult Mar 28 15:19:38 AlexAbraham: perhaps that one was wrong.. read the link instead for the "real" solution Mar 28 15:21:50 im confused as to how to implement that with the alarmmanager Mar 28 15:22:19 AlexAbraham: don't be read this http://developer.android.com/training/scheduling/alarms.html Mar 28 15:22:37 and come back if you have a more clear question Mar 28 15:22:43 *exakt question Mar 28 15:23:14 Oh, just have the alarm call the service Mar 28 15:23:30 right Mar 28 15:24:01 so i made an intent (getActivity(), DailyRefresh.class) and used that for the pendingintent Mar 28 15:24:20 AlexAbraham: sound right Mar 28 15:24:41 so DailyRefresh is the service and in onCreate i should run whatever i need to right? Mar 28 15:24:52 DailyRefresh should be writen in a mather that it is independent of where the request came from Mar 28 15:25:33 AlexAbraham: not quite, first use IntentService instead, second the code should go into onHandleIntent Mar 28 15:25:57 AlexAbraham: but read the documentation instead https://developer.android.com/training/best-background.html Mar 28 15:28:51 i am confused what the difference is between an intentservice and a service Mar 28 15:29:34 IntentService is a Service implementation that behaves in a certain way Mar 28 15:31:37 does the pendingintent do the same thing as getActivity().startService() when it is used by the alarm manager? Mar 28 15:33:02 Service can in API level 1 and IntentService came in api level 3, the documentation at developer.android.com seams to suggest that IntentService is the current way to go if you don't have very sepcific reasons not to use IntentService Mar 28 15:33:03 I have an Activity with an intent filter (manifest), which captures nfc. Then my Activiity get launched, which is good. But when my activity is present (open), the activity is launched again, how can I ignore this? add / remove filter? Mar 28 15:33:42 AlexAbraham: try it out for your self, but from what you are saying, yes Mar 28 15:34:33 Is anyone else having problems with the new Android Studio release? I’m getting out of heap memory errors during mergeDefaultFlavorReleaseResources. Mar 28 15:35:25 mihalybak, should i move the method to pull data from the server out of the fragment? or is there a way i can run it from the IntentService without doing so Mar 28 15:37:01 AlexAbraham: you could refactor the code into some common class Mar 28 15:38:46 AlexAbraham: but generally you might need a more complex model... 1) The service should store data in the local sqllite database (or somewhere else) 2) The fragment should get its data from this source 3) The service should only tell the fragment to reload, not send data to it Mar 28 15:39:29 this is too crazy Mar 28 15:39:42 AlexAbraham: Nawwww :) Mar 28 15:39:47 i need to find somebody to look at my code and give me a more specific guideline Mar 28 15:40:22 I used a tutorial online to convert all my activities to fragments but i never moved any of the code out of the activities Mar 28 15:40:36 i just added getActivity() or getView() to everything Mar 28 15:40:58 you can use http://pastebin.com/ for smaller parts.... but please read and understand the links I sent you and comeback when you have more exact problem Mar 28 15:41:27 guys Mar 28 15:42:34 I am using a drawRect and then rotating on canvas. Then I use a .intersect to see if there was a collision Mar 28 15:42:53 but I am getting quite a few collisions where (on screen) none happened Mar 28 15:43:01 is there anything wrong? Mar 28 15:43:19 I can't believe intellij still doesn't have a jump-to-editor command Mar 28 15:43:20 does intersect work with canvas rotations? Mar 28 15:49:00 Hi. I've got a situation where I need to apply an arbitrary transform to streamed data that needs to come in for a VideoView.. I know my two main options of local web server, or storing locally and decrypting… and I also know of the libmedia easy library that has a cipher pipe, however what I need to do ISN'T covered directly by the Java crypto API (the engineer in question decided to do a simple XOR transform, I know Mar 28 15:49:01 but it wasn't my call!), and I either have two options: (1) write a Cipher implementation for the brain dead decryption, (2) find something similar that will allow me to inject an arbitrary function to transform the stream… Does anyone have an idea of a direction to point me in, something I haven't considered? Mar 28 15:49:01 jump to editor? Mar 28 15:51:05 mihalybak i think i am missing something much more fundamental here about fragments Mar 28 15:51:41 i have fragments in my app but i never used beginTransaction() or commit() once Mar 28 15:55:08 indeed, you are Mar 28 16:01:00 hi guys...can someone explain me if certificates installed by rom are used by browser? Mar 28 16:16:10 if i have multiple fragments using tabs and one main activity managing the tabs, should i have the fragments contain onlu UI elements and have a central activity controlling everything? Mar 28 16:20:39 why is my android 4.3 EMULATOR connecting to tmobile.com? Mar 28 16:21:02 its connected to epc.tmobile.com according to the logcat Mar 28 16:21:42 mobile[UMTS], state: CONNECTED/CONNECTED, reason: connected, extra: epc.tmobile.com Mar 28 16:25:51 Because it emulates having a 3g connection and the APN is a tmobile one Mar 28 16:26:37 I am using sqliteopenhelper is it bad if I have the file with a 1000 lines? Mar 28 16:27:26 or can I separate it into multiple files and call KEY_ID like DBConstants.KEY_ID Mar 28 16:42:54 any automated testing for android? Mar 28 16:43:03 yes Mar 28 16:43:08 i think its called robotium Mar 28 16:43:24 https://code.google.com/p/robotium/ Mar 28 16:43:53 :AlexAbraham thank you a lot Mar 28 16:46:28 there are many Mar 28 16:46:40 but I dont know which one is the best Mar 28 16:46:57 i just took an online course from coursera in android and they used robotium tests for grading exams Mar 28 16:47:00 robotium is not official Mar 28 16:47:01 they seemed pretty good Mar 28 16:47:05 right Mar 28 16:47:17 AlexAbraham: can you link me to that course please ? Mar 28 16:47:35 https://class.coursera.org/android-001 Mar 28 16:48:21 thank you Mar 28 16:48:25 is it free or not ? Mar 28 16:49:33 the course is free Mar 28 16:49:43 but it closes soon and im not sure if you can sign up now Mar 28 16:50:35 however the instructor uploaded all the course examples to github which could be pretty useful Mar 28 16:50:36 well I just signed it Mar 28 16:50:37 *in Mar 28 16:51:07 https://github.com/aporter/coursera-android Mar 28 16:51:12 oo nice! Mar 28 16:51:25 where is testing ? Mar 28 16:52:28 so if you go to the programming assignments section you can download a lab from week 3 and up Mar 28 16:52:46 they should have testcases as seperate projects inside the zip Mar 28 16:54:34 ah ok Mar 28 16:54:35 thanks ! Mar 28 16:54:43 np :-) Mar 28 16:54:44 those are integration tests ? Mar 28 16:54:48 with robotium Mar 28 16:54:53 i think so Mar 28 16:54:58 not unit tests with robolectric ? Mar 28 16:57:18 yeah robotium Mar 28 16:57:38 thank you once again Mar 28 16:57:46 will study it since now I need it Mar 28 16:57:52 np Mar 28 16:58:04 hey question Mar 28 16:58:21 when using fragments, should i have an activity to handle non-ui elements? Mar 28 16:58:22 and I can run it with geny motion :) Mar 28 16:58:27 ya i know Mar 28 16:58:30 i LOVE genymotion Mar 28 16:58:37 its insane how much faster it is Mar 28 16:58:39 who doesnt ;) Mar 28 16:59:21 what kind of elements ? Mar 28 16:59:39 i have a listview inside my fragment Mar 28 16:59:56 and i have methods to update that list view from a server or modify them Mar 28 17:00:10 should those methods be inside the fragment or inside some overarching activity Mar 28 17:00:16 well for me data should be fetched inside fragment Mar 28 17:00:29 okay Mar 28 17:00:36 because you can have two fragments inside of one actibity (in tablet ui for example) Mar 28 17:00:45 and then what will happen with second actibity ? Mar 28 17:00:53 right. right now i have tabs with more than one fragment Mar 28 17:01:06 so each fragment should contain all the methods pertaining to it? Mar 28 17:01:20 I think so Mar 28 17:01:27 alright Mar 28 17:01:39 view logic will go indo ListAdapter anyway Mar 28 17:02:03 now that leads me to my issue. I want to create an alarmmanager that runs a method inside the fragment once a day Mar 28 17:02:07 even if the app is not open Mar 28 17:02:15 Service Mar 28 17:02:20 right Mar 28 17:02:24 so i have an IntentService Mar 28 17:02:52 but im not sure how to call the method to be run from the fragment once the service is started Mar 28 17:03:21 I dont have experience wth services Mar 28 17:03:24 so cannot help Mar 28 17:03:38 alright. thanks anyway :-) Mar 28 17:04:13 but you will probably need to open actiivity Mar 28 17:04:18 and pass some arguments to fragment Mar 28 17:21:17 Heya Mar 28 17:22:14 can anyone answer a question for me regarding adding libraries to the Android app I am developing in Eclipse? Mar 28 17:26:31 is anyone actually in here? lol xD Mar 28 17:27:02 meta meta meta meta Mar 28 17:27:22 lol Mar 28 17:27:24 nah Mar 28 17:31:22 adding a library in eclipse? Mar 28 17:31:35 yeah Mar 28 17:31:47 is it an android library with an src folder and everything or is it a jar? Mar 28 17:31:48 I found a couple of stick list header libraries on github that I wanted to try out Mar 28 17:31:57 sticky* Mar 28 17:32:08 in eclipse i think you could just import the project from existing android code Mar 28 17:32:24 and they have this gradle deal (I am somewhat new to Android dev so I have no idea what gradle is xP) Mar 28 17:32:31 if it is in the sidebar as one of the project options I think that is good enough for importing Mar 28 17:32:36 right Mar 28 17:32:52 gradle is used more with android studio/intellij than eclipse Mar 28 17:32:54 when I import the projects, I get a bunch of errors Mar 28 17:33:15 Hello all Mar 28 17:33:18 hey Mar 28 17:33:21 hola Mar 28 17:33:27 on sec, lemme import again to see what the errors were Mar 28 17:33:30 one* Mar 28 17:33:31 uch i know i always have issues importing projects Mar 28 17:33:48 Quick and stupid question, when should I be referencing my xml layout stuff? onResume, onCreate, etc? Assuming the activity will be reused Mar 28 17:34:02 onCreate() Mar 28 17:34:09 for example, this library: http://applidium.github.io/HeaderListView/ Mar 28 17:35:04 does startActivity and startActivityForResult force onCreate to happen again? is the activity recreated for the stack? Mar 28 17:35:16 I suppose it's like a separate instance of the activity? Mar 28 17:35:58 Maxoplata i see your issue Mar 28 17:36:15 this project was created in android studio and you can’t really import that into eclipse Mar 28 17:36:20 you can try recreating Mar 28 17:36:21 it Mar 28 17:36:34 oooh xP Mar 28 17:36:42 make a new project in Eclipse and try copying over all the stuff from the library into the new project Mar 28 17:36:56 https://stackoverflow.com/questions/17481915/how-to-import-android-studio-project-in-eclipse Mar 28 17:37:19 gotcha, I will check that out Mar 28 17:38:48 How could you tell it was created in Android Studio? Mar 28 17:38:56 this is the other one I was looking at using: https://github.com/emilsjolander/StickyListHeaders Mar 28 17:39:00 is that the same issue? Mar 28 17:39:55 hey so how do i run gradle commands in android studio? Mar 28 17:40:13 gradlew Mar 28 17:40:56 mathis98: as far as i know, you need to run them from the terminal Mar 28 17:40:58 actually i found my task in gradle tasks Mar 28 17:41:15 oh ok, i was thinking i could type into the console in android studio but it wasnt working Mar 28 17:41:17 I found a pretty sweet listview header implementation in the google I/O app Mar 28 17:41:18 thanks Mar 28 17:41:31 It resides entirely in the adapter which is super nice Mar 28 17:42:27 Maxoplata that one looks like it can be imported directly Mar 28 17:42:49 just import from existing android code and then select the library folder Mar 28 17:42:58 after that select the sample folder Mar 28 17:45:05 library seems to import without error Mar 28 17:45:16 the sample has problems Mar 28 17:45:45 error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.AppCompat.Light.DarkActionBar'). Mar 28 17:47:07 and with the library working seemingly fine, how do I make my main project's palette? (sorry for the seemingly noobish questions, google and stackoverflow have not been the best help the last week xP) Mar 28 17:47:20 make it show in* Mar 28 17:48:52 Mar 28 18:19:28 hey Mar 28 18:19:44 anyone know when i should use an intentservice and when i should use a service? Mar 28 18:22:39 You use an intent service when it fits the style of work you want to do with the service. Mar 28 18:22:56 i.e. processing short "commands" Mar 28 18:23:28 so if i want the service to run an asynctask and then return data to a fragment should i use a regular service? Mar 28 18:25:14 here, let me approach this a different way :) Mar 28 18:25:24 try writing it up using both approaches Mar 28 18:25:36 and then inspect both approaches. Which one is the cleaner implementation? Mar 28 18:26:35 AlexAbraham, an intentservice is a service Mar 28 18:26:42 so when you're using an intentservice it is a service Mar 28 18:26:56 ya but I am not sure which one to use Mar 28 18:27:05 intentservice is a job queue Mar 28 18:27:08 that's it Mar 28 18:27:17 a service is a lifecycle container Mar 28 18:27:18 that's it Mar 28 18:27:34 so i think i want to use a service Mar 28 18:28:06 now i need to figure out how to make that service run an asynctask and then send the result to the fragment which called it via alarmmanager Mar 28 18:29:15 tons of ways Mar 28 18:30:17 there is a list adapter inside my fragment Mar 28 18:30:43 also, note that an intent service runs commands in a separate thread anyway, so there's no need for an asynctask (unless you want to free up the thread to process other incoming intents for that service) Mar 28 18:31:19 i have a method updateList() inside the fragment which is called in the asynctask onPostExecute() to update the list data Mar 28 18:31:41 right, but i already have an asynctask in place Mar 28 18:32:04 it's not like it's not trivial to swap it out for something else Mar 28 18:32:05 Just because you have one doesn't mean you have to use it Mar 28 18:32:06 there is a button to refresh data which calls the asynctask and updates data Mar 28 18:32:07 asynctasks suck Mar 28 18:32:17 really? Mar 28 18:35:02 I was wondering, how does the app 'Greenify' simulate key presses with the Hibernate All mode on non-rooted devices? Mar 28 18:35:23 I want to simulate key presses, but I have no idea how to do it outside of my main application Mar 28 18:35:45 I don't get it.. what's the mystery of ulams spiral? It's explained here http://barkerhugh.blogspot.com/2012/02/ulam-spiral-explained-sort-of.html Mar 28 18:49:35 On a Fragment, should I open the database connection on both onAttach and onCreate? I have an open() method that just runs database = dbHelper.getWritableDatabase(); Mar 28 18:49:53 hi all how do i update a image in the src folder correctly or will it be updatet on the next buld Mar 28 18:50:24 IchGuckLive: put that stuff in res/ no Mar 28 18:50:25 ? Mar 28 18:50:38 its there Mar 28 18:50:47 in eed to modifi it with gimp Mar 28 18:51:03 will it be updatet next time i compile Mar 28 18:51:14 you might need to do a 'make clean' Mar 28 18:51:53 So once I have added the library to my workspace, how do I get it to show up in my projects palette? Mar 28 18:53:57 I made a singleton wrapper holding the activity context via a weakreference in order to vector the context around as needed, is this a bad idea? Mar 28 18:54:15 autrilla: usually you want to open the database and close it atomically Mar 28 18:54:39 lasserix, Ok... I "copied" the code from vogella Mar 28 18:54:50 autrilla: depends on your use case... Mar 28 18:55:03 lasserix, it's for populating a ListView Mar 28 18:55:10 are you using a cursorloader? Mar 28 18:55:23 lasserix, no, just a cursor Mar 28 18:55:26 should I? Mar 28 18:55:32 you might look into it Mar 28 18:55:36 handles some stuff for you Mar 28 18:55:52 like multithreading Mar 28 18:55:59 I don't have a content provider, should I have one too? Mar 28 18:56:17 oh yeah i forgot you have to use a content provider, someone made a cursor loader implementation w/o a cp Mar 28 18:56:28 depends on how big your data set is, I did for an app I made a while back Mar 28 18:56:37 it seemed worth it Mar 28 18:56:46 lasserix, small. A bunch of farms with a bunch of devices registered Mar 28 18:57:12 probably not then.. Mar 28 18:57:29 but make sure to close your db connection and cursor Mar 28 18:57:41 does the data change frequently? Mar 28 18:57:54 nick9998: it updates on the debugging Mar 28 18:58:01 lasserix, no. You can click a button and add a farm though Mar 28 18:58:09 also, can anyone tell me how to resolve this error: Mar 28 18:58:11 error: Error: No resource found that matches the given name (at 'theme' with value '@style/ Mar 28 18:58:11 Theme.AppCompat.Light.DarkActionBar'). Mar 28 18:58:59 The way I'm doing it is bad, because I'd have to kill the fragment and reopen it for the newly added item to appear. It would be better if the ListView automatically got the data from the database. I guess that's what the CursorLoader is for Mar 28 18:59:10 yeah Mar 28 18:59:43 but you canl for instance you can grab the cursor on load, load whatever datastructure your adapter is using to pop the list view, then close the db and cursor, then on an update open a db, insert, close the db, and add the farm manually to the datastructure of the adapter Mar 28 19:00:03 lasserix, which is veeeeeery hacky Mar 28 19:00:21 I like the other way better :) thanks Mar 28 19:00:26 http://stackoverflow.com/questions/7182485/usage-cursorloader-without-contentprovider Mar 28 19:00:57 lasserix, ah, so a CursorLoader is just an async cursor Mar 28 19:01:10 yeah that handles content changes automatically Mar 28 19:01:21 Oh it does?! That's great Mar 28 19:01:28 i believe it is supposed to Mar 28 19:01:37 then you can back your list view with a cursor adapter Mar 28 19:01:58 you might have to call invalidate on the adapter when there is an update, can't remember Mar 28 19:04:53 Does the Activity have to implement LoaderCallbacks or is it the Fragment? Mar 28 19:05:01 fragment i think Mar 28 19:11:13 anything can implement LoaderCallbacks Mar 28 19:11:14 I still don't know whether to open the database on onCreate or onAttach... If I do it on both it crashes Mar 28 19:11:16 it's an interface Mar 28 19:11:32 you're opening it twice... Mar 28 19:11:34 pfn, I didn't say can I, I said where I was supposed to do it... Mar 28 19:11:36 pfn, I know Mar 28 19:11:45 you're supposed to do it wherever it makes sense Mar 28 19:12:06 there is no supposed to anywhere Mar 28 19:12:06 pfn, apparently I don't need it if I use the CursorLoader without content provider Mar 28 19:12:16 How can I compile a hello world C program for Android using the NDK? Using the gcc influded in the NDK, compilation fails during stdio inclusion. Mar 28 19:12:34 quotemstr, use the right path Mar 28 19:12:45 This is just a quick test; I don't want to use the full build infrastructure. Mar 28 19:12:58 then use the right path Mar 28 19:13:11 Oh, I do need to use it Mar 28 19:14:18 Oh, right. I'd *appended* the NDK to the path, not prefixed it. Mar 28 19:14:29 * quotemstr clearly needs more coffee today. Mar 28 19:14:30 Thanks. Mar 28 19:15:17 Err, actually, it still fails. sys/cdefs.h doesn't exist. Mar 28 19:15:48 Shouldn't the compiler have set its own system include paths correctly? Mar 28 19:16:36 Anyone know if any listview libraries that are image centric? Trying to display a bunch of video thumbnails with titles but I want something nice looking. Mar 28 19:16:36 quotemstr: I recommend using the provided build infrastructure :) Mar 28 19:16:43 use the build infrastructure Mar 28 19:16:48 that's how it sets the path correctly Mar 28 19:16:57 the ndk doesn't get "installed" Mar 28 19:17:00 it's just dropped somewhere Mar 28 19:17:15 so it has no idea where its includes are Mar 28 19:17:31 gcc -v or whatever it is to see where it looks by default and fix it Mar 28 19:18:39 Yep. I'll have to do that, then write a gcc wrapper script for convenience's sake. Mar 28 19:19:30 Thanks. Mar 28 19:19:59 pfn, what would be the correct way to populate the ListView (it's on the nav drawer) with the database data? Mar 28 19:21:17 does anyone get an Import Gradle project when opening a project in Android Studio? It scvares me, becasue this is a project that has been in Android Studio/gradle for about 9 months. Why Does AS/gradle think it needs to import it? Mar 28 19:21:29 what might be changing about it? Mar 28 19:25:50 If a dead object exception is thrown from C code, does that mean an object that was freed somewhere (could be no references in java and GCed or freed in C) is trying to be used? Mar 28 19:26:33 jonc-1: I think it might be a binder exception. pastebin? Mar 28 19:29:10 I don't have the NDK code, I have been fighting with a company for awhile for them to fix their library Mar 28 19:29:15 let me find the stacktrace I have Mar 28 19:32:22 http://pastebin.com/QtcX6Gdm Mar 28 19:36:17 jonc-1, your .so crashed because there was an access violation in addSample function Mar 28 19:36:26 Yeah, that is what I figured Mar 28 19:36:28 there's nothing much you can do besides fixing the .so Mar 28 19:36:38 I told the company who produced the library to fix it Mar 28 19:36:43 they say it isn't them Mar 28 19:38:21 I've sent them the stack trace etc, they then blamed it on the architecture Mar 28 19:39:52 The library works fine on iOS, but that may be because iOS is less strict on memory use? (freeing than having a pointer point there, as long as it isn't overwritten it should still work?) Mar 28 19:43:35 jonc-1 unless something has changed android ndk is extremely lax on memory usage Mar 28 19:43:53 idk if it still is but b4 it wasn't sandboxed at all Mar 28 19:47:08 I mean pointer access to a freed object Mar 28 19:47:59 idk, I remember reading in an article that in iOS development, it was shunned upon to use garbage collection, and it was much more preferred to handle memory allocation and deallocation yourself Mar 28 19:48:16 you're talking about ObjC part not C Mar 28 19:48:22 yes Mar 28 19:48:34 jonc-1, both of them act the same Mar 28 19:48:35 does NDK use C or C++? Mar 28 19:48:45 c Mar 28 19:48:49 and c++ Mar 28 19:48:51 Sorry to ask again. I am still having trouble figuring this out and I am not having much luck finding the answer via Google. Once I have added the library to my workspace, how do I get the custom view to show up in my project's palette? Mar 28 19:48:55 it's a silly question really. Mar 28 19:49:05 NDK is just a GCC suite preconfiugred for ARMs running android Mar 28 19:49:29 I understand that, but I am wondering if iOS is less stringent on memory access Mar 28 19:49:33 jonc-1, the memory layout is probably slightly different which means it can happen that invalid access doesn't end in invalid memory Mar 28 19:49:35 no Mar 28 19:49:46 there is no "less stringent" Mar 28 19:50:02 any OS will kill your app with impunity if you access invalid page Mar 28 19:50:16 well except if you're running without MMU but... Mar 28 19:50:40 Yeah, I guess my wording is bad, I wonder if iOS will keep a freed object in a relevant page longer than android does Mar 28 19:50:51 Actually that may be the issue Mar 28 19:50:58 Maxoplata, no, ui designer is worthless, don't bother with it Mar 28 19:51:04 Maxoplata, it will only prevent you from developing well Mar 28 19:51:12 I miss android dev :( Mar 28 19:51:14 because iOS doesn't seem to kill an app or pause an activity when a phone goes to sleep Mar 28 19:51:53 (never done iOS, just speaking from how the behavior seems from using my phone), android can kill the activity when I put my phone to sleep Mar 28 19:51:55 ok, I will take that advice into consideration. My question is still unanswered though :( Mar 28 19:52:09 and that is when this access violation occurs, is if the phone goes to sleep (not 100% reproducable) Mar 28 19:52:15 but that is the only time it happens Mar 28 19:52:55 Maxoplata, it won't. Mar 28 19:53:00 don't use UI designer. Mar 28 19:54:02 I get that you don't want me to use the UI designer. But back to my question. Mar 28 19:54:29 UI designer in eclipse or intellij/as? Mar 28 19:54:35 Is it impossible to have show up in the "Custom & Library Views"? Mar 28 19:54:38 the one in intellij/as isn't bad... Mar 28 19:55:11 Maxoplata just add a regular view then substitute View for your view in the xml manually Mar 28 19:56:00 I know how to manually add it via the XML Mar 28 19:56:14 my question is not how to add it to my XML, it is how to make it show in the palette Mar 28 19:56:28 i don't think anyone here knows how to do that Mar 28 19:56:35 gotcha, thank you, lol Mar 28 19:58:26 Maxoplata, no Mar 28 19:58:31 the answer is no Mar 28 20:13:40 What should I use to display data from my database in a ListView in a way that when I add new items they get added automatically? Mar 28 20:14:07 is it bad if my db file has over a 1000 lines of code Mar 28 20:14:17 should I separate the tables and the methods creation Mar 28 20:14:23 into separate files Mar 28 20:16:34 lo Mar 28 20:17:53 lo? Mar 28 20:18:10 LoneSoldier728 w/e works for you Mar 28 20:18:17 1000 lines isn't THAT much Mar 28 20:18:33 as in hello Mar 28 20:19:01 for w/e its worth, i have never seen lo == hello lol Mar 28 20:19:17 jug6ernaut but if I divide it, do I have to divide up the create table and upgrading or will that affect the database version etc... Mar 28 20:20:03 no idea tbh, I've never had to deal with that b4 Mar 28 20:20:41 must be some noobs Mar 28 20:20:48 what do you recommend for a leaderboard? Is Heyzap popular? Mar 28 20:21:39 Should I avoid RelativeLayout if I can accomplish the same thing with LinearLayout? Mar 28 20:21:44 googles play games? Mar 28 20:23:21 with googles play games, can you view the scores on your desktop computer and can you share scores on facebook, etc? Mar 28 20:25:21 compac depends on the complexity of each. But i believe generally relativelayout should be fine Mar 28 20:25:50 i know there was an article about this posted on the android dev blog tho, might wanna search it out. Mar 28 20:26:41 ok thanks Mar 28 20:32:59 how can I resolve this error: Mar 28 20:33:00 error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.AppCompat.Light.DarkActionBar'). Mar 28 20:35:50 I get that it's an issue with appcompatv7 but I can't figure out how to fix it xP Mar 28 20:36:38 Anyone have experience with proguard? I need my code to be obfuscated, but the only way my app doesn't crash at a certain point is if I add the line -keep class com.myapp.** {*;} but adding that doesn't obfuscate my code. Mar 28 20:37:33 eghdk_: you generally only need to exclude the classes that android needs to reference. Your activities, services, etc. Mar 28 20:38:18 If I remember right, you actually need to specify those classes as entry points Mar 28 20:38:37 JesusFreke ...? Can you elaborate? I'm not quite sure I understand. Mar 28 20:38:55 I don't think I can explain it any more clearly, sorry. Mar 28 20:39:06 lol Mar 28 20:39:15 eghdk_ 1st what is your crash... Mar 28 20:39:43 jug6ernaut: Logcat doesn't give me a stack trace, which is why I'm clueless. Mar 28 20:40:12 Someone on SO suggested to just do -keep com.myapp.** {*;} and that stopped the crash from happening. Mar 28 20:40:24 ital give you something Mar 28 20:40:26 but now it's not obfuscated Mar 28 20:41:25 eghdk_: read the proguard docs, so you actually understand what these proguard options do Mar 28 20:42:16 JesusFreke: I have read the docs multiple times. I understand that putting in -keep will prevent the code from being obfuscated. Mar 28 20:42:49 eghdk_: your activities and services can't be renamed/obfuscated. All your other classes can be. Mar 28 20:43:04 are u using the proguard.cfg provided by the sdk? Mar 28 20:44:05 basically, any class referenced by your AndroidManifest.xml can't be renamed/obfuscated. Mar 28 20:44:15 JesusFreke: I believe you are mistaken. I have three activities in my app, and all of them are obfuscated, but I get a crash going from my second activity to my third activity. Mar 28 20:44:58 He is not mistaken Mar 28 20:45:09 you can believe all you want. It doesn't change that you can't rename your activities/services with proguard. Mar 28 20:45:21 Anything looked up reflectively from a string, e.g. a manifest entry, will cause a crash if renamed by stuff like proguard Mar 28 20:47:10 JesusFreke: and SimonVT it seems I was tlaking about something else. You said any class referenced by the manifest will not be renamed/obfuscated. But the variables and methods are obfuscated in an activity aren't they? Mar 28 20:47:55 If you tell it to Mar 28 20:47:56 overridden methods can't be, although new methods could. Mar 28 20:48:25 shame pro guard can't update the manifest with the changes to the file names Mar 28 20:49:55 Meh, obfuscation is pointless.. Just use proguard to strip unnecessary classes if you use large libraries Mar 28 20:50:09 classes/code Mar 28 20:51:10 SimonVT: I guess, but obfuscation has been shown to decrese an apk size also. Mar 28 20:51:34 I personally dont care for it, but the person I'm making an app for would really like the code to be obfuscated. Mar 28 20:52:21 eghdk_ thats not obfuscation Mar 28 20:52:32 thats the optimization that proguard does Mar 28 20:54:04 eghdk_: why don't you back up, and figure out the specific cause of the crash when you use the default config. You said there's no stack trace, but there's got to be *something* in logcat. Mar 28 20:54:39 in db.query(tableName, tableColumns, whereClause, whereArgs, groupBy, having, orderBy); Mar 28 20:54:40 where does limit/offset fall under? Mar 28 20:54:44 having? Mar 28 20:54:57 JesusFreke: Yes you're right. Okay so the crash is from ActivityManager. App Crashed! Process: com.myapp.example Mar 28 20:55:41 eghdk_: pastebin? Mar 28 20:58:53 http://pastebin.com/UEiYw519 Mar 28 20:59:48 "Caused by: java.lang.NullPointerException" at com.myapp.UserLoginActivity.onActivityResult(Unknown Source) Mar 28 20:59:48 jug6ernaut: Logcat doesn't give me a stack trace, which is why I'm clueless. Mar 28 20:59:52 that's your problem right there Mar 28 21:00:04 there's an NPE in your onActivityResult Mar 28 21:00:10 lol Mar 28 21:01:11 SimonVT: Logcat was only giving me the App Crashed! message, but that was due to my logcat filter apparently... Mar 28 21:02:34 That doesn't make any sense though. Why would adding the line -keep com.myapp.** {*;} make that crash dissapear? Mar 28 21:03:06 eghdk_: pastebin your onActivityResult? Mar 28 21:03:35 Then stop stripping line numbers and find out what's causing it Mar 28 21:04:26 is there a way to load a text (my shader) file into a string without a context object Mar 28 21:06:56 cuz I'd like to have a static shader loading function in my Utility class, but I can't figure out how to load a text file without a context Mar 28 21:09:22 freezway, no because the Context describes all your environment Mar 28 21:09:43 including where your app is located, where its datafiles it, where device keeps it's stuff, etc. Mar 28 21:10:14 JesusFreke: and SimonVT ...Interesting. Maybe I'm just going insane. I tried reproducing the error about 10 more times, and now none of these times do I get a logcat with meaningful info. Check out the logcat now. http://pastebin.com/42bC4kyc Mar 28 21:11:04 Thats with no filters. and that was the logcat that I was talking about I was getting before. Mar 28 21:11:49 eghdk_: try uninstalling it completely and trying again Mar 28 21:12:27 JesusFreke: Alright. Will give that a try right now. Mar 28 21:12:29 "Process com.myapp.example has crashed too many times: killing!" - I suspect this might be killing the app before it has a chance to log the error... or something like that Mar 28 21:13:34 so hopefully uninstalling should help clear out the number of crashes associated with the app. Although, I'm not sure if that's written to disk, or just kept in memory. Mar 28 21:14:22 also, why does android complain if I have somefile.ext1 and somefile.ext2 in the /res/raw folder? Mar 28 21:14:32 it claims they are the same file Mar 28 21:15:21 JesusFreke: Okay so now I got the Unable to resume activity Mar 28 21:15:22 What would R.raw.somefile resolve to? Mar 28 21:15:50 eghdk_: the one with the NPE? Mar 28 21:16:00 Yes Mar 28 21:16:26 I would say either turn off line number stripping in proguard, or add some logging to your onActivityResult to figure out where the crash is actually happening Mar 28 21:17:00 And if you get to the point again where it doesn't show the stack trace when crashing, you know how to clear that :) Mar 28 21:17:56 ALright thanks JesusFreke . Its a weird situation, because the app isn't supposed to try to call that method so quick. Mar 28 21:18:21 It's just a matter of debugging it via the usual methods :) Mar 28 21:19:24 JesusFreke: Yeah I guess you're right. Thanks for the help. I think you're correct with "I suspect this might be killing the app before it has a chance to log the error" because every subsequent time I don't get that NPE. Mar 28 21:48:15 meh Mar 28 21:48:41 meh indeed Mar 28 21:49:26 "We've introducing a provision that requires you to clearly disclose when an advertised feaure in your app's description requires an in-app purchase payment" Mar 28 21:49:30 the idiots have won Mar 28 21:49:55 minus purchase Mar 28 21:50:51 How so? I think it's fair that if you advertise a feature in a free app you should disclose if it costs Mar 28 21:51:20 .. before the user installs Mar 28 21:52:23 courtesy sure. But there are some apps out there with a lot of in-app purchases. Mar 28 21:52:52 could get messy very fast Mar 28 21:53:15 depending on how strict they are on "clearly disclose" Mar 28 21:54:13 ($.99) is pretty clear to me Mar 28 21:54:52 Any free app whose description makes it seem that a particular feature is included when it's really not seems somewhat shady anyhow. Mar 28 21:56:01 If two free apps advertise the same features but one has "hidden" costs once installed, they're really just duping the consumer into inflating their download count Mar 28 21:56:02 hello. Is this the correct channel to ask about a gradle and intellij problem? Mar 28 21:57:04 has anyone seen a ViewGroup / AdapterView that emulates the Metro Tiles look / behavior? I see Samsung Magazine UX seems to have this, its not really a staggered ListView. Tiles can be 1x1, 2x2 or 4x2, draggable, resizable, etc Mar 28 21:57:06 Where can I find step-by-step instructions on adding a google play leaderboard to my app? Mar 28 21:57:08 UNless they want to pay Mar 28 21:57:13 mrcloud: yes Mar 28 21:57:19 But can't make an informed choice on what to install without knowing that Mar 28 21:57:53 i think if you your app's description gets too messy because you are listing all the IAPs, you have too many IAPs Mar 28 21:58:09 like these stupid games that nickel and dime you for every thing :) Mar 28 21:59:18 probably lol Mar 28 21:59:51 ok, so here is my problem. I'm trying to use Google Play Game Service in an Android game so I added play-services and support-v4 dependencies in my build.gradle file. I also copied GameHelper and GameHelperUtils from samples but I get an error with GameRequest. This class is not found, the import appears as unused and the package com.google.android.gms.games.request doesn't exists. What Im doing wrong? Mar 28 22:00:40 meh, gradle. Mar 28 22:00:50 activeandroid orm has the best documentation, every other ORM library sucks Mar 28 22:01:29 What should I use to display data from my database in a ListView in a way that when I add new items they get added automatically? Mar 28 22:01:50 cursoradapter Mar 28 22:01:55 autrilla: Mar 28 22:02:10 * jug6ernaut wishes android included a nosql db Mar 28 22:02:19 no idea which they would include tho lol Mar 28 22:02:43 Mango_Man, Google has no docs on that :( Mar 28 22:02:51 autrilla yes it does Mar 28 22:03:01 jug6ernaut, where? Mar 28 22:03:04 Can't find it Mar 28 22:03:05 autrilla: first result on google: http://developer.android.com/reference/android/widget/CursorAdapter.html Mar 28 22:03:15 Mango_Man, that's the JavaDoc Mar 28 22:03:22 jug6ernaut once nice k/v db you can use is mvstore; you can have multiple indexes Mar 28 22:03:53 I meant something like this: Mar 28 22:03:58 http://developer.android.com/guide/topics/resources/localization.html Mar 28 22:04:03 it would be nice if the existing stuff used jdbc, so we could use nice things like jooq Mar 28 22:04:25 autrilla: learn to google - http://www.vogella.com/tutorials/AndroidListView/article.html Mar 28 22:04:38 Mango_Man, that's not from Google. Mar 28 22:04:47 too bad then Mar 28 22:04:59 Mango_Man, learn to read Mar 28 22:05:08 It is annoying, isn't it? Mar 28 22:05:48 autrilla: you wanted an example for cursoradapter. the link i pasted above has it Mar 28 22:05:53 don't be a b*tch Mar 28 22:06:16 Mango_Man, I wanted a Google example for a CursorAdapter. I had already found the Vogella one :/ Mar 28 22:06:18 g00s ill check it out, thx Mar 28 22:06:21 Mango_Man: Please watch your language Mar 28 22:06:55 sorry guys, i'll shut my mouth Mar 28 22:08:06 Where can I find step-by-step instructions on adding a google play leaderboard to my app? Mar 28 22:08:52 RetroDude honestly we would google that question probably Mar 28 22:09:03 any Idea about what can I be doing wrong to use GPGS? gradle is a pain... Mar 28 22:10:12 GameRequest is missing. Everything else is there :S Mar 28 22:12:27 * jug6ernaut says mvn > gradle and hides Mar 28 22:13:12 Should ContentProviders be created for each database or for each table? Mar 28 22:13:17 jug6ernaut: please watch your language :p Mar 28 22:13:36 autrilla not each table. one CP for each DB Mar 28 22:13:43 :P Mar 28 22:14:00 Hey guys. There is no way to be able to use Java 8 stuff yet, right? Mar 28 22:14:00 g00s, ty :) Mar 28 22:14:20 ProgramMax if you get to I/O can you ask that at the fireside chat ? Mar 28 22:14:28 plz Mar 28 22:14:29 ask Mar 28 22:14:31 :) Mar 28 22:14:32 yes Mar 28 22:14:32 It hasn't even been out for 10 days! Mar 28 22:14:37 we need den lambda's Mar 28 22:14:40 Google bought me an I/O pass. I live in San Francisco. I'll ask :) Mar 28 22:14:53 the beta has been out for a while :) not like devs haven't been using it Mar 28 22:15:16 awesome ProgramMax :D Mar 28 22:15:35 you'll be the most liked question-asker probably, instant karma Mar 28 22:15:43 I'll post it to reddit Mar 28 22:15:56 no, do it live on TV :D Mar 28 22:16:16 I'd be happier if they finally came up with an upgrade path from paidonly->iap Mar 28 22:16:32 Chainfire holy crap, i was going to ask that Chainfire … stil no ? Mar 28 22:16:47 i have a paid app i want to make free, but use IAP. i thought of this Mar 28 22:17:01 its not important Mar 28 22:17:14 only legions of devs suffer from this oversight Mar 28 22:17:16 Oh, so I don't need a Content Provider apparently :/ http://developer.android.com/guide/topics/providers/content-provider-creating.html Mar 28 22:17:26 lol Mar 28 22:17:46 its important for me; BT is very flaky and I want to give users the ability to test with no-risk. if it works, they can get the plugins that actually do something Mar 28 22:17:54 last year I asked the Play guys, and they admitted that even though they advise everyone to stop using paid-only or free/paid separate APKs, they indeed didn't have an upgrade path Mar 28 22:18:07 and when I asked them IF and/or WHEN they would, I got some blank stares Mar 28 22:18:15 amazing Mar 28 22:18:20 yeah Mar 28 22:18:35 then everybody around me showered me in business cards with the question to inform them if I ever figured a way Mar 28 22:18:44 but i thought pfn said this was possible. are we sure the situation hasn't changed Mar 28 22:18:57 if it has, great, but I've not heard of it Mar 28 22:19:09 I'd have a bunch of apps to convert :) Mar 28 22:19:11 Alright, I don't have to use it (or at least Google tells me not to), but I need a Content Provider for a CursorLoader, which Google advises using better than a SimpleCursorAdapter... Mar 28 22:19:14 * autrilla hangs Mar 28 22:19:41 you can make an app from paid to free, but afk there's no way to change the paid users to a purchase, or detect that they were previously paid users Mar 28 22:20:18 ah, so they would essentially have to rebuy Mar 28 22:20:26 exactly Mar 28 22:20:37 Some sort of IAP? Mar 28 22:20:41 with a token? Mar 28 22:20:54 Chainfire, maybe show the people who've bought it a code to upgrade the free app? Mar 28 22:21:04 you can either IAP, or enter your token that you get from your other paid app Mar 28 22:21:11 those ways are not transparent to the user Mar 28 22:21:29 and entering a token would either give everyone the same token, or require a second server infrastructure Mar 28 22:21:32 maybe the token is an intent that activates the new paid app Mar 28 22:21:32 and lose all your downloads & market placing in the process? Mar 28 22:21:48 its not like this would be difficult to fix on Play's side ... Mar 28 22:21:52 No Mar 28 22:22:00 It's clearly better to fix it there. Mar 28 22:22:01 jug6ernaut if you change package, yeah Mar 28 22:22:12 :\ Mar 28 22:22:48 if I make it to I/O this year I'll corner some Play guy again. This time I won't take 'vacant stare' as an answer. Mar 28 22:23:08 Chainfire, you could always throw stuff at them Mar 28 22:23:38 You are one of the most selling devs, you should get some attention Mar 28 22:23:44 best* Mar 28 22:23:45 i think its important enough to ask in Fireside Chainfire Mar 28 22:23:53 get blank stares on TV Mar 28 22:24:19 record blank stares stare on for ever Mar 28 22:24:26 gif loop Mar 28 22:24:45 infinite blank stare Mar 28 22:25:03 * autrilla cries as he reads docs that tell them he shouldn't do what he should do Mar 28 22:27:03 Hey guys, can I ask a completely noobish question and then we only bash my noobishness for a minute or to and then move onto an answer? I have a nav drawer, which is a ListView. I need some funky design in the nav drawer though. A big logo at the bottom of the scrolling area which isn't really a clickable list item, some dividers, a few static elements, a Mar 28 22:27:03 few dynamic elements Mar 28 22:27:12 autrilla 99% of the money is made by the top-10 apps... I may sell a fair share, and have a couple of apps in the top-100 now and then, it's not nearly enough for anyone at Google to care about it Mar 28 22:27:27 presumably, this is normal ol' list behavior and it's just been so long and I've been using a library to take care of the nitty gritty for me Mar 28 22:27:51 ProgramMax: So what's your Q? Mar 28 22:27:59 lol Mar 28 22:28:23 What is the best way to have a nav drawer with special list items? Including perhaps it not being a list Mar 28 22:28:43 Chainfire & even the ppl in google who do care, probably wouldn't have the means/power to change it Mar 28 22:28:53 Chainfire, some of your apps have 100.000-500.000 installs. 2,49 * 300.000 = 747k. 30% to Google, 224k. I think you deserve a minute of their time Mar 28 22:29:07 ProgramMax navdrawer is just a view, it can be w/e Mar 28 22:29:53 autrilla remember the purpose of Android; to serve as a platform for gapps, services, & advertisements Mar 28 22:30:06 g00s, and a platform for Google Play Mar 28 22:30:08 as long as FB, google, and the most important apps seem to 'be fine' Mar 28 22:30:22 everything is good under the sun Mar 28 22:30:40 sadly that is very true Mar 28 22:30:48 jug so I could make it a fragment then, and the fragment could be a vertical, scrollable layout with some lists in it? Mar 28 22:30:49 fb's too busy overpaying for stuff Mar 28 22:31:05 ProgramMax, yes Mar 28 22:31:19 ProgramMax yup, idk what nag drawer implementation your using if it requires a fragment. But yes. Mar 28 22:31:30 well, doesn't require Mar 28 22:32:03 I guess I kind of want to be able to place the contents in a separate xml file Mar 28 22:32:51 sure Mar 28 22:33:05 I think there is a way to do that without fragments. I forget Mar 28 22:33:09 jug6ernaut and now, with wearables, as a conduit for more 'personal' information streaming from PAN (personal area network) Mar 28 22:33:10 an include tag, right? Mar 28 22:34:13 ProgramMax, for example, what I'm doing right now: http://gyazo.com/4ed2bc207cf8d4378d20eb9d3d40a6a6 Mar 28 22:34:53 I use Fragments, I think they're required Mar 28 22:35:11 yeah, I need something like that Mar 28 22:35:12 g00s what do you mean Mar 28 22:35:53 idk about eclipse, but when you create a project with Android Studio it gives you the option to use the nav drawer. Mar 28 22:36:11 ppl still use eclipse? Mar 28 22:36:17 jug6ernaut, yes Mar 28 22:36:25 :\ Mar 28 22:36:25 IDEA ftw. I should buy it Mar 28 22:36:37 i regret not buying it last year when it was $50 Mar 28 22:36:49 I have an existing app. Not sure if it would be easier to start a new project and put the app into that or just add the nav drawer to the existing app. I believe the latter, which is why I did it Mar 28 22:37:13 What's IDEA? Mar 28 22:37:20 JustSighDudes intellij idea Mar 28 22:37:28 I'd say it's probable most Android devs are still on Eclipse, jug6ernaut Mar 28 22:37:28 Oh. Studio? Mar 28 22:37:53 JustSighDudes no, AS is based on Intellij idea community edition Mar 28 22:38:19 Chainfire :\ Mar 28 22:38:20 What does the paid one add? Mar 28 22:38:51 JustSighDudes, Java EE support 'n' stuf Mar 28 22:38:51 JustSighDudes mainly web stuff Mar 28 22:38:59 lol Mar 28 22:39:24 I'm gonna hope jug6ernaut is right because I hate java and work mainly on web stuff these days Mar 28 22:39:35 well Mar 28 22:39:38 when i said web stuff Mar 28 22:39:40 Java is awesome Mar 28 22:39:46 i mean java ee Mar 28 22:39:47 He meant web stuff with java Mar 28 22:39:57 Oh :( Mar 28 22:40:09 * jug6ernaut has problems with java Mar 28 22:40:25 tho the type eraser can be a PITA Mar 28 22:40:34 It's too verbose for me. Also I like scripting language because I hate waiting for compilation. Mar 28 22:40:36 tho i imagine there is a reason it exists that i don't understand lol Mar 28 22:40:48 Java is veeery fast to compile lol Mar 28 22:41:00 meh, scripting languages. Mar 28 22:41:10 compiler is an advantage in so many ways imo Mar 28 22:41:21 but I'm not getting into that argument lol Mar 28 22:41:25 autrilla: > 20 seconds is too slow for me. Mar 28 22:41:40 jug6ernaut: You'd win. I agree compilers offer a lot but I just prefer scripting. Mar 28 22:41:42 JustSighDudes, you mean on Android projects Mar 28 22:41:55 autrilla: Oh. Maybe then. Mar 28 22:41:57 JustSighDudes i think u need a faster computer :P Mar 28 22:42:16 jug6ernaut: I have an i7 Mar 28 22:42:20 I have >20k line projects that compile in ~5 seconds Mar 28 22:42:34 autrilla not a clean compile Mar 28 22:42:37 Ok let me rephrase. I have an i7* Mar 28 22:42:42 * On a laptop Mar 28 22:43:02 Meh. Mar 28 22:43:10 * autrilla keeps on reading docs Mar 28 22:43:24 * autrilla probably won't find a solution Mar 28 22:43:43 * jug6ernaut wishes mvn compiled as fast as intellij Mar 28 22:44:00 they both are using javac...but i think its the dexing that is slow in mvn Mar 28 22:45:59 jug6ernaut what i meant above is; wearable provide a new area for more personal data collection. each company will have their own motivations for collecting this info. I think the big new feature of iOS 8 will be that it includes an app called HealthBook. some of the stuff it has, like blood O2 sat, has to come from somewhere … nobody knows Mar 28 22:46:56 g00s so you think mainly heath data? Mar 28 22:47:06 because its so personal, and in the US the data brokering industry is completely unregulated, i think its very important to consider the consequences of all this Mar 28 22:47:46 jug6ernaut not sure. as a user, health data + quantified self seems like an interesting use case Mar 28 22:47:58 as long as the info doesn't fall into the wrong hands Mar 28 22:48:01 it definitely is Mar 28 22:48:08 g00s, no, I said it's possible if you go by what play gives you, lots of multiple-apk and IAP trickery Mar 28 22:48:12 & no1 reads the TOS Mar 28 22:54:29 anyone know what exactly is going on when i import or start a new project in AS? it takes about … 10 minutes, i timed it. So, for an existing project that has all its deps, and my ~/.gradle dir cache is full and happy - and i'm pointing AS to a local gradle install, i don't understand WTH its doing Mar 28 22:55:04 it /seems/ like every new project , it goes to re-download a whole bunch of stuff Mar 28 22:55:13 where is it going ? why? Mar 28 22:55:23 I give up. I have a very simple data structure for now, and it'll probably not get complicated. Just farms with an id and a name. I created a SQLiteOpenHelper and a "DataSource" as Vogella does here: http://www.vogella.com/code/de.vogella.android.sqlite.first/src/de/vogella/android/sqlite/first/CommentsDataSource.html . On my nav drawer I have a ListView of checked textviews that right now are hard Mar 28 22:55:23 coded. I want to populate the ListView with the data from the database, in a way that seems elegant. What I mean by this, is that if I add a new item to the database, it'll be automatially retrieved without me doing anything. I don't know if this last thing is posible. Here is my code if it helps: http://pastebin.com/69wNrSkN http://pastebin.com/U1pssrS8 http://pastebin.com/7frtXMyv Mar 28 22:55:41 g00s, I think it's maven Mar 28 22:55:45 * jug6ernaut has avoid gradle at all cost Mar 28 22:56:04 gradle doing maven stuff, downloading some deps Mar 28 22:56:12 i'll probably start up wireshark and take a look Mar 28 22:56:27 up until i learn how build a gradle project from maven Mar 28 22:56:46 autrilla yeah, on first install, i can see … but for every project, seems weird Mar 28 22:57:18 I'm on a mac. Whats the best way to decompile an apk? I see that there seems to be a few tools that do it, but they haven't been updated in a while. Trying to find out what pro-guard is actually doing. Thanks Mar 28 22:57:30 Shady stuff Mar 28 22:57:52 eghdk_ dowload an app on the market called "from java" its scarily good Mar 28 22:57:59 android market Mar 28 22:58:02 play store Mar 28 22:58:03 w/e Mar 28 22:58:06 i dont think most people notice how slow of you have a good internet connection. i have 1mb/s, so its very very painful Mar 28 22:58:22 i can import a project and prepare dinner Mar 28 22:58:25 its all download Mar 28 22:58:26 g00s i do every time i go down to my parents place Mar 28 22:58:30 1.5mb Mar 28 22:58:32 For real, g00s? Where you at? Mar 28 22:58:40 Even 3G is faster. Mar 28 22:59:03 jug6ernaut: from java? on the play store? Thats a little weird... no? Mar 28 22:59:40 eghdk_ hmm maybe not Mar 28 22:59:42 1 sec Mar 28 22:59:47 kakazza in the US; we just can't afford better packages Mar 28 23:00:22 :\ Mar 28 23:00:30 my parents pay $40/m for 1.5/down 1/up Mar 28 23:00:37 and that is a good deal for them Mar 28 23:00:40 satellite is way worse Mar 28 23:01:38 eghdk_ i don't have it installed, give me a min to find it Mar 28 23:01:52 (& i forgot the name lol) Mar 28 23:02:13 ah Mar 28 23:02:15 haha. I will wait. I like the "scarily good" review that you just gave it. Mar 28 23:02:16 "Show Java" Mar 28 23:02:31 it really is :\ Mar 28 23:05:55 Wish there was something this easy on osx hahaha. Works very well jug6ernaut Mar 28 23:06:12 like i said, scarily lol Mar 28 23:13:23 What is the best way to set a Views Gravity (Particulary an AdMob AdView)? What layout should I use? Mar 28 23:13:45 Just seems like there are way to many ways to do the same thing in Androids UI Mar 28 23:14:52 can i launch an app with an activity in a different package than the main package? Mar 28 23:16:00 zezba9000 xml Mar 28 23:16:02 or the view Mar 28 23:16:05 same difference Mar 28 23:16:42 jasonmog the package that its in is irrelevant, just specify it in your manifest Mar 28 23:16:45 jasonmog: yes Mar 28 23:17:33 Hi all. Question: I'm trying to use some custom animations for a FragmentTransaction. I can't get them resolved when trying to call them. I'm using setCustomAnimations(android.R.anim.enter_top,android.R.anim.exit_top); and put enter_top.xlm and exit_top.xml in the res/anim/ folder. Any steps I forgot, or am I doing it totally wrong? Mar 28 23:18:03 ThomQ remove android. Mar 28 23:18:09 android specifies android resources Mar 28 23:18:45 Thanks. n00bie of me :) Mar 28 23:18:56 np Mar 28 23:21:47 do you have any suggestion on how to keep track of multiple alarms (set using ALarmManager)? i have to change their configurations, disable, re-enable, etc. Mar 28 23:22:07 what do u want to keep track of Mar 28 23:23:18 jug6ernaut: JesusFreke: that's what i'm doing. but i try to run on device and get "Activity class ___ does not exist." i type outed the full namespace to reference the class. Mar 28 23:23:42 the editor even autocomplete the path for me. no chance for typo Mar 28 23:24:41 hmm Mar 28 23:24:58 almost positive I've done that b4 Mar 28 23:26:42 google agrees that i should be able to do this Mar 28 23:28:17 i can manually launch the app fine Mar 28 23:28:24 android studio just isn't able to on its own Mar 28 23:28:36 so i don't get debugging Mar 28 23:30:42 so its just not working when launching from AS? Mar 28 23:32:10 another question. I don't completely understand how @Override for certain methods work. I have this Main activiy, which adds 2 fragments to a framelayout. The first fragment is a google map, the other is an info popup. I can control the googlemaps through the popup though. So I was adviced to override the onTouchEvent in the popup class. Mar 28 23:32:39 But trying to do that gives me an error, saying that it can't override the method of it's superclass though Mar 28 23:33:18 There is no superclass though, the class extends Fragment, not the main activity Mar 28 23:33:23 ThomQ thats basic java stuff Mar 28 23:33:37 @Override means you are replacing a function of a super class Mar 28 23:34:33 so it can't override anything, because it has no superclass, correct? Mar 28 23:35:06 How then can I get it to override the onTouchEvent of the fragmentclass beneath it? Mar 28 23:35:42 Can anyone give me tips on how can I resolve this error: Mar 28 23:35:45 error: Error: No resource found that matches the given name (at 'theme' with value '@style/Theme.AppCompat.Light.DarkActionBar'). Mar 28 23:35:50 I get that it's an issue with appcompatv7 but I can't figure out how to fix it xP Mar 28 23:36:00 ThomQ fragment class beneath? Mar 28 23:36:25 Uhm.. If you extend Fragment, Fragment is the superclass Mar 28 23:36:35 Fragment also doesn't define an onTouchEvent method Mar 28 23:36:40 Anyone know if its possible to have a pending intent open whatever activity was on the stack? Rather then specifying a specific one? Mar 28 23:37:06 jug6: yeah, literally the fragment underneath it On screen as it were Mar 28 23:37:27 Simon: So I have to override the Fragment's touch methods? Mar 28 23:37:41 Fragment doesn't have any touch methods Mar 28 23:37:51 ThomQ fragment is not a UI element Mar 28 23:38:10 you would need to control touch events in the fragments layout Mar 28 23:38:39 in the .xml file? Mar 28 23:38:53 no, right? Mar 28 23:39:26 :S Mar 28 23:39:46 in the fragment you have a Mar 28 23:39:52 yeah, i am pretty n00bie :D Mar 28 23:39:57 View onCreateView Mar 28 23:40:06 in which you return the view used by that fragment Mar 28 23:40:16 the touch event handling should take place on that view Mar 28 23:40:37 Maxoplata: You added the dependency wrong Mar 28 23:41:33 How do I share a Lock object between an Activity and an Intent? Mar 28 23:41:51 .... Mar 28 23:41:51 what Mar 28 23:43:29 well, I may be accessing a database from 2 threads, so I'm using a Lock. I'm starting a background thread with an IntentService, but I'm not sure how to send a reference to my Lock to the IntentService. Mar 28 23:43:44 Ahh ok yes. So, I got the view of the fragment thats on top. And then I need to override the view of the fragment that's below it? Mar 28 23:43:45 Chainfire still around? do you do any Bluetooth (rfcomm) by any chance? Mar 28 23:44:08 herpderphurr the lock should be handled in the database code Mar 28 23:44:25 u can not pass a lock via intent, anything added to an intent is serialized Mar 28 23:44:35 the actual referenced object is not passed Mar 28 23:45:21 jug6ernaut: So I don't have to worry about locking myself then. All right then. Mar 28 23:45:31 herpderphurr you do Mar 28 23:45:43 but the lock should be handled in your db code Mar 28 23:46:12 somebody in sqlite told me it was best to write to the db using a single writer thread Mar 28 23:46:36 sqlite does not like multi threads Mar 28 23:46:43 (in my experience at least) Mar 28 23:46:59 pretty sure it is not thread safe... Mar 28 23:47:06 g00s no I don't Mar 28 23:47:16 I see then. I'll try having all the read/write work in a single thread then. Mar 28 23:47:25 a database that doesn't do threading - only on Android ;) Mar 28 23:47:33 Chainfire ok, thx. i was just having trouble with the new BT stack; device connect but with trouble, sometimes requiring lots of connection retries Mar 28 23:47:49 I have used BT exactly once in my life Mar 28 23:47:54 Chainfire: actually, a lot of non-server databases don't like threading... Mar 28 23:47:57 Chainfire embedded is embedded lol Mar 28 23:48:22 out of curiosity, if I needed to share a Lock between two threads, how do I do that? Mar 28 23:48:44 jug6ernaut: Can't use XML, this must be done via code Mar 28 23:49:11 zezba9000 view.setGravity(Gravity.blah); Mar 28 23:49:57 So I've set the top fragment's onCreateView to Override, and I removed the bottom fragment's Override. I can still control the bottom through the top one though Mar 28 23:50:39 sorry p_l I come originally from the database world. it just seems strange to me, seeing as there have been full fledged RDMS's of about one MB lean enough to run embedded. At least they could've made it thread-safe, if not multi-threaded Mar 28 23:51:40 how do I get ?android:attr/actionBarSize in code? Mar 28 23:52:00 I don't think getResources().getDimension(android.R.attr.actionBarSize) is right? Mar 28 23:52:37 pfn, why do you thunk it's wrong? Mar 28 23:52:38 ah, getTheme.resolve... Mar 28 23:52:50 pfn looks good 2 me Mar 28 23:53:07 pfn, yeah, it's theme dependent, hoped getDimension would return the value for the current theme Mar 28 23:53:24 anyone know of a json backed shared preferences implementation Mar 28 23:53:29 thats independent of android Mar 28 23:54:33 jug6ernaut, yeah, that's why it's wrong :p Mar 28 23:54:48 bo Mar 28 23:55:04 i thought the actionbarsize was an android constant Mar 28 23:55:15 hmm Mar 28 23:55:23 i actually remember something about that... Mar 28 23:55:33 jug6ernaut: AdView(GooglePlayServices) took that method away for some stupid reason. Mar 28 23:55:54 jug6ernaut while I'm not sure if you could replace the XML with a JSON, it should not be difficult importing/exporting the JSON<->XML Mar 28 23:56:10 pfn http://stackoverflow.com/questions/12301510/how-to-get-the-actionbar-height Mar 28 23:56:35 jug6ernaut, yes, I know Mar 28 23:56:37 I already found it Mar 28 23:56:42 thanks though Mar 28 23:57:22 Chainfire i just want a SharedPreferences implementation that is outside of android(shared preferences uses internal android classes). JSON was just bc i prefer json, no specific reason to use over xml. Mar 28 23:57:29 pfn ah np. Mar 28 23:57:42 Or set a to the attribute and get that with Resources Mar 28 23:58:26 yeah, that's a good option, but I'd rather not introduce another resource Mar 28 23:58:30 resolveAttribute is good Mar 28 23:58:54 I give up. I have a very simple data structure for now, and it'll probably not get complicated. Just farms with an id and a name. I created a SQLiteOpenHelper and a "DataSource" as Vogella does here: http://www.vogella.com/code/de.vogella.android.sqlite.first/src/de/vogella/android/sqlite/first/CommentsDataSource.html . On my nav drawer I have a ListView of checked textviews that right now are hard Mar 28 23:58:54 coded. I want to populate the ListView with the data from the database, in a way that seems elegant. What I mean by this, is that if I add a new item to the database, it'll be automatially retrieved without me doing anything. I don't know if this last thing is posible. Here is my code if it helps: http://pastebin.com/69wNrSkN http://pastebin.com/U1pssrS8 http://pastebin.com/7frtXMyv Mar 28 23:59:15 I've been browsing docs for two hours and haven't found a good way to do it Mar 29 00:00:16 aindilis the most you would have to do is listView.invalidateDateSet(); Mar 29 00:00:31 or listView.notifyDataSetInvalidated() / changed Mar 29 00:00:34 can't remember which Mar 29 00:07:02 ok. My progress; I've found a method that should disable all childmembers of my Fragments viewgroup. This in theory should stop the fragment from being able to be controlled by touch, correct? Mar 29 00:12:45 ThomQ the fragment doesnt know anything about the touches Mar 29 00:12:48 only its views do Mar 29 00:13:20 yes, i know. So i'm trying to disable the views as described here: http://stackoverflow.com/questions/11775400/get-the-view-of-the-fragment-and-disable-the-whole-view Mar 29 00:13:39 I've tried disabling the Viewgroup, as well as the view. Doesn't seem to make any difference though Mar 29 00:14:55 ThomQ :\ what are you trying to achive Mar 29 00:15:38 How do I make my project use the library I just imported? It says the class could not be found when I add it in the XML of one of my layouts. Mar 29 00:15:49 Im trying to disable the touch controls of a fragment's view. Mar 29 00:16:41 ThomQ are u trying to have something else take the touch events or just have the events do nothing? Mar 29 00:19:02 has anyone every been able to set the gravity of a AdView that goes to the bottom of the screen? Mar 29 00:19:58 Hi, I've been following this Tutorial http://developer.android.com/guide/topics/media/camera.html , I already got it working buy my problem is how do I save my image or upload it online? which is that part of the code? I'm taking pictures by the way, thanks! Mar 29 00:20:07 *but Mar 29 00:20:14 Well, to be specific; i have another fragment (fragment2) overlapping fragment1 for about 50%. I want that view to override the touchc controls of fragment1, So that when a user touches fragment2, fragment1 isn't being controlled. When a user touches fragment1 where fragment2 isn't overlapping, i want to fire of a onTouchListener Mar 29 00:20:17 zezba9000 is the setGravity not working? Mar 29 00:20:30 jug6ernaut: SetGravity does not exist. Mar 29 00:20:31 if it doesnt just wrap it in another layout and put the layout w/e u want Mar 29 00:20:42 Not in the new AdMob(GooglePlayerServices) version Mar 29 00:21:11 oh idk, never messed with the new one Mar 29 00:21:29 man sometimes I rly hate the android UI system Mar 29 00:22:53 I could take a screenshot of fragment1, put that in another fragment, and put that between fragments 1 and 2, so that it Seems that their not being controlled. But that would be a Very messy solution I think :D Mar 29 00:22:54 setGravity tells a view how to positions its content, not where to position the actual view Mar 29 00:23:16 That's set in layoutparams, if supported by the viewgroup Mar 29 00:23:24 SimonVT: In the old AdMob this was super simple and just worked... now not so much Mar 29 00:23:43 there are also bugs in the new API... but guess what in Aug you can't use the Working API anymore Mar 29 00:25:08 A view has no control of how it's positioned inside the viewgroup Mar 29 00:25:22 the android UI could get a lot out of the XAMl alignment system... so much more logical Mar 29 00:25:40 Solely controlled by layoutparams Mar 29 00:26:50 SimonVT: Which don't work. Mar 29 00:26:59 How do you figure? Mar 29 00:27:40 because Align to Bottom aligns to Top... Mar 29 00:28:20 "adView.setLayoutParams" should just update the existing LayoutParams correct? Mar 29 00:28:34 doing a test to make sure that method is not jacked up Mar 29 00:28:39 No Mar 29 00:28:46 It sets new layoutparams Mar 29 00:29:14 Hi guys, anything wrong with this code? Mar 29 00:29:15 So its an "Add" operation not a "Set" operation?! Mar 29 00:29:17 wft Mar 29 00:29:35 No, it's a set operation Mar 29 00:29:43 It sets the layoutparams to whatever you pass as a parameter Mar 29 00:29:55 Hi guys, anything wrong with this code? http://pastebin.com/LATXpcLS , its giving me NullPointerException error Mar 29 00:30:44 SimonVT: Well this does NOT set to the bottom of the screen: LinearLayout.LayoutParams adViewParams = new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM); Mar 29 00:30:45 ReignUnityActivity.ContentView.addView(adView, adViewParams); Mar 29 00:31:12 It centers in horizontally, but vertical does not work Mar 29 00:31:25 Hi, What is Google profit from paid apps? Mar 29 00:32:10 Vertical gravities has no effect on a vertical linearlayout, since it positions views linearly Mar 29 00:32:56 SimonVT: Well thats great as you cant pass in a "FrameLayout.LayoutParams" into "adView.setLayoutParams"! Mar 29 00:33:35 You can if you put it in a framelayout Mar 29 00:33:36 "adView.setLayoutParams" requires "LinearLayout.LayoutParams"... Mar 29 00:33:47 If it's in a LinearLayout, it needs to be LinearLayout.LayoutParams Mar 29 00:34:32 You can either tell the linearlayout to position views at the bottom via its gravity field, or stretch content above the adview so it gets pushed to the bottom Mar 29 00:35:04 SimonVT: ok, so its in a "RelativeLayout.LayoutParams" but it want a "LinearLayout.LayoutParams" though Mar 29 00:35:29 If you're putting it in a RelativeLayout it does not want a LinearLayout.LayoutParams Mar 29 00:35:52 but it does or it gives a cast exception Mar 29 00:36:00 You're mistaken Mar 29 00:36:15 If it tells you it needs LinearLayout.LayoutParams, then you're adding it to a LinearLayout Mar 29 00:36:21 the code is too, simple, I am not Mar 29 00:36:40 RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT);//FILL_PARENT Mar 29 00:36:40 addContentView(ContentView, params); Mar 29 00:36:56 Thats the content view the AdView gets added to Mar 29 00:37:33 O f'in christ i'm stupid, sorry Mar 29 00:38:16 it is a "LinearLayout", but does not give runtime exception when I try to pass in a "RelativeLayout" on "addContentView" Mar 29 00:39:57 it rly should through the same exception as the set method does or I would have figured this out... :\ Mar 29 00:50:54 SimonVT: Ok so setting "Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL" in "FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.MATCH_PARENT," doesn't not align the ad to the bottom. Its not aligned to the center vertically Mar 29 00:51:26 The main container is also a FrameLayout.LayoutParams with MATCH_PARENT Mar 29 00:53:55 How would aligning it to the bottom make a difference if it's the same size as the parent Mar 29 00:54:28 well WRAP_PARENT isn't working Mar 29 00:56:22 what can cause saved instance states to not be returned when a fragment's onStartActivity() is called ? Mar 29 00:57:19 i'm saving some bits of stuff in my fragment's onSaveInstanceState(), and I can see that being called..but when my fragment's onStartActivity() is called (e.g. in response to a back button), I don't get my savedInstanceState bundle. Mar 29 00:59:38 k got it working Mar 29 01:02:04 which of the lifecycle methods are called for an Activity when a user hits the back button to return to it? Mar 29 01:02:22 onResume? Mar 29 01:03:15 onResume, yes. Mar 29 01:03:18 yaw: yes I'm pretty sure Mar 29 01:03:46 in general it depends, I guess? [eg: an orientation change in the middle would effectively start all the way from onCreate() by default] Mar 29 01:04:52 Also I think you can set activity lifecycles, so if they are not default it might change Mar 29 01:05:47 I’m not modifying any of the defaults. Mar 29 01:06:07 There's a really good activity lifecycle diagram for all the subtle bits in the docs that's worth looking into, if the sequence of methods matters in your app Mar 29 01:06:24 yaw: only onPause() and onResume() are guaranteed to run when you press back Mar 29 01:06:54 codeguru: ok, got it. thanks Mar 29 01:07:01 zezba9000, thanks Mar 29 01:07:25 kbs: I’m googling for the diagram now. thanks Mar 29 01:48:03 http://pastebin.com/CR1HUjYg Mar 29 01:48:19 this problem make me crazy X( Mar 29 01:49:07 i don't know why it return true Mar 29 01:49:26 it should return false Mar 29 01:50:19 I'm not seeing the most interesting method in your post (what does get(str, str) do? Mar 29 01:50:59 private String get(String Key, String Default) Mar 29 01:51:25 it's get a string from shared preferences Mar 29 01:51:41 :-) well, yes but what does it *do*? Mar 29 01:52:00 get a string Mar 29 01:52:07 ah well Mar 29 01:52:30 you can also see this string in LogCat Mar 29 01:52:39 * kbs is unable to make himself clear Mar 29 01:52:58 xD Mar 29 01:53:06 like me Mar 29 01:53:11 if I say System.out.println(3 == mystery_method(3, 5)) returns "false" Mar 29 01:53:22 exactly how would you help me understand what the problem is? Mar 29 01:53:33 saying that mystery_method(3, 5) returns an int is hardly useful Mar 29 01:54:43 http://pastebin.com/dW6ZSwqg Mar 29 01:54:56 just help me :( Mar 29 01:55:45 well -- what do you think the problem is :-) Mar 29 01:56:14 essentially, what you're saying is PreferenceManager.getDefaultSharedPreferences(this).getString(string1, string2) returns string2 Mar 29 01:56:46 it's return 1.0.1 Mar 29 01:57:02 what is string1 and string2 in this situation? Mar 29 01:58:09 string1 is the key of the value, string2 is the default value to return if the search was failed\ Mar 29 01:58:17 perfect Mar 29 01:58:40 so, what could be one reason you get string2 back from that call? Mar 29 01:59:24 if no results found Mar 29 01:59:29 bingo Mar 29 02:00:26 the other possibility of course, is that by accident that the search happens have the value string2 Mar 29 02:00:46 i have a rooted device, and i see my shared pref file, and i see the xml value is 1.0.1 Mar 29 02:01:02 hello Mar 29 02:01:26 how can i send an email using an intent but not leaving the app after the email is sent Mar 29 02:01:51 if LastVersion = CurrentVersion, why it think it's not? Mar 29 02:02:14 oh! Mar 29 02:02:50 headache :( Mar 29 02:02:52 now I'm shamed. Your question was different - use .equals(), not != Mar 29 02:03:33 !equals() ? Mar 29 02:03:59 yea. strings are objects, and don't necessarily point to the same object instance, even if their contents are identical Mar 29 02:04:19 ok Mar 29 02:04:27 i will try it now Mar 29 02:04:44 I misunderstood your question initially, apologies Mar 29 02:06:04 solved :) Mar 29 02:06:07 thanks Mar 29 02:06:24 sure, i guess :-) Mar 29 02:06:42 :) Mar 29 02:08:45 hey guys **** ENDING LOGGING AT Sat Mar 29 03:00:00 2014