**** BEGIN LOGGING AT Mon May 11 02:59:58 2015 May 11 03:16:06 Does BuildConfig.DEBUG now work for library projects? May 11 03:19:33 joshkovach: because when the UI changes I don't want to have to change all the mocks May 11 03:19:56 surf2b1: for two or three years, yes May 11 03:20:22 Did anybody came across this one? https://github.com/JetBrains/anko How is it? Kotlin fans? May 11 03:21:05 I'm ambivalent about it May 11 03:21:09 not a fan May 11 03:21:29 hmm May 11 03:22:26 JakeWharton: This isn't that old: http://stackoverflow.com/questions/20176284/buildconfig-debug-always-false-when-building-library-projects-with-gradle May 11 03:22:37 Not exactly the issue I was referring to though but still relevant May 11 03:25:26 i think i see what you're asking then May 11 03:25:38 it was a bit of a non-issue since the published artifact was always that of release May 11 03:25:40 JakeWharton: Still open and recent activity: https://code.google.com/p/android/issues/detail?id=52962 I've been using reflection from one of those answers and want to know if I can stop May 11 03:26:23 that is a separate issue May 11 03:26:36 maybe i'm not clear on what you're asking May 11 03:27:31 the problem is/was that a module can only publish a single artifact for consumption by other modules May 11 03:27:37 I'm asking if BuildConfig.DEBUG is always true in debug builds and always false on production builds when the lib is a dependency in another app. May 11 03:27:54 no May 11 03:28:13 see previous message as to why May 11 03:28:18 So, getting the package-name and checking BuildConfig class for that package is the way to go? May 11 03:28:26 via reflection May 11 03:30:06 or just not caring and using the library's, but clearly you have a use case for it that actually matters May 11 03:30:22 yeah May 11 03:30:29 I wasn't clear. My bad May 11 03:33:10 on another topic: I'm finally migrating from Eclipse to Intellij. With Eclipse I modified the save as action so when I saved it would auto-import everything and format my code. Is there an equivalent to this in intellij? Looked but didn't find much. May 11 03:33:30 IntelliJ doesn't really have save May 11 03:33:35 it's always saving May 11 03:33:56 i really don't know though May 11 03:34:29 Settings / Editor / Auto Import or something like that May 11 03:35:01 Now if IDEA took it one step further and actually had a Problems view showing the compilation error whenever it does an internal save... May 11 03:35:23 i think we come on this every few months, but oh i miss that dearly May 11 03:35:30 what about adding the final keyword when formatting? May 11 03:36:09 As long as you don't add final to parameters and locals May 11 03:36:46 Is it possible in IntelliJ? Eclipse has some option to auto final everything May 11 03:43:23 Only thing I can find on adding final: https://github.com/dubreuia/intellij-plugin-save-actions/issues/9 May 11 03:55:58 hey guys May 11 03:56:08 and gals May 11 03:56:19 and robots May 11 03:56:31 how do I change the positioning of components when the screen orientation changes? May 11 03:56:41 like for example I want different views for profile and landscape orientations May 11 03:56:49 your activity will be recreated when the user rotates the device May 11 03:56:59 this allows a new layout to be inflated May 11 03:57:13 for example, you can have layout/main.xml and layout-land/main.xml May 11 03:57:31 the former is the "default" so-to-speak, and the latter would only be used when the device was in landscape orientation May 11 03:57:36 so I'd need different xml files May 11 03:58:57 ok another question May 11 04:00:00 i want an image (of any size) to be put into an imageButton May 11 04:00:17 and for it to not be scaled, but to fit with overflow not showing May 11 04:00:36 so the image doesn't get distorted and still keeps its size. kind of like what happens on instagram May 11 04:01:02 thats my current task at hand. how should I go about doing that May 11 04:02:31 liftedbronco: http://etcodehome.blogspot.com/2011/05/android-imageview-scaletype-samples.html May 11 04:02:54 has anyone had a problem with AS make/clean blowing up with a manifest merger error in :processDebugAndroidTestManifest for some 'test' that doesn't exist ? May 11 04:03:33 thanks yiati May 11 04:03:50 nah I haven't had problems with the manifest merging stuff since they changed a couple of the dsl keywords May 11 04:05:38 te merges manifest has android:targetPackage="com.me.rx.test" , and i don't even have any tests for that May 11 04:06:01 its basically blowing up on something that doesn't exist :) May 11 04:06:43 in the app, i have a tools:override but its complaining i need that to for my imaginary test May 11 04:37:28 CedricBeust: There is a valid argument to make all local variables final May 11 04:38:10 There are a few arguments, I don't find any of them convincing and the effect is a lot of unnecessary boiler plate that clouds the code May 11 04:57:05 the problem is that they weren't final by default May 11 05:00:10 "By default, all classes in Kotlin are final, which corresponds to Effective Java, Item 17: Design and document for inheritance or else prohibit it." - http://kotlinlang.org/docs/reference/classes.html May 11 05:00:15 Pretty nice part of Kotlin May 11 05:00:51 Doesn't address primitives though May 11 05:01:44 Which is something Java would have to deal with, I don't think Kotlin has primitives though? May 11 05:02:16 by "primitive" you mean "value types beyond the normal java ones"? May 11 05:02:30 groxx: I mean not objects May 11 05:02:39 https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html May 11 05:04:04 afaik that's JVM dependent, not language May 11 05:06:43 Yeah, idk I guess I'm just saying as far as making "all" local variables final, trying to fix it by having classes default to final (like other languages), it still wouldn't handle primitives May 11 05:10:14 Damn. Is there a library to implement the draggable-checklist-input like google keep? Gotta give it to client in an hour. Would take too long to implement. May 11 05:10:17 that is orthogonal to making locals final May 11 05:10:42 drag sort list view May 11 05:11:28 hey people, how many of you actually draw out app designs? May 11 05:12:02 or even simpeler, with the new Material Design, who uses colored paper? May 11 05:12:13 Well I have a 300 pages notebook full of designs of my current project... May 11 05:12:47 colored paper O.o May 11 05:13:49 ReScO, something like this ? http://www.materialup.com/posts/stop-motion-animation-new-tool-for-wireframing May 11 05:17:57 WantToCode: rather more static :P May 11 05:19:13 Hi all, I came in the other day to ask a quick question about this app, and I've finally got it almost complete...however, it won't actually send the text message. Can anyone point me in the right direction as to why? Thanks! https://github.com/MJ94/SimpleTexter May 11 05:51:14 Hey guys, does anyone know how to use EXT4 instead of yaffs for filesystems when using the emulator ? May 11 05:52:16 iirc, newer api images should be using ext4 May 11 05:53:08 if you wanted to make an older one use ext4, you'd likely have to recompile the older style kernel with ext4 support, and build your own emulator images with the necessary tweaks for it to mount the filesystems as ext4 May 11 05:54:48 Ive tried running it on 4.0.3 (API 15) May 11 05:55:19 pulled the .config through adb before building the kernel May 11 05:55:30 default was set to yaffs in the .config looks like May 11 05:56:42 you'll likely also need to tweak the init.goldfish.rc, or possibly the fstab or whatever it is. May 11 05:57:18 I forget the exact details, but you'll need to make sure that init and/or vold knows how to mount the partitions correctly. May 11 05:57:21 Hi all, I came in the other day to ask a quick question about this app, and I've finally got it almost complete...however, it won't actually send the text message. Can anyone point me in the right direction as to why? Thanks! https://github.com/MJ94/SimpleTexter - everything works, but the text doesn't send. May 11 05:57:51 "everything works, but the text doesn't send." lol May 11 05:57:55 ok, thanks JesusFreke I'll look in to it May 11 05:58:00 that means, it doesn't work :D May 11 05:58:20 groxx: heh, well at least the activities switch XD May 11 05:58:30 that was a challenge within itself. May 11 05:58:38 this has been an all day project May 11 05:59:03 If anyone could offer any assistance, I'd appreciate it May 11 05:59:10 :) May 11 05:59:55 if you want to automatically send it, why not use smsmanager or whatever it's called now ? May 11 06:01:56 bankai_: simply put, this is what I had and I've never used SmsManager so I didn't want to deal with it right now :) May 11 06:02:22 it's two lines of code May 11 06:03:58 bankai_: would it fix my code? :P May 11 06:04:20 System.exit(0) would fix any code May 11 06:06:39 Just looking at my code (without smsmanager), does anyone know where I may've gone wrong? May 11 06:07:38 any one using OSX Yosemite? Have Android Studio installed. How it's working? Should I go for osx upgrade ? May 11 06:08:10 t2mkn: I use Android Studio on Yosemite May 11 06:09:14 MJ94: some say Yosemite has some issue with Java runtime. Have you experienced any? May 11 06:09:49 MJ94: will you recomend me upgrading to Yosemite considering your personal experience ? May 11 06:10:21 t2mkn: I have not. AS has worked perfectly for me. May 11 06:10:51 t2mkn: I see no reason not to from my end. May 11 06:14:55 I see one: fonts have become atrocious with Yosemite on AS May 11 06:15:01 wich I could revert May 11 06:15:10 Especially selected text May 11 06:18:20 yeah i'm kinda worried about that ... I tried running AS with Oracle 1.8 JVM, and the fonts were terrible. i had to revert back to Java 6, or it would have been headaches May 11 06:19:06 when from work, sometimes I connect here and I join and everything's fine May 11 06:19:10 Oracle never implemented subpixel font AA in their JVM with Swing. I guess JavaFX has it May 11 06:19:25 other times I connect and the moment I join any channel, BAM I get DC without even having the chance to get into the channel May 11 06:21:42 CedricBeust: ya I am worried about text in AS. May 11 06:22:15 can JRE 6 be installed in Yosemite ? May 11 06:25:11 g00s: can JRE 6 be installed in Yosemite ? May 11 06:25:59 why May 11 06:26:20 t2mkn grab the latest apple jvm, probably 7 ? May 11 06:27:14 you can install any java on the mac May 11 06:27:54 t2mkn so the apple jvms use Quartz for their font rendering - oracle, no idea May 11 06:28:04 but its not Quartz, so thats why it doesn't look the same May 11 06:28:32 if you have a "retina" display, maybe your DPI is high enough you won't notice it May 11 06:28:49 but Oracle basically does greyscale AA which sucks May 11 06:29:25 I have retina. May 11 06:29:53 but if JRE 6 can be used for AS runtime. May 11 06:30:57 t2mkn does yosemite java apple java 7 ? May 11 06:31:30 yosemite dont have java at all i guess May 11 06:32:07 t2mkn if you try running AS it may download it May 11 06:32:08 some where i had found at earlier yosemite release time May 11 06:32:44 ya thats obvious. but m worried about text aperience in it. May 11 06:32:52 man you're just talking to talk May 11 06:32:54 bad text hurts me a lot. May 11 06:32:56 don't waste time please May 11 06:34:36 read this it's useful http://sahandsaba.com/nine-anti-patterns-every-programmer-should-be-aware-of-with-examples.html May 11 06:46:52 reading the thoughtworks may tech radar ... May 11 06:47:04 i haven't heard of 90% of these things May 11 06:47:33 too long, but informative May 11 06:47:45 what's up with parse analytics crash reporting and catching exceptions? I want to catch and report instead of crashing... May 11 06:48:26 use Crashlytics, why parse? May 11 06:48:36 I mean they offer it sure, but why May 11 06:51:02 Odaym: I just read the same blog post :) May 11 06:53:42 g00s: Most of their radar is Windows stuff, I suspect they get a heavy sponsorship from them May 11 06:54:02 I chuckled when their #1 recommendation out of 100 technologies is one I had never heard of May 11 06:54:33 i went through everything and didn't see much windows, lots of apache, open source, etc May 11 06:55:12 Odaym: hahah, the "god class diagram" is spaced perfectly such that the boxes look immobile when I scroll May 11 06:55:46 CedricBeust bit i can't find BlueFloodDB on the interwebs at all :D May 11 06:56:01 apparently some time series database May 11 06:58:57 I've had a God class before May 11 06:59:02 4K lines May 11 06:59:20 I tried to sit down and reduce it, I couldn't May 11 07:00:08 design patterns is what's missing May 11 07:01:55 God class is not necessarily a big class May 11 07:02:07 For example, an event bus is a god class May 11 07:02:44 oh May 11 07:03:45 Odaym: heh, you should look at PackageManagerService, or ActivityManagerService May 11 07:04:09 https://android.googlesource.com/platform/frameworks/base/+/d0c5f515c05d05c9d24971695337daf9d6ce409c/services/java/com/android/server/am/ActivityManagerService.java May 11 07:04:56 that's insane May 11 07:05:11 15K lines? May 11 07:05:15 oh, that's an old version May 11 07:05:17 https://android.googlesource.com/platform/frameworks/base/+/master/services/core/java/com/android/server/am/ActivityManagerService.java May 11 07:05:24 almost 20k May 11 07:06:02 yea but there's tons of comments May 11 07:06:02 thar be dragons :) May 11 07:06:43 wouldn't know if that's wrong or write, I guess LOC is not a valid metric for "goodness" May 11 07:06:45 or badness May 11 07:06:52 right* May 11 07:08:56 JesusFreke, my browser says out of memory May 11 07:09:05 (not really) May 11 07:10:05 hah May 11 07:10:35 Odaym, there was a time when my company wanted to take "lines of code committed" as part of the paycheck calculation, feel free to guess how long that stuck around May 11 07:10:48 wow May 11 07:11:17 every word starts with new line May 11 07:11:31 the other way around actually.. May 11 07:25:24 Do you guys know of any good visual aids to creating menues and UI? Like purely visual, like a drawing board? May 11 07:32:29 hmm there's that mocking software May 11 07:32:39 ninjamock I think May 11 07:33:44 brilliant May 11 07:33:47 the DFP banner chromium output in my logical.. the horror May 11 07:42:08 hey guys,im updating contact images using a small piece of code.It works on my nexus 5 without any exception but i tested it with some different phones and i realized that this code piece only updates google contacts(if user saved it phone or sim it doesnt update) May 11 07:42:35 odd situtation is that i can read all contacts no matter if its google contact or phone or sim May 11 07:43:46 Hi there. May 11 07:45:36 hi May 11 07:46:38 hi May 11 07:49:20 In my fragment I've created @ItemClick void itemClicked(Language imageView) {} inside I'd like to set drawable for this imageView} but I keep getting: initialize imageVIew1. This is code snipper for fragment: https://gist.github.com/anonymous/eeb181c91c05cc48a06d I've also included Language class May 11 07:49:40 How can I assign imageView resource through Language imageView variable? May 11 07:57:34 you need to reengineer your code May 11 07:58:16 ravilov: please do elaborate :) May 11 08:00:28 is your itemClicked() a part of an ImageView or some of its descendants? if not you need to keep a reference to the appropriate ImageView somewhere May 11 08:06:36 ravilov: you always have to reengineer your code when you drank too much last night ;) May 11 08:13:19 Hm. I don't understand. I crated @ViewById ImageView settings_list_itemsLanguageChose; Which is analogous to: ImageView imageVIew; imageView = (ImageView) layout.findViewById(R.id.imageId); but I keep getting: Drawable cannot be applied to int: https://gist.github.com/anonymous/f34d8916fff9a3326711 May 11 08:13:31 did not drink at all. just no sleep May 11 08:13:52 Oh I use android annotations. May 11 08:14:22 Line 12 in question. May 11 08:15:27 in onPause(), how can I differentiate between my activity opening a new one (specifically an image pick intent) and the user navigating away from my activity (pressing home etc) May 11 08:15:31 frojnd, if you look at the documentation closely May 11 08:15:45 you'll see that setImageDrawable() expects a Drawable, not an int with resource ID. May 11 08:16:06 Any reason camera preview looks way better than the actual camera picture ? May 11 08:16:12 frojnd, so you need to get the drawable from Resources (getResrouces.getDrawable) May 11 08:16:23 pigiman, you set a lower resolution? :P May 11 08:16:52 Mavrik - you mean setPictureSize? May 11 08:18:16 Mavrik: thank you. May 11 08:19:22 hm May 11 08:19:41 But fater I run the code I get NUllPointerException for that particular line May 11 08:21:33 what do you mean you created @ViewById ImageView? May 11 08:21:48 you created a variable called ImageView of type @ViewById? May 11 08:21:59 It's annotation thing. May 11 08:22:14 ah I see May 11 08:22:31 what does it do? May 11 08:23:26 It's analogous to ImageView imageview; (under onCreate) ... imageView = (ImageView) findViewById(R.id.imageViewId); May 11 08:23:45 I know what it's trying to achieve, but why not use the usual one? May 11 08:23:56 all that is done with @ViewById ImageView myImageViewId May 11 08:24:10 ah ok so view injection May 11 08:24:16 what's it called? May 11 08:24:35 android annotations library: http://androidannotations.org/ May 11 08:24:56 cool May 11 08:25:00 Mavrik: I keep getting nullponiter exception for line 12: https://gist.github.com/anonymous/f34d8916fff9a3326711 May 11 08:25:04 seems more than just view injection May 11 08:25:13 dude, he told you why May 11 08:25:19 its so obvious May 11 08:25:29 Odaym: I did not get used to it. Only started to use it a few days back. May 11 08:25:44 better figure out how to set Drawable first before getting into annotations May 11 08:26:06 ah old gist May 11 08:26:50 frojnd, seems you're using too many shortcuts (like annotations) and too little actual code May 11 08:26:56 this is the fresh one: https://gist.github.com/anonymous/0aaf9e96eaadcbfbd1f5 May 11 08:26:57 makes it hard to debug May 11 08:27:13 ravilov: heh, If it were up to me I would use plain stuff :) May 11 08:27:35 there's an exception that comes out when your app crashes, the answer is there not here May 11 08:27:50 too trivial to ask about this May 11 08:28:01 Mavrik - did you mean setPictureSize? May 11 08:28:02 Odaym, he got a NPE, probably the most trivial of all exceptions :p May 11 08:28:22 NPE, sounds like a badass gangster rap crew May 11 08:28:36 NullPointer in YO FACE! May 11 08:29:18 great, now you scared morois away May 11 08:29:18 why make fun of me instead of helping me out May 11 08:29:25 help yourself! May 11 08:29:38 I am, this is why I found this chan May 11 08:29:41 NO May 11 08:29:45 yes :) May 11 08:29:48 you come here to nag May 11 08:29:50 go figure out May 11 08:29:55 frojnd, we *have* been helping you, but we can't do your debugging for you May 11 08:30:01 you already got 10 answers May 11 08:30:03 of the same thing May 11 08:30:49 I'm sorry, *pat pat* May 11 08:31:20 oh cool, we're making patties May 11 08:31:23 * ravilov waits with a plate May 11 08:33:07 I think I know where the real problem is May 11 08:39:46 guys anyone updated contact photos programatically before ? May 11 08:42:44 sci-fic: what do you mean? May 11 08:44:57 i mean,i update contact photos with this http://paste.ubuntu.com/11075924/ .it works good on my nexus 5 but there is a problem in vodafone smart mini 4 and samsung galaxy s4 mini May 11 08:45:16 i made a few tests and i realized that that code piece only updates google accounts. May 11 08:47:06 When taking a picture with the camera, when the preview stops the actual picture is not necessarily the same as the preview May 11 08:47:28 I am using takePicture(null, null, new PIctureCallback(){ .. } ) May 11 08:48:13 because it isnt May 11 08:48:39 between takepicture and stop preview some time might pass May 11 08:49:20 I mean on the native camera app it works kind of smooth May 11 08:49:44 ~ May 11 08:50:15 ok hehe May 11 08:55:30 @Ashiren any idea why the preview is totally different than the picture itself? for example there is a lot of light in the preview but the actual picture doesn't have it May 11 09:01:32 dunno May 11 09:01:36 do you use focus May 11 09:02:09 This camera doesn't have any focus May 11 09:02:21 But it happens also on camera with focus May 11 09:03:33 do you take picture on ui thread or background May 11 09:04:45 background May 11 09:05:10 public void onPictureTaken(byte[] data, Camera camera) { new OutputCapturedImageTask().execute(data); } May 11 09:08:52 your best bet is stay away from the camera ;) May 11 09:09:28 i mean the method .takePicture, try to do it in background May 11 09:17:36 I would like to take a picture: http://developer.android.com/reference/android/hardware/Camera.html#takePicture(android.hardware.Camera.ShutterCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback, android.hardware.Camera.PictureCallback) . How can I save the picture using method takePicture ? May 11 09:19:06 you date the byte[] data into file May 11 09:19:09 this is jpeg image May 11 09:20:02 s/date/save May 11 09:20:59 Ashiren: so you mean wrap the takePicture itself with an Async class? May 11 09:21:00 Could you give me an example, please? May 11 09:22:01 pigiman: yes, but im not sure if itll help May 11 09:22:20 who has experience with wearables ? Do you usually make separate app for watches, right ? May 11 09:22:26 chili4sale: https://stackoverflow.com/questions/17363625/save-picture-from-onpicturetaken-in-my-folder-on-sd May 11 09:22:49 Ashiren: ok thanks May 11 09:24:23 Okay, thank you! May 11 09:40:38 no wearables... May 11 09:42:19 @Ashiren - it does take the pictures quicker at least May 11 09:43:49 gordon_, if you don't make separate app for watches, you're limited to sending notification because there is a very loow probability that a phone or tablet layout would fit in a watch screen May 11 09:44:40 at least until we get tablet sized watches. soon (tm) May 11 09:44:49 adq: well you define rect_main_activity layout May 11 09:44:55 so the layout will be different May 11 09:45:05 i answered your question lol May 11 09:46:17 and I don't know what is your rect_main... but in xml it's app:rectLayout and app:roundLayout in the watchviewstub May 11 09:46:35 just standard as you define activity_main May 11 09:46:38 or you can do that programmatically May 11 09:46:47 you can also defince react_activity_main May 11 09:46:54 gordon_, what is your other question? May 11 09:46:58 so the layout will be picked for watch May 11 09:47:03 .... May 11 09:47:31 I just dont know if I am suppouse to make other app for watch or customize my app to watch May 11 09:47:46 so I wanted to ask everybody how you are doing this May 11 09:48:04 I do dedicated app for wear because what i said above May 11 09:48:36 and then you can show notifications from main android app to wear app ? May 11 09:48:49 (I want to show notifications from messages (and read them) May 11 09:49:06 a round screen should convince you that most of the stuff will not fit in a square layout, even if adapted to low resolution May 11 09:49:31 and then you can show notifications from main android app to wear app ? <- you don't need to make a dedicated app for that May 11 09:49:43 you can just directly send notif to your watch May 11 09:50:23 can I then respond to this notification from watch? May 11 09:50:55 what does respond to this notification means? May 11 09:50:59 you can dismiss it from the watch May 11 09:51:06 or open the handheld app from the watch i guess May 11 09:51:30 for example click the notification and then send response to message May 11 09:51:32 gordon_, i strongly recommend you read: http://developer.android.com/training/building-wearables.html May 11 09:51:50 ok, I am reading this now May 11 09:52:02 will ping you later then, thank you! May 11 09:52:15 np May 11 10:02:39 i want to record video of low quality, 5 fps, low bitrate etc. but seems the mediarecorder is quite limited to what settings i can provide May 11 10:02:50 as specific device will mostly omit them, i.e. framerate May 11 10:45:53 Hey guys, I use a WebView to log a user in (oauth) via a web page. However, I can't seem to log them back out / make the webview forget next time a webview is used. May 11 10:55:26 tx what have you tried so far? May 11 10:55:40 I have a courious problem with SQLLite foreign key hanlding: I have two tables that are combound with a foreign key constraint. This is working generally. To store measure data I need to add one entry in the parent table and some data values in the child table. Inserting the entry in parent table returns me a valid id that I am using in the children table inserts. Unfortunatly I sometimes still get an foreign key constraint error May 11 10:56:19 What is the proper way to insert a foreign key constraint value set? May 11 10:56:24 Here my code http://pastebin.com/esc6DW1h May 11 10:56:35 danijoo_: clearCache(true) May 11 10:58:17 here are my databases: http://pastebin.com/mxaEPcaW May 11 10:58:48 tx: This answer wasn't related to my question, right? May 11 10:59:09 o May 11 10:59:11 no* May 11 11:01:00 tx try cookiemanager May 11 11:01:25 how do i add a background image, a border and text outlining for a button? May 11 11:01:33 using xml May 11 11:01:45 danijoo_: will try, thanks. May 11 11:02:15 tx yes thats apparent, but i've no idea what the syntax is.. May 11 11:02:37 jutsi: are you using the IDE? May 11 11:02:41 (android studio) May 11 11:02:47 eclipse May 11 11:02:53 Poor thing. :) May 11 11:03:00 lol May 11 11:03:22 but i know that i put a custom xml file as background, but i've no idea what to write in the custom xml file May 11 11:03:22 jutsi: anyway, make a new drawable for the button May 11 11:03:27 is there like a syntax chart or something? May 11 11:03:28 and assign that drawable using android:background May 11 11:03:56 jutsi, google for "layer-list drawable" May 11 11:04:05 danijoo_ thanks :) May 11 11:04:20 http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList May 11 11:04:28 makani: you mean you have two foreign keys referencing to keys in two tables? May 11 11:05:10 icedp: I have only one foreign key (see http://pastebin.com/mxaEPcaW) May 11 11:05:43 So as far as i can understand i make an item for each of the things, like one item for the border and an item for the outline etc? May 11 11:05:54 jutsi, correct May 11 11:06:11 makani: I see two statements FOREIGHT KEY... May 11 11:06:54 Ok yes, you are right. But the reference to the other table is more static May 11 11:09:03 These table will only be initialized once. I suppose that my current problem is related to the insert. The insert to the parent table seems to be unfinished when inserting the entry in the child table May 11 11:09:37 But I dont understand how to resolve such a situation in general May 11 11:09:39 makani: try a single transaction and maybe defered foreign key May 11 11:09:56 makani, use trasaction to make sure one is finished before the other starts May 11 11:12:35 I have an App in Android running as KIOSK mode app , I need to auto update it in the background , the device is rooted , whats the best approach ? May 11 11:12:44 I have currerently planning to do this : 1) Download new updated apk in background , 2) Run apk and install dialog appear with code 3) TRICKY - Make a root command which simulates a click at the cordinates where the install button is displayed ? May 11 11:12:50 is this best approach ? May 11 11:14:51 thanks icedp. That sounnds what I am looking for. I will give it a try May 11 11:15:10 chinu_: or just run pm install May 11 11:15:14 chinu_, cant you just run "install -r your_app.apk && am start your.main.activity" ? May 11 11:15:25 I can't seem to find out how to add an outline to text in my buttons... can it be done through layer-list May 11 11:15:32 this should install the update and immediatly starts the main activity of it May 11 11:15:40 jutsi, no. May 11 11:16:08 danijoo_ icedp : I tried pm install but it shows install dialog only May 11 11:16:09 jutsi, you must use a shadow for the text. May 11 11:16:35 chinu_, adb install -r your.apk doesnt show a dialog May 11 11:17:28 danijoo_ it works basically the same way as an outline? May 11 11:17:28 ok thanks I will try this , will this work with the service running in my old app ? May 11 11:17:49 jutsi, just make a filled drop shadow. this will look like an outline May 11 11:27:14 danijoo_ i figured out how to add a basic shadow outline, but nothing on "filled drop shadow" May 11 11:34:17 anyone got auth0 working in android? can't seem to figure out what im doing wrong May 11 11:37:36 I, too, can't figure out what you're doing wrong. :D May 11 11:40:06 ^^ May 11 11:44:38 hai May 11 11:45:07 what's a good REST client library right now ? WebSocket support would be a plus. May 11 11:45:55 quelqun_dautre, theres a list of available REST clients available under google.com May 11 11:46:12 really ? Seems nice. I'll look into that. May 11 11:46:29 :) May 11 11:47:06 seriously, check the arsenal May 11 11:47:18 https://android-arsenal.com/tag/85 May 11 11:47:37 most people will suggest you Retrofit May 11 11:50:07 didn't know about android-arsenal, thx May 11 12:16:23 ain't been her in a while :) hi guys May 11 12:17:40 hi May 11 12:19:05 hi :) May 11 12:24:06 Thanks icedp . Your hint was dead right May 11 12:31:28 Is there a pdf library the do not bump the size of the apk is 15mb :/ ? May 11 12:31:29 Is it possible to localize assets? Let's say im getting text from text files, could i get three separate text files for 3 separate languages? May 11 12:31:48 jutsi: you can create folders, and use locale to get the right file May 11 12:31:54 but you'll have to do it yourself May 11 12:32:00 like assets-fr and assets-us? May 11 12:32:10 or sub folders within assets? May 11 12:32:36 as I said, you should write the code that check if it is available, so it is depend on you. May 11 12:32:55 http://stackoverflow.com/questions/5427933/localization-of-assets-files May 11 12:33:16 yoavst last I remember, every one of the smaller pdf libs sucked May 11 12:33:51 bluecup: I mean, I could get them into google drive, but It sucks May 11 12:34:17 I've used https://github.com/JoanZapata/android-pdfview May 11 12:34:23 but my apk is large May 11 12:35:30 i think my collegue used mupdflibrary on a project and it was really ok and not huge May 11 12:35:51 cool thanks May 11 12:35:55 did you check the size before or after proguard ? May 11 12:36:36 danijoo_: didn't enable progaurd May 11 12:36:42 and most of the size is native libs May 11 12:37:03 ah ok May 11 12:37:47 http://i.imgur.com/z6ye8nA.png May 11 12:37:58 I'll drop mips May 11 12:38:10 but what's about regular armv7 May 11 12:38:32 Is there any mips android device :P? May 11 12:39:00 "First mobile device with MIPS 64-bit processor coming in 2016" May 11 12:39:08 ^^ May 11 12:39:22 and 32 bit? May 11 12:39:56 i don't think there are any phones, just tablets May 11 12:40:14 cheap ones, right? May 11 12:40:23 "The R2000 could be booted either big-endian or little-endian" I can't find the logic here May 11 12:40:46 yoavst: why? May 11 12:40:54 it's pretty normal that you could have switchable endianess May 11 12:41:35 intel is little endian May 11 12:41:49 what kind of file path does the download manager want? May 11 12:41:56 you could also do multiple apks for different cpu architectures May 11 12:42:05 yoavst: because intel evolved from a chip for a crappy 4 bit calculator. What else? May 11 12:42:22 p_l: and what arm is? May 11 12:42:27 danijoo_: will it be a mass? May 11 12:42:37 basically the 4 :p May 11 12:42:38 yoavst: ARM actually started out as a chip and instruction set for a modern computer ;) May 11 12:42:42 maybe strip your .so if you wanted to originally remove few of them because of size May 11 12:43:00 or you could do one for arm, one for intel and mips and so on May 11 12:43:05 depends on you May 11 12:43:24 similarly the ARM architecture was little-endian before version 3 when it became bi-endian May 11 12:43:30 danijoo_: I would drop mips May 11 12:43:47 your choice ;) May 11 12:43:58 this app will be not useful until a MIPS device will arrive :P May 11 12:44:15 libvudroid.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped May 11 12:44:18 oops they are stripped May 11 12:44:23 so nevermind :p May 11 12:44:40 yoavst: yes, but what's the problem with being able to switch endianess? Afaik some arches even allowed processes with different endianess to coexist :) May 11 12:44:59 p_l: they could develop something else on this time May 11 12:45:06 but there is nothing bad with that May 11 12:45:07 anyone can help me out with the download manager? May 11 12:46:10 Adib, a regular file path, it's written in the doc May 11 12:46:15 absolute pathname to the file. The file should be world-readable, so that it can be managed by the Downloads App and any other app that is used to read it (for example, Gallery app to display the file, if the file contents represent a video/image). May 11 12:46:25 yeah i got that working, i accidently forgot to build May 11 12:46:26 Adib, read the docs May 11 12:46:30 ... May 11 12:46:32 however it doesnt seem to start a download May 11 12:46:41 danijoo_: what's about regular arm May 11 12:46:43 not v7a May 11 12:46:49 I mean regular v7 May 11 12:46:50 sorry am running all over the place currently May 11 12:46:59 "armeabi" May 11 12:47:04 yoavst: v7a is pretty much "regular" v7 May 11 12:47:25 armeabi is iirc armv6 or armv5te May 11 12:47:32 p_l: yea I was wrong. May 11 12:47:36 which are old but still many devices are using arm5 May 11 12:47:41 (probably the latter, at least for android, even if pretty much all devices were v6) May 11 12:47:48 I've thought about neon when writing it May 11 12:48:04 adq: I think nearly all pre-v7a devices actually run v6zk May 11 12:48:09 p_l, is this still true if you target high api levels? May 11 12:48:10 could be May 11 12:48:13 like 15? May 11 12:48:22 I've got min of 10 May 11 12:48:25 adq: it's just that when it was specced, it wasn't so sure yet May 11 12:48:32 danijoo_: what do you mean? May 11 12:48:34 yoavst, just why :p May 11 12:48:43 danijoo_: cuz this is app for my school May 11 12:48:59 and I got ppl in my class that got 2.2. so don't talk about 15+ :( May 11 12:49:10 p_l, sorry meant adq :) May 11 12:49:24 yoavst, so your userbase is your class? May 11 12:49:34 I didn't have any problem yet support 10+. Support v7 does most of the ui May 11 12:49:43 danijoo_: it is an app for my school :) May 11 12:49:49 i still don't get why you want to remove an arch, except for size May 11 12:49:56 "Personal commitment" May 11 12:50:02 adq: size :P May 11 12:50:03 it's already so big that remove 4MB will not change a lot May 11 12:50:09 adq, well.. if he supports devices with android 2, size matters :p May 11 12:50:22 there are those shitphones with 200mb space for apps xd May 11 12:50:27 you can also make separated apk based on arch May 11 12:50:37 playstore handles that May 11 12:50:42 that was my first suggestion. he didnt wanted May 11 12:50:55 ....... . . . . >_/o< kwaaäaäk May 11 12:50:55 :p May 11 12:51:03 never support anything below 14 May 11 12:51:05 don't go there May 11 12:51:06 never May 11 12:51:08 again May 11 12:51:08 ever May 11 12:51:13 ^^ May 11 12:51:16 non sense bluecup May 11 12:51:20 yeah. and its not about ui. May 11 12:51:33 danijoo_: I didn't say I don't want it May 11 12:51:38 I've asked if it is a mass May 11 12:51:45 adq why nonsense? May 11 12:51:49 a mass? May 11 12:51:52 a mass of what? May 11 12:51:57 because of https://developer.android.com/about/dashboards/index.html May 11 12:52:03 4 isnt a mass, 1000 is a mass May 11 12:52:21 If it requires a lot of additional work May 11 12:52:30 oh. you mean mess :p May 11 12:52:31 no. May 11 12:52:32 6% market share ain't worth the troube May 11 12:52:41 its actually just for different build flavours and 4 clicks May 11 12:52:50 yeah but that's global, depending the category of the app May 11 12:52:51 adq: the minute I've got a problem with compatibility I'll drop it. but currently it works, so... May 11 12:52:52 some of these phones still have android market instead of google play May 11 12:52:58 you will be surprised to see how these values fluctuates May 11 12:53:00 and don't update services at all May 11 12:53:02 and it's only reflecting the playstore May 11 12:53:17 danijoo_: and you upload the folder to play? May 11 12:53:31 yoavst, read the article about multiple apks May 11 12:53:44 it got linked here 3 times since the discussion started May 11 12:54:11 danijoo_: can gradle handle it? May 11 12:54:19 adq 99% of developers i know dropped <14 support May 11 12:54:23 and its not about compatibility < api 15. its anout stupid bugs in the sdk that will never get fixed May 11 12:54:32 and unconsistant behaviour May 11 12:54:39 yoavst, again: read the link :p May 11 12:54:51 bluecup, ok ok, maybe i was to harsh with "non sense" May 11 12:55:07 danijoo_: cannot see a link :P May 11 12:55:08 just that it depends on your users (potential) base, mainly May 11 12:55:15 and i agree with the later the better May 11 12:55:32 well if its for a small user group (his school), and he knows there are a lot of shitphones arround May 11 12:55:37 it makes sense to do this then May 11 12:56:04 and about 2.3. If my app works there, min sdk will be 10. If it doesn't minsdk 15 May 11 12:56:15 oh well yeah, if you're developing something for underdeveloped countries or eastern eastern europe specifically, 2.3 might serve something May 11 12:56:21 the problem is the grey area May 11 12:56:30 there is this "works sometimes" zone :D May 11 12:56:52 danijoo_: http://developer.android.com/google/play/publishing/multiple-apks.html#CreatingApks I can't see anything about gradle there May 11 12:57:18 This is based on the native libraries included in each APK (which are determined by the architectures you declare in the Application.mk file) when using the Android NDK. May 11 12:57:21 yoavst, google build flavours May 11 12:57:33 does this look correct? http://hastebin.com/fihaxuxono.avrasm May 11 12:57:50 http://realm.io/news/reducing-apk-size-native-libraries/ May 11 12:59:06 "Unfortunately this feature doesn’t work when the native libraries are bundled in a jar file," <- so it should be ok May 11 12:59:16 and note the article is so deprecated that it talks about eclipse May 11 12:59:48 Our distribution package (available on our website under Download->Java) contains a folder called ‘eclipse’ May 11 13:00:02 it is new article actually May 11 13:00:08 Feb 16, 2015 May 11 13:00:51 then its an outdated dev :D May 11 13:01:22 but the guide looks good May 11 13:01:25 id follow that May 11 13:01:29 yeah May 11 13:01:56 danijoo_: it is by realm May 11 13:02:11 Warning:Packaging for dependency com.joanzapata.pdfview:android-pdfview:1.0.2 is 'apklib' and is not supported. Only 'aar' libraries are supported. May 11 13:02:12 crap May 11 13:02:19 btw, supporting api version v15 will further reduce your apk size :PP May 11 13:02:38 danijoo_: if appcompat v7 will be appcompat v15, than yes May 11 13:02:41 then* May 11 13:03:21 depending on the app you dont need v7 May 11 13:03:35 or any support library May 11 13:03:55 support v7 is needed for most of the app that doesn't have minsdk v21 May 11 13:04:09 not true May 11 13:04:28 that highly depends on the features May 11 13:05:03 Most of apps have a toolbar May 11 13:05:07 and depending on what features of appcompat you are using, you can further reduce this May 11 13:05:25 for example you can still do a lot without toolbar May 11 13:05:37 or use native fragments May 11 13:05:49 and then decrease the size of appcompat library May 11 13:06:08 danijoo_: they should create v7 with native fragment May 11 13:06:14 because v7 is depends on v4 May 11 13:06:55 Does anybody here know any resources that helped you out greatly with android development? A specific book, article? May 11 13:07:18 fragments where introduced in api level 11, this is why v7 has fragments in it May 11 13:07:31 android-dev292, the documentation on d.android.com :) May 11 13:07:52 nice May 11 13:07:57 danijoo_: so v11 ;) May 11 13:08:14 I just got a local notification with the title "Uninstall this app immediately" and a message with the title of the app in question May 11 13:08:26 upon pressing, I am told that the app is probably spying on me May 11 13:08:30 yoavst, literally noone uses api level 10-15 May 11 13:08:59 any idea why this would happen? I don't think it's a permissions issue as Android is not aware of whether you made use of the permissions you requested or not May 11 13:09:22 Odaym, I would be more concerend about what on your phone checks your installed apks and sends this messages :D May 11 13:09:36 or does it come direcly from google play? May 11 13:09:48 oh sorry not local, it was from google play May 11 13:10:06 Odaym, maybe the app got banned from playstore because of being malicious May 11 13:10:16 and google sends the message to every phone that has it installed May 11 13:10:24 it's the app they brought me here to fix, its older variant May 11 13:10:34 yea Im checking now, it's no longer on the store May 11 13:10:49 you think it might be old SSL bug? May 11 13:11:11 how should i know May 11 13:11:16 danijoo_: so v15... May 11 13:11:20 you're danijoo May 11 13:11:20 it could also be the app trying to make your app explode May 11 13:11:21 wtf May 11 13:11:27 yoavst, you mean like appcompat v13? :p May 11 13:11:31 yea ;) May 11 13:11:58 this one exists yoavst May 11 13:12:09 not May 11 13:12:15 https://developer.android.com/reference/android/support/v13/app/package-summary.html May 11 13:12:43 well its not a replacement for v7. May 11 13:12:49 but theres no point for that anyways May 11 13:13:16 if you dont want to use v7 fragments, just dont use them and remove unneeded stuff with proguard May 11 13:13:31 proguard makes a huge difference in apk size May 11 13:14:03 if the libraries you're using supply a means of telling proguard not to remove their code! May 11 13:14:23 Odaym, ? May 11 13:14:31 proguard removes everything thats not used May 11 13:14:43 that's not my experience, I had crashes because of removed code May 11 13:15:00 when you add the line that you're supposed to add in build.gradle, the code is kept and the functionality is back May 11 13:15:04 Odaym, then its your proguard configuration that was wrong :) May 11 13:15:06 yes May 11 13:15:10 not saying different May 11 13:15:40 but always progaurd conf is wrong May 11 13:15:47 lol May 11 13:15:53 guard* May 11 13:16:03 thats your fault then lol May 11 13:16:37 no honestly I was looking for that line for some of the libraries that got hurt May 11 13:16:51 can't I myself write that line given the package name? May 11 13:17:04 you usually can find proguard configs for every lib on the libs github May 11 13:17:08 if its a well known lib May 11 13:17:17 and its also not that hard to write those configs May 11 13:17:25 ofc you have to test your stuff May 11 13:17:30 it's just a matter of specifying which classes to exempt May 11 13:17:35 yep May 11 13:17:58 its just writing some unit tests, and then altering proguard until everything works May 11 13:18:09 still don't know testing May 11 13:18:11 lel May 11 13:23:58 Can someone help me out with sensors: 3-axis Magnetic field sensor (what is this) ? Orientation sensor what is this ? Proximity sensor is NFC right ? and Geomagnetic rotation vector sensor is the compass ? May 11 13:24:45 http://developer.android.com/guide/topics/sensors/sensors_overview.html#sensors-intro May 11 13:42:25 my animation has sharp / jagged edges May 11 13:42:35 any way to smooth it out a bit? I'm doing a simple rotate May 11 13:43:13 link to the animation definition May 11 13:43:23 are doing any other UI operations at the same time? May 11 13:43:30 http://pastie.org/private/aoxy1qvmk80esi951jcy6w May 11 13:43:32 no May 11 13:43:47 It's meant to simulate a shake/buzz May 11 13:43:49 on a tile May 11 13:44:13 I am thinking that perhaps reducing the pivot will improve it a bit. May 11 13:44:29 50ms is a very short time May 11 13:44:34 barely noticable May 11 13:44:45 hence the 'buzz' simulation :P May 11 13:44:54 less than 3 frames May 11 13:44:58 try maing it slower May 11 13:45:04 *making May 11 13:45:08 *longer May 11 13:45:45 looks the same, just slower, there's a ribbon attached to the tile which is just a thick vertical line May 11 13:45:51 the edges of the line become very jagged May 11 13:45:55 perhaps it can't be helped though May 11 13:48:14 it's because it always jumps to the initial position May 11 13:48:21 because it's infinite May 11 13:48:29 it reverses back to the initial position May 11 13:48:34 and then starts again May 11 13:48:39 it jumps back May 11 13:48:42 not animates May 11 13:48:51 I'm looking at it right now :P May 11 13:49:55 try having an infinite AnimationSet May 11 13:57:28 hi serbs May 11 13:57:29 http://stackoverflow.com/questions/30169575/resttemplate-in-spring-android-causing-app-to-crash May 11 13:57:33 help a brother May 11 13:57:35 would ya? May 11 13:58:36 anyone familiar with using the authenticator? I have an app that launches to a MainActivity, and checks for an account in the Authenticator. If it can't find an account, it calls addAccount on the authenticator to launch the login activity May 11 13:59:36 I have a couple problems, though May 11 13:59:52 help a brother shekibobo May 11 14:00:21 if the user removes the account from the accounts setting screen, I can get back into the MainActivity without it requesting for authentication May 11 14:00:47 the seemingly reasonable solution for this is to check for the account in onResume() May 11 14:01:05 restart the app brother May 11 14:01:15 restart thine initial activity and call finish May 11 14:01:19 you'll be aight May 11 14:02:07 restart when? May 11 14:02:59 if I do the check for account in onResume, I have the issue that backing out of the login screen back to MainActivity will relaunch the LoginActivity instead of just closing May 11 14:03:44 I guess what I want is if you back out of the login screen without an account available, it closes the whole app... May 11 14:04:06 as in, don't even go back to the MainActivity May 11 14:04:31 https://gist.github.com/anonymous/51df71efc3f65f0a593c Can someone help me why I'm not getting any info from Accelerometer. My device does have the sensor but I'm getting no info from SensorEventListener May 11 14:04:59 shekibobo: Why are you using onResume for this? May 11 14:05:12 I'm not currently May 11 14:05:27 right now MainActivity uses onCreate to check for an account May 11 14:06:02 but that means if the account is removed after you've been in the app, and you start it again without killing it, it doesn't check for an account when you reopen it May 11 14:06:03 Okay. What's the problem? I just got here and missed some of what you said. May 11 14:06:29 Hello May 11 14:06:43 I'm just wondering if there's a best practice for when to check for an account using an authenticator May 11 14:06:49 I've discovered I can't put a ToggleButton into an Appwidget because Appwidgets support only some widgets May 11 14:07:06 but google uses a set of power control widgets for homescreen, and I don't understand how they do May 11 14:07:22 Has anyone any ideas how transforming Buttons or Imagebuttons into ToggleButtons? May 11 14:07:39 right now I'm using MainActivity.onCreate() -> Authenticator.addAccount() -> LoginActivity May 11 14:08:49 hi May 11 14:08:53 05-11 09:33:38.779 1654-1654/? E/WindowManager﹕ android.view.WindowLeaked: Activity my.crashable.app.MainActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{b1f65a30 V.E..... R......D 0,0-684,365} that was originally added here May 11 14:08:53 at android.view.ViewRootImpl.(ViewRootImpl.java:348) May 11 14:08:53 at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:248) May 11 14:08:53 at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69) May 11 14:08:53 at android.app.Dialog.show(Dialog.java:286) May 11 14:08:54 at my.crashable.app.MainActivity$WorkerTask.onPreExecute(MainActivity.java:141) May 11 14:08:54 at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:587) May 11 14:08:55 at android.os.AsyncTask.execute(AsyncTask.java:535) May 11 14:08:55 at my.crashable.app.MainActivity$1.onClick(MainActivity.java:72) May 11 14:08:56 at android.view.View.performClick(View.java:4438) May 11 14:08:56 at android.view.View$PerformClick.run(View.java:18422) May 11 14:08:57 at android.os.Handler.handleCallback(Handler.java:733) May 11 14:09:10 #logcat lol May 11 14:09:11 I thought I had my STO link in my clipboard May 11 14:09:16 what I'd like to happen is if you back out of the login activity without an account, it kills the MainActivity instead of trying to return to it and calling onResume(), since onResume() seems like the best place to put the Authenticator check May 11 14:09:24 Duvdevan, http://pastebin.com/ May 11 14:09:32 sorry, I didn't mean to paste that May 11 14:09:42 this I wanted to paste at: http://stackoverflow.com/questions/30169575/resttemplate-in-spring-android-causing-app-to-crash May 11 14:09:49 cristian_c, guess the most obvious thing is an ImageButton with a different image depending on the state to simulate a ToggleButton May 11 14:10:05 Or a normal Button with different text on/off May 11 14:10:20 VnM, with no text May 11 14:10:52 Well then an ImageButton and set a different drawable May 11 14:10:54 shekibobo: Doesn't startActivityForResult, setResult(RESULT_CANCEL), and onActivityResult solve this? May 11 14:11:07 VnM, for example: https://motorola-global-eng.custhelp.com/rnt/rnw/img/enduser/droidxpowerwidget.jpg May 11 14:11:07 RESULT_CANCELED* May 11 14:11:38 VnM, I know a toggle widget contains a picture + light indicator May 11 14:12:16 VnM, I've looked at google sources, but I've not found the related stuff May 11 14:12:56 they use these toggle widgets, but they not provide api to use them May 11 14:13:09 *APIs May 11 14:13:40 Note that onActivityResult is called before onResume. May 11 14:13:51 Anyone able to help ? May 11 14:13:55 VnM, previously, I've created a togglebutton in /layout/widget.xml May 11 14:14:25 and then i've created some xml files in /drawable directory May 11 14:15:12 Personally I haven't worked with widgets before but I assume you have a layout or some reference to the elements in the widget and you can just change them in your onClick or Touch methods, so along with your code you're firing also call .setBackgroundResource() or w/e May 11 14:15:56 finally, I've put .png pictures in drawable directories (toggle on and toggle off pictures). Theay are similar, toggle off pictures has got a low opacity rate , anyway May 11 14:16:52 VnM, I understand, but at first I should build the widget starting from Button or ImageButton May 11 14:17:21 so, I'm looking for an example about ensembling these piesces May 11 14:17:26 *pieces May 11 14:18:51 TacticalJoke: I'll look into that. I'm not sure, but I think part of the problem is that MainActivity doesn't call startActivityForResult() - I think it's done by the authenticator May 11 14:18:54 VnM, then, I can connect widget by input events, but first I've to build the widget May 11 14:20:25 VnM, so, it's not easy figure out combine /values/styles.xml, layout xml file and drawable xml files between them May 11 14:20:35 consider i've to implement light indicator too May 11 14:21:08 I don't understand why google doesn't release these APIs publicly May 11 14:23:23 i just found out how to increase the android version number with gradle. but when do i do it? the actual release is build on the build server, but the build server shouldn't push anything back to git.. May 11 14:25:02 cristian_c, combining the bunch shouldn't be difficult, you can just use @drawable, @style and @id in the xml files for those type of things unless I am understanding you wrong May 11 14:26:43 VnM, you are right, but, for example, how can i implement light indicator in the Button/Imagebutton? May 11 14:27:10 http://developer.android.com/guide/topics/ui/controls/togglebutton.html May 11 14:27:51 Just make the light indicator part of the image? May 11 14:28:12 VnM, I can reference widgets in layout/widget.xml directory, but then... May 11 14:28:36 were are you Android Commandos, AndroForces and Black Ops of Java? May 11 14:28:38 http://stackoverflow.com/questions/30169575/resttemplate-in-spring-android-causing-app-to-crash May 11 14:28:42 help a brother May 11 14:28:43 :) May 11 14:28:47 if I have an inject defined in a superclass, and I inject in a subclass, will the injection defined in the superclass get injected? (Dagger 2) May 11 14:28:58 VnM, so , have I to create a fresh .png for light indicator? May 11 14:29:07 or do I have to inject twice? May 11 14:29:20 and reduce its opacity to create an off light indicator? May 11 14:31:36 shekibobo: yes May 11 14:31:58 JakeWharton: to which? May 11 14:32:26 First May 11 14:32:35 hmm May 11 14:33:02 VnM, if yes, have i to combine more .png in the widget? May 11 14:33:07 *into May 11 14:33:10 ahh, dammit, I'm dumb May 11 14:33:45 I'm not actually injecting in that activity yet... May 11 14:34:45 http://stackoverflow.com/questions/30169575/resttemplate-in-spring-android-causing-app-to-crash May 11 14:34:48 please May 11 14:34:58 cristian_c, I think you're making it more difficult for yourself than needed, this is what I mean http://i.imgur.com/GOpPHcn.png May 11 14:35:00 you shall be welcome in my kingdom May 11 14:36:37 ok May 11 14:37:06 VnM, now, I've understood May 11 14:46:56 Hi. Does anyone happen to know where stored VPN credentials are likely to be? find / -name *vpn* is not particularly informative. 5.1 (CM, but I don't htink that matters?) May 11 14:47:33 probably some database then May 11 14:48:58 holy crap, Stetho is awesome May 11 14:51:52 wakelock: ah, yeah guess so, alright let's see if I can figure out which one of these probably has them. Thanks. May 11 15:03:53 Hi, so I have a SensorEventListener that Does Certain Things (say, it sets a variable to 1 if it receives a heading event, 0 otherwise). What is the proper way to unit test it - i.e. feeding it some "fake" events and checking the result? May 11 15:05:12 t0by create a mock of whatever class receives the fake events and verify if they were invoked May 11 15:05:27 bluecup, sure, but how do I feed fake events to the thing? May 11 15:05:52 Isn't there a high level something to do it? May 11 15:08:30 you're the one to make the high level something May 11 15:08:39 oooh it's a sensor event listener May 11 15:09:06 i'm assuming it doesn't have a public constructor or smthn? May 11 15:09:48 bluecup, uh, yes. May 11 15:10:06 I mean May 11 15:10:10 so that we're on the same page May 11 15:10:23 split sensor handler into data fetching and data processing, make data fetching trivial (so it doesn't need testing), then test the data processing by feeing it test values May 11 15:10:26 simple May 11 15:10:30 you mean that the only way I have to do this is calling onSensorChanged on the thing May 11 15:10:38 by hand? May 11 15:10:45 Not that I'm not fine with it May 11 15:11:05 wakelock is right, you should test your logic totally seperated from the sensor event May 11 15:11:06 but I hoped there was a way of feeding it a recording of some events. May 11 15:11:22 wavelock, bluecup, I see. May 11 15:11:26 there is a way to mock events using mockito and reflection and there is a mocking library May 11 15:11:35 but it's smelly May 11 15:11:35 Oh, mockito, eh? May 11 15:11:41 Eh. May 11 15:11:53 rather listen to wakelock and seperate your logic from SensorEvent May 11 15:30:09 bonjour May 11 15:31:21 je cherche quelq'un qui pourrais m'aider à finaliser l'intégration d'opencv avec Qt pour dev android May 11 15:33:10 Hi, I'm looking for someone who can help me to integrate opencv in Qt May 11 15:34:18 only english in here :) May 11 15:34:44 "looking for someone" is not acceptable here, this is not a helpdesk or a one-on-one tutoring channel May 11 15:34:46 okay, so you can help me please ? May 11 15:36:05 in Qt? May 11 15:36:09 this is #android-dev May 11 15:37:55 yes, you can develop for android with Qt in c++ May 11 15:40:40 anybody using an lg g3? Can't get our QA device to show a debugging key pop up May 11 15:40:46 so it just continually shows up as offline May 11 15:40:49 in adb devices May 11 15:41:02 is there some way to show install progress when loading an app onto an android phone from AS? May 11 15:41:25 no May 11 15:41:34 :( May 11 15:42:03 so much of my dev time is wasted on waiting for this stupid app to install, wondering what the hell is blocking it May 11 15:43:52 shekibobo, its just a slow process (especially when using android 5) May 11 15:44:01 there is nothing blocking it usually May 11 15:47:04 ... May 11 15:47:20 hello May 11 15:47:41 developer support s....... .s u_u' May 11 15:47:57 is sweet, I wanna mean May 11 15:48:38 danijoo: you were right, I'd need luck to get my NGO app accepted May 11 15:48:56 and I've not May 11 15:49:07 There wouldn't happen to be a nice list somewhere of current Android devices with 64-bit arch would there? May 11 15:49:20 Not finding anything that isn't just ads May 11 15:54:18 Sorry, I am really puzzled here. How do I instantiate a new SensorEvent (for testing purpouses) since the class apparently has... no constructor? May 11 15:56:24 t0by using the SensorManager May 11 15:56:45 registering listeners on it for the sensor you want to listen to May 11 15:58:18 Afzal, um... how? May 11 15:58:22 I mean May 11 15:58:30 I see that I can register observers in there May 11 15:58:43 but I don't think I can tell SensorManger to spit out an event. May 11 15:58:43 what's the problem then? May 11 15:58:50 Afzal, that I'm unit testing May 11 15:59:02 on a device I hope May 11 15:59:06 Afzal, nope. May 11 15:59:13 lol then there's your problem May 11 15:59:25 how do you hope to get sensor events without an accelerometer? May 11 15:59:29 have you mocked anything? May 11 16:00:06 Afzal, that's exactly what I am trying to do. Stitching together a test driver. May 11 16:00:24 Apparently, though, Robolectric has a shadowEventThingy that does exactly what I need. May 11 16:00:45 well you need to mock SensorEventListener and return a value in onSensorChanged May 11 16:00:57 I don't use robolectric May 11 16:06:43 Why don't people use a CircularArray/ArrayDeque implementation that does get O(1) and set O(1) May 11 16:07:58 something like this: https://gist.github.com/AfzalivE/32592a48c96a9e5d7c3c May 11 16:12:33 lord @ gradle migration May 11 16:17:27 ThinThread isn't that difficult :p May 11 16:18:05 i had a documented procedure that worked, now it doesnt. thanks. May 11 16:20:42 Afzal, I don't get your complaint, where did you find circulararray implem with access bigger than O(1)? cause the main issue with circulararray is add and remove element May 11 16:21:28 adq in CircularArray, prepend/append is O(1) https://developer.android.com/reference/android/support/v4/util/CircularArray.html May 11 16:22:11 and if you see the linked gist, the set method in there should be O(1) but I've only written the three tests for it (at the end) May 11 16:23:10 yes i see the set method, it's indeed O(1) -> mElements[(mHead + n) & mCapacityBitmask] = e; May 11 16:23:36 plus my implementation doesn't allow null, google's does. I guess that's a big difference depending on the needs May 11 16:23:53 now i need to find the set method not in O(1) May 11 16:24:03 to answer my own question lol May 11 16:24:55 those docs should really says "average case O(1)" May 11 16:25:59 as is its literally contradictory, since O() means upper bound, ie of worst case. cant be O(1) when "automatically grows" May 11 16:26:11 yeah i assume it's often worst case May 11 16:27:09 ThinThread is that because of the doubleCapacity call? May 11 16:27:42 https://developer.android.com/reference/android/support/v4/util/CircularArray.html lol there is no set May 11 16:27:56 i guess you use get(n) = value to set it May 11 16:28:02 which is very close to O(1) too May 11 16:28:14 (if get(n) is O(1)) May 11 16:28:23 right. i dont know much about android im just speaking theoreatically. but a double capacity would be O(N) May 11 16:28:25 haha pretty much, get is return mElements[(mHead + n) & mCapacityBitmask]; May 11 16:28:30 set is mElements[(mHead + n) & mCapacityBitmask] = e; May 11 16:28:32 lol May 11 16:28:35 i see May 11 16:28:54 yeah you're right about that. Well I guess if you know the length then those are fine May 11 16:28:59 anyway it's good ppl work on that :) May 11 16:29:05 kudos Afzal May 11 16:38:19 any way to set an onclick listener for a view and its children May 11 16:38:40 I want the view and any children views to do the same thing, almost as if they were all the same thing. May 11 16:39:39 then just set the click listener on the parent, and make sure you don't have children views that intercept clicks May 11 16:40:09 canvs2321: they don't May 11 16:40:12 but it doesn't seem to work May 11 16:40:46 tx: people are going to need to see code. they can't make it work by guessing May 11 16:40:53 canvs2321: never mind May 11 16:41:01 I was using an IconButton instead of an IconTextView May 11 16:41:02 :c May 11 16:41:07 :) May 11 16:53:43 ThinThread: Big Theta May 11 16:54:11 is tightly bound average case May 11 17:14:42 need more RAM :( 16GB is not enough May 11 17:15:31 yiati, Im currently on 8 :( May 11 17:15:45 64k should be enough for anyone May 11 17:15:52 Can't wait for x99 boards, think I might get 32-64GB board. Then I can have genymotion, AS, xcode, ios simulator, chrome, etc. all up without my computer getting crushed May 11 17:16:30 i imported my eclipse directroy structure into android studio, but how to i cause it to export gradle files? May 11 17:16:30 or you could do one thing at a time :P May 11 17:16:57 how is 16GB RAM not enough...? May 11 17:17:01 that's insane May 11 17:19:40 yiati what is an x99 board ? May 11 17:19:54 oh nm May 11 17:20:01 99x faster than others! May 11 17:20:08 it's a normal board, times 99 May 11 17:20:15 "99 bottles of beer on the wall..." May 11 17:21:20 Or h99 I guess since I don't care to overclock, just waiting until the new intel 1150 socket comes out May 11 17:21:49 getting beefier hardware is not the answer May 11 17:21:55 being more realistic and reasonable probably is May 11 17:22:49 s/1150/1151/ May 11 17:23:45 wakelock: Eh, I feel like working with the software I'm working with is realistic. I'm not always maxing out, but I do ocassionally, and I would like to be able to get through it May 11 17:24:02 plus ram is cheapish May 11 17:24:05 yiati, get a cluster ! May 11 17:24:43 👍 May 11 17:25:32 http://clusterfie.epn.edu.ec/clusters/Images/clusters.gif May 11 17:25:37 Hey all. I know this is entirely bad practice and I'm only doing it for educational reasons; however: Is there a way I can have NetworkOnMainTheadError not be thrown? May 11 17:25:59 no? May 11 17:26:04 tjbiddle: https://developer.android.com/reference/android/os/StrictMode.html May 11 17:27:16 wth is a "mini-computer" (and why is it bigger than a PC?) May 11 17:27:54 http://en.wikipedia.org/wiki/Minicomputer May 11 17:28:38 SimonVT: Neat! Works :-) (And locks UI thread noticeably :p) Thanks! May 11 17:28:38 Anyone know the most efficient way to write a request interceptor to copy the body of a json response in a retrofit call? May 11 17:28:48 can't May 11 17:28:54 no access to body May 11 17:29:06 i mean from the stream May 11 17:29:20 since you were horrified by String what = new String(response.body().bytes()); May 11 17:29:53 is copying the ok http response and then using okio buffer read the is copy and write out utf8 any better?? May 11 17:30:09 "a machine costing less than 25,000 USD" there you go JesusFreke :p May 11 17:30:49 wakelock: yeah, I googled and answered my own question :p May 11 17:35:45 I have a gridview with a viewflipper on each item May 11 17:35:59 there are a lot of items, and when I scroll down, sometimes if one item has it's view flipped May 11 17:36:13 another one will also have it's view flipped further down (not done by the user) May 11 17:36:24 how can I ensure this doesn't happen when I have a lot of items May 11 17:39:04 you using converview? May 11 17:39:39 you have to keep track of positions of flipped ones, and in your getview set flipped to flip and non-flipped to non flipped May 11 17:39:59 keep track? as in make an array or what? May 11 17:39:59 :P May 11 17:40:02 since for instance, if you are using converview for view position 2 which was flipped, and that same convertview is used for position 12, then it will be flipped May 11 17:40:10 arraydeque May 11 17:40:19 sure array is fine May 11 17:40:30 but that is the idea of why it is happenning, you can fix it however May 11 17:40:33 yeah, I was being general. :p May 11 17:40:37 ok, thanks. May 11 17:40:50 lasserix_: it was interesting because that was the _only_ thing that wasn't being changed May 11 17:40:58 other layout changes were being made fine May 11 17:41:26 lasserix_: just realized also that only one can be flipped at a time May 11 17:41:29 so I just need an int ;) May 11 17:47:02 lasserix_: My flip has an animation May 11 17:47:07 screw everything the youtube api stands for May 11 17:47:13 so you can see it animate back to what it should be when I scroll down :P May 11 17:47:32 I'll do it before the animation set. May 11 17:49:34 <_genuser_> yo people. May 11 17:56:17 Hi. Whats the easiest way to convert my list-based master-detail-flow app to have two items on a row? two items as in two columns, but one scroller. Like a gridview really. May 11 17:57:04 http://stackoverflow.com/questions/24795079/error1-0-plugin-with-id-com-android-application-not-found May 11 17:57:05 blah May 11 17:59:07 I've got an app with a two-pane UI, when run on a tablet. See MainActivity and DetailActivity here: http://bit.ly/1EtPXVM If DetailFragment.onLoadFinished() get an empty cursor, I want to hide/remove the "photo_detail_container" pane. I tried doing getActivity().getSupportFragmentManager().beginTransaction().hide(this).commit(); from inside onLoadFinished(), but that's apparently not allowed. May 11 17:59:51 java.lang.IllegalStateException: Can not perform this action inside of onLoadFinished May 11 18:00:26 has to be done "outside" the fragment, perhaps? But where (please see my code)? In MainActivity or DetailActivity? May 11 18:04:50 did they just change the gradle syntax a few days ago? May 11 18:05:09 no May 11 18:05:27 not that i know May 11 18:06:43 do you do apply plugin: 'com.android.application' in your build.gradle? May 11 18:06:54 yes May 11 18:07:14 if you gradle file is not working, create an empty project and copy its gradle May 11 18:07:19 this should fix your problems May 11 18:07:36 what about apply plugin: 'android' ? May 11 18:07:57 maybe. I dont have it in my head May 11 18:08:22 im seeing examples of both, dont understand difference. i think it maybe just changed May 11 18:08:28 joakimk_: a Udacity student :) May 11 18:08:31 hehe May 11 18:08:52 joakimk_: onLoadFinished can be called when activity is not yet attached May 11 18:08:52 at least working on my own app now May 11 18:08:52 if i need a custom 9-patch background for a control, but want to keep the tinting from colorAccent, do i need two 9-patch images for default/activated or just the default image? May 11 18:09:51 is there anywhere online I can find the list of supported picture resolutions that should be returned from getSupportedPictureSizes? May 11 18:10:04 joakimk_: so try settings a flag in onLoadFinished and then check that flag in onActivityAttached May 11 18:10:24 like on a moto x first gen, I am logging all of the possible picture sizes that it suggests, and the highest 4:3 size is 640/480 May 11 18:10:51 which is pretty grainy. and I can see on the default camera that you can take 4:3 pictures with pretty good resolution (not 640/480) May 11 18:10:57 so it must be capable of more May 11 18:11:08 onActivityAttached(). I see. Haven't implemented that yet. But what's the proper way to "hide" a fragment? I essentially want to collapse the two-pane UI into single pane, leaving only the PhotoFragment May 11 18:11:15 but I would love to see a list of what it should be returning May 11 18:11:18 maybe "hide", or detach? Remove? May 11 18:12:55 joakimk_, remove May 11 18:13:03 thanks May 11 18:13:37 icedp: Can't see that onActivityAttached() is something I can implement, in neither fragment nor activity. (it's not listed in Ctrl-O) May 11 18:14:00 do you maybe mean onActivityCreated? May 11 18:14:09 joakimk_: sorry *Created yeah May 11 18:14:14 right! May 11 18:14:15 theres onAttached and onActivityCreated :) May 11 18:15:19 https://github.com/xxv/android-lifecycle/blob/master/complete_android_fragment_lifecycle.png May 11 18:15:29 every dev should have that printed out on his workspace :p May 11 18:16:42 ug android is by far the most problematic platform i code for May 11 18:16:55 iphone is so much easier May 11 18:18:16 can not touch iphone tree for years, install latest xcode, and low and behold binaries and packages produced May 11 18:18:59 same goes for android. May 11 18:19:13 that is not my experience May 11 18:19:23 ThinThread: don't know http://blog.gqueues.com/2013/07/android-vs-ios-comparing-development.html May 11 18:20:34 article comparing relative maintenance costs would be interesting May 11 18:20:45 ThinThread, did you change from elipse to AS or somethign? May 11 18:20:50 If I wanted to create an android tether application, basically a clockwork mod tether clone, what android technologies would I need to use? (Clockwork mod tether uses debug mode on the android device through usb and somehow forwards the connection to the local computer that is running a nodejs tun/tap server to provide the network connection) May 11 18:21:10 I guess I am wondering how could I forward mobile network connections through usb May 11 18:21:53 yeah im trying to. or to use ant or gradle. May 11 18:22:05 dna113p: http://developer.android.com/tools/devices/emulator.html#redirection May 11 18:23:17 icedp: but actvitycreated is invoked *before* onloadfinished... May 11 18:23:43 yiati: thanks :) May 11 18:23:47 so my flag is set, in onloadfinished, but then it's "too late" :-) May 11 18:24:04 ThinThread, So your problem is that you switched build tools and not android itself :) May 11 18:26:45 I'm trying to implement cert pinning on Android, is there a way to make sure that the bks certificate is valid? May 11 18:27:18 huh, the i/o sessions are only 30 minutes now ? May 11 18:27:23 next year, 20 minutes May 11 18:29:59 hey everybody! i ahve the following problem: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.SearchView.setOnQueryTextListener May 11 18:30:09 any "quick help" on this? May 11 18:31:07 http://pastie.org/10183006 it appears on line 6 May 11 18:31:32 styler2go, are you using appcompat? May 11 18:31:47 i don't know what it is so i guess no :) May 11 18:32:19 joakimk_: ok ok, I think you need to use handler then =) May 11 18:32:19 post your menu xml file May 11 18:32:37 xml file: http://pastie.org/10183007 May 11 18:32:55 i used ActionBarSherlock before and just removed it yesterday May 11 18:33:04 there is no searchview in your xml May 11 18:33:20 thats why getActionView() returns null May 11 18:33:37 but there's the id menu_search May 11 18:34:00 read the docs about menus May 11 18:34:09 ok May 11 18:34:12 you need to tell the item that it is a searchview May 11 18:34:18 atm you only have an icon May 11 18:34:32 i wonder why this worked in ActionBarSherlock then :D May 11 18:34:49 ActionBarSherlock for life! May 11 18:34:54 :D May 11 18:35:14 do you still use it Jake? May 11 18:35:23 not in 3+ years May 11 18:35:28 :p May 11 18:35:28 er, 2+ May 11 18:35:40 so basically since there is the appcompat version of actionbar May 11 18:36:40 yeah my app was very depricated an di am currently refreshing it to bring it back alive May 11 18:36:58 :) May 11 18:37:08 works like a charm now, thank you danijoo :) May 11 18:38:14 One more question: Is it possible to use the material theme (@android:style/Theme.Material) and still have downwards compatibility? May 11 18:38:34 AppCompat 21+ is material May 11 18:38:37 styler2go, you must use support library for that May 11 18:39:18 can someone tell me where i can find the database with the phonebook on a running android phone? I have a strange problem and miss my phonebook in most apps but can see it in the default dialer May 11 18:39:20 thje simple support-library-v7? May 11 18:40:23 styler2go, http://android-developers.blogspot.de/2014/10/appcompat-v21-material-design-for-pre.html May 11 18:40:38 thank you May 11 18:41:09 ABS has been making a comeback in here lately. May 11 18:41:21 lol why? May 11 18:41:26 phmis: http://developer.android.com/training/contacts-provider/index.html May 11 18:43:30 TacticalJoke, but only for people removing it :p May 11 18:45:12 shuld be a good thing i guess :D May 11 18:46:16 abs was awesome when it came out May 11 18:46:21 and it still is. :) May 11 18:46:37 but you should use native implementations if they are available :) May 11 18:47:56 yiati: thats the normal api to access the contacts. i want to know where i can find the raw database May 11 18:48:11 in /data May 11 18:49:04 phmis: If you dig into those apis it tells you the uri May 11 18:49:22 ^ May 11 18:51:23 yiati: i solved the problem on an other way. after you delete the google account from a phone, dont add it directly again, first reboot and add it then back May 11 18:55:55 why does Dribbble put random notifications on the wear device :s May 11 18:56:11 Droidddle** May 11 18:57:14 i dont even know what this is May 11 19:03:20 updating AS is so seamless May 11 19:05:42 not sure if Odaym is being sarcastic ... May 11 19:06:00 ^^ May 11 19:07:01 I wrote a custom Interceptor for OkHttpClient and want to get a hold of the data being passed to the server. For instance, posting form data. I want to get a hold of the data and do some stuff with it before passing it on. I am able to get a hold of the Request object by doing chain.request(), but I can't seem to find how to get a hold of the data itself. May 11 19:07:02 no man, I was on Canary and at work I remembered that 1.2 was out, came home and refused the Canary update, switched channels and got the Stable May 11 19:07:16 same configs, as if nothing ever was May 11 19:07:26 lol May 11 19:07:29 only vmoptions for ram increase gets reset, but you get notified about it May 11 19:07:55 I'm using Gson btw, and executing a POST request that way May 11 19:08:29 Interceptor May 11 19:08:38 Infiltrator class May 11 19:08:45 ReverseEngineerer May 11 19:10:13 some guy recommended I read "HeadFirst Design Patterns" May 11 19:10:27 upon checking it out I feel that it's like a higher version of the For Dummies series? May 11 19:10:35 what mediocrity May 11 19:10:54 * wakelock thinks Odaym is high May 11 19:11:25 dragorn https://copperhead.co/2015/05/11/aslr-android-zygote May 11 19:11:32 man, you are diamond sharp May 11 19:11:35 wow May 11 19:11:45 "The atypical design of Android platform has also introduced weaknesses that aren’t present in traditional distributions, and addressing some of them means reversing performance and memory usage optimizations to some extent." :( May 11 19:11:53 kudos May 11 19:12:23 g00s, interesting. I haven't looked at that stuff, I'll have to take a read May 11 19:14:26 <_genuser_> anyboy else on lollipop already? May 11 19:14:36 20% May 11 19:14:38 what happens when you have your own Base Activity that you take care of everything inside and then you get a Settings Activity where you have to extend Preference Activity? May 11 19:14:40 Odaym: How do I get a hold of the data being passed in a Request object? Not sure if your response was to me or not May 11 19:14:59 I was just trolling about the name you used to describe what you were trying to do May 11 19:15:01 interceptor May 11 19:15:24 I can't getSupportActionBar from PreferenceActivity obviously, yet I want to color the action bar May 11 19:15:55 <_genuser_> stuff my app could do in 2seconds now take 8seconds on the same hardware on lollipop. May 11 19:15:55 use a normal actionbar and fragments May 11 19:15:57 Odaym: ah ok. Yeah I implemented Interceptor and got a hold of the request, but I don't see the form data being passed in May 11 19:15:59 <_genuser_> but eye candt!! May 11 19:16:12 <_genuser_> *candy May 11 19:16:24 but I want the activity to extend PreferenceActivity so that it could take care of all my preferences from the prefs.xml May 11 19:16:36 I dont want to roll my own May 11 19:16:37 g00s, oh, right, the zygote stub stuff. That's been around for a while. reading more. May 11 19:16:54 Hello May 11 19:17:21 I'm making an android app May 11 19:17:39 didnt expect that May 11 19:17:48 sounds like the beginning of a depeche mode song ppklomPolak May 11 19:18:00 haha May 11 19:18:16 "Never Let Me Down Again" comes to mind May 11 19:18:23 yeah haha May 11 19:18:48 I'm .....making an android app...it's so good and warm May 11 19:19:08 Others are making an Android app? I thought I was the only one. May 11 19:19:43 one man team apps May 11 19:20:09 there is this solution to the actionbar in preference activity but I dont know what he means when referring to ActionBarHelperBase http://stackoverflow.com/questions/7928874/actionbar-in-preferenceactivity May 11 19:20:22 he wrote the class that makes the actionbar for him, oh god..no May 11 19:20:32 terrible May 11 19:20:34 Odaym, use a normal activity May 11 19:20:50 why would I, preference Activity is so helpful May 11 19:21:04 normal activity + preference fragment = preference with actionbar May 11 19:21:09 oh shit May 11 19:21:16 I'm making an android app. Do I have to use an activity to show different layout on screen? May 11 19:21:16 Anyone know how to get a hold of POST data in Interceptor? chain.request().body() and chain.request().headers() seem to be empty May 11 19:21:23 thanks man May 11 19:21:30 didnt even know preference fragment exists May 11 19:22:01 : > May 11 19:22:22 the description is the exact same as that of the PreferenceActivity May 11 19:22:31 g00s, http://phrack.org/issues/68/10.html#article May 11 19:23:01 I'm making an android app. Do I have to use an activity to show different layout on screen? I'm currently using OnItemClick and startActivity(new Intent(getApplicationContext(), Alfa.class)) to run code in Alfa.class which changes layout to alfa.xml. May 11 19:23:46 what would you rather use May 11 19:24:12 Anyone know how to deep copy the body input stream of a retrofit okhttp response? May 11 19:24:24 I've fot a paper edition of Phrack <3 May 11 19:24:25 0daym I would rather use something like startLayout(alfa.xml) May 11 19:24:27 got* May 11 19:24:42 startLayout which opens an activity and feeds it the layout? May 11 19:25:29 no. Replaces the layout of curretn activity with new layout May 11 19:25:43 ah you can use fragments for that May 11 19:26:01 an activity can be host to a framelayout which you can use fragments to replace the framelayout with May 11 19:26:36 also one line or so, it replaces May 11 19:27:04 ddo the fragments keep the first layout in RAM? May 11 19:27:10 dragorn pretty amazing sleuthing May 11 19:27:15 I dont think so May 11 19:27:32 ppklomPolak: you can add or replace May 11 19:27:36 because you cannot go back to them May 11 19:27:41 ppklomPolak: it's really broad questions you are asking May 11 19:27:43 you can add them again, by replacing them May 11 19:27:53 so there's no sense in preserving them for oyu May 11 19:28:50 ppklomPolak, you didnt understand the concept behind activities May 11 19:28:50 because I'm making my fisrt app and a bit hesitant about if it is worth doing it considering that there is (is there?) supposedly a too low heap size limit (about 64 mb?) to have all my layouts filled witth images May 11 19:29:22 well if first app you will not know how to manage images, you will use a library May 11 19:29:26 Having a bit of trouble wrapping my head around this. In RetroFit if I'm using a Callback; how can I get the data that I want? success() only allows me to return a void type. Should I just not use CallBacks and wrap it in an AsyncTask? May 11 19:29:36 danijoo believee me II wwill. Sorry if it annoyss you butt I'm not sure ifffi want to makee apps yet. May 11 19:30:40 Odaym "so there's no sense in preserving them for oyu" isn't keeepingthem in ram faster? May 11 19:30:54 faster for what, you cannot go back to them May 11 19:31:05 the only way you can see them again is by doing replace again May 11 19:31:11 I just want advice if it isss actually possible to makee such app that i want May 11 19:31:26 you are wasting time May 11 19:31:31 why? May 11 19:31:50 disparate questions about meaningless things May 11 19:32:45 addPreferencesFromResource was crossed out as deprecated when the call was inside PreferenceActivity, now I realise why! the universe wanted me to use preferenceFragment! May 11 19:32:51 such noobness May 11 19:33:44 you call google the universe? :P May 11 19:34:04 some call google God.. May 11 19:34:13 Godle May 11 19:34:21 icedp: but how do I use a handler, how do you mean? Should I do this (hide/remove the frament) within the frament code, or outside in the activity? If you take a look at my code, both MainActivity and DetailActivity deal with the DetailFragment (which is the one I want to hide/remove) May 11 19:34:46 btw, my code is here: http://bit.ly/1EtPXVM May 11 19:35:32 joakimk_: in a fragment you add a field Handler handler = new Handler { @Override public void handleMessage(Message m) { getFragmentManager ...... }}; May 11 19:35:43 joakimk_: then in onLoadFinished: handler.sendEmptyMessage(0) May 11 19:36:02 tjbiddle: the data is passed to the callback May 11 19:36:23 thanks for the suggestion danijoo but I just realized that I can use a toolbar instead of an actionbar May 11 19:36:32 which is the correct way May 11 19:36:34 jup May 11 19:37:32 0daym Let me explain better. I have images on screen and am using OnItemClick and case _: to view a new layout using StartActivity. I would like to improve this by keeping in ram all content that has to be loaded (to speed up the stuttering scrolling) and simplify it by not having to use an extra Activity just for that. May 11 19:37:42 Hi all May 11 19:37:43 Does someone here have a suggestion about Wireframing / Sketching ? May 11 19:37:55 ppklomPolak, you cant do that May 11 19:37:58 and you dont need to May 11 19:38:00 you will not be able to do that May 11 19:38:11 Has anyone using RecyclerView found a way to set an onClickListener to a view within viewholder in the RecyclerView? Basically i have 2 buttons inside the view inflated on the viewholder, should i set click listeners on viewholder constructor or within onBind method? May 11 19:38:28 there is not enough RAM available for a single app to keep all images in ram always May 11 19:38:47 you use a library that has been built to solve what you are trying to solve, it does this for you and no more stuttering when scrolling May 11 19:39:28 Odaym, give it a name: Picasso :p May 11 19:39:36 if he agrees to May 11 19:39:37 yuriheupa: if you to set it in viewholder then when recycling the view, the view would have the old onClickListeners May 11 19:40:11 set it when creating the holder and then use holder.getItemPosition() in the callback to lookup the value May 11 19:40:19 or to notify someone else May 11 19:40:29 do not recreate the listeners every time you bind May 11 19:40:37 hmm ok May 11 19:46:09 Hello here May 11 19:46:45 I've got a question, is it possible to use a database directly from assets folder ? May 11 19:47:33 no. you need to copy it to the application's database directory first. May 11 19:47:45 ok May 11 19:51:00 what is the best way of turning an iterable into a stream of individual objects? May 11 19:51:11 JakeWharton LeakCanary says I'm leaking a singleton through the its own class. I don't know what that means :/ May 11 19:51:29 not my library. file an issue. May 11 19:51:34 in Jake Whartons netflix talk it looks like he used a mystery flattenList function May 11 19:51:37 jephillips: I don't think streams exists in Java7/Android ? May 11 19:51:51 Afzal: Probably an inner class May 11 19:51:52 JakeWharton, everyone seems to think YOU ARE square May 11 19:52:04 jephillips: just wrote it May 11 19:52:17 danijoo the only inner class is a static builder May 11 19:52:31 he is. May 11 19:52:57 Afzal, code or it didnt happen! May 11 19:52:59 Side note: a static nested class is not an inner class. May 11 19:54:18 Hi, I'm having trouble scaling imageview in the following way: May 11 19:54:25 I want the imageview to always be a constant rect size, but I want to zoom in and out inside the rect May 11 19:54:35 I saw this method but how do I use it? May 11 19:54:39 Matrix.ScaleToFit() May 11 19:55:35 ooh looks like flatMapIterable might do the trick May 11 19:55:38 Could anybody give me a hand here? I'm trying to handle my JSON response but it's not giving me anything. Am i doing something wrong? Using the wrong long, idk.? Sorry to hand it over like this, but here's my code : http://pastebin.com/QUGyA7Jg May 11 19:56:13 I've tested the connection and it is connecting to my PHP file, handing over broken data which should give me one response. Not getting it though May 11 19:56:23 Or, i am getting it, but i'm just not handling it right May 11 19:56:26 danijoo https://gist.github.com/AfzalivE/7208f17f2f3eeeb59f04 May 11 19:56:28 Gradle version 2.1 is required. Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in /Users/p/lfl/spaceball/spaceball-android/gradle/wrapper/gradle-wrapper.properties to gradle-2.1-all.zip May 11 19:56:42 oops only mean to paste begining May 11 19:56:50 smh @ gradle May 11 19:57:17 feel free to criticize any other parts (like initApp and refreshMotion methods) May 11 19:57:38 danijoo "there is not enough RAM available for a single app to keep all images in ram always" Most phones used today have at least 1GB RAM. Highest screen resolutuon is 2560 1600. So 2560 * 1600 / (1024^2) * 24 = 93.75 MegaBytes. 1024 / 93.75 = 10.9226667 images. I only need about 10. Also the image size will be smaller for devices with less screen resolution and higher res devices have more RAM. So what is the problem? May 11 19:58:07 ppklomPolak, even if you phone has a terrabyte of ram, you app can only use a few megabyte May 11 19:58:15 why? May 11 19:58:20 thats how android works May 11 19:58:28 every app gets a defined maximum ram May 11 19:58:38 for cheap shitphones this will be 32mb May 11 19:58:48 ppklomPolak because system needs RAM, and other apps running in the background also need RAM. May 11 19:58:50 for newer phones something about 256 or 512mb May 11 19:59:14 you should always expect to have a maximum of 32mb May 11 19:59:20 I know that there is at least solution: http://stackoverflow.com/a/11275719 May 11 19:59:34 apparently there is a magic classpath 'com.android.tools.build:gradle:0.14.2' i need to suply May 11 19:59:45 ppklomPolak, thats not a solution May 11 19:59:55 thats just a kind question to the system to get more ram May 11 20:00:11 and for some phones the answer will be "no" :) May 11 20:00:43 danijoo, I meant "a bad solution". Is there aaa better solution? May 11 20:00:55 yes. not using to much ram May 11 20:00:58 292: Is something being printed in LogCat? May 11 20:01:06 like everyone is telling you since 1 hour May 11 20:01:28 Nothing, nopes, nada. It's not giving me anything :( May 11 20:01:35 I've been going at this for hours and it's frustrating May 11 20:01:53 danijoo why would you not use RAM? I read that using RAM is good May 11 20:02:11 Try logging something (anything) in onSuccess and onError. May 11 20:02:15 The SDK Build Tools revision (19.0.0) is too low for project 'spaceball-android'. Minimum required is 19.1.0 May 11 20:02:19 getting closer May 11 20:02:29 I want to use RAM or the next best solution whatever it is May 11 20:02:32 ppklomPolak, read about using RAM to do what you want on Android May 11 20:02:42 google how to store images in RAM on Android May 11 20:02:45 well.. thats what I call resistant to advice.. May 11 20:02:58 we havent done it before so we really dont know how but we wish we knew, cause that would be the best thing to do May 11 20:03:02 I jusssst read some that "Dalvik heapsize" is 64MB on most phones May 11 20:03:10 yep, you can store images there May 11 20:03:16 ppklomPolak, yes. _MOST_ May 11 20:03:24 and on others, it is not. May 11 20:03:29 and found a bad solution to increase the hepasize. May 11 20:03:35 okay, i'll try that May 11 20:03:35 yea you can try that May 11 20:03:35 uhh May 11 20:03:39 ppklomPolak, just live with the limited heapsize May 11 20:03:42 I am asking for better solution May 11 20:03:44 like everyone May 11 20:03:47 we dont know man May 11 20:03:50 ppklomPolak, use an image library May 11 20:03:57 usually we figure out different hacky ways May 11 20:04:01 and our lists always stutter May 11 20:04:06 (like you've been told 1 hr ago) May 11 20:04:06 big images? May 11 20:04:10 if you could do it though..... May 11 20:04:11 your lists stutter? May 11 20:04:17 there's usually always a way to fix that May 11 20:04:19 Odaym, mine doesnt stutter.. May 11 20:04:26 and it usually has to do with how you handle your convertviews May 11 20:04:33 lists only stutter if you dont load images async and dont use viewholders May 11 20:04:41 indeed May 11 20:04:56 nah man we're waiting for ppklomPolak to solve this and let us know how to achieve this magical non-stutter listview, I am sure that he is onto something with storing images in RAM May 11 20:04:57 rossimo best resolution I can find but upto 2560 1440 because that isss the highest android res. Also the images are downscaled for smaller res May 11 20:05:09 ... May 11 20:05:16 You don't worry about how memory is managed May 11 20:05:18 that's too low level. May 11 20:05:24 he's going full C bro May 11 20:05:27 hardcore May 11 20:05:31 ppklomPolak, how many people do you want to say "use a library and load the images async"? May 11 20:05:33 10? May 11 20:05:34 are the images on disk? May 11 20:05:34 20? May 11 20:05:40 or from the web? May 11 20:05:41 III don't care if it stutters if I can't have all the images in RAM May 11 20:05:45 man he is dragging other poeple into his fucking question May 11 20:05:46 lol May 11 20:05:47 tacticalJoke, it's not giving me anything onfailure May 11 20:05:52 y o u c a n t May 11 20:05:58 in the app raw folder May 11 20:06:00 SimonVT can you ban him May 11 20:06:06 so it's a resource? May 11 20:06:09 How about onSuccess. May 11 20:06:14 just ignore him :/ May 11 20:06:15 Not doing anything either May 11 20:06:25 0daym not helpful. I aaam actually needing aaa proper aswer May 11 20:06:27 Well, have fun, I'm sure your listview won't even work by the time you are done with it. Next time, consider doing it the official, well-trodden way as documented in the official android docs. May 11 20:06:29 I can but others will join in and try to solve it with him May 11 20:06:33 he's a damn troll that's all May 11 20:06:43 III don't care if it stutters if I can't have all the images in RAM BECAUSE it woruldnt lag if it were in ram May 11 20:06:50 lol May 11 20:06:53 you are a fool May 11 20:06:54 he just cant accept that he cant use more ram ^^ May 11 20:06:57 https://github.com/davemorrissey/subsampling-scale-image-view May 11 20:07:01 that should do it May 11 20:07:09 ppklomPolak read some stuff about rendering May 11 20:07:13 your logic is not sound May 11 20:07:14 How many images are in the view on the screen at once anyway? May 11 20:07:18 Iiii seriously ask. Not troll May 11 20:07:25 I know you dont mean to troll May 11 20:07:27 TacticalJoke, i got to go now, freaking family calling me back out of my cave. I'll look at it later tonight i guess May 11 20:07:27 ok installing more random sdk versions May 11 20:07:36 your existence is of trollish nature May 11 20:07:37 if i ever get this building im gonna have no idea how to repeat process May 11 20:07:42 292: Try Log.d("whatever", "whatever"); May 11 20:07:45 tx 3 or 4 images May 11 20:07:49 ThinThread what are you building man? May 11 20:07:53 sometimes two May 11 20:07:53 how big are they May 11 20:07:58 resolution-wise May 11 20:07:58 ppklomPolak, one last time. YOU CANT HAVE ALL IMAGES IN RAM. period. you need to load them and dismiss them when they are not visible anymore. May 11 20:08:02 android game that used to work 2 years ago May 11 20:08:07 to do that without a stutter, use a library May 11 20:08:08 2560 1440 @24 May 11 20:08:14 subsampling + a LRU cache will do it May 11 20:08:15 because its a pain to implement it May 11 20:08:19 you are going to hit a brick wall so hard that your device will break May 11 20:08:21 haha May 11 20:08:21 why do you even load images that big into your list May 11 20:08:21 why do you need 2560 x 1440? May 11 20:08:28 but now everything changed and im a day of frustration into tryng to get building May 11 20:08:29 NotEnoughMemoryException will be your middle name May 11 20:08:31 Screens can't even show all the pixels there May 11 20:08:50 see, JakeWharton doesnt answer this guy May 11 20:08:54 why do I have to talk May 11 20:08:55 Afzal that is highest screen res of any androdi device. Smaller resolutuon has them downscaled automagically May 11 20:08:56 so stupid May 11 20:08:58 the jni aspect was easy and stayed the same May 11 20:09:02 didn't get any mentions May 11 20:09:04 i'm off the hook May 11 20:09:05 * Odaym meditates May 11 20:09:07 U would suggest downscaling the images (producing thumbnails) May 11 20:09:11 lol May 11 20:09:11 and then showing them on the list May 11 20:09:16 and then showing the originals when needed May 11 20:09:19 not just everywhere May 11 20:09:22 I* May 11 20:09:23 JW is a bot. :D May 11 20:09:29 ppklomPolak https://plus.google.com/110558071969009568835/posts/JqrbkHAmDju May 11 20:09:30 read that May 11 20:09:32 do it May 11 20:09:42 then look at the sample May 11 20:09:43 JakeWharton the last episode of Fragmented was way too complex by the way May 11 20:09:49 I really could not benefit of anything May 11 20:09:56 i'll re-record it May 11 20:09:58 ! May 11 20:10:02 !help May 11 20:10:06 !ping May 11 20:10:07 !stop May 11 20:10:08 no, about 3rd episode maybe May 11 20:10:17 you tend to trail off May 11 20:10:21 Anyone can help me be kind to start develop for android? May 11 20:10:22 danijoo did you get a chance to look at it? :p May 11 20:10:31 jotexk yes, do the udacity course :) May 11 20:10:35 jotexk: download android studio + the SDK May 11 20:10:36 Afzal, too much code sorry :( May 11 20:10:43 https://developer.android.com/sdk/index.html May 11 20:10:43 Afzal ok I will read it May 11 20:10:43 Odaym: I was not recording for just you. May 11 20:10:44 lol you asked for it :p May 11 20:10:48 have to leave soon May 11 20:10:48 I didn't realise the next episode of Fragmented was out... May 11 20:10:49 it's okay May 11 20:10:52 yeah I thought its less :) May 11 20:10:59 of course, but Im sure the topics are very complex for a lot of others like me May 11 20:11:11 this: https://www.udacity.com/course/developing-android-apps--ud853 ? May 11 20:11:16 oh well, there's other leaks I have to fix anyway, like leaking Message.obj :( May 11 20:11:16 Odaym: May 11 20:11:18 ( ͡º ͜ʖ ͡º) May 11 20:11:18 did you feel that the two hosts even were able to follow? May 11 20:11:24 jotexk yup May 11 20:11:38 its ask for credit card which i don't have May 11 20:11:39 Odaym: they came up with the questions May 11 20:11:44 oh wait that's intermediate lol May 11 20:11:51 hm May 11 20:11:54 ok May 11 20:12:17 Can I learn to develop for android less than 10 days? May 11 20:12:22 sure May 11 20:12:23 no May 11 20:12:25 wattt May 11 20:12:31 not well, at least May 11 20:12:40 Well enough to display "Hello World" May 11 20:12:43 maybe show a list of things May 11 20:12:49 _maybe_ access a simple API. May 11 20:12:53 it takes 10 days just to compile your app May 11 20:12:55 depends on background experience too May 11 20:12:59 g00s: :D May 11 20:13:00 Zing May 11 20:13:01 Afzal thanks that is aa good way to load hi res images in 64 mb of ram but I want to use more RAM. May 11 20:13:03 Lol g00s May 11 20:13:04 g00s, XD May 11 20:13:16 I read today about moving to gradle 2.4 for faster builds May 11 20:13:20 Anyone is a serious and kind I can learn from him? May 11 20:13:22 ppklomPolak what's with your obsession of RAM May 11 20:13:24 IS THERE NO WAY TO KEEP ALL IMAGES IN RAM AT ALL? May 11 20:13:30 haha May 11 20:13:32 there is a way May 11 20:13:33 ppklomPolak, NO THERE IS NO WAY May 11 20:13:37 Afzal speed May 11 20:13:38 lol damnit Odaym May 11 20:13:45 maybe if your resolution is one pixel May 11 20:13:53 ppklomPolak you can get the speed without keeping them in RAM May 11 20:13:54 0daym what isss it then?? May 11 20:13:56 you are the embodiment of Dijikstra's warning of premature optimization May 11 20:14:01 lol May 11 20:14:02 he was referring to YOU when he warned us May 11 20:14:06 HAHA May 11 20:14:07 Afzal ok how? May 11 20:14:07 :D May 11 20:14:09 you are the antichrist May 11 20:14:18 More like premature OutOfMemorization May 11 20:14:19 ppklomPolak: ANYTHING IS POSSIBLE IF YOU BELIEVE May 11 20:14:23 jotexk: You'll learn from a lot of people in here. May 11 20:14:24 ok, this is a troll May 11 20:14:26 ppklomPolak: give it up brah May 11 20:14:26 lol May 11 20:14:31 Just don't expect much in 10 days. May 11 20:14:35 yiati Matrix reference? May 11 20:15:02 if you're worried about memory allocation go and make C software May 11 20:15:02 Is this also a joke? May 11 20:15:03 I really aaam not trolling. This is sad. May 11 20:15:08 go write assembler if you want. May 11 20:15:14 it sure is sad May 11 20:15:20 ppklomPolak look. I dunno what you're trying to do. You can display a 2560 x 1440 image just fine on a device. You just have to load it May 11 20:15:28 #Install gentoo maybe? DONE THAT. USING IT NOW May 11 20:15:28 there isn't a way to keep all images in ram, you've only got a few megabytes to work with May 11 20:15:36 I joke only 17% of the time. May 11 20:15:37 but to quote someone from a game I was playing the other day, "his skill is burden enough, no need to report him" May 11 20:15:38 I know if statement and simple loops.. May 11 20:15:56 jotexk: which loop is your favorite loop May 11 20:15:57 TacticalJoke: Very specific there. May 11 20:16:08 There is no favorite.. May 11 20:16:16 oh come on May 11 20:16:20 surely you must have a favorite loop May 11 20:16:25 maybe someone should tell ppklomPolak about ashmem to store images there. that would make confusion perfect May 11 20:16:26 mine is for May 11 20:16:29 lolol tx May 11 20:16:31 Please anyone who can help? May 11 20:16:39 with what May 11 20:16:40 jotex what you need help with May 11 20:16:40 I can throw on him btc money May 11 20:16:48 jotexk http://www.reddit.com/r/androiddev/wiki/index May 11 20:17:04 I see this channel from reddit :D May 11 20:17:18 no May 11 20:17:22 They said to learn java and XML May 11 20:17:29 yea May 11 20:17:36 Afzal ok so no one here know how to keep all images in ram. So what is the best solution WITHOUT KEEPING ALL IN RAM? May 11 20:17:37 and what you did was come here and chat May 11 20:17:38 ah it's the singleton leaking the class instance May 11 20:17:39 hmm.. May 11 20:17:48 ppklomPolak: no May 11 20:17:51 yes May 11 20:17:53 stop May 11 20:17:55 ppklomPolak you load the image from disk when you need to display it May 11 20:17:56 look at it another way May 11 20:18:08 you keep cached smaller resolutions for when you need those May 11 20:18:16 don't bother May 11 20:18:26 he's obsessed with one improbably useful solution May 11 20:18:27 ppklomPolak, you can keep them all in one ram May 11 20:18:30 Learn Java. Learn XML. ??? May 11 20:18:33 just push enough May 11 20:18:35 Afzal yes and does Android automatically unloaaad old images when new image needs space? May 11 20:18:37 and theyll fit in May 11 20:18:43 yes May 11 20:18:51 TacticalJoke: Profit... May 11 20:19:02 I did this tutorial: www.xaviertobin.com May 11 20:19:06 ppklomPolak man why are you concerning yourself with this shit? Just go make the app first and then optimize it. May 11 20:19:19 you need to make something before you start optimizing it. May 11 20:19:23 becaaause I have OUTOFMMEMORYEXCEPTION May 11 20:19:32 using which device May 11 20:19:36 when trying to load tow images May 11 20:19:40 i9300 May 11 20:19:41 ppklomPolak, just a guess but... too many images in RAM? ^^ May 11 20:19:44 no you dont, you just saw me type that word May 11 20:19:46 lol May 11 20:20:21 well that's good enough jotexk May 11 20:20:26 Afzal thanks for not laughinggg at me like they are. I feel sad because of their trolling. May 11 20:20:31 for ? May 11 20:20:39 knowing android May 11 20:20:43 now you know android May 11 20:21:02 ppklomPolak ah okay. So where's the code that causes the OOM exception? May 11 20:21:18 protected void onCreate(Bundle savedInstanceState) { super.conCreate(savedInstanceState); finish(); } May 11 20:21:23 there you go, you made your first android app May 11 20:21:26 (and plz use pastebin) May 11 20:21:26 I wanted to leave but this is way more entertaining than it should be.. :/ May 11 20:21:32 lol May 11 20:21:41 + May 11 20:21:47 troll everywhere May 11 20:22:03 III actually deletedit now and start from almost beginning but trying to understand why I had that problem so I can avoidd it May 11 20:22:05 now I miss my television show! May 11 20:22:10 danijoo static variable causing a class instance leak. But....why would I want to clear that instance if the app hasn't stopped? May 11 20:22:25 Afzal I thin k I get the exception because the previous images were not removed from ram to make space for new images May 11 20:22:27 Afzal, you woudnt want that May 11 20:22:36 why would you? May 11 20:22:40 okay great, so it's not a leak May 11 20:22:43 Is it the Context thing? May 11 20:22:44 problem fixed. lol May 11 20:22:59 I'm on my phone but just a guess based on a vague memory of what you posted. May 11 20:23:00 Afzal, I guess leakCanary just tells you that it didnt GC'ed May 11 20:23:20 yeah, I don't know why it would expect it to get GC'ed though May 11 20:23:20 but since this is exactly what you want when you create a singelton, this should be ok :) May 11 20:23:26 yeah exactly :D May 11 20:23:37 because it cant tell the difference between a leak and a singelton May 11 20:23:41 Afzal why fixed? I still don't know if the image has to be coded to be unloaded from ram or not? May 11 20:23:42 ah May 11 20:23:51 ppklomPolak dude, not yours, my problem May 11 20:24:17 aha May 11 20:24:36 jotexk did you find what you were looking for on that page? May 11 20:24:48 ppklomPolak: Learn about Java GC, and OOP, then you'll be all good May 11 20:24:56 ppklomPolak: Maybe this will help, http://developer.android.com/training/displaying-bitmaps/index.html May 11 20:25:06 yiati I learn by doing the most May 11 20:25:10 >D May 11 20:25:14 i love those answers May 11 20:25:16 ppklomPolak http://developer.android.com/reference/android/util/LruCache.html May 11 20:25:25 that will help you manage what's in memory May 11 20:25:28 dont post liks he wont read May 11 20:25:28 ppklomPolak: You won't get anywhere without reading May 11 20:25:39 RAdther and rossimo. Thank You for links. May 11 20:26:04 I've get a little problem: http://pastebin.com/ePZ5MeZ0. Anyone got a tip, how to handle that correctly? May 11 20:26:05 np May 11 20:26:05 ppklomPolak, put your images into ashmem than you can put them all in ram :P May 11 20:26:06 danijoo can you please stop being mean? May 11 20:26:31 ppklomPolak: I think he is just bored... May 11 20:26:34 ppklomPolak, i told you how to do it an hour ago. I even gave you a library that makes it a one-line-of-code May 11 20:26:44 and yes. im also bored :) May 11 20:26:53 well gn guys May 11 20:26:55 oh god ashmem May 11 20:26:58 danijoo You thin kthat is a good reason to be mean? May 11 20:27:08 why are you teaching him about ashmem?! May 11 20:27:10 :p May 11 20:27:15 danijoo: Procrastination at it's finest. May 11 20:27:19 ^^ May 11 20:27:32 I thought ashmem would make it funny May 11 20:27:33 It's 6:30AM May 11 20:27:34 can I sleep? May 11 20:27:42 III still have that link open because I will read it. I jussst wanted to make sure thereee is no way to keep all in ram May 11 20:27:42 ppklomPolak: why don't you just store all images in the CPU cache, it's faster than RAM! May 11 20:27:44 tx good morning! :P May 11 20:27:53 more like good night May 11 20:27:57 cya space cowboy May 11 20:28:02 ppklomPolak, being ignorant and asking the same question over and over again while everyone says its not possible - thats a reason to be mean May 11 20:28:34 unless you use ashmem! May 11 20:28:37 but dont use ashmem May 11 20:28:55 Why not make a new OS for your device May 11 20:28:57 danijoo I'm not tryign to be mean but Iii think you have some problems and are pathetic. May 11 20:29:01 then you can work on memory management. May 11 20:29:08 ppklomPolak: You can never guarantee that each user will have the same amount of ram so that question is invalid May 11 20:29:13 The most memory efficient OS yet. May 11 20:29:14 ppklomPolak, i agree to both May 11 20:29:28 ppklomPolak http://www.curious-creature.com/2012/12/11/android-recipe-1-image-with-rounded-corners/ May 11 20:29:30 download that app May 11 20:29:36 change the images with 2560 x 1440 May 11 20:29:38 Lordus, i've encoutered a similar issue but i cannot give you precise direction (because it has been a long time) except look carefully the boolean value you return in onkeyDown and onkeyUp May 11 20:29:39 see if it works May 11 20:29:49 ok Afzal I will May 11 20:30:04 Lordus, it's like an automate, so after an onkeydown, is expected anything including onkeyup May 11 20:30:06 still ashmem is a valid advice May 11 20:30:10 but not onkeydown again per example May 11 20:30:14 even facebook uses ashmem to increase RAM May 11 20:30:30 but dont use it! May 11 20:30:36 and gn8 :) i have to leave :( May 11 20:30:46 see joo danijoo May 11 20:30:49 yes bye May 11 20:32:50 Man I wish I could remotely slap people suggesting NDK hacks to fix badly managed memory in Java May 11 20:32:54 *slap*! May 11 20:33:17 ouch May 11 20:33:39 but dont use it! May 11 20:33:57 well too late, facebook wrote a library to use it :p May 11 20:34:04 Yeah, but if you tell them what it is, they'll just go there, STILL have a memory usage problem and will now kill users backstack fully May 11 20:34:15 making their devices unresponsive for any task switching May 11 20:34:39 Mavrik, just read the chatlog for the last 2 hours and you see why I gave this answer.. May 11 20:34:53 mixed msgs May 11 20:34:56 the heap on android is just too tiny and fragmented, so the OOM on big image size is more than expected with these crazy resolution on a tiny phone May 11 20:34:56 :p May 11 20:34:59 * _genuser_ ++'s Mavrik May 11 20:35:24 <_genuser_> Mavrik: I had a similar idea about a "bitchslap" hand mounted on cars. May 11 20:35:25 adp that's why people came up with things like DeepZooom May 11 20:35:26 xxxxx....xhdpi May 11 20:35:29 adq, yeah, lack of heap compaction is an issue May 11 20:35:30 nooo, who needs more Mavrik! May 11 20:35:32 * wakelock hides May 11 20:35:32 ^ very sarcastic resolution May 11 20:35:35 :p May 11 20:35:42 <_genuser_> Mavrik: you controls it via a joystick and when drivers piss you off, you just b-slap them. May 11 20:35:45 <_genuser_> *slap* May 11 20:35:46 adq i mean May 11 20:35:56 [16:35:25] adp that's why people came up with things like DeepZooom May 11 20:35:59 _genuser_, crownsourced slapping, if you get more than 5 dislikes, your car slaps you :P May 11 20:36:14 <_genuser_> Mavrik: that's harsh. you could get ambushed. May 11 20:36:51 renting bot for slapping, 20$ the 100 slaps May 11 20:36:54 <_genuser_> Mavrik: but crowdsource slapping makes sense in that: if you piss someone off, they mark you "to be slapped", then the closest person to you who is participating in that experiment, slaps you. May 11 20:37:02 and here we go :p May 11 20:37:09 hi May 11 20:37:10 hi May 11 20:37:11 hi May 11 20:37:15 _genuser_, that would make a nice android app May 11 20:37:21 wtf with this guy saying hi, he did the same on another chan May 11 20:37:26 until someone responds to him it seems May 11 20:37:26 mark person x to slap and everyone arround him gets a notification to slap him May 11 20:37:34 <_genuser_> danijoo: hang, let me start a new project in AS, so by tomorrow I'll be able to get starting coding this app. May 11 20:37:57 <_genuser_> danijoo: that would be awesome. wonder how many billions we can sell it for. May 11 20:38:08 call it WhatsSlap May 11 20:38:17 <_genuser_> ahah, precious May 11 20:38:25 the funny thing is, it could work May 11 20:38:30 i thought u have to go danijoo May 11 20:38:44 <_genuser_> ok, danijoo and I was taking on partners. who wants in. May 11 20:38:48 <_genuser_> you have to buy equity. May 11 20:38:54 jotexk_, that was before whatsslap May 11 20:39:00 bla bla May 11 20:39:08 SlapBook May 11 20:39:10 <_genuser_> danijoo: don't you mean Wh#tsl@p ? May 11 20:39:22 OFFTOPIC May 11 20:39:30 a May 11 20:39:31 in fact im too late now anyways May 11 20:39:33 <_genuser_> plain english would be too boring for dumb@55 generation. May 11 20:39:42 a May 11 20:40:29 i'd install that app May 11 20:40:44 the domain whatslap.com is "Status: redemptionPeriod" May 11 20:40:47 go :p May 11 20:41:05 <_genuser_> adq: you're way more serious about this than we are. we'd like to bring you in at 5% equity. May 11 20:41:10 <_genuser_> how's your coding skills? May 11 20:41:16 relative May 11 20:41:18 :p May 11 20:41:20 <_genuser_> you'll do. May 11 20:41:30 the question is... May 11 20:41:37 can we load all those slaps into RAM at once? May 11 20:41:47 danijoo if we use ashmem, sure May 11 20:41:52 :'] May 11 20:41:59 I think you may run into some OOM exceptions... May 11 20:42:05 OOS May 11 20:42:05 <_genuser_> so my provider upgraded my s4 to lollipop. And my app is 4x times slower now. May 11 20:42:09 out of slaps May 11 20:42:17 <_genuser_> well, hopefully JakeWharton will have a version of picasso for that. May 11 20:42:27 he'll do what now? May 11 20:42:34 Afzal, I'm trying to compilee the project you linked to bu it says "Cannot start compilation: the output path is not specified for module "RoundRectShader". Specify the output path in Configure Project." May 11 20:42:37 <_genuser_> uhoh, he's actually here. May 11 20:42:41 try {} catch (SlapException e) {} May 11 20:42:44 oh dear May 11 20:42:48 problem solved May 11 20:43:03 and you get more slap for using try catch May 11 20:43:18 <_genuser_> JakeWharton: joking about a slapping app (whatsslap), which got out of hand and someone mention all those slaps can't be load into RAM at once. May 11 20:43:18 TacticalJoke, are you still there? May 11 20:43:27 whatslapp LOOOL May 11 20:43:44 if you use SLAP_565 they'll fit May 11 20:43:45 I've tried it and it is logging it at Success May 11 20:43:49 just can't use SLAP_8888 May 11 20:44:00 SLAP_4444 is probably deprecated May 11 20:44:00 this thing would definitly sell! May 11 20:44:04 <_genuser_> ah, nice. he's into this app too. now we have to code it. May 11 20:44:05 Afzal, what to do? May 11 20:44:08 Yeah, but I'm on mobile and almost useless. May 11 20:44:30 ppklomPolak so that project isn't for Android Studio May 11 20:44:46 <_genuser_> I wonder if we can call them x565 slaps. you know to stay with the industry jargon May 11 20:44:47 Sponsored by Android (tm). May 11 20:44:50 Anyone know of a plugin capable of streaming audio from shoutcast/icecast and parsing out the metadata for display? Or something open source that does it? May 11 20:44:55 Afzal maybee I can fixx that using the project otuput option? May 11 20:45:12 I don't know about that option but here: ppklomPolak here: https://medium.com/@AfzalivE/migrating-a-project-to-android-studio-98f6608d2aab May 11 20:45:18 it detects the force of the slap on one phone and vibrates that force on the other phone May 11 20:46:14 What do the response headers and body have? May 11 20:46:17 is this the source code for google camera? and if so, why hasn’t it been updated in 7 months? May 11 20:46:18 <_genuser_> shmooz: unless the other person's phone is in their front pocket. in which case, you're slapping the wrong thing. May 11 20:46:19 git clone https://android.googlesource.com/platform/packages/apps/Camera May 11 20:46:40 in_deep_thought is the source of the Camera app probably before it became GoogleCamera May 11 20:46:40 the standard google camera app on androids May 11 20:46:51 _genuser_: it rings the phone and waits for the user to put it to their face ;) May 11 20:47:08 Afzal: meaning that it is out of date? and me cloning and compiling that code won’t make a google camera replica May 11 20:47:14 Afzal ok found screenshot wit hthe option: http://i.stack.imgur.com/cUdMg.png May 11 20:47:22 <_genuser_> shmooz: lol, how does this slap idea just keep going... May 11 20:47:44 creativity has a mysterious source of motivation _genuser_ May 11 20:47:54 in_deep_thought oh lol. You cloning that would never make a google camera replica. It uses internal classes/methods which are not exposed in the public APIs May 11 20:48:05 if you want to build it, you will have to clone AOSP May 11 20:48:11 _genuser_: it keeps going like the Energizer Bunny May 11 20:48:12 ASOP? May 11 20:48:16 aosp May 11 20:48:27 whatslapp - (c) 2015 #android-dev May 11 20:48:27 that's what I wrote. AOSP May 11 20:48:34 what does it stand for? May 11 20:48:41 Android Open Source Project May 11 20:48:45 AKA, the whole android source May 11 20:48:46 Android Ooopen Soucre Project May 11 20:48:49 <_genuser_> shmooz: in early days of android (before cameras/flashes), some guy took the default blank activity projects, and released it in the market as "the flash app". May 11 20:48:52 we will all be rich.. May 11 20:49:01 <_genuser_> danijoo: lol May 11 20:49:04 ppklomPolak yeah I have no idea what you're doing May 11 20:49:09 you need to follow some basic guides May 11 20:49:16 that's intellij May 11 20:49:32 danijoo _genuser_ early designs... https://unsee.cc/gunopase/ May 11 20:49:41 I use Intellij becasue it is recommended IDEEE for Java May 11 20:49:58 Andoid uses Java May 11 20:50:01 ^^ May 11 20:50:10 andorid uses kotlin May 11 20:50:34 <_genuser_> Radther: lol JakeWharton would be upset if he saw it. May 11 20:50:35 yeah umm, I will stop assisting now because you need a full primer here :/ May 11 20:50:37 (In a futuristic society.) May 11 20:50:58 TacticalJoke, dream :) May 11 20:51:01 looks good to me! :shipit: May 11 20:51:23 :D May 11 20:51:23 <_genuser_> JakeWharton: I'm sure you've already coded a blocker. May 11 20:51:41 <_genuser_> SlapAvoider (TM) May 11 20:51:48 ah May 11 20:52:08 TacticalJoke you there? May 11 20:52:13 Afzal: does that mean if I want to make a google camera replica, I will need to clone the entire AOSP repo? I can’t just make the app independently via the apis? May 11 20:52:13 get-out-of-slap cards via in-app billing May 11 20:52:15 SlapBlock dude May 11 20:52:26 be smart and be the one who dev whatslap and slapblock May 11 20:52:26 in_deep_thought you can make via APIs May 11 20:52:27 <_genuser_> adq: my bad, SlapBlock. May 11 20:52:30 so you have bot hsides ;) May 11 20:52:32 just not using the Camera source May 11 20:52:34 <_genuser_> adq: does it have a chrome extension? May 11 20:52:39 Semi-here, yeah. May 11 20:52:41 :) May 11 20:52:54 I have an animation I may want you to take a look at May 11 20:52:56 Afzal: so there is a “google camera” replica somewhere that uses apis only? Where might I find it? May 11 20:53:12 Im trying to replace .setError on EditText with an animation to tell the user they need to enter data May 11 20:53:20 Dont know if the one I made is to subtle May 11 20:53:27 show us drose379 May 11 20:53:34 Cool. May 11 20:53:38 Ok, lemee take a screencast May 11 20:53:56 Afzal what is the point of actually seeing if the project will work with 2560 1440 image? May 11 20:54:23 because this requires me to convert the prject to gradle format May 11 20:55:30 in the meantime drose379, if you haven't seen it: https://plus.google.com/wm/1/+CyrilMottier/posts/ewdTd7bNw29 May 11 20:55:43 danijoo _genuser_ A more content focused approach. https://unsee.cc/suditeno/ May 11 20:56:09 with Dagger I've got "No inject registered for members/....", but here https://github.com/square/dagger/blob/master/examples/android-simple/src/main/java/com/example/dagger/simple/AndroidModule.java @Module doesn't have injects = {..} and it still works. It it an outdated example? May 11 20:57:03 hhihi May 11 20:57:04 <_genuser_> Radther: you deleted it. May 11 20:57:30 https://unsee.cc/degipuzo/ May 11 20:57:33 Whoops. May 11 20:57:41 k guys May 11 20:57:49 drose379: We're ready!!! May 11 20:57:50 wow May 11 20:57:53 if I am trying to make a camera app, should I start here: https://source.android.com/devices/camera/index.html May 11 20:57:55 or here: http://developer.android.com/guide/topics/media/camera.html May 11 20:57:56 https://vid.me/5R4y May 11 20:57:59 ahh May 11 20:58:02 ^^ May 11 20:58:52 ok, i see drose379, i've used something similar in a project, but i shake it faster from right to left to right to left to ... center May 11 20:58:58 to mimic a "no" May 11 20:59:01 in_deep_thought: google this is for troll irc May 11 20:59:06 let me show you a vid May 11 20:59:19 drose379: Looks, good but is a little slow. https://d262ilb51hltx0.cloudfront.net/max/800/1*qwhDZ9kNPJUA5Btd-4_mUA.gif May 11 20:59:32 That link is something similar I saw before. May 11 20:59:38 <_genuser_> drose379: it's decent. I'd be ok with a highlighted field also. without animation. but this animation is enough to get attention if I'm using it. May 11 20:59:57 im not a troll. i just don’t understand why there seems to be 2 developer sites May 11 21:00:21 drose379: Here is a link to the post talking about animations. https://medium.com/@michaelvillar/improve-the-payment-experience-with-animations-3d1b0a9b810e May 11 21:00:41 Great, thanks gusy May 11 21:00:41 in_deep_thought, source.android.com is made for people making hardware and drivers for camera, not app developers. May 11 21:00:43 guys* May 11 21:00:54 <_genuser_> in_deep_thought: follow the developer.android.com stuff. it's easier and more complete in teaching you. May 11 21:00:54 in_deep_thought: this irc is for troll only May 11 21:01:01 they troll me. Save your time May 11 21:01:08 thanks Mavrik May 11 21:01:48 <_genuser_> in_deep_thought: for my billing app stuff, to take pictures of receipts, I was able to rig up a camera app using developer.android.com refernce in a day or so. May 11 21:01:48 I sped it up from 300MS to 200MS May 11 21:02:05 drose379, https://vid.me/YObq May 11 21:02:09 just the "say no" anim May 11 21:02:29 can I ever expect a camera app that I develop with the apis to give = quality pics as the google camera app which seems to be integrated with the android system itself? May 11 21:02:36 though the fps on the vid broke a bit, it's more explicit May 11 21:02:44 ah ok abq, nice and simple May 11 21:03:05 it's really like shaking the head saying no, but a bit faster of course May 11 21:03:10 Right haha May 11 21:03:22 <_genuser_> in_deep_thought: sure, you can have a camera runing in an hours or so of reading the guide. you'll spend more time reading up on properties/features. May 11 21:03:26 in_deep_thought, on non-Nexus phones, not really. May 11 21:03:29 Is that your app adq May 11 21:03:35 in_deep_thought, but you can get close enough. May 11 21:03:37 <_genuser_> in_deep_thought: JPEG quality for saving, resolution for taking picture, etc. May 11 21:03:41 yeah it's an oldschool rpg for android wear drose379 ;) May 11 21:03:42 <_genuser_> there should be no difference. May 11 21:03:54 (search for castle wear if you are curious, but it's not finished at all) May 11 21:03:58 thats bad ass May 11 21:03:59 ok thanks May 11 21:04:01 ppklomPolak because it's a project by a Google developer whose code is better May 11 21:04:16 Hello, is it possible (trivial) to make Material shared element transition between a Activity and a Fragment? May 11 21:04:22 <_genuser_> Mavrik: oh? on non-nexus phones, your own app can't compete with stock camera? I haven't noticed any quality issues. May 11 21:04:34 drose379, it's close to OD&D rules, very, and lot of stuff is a pale copy of wizardry (proven grounds of the mad overlords ;)) May 11 21:04:37 overlod* May 11 21:04:48 _genuser_, you don't have access to private settings / modes for most of those camera May 11 21:04:51 *camerss May 11 21:04:56 that should bring some memory to ppl who played it May 11 21:04:57 I really dont game, so I dont know what you nmean May 11 21:05:02 ok np May 11 21:05:03 but im interested in anything for android wear May 11 21:05:08 while you can fake some of them, you'd have to do it for each model and OEM firmware version May 11 21:05:11 adq: How does it impact the wears battery life? May 11 21:05:16 <_genuser_> Mavrik: I've done lot of A/B taking picture of the same scene with stock camera and my app, and didn't notice any difference. May 11 21:05:25 not much cause it's not animated May 11 21:05:30 which means you don't have access to advanced postprocessing stuff, no high-FPS stuff, no advanced HDR tweaks, etc. May 11 21:05:33 and the computation is ridiculous May 11 21:05:39 Camera2 might help, but I haven't tested it yet May 11 21:05:53 _genuser_, depends on which device did you test. May 11 21:05:56 adq this game is for the watch? May 11 21:05:57 adq: Just need to get a wear device and I might give it a go. Added it to my Wishlist. May 11 21:05:58 <_genuser_> yeah, I haven't moved my app to camera2 yet. but it's api 21 only. May 11 21:06:05 <_genuser_> Mavrik: note II, and galaxy s4. May 11 21:06:06 drose379, yes lol May 11 21:06:17 was very unhappy of tictactoe and floppy clones May 11 21:06:20 _genuser_, some of them configure builtin preview well by default May 11 21:06:23 some of them not as well May 11 21:06:43 SGS3, HTC m7 and some LGs were noticable outliers, especially for video recording May 11 21:06:47 Radther :) May 11 21:06:54 <_genuser_> Mavrik: interesting. my limited device list made me think it's just fine. however, I also noticed that snapchat's quality was even lower than my app's. May 11 21:07:01 Nexuses did well for us, newer Samungs (ignoring the retarded bugs) as well May 11 21:07:04 didn't test SGS6 tho May 11 21:07:11 <_genuser_> Mavrik: so I decided, people probably do'nt care as long as you can make out text, etc. May 11 21:07:21 yeah, of course, it's good enough May 11 21:07:30 snapchats quality was oddly low for a long time May 11 21:07:34 it seems much better now May 11 21:07:39 it pissed me off tho that I couldn't use high-fps mode on HTC cameras May 11 21:07:40 <_genuser_> Mavrik: I'll be testing more high-quality now, when I get a chance. May 11 21:08:02 if anyone has used times-square for calendars, i have a quick question: any idea how to use the same calendar instance for two different backing dates? ie. first state may have april 1-10 closed, and the second state could have april 20-30 closed, but have 1-10 open May 11 21:08:19 or for example HDR wasn't available before API 17 either May 11 21:08:29 so only default cam apps could do it May 11 21:08:31 how cna i check if my jdk is setup correctly? May 11 21:08:44 <_genuser_> Mavrik: that and iphone interface matching, that's probably why apps like snapchat keep it minimal. May 11 21:08:56 in_deep_thought, anyway, might wanna try with some kind of lib first, I've heard good things for cwc-camera May 11 21:09:15 madness lies in dealing with camera1 API :) May 11 21:09:16 Mavrik: I’ve heard he stopped maintaining that since camera2 came out May 11 21:09:18 JakeWharton: this might be a question for you, if you have time May 11 21:10:10 TacticalJoke i noticed this in the most recent tech radar http://www.thoughtworks.com/radar/techniques/long-lived-branches-with-gitflow May 11 21:10:15 <_genuser_> alright time to take a break May 11 21:10:52 TacticalJoke so i wonder then what alternative workflow they would use to replace the long lived integration branch. so they re-create it on each new iteration / etc ? May 11 21:11:07 in this case, integration branch being gitflow 'develop' May 11 21:11:16 in_deep_thought, yeah, you don't want to waste bunch of time figuring out just the correct set of params that makes all manufacturers happy by yourself May 11 21:12:16 Mavrik: sounds like I don’t have a choice if I want good camera experience across all android devices May 11 21:13:05 *shrug* Your funeral. May 11 21:13:47 not saying that I will attempt to do that. just that it sounds like the only option May 11 21:14:17 It's a costly process May 11 21:14:25 At one point we have 20 devices May 11 21:14:32 Can anyone think of a reason why in RetroFit neither the success() nor failure() methods are ever hit? Everything compiles fine. May 11 21:14:42 And still having bugs from random crap... so if you can ease that pain by using a library, do so. May 11 21:14:57 but there aren’t libraries are there? May 11 21:15:04 And all values in my CallBack object are still set to their initial values May 11 21:15:26 i mean other than cwac which is “slated to be re-written from scratch” looking here: https://github.com/commonsguy/cwac-camera May 11 21:16:27 tjbiddle is it in a unit test May 11 21:16:40 JacobTabak: Nope May 11 21:17:24 It is a non https endpoint and is one of the newer TLD's (.digital) - Not sure if that would affect anything May 11 21:17:27 Ciao All :) May 11 21:17:49 tjbiddle did you try executing the request synchronously May 11 21:17:51 when you select 'feedback' from youtube, there is an option to include screenshot and logs - anyone know how to do that ? May 11 21:18:23 not sure about that but check out https://github.com/mattprecious/telescope May 11 21:18:23 manually i guess May 11 21:18:45 JacobTabak: No, I haven't May 11 21:18:57 well that may be useful May 11 21:19:07 are you setting a custom executor? May 11 21:19:55 JacobTabak cool thanks May 11 21:25:06 is there any way to overlay info from one activity onto another. I want my app to use startActivityForResult() which goes to the default camera app, but while the pic is being taken, I want a small message across the camera activity to be displayed signaling my user for why they are taking a picture May 11 21:25:13 that point you realize, your UI (navigation architecture) needs to be completely reworked :( May 11 21:25:34 ^ May 11 21:25:44 g00s, well, I just found code in one of my older apps where I have a fragment, with listview with another fragment as a headerview May 11 21:25:54 I wish I could go slap my younger self. May 11 21:26:44 yo dawg May 11 21:27:41 Mavrik :) my app is complicated, it has a lot of interaction spaces (connected bt devices, dahsboards with data from multiple devices, logs of daat for each saved device, etc) ... its hard to get it just right, and it take a long time to redo if you get it wrong :( May 11 21:28:41 when code is so difficult to get right, emotional attachment sets in :D May 11 21:29:36 well thats nice youtube uses nav drawer and tabs, so i can ignore that guideline XD May 11 21:29:53 oh, unless then you get featured and then you are screwed May 11 21:30:04 'but, but , ... youtube does it' May 11 21:30:09 slap ! May 11 21:30:14 if everyone else does it, it's ok May 11 21:31:19 thepoosh was saying google rejected the first pass of their app because they did something like Keep May 11 21:31:30 rejected for feature May 11 21:34:35 pfn so what i'm hearing from adt-dev is, if i have app -> lib1 -> lib2 -> lib3 , and everything is minSdk=16 but lib3 is minSdk=19, i need tools:override on /all/ the manifests all the way up the chain ? May 11 21:35:05 Does anyone have any recommendations for building a backend for my app. The app (currently) stores pieces of text and images that the user has added into a locally persisted database. I am trying to find a service to help me sync this so that the user can't lose their data. May 11 21:35:17 g00s, I'm not sure, should only really be necessary in the top level manifest May 11 21:35:37 but depends on how the manifest merger is run May 11 21:35:47 if it runs for lib1 and lib2 individually, then yeah, it'd be a problem May 11 21:35:51 I'm currently looking at Couchbase as I heard about it recently. May 11 21:35:55 Radther: parse.com seems cool for something simple to get started May 11 21:36:00 but if it runs once for app, lib1 and lib2, then you should only need it on app May 11 21:36:25 pfn hmm, ok - does Jerome Dochez work on the tools team ? May 11 21:36:36 does that name sound familiar ? May 11 21:37:44 yiati: I forgot the name of this, thanks for reminding me. May 11 21:37:47 Radther, you could use cloud save of play game services, even if it is not a game May 11 21:38:05 or go for drive integration (which is done under the hood with cloud save but on a specific dir) May 11 21:38:05 Radther: I would use Parse. Already used it in production and enjoyed a lot. May 11 21:38:16 just think on "who" you want to depend May 11 21:38:42 sucks only way to configure ndk-build int/out dirs is by env var or Application.mk May 11 21:38:43 adq: I looked at some of Googles cloud stuff but it doesn't seem appropriate. May 11 21:39:03 Parse looks good, but a little OTT. May 11 21:39:04 it's not google cloud stuff May 11 21:39:05 but ok May 11 21:39:28 and cmake doesnt support setting environment vars on add_custom_commands() May 11 21:39:29 sight May 11 21:39:50 adq: By Googles cloud stuff I meant all the different things they offer, like the game service, drive, Google app engine and the app backup thing. May 11 21:39:51 g00s, not offhand, no, doesn't sound familiar May 11 21:39:58 ahhh oki doki :) May 11 21:40:19 cause they use similar terminology for different services, it can be confusing May 11 21:40:26 I think Parse is the easiest I have seen so far. May 11 21:40:47 ah nie i think gradle can do the ndk build tho May 11 21:41:02 That just makes gradle generate Android.mk May 11 21:41:08 ThinThread, what's your usecase anyway? May 11 21:41:17 Second question then, how should I handle conflicts like, for example, if users change things from multiple devices before they sync. May 11 21:41:28 Are there any good guides on handling that stuff. May 11 21:41:31 im trying to get all my bin/obj files in a diff dir May 11 21:41:40 i build desktop,iphone,android all out of same tree May 11 21:41:51 however android doesnt play nice with such a setup May 11 21:42:03 uh, good luck with that :) May 11 21:42:18 might wanna use a standalone toolchain and use the same makefiles as for the other May 11 21:42:29 still gonna be pain to handle all archs May 11 21:43:01 it works good for everything but android May 11 21:43:45 is there a max number for versionCode? May 11 21:43:52 Integer.MAX_INT ? May 11 21:44:13 danijoo: yes, I believe it's MAX_INT May 11 21:44:37 i was just wondering if somebody was ever stupid enough to upload an apk with that versionCode May 11 21:44:53 I suspect the answer is yes :) May 11 21:45:14 "is anyone ever stupid enough to _____" - always yes. May 11 21:45:19 (and no. I didnt) May 11 21:45:25 JesusFreke, good point :D May 11 21:51:45 or if someone had an automated build server publish MAX_INT versions of an app over night May 11 21:52:04 Which is why I would never let a build server do the actual publishing May 11 21:56:46 so how far did we get into the RAM discussion? May 11 21:57:32 that was all over the place May 11 22:01:35 if i am using appcompat, but have provided a custom drawable for the background, how do i go about getting the colorAccent to be used when active? May 11 22:02:42 Afzal: We determined to slap anyone asking that question May 11 22:02:48 pretty sure May 11 22:02:59 And then someone made an app to slap JakeWharton May 11 22:03:51 haha May 11 22:05:08 well, it's a interesting question to ask May 11 22:05:33 danijoo: oh, I remember what it was. Someone tried to use "-1" as their version code, and then they couldn't upgrade May 11 22:05:34 rendering large images is one of those problems where you do everything right, and something you never expected blows up May 11 22:06:21 because it wrapped to 2^32-1 May 11 22:06:26 iirc May 11 22:06:27 and then you have to start thinking about other abstract concepts & a little data structure work to get it right May 11 22:07:26 meh gradle not gonna work May 11 22:07:27 lol why did they use -1 JesusFreke May 11 22:07:51 no clue. it's just a vague memory, I don't even remember who it was :) May 11 22:07:58 guess i have to accept android build tools demand to use local directories against autotools paradigm of configure and make from binary diretory outside source dir May 11 22:08:08 YourKit doesn't do live Android app profiling right? May 11 22:08:11 Is it possible to hand the JsonStringer object multiple values? May 11 22:08:25 Multiple keys and values, that is. May 11 22:09:34 ie, stringer.object().key("key1").value("value1").key("key2").value("value2").endObject(); May 11 22:09:39 whoa, what happened to my beautiful logcat colors!? May 11 22:10:11 When I connect my android device, and try to run my via IntelliJ, it say "USB device not found". May 11 22:10:26 If I turn on "USB Mass Storage", the OS sees it fine. May 11 22:10:29 Suggestions? May 11 22:10:47 uhh May 11 22:10:53 Open your APK manager May 11 22:11:03 and see if Google usb driver is installed May 11 22:11:47 android-dev292: are you talking about on the Mac or the Android device? May 11 22:12:13 oh, you're on a mac? May 11 22:12:28 android-dev292: I am. May 11 22:12:36 sorry, out of my limited expertise. May 11 22:12:41 (I'm not even sure what the APK Manager is. May 11 22:13:14 It's the tool which you use to install different versions of android etc May 11 22:13:30 sdk manager* sorry May 11 22:14:21 so i have a ton of public static Strings to for all my database constants. SHould I just keep these in main activity, or would it be better to make a class with just these constants in them? May 11 22:14:33 ah. That I have. May 11 22:15:51 dcorbin, now look if you have the google usb drivers installed May 11 22:16:54 If not, install it. I had to manually update my usb drivers by going to my ( windows ) device manager, select the update manually by going to the location where androidmanager downloaded them, and select the driver from there. That fixed my problem May 11 22:17:51 Found it. The USB drivers are expicitly shown as "no OSX Compatible". Somehow the "on-device setting" was disabled. May 11 22:18:49 darn it :S May 11 22:19:03 Which device do you have? May 11 22:20:09 heater89 you may ve just discovered, selectableItemBackground does not respect activated state May 11 22:20:19 DadFoundMy: It's almost never a bad thing to separate code out May 11 22:20:37 Did anyone save drose's link? Didn't get to see it earlier. May 11 22:20:46 His TextView.setError replacement thing. May 11 22:20:48 DadFoundMy: And you definitely don't want your entire app in your MainActivity May 11 22:22:35 yiati: but it's just variables. is it okay to just have a class full of variables May 11 22:22:45 I dirt-cheap tablet out of Taiwan. May 11 22:23:05 TacticalJoke: https://vid.me/5R4y May 11 22:23:07 mnhh May 11 22:23:31 Thanks! May 11 22:24:00 Hmm, interesting idea. May 11 22:24:01 g00s: it seems if i put in my own selector for both default and activated states, the colorAccent isn't applied May 11 22:24:23 android-dev292: Did you figure it out yet? May 11 22:24:36 "If you're developing on Mac OS X or Linux, then you probably don't need to install a USB driver. To start developing with your device", straight from the docs. I have no idea buddy, perhaps somebody else could help you out May 11 22:24:38 TacticalJoke May 11 22:24:52 Help me with what? :D May 11 22:24:56 I was asking whether you had been helped. May 11 22:25:11 Yeah, wasn't aimed towards you sorry :D May 11 22:25:15 i wanted to answer your call May 11 22:25:21 after i answered dcorbin's May 11 22:25:37 I figured out my stupidity, my php script wasn't returning any JSON... I commented out every line so that's why i didn't get any response. May 11 22:25:51 <_genuser_> that'll do her May 11 22:26:24 It worked after flippng the right on-device setting. May 11 22:26:34 oh, sweet dude :D May 11 22:26:50 DadFoundMy: yep, for example you could have a SomeKindOfConstants.java class May 11 22:27:21 DadFoundMy: And make the fields static final May 11 22:27:38 I still don't know how to send data with the call though, i tried JSONStringer but i'm not getting anything. http://pastebin.com/D0G8eU5K , i tried that without any success May 11 22:30:15 adq, thanks, but i don't think it matters in this case. There is just no event for that button generated anymore, until you press and depress it again. You can also press and depress any other DPAD direction (or even an analog trigger), and it will work again. May 11 22:30:55 It also only happens with DPAD buttons, if it's any ohter normal button that is held while an activity/dialog opens, it will automatically get a release event before the dialog opens. May 11 22:36:55 hmm ApplicationThread leaks a service instance May 11 22:37:02 looks like an SDK leak :/ May 11 22:37:37 Ugh. /r/cringepics is slowly turning into "i'm female everyone!!! and all these loser guys keep hitting on me lawl!". May 11 22:37:54 lmao May 11 22:38:26 who tires of attentionwhores? nobody May 11 22:41:24 man, why is logcat in Android Studio so slow :/ May 11 22:41:47 Afzal i think it has to go through many tubes before it arrives at final destination May 11 22:44:22 g00s eclipse/ddms is still pretty fast May 11 22:44:51 Also `adb logcat`. May 11 22:44:58 yeah adb logcat is the fastest May 11 22:45:17 Hi all, could someone explain me the difference between "layout-w600p" and "layout-sw600dp", and what is the best to go with ? May 11 22:45:26 the fact that you can switch to terminal inside AS and do adb logcat amuses me May 11 22:45:31 maybe they could use that May 11 22:45:37 Afzal this is what heppens when you log something http://digg.com/video/take-you-bets-on-who-will-win-this-surprisingly-tense-marble-race May 11 22:45:54 g00s goes for anything really May 11 22:47:00 I'm rooting for the dark marble. May 11 22:47:47 Awesome result. May 11 22:49:02 fLm: It's here ("available width" versus "smallest width"): http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources May 11 22:49:42 that stuff still confuses me :D May 11 22:50:38 What's the method of getting the values entered in a settings fragment using getSharedPreferences May 11 22:50:39 Yeah, same here. If there is a follow-up question, I'll have to do research. :D May 11 22:51:11 here's the settings.xml May 11 22:51:12 TacticalJoke: But i don't know when i need to use which one :) May 11 22:51:13 http://hastebin.com/ewejiyimul.xml May 11 22:51:26 Bolto http://stackoverflow.com/questions/5946135/difference-between-getdefaultsharedpreferences-and-getsharedpreferences May 11 22:53:06 so I can use getSharedPreferences(R.xml.settings, 0) May 11 22:54:25 R.xml.settings being my settings.xml file May 11 23:11:09 http://pastebin.com/JHMtHb6V May 11 23:11:22 this code which should load random image from google May 11 23:11:30 Anyone ever have issues with LogCat pointing at the wrong application/class? May 11 23:11:33 catches error May 11 23:11:35 why is that? May 11 23:11:39 running in the emulator May 11 23:11:44 In Android Studio* May 11 23:12:25 lostProgrammer: Have your catch print out what the message is May 11 23:12:39 this is what i'm doing now... May 11 23:12:53 lostProgrammer: Your catch block is empty May 11 23:13:09 I will debug it if I knew how May 11 23:14:07 Log.d I guess May 11 23:14:36 lostProgrammer: Log.d("My-Tag", e.toString()) May 11 23:14:53 Otherwise you're just eating the error. No other way to get information. May 11 23:15:17 android.os.NetworkOnMainThreadException May 11 23:15:21 this is what I got May 11 23:15:33 network stuff must be threaded? May 11 23:15:40 lostProgrammer: Yes, use AsyncTask May 11 23:15:46 Otherwise you'll lock your UI May 11 23:15:54 ok ty May 11 23:16:19 Technically to log the error you'll want to do something like Log.d("TagName", "Error while doing foo", e); May 11 23:16:53 lostProgrammer: That try { ... } catch (Exception e) { /* nothing */ } thing is really bad. May 11 23:17:31 lostException May 11 23:17:38 I guess someone already said that (just scrolled up). May 11 23:17:57 lostProgrammer: Also, use OkHttp. It's way better. May 11 23:18:36 And Okio May 11 23:18:42 If you get JSON back you may even just go full-blown retrofit May 11 23:19:19 ^ got pinged 3 times May 11 23:19:25 :( May 11 23:19:46 ? May 11 23:19:48 Can someone tell me what I'm doing wrong here? Refreshing my java and am banging my head on the desk (RetroFit): https://gist.github.com/thomasbiddle/3513170aca6b7bfbfe81 May 11 23:20:11 If I debug it - I'll see the userId, userName, etc getting set. But then it's empty later. May 11 23:20:13 So example: May 11 23:21:06 I'm creating a InitUserCallback object in my main class, calling my retrofit method and passing it this object, and later on it's still empty (I'm having it sleep for 5 seconds for good measure) May 11 23:21:29 Thread no sleepy :( May 11 23:21:47 yiati: Why wouldn't it though? May 11 23:22:00 Why are you using sleep when you are getting a callback? May 11 23:22:09 Thorbear: Just to debug this May 11 23:22:26 Am I using this improperly to begin with? May 11 23:22:42 The idea that I have a callback and am setting information on it when getting a successful call? May 11 23:22:46 Thread.listenToBedtimeStory(); Thread.sleep(7 * 60 * 60 * 1000); May 11 23:23:57 Looking at material design guidelines, they show that the hero image should be a 16:9 image. How do I create that on a screen? Any way to do that in xml? May 11 23:23:58 yiati: Tested it - it's sleeping May 11 23:24:40 tjbiddle: Either success or failure will be called once the network request completes. It will happen, unless your thread/process/app has died. Why are you sleeping? Can't you just wait for the log entries to appear? May 11 23:25:03 my onPause (with unregister stuff) is getting called shortly after onResume.. but I only have one fragment.. what could be wrong? May 11 23:25:21 err *activity May 11 23:25:25 tjbiddle: I was just saying that you shouldn't be thread sleeping, there's no reason to do that May 11 23:25:47 Thorbear: I'm sleeping so I can debug this. Because the callback object is never getting the values set that it should actually have - whether immediately, 5 seconds later, or 10 hours later. And I don't know why May 11 23:26:05 The log entry from success() appears fine May 11 23:26:18 But the value was never set as I'm expecting afterwards May 11 23:26:44 drkfdr: What is triggering onPause? May 11 23:26:47 tjbiddle: Why do you need an instance of a callback? May 11 23:27:19 yiati: Is there a better way to do this? How else can I get the information from the API call that I want? May 11 23:27:37 Singleton pattern and set it somewhere from the callback? May 11 23:27:46 tjbiddle: Sleeping is not helping the situation. If you do sleep in android, chances are high that you're doing something wrong. If the log entry from success is called, then the code has been executed. If isSet is not true, then you're probably looking at the wrong callback-instance. May 11 23:27:57 Pass the callback some other object that it would set stuff on? May 11 23:28:27 tjbiddle: I would not set anything on a Callback object, I would only ever look at success() and failure() May 11 23:28:28 TacticalJoke: I haven't found out. I tried commenting out code. perhaps it's because of debugging May 11 23:28:42 drkfdr: Activity.onPause is called right before the activity goes into the background. May 11 23:28:49 e.g., when the user presses Home. May 11 23:28:59 but it's in the foreground May 11 23:29:16 Thorbear: https://gist.github.com/thomasbiddle/abbeb0f2dd7f1e2ac8e6 May 11 23:29:17 Are you 100% certain onPause is being called? May 11 23:29:23 Same object, no? May 11 23:29:28 Try `Log.d("drkfdr", "onPause");`. May 11 23:29:35 it's in my logs, yes May 11 23:29:55 yiati: What do you mean "look at" success and failure? May 11 23:30:01 Those both return void May 11 23:30:02 perhaps it's from the previous debug task? May 11 23:30:07 Unless I missed a method May 11 23:30:11 tjbiddle: Shouldn't be instantiating a new Callback object, let Retrofit do that May 11 23:30:23 I don't see why debugging would change things. Is there a reason you think that? May 11 23:31:04 yiati: Okay; I can do that. But still confused on how I retrieve my API response May 11 23:32:57 tjbiddle: "@GET("/path/to/user") User getUser();" <-- That's an example of a method you would put in an interface May 11 23:33:26 no particular reason. it could be me overlooking something :) May 11 23:33:36 * drkfdr looks better May 11 23:33:56 tjbiddle: ""@GET("/path/to/user") User getUser(Callback callback);" <--- err like that to get a callback May 11 23:34:09 except void May 11 23:34:14 ^ May 11 23:34:20 :P May 11 23:34:30 yiati: Oohhhh, okay I think I get that. This is what I have right now in an APIService.java (separate file) https://gist.github.com/thomasbiddle/0ca57ef8667cc70845fb May 11 23:34:53 use @Query not @Path May 11 23:35:38 JakeWharton: Yeah - I fixed that in the first one, which is the only one I've been testing so far May 11 23:36:08 :thumbsup:u May 11 23:36:08 drkfdr: If you can't figure it out, post the Activity code. May 11 23:36:14 👍 May 11 23:36:16 tjbiddle: In this scenario, instead of sleeping, I would print the username to the log as a part of the success-log-message. May 11 23:37:43 another question: I'm trying to automatically pair a bluetooth device. when it goes to BONDING state, I need to do something? (it's a device that would show a pairing code on display, just need to accept) May 11 23:38:30 yiati: Awe, nvm. Got an error "Must have return type or Callback as last argument, not both." May 11 23:38:41 it seemed to have worked sometimes, but I can't get very reliable May 11 23:39:17 tjbiddle: I had a typo above that Jake corrected, use void for the method return type in the interface if you want to use a Callback May 11 23:39:32 yiati: Which puts me right back to what I had before? May 11 23:40:12 See my last gist May 11 23:41:49 tjbiddle: What line and file are you getting that error on? May 11 23:42:53 yiati: Which error? The last one I mentioned, the return or callback one, would not exist in my last gist. It would just bring me back to the original issue of I don't know how to get my actual response data from the callback. May 11 23:43:15 I'm feeling quite stupid now that I've literally spent my full day working on this >.< May 11 23:43:23 Seems so trivial May 11 23:43:29 "Got an error "Must have return type or Callback as last argument, not both."" May 11 23:43:52 That last gist you posted looks fine, if you changed something that's probably what is wrong May 11 23:43:54 yiati: Yeah - ignore that. As you said, it just needs to be void if providing a callback. May 11 23:44:05 That part is fine. We're just at my original problem. May 11 23:44:49 Do you have a RestAdapter instance to start making calls with? May 11 23:45:11 Looking at material design guidelines, they show that the hero image at the top of a layout should be a 16:9 image. How do I create that in my xml. Every device width is different, so I can't set a specific height in dp, but my width HAS to be match_parent... right? May 11 23:45:27 Should I not have these callbacks in separate files? May 11 23:45:44 eghdk: https://github.com/JakeWharton/u2020/blob/master/src/main/java/com/jakewharton/u2020/ui/misc/AspectRatioImageView.java May 11 23:45:46 yiati: Yes May 11 23:46:00 tjbiddle: That file you posted in the gist is almost all you need May 11 23:46:19 eghdk: https://github.com/JakeWharton/u2020/blob/master/src/main/res/layout/main_activity.xml#L29-L38 May 11 23:46:51 eghdk: https://github.com/JakeWharton/u2020/blob/master/src/main/res/values/attrs.xml#L7-L10 May 11 23:46:53 tjbiddle: Then you just make a RestAdapter instance, create an instance of that interface with the RestAdapter, and use that instance to make calls, and you pass in a Callback instance May 11 23:47:29 yiati: Doing that May 11 23:47:38 The calls all work fine May 11 23:47:39 Okay that's all you need, your done :D May 11 23:47:49 I'm miscommunicating something May 11 23:49:05 yiati: How can I: apiService.initUser("newUserTest", new InitUserCallback()); Log.d("TEST", theActualUserNameFromThatRestCallAboveHere); May 11 23:49:18 you can't May 11 23:49:28 JakeWharton: What should I do if I want a default image in there? I want to package my apk with an image, would I create an image for each dpi bucket? May 11 23:49:42 JakeWharton: What are the solutions I can work with then? Have a singleton class that the success() sets the data on? May 11 23:50:08 What do most people work with? I haven't run across an example for what I'm trying to do - but I feel like it's not an unusual use-case at all May 11 23:50:26 tjbiddle: you can put that Log in the success on the InitUserCallback May 11 23:50:35 yiati: I don't care at all about logging May 11 23:50:39 I need to work with the data from an API May 11 23:50:50 Logging is simply for debugging purposes May 11 23:50:56 Since I'm so confused on what's going on here May 11 23:51:09 right, you kick everything off from that success or failure callback though May 11 23:51:55 tjbiddle: You can only get that data from the api in the success method, or anything kicked off from the success method May 11 23:52:10 I know - which is why I was trying to create my own instance of the callback originally and trying to have success() set instance variables. But that doesn't work for whatever reason. So what does everyone else do? May 11 23:52:11 eghdk: you can use a big one and let it scale with scaleType=centerCrop May 11 23:52:16 tjbiddle: multiple solutions. Either you put the code to be executed directly in the callback, or you give the callback a weakreference to the activity where you have a method you want to be executed, or you broadcast an intent which an activity can listen for. May 11 23:52:46 eventbus, etc. May 11 23:52:48 JakeWharton: Would that be a good time to throw the big image into just the plain vanilla drawable folder? May 11 23:53:12 or would I use xxxhdpi or whatever its at now May 11 23:54:46 tjbiddle: I just wouldn't have any state tied to a callback instance. That state probably belongs elsewhere May 11 23:55:12 hence me saying I would only ever look at success/failure of a callback May 11 23:56:41 Should I just not being using callbacks in this case and instead use Asynctask? May 11 23:56:53 a Callback is async May 11 23:57:01 ^ May 11 23:57:13 you will gain nothing by using async task May 11 23:57:19 JakeWharton: Yeah - but one I can't control and isn't within the class I want to operate in - no? May 11 23:58:26 eghdk: you would want to favor the high densities if it was really larger May 11 23:58:43 I'm just going to go see if I can find some example that is similar to what I'm trying to achieve. May 11 23:58:46 Thanks for your help everyone. May 12 00:01:12 Alright JakeWharton I'll give that a try. Appreciate the help. May 12 00:11:51 * g00s ponders using SlidingPaneLayout; i almost never see this one in the wild though May 12 00:13:30 hm, maybe gmail is using it in landscape May 12 00:14:34 i think my plan to put tabs in slidingpanelayout in navigationdrawer would cause android to explode May 12 00:14:42 :/ May 12 00:15:38 "SlidingPaneLayout is distinct from a navigation drawer as described in the design guide and should not be used in the same scenarios. " May 12 00:15:39 pfft ! May 12 00:17:45 now all we need is a hotdog menu May 12 00:17:53 omg yes May 12 00:19:04 bacon menu would be three ~ stacked May 12 00:22:17 do I have to put the stupid iOS back button on my app like all those big apps ? May 12 00:23:41 The Up button makes it clear that we're on a secondary screen. It also enables going straight back to the parent in cases where Back wouldn't. May 12 00:23:52 It does feel redundant sometimes, though. May 12 00:26:23 well I'm using the top left corner for mode menu, to let the user select the mode, video or audio, a back button beside it would be dumb May 12 00:27:08 I guess I'll worry about it when I'm making the iOS version May 12 00:35:21 Have you started the iOS version yet? Just curious. May 12 00:35:57 nope May 12 00:36:41 I'm too lazy to create an iOS version of my app. :D May 12 00:36:48 And too apathetic. May 12 00:37:47 Also, once I switch to Kotlin and am in the honeymoon phase it'll be hard to look at other languages for a while. May 12 00:37:48 it should be easier to make for my app, you don't need to integrate ffmpeg or exoplayer or whatever May 12 00:38:14 try swift May 12 00:38:39 Is Swift the Kotlin of iOS? :D May 12 00:38:48 yes May 12 00:38:51 https://vid.me/8rP2 not yet done with the ui.... (endless circle) May 12 00:39:00 they say it's similar to Go May 12 00:42:26 does toLower (string) create string garbage? May 12 00:42:37 in a big loop i mean May 12 00:43:13 it probably allocates something May 12 00:44:08 Yeah, it allocates if something changed. May 12 00:44:20 argh May 12 00:44:33 return CaseMapper.toLowerCase(Locale.getDefault(), this, value, offset, count); May 12 00:44:33 << it does that which might allocate with: newValue = new char[count]; // The result can't be longer than the input. May 12 00:44:34 String is immutable, so we can always expect that. May 12 00:44:49 That looks cool, adq. May 12 00:45:06 also a new string at then as return value May 12 00:45:12 at the end* May 12 00:45:14 lasserix_: Why do you need to do this in a loop? May 12 00:45:20 search contains May 12 00:45:31 Hawaii contains haw nah it does May 12 00:45:42 but only if i to lower somewhere along the way May 12 00:45:51 maybe just use a temp char buffer each time May 12 00:54:15 I guess you could use regexes, but I don't know how efficient they'd be. May 12 00:54:51 Probably not very. May 12 00:55:23 hm, doing gmail in landscape (tablet layout) looks pretty tricky with the action bar May 12 00:56:11 lasserix_: String.regionMatches! May 12 00:56:28 then you have to offset it from start to n - matching.length May 12 00:56:31 Has an ignoreCase thingamajig. May 12 00:57:05 funny thing tho May 12 00:57:06 http://stackoverflow.com/questions/86780/is-the-contains-method-in-java-lang-string-case-sensitive May 12 00:57:14 apparently it is still faster than even regex! May 12 00:57:25 key is icing off those extremities May 12 00:57:55 Hmm, I think I'd expect regexes to be way, way slower than String.regionMatches. May 12 00:58:09 https://android.googlesource.com/platform/libcore/+/master/libart/src/main/java/java/lang/String.java#915 May 12 00:59:18 To be honest, if this were a big feature of my app, I'd be tempted to write the whole thing myself. May 12 00:59:29 Then you could have an awesome API and awesome efficiency. May 12 01:03:43 i did at my last job but the engine wasn't optimized enough before the company went "under" ironically May 12 01:05:20 Man, Kotlin is disappointing me with that "return \n if/when" thing not working. I hope they fix that. :\ May 12 01:07:22 TacticalJoke: uh? May 12 01:08:08 These two won't compile here: `return \n if (something) foo else bar` and `return \n when { something -> foo \n else -> bar }` May 12 01:08:53 TacticalJoke: remove \n =) May 12 01:10:30 icedp: Sometimes I want to write code that looks something like this: http://pastebin.com/PCgYkMkq May 12 01:11:14 don't May 12 01:11:25 Why not? It's reasonable (well, with braces) May 12 01:12:37 TacticalJoke: it works if return and if/when is on the same line May 12 01:14:10 That's the only exception I made in the Android style guide: you can omit braces if the rest of the statement fits on the same line May 12 01:14:12 Otherwise, braces mandatory May 12 01:14:18 Looks like Kotlin is actually enforcing that? May 12 01:15:25 I haven't noticed Kotlin forcing a lack of braces on me so far. May 12 01:15:48 @CedricBeust - personally, I think its a bad habit. https://www.cigital.com/justice-league-blog/2014/02/25/understanding-apple-goto-fail-vulnerability-2/ :) May 12 01:15:50 Yeah, I do like braces. I probably won't drop them. May 12 01:15:54 i assume from a parser's point of view it's ambiguous due to the newline May 12 01:16:10 Yeah, this issue doesn't occur with "=" and so on. May 12 01:16:25 It also doesn't occur if parentheses are around the entire 'return' statement. May 12 01:16:47 pigiman: That failure happened because of a bad paste, not because of fautly code conventions May 12 01:16:59 Is it? May 12 01:17:10 nevertheless, I agree that you should use braces all the time, I just made a one time exception for the Android style guide as long as the statement fits on one line May 12 01:17:30 I made this exception mostly for log statements May 12 01:17:44 JakeWharton: do you use SyncAdapters? May 12 01:17:53 no May 12 01:17:57 I think that once you have braces your teammates and yourself will have a more readable code. Anyway up to you May 12 01:18:10 pigiman: Isn't that what he's arguing? May 12 01:18:13 Or something. May 12 01:18:27 if (Log.DEBUG) Log.d(TAG, "Foo") is a bit more compact than when you have to spread it over three lines, especially if you log a lot May 12 01:18:47 @TacticalJoke just saying to be strict about it, nothing more than that May 12 01:19:47 or have an opinion on them in general? May 12 01:20:42 it's a lot of ceremony just to get it working May 12 01:20:54 good idea, typical Android bad APIs May 12 01:21:02 Here's an alternative that compiles (with CB-friendly brace), but it's ugly: http://pastebin.com/rFh1ZTKN May 12 01:21:18 right, seems similar to what I had to jump through to use accountmanager and authenticator May 12 01:21:19 Hey guys, I want to make a a layout of blocks basically May 12 01:21:23 Let me return newline-if, dammit! :D May 12 01:21:27 Would gridview or TableLayout be better for that May 12 01:21:37 s/brace/braces/ May 12 01:21:39 TacticalJoke: no! May 12 01:21:41 TacticalJoke: the return line is a giant waste of space May 12 01:21:45 just fold the if up May 12 01:21:52 return if whatever something else something else May 12 01:21:53 Done. May 12 01:22:22 is there any alternative to a SyncAdapter then if there is a need to pull regularly (no pushed available etc) May 12 01:22:47 In this case, yeah, it's a waste, but I had a case the other day where not using such whitespace harmed readability. May 12 01:23:01 And I had to drop back to "if (foo) { return stuff } else { return otherStuff }" and was sad. May 12 01:23:52 I guess an alternative is just `val result = `. May 12 01:24:08 I'm wondering if you still need a content provider and loader and all that if you use a sync adapter, or if you can just work around that May 12 01:24:11 Actually, that'd still need a 'return'. May 12 01:27:36 joshkovach i've read you can work around it May 12 01:28:01 TacticalJoke: maybe you will like this fun returnSmth(): Smth = \n if (..) ... else ... May 12 01:28:10 icedp: I know the syntax. :p May 12 01:28:12 icedp are you using kotlin too ? May 12 01:28:29 g00s: not much yet May 12 01:28:31 In my scenario, though, I had to use a block body. May 12 01:28:53 Because multiple statements. May 12 01:30:21 TacticalJoke lol, what did this guy mean "Get out while you still can." May 12 01:30:25 I wish I still had that code. It was a really simpler parser written in Kotlin and then thrown away. Despite its simplicity, it was a nice little Kotlin "hello world". May 12 01:30:38 I thought of you when I read that, g00s. :D May 12 01:31:12 you can read it both ways, (1) run! (2) its so awesome you'll be sucked into it totally May 12 01:31:37 TacticalJoke :D May 12 01:31:45 #1 fo sho. May 12 01:31:54 haha May 12 01:32:06 +1 then :D May 12 01:33:18 At least Android developers aren't too affected by Stockholm syndrome. May 12 01:33:33 I've seen so many C++ people saying stuff like "C++ is actually a really neat and clever language; you just have to take the time to study it". May 12 01:33:48 but .. it is ;D May 12 01:34:00 jk, i dont want to use it again any time soon May 12 01:34:15 i'll check back at C++17 May 12 01:34:18 I'm amazed that I ever used it. May 12 01:34:43 TacticalJoke: I studied C++ for 20+ years, I always found it challenging and interesting but never neat May 12 01:34:44 now writing a parser for c++ is damn hard May 12 01:34:56 Yeah, it's the opposite of 'neat'. :D May 12 01:35:06 although writing a parser for perl is probably harder May 12 01:35:27 I find it interesting but largely from a psychopathology angle. May 12 01:40:57 yiati: JakeWharton: Got things working. For my use-case it was best to not use a callback as I required the actual response. I had multiple API calls that I was using with retrofit, so threw them all into an asynctask and moved my other activity logic into a separate activity that i started with an intent and bundled it with extra that included info from the api responses. Everything makes sense and looks clean imo for my use-ca May 12 01:40:57 Thanks again for your help; I just had a misunderstanding of what I needed done and what retrofit was doing. Appreciate the time you spent helping! May 12 01:43:22 tjbiddle aaaaaaa May 12 01:43:54 "it was best to not use a callback as I required the actual response" what does this mean? May 12 01:44:45 "I had multiple API calls that I was using with retrofit" - meaning you're firing off multiple requests at the same time? rxjava! May 12 01:45:53 JacobTabak: I needed the equivalent of `responseOfMyCall = myservice.myapicall()` but needed it in a background task obviously. The next api call that I had required information from the previous one. But I didn't want to throw that in the success() because that meant that if I ever needed that api call alone for some reason - it would be affecting extra things. So I made them synchronous calls and made my logic as a whole May 12 01:45:53 asynchronous. May 12 01:46:26 welp, gonna just say it, rxjava is meant for that May 12 01:46:35 and retrofit has built in rxjava support May 12 01:46:44 so might be worth taking a look May 12 01:47:12 https://www.youtube.com/watch?v=aEuNBk1b5OE#t=2480 May 12 01:47:18 that's jake giving a 5 minute lightning talk on the topic May 12 01:48:22 Maybe I've been too infected but these days, whenever I feel like create a new interface that's essentially a callback, I think "Why would I do that, I'll use an Rx subscriber". May 12 01:48:44 He said that he has one API call that depends on the results from another May 12 01:48:45 Even if you're not sold on Rx, its virtue is to introduce a universal callback interface so you never have to invent yet a new one. May 12 01:49:08 tjbiddle: Whatever works works, but I would try to stay away from AsyncTask. Callback already does everything asynchronously for you. Here's some random stackoverflow thread to give an idea how to work with Callbacks, http://stackoverflow.com/questions/21811999/best-practice-to-implement-retrofit-callback-to-recreated-activity May 12 01:49:18 So it's an even better use case than a regular rx callback :) May 12 01:49:36 Yo dawg, we put an async task in yer async callback. May 12 01:50:44 yiati: JacobTabak: https://gist.github.com/thomasbiddle/0d61dec8d19bf45a75c6 It's a proof of concept starting it directly from the main activity; could just as well have it startup from a button press obviously May 12 01:50:48 Will checkout the video! May 12 01:50:58 But lmk if my use-case there still doesn't make sense May 12 01:51:21 I had to google 'lmk'. May 12 01:51:21 TacticalJoke: Nah, just didn't use a callback at all May 12 01:51:42 I thought it was gonna be "like my [status]" or something. May 12 01:51:48 TacticalJoke: lmk what you find about it May 12 01:51:50 :D May 12 01:51:55 tjbiddle are you just sitting there with a blank screen while the api call executes? May 12 01:52:15 lmao May 12 01:52:48 Dag gummit, I wish abreslav would respond to my pings. May 12 01:52:51 JacobTabak: For now, yes. But again - this is a proof of concept. I could just as well have setup the layout and activated from a button instead May 12 01:53:21 tjbiddle you should implement toString() on your InitSession object May 12 01:53:34 rather than adding 5 debug lines for each field on it May 12 01:53:36 This is just a dummy app to test out TokBox more than anything + have it work with some dummy serverside logic that needed retrofit May 12 01:53:45 :P May 12 01:54:04 JacobTabak: Heh, noted :p May 12 01:54:05 Also, make InitSession implement Parcelable and pass it as an intent extra directly May 12 01:54:18 (use AutoParcel, it will do both of those things for you) May 12 01:54:24 JacobTabak: That one sounds neat May 12 01:54:27 Will check into that May 12 01:54:41 but yeah - this would be so much better with rxjava May 12 01:54:52 It would be May 12 01:55:07 but at least getting away from the AsyncTask would be a good start :D May 12 01:55:43 I see AsyncTask as just a stepping stone. Like one of those $30 guitars you buy as a kid. May 12 01:55:57 And the neck snaps after a while. May 12 01:57:30 This is how it would look with rxjava tjbiddle. More or less. No AsyncTask. http://pastebin.com/Lk4zqR8Q May 12 01:58:07 I put in lambdas rather than anonymous inner classes for brevity May 12 01:58:38 sold yet? May 12 01:58:54 JacobTabak: Have you checked out Kotlin? May 12 01:59:03 JacobTabak: Yes, this looks a lot like how I use Retrofit. Except there's usually an observeOn() in there, either on the main or background thread depending on what needs to be done May 12 01:59:15 tjbiddle: Also you can make the service a singleton May 12 01:59:27 The service is provided by Dagger 2 May 12 01:59:29 In this case it wouldn't be necessary since retrofit dispatches on the IO thread by default, and activities can be started from any thread :) May 12 01:59:47 TacticalJoke yes May 12 01:59:48 Yup May 12 02:01:03 you have your own wikipedia page cedric May 12 02:01:28 i'm jelly May 12 02:01:44 That's what happens when you get a phd and write 2 books May 12 02:01:56 JacobTabak: Heh :) Will check into that. So rxjava can be used in most (if not all?) cases where Asynctask can be used? May 12 02:02:07 And what are the pros/cons exactly? May 12 02:02:09 tjbiddle: And then some yep May 12 02:02:18 * tjbiddle googling May 12 02:02:22 tjbiddle: To be fair, Rx by itself doesn't really address the problems that are often blamed on AsyncTask May 12 02:02:25 tjbiddle: There's a learning hurdle, but I think most people here would say it's worth it May 12 02:02:28 Yes. I can say with confidence that the vast vast majority of developers i'm acquainted with use rxjava over asynctask every time May 12 02:03:21 Config changes are as problematic to handle with Rx as they are with AsyncTask. However, Rx has a saner and more predictible thread policy than AsyncTask (which changed a lot over versions of Android) May 12 02:03:33 Cool. I'll throw it on my reading list for when I have some time to play with it. May 12 02:03:37 CedricBeust: config changes such as? May 12 02:03:40 There are several levels of rxjava-fu. Retrofit + (flatMap / map) is reason enough to use it, even if you don't understand the nuances of stream processing May 12 02:03:53 tjbiddle: device rotation / activity restart May 12 02:03:58 sorry to hijack your answer May 12 02:03:59 tjbiddle: Well, config changes means something very specific on Android: portrait/landscape, ... May 12 02:04:30 There is no clean way to do the right thing automatically even with Rx today May 12 02:04:54 yeah, i find it very frustrating May 12 02:05:20 also frustratingi've been looking for a silver bullet for 5 years now May 12 02:05:21 Yeah. I pretty much just use services in the rare case that I have a request thats important enough to need to survive a configuration change May 12 02:06:33 http://developer.android.com/reference/android/app/Activity.html#createPendingResult(int, android.content.Intent, int) May 12 02:07:22 quick help with json please May 12 02:07:25 That's the problem with using method overrides for lifecycles: it's impossible for a library to step in and provide a comprehensive solution besides "Just extend this class" May 12 02:07:34 how would I parse this json to get the "url" fields? May 12 02:07:35 https://developers.google.com/image-search/v1/jsondevguide May 12 02:07:39 I tried everything May 12 02:07:57 if you tried everything then it's impossible May 12 02:08:00 ^ May 12 02:08:04 I tried alot May 12 02:08:16 do you have a specific question? May 12 02:08:20 close your laptops and let's head to the pub, this thing is impossible May 12 02:08:21 yes May 12 02:08:33 Okay we can help with specific questions May 12 02:09:53 the json is inside a JSONObject and when I make a new JSONArray with the feild "results" I get nothing inside the array May 12 02:11:06 org.json.JSONException: No value for results May 12 02:11:20 what does the jsonobject have to do with the new jsonarray you make? May 12 02:11:26 but it clearly say there are fields in "results" May 12 02:11:35 so would I be ok flashing an lg g2 vs98012B to a vs98027A with the kdz method? May 12 02:11:35 new jsonarray objects are not going to have anything in them May 12 02:12:14 chris11: probably an #android-root question May 12 02:12:19 lostProgrammer: You might as well post the code you've tried. May 12 02:12:19 chris11: maybe #android-root wis a more applicable channel May 12 02:12:35 alright thanks. May 12 02:20:42 hello! I've read that gradle 2.4 has some speed improvements, anyone tried it with android ? May 12 02:22:22 gordon_ i'm using it. don't notice too much May 12 02:22:43 dexDebug still takes 45 seconds :) May 12 02:22:43 i don’t see a difference either May 12 02:26:07 For me, gradle 2.4 gives me an NPE while 2.3 works just fine May 12 02:26:21 Not sure what kind of quality control they use at Gradle but it obviously needs some work May 12 02:26:37 CedricBeust are you using the kotlin plugin ? May 12 02:27:00 g00s: Yes but not for this error, it's 100% a Java project May 12 02:27:33 aren't the speed improvements purely around configuration? May 12 02:27:34 I modify the gradlew wrapped from 2.3 to 2.4 and I get an NPE May 12 02:27:40 wrapper* May 12 02:27:51 not sure why everyone is all uppity about the improvements May 12 02:28:26 if i can get to my car in the driveway 70% faster but it's before a 100 mile trip I'm not exactly giddy May 12 02:32:12 why did google image api search with java only give me 5 results? May 12 02:32:50 does it cost money to get more? May 12 02:33:24 the json I'm getting is very short May 12 02:34:51 i would like to use the gradle parallel builds thing, but my subprojects are 'coupled' because i use allprojects { } May 12 02:35:41 what isn't clear to me, is if my root project has an ext { } block with constants defined in it, and the subprojects say rootProject.ext.foobar whether that is still coupled May 12 02:37:14 oh it's deprecated May 12 02:39:43 transitioning oldjob’s CI from ant to gradle was a massive, massive pain in my ass May 12 02:39:53 and every gradle point release breaks things so slightly May 12 02:40:42 im going thru that exact pain right now May 12 02:40:45 usgrant: I'm with you there, gradle is very, very counter intuitive. And the web is filled with outdated information, which the official gradle doc doesn't help with May 12 02:40:45 and its the fucking worst May 12 02:41:16 searching for hours and 30 trial/errors to find magic build.gradle lines May 12 02:41:41 and the gradle docs are so amazingly voluminous, yet so ... useless at the same time May 12 02:42:04 g00s: thank you for the answer, so no point to moving to 2.4 May 12 02:42:06 right now im tryng to figure out how to add https://github.com/playgameservices/android-basic-samples/tree/master/BasicSamples/libraries/BaseGameUtils to my build.gradle May 12 02:42:17 i wanted to implement auto-incrementing version codes in gradle for currentjob’s CI May 12 02:42:20 massive pain in my ass May 12 02:42:22 the problem is probably android plugin, not gradle itself May 12 02:42:33 altho if push came to shove i could just not use BaseGameUtils and implement it myself, becasue its too hard to have library dependencies in gradle apparently May 12 02:43:01 i'm pretty sure the guy who wrote the directions the Holy Handgrenade (in monty python's holy grail) wrote the gradle docs May 12 02:43:40 hey people, i'm looking into using ZXing's Barcode Scanner in a Fragment, but i'm using gradle, does anyone have any experience with it? May 12 02:43:59 also its only the res/val/strings.xml that preventing me from adding the .java May 12 02:44:09 but its frustrating that cant figure out something so simple May 12 02:44:25 and foreboding of the day i ever need to do something unusual May 12 02:44:47 ReScO: https://github.com/journeyapps/zxing-android-embedded May 12 02:47:51 Is anyone else concerned how google is taking android hostage essentially by forcing people to submit to google play services May 12 02:48:59 im too preoccputed with their contined api breakages May 12 02:49:59 question regarding this if anyone is willing to help me understand something: May 12 02:50:01 http://forum.xda-developers.com/nexus-9/help/warning-locking-bootloader-disabling-t2951312 May 12 02:50:01 usgrant: it's possibly not supporting the Aztec barcode type... May 12 02:50:12 question is: if a person Enables OEM Unlock, then unlocks bootloader, then accidentally disables teh "enable OEM unlock" check ~and does nothing else~. Is that sufficient to cause this issue? Or does one ahve to fastboot oem lock in addtion to the checkbox to bork it? May 12 02:50:29 funkyb wrong channel, see topic May 12 02:50:30 desmin88: yes, but android has way bigger issues May 12 02:50:49 g00s, android root is like a soundproof room, no response. May 12 02:50:53 alas, I will go now. May 12 02:51:00 I'm suprised how android watches are useless May 12 02:51:30 they are.. simply showing notifications... May 12 02:51:55 and you still need to be paired with your device May 12 02:52:53 gordon_: that's the whole point, moving your notification drawer to your wrist May 12 02:52:56 usgrant what issues do you think google needs to address? May 12 02:53:40 ReScO: guess I'm getting old... May 12 02:54:50 Anyone know how I can get into the Elite Android Study Group? :) May 12 02:55:53 it's easy you need: virgin blood, silver cones and garlic May 12 02:56:27 it’s a pipe dream, but i would love it if google could stop samsung from being bad May 12 02:57:17 honestly most of my issues as a dev these days stem from bizarre issues that only happen on {device i don’t happen to have handy} May 12 02:57:30 reddit ffs fix your 503's May 12 02:59:05 The only device I see fit supporting is the one I decided to buy and use. :) May 12 02:59:15 heh. if only May 12 02:59:25 lol **** ENDING LOGGING AT Tue May 12 02:59:59 2015