**** BEGIN LOGGING AT Mon Feb 22 02:59:58 2016 Feb 22 03:03:19 Say im using retrofit and have the service interface like MyService and then a few model classes for the response. If im packaging by feature, should I include all of these inside the specific feature they pertain to? Or keep them in a package like "api"? Feb 22 03:23:48 wish someone would turn registered nicks for this channel.. Feb 22 03:25:56 ugh, even TI's sensortag app crashes - can't even update the firmware on the damn thing Feb 22 03:41:55 hey guys i have this a color hex value 00ff00 i want to add in hexadecimal code 0x and a transparency 55 to make it all 0x5500ff00 into an integer i can use int color = Integer.valueOf("0x55" + hex); to use in polygon fillcolor but i'm getting invalid int numberFormatException Feb 22 03:42:58 hert hm, why not use http://developer.android.com/reference/android/graphics/Color.html#argb(int,%20int,%20int,%20int) Feb 22 03:44:23 i' m trying to add transparency to the polygon drawing fillcolor Feb 22 03:45:09 don't add the transparency via a string concat, it will be slow Feb 22 03:45:46 you can use something like: int argb = 0x55000000 | 0x00FF00 Feb 22 03:47:56 out of curiosity, has anyone here used Hired.com? Feb 22 03:48:09 i have the color int value for fillColor() but how do i add transparency to it? Feb 22 03:48:11 nope Feb 22 03:48:27 They sent me a test haha, trying to prepare Feb 22 03:49:03 ugh Feb 22 04:29:29 Guys I have a recycler of "twitter items", and some of the twitter items will contain images. Performance wise, is there a difference between creating a seperate viewholder for twitter items with images, or should i use a ViewStub and inflate an imageview on the items that need it? Feb 22 05:08:21 orbyt_: why not create one item Feb 22 05:08:29 and only set visibility if image is there ? Feb 22 05:08:41 (visibility of imageview) Feb 22 05:09:05 Hah yea thats what I just did. Feb 22 05:09:29 Figured it would be one less view to load if not needed though Feb 22 06:38:26 hi, here is my code -> http://pastebin.com/VVLNzpzx its the main loop inside service. my problem is its eating my ram. why gc doesnt free the memory? Feb 22 06:39:23 if you are constantly allocing and freeing objects Feb 22 06:39:28 gc just cant keep up. Feb 22 06:39:44 even after 10 mionutes? Feb 22 06:41:37 also, i set the SystemClock.sleep to 1000 and didnt help Feb 22 06:41:49 hmm not too sure whats going on then Feb 22 06:42:01 is dagger useful, or just confusing? I can't tell yet lol Feb 22 06:42:11 both Feb 22 06:42:46 so how i can reach my server without eating the ram? Feb 22 06:43:57 well maybe thats enough coding for today Feb 22 07:00:02 hello Feb 22 07:00:14 how do I set the working dircetory for my project? Feb 22 07:00:17 *dircetory Feb 22 07:00:36 this is currently "/", but this looks strange to me Feb 22 07:06:34 does someone can help me? why its eating my ram? http://pastebin.com/VVLNzpzx Feb 22 07:08:19 hi, I have a helper class instance of which i create in an activity. This activity has ListFrgment in it, so I want to somehow pass an adapter from an instance of the helper class to ListFragment, and I'm confused about how i should handle that, can anybody give a hint? thanks in advance, hope question is clear Feb 22 07:09:16 you are essentially making infinite seperate calls to 127.0.0.1 you should only make a new call when you need to. Bored look at http://developer.android.com/training/articles/memory.html Feb 22 07:10:38 tushigushi: singleton Feb 22 07:14:53 Ping_2_Ur_Pong i want to check for updates on server every 3 sec, this is why so many calls. do you know a better way? Feb 22 07:15:36 how do I set the working directory for my android project from command line? Feb 22 07:15:51 depends on the server implementation, if you're connected to the server have the server notify you when there is an update. Feb 22 07:16:21 hmm... one sec Feb 22 07:16:26 cfoch: that is googlable Feb 22 07:17:42 Ping_2_Ur_Pong: i dont find info about how to do it in command line Feb 22 07:18:24 you're building from the command line? Feb 22 07:19:53 Ping_2_Ur_Pong: yes, I use "ndk-build all" Feb 22 07:20:49 http://stackoverflow.com/questions/14156596/ndk-cant-find-the-application-directory Feb 22 07:23:06 Bored sounds like you need more than just a one time connection to the server, you need to persist your connection. Have the server notify you when there is no information to be downloaded, because making a call once every 3 seconds just doesn't make sense IMHO. You'll do it no matter what even when there is nothing new, and if your server implementation returns the same informaiton you already have Feb 22 07:23:08 you are wasting resources badly. Feb 22 07:24:02 If I were forced to make the call because the server implementation won't change, id find something that gives me the information I need and instead of making a AsyncTask that I keep throwing away I would keep one around and keep making calls with it. Feb 22 07:24:58 hmm... maybe not asynctask... me needs to think that part through. You need a way to not throw your connection away everytime, that's very wasteful if you know you are going to be making that call again in 3 seconds. Feb 22 07:27:43 i would know why reflection still working with ART ? Feb 22 07:31:10 Bored: http://hmkcode.com/android-cleaner-http-asynctask/ Feb 22 07:35:49 Ping_2_Ur_Pong thanks for help! Feb 22 08:08:47 Ping_2_Ur_Pong i tired using URLConnection insted, but it get stuck on url.openConnection() Feb 22 08:12:23 I am having an issue with building source where when I run "make -j8 bootimage" I am getting permission denied errors Feb 22 08:13:17 when I run it with sudo like "sudo make -j8 bootimage" it forgets the build target and builds the generic image instead Feb 22 08:14:39 I guess it is reading different data when used with sudp Feb 22 08:15:03 try sudo -i Feb 22 08:15:09 then move to the directory and see Feb 22 08:15:28 Bored, let me see the code, what do you mean by you get stuck at url.openConnection()? Feb 22 08:19:00 Ping_2_Ur_Pong http://pastebin.com/tDELynY9 Feb 22 08:19:23 running it with sudo -i results in it building the generic image again. I believe this is my problem, but I have no clue how to fix it Feb 22 08:19:37 forgot link, my bad: https://groups.google.com/forum/#!topic/android-building/sHt9ITfBNCE Feb 22 08:19:43 aeppacher_: I didn't mean run it with sudo -i Feb 22 08:19:58 I meant type sudo -i and navigate to the directory and then build it. Feb 22 08:20:14 sudo -i opens up a new interactive shell that is set as root Feb 22 08:22:37 Ping_2_Ur_Pong do the file navigation commands change when in the root shell? I tried ls and no directories were listed Feb 22 08:25:01 Bored go to your command line and type curl ie... the url you are trying to connect to Feb 22 08:25:12 aeppacher_: no your navigation commands stay the same. Feb 22 08:25:29 so is ther any reason why my files would all be gone? Feb 22 08:25:39 at least from the perspective of the root shell Feb 22 08:25:52 type ls -al / Feb 22 08:25:59 see if you see your files Feb 22 08:26:11 then when you navigate to the directory you want to build from do ls -al Feb 22 08:26:31 Ping_2_Ur_Pong i am using windows Feb 22 08:27:17 you need to make sure that what you are trying to do is actually there, though url.openConnection to fail. What's the exception that's getting thrown and message attached? Feb 22 08:27:29 * Ping_2_Ur_Pong assumes everyone codes on *nix Feb 22 08:28:05 i dont get exception this is the problem. i start debug then its stuck there Feb 22 08:29:07 switch out the url you are connecting to, to something like google.com and see what happens. Feb 22 08:29:18 itll give you an indication of it has something to do with your url. Feb 22 08:29:35 Exceptionandroid.os.NetworkOnMainThreadException Feb 22 08:30:11 why it needs to be Async ? Feb 22 08:30:20 aeppacher_: look at https://source.android.com/source/known-issues.html Feb 22 08:30:58 you can't do network on main thread, anything that isn't UI shouldn't be done on main thread. Yea setup an AsyncTask or a Thread. Feb 22 08:31:46 think of it like this, if you go to your site and want to download a 50MB file, the user has to wait for that file to finish and while its downloading it seems as if your application isn't responding, its a terrible user experience. Feb 22 08:32:23 my app is service and will never be shown so its fine for me :) Feb 22 08:34:49 Bored the UI thread is used for the entire UI, not just your app, so if you do network downloading, the phone will freeze up until the download is complete Feb 22 08:35:00 you will need to implement an Asynctask like ping said Feb 22 08:37:18 aeppacher_ yea i can see it happens, but when i use Asynctask it eats my ram. even the way he suggested me Feb 22 08:38:22 probably asynctask is leaking then Feb 22 08:39:25 Hi Feb 22 08:39:35 ohai Feb 22 08:39:42 are you closing the thread when you are done? Feb 22 08:40:10 or, do you download things into memory first before saving to file Feb 22 08:40:30 I want to make custom camera and setting buttons on 'top' of camera view. Will I likely get resolution issues in variety of android devices? Feb 22 08:40:58 i only reach to text file, and update static String Feb 22 08:41:26 resolution issues? of the camera or the layout Feb 22 08:42:16 Ashiren, both Feb 22 08:42:44 here is the code http://pastebin.com/VVLNzpzx i changed sleep to 3000. how i can close thread? Feb 22 08:43:43 Ashiren, heres what I want http://www.tagooapp.com/images/1st-slide.jpg Feb 22 08:44:03 the transparent black overlay and buttons Feb 22 08:46:14 it add 100kb ever sec to my ram -.- Feb 22 08:46:46 Bored, how large of a file are you downloading? Feb 22 08:46:56 anyone? Feb 22 08:47:14 Voyage: it wont be much different than supporting 'normal' layouts to different phone sizes Feb 22 08:47:55 aeppacher_ this file atm contaion 4 Bytes = String: Feb 22 08:47:58 "12" Feb 22 08:48:15 Ashiren, do I need to handle surfaceView? Feb 22 08:49:18 it doesnt make sense at all Feb 22 08:49:33 well mostly camera uses surfaceview for preview Feb 22 08:51:48 and then lolipop introduces brand new camera2 api yay Feb 22 08:51:56 Ashiren, can I use full screen view on All android devices and overlay my own custom made buttons at bottom. (just like in picture). I heard that it might squeeze or expand the picture) as not all devices show full screen camera view Feb 22 08:53:31 yes you may use fullscreen activity and put any view that would fit into activity Feb 22 08:53:43 and overlay another views on the view Feb 22 08:57:12 Bored, I'm sorry I don't really know whats causing the problem Feb 22 08:58:08 Does anyone know how to substitute a kernel binary in to aosp so you can make a bootimage? I am using the TARGET_PREBUILT_KERNEL variable, but I keep getting this error Feb 22 08:58:16 make: *** No rule to make target `android/source/device/huawei/angler-kernel/msm/arch/arm64/boot/Image.gz-dtb', needed by `out/target/product/angler/kernel'. Stop. Feb 22 09:01:01 aeppacher_: #android-root Feb 22 09:01:09 thanks Feb 22 09:06:04 Ashiren, what if theres a mismatch of screen view (full size) resolution and camera picture resolution? Won't it get stretched / squeezed? Feb 22 09:06:36 yes it will Feb 22 09:06:45 and might look meh if the ratio isnt the same Feb 22 09:07:04 Ashiren, so the picture will not comeout good? Feb 22 09:07:17 so it would be up to you how to handle this, i.e. adding borders on sides Feb 22 09:07:29 preview might look ugly Feb 22 09:07:33 but picture will be ok Feb 22 09:09:08 thats exactly the point I am trying to understand. So the difference is the a)frontscreen (full mode) resolution in pixels and b) ? Feb 22 09:12:08 Ashiren, ? Feb 22 09:12:38 Voyage what are, in your understanding, resolution issues? Feb 22 09:14:49 Ashiren, trying to understand what Ashiren just said Feb 22 09:15:04 jvrodrigues, trying to understand what Ashiren just said Feb 22 09:15:50 what is there to understand? Feb 22 09:15:59 I mean, what is the problem here? Feb 22 09:16:05 cameras support different previews Feb 22 09:16:19 different preview resolutions I mean Feb 22 09:16:41 but they should have the same ratio accross devices Feb 22 09:16:46 even if they dont Feb 22 09:16:58 the most that will happen is the preview looking like shit on shit devices Feb 22 09:17:19 however you can adjust the preview size according to the image ratio Feb 22 09:17:36 does that make sense to you? Feb 22 09:19:05 Voyage: sry was afk Feb 22 09:19:32 preview picture and the picture taken by camera (when you press) are 2 fidderent things Feb 22 09:19:40 yes Feb 22 09:19:42 different* Feb 22 09:19:44 oO Feb 22 09:33:01 does the application also wrap the ContextImpl or does it use another implementation? Feb 22 09:34:56 I am trying to make my LoaderCallback static as it is an inner class right now and I have a memory leak caused by a context. Now I have the problem that the loader calls methods such as setListAdapter(), which are part of the Fragment. How can I refactor this in a way such that I can make the loaderCallback static? Feb 22 09:35:31 easy Feb 22 09:35:34 you stop using loaders Feb 22 09:35:37 shit api Feb 22 09:35:45 barq: I'm not sure LoaderCallbacks are supposed to be static Feb 22 09:36:26 jvrodrigues: it's better than managing your own query Feb 22 09:36:45 no it isnt :/ Feb 22 09:41:09 I have the following GC path but cannot figure out where the leak is coming from https://ghostbin.com/paste/f5ou2 Feb 22 09:49:21 weell this is interesting, setting onItemSelectedListener on a spinner makes it not unclickable :p Feb 22 09:49:42 so it makes it clickable? Feb 22 09:52:34 jvrodrigues> the most that will happen is the preview looking like shit on shit devices <- why and I think I have to adjust cameraview on screen for that? Feb 22 09:52:55 Ashiren> preview picture and the picture taken by camera (when you press) are 2 fidderent things < - got it Feb 22 09:53:07 Ashiren, I want to streamline the preview too Feb 22 09:53:17 jvrodrigues, Ashiren across All devices Feb 22 09:53:35 because if you have a set size for your surfaceview and the ratio is different from the camera preview it will look stretched or shrinked Feb 22 09:56:35 jvrodrigues, urf, brainfart Feb 22 10:00:19 but yea, setting click listeners also makes whatever view clickable Feb 22 10:03:23 jvrodrigues, ok. Any solution else than having borders or changing you 'preview' (according to camera)? Feb 22 10:03:50 you could go instagram style Feb 22 10:04:15 render the preview on teh correct ratio and just overlap it with a view that hides whatever you dont want to show Feb 22 10:04:25 thats how they get the square preview Feb 22 10:04:46 but I wouldnt worry to much about it Feb 22 10:04:54 if it works good in 4:3 ratio Feb 22 10:05:00 you're good for the most part Feb 22 10:11:37 jvrodrigues, itemselectedlistener isn't a click listener, and if you try to set a click listener on a spinner, you'll get an exception ;) - anyway, my problem was that I somehow managed to create a cycle that caused onItemSelected be called all the time so I couldn't actually click on the spinner Feb 22 10:25:51 hi, does anyone know good open source app that can send me all my sms/gps/calls log? - i want to install one on my phone Feb 22 10:28:26 Bored: not the right channel, here we only make apps, we dont use them Feb 22 10:29:12 and when we do its only to complain about bad design and poor code Feb 22 10:29:14 jvrodrigues so which is right channel? and i am looking for opensource to modify. Feb 22 10:34:25 Bored: try fdroid Feb 22 10:36:40 netban thanks found something Feb 22 11:08:25 Hi all. Does somebody know if there's a lib to calculate a color pallet from one color (primary color)? Feb 22 11:09:30 == how can you calculate something like those colors https://www.google.com/design/spec/style/color.html#color-color-palette ? Feb 22 11:14:32 FranescoV: Im not an expert but i think what they are basicly doing is tinting and shading the base color. http://stackoverflow.com/questions/6615002/given-an-rgb-value-how-do-i-create-a-tint-or-shade Feb 22 11:19:23 Hey. Android studio is eating my code somewhere. I am using @ResouceId for that I have to specify getter and setter that I specified. But if I am not using them anywhere by my self. Studio wipe them away. But my mentor not letting me use that in waste Feb 22 11:19:52 studio doesnt wipe anything Feb 22 11:21:03 Not even unused code? Feb 22 11:22:13 Hello guys, good morning and lets rock 'n roll :P Feb 22 11:24:30 I have a fragment wherein I want to update a view every second. I'm not sure whether to use Timer or a Handler. My feelings say Handler, but is a Handler a good idea in a Fragment? Feb 22 11:25:28 hithere Feb 22 11:26:42 Layout - do you use qualifiers (normal, large) or do you use sw/hwXXXdp? If so what switching points do you use, or do you have some technique how to identify them? Feb 22 12:18:09 bolovanos, I say it depends on the layout. I.e If height is your limiting factor to fit the layout on the screen, you might endup using different layouts for different phone heights and so on Feb 22 12:25:53 I have an AlertDialog and want to dismiss the dialog when clicking a button. In the onClick() I have dialog.dismiss, but even though I can debug that this statement is executed, nothing happens when it is. Any ideas why this could happen? Feb 22 12:26:28 Do android studio have any feature in inself to remove unused methods Feb 22 12:27:07 danijoo_: have I told you how much I hate FB SDK? Feb 22 12:27:20 LegendThinker: try analyzing your code Feb 22 12:27:25 thepoosh, why? (everyone does ) Feb 22 12:27:40 updated the SDK last week Feb 22 12:27:46 all the APIs have changed their names Feb 22 12:27:48 LegendThinker, proguard them away :) Feb 22 12:27:51 thepoosh, actually if there is I wanna turn that off Feb 22 12:27:54 now I need to try and understand things Feb 22 12:27:55 thepoosh, lol Feb 22 12:28:01 Due to reflection, detecting unused methods isn't trivial Feb 22 12:28:22 danijoo_: their integration/update guide doesn't have anything under version 4.* Feb 22 12:28:29 which is a stupid idea Feb 22 12:29:29 thepoosh, Process: org.hawkular.client.android, PID: 17833 Feb 22 12:29:30 org.jboss.aerogear.android.core.reflection.PropertyNotFoundException: Cannot find get/set to field id (String) on Alert Feb 22 12:29:49 it doesn't automatically remove anything Feb 22 12:30:01 but you should be looking on the proguard config file Feb 22 12:30:09 or run minifyEnabled false Feb 22 12:30:15 in the build.gradle file Feb 22 12:30:16 done that Feb 22 12:30:28 still causing problem Feb 22 12:30:56 Is there a way to clear my apps data/cache from the app itself? Feb 22 12:30:57 LegendThinker: try adding in the proguard --keep Feb 22 12:31:31 E.g. wipe all shared preferences when the user logs out regardless of shared preference key Feb 22 12:31:58 SharedPrefereces.edit().clear().apply() Feb 22 12:31:58 thepoosh, does proguard do anything even after minifyEnabled false Feb 22 12:32:09 I think it still does the optimizations Feb 22 12:33:13 crap. This project have too many proguard files Feb 22 12:33:44 thepoosh, do I have to add proguard --keep in file? Feb 22 12:34:00 you can also do that in code Feb 22 12:34:40 thepoosh: that only works if you know the name of the sharedpreference file, but as there are several, I would prefer being able to just wipe all of them in one go. Feb 22 12:35:44 LegendThinker: http://tools.android.com/tech-docs/support-annotations#TOC-Keep Feb 22 12:35:50 thepoosh, Can you give me a link with description Feb 22 12:35:52 Thanks Feb 22 12:36:05 I was jus asking for that only Feb 22 12:36:07 Basically I want to be able to access these buttons from within my app http://cnet4.cbsistatic.com/hub/i/2015/11/02/167c250a-ea0b-45aa-a430-b0b8da3b0fbc/916d2616017eb8f164e0565b6e465a58/android6marshmallow-appinfo.jpg Feb 22 12:36:10 Syzygy: http://stackoverflow.com/a/9073473/1056359 Feb 22 12:36:11 Syzygy: first link in google ~ http://stackoverflow.com/questions/4856955/how-to-programmatically-clear-application-data Feb 22 12:36:57 Ashiren: all I see is what I was just told - which is not what I want, and adb Feb 22 12:38:52 ActivityManager.clearAapplicationUserData() sounds about right. thanks thepoosh Feb 22 12:41:08 thepoosh, If its removing methods even after keep. can we say it is not work of progoud? Feb 22 12:42:34 can someone tell me if the application base context is also ContextImpl or is it some other implementation? Feb 22 12:42:39 pls Feb 22 12:44:08 I would say yes. Feb 22 12:44:31 but then I wouldnt understand why a different base context would need to be created for every activity Feb 22 12:47:49 jvrodrigues: you may wish to register broadcast receivers only in your activity context, not the application context, for example. Feb 22 12:51:16 wait, what? Feb 22 12:51:26 why would I wish to only register receivers in my activity context? Feb 22 12:51:43 anwyays that doesnt answer my base question Feb 22 12:51:55 if the base context implementation is the same or not Feb 22 12:52:25 but im pretty sure it is Feb 22 12:53:53 implementation, but not the instance eh Feb 22 12:54:12 yes, the instance I am happily aware of Feb 22 12:54:53 is JavaFX what I want to use as a graphics backend for my games? Feb 22 12:55:11 action 2D Feb 22 12:55:56 i... dont think so Feb 22 12:59:41 nzt, for games you should look into libgdx Feb 22 13:01:12 danijoo_, I have land and port, layouts specified. Do you user layout-sW/hw/XXXdp-land / layout-normal/large-land or values-sW/hw/XXXdp-land / values-normal/large-land ? Feb 22 13:03:22 bolovanos, I go with the dp version Feb 22 13:06:14 danijoo_, I was rather asking about these two variants 1) layout-land, values/diemnsions-sw320dp, values/dimensions-sw720dp 2) layout-sw320dp, layout-sw720dp Feb 22 13:07:45 sry - this way danijoo_, I was rather asking about these two variants 1) layout-land, values/diemnsions-sw320dp-land, values/dimensions-sw720dp-land 2) layout-sw320dp-land, layout-sw720dp-land Feb 22 13:09:02 i dont get you Feb 22 13:12:33 ive never seen a folder values/dimensions-sw320dp-land.. Feb 22 13:13:44 of course - it is values-sw320dp/dimensions... Feb 22 13:14:13 but do you get my idea? Feb 22 13:14:31 so basically you ask if its better to create separate layout files or use the same layout files with different dimensions? Feb 22 13:14:39 yes Feb 22 13:14:48 whatever works for you Feb 22 13:15:01 if you can get away with the same layout file, i´d do that Feb 22 13:15:16 sometimes you want different layouts, sometimes you dont Feb 22 13:16:41 what do gamedevs for android use? Is there some official android package? Feb 22 13:16:43 ok - thank you, will try it - hopefully it won't get messy Feb 22 13:17:03 nzt, look into libgdx Feb 22 13:17:22 unity3d and libgdx are the two most popular frameworks Feb 22 13:17:37 libgdx is open source though Feb 22 13:21:00 bolovanos, it will get messy :p Feb 22 13:23:49 danijoo_, :/ is there something I can do to avoid it or at least minimise it? Feb 22 13:24:14 no. its in the nature of layout folder organization Feb 22 13:25:01 okay, so android doesn't run java according to ##java Feb 22 13:25:05 so it's not? Feb 22 13:25:35 it runs java Feb 22 13:25:52 ##java is a dark place. dont go there Feb 22 13:26:53 If I challange them about that (by asking why android has the java.net package and more) I'll get banned Feb 22 13:28:10 well they are right when saying pretty much every solution for writing games in java is not a solution for android Feb 22 13:28:23 because its not the same writing something for Android then for a computer Feb 22 13:28:30 but its still java Feb 22 13:28:57 they probably complaining because android doesnt run on the standard jvm Feb 22 13:29:28 and they are partly right Feb 22 13:29:38 but at the same time Feb 22 13:29:41 no1 really cares about them Feb 22 13:30:26 "Android isn't java. despite using the same language syntax" Feb 22 13:30:37 nzt, yeah thats just bullshit Feb 22 13:30:38 is there a reason that gradle is resolving the dependency tree of all existing tasks when running only one of them? Feb 22 13:31:02 i.e. when assembleDebug is run, it resolves the dependency list for assembleRelease Feb 22 13:32:24 so android does not support JavaFX? Feb 22 13:33:56 nzt: JavaFX __DOES NOT RUN ON ANDROID__. Feb 22 13:35:24 so android is java.. but with another API? Feb 22 13:35:49 its the same api Feb 22 13:35:50 danijoo_: I just don't find surial trustworthy Feb 22 13:35:52 and with an extra compile step if you can call it that Feb 22 13:36:07 but not every framework will run on android Feb 22 13:36:09 the reason they say its not java is because java runs everywhere and android runs in android Feb 22 13:36:17 JavaFX being one of the frameworks that wont run Feb 22 13:36:32 I thought JavaFX was part of Java SE? Feb 22 13:36:45 Is android running Java SE then? Feb 22 13:36:52 Or is it some other kind of Java? Feb 22 13:37:01 JavaFx is installed together with SE Feb 22 13:37:30 no. it does not run the plain java se you see on computers Feb 22 13:37:49 and thats why they were saying android isnt java Feb 22 13:37:51 it doesnt even run a Java VM. it runs dalvik Feb 22 13:37:51 they are partly right Feb 22 13:38:13 ^ Feb 22 13:38:22 nzt: it's java SE with swing replaced by android widgets, and the runtime is dalvik/art instead of plain java runtime Feb 22 13:38:29 you write java code, but you dont write for a Java VM and dont have the whole features of Java SE Feb 22 13:39:55 Which means that Android isn't Java SE compatible :) Feb 22 13:40:45 oh great.. got quieted for this "Okay, so I thought that every Java(TM) compatible device would run any Java program. But there are a bunch of no true scottsmen (that's not real java) marketing themselves as Java." in ##java Feb 22 13:40:58 ffs Feb 22 13:41:13 Don't go do ##java. Feb 22 13:41:15 Mygod man. Feb 22 13:41:21 hmm Feb 22 13:41:24 I can't decide if I want to use Dagger or not Feb 22 13:41:31 Mavrik why not? Feb 22 13:41:36 I found this android-boilerplate template, looks awesome Feb 22 13:41:44 but there are too many libraries that i don't know yet Feb 22 13:42:10 Ping_2_Ur_Pong, it's bad for health. Feb 22 13:42:11 nzt j2me isn't real java, its a subset, just like android java isn't real java Feb 22 13:42:13 ##java is the mordor of freenode Feb 22 13:43:01 going to pay them a visit Feb 22 13:43:13 * Ping_2_Ur_Pong usually hangs out there Feb 22 13:44:02 Ping_2_Ur_Pong: your name should be the other way, Pong_2_Ur_Ping Feb 22 13:44:11 whats a good bait for them? Feb 22 13:44:22 shmooz, I know... kind of annoyed about it. Feb 22 13:44:26 "is dynamic typing is the future?" Feb 22 13:45:20 jvrodrigues, I guess anything that's Android specific would do. Feb 22 13:45:37 Ping_2_Ur_Pong does sound better though Feb 22 13:45:39 Or maybe how to run Ruby code. Feb 22 13:46:41 ask them if java is a dead language :p Feb 22 13:46:51 jvrodrigues: So Dalvik converted java bytecode to some dalvik by code or similar Feb 22 13:46:57 that's part of the android-java connection Feb 22 13:47:03 Art however, has nothing to do with java? Feb 22 13:47:16 No. Feb 22 13:47:26 Dalvik is a VM. Feb 22 13:47:28 ART is a VM. Feb 22 13:47:32 Oracle JVM is a VM. Feb 22 13:47:44 OpenJDK JVM is a VM. IBM JavaVM is a VM. Feb 22 13:47:57 Except that Dalvik and ART read DEX bytecode format. Feb 22 13:48:05 Others read standard CLASS bytecode format. Feb 22 13:48:30 Compiled java classes are converted to DEX bytecode format with dex utility as the application is built and before it's packaged into APK on developer machine. Feb 22 13:52:48 nice thanks Feb 22 13:53:03 So how is java development related to java then? Feb 22 13:53:10 I mean android development Feb 22 13:53:51 you write the app in java Feb 22 13:53:56 nzt, android is the platform, java is the language Feb 22 13:56:27 hello, could please anybody educate me on how those pre-rooted images are made? i'd like to contribute, reference http://forum.xda-developers.com/android/development/pre-rooted-firmwares-samsung-sm-g361f-t3207432/ Feb 22 13:57:29 well you can use java libraries aswel Feb 22 13:57:30 da3m0n22, wrong channel Feb 22 13:57:50 danijoo_: #android-root ? Feb 22 13:58:01 da3m0n22, correct Feb 22 13:58:22 ok, thanks :) Feb 22 14:00:39 so what's the compiler used in android development? Is it a java compiler but with another class library? Feb 22 14:04:18 nzt, yeah, pretty much Feb 22 14:04:32 nzt, it uses your desktop compiler to compile Java7 level code and then converts to DX Feb 22 14:04:33 *DEX Feb 22 14:04:42 bolovanos, you can use different layout folders like portrait and landscape. If you have a portrait layout that looks the same as in landscape, than don't add the same layout in landscape folder. In case you need a special landscape layout, than add it in the landscape folder. So. it won't be messy :) Feb 22 14:05:07 nzt, most of JavaSE is there in the class library, but not everything Feb 22 14:05:23 Mavrik: can/is it using OpenJDK or OracleJDK to compile? Feb 22 14:05:26 (Most notably, UI library is separate=. Feb 22 14:05:32 Yes. Feb 22 14:05:33 Number5, unless you need different layout files for different sizes of landscape and end with 5 folders :p Feb 22 14:05:34 Either. Feb 22 14:05:40 Mavrik: what's typically used? Feb 22 14:05:48 *shrug* Feb 22 14:05:57 I keep to Oracle JDK just because it's usually more stable. Feb 22 14:06:01 nzt, both works fine Feb 22 14:06:17 not like there's much difference between the two Feb 22 14:06:51 there is no difference Feb 22 14:07:22 Number5, thank you, but as danijoo_ said - I need land and port + diff scr sizes - unless you have some magic trick on your mind :) Feb 22 14:07:55 So you use a java compiler (openJDK or OracleJDK) to compile your android target app, but you can only use a subset of the Java SE class library. And the class files are then converted to some other bytecode format. That's the only java part of it? Feb 22 14:08:36 more or less, yes Feb 22 14:09:11 nzt, you can also so "native stuff" (c/cpp) via the NDK, compiler is a custom gcc but let's not enter this topic. And with renderscript (C99-like) you got llvm Feb 22 14:09:20 also do* Feb 22 14:09:54 no, let's enter that topic :3 Feb 22 14:10:06 Android discourage people from using the NDK Feb 22 14:10:10 yes Feb 22 14:10:26 there are too many reasons for that Feb 22 14:10:27 the ndk discourages people from using the ndk Feb 22 14:10:31 ahahah Feb 22 14:10:34 true :) Feb 22 14:10:41 AS discourages dev from using the ndk too Feb 22 14:10:43 nzt, "NDK" is just a name for JNI + preconfigured GCC :P Feb 22 14:11:19 nzt, you must understand that Java is a programming language which needs a Java Runtime to run. And that Java Runtime is what differs on Android and the one you use in Windows, Linux or OSX. You have JVM which is the Oracle's Runtime and DVM which is Android's Runtime. They both are totally different. Feb 22 14:14:28 so everything I know about Java SE might be false on adroid Feb 22 14:14:41 Okay, the APIs might differ. But is there any difference in the core of the language? Feb 22 14:15:05 nzt, you cant use java 8 or any of its features on android if that counts Feb 22 14:15:08 such as constructors/finalize/static working differently or things like that? Feb 22 14:15:15 hm ok Feb 22 14:15:18 nzt, nah, it's mostly your usual Java Feb 22 14:15:21 so no lambdas, no streams Feb 22 14:15:23 Java 7 Feb 22 14:15:29 but beside that its just java Feb 22 14:15:33 bolovanos, why different screen sizes? If you use RelativeLayout and weights in your xml, land and portrait folders are enough, I guess (at least I never needed, only images with different resolutions were needed). Feb 22 14:15:34 hey guys Feb 22 14:15:47 nzt, the GC is a bit less advanced and a bit slower, but there aren't large gotchas unless you do Unsafe stuff or something like that. Feb 22 14:15:49 i've got an android app that for some reason crashes whenever i launch it Feb 22 14:15:59 Also your heap is like 64MB not 6GB as on a server :P Feb 22 14:16:07 Number5, sometimes you want to hardcode imagesize in dp, but need smaller dp values on smaller phones Feb 22 14:16:30 in the crash report, it says "lib.so" could not be found Feb 22 14:16:44 while this crash only occurs on some devices - it doesn't occur on others, i've tested on a nexus 5x and a huawei device Feb 22 14:16:58 the nexus crashes -- i've located the lib.so file and it appears to be inside a folder called armeabi-v7a Feb 22 14:17:12 can it be that the nexus doesn't have armv7 support and the app is only functioning on armv7 devices now? Feb 22 14:17:59 5X can certanly load v7 native code. Feb 22 14:18:02 But not always. Feb 22 14:18:19 You can't mix and match native libraries within the same process. Feb 22 14:18:44 So if you loaded an arm64-v8a library, you won't be able to load a armeabi-v7a library. Feb 22 14:19:08 so the nexus 5x loads arm64-v8a libraries i assume? Feb 22 14:19:19 i don't purposely mix them up i don't think, because the app works on other devices as well Feb 22 14:19:23 No idea what it does in your case. Feb 22 14:19:37 Are other devices ARMv8? Feb 22 14:19:41 would that error be across all devices though? Feb 22 14:19:45 Do you have ARM64 libs in your app? Feb 22 14:19:47 Why? Feb 22 14:20:00 ARMv7 devices will only load ARMv7 code. Feb 22 14:20:02 the huawei is armv7 Feb 22 14:20:12 and the app works just fine on that one Feb 22 14:20:13 ARM64 device will default to ARM64 and it will expect all the native code be ARM64 Feb 22 14:20:24 Or all native code be ARMv7 Feb 22 14:20:31 no the app wasn't designed for arm64 support, it was designed for armv7 support only Feb 22 14:20:54 which is why i'm confused as to why the nexus doesn't locate the lib.so file Feb 22 14:20:58 whiel other devices are able to Feb 22 14:21:10 danijoo_, really? Ooh, I don't have this kind of problem yet, but it's something to keep in mind, thnx :) Feb 22 14:21:14 You still didn't answer if your app includes any ARM64 code. Feb 22 14:21:24 Even by some other library or something. Feb 22 14:21:38 is there any way I can check that Mavrik? Feb 22 14:21:41 as far as I know, it does not Feb 22 14:21:48 You check your APK. Feb 22 14:21:50 it was 100% designed with armv7 devices in mind Feb 22 14:22:07 danijoo_, in my case (using rel nad lin layout + dp (padding, elem sizes, ...), and sp for textSizes - Problem is that on 8.4" 1600 x 2560 pixels it is ok but on 4.0" 480 x 800 text consumes much more space than Feb 22 14:22:48 Mavrik: inside the libs/ folder, i *only* have that armeabi-v7a folder which contains armv7 libraries Feb 22 14:23:07 no references to arm64 libraries anywhere in the project folder at all Feb 22 14:23:20 Something else is going wrong then when loading the lib. Feb 22 14:23:27 hmm Feb 22 14:23:27 Link depenencies? Feb 22 14:24:09 Mavrik: this is the crash that it throws: Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1892]: 104 could not load needed library 'lib.so' for 'libjni.so' (load_library[1094]: Library 'lib.so' not found) Feb 22 14:25:22 Is lib.so present in your app? Feb 22 14:25:25 in the build.gradle file I've got the full path to the lib.so file under jni.dependences Feb 22 14:25:25 bolovanos, well, I guess, your widgets are not relative enough or you don't use weight property. Feb 22 14:25:36 Mavrik: yeah it is Feb 22 14:25:41 Bantalon, did you actually load the lib.so file beforehand? Feb 22 14:25:42 the app works on certain devices but not on the 5x nexus for instance Feb 22 14:26:01 Mavrik: I believe so Feb 22 14:26:36 android.sources{main{jni{dependencies{library file() abi "armeabi-v7a" linkage "static" Feb 22 14:26:44 that's the table i've got inside the build.gradle Feb 22 14:27:28 maybe it's something obscure going on then? Feb 22 14:28:00 it seems to crash on a few various devices though Feb 22 14:28:04 Number5, what does it mean " are not relative enough" I have thought that it is binary - using relative or not using relative. What do you mean by "you don't use weight property" ? Feb 22 14:29:21 Galaxy Tab3, IdeaTab S6000, Galaxy S3 Mini, Galaxy Grand Neo, Galaxy Pocket Neo, A3000, Xperia Go Feb 22 14:29:23 Seem to be a few Feb 22 14:30:20 bolovanos, with weight property you don't define a hardcoded a size in pixels, but in ratio, like a quarter of the width of a screen (no matter what resolution the screen has) has a weight=0.25 Feb 22 14:31:38 Number5, ok - I am using weight property... Feb 22 14:32:00 bolovanos, as far as I know, weight works with linear layout. Feb 22 14:33:40 Number5, yes I am having only LinearLayout in my layout (my mistake - I am using relative in another layout) Feb 22 14:33:42 so ... Feb 22 14:34:12 what else could it be? Feb 22 14:35:05 bolovanos, read this and play with it: http://developer.android.com/guide/topics/ui/layout/linear.html Feb 22 14:36:12 Number5, thank you - but I was already there (ofcourse), and been playing with that layout for more than while Feb 22 14:37:10 bolovanos, I don't know your background, but here is a good explanation: http://ugia.io/2012/01/19/android-linearlayout-distribution-explained-weight-and-sizes/ So no more pixels for you :P Feb 22 14:39:52 Bantalon, I mean, do you actually call System.loadLibrary() ? Feb 22 14:40:03 (Also, experimental NDK plugin? You must hate yourself.) Feb 22 14:40:55 i do not believe I do - can I search if that API is used in the project anywhere? Feb 22 14:41:01 I've got the project but as I said I didn Feb 22 14:41:22 didn't develop it* Feb 22 14:41:35 so excuse my rookieness Feb 22 14:42:33 feeling like i'm debugging a jungle atm Feb 22 14:47:00 aye i throw in the towel Feb 22 14:47:05 thanks a lot Mavrik Feb 22 14:47:29 :/ Feb 22 14:47:37 Bantalon, I mean the proper way would be to just provide the arm64 binaries Feb 22 14:47:43 Considering that you actually compile them yourself. Feb 22 14:47:48 i think the dev avoided including those Feb 22 14:48:01 due to actually arm64 not being able to support the features the app included Feb 22 14:48:15 ill just wait for him to get back Feb 22 14:48:16 ?? Feb 22 14:48:26 You mean he couldn't code portable C? O.o Feb 22 14:48:42 no there was some rsetriction which prevented us from being able to support arm64 devices Feb 22 14:48:47 or -- an inefficiency Feb 22 14:49:09 don't remember what exactly it was, but we discussed it and ended up sticking with only for armv7 support Feb 22 14:55:47 where can I buy a template for an android app that accesses a mysql database? i want to write my app for my site myself Feb 22 14:57:56 hello, is "chdir" the correct way to set the working directory in Android? Feb 22 14:58:18 I am using Ogre3D game engine, with Android NDK. Feb 22 14:58:41 Ogre3D is trying to read some config files, but it cannot find them. Feb 22 14:59:52 cnnx, never. connect. to. a. remote. database. directly. ever. Feb 22 15:00:13 cfoch, there really isn't a concept of working dir on Android. Feb 22 15:00:15 So I think if I set the working directory to my project directoryy, it will work. If I do "getcwd", I get "/" Feb 22 15:00:18 Mavrik: so how will the user running the local app on their phone connect to the users db? Feb 22 15:00:47 Mavrik: how can I know where my program is trying to read files from? Feb 22 15:00:51 cnnx, you usually make a REST frontend which does queries for you and exposes them as a sane API. Feb 22 15:01:02 cfoch, well... you wrote it I guess. Feb 22 15:01:17 Mavrik: either way where do I get started? do I need a book or someplace online? Feb 22 15:01:19 cfoch, Android doesn't have same concepts of current directory as desktop apps do. Feb 22 15:01:36 You'll have to pass an absolute path to proper directory retrieved from java Context when initializing. Feb 22 15:02:11 cnnx, hmm, I don't really know of a suitably beginner book out of hand, it's pretty much "any web technology" :/ Feb 22 15:02:40 try some web tutorials Feb 22 15:02:47 Mavrik: can you point me to a sample application? Feb 22 15:02:52 that access the db? Feb 22 15:03:17 cnnx which db type? which language do you want to code the be in? Feb 22 15:03:27 do you know php, javascript, ruby or just java? Feb 22 15:03:28 jvrodrigues: mysql, i program in html/php usually Feb 22 15:03:36 i use javascript when i search sometimes Feb 22 15:03:37 then look into laravel Feb 22 15:03:41 ok Feb 22 15:03:43 laravel Feb 22 15:03:44 to build your backend Feb 22 15:03:45 Mavrik: my project is written in C++. Feb 22 15:03:50 node.js is also cool, easy to work with Feb 22 15:03:58 more info than laravel around Feb 22 15:04:11 though not as good Feb 22 15:04:14 matter of opinion though Feb 22 15:04:21 but people here are going to bash both languages Feb 22 15:04:23 How do I pass to it the absolute path? Feb 22 15:04:26 node is too damn crash happy. Feb 22 15:04:50 cfoch, that's googlable and pass the full path as a url or string Feb 22 15:04:54 spring is my new go to backend Feb 22 15:05:43 cfoch, why are you asking me, I didn't write your code. Feb 22 15:05:49 cfoch, go look at code that tries to load files. Feb 22 15:05:59 And see where it gets the path from. Feb 22 15:06:04 I don't know how your code is written :/ Feb 22 15:06:23 jvrodrigues, heard great things about Spark if you're into Java Feb 22 15:07:15 yea? will give it a go, here we code the whole be in spring, had to dive into it once or twice myself and quite enjoyed it Feb 22 15:07:21 the dependency injection is amazing Feb 22 15:18:44 "application/vnd.android.package-archive" what do vnd stand for in this mime type? Feb 22 15:22:35 nzt, vendor I think. Feb 22 15:43:54 spark is a bit overkill for a simple Web backend Feb 22 15:44:16 and when you say spring, you're joking, right? Feb 22 15:44:56 is the android sdk safe to install on your main system? No weird shit coming with it? I just want the SDK, no weird bullshit added to my stem. No hooks of any form, no statistic collection bullshit etc Feb 22 15:45:12 stem, system Feb 22 15:45:48 I do not need any weird "services". Just want the SDK and nothing more than that. Feb 22 15:46:19 apart from the stuff which lets Google employees use your webcam to watch you naked... Feb 22 15:46:34 oh, screw that then, I'll use a VM :P Feb 22 15:46:51 you should put some clothes on first Feb 22 15:48:33 to be fair, so should I :) Feb 22 15:48:50 pfn, no. we do use spring around here Feb 22 15:49:12 whats wrong with spring? Feb 22 15:49:14 would a been cool 15 years ago... Feb 22 15:49:41 I have a team of developers sitting behind me that would be very very upset with that statement Feb 22 15:50:47 which be would you recommend then? Feb 22 15:52:09 is there an eclise ide for android still or is is android-studio now? (on linux platform) Feb 22 15:52:43 as is the way to go Feb 22 15:52:59 eclipse Feb 22 15:53:44 cnnx, android studio Feb 22 15:53:59 danijoo_: i can do a program meant for eclipse ide in android studio? Feb 22 15:54:46 hardly. its a different project structure and you need to convert it Feb 22 15:55:03 I haven't used spring in about 10 years, but the problem with it was that it helped you create systems that you had no way of knowing that they worked without running everything Feb 22 15:55:51 aiui, it's been more of the same for the past 10, except exchanging annotations for xml Feb 22 15:57:30 basically nullifies the reason for using java Feb 22 15:57:38 might as well write shit in javascript Feb 22 15:58:45 danijoo_: im using a tuturial that says to use eclipse ide, does that exist in portage (gentoo) ? Feb 22 15:59:33 cnnx, if the tutorial says to use eclipse, skip that tutorial. its horribly outdated Feb 22 15:59:52 danijoo_: but its a good one for mysql android tutorial Feb 22 16:00:00 its simple Feb 22 16:00:12 http://www.androidhive.info/2012/05/how-to-connect-android-with-php-mysql/ Feb 22 16:00:18 if you can find me one for adnroid-studio then? Feb 22 16:00:31 /2015/05 ... Feb 22 16:00:51 2012 xD Feb 22 16:01:30 is manifest.xml the equivalent of index.php for apache2? Feb 22 16:01:33 2012 feels like it was yesterday Feb 22 16:01:56 cnnx: you are getting waaaaay ahead of your self here, you should start with the basics of android Feb 22 16:02:26 in android 2012 is like last century Feb 22 16:02:34 yea Feb 22 16:02:45 not in the wamp servers world though Feb 22 16:12:12 if there is one thing I learned today Feb 22 16:12:19 it's never use singleTask Feb 22 16:12:22 EVER!!! Feb 22 16:12:46 cnnx: mysql? Feb 22 16:12:49 android?! Feb 22 16:12:52 thepoosh: how why? Feb 22 16:13:02 wew lad!! Feb 22 16:13:40 loke``: if you try startActivityForResult on an Activity that has that launch mode, it will return RESULT_CANCELLED immediately Feb 22 16:14:41 thepoosh: Right, that makes sense. Feb 22 16:14:51 thepoosh: But why do you say "never" use them? Feb 22 16:15:36 huh, not all activities are to be started for result Feb 22 16:15:46 unless you can verify the need for this you shouldn't use it Feb 22 16:15:56 like the use of singletons in general Feb 22 16:15:59 thepoosh: Well that I can agree with. Feb 22 16:16:03 which is bad unless you really have to Feb 22 16:16:11 I just looked up its documentation, and Google agrees with you too. Feb 22 16:16:23 "singleTask and singleInstance — are not appropriate for most applications, since they result in an interaction model that is likely to be unfamiliar to users and is very different from most other applications." Feb 22 16:18:37 I have an application switches to a two-pane mode when horizontal. In one-pane mode, it instead switches to a dedicated task. Now, if a user dos this, and then turns his device horizontal, he ends up with the dedicated detail task in horizontal mode, even though he's supposed to have a two-pane mode. Feb 22 16:18:43 What's the best way to deal with that? Feb 22 16:20:36 i want to create this int 0x5500ff00 from 0x55 and hexValue i used Integer.valueOf and Integer.parseInt but keep getting a NumberFormatException on final result Feb 22 16:20:55 hert: Can you show your code? Feb 22 16:23:45 thepoosh, I never saw a usw for singleTask either but our current project uses it and it's a nuisance occasionally Feb 22 16:24:10 loke` ` http://pastebin.com/cyJ4SjuH Feb 22 16:24:17 no clue why it was originally used.. Feb 22 16:24:28 Zharf: just wait until you use startActivityForResult Feb 22 16:24:40 and on 4.4 and 4.3 get RESULT_CANCELLED all the time Feb 22 16:24:44 for no good reason Feb 22 16:24:59 hert: so, you have 0x55, and you want to turn it into 0x5500ff00? Feb 22 16:25:02 hert, why dont you use Color.parseColor(hexstring) ? Feb 22 16:25:16 ^^ Feb 22 16:25:20 why convert to string at all? Feb 22 16:25:22 ^ Feb 22 16:25:27 just use << shifts. Feb 22 16:25:30 and | for ors. Feb 22 16:25:50 0x55 << 24 | 0xff00 Feb 22 16:26:06 WHat justjanne said Feb 22 16:26:13 agreed. don't get strings involved in this. Feb 22 16:27:12 this, jvrodrigues, is why I suggested people to go to uni first ;P Feb 22 16:27:24 binary maths is one of the many things you should know ;P Feb 22 16:28:02 i hahave a color intvalue and want to add opacity to it to use in fillColor which takes int Feb 22 16:28:35 Well, simple. Feb 22 16:28:38 justjanne: I know a bunch of devs who dont know it and went to uni :p Feb 22 16:28:55 also I was good at calculus and couldnt integrate to save my life. Feb 22 16:28:55 colorval & 0xFFFFFF | (alphaval & 0xFF << 24) Feb 22 16:29:03 you want to *modify* the alpha component of the int Feb 22 16:29:26 colorval is a number between 0x000000 and 0xFFFFFF, alphaval between 0x00 and 0xFF Feb 22 16:29:35 but the Color class has methods for that. Feb 22 16:29:39 Zharf: yes Feb 22 16:33:17 If I create a Thread in a static method in a Service, is that Thread code "really" being run in a service? Feb 22 16:34:16 if you call that method from within the service Feb 22 16:36:17 eghdk: I hink you are attributing too much magic to the idea of a Service. Feb 22 16:37:04 danijoo_: Nope. Feb 22 16:37:14 eghdk: If you start a thread, the thread will run. It doesn't really "belong" to the Service. If you want its lifecycle to follow that of the Service, you need to manage (start and stop) the thread at the appropriate times (usually in the onStart and onStop methods) Feb 22 16:37:42 Yeah. That's what "I know", but have a group member arguing with me because I brought it up in code review. Feb 22 16:37:58 eghdk: What is he arguing? Feb 22 16:38:07 It's just a random method that starts a thread thats shoved inside of a Service. It makes no sense, and makes me wanna throw up. Feb 22 16:38:26 That the Thread is in the Service class, so it gets treated as a service. Feb 22 16:38:30 huh? Feb 22 16:38:38 eghdk: If one does that, one has to be very careful to make sure the thread is managed properly from within the service callbacks. Feb 22 16:38:39 Told me to give him an example of his code going wrong. idk. people suck. Feb 22 16:39:13 Well, you're going to find that the thread keep running even after the service is topped Feb 22 16:39:16 stopped Feb 22 16:39:19 That's one issue Feb 22 16:39:27 what's he doing really? Feb 22 16:39:29 loke``: It's not. It's literally a plain ol thread thats in a static method that isn't referenced by the IntentServices' methods at all. Feb 22 16:39:37 If the thread is started from the onStart method, you might also end up with multiple threads started Feb 22 16:39:46 Your coworker is clueless Feb 22 16:39:50 eghdk: Of for fuck's sake... Feb 22 16:40:23 Yeah. It's like "bam, I made a service". And I'm like... that's not how that works. Thats not how any of this works. Feb 22 16:40:24 you dont even know android service class to understand that it doesnt run in the service just because its a method of the service class Feb 22 16:40:36 I want to make a custom recyclerview that always shows some buttons overlayed over the screen with a fixed position, would I define these in onDraw or make some kind layout file that I inflate? Feb 22 16:41:12 I was just making sure I wasn't the one that had my shit mixed up. Thanks loke`` danijoo_ and SimonVT Feb 22 16:41:14 JitanRo: don't make it part of the recyclerview. Feb 22 16:41:39 loke`` why not? Feb 22 16:41:40 local services, remote services, processes, and threads are fun. Feb 22 16:41:40 Put the recyclerview in a RelativeLayout. Then you cadd the buttons to it. Feb 22 16:41:48 JitanRo: why not just add them on top of the recyclerview using a frame layout? Feb 22 16:41:51 ^ Feb 22 16:42:01 just trust me I need to solve it this way, how would I do it? :) Feb 22 16:42:16 -.- Feb 22 16:42:20 don't Feb 22 16:42:25 JitanRo: I'm not going to trust you, since you are trying to do the wrong thing. Feb 22 16:42:43 JitanRo: define your problem Feb 22 16:42:51 We're engineers here. We don't blindly trust faith. :-) Feb 22 16:42:51 does it have to be inside the recyclerview, or inside a view? Feb 22 16:43:01 if you want a component layout in code, override framelayout and add recyclerview and your buttons on it Feb 22 16:43:05 you could extend a framelayout then add the views you want Feb 22 16:43:29 ok that makes sense Feb 22 16:43:32 me and Zharf should get married Feb 22 16:43:48 I have a pull to refresh library that I'm using that's giving me trouble Feb 22 16:43:48 jvrodrigues: I'd marry him too Feb 22 16:44:04 I don't do human relationships :p Feb 22 16:44:13 Who said I'm human? Feb 22 16:44:47 JitanRo: Why don't you just use SwipeRefereshLayout? Feb 22 16:44:53 who said relationships? Feb 22 16:45:51 loke`` I wanted a "box frame" to move down the whole view when I did the pull to refresh, so I found a library that could do it Feb 22 16:46:30 can still be achieved with a custom framelayout and a touch listener Feb 22 16:46:37 :/ Feb 22 16:46:45 you have an example I could look at? Feb 22 16:47:06 everything can be achieved, except getting more hours in a day, heh Feb 22 16:47:14 not really Feb 22 16:47:31 but sounds pretty straight forward Feb 22 16:48:07 yeah I'm relatively new so pretty straight forward things can take a while... Feb 22 16:49:09 * Zharf doesn't know what this "box frame" is supposed to be Feb 22 16:49:47 https://github.com/liaohuqiu/android-Ultra-Pull-To-Refresh Feb 22 16:49:56 I've never implemented pull-to-refresh or ever used an app that had one Feb 22 16:50:53 I'm still thinking if I just add the buttons to a custom RecyclerView I don't have to change much of my already working code Feb 22 16:50:55 I thought I'd never do it myself, but then I recently ended up doing it, because for once it was actually appropriate. Feb 22 16:51:08 Pull to refresh is available from Google now. No need for a different library Feb 22 16:52:52 loke``, I can imagine situations where it could be useful but never needed it Feb 22 16:53:15 What's it called when you write a feature or something just so that it "works" but it has other issues in architecture and stuff. Or that you fix a crash so that it doesn't crash, but it actually casued another issue. I feel like that's called "least something something". Feb 22 16:53:52 bad development? Feb 22 16:53:52 Zharf: as a generic "load" thing, I utterly despise it. However, in this case, it's a chat application when you can scroll up in the history. So when you're on top, and you want to see a few more older messages, you just pull down and it loads them and fills them in. Feb 22 16:53:54 wait Feb 22 16:53:56 bad code ^^ Feb 22 16:53:57 least bad development? Feb 22 16:54:22 loke``: I’m currently discussing something similar.. Feb 22 16:54:49 my idea will probably end up being to compute the position where your fling will end, and then preload all messages up to that point (and more) Feb 22 16:55:04 during the scroll itself Feb 22 16:55:20 justjanne: That works if all messages are of the same size. Feb 22 16:55:33 justjanne: In this case, messages can be long and even contain images. Feb 22 16:55:40 same here. Feb 22 16:55:44 but I can approximate Feb 22 16:55:59 some messages might even get filtered due to ignore settings, Feb 22 16:56:04 but then I can just load even more. Feb 22 16:56:14 load from db or network? Feb 22 16:56:19 network. Feb 22 16:56:20 I would initiate the load before reachinf the end as welll Feb 22 16:56:23 In my case, from network Feb 22 16:57:07 Zharf: that's an interesting idea. I was thinking about that beofre I settled on pull Feb 22 16:57:32 Zharf: It works well enough that I can't be bothered. I have enough other features to implement. Feb 22 16:57:53 yeah, that’s the reason why I currently haven’t finished it either Feb 22 16:58:05 (this is a Slack clone and I'm pretty much alone implementing it, including three separate clients + most of the features slack has :-) ) Feb 22 16:58:14 loke``: mattermost? Feb 22 16:58:28 loke``: I once had to create a hipchat clone :D Feb 22 16:58:32 https://github.com/cicakhq/potato Feb 22 16:58:35 I'm trying to inflate a layout XML multiple times and add it to a parent layout. but I get an error saying the child already has a parent. any way to make the inflated layout unique so this exception doesn't occur? Feb 22 16:58:44 last clone I will ever do in my life Feb 22 16:58:50 It was designed for my companie's internal chat, since we could not use external service for security reasons Feb 22 16:58:55 Apocx: use .inflate(R.layout.something, parent, false) Feb 22 16:58:56 We've been using it in production for over a year Feb 22 16:59:16 loke``: you could have just used Quassel with an ircd? Feb 22 16:59:52 justjanne: Not really. The number of feature that we wanted was a persistent, consistent history. Turns out that such a system is less of a messaging system and more like a constantly gorwing document. Feb 22 16:59:54 >or hipchat< Feb 22 17:00:05 loke``: that’s exactly what Quassel provides. Feb 22 17:00:10 A persistent, consistent history. Feb 22 17:00:12 justjanne: Beautiful, thanks. I incorrectly assumed attachToRoot defaulted to false already. works fine now Feb 22 17:00:21 At first we tried to build it as a messaging system, but that was just a hassle. Designing it more like google docs or something made more sense. It works really well. Feb 22 17:00:38 that’s why several companies use it internally for messaging ;P Feb 22 17:00:41 waste of company time tbh Feb 22 17:00:47 but as long as you guys had fun coding it Feb 22 17:00:54 It's not company time. It's mostly a side project. Feb 22 17:01:07 so the company is making you work on it on your own time? Feb 22 17:01:27 jvrodrigues: Nope. If I didn't do this, we'd have to use Lync Feb 22 17:01:42 jvrodrigues: So designing this was a better alternative, and everybody are more happy :-) Feb 22 17:02:03 does it belong to you or the company? Feb 22 17:02:15 yay, I think my password reset... Feb 22 17:02:25 jvrodrigues: Well, me, for the most part. Feb 22 17:02:41 I didn't write all the code though. A colleague (my boss) wrote most of the web client. Feb 22 17:02:43 opensource it Feb 22 17:02:47 or try to sell it Feb 22 17:02:48 It is open source. Feb 22 17:02:59 I just posted the link to it, if you missed it :-) Feb 22 17:03:10 oh yea, long day, sorry Feb 22 17:03:49 :-) Feb 22 17:09:09 loke``: why lisp? Feb 22 17:09:39 because lisp is awesome Feb 22 17:09:41 duh Feb 22 17:09:51 jvrodrigues: Why not? It's probably the best language to design a server application like this. Feb 22 17:10:06 jvrodrigues: http://www.paulgraham.com/avg.html Feb 22 17:10:35 Being able to develop it while it's running is pretty awesome. I've considered making some youtube videos showing just how Lisp developent works with an application like this. Feb 22 17:10:53 hey, I was just asking, no need to gang up on me like that Feb 22 17:11:24 You move the cursor to a function (or a web method, or anything really). Press control-c control-c and wihing roughly 5 milliseconds the function/method is installed and running. There is zero waiting, and everything is constantly running. Feb 22 17:11:52 you could do the same with hotswap in java Feb 22 17:12:06 pfn: No. It's nowhere near as seamless. Feb 22 17:12:07 > Sometimes, in desperation, competitors would try to introduce features that we didn't have. But with Lisp our development cycle was so fast that we could sometimes duplicate a new feature within a day or two of a competitor announcing it in a press release. By the time journalists covering the press release got round to calling us, we would have the new feature too. Feb 22 17:12:08 not something I would want to do on a live system, though Feb 22 17:12:32 eh, hotswapping in a single class file is very fast Feb 22 17:12:45 compiling that class file can take a little bit of time Feb 22 17:13:02 but hotswap performs very similarly otherwise Feb 22 17:13:14 pfn: Exactly. Also, if you add/remove fields in the class (or change the inheritance structure) things break. Feb 22 17:13:21 In Lisp, it doesn't. Feb 22 17:14:11 (granted, there are cases where one might want to be careful when doing it, but it works) Feb 22 17:14:30 hi guys, is there any reason why I wouldn't be able to 'edit' my EditText view? when I tap on it, nothing happens. this is my code: https://gist.github.com/anonymous/5e53570cbd73cb051523 Feb 22 17:14:39 shit. my device decided to reboot by itself and its stuck on the animation Feb 22 17:14:40 eh, well, lisp there isn't really the concept of fields and whatnot Feb 22 17:14:50 pfn: There is. CLOS Feb 22 17:15:07 https://en.wikipedia.org/wiki/Common_Lisp_Object_System Feb 22 17:15:13 I suppose, and you can swap it all out live? Feb 22 17:15:23 How does it not break if you remove fields? Feb 22 17:15:40 pfn: Yes. And if you change a class, the live instances of the class gets redefined (calling the initialisers for new fields) Feb 22 17:15:55 rmrrn: what is the context of that edittext? Feb 22 17:16:08 is it in an activity, fragment, what is the parent view? Feb 22 17:16:15 If you remove fields, all live instances will lose the fields. There is amethod called when it happens so if you monkey-atch, you can make it work. Feb 22 17:16:19 s73v3r: because it’s not OO like Java (which is structs with prefixed functions), but with message dispatching systems in a very different way Feb 22 17:16:38 well java is not pure OO Feb 22 17:16:48 trying to participate here cause I dont know much about lisp Feb 22 17:16:57 jvrodrigues: :-) Feb 22 17:17:00 we spent a week in uni building CLOS from the ground up, was interesting to learn about. Feb 22 17:17:05 so when you send the message to get that field that was removed, it’ll just return nil? Feb 22 17:17:18 Anyway, I guess that answers the question as to why I'm doing it. It gives me the opportunity to work on a real rpoject in CL. Feb 22 17:17:30 makes sense Feb 22 17:17:34 And to be honest, I wouldn't have had the patience to do it in some other language. Feb 22 17:17:55 what is the project? I came in late Feb 22 17:17:57 (less fun :-) ) Feb 22 17:18:06 s73v3r: I just looked at it, sorry, CLOS differs from the earlier versions – in it, there are no real methods – methods are just functions with prefixed names and no special accesses. Feb 22 17:18:07 https://github.com/cicakhq/potato Feb 22 17:18:09 s73v3r: this one: https://github.com/cicakhq/potato Feb 22 17:18:17 ANyway, It's late and I'm going to sleep now Feb 22 17:18:21 so, you get the same as if you try to access a nonexistent field from outside otherwise. Feb 22 17:18:45 justjanne: also, methods are not tied to classes. Feb 22 17:18:45 I thought of flavors Feb 22 17:18:48 they are standalone. Feb 22 17:18:56 loke``: yes, I mixed up MIT Flavors with CLOPS Feb 22 17:18:59 ;P Feb 22 17:19:06 similar, but different. Feb 22 17:19:36 Anyway. good night all :-) Feb 22 17:20:03 ugh, I hate it when I write a phone number I need on a post-it, and then throw it away... Feb 22 17:20:24 (in MIT Flavors they use message passing, in CLOPS methods are just prefixed things – like in Java) Feb 22 17:21:56 would google ever puch out an update that causes the device to restart ? Feb 22 17:22:40 g00s: usually, not – but Google’s Services have full access to everything on your device, so they could restart, if they wished to do so. Feb 22 17:22:48 .. cause my device just restarted, and its not getting past the animation Feb 22 17:22:57 no Feb 22 17:22:57 by itself, i haven't touched it Feb 22 17:22:57 :') Feb 22 17:23:06 fuck Feb 22 17:24:11 it will make a good paper weight Feb 22 17:24:15 a fancy one Feb 22 17:24:23 don't you have adb debugging enabled in it g00s, check logcat Feb 22 17:24:30 it's always amazingly (or not) verbose Feb 22 17:24:33 logcat isn't saying much Feb 22 17:24:47 restart it Feb 22 17:25:02 obviously waiting wont get you anywhere Feb 22 17:25:08 and if it was installing shit it would tell you Feb 22 17:25:20 though most likely something is faulty with the hardware Feb 22 17:25:35 restarting out of nowhere is not usually a good sign Feb 22 17:26:20 Hey guys! I'm trying to make an app that has a GridLayout of buttons set to match parent in both directions, so that the whole screen is filled with buttons. Unfortunately GridLayout seems to ignore the match_parent... :( Feb 22 17:26:26 I can post code if you can direct me which code to post! Feb 22 17:26:40 gridlayout ignores layout params Feb 22 17:27:21 wait completely missread, was thinking about gridlayoutmanager Feb 22 17:30:22 so why would you want to use NDK? Feb 22 17:30:33 Here's my layout XML https://www.irccloud.com/pastebin/BE8XiGgp/ Feb 22 17:30:48 nzt: You have a large C++ codebase that you’d want to take advantage of Feb 22 17:31:01 So I would think that the GridLayout would fit its gridcells into the parent Feb 22 17:31:07 or something performance intensitive Feb 22 17:31:10 Or am I thinking too optimistically Feb 22 17:31:35 eh, performance intensive isn't exactly the reason, plain java code is very fast Feb 22 17:31:47 And here's my code that adds it to the gridlayout https://www.irccloud.com/pastebin/bbIzEc87/ Feb 22 17:31:51 more along the lines of gc sensitive, and access to things that aren't available in the standard framework Feb 22 17:32:03 (I'm just using new Button(this) to test) Feb 22 17:32:04 stuff like opensl, etc. Feb 22 17:32:52 s73v3r: you can't use the standard C++ libraries very well as I understand it, so much of that fall Feb 22 17:33:10 that’s not what I’ve heard Feb 22 17:33:49 you can use standard c++ libraries all you want Feb 22 17:33:52 s73v3r: https://en.wikipedia.org/wiki/Bionic_%28software%29 instead of glibc Feb 22 17:33:58 and? Feb 22 17:34:07 so? bionic is a libc implementation Feb 22 17:34:25 if you depend on glibc specifically, you're not depending on a standard library Feb 22 17:34:29 ok, nvm, I thought the situation was similar for C++ Feb 22 17:34:35 i’m pretty sure it’s been around for a while, too Feb 22 17:34:36 but they're using libc++ Feb 22 17:34:51 nevermind, it was made just for Android Feb 22 17:35:19 s73v3r: Bionic is substandard Feb 22 17:35:32 care to point to evidence for this? Feb 22 17:35:35 yeah seems like it has lots of bugs Feb 22 17:35:59 everything has lots of bugs Feb 22 17:36:08 bionic has lots more bugs Feb 22 17:36:08 pfn, well, pretty much all C++ STLs available are broken in some way :P Feb 22 17:36:16 so no, not all libraries work well Feb 22 17:36:17 g00s, false Feb 22 17:36:28 you just have an anti-android agenda that you push constantly Feb 22 17:36:29 bionic has never had a good reputation Feb 22 17:36:32 But then there's always CrystaX or what'sit. Feb 22 17:36:33 s73v3r: http://irati.eu/wp-content/uploads/2012/07/bionic_report.pdf not fresh but I wouldn't expect significant improvement in 1-2 years Feb 22 17:36:48 g00s, I've honestly yet to see any bionic bug. Feb 22 17:36:54 In android-15+ Feb 22 17:36:59 Most of the issues is with funny STL. Feb 22 17:37:33 The final conclusion can be drawn that while the bionic library does have its shortcomings Feb 22 17:37:33 it does provide a small, lightweight standard C and C++ library Feb 22 17:37:40 "standard C and C++ library" Feb 22 17:37:46 that is the statement they end with Feb 22 17:38:15 it’s not like you have much of a choice, right? Feb 22 17:38:43 s73v3r, well... you could always provide your own libc... Feb 22 17:38:45 pfn, bionic doesn't provide C++ library :) Feb 22 17:38:53 Mavrik, yeah, I know it's separate Feb 22 17:38:57 Those are separate and you choose one of three or four :) Feb 22 17:39:07 well, there's a single libstdc++ bundled in the ndk Feb 22 17:39:35 yp + STL Feb 22 17:39:35 is it still gcc, or can you use llvm? Feb 22 17:39:41 We didn't have major issues with libc++ though. Feb 22 17:39:56 s73v3r, GCC 4.8, 4.9 and clang 3.5, 3.6 are currently available and supported. Feb 22 17:40:08 Though, lack of any wchar/localization STL libs is annoying. Feb 22 17:40:13 Also no regex. Feb 22 17:40:36 We use clang 3.6, it's okish. Feb 22 17:40:41 Doesn't generate profiling data so f00. Feb 22 17:41:51 But on the other hand, having code that compiles well on OS X, Linux, Android and iOS is pretty sweet. Feb 22 17:48:15 Mavrik: what are you developing that requires native libs? Feb 22 17:48:50 It doesn't require native libs per se, we just use C++ as a very convenient way of sharing code between platforms. Feb 22 17:49:30 for various definitions of “very convenient” :p Feb 22 17:51:03 common business logic that is completely platform agnostic is a good candidate Feb 22 17:51:34 I see, so you write the business logic in C++ and share it through the platforms? Feb 22 17:51:50 i was just making a dig at the NDK. It’s clearly a better option than, say, Google’s ObjC to Java compiler Feb 22 17:52:03 jvrodrigues, yp Feb 22 17:52:09 err, java to ObjC Feb 22 17:52:31 jvrodrigues, and then implement UI on top of it with platform cod Feb 22 17:52:50 thats what MS does for a lot of their cross platform apps Feb 22 17:52:55 does it make the development that much faster? Feb 22 17:53:30 that would depend, if you have a lot of existing c++ to reuse, but its murkier if you have to start fresh with new c++ probably Feb 22 17:55:19 jvrodrigues, hmm, well we had a large chunk of libs in C++ before Feb 22 17:55:22 and it was a natural setp Feb 22 17:55:35 ah, that makes more sense Feb 22 17:55:38 It's also fast as hell and only really supported language on all platforms. Feb 22 17:55:43 so starting from fresh you wouldnt go that way? Feb 22 17:55:51 Oh I'd do it again. Feb 22 17:55:59 It's a bit hard to get good C++ devs lately. Feb 22 17:56:05 But it was really worth it. Feb 22 17:56:26 I mean, what's the alternative really? We're building a PDF renderer so there's not that much choices out there :P Feb 22 17:56:42 PSPDFKit? Feb 22 17:57:04 I see Feb 22 17:57:05 mhm Feb 22 17:57:59 just out of curiosity. How far can you get with App Inventor for Android? Feb 22 17:58:21 hello world is doable Feb 22 17:58:25 Mavrik alternative is javascript of course :P Feb 22 17:58:28 * g00s ducks Feb 22 17:58:48 g00s, we're actually embedding a JS runtime now. Feb 22 17:58:51 It makes me cry. Feb 22 17:59:00 oh dear Feb 22 17:59:01 why? Feb 22 17:59:09 so you guys can take over the acrobat vulnerability crown? :P Feb 22 17:59:36 :D Feb 22 17:59:41 All those backdoors! Feb 22 17:59:50 No seriously, people actually embed JS into documents. Feb 22 18:00:06 Even for crap they shouldn't. Feb 22 18:00:20 E.g. insteal of making a "Go to page link" they embed JS that changes current page and then complain that it doesn't work. :P Feb 22 18:00:30 wait wait wait Feb 22 18:00:34 people put js in their pdfs? Feb 22 18:01:09 Ohh yes. Feb 22 18:01:36 jvrodrigues for years .... Feb 22 18:01:44 2008 at least Feb 22 18:01:58 I did not know that Feb 22 18:02:58 where do you think all those acrobat issues came from? Feb 22 18:03:02 They put another pdf into a pdf and then make a link to it. pdfception. Feb 22 18:03:32 running untrusted code = #1 security win Feb 22 18:03:33 :P Feb 22 18:04:22 I think stuff like foxit resisted supported embedded scripts forever Feb 22 18:04:29 supporting Feb 22 18:05:59 Yeah. Google on the other hand links with V8 for chrome. Feb 22 18:09:08 so.. google want to take part in instant messaging? http://jibe.google.com/ Feb 22 18:10:32 they want to enhance sms/mms further to rcs Feb 22 18:10:34 sounds like Feb 22 18:12:33 well, that’s just a Google-branded Jyfe Feb 22 18:12:43 Which pretty much every carrier already has had for years. Feb 22 18:14:30 interesting. so looking at battery stats, when my phone reset (not turned off) battery was approaching 0 - because of mediaserver Feb 22 18:15:09 100%charge to 10% or so in just a few hours Feb 22 18:15:32 wait, joyn was the name. Feb 22 18:15:38 g00s: eh, that’s bad. Feb 22 18:15:44 Which android version are you running? Feb 22 18:15:49 5.0 or below? Feb 22 18:15:50 6.0.1 Feb 22 18:15:55 hm, that is weird. Feb 22 18:16:09 on 5.0 I know of several bugs to gain root by exploiting mediaserver, Feb 22 18:16:11 i just use my device for dev, so its not like i left chrome running with youtube or something Feb 22 18:16:19 no idea what could be using mediaserver Feb 22 18:16:38 Well, mediaserver is the simplest way to get full root by exploiting bugs in it, Feb 22 18:16:47 beside, the device was turned off and all this was happening Feb 22 18:16:48 but the known bugs were fixed in 5.1 and 6.0, Feb 22 18:16:51 http://ieatishootipost.sg/ Feb 22 18:16:58 heh, at first, I read that as ieatishitipost Feb 22 18:17:18 otherwise I’d say "evil app just installed a rootkit on your phone" Feb 22 18:17:35 (which would explain reboot (to pwn SBL’s TrustZone) and the mediaserver usage) Feb 22 18:17:57 justjanne hmm. i dont install anything though O.o Feb 22 18:18:16 would have had to come from some other vector, sent malicious email, etc Feb 22 18:18:19 yeah, that – plus 6.0.1 – means it’s probably just a bug. Feb 22 18:20:43 why isn't android supporting Java SE/ME? Feb 22 18:20:51 is it political or technical? Feb 22 18:21:59 Pretty much because JavaME is unusable crap. Feb 22 18:22:08 And Java SE is supported to the part that makes sense on a mobile device. Feb 22 18:22:10 android is practically java se Feb 22 18:22:25 minus useless stuff like awt, swing and some server-centric stuff Feb 22 18:24:35 Not really. Feb 22 18:24:53 Android is very different from Java SE, with many things producing different results. Feb 22 18:25:10 luckily with OpenJDK coming that will get better though Feb 22 18:25:22 "get better" Feb 22 18:25:25 Android’s sort for lists has obscure, different bugs than the SE implementation, or String::split (which is, btw, intentionally different? o.O) Feb 22 18:25:28 but yeah, saying android is practically JSE in 2016 is ludicrous Feb 22 18:25:28 for the most part, there's nothing to "get better" Feb 22 18:25:32 Yes, there is. Feb 22 18:25:49 Fixing the obscure bugs that are in Android but not in Java SE: Feb 22 18:25:55 s/:/./ Feb 22 18:27:13 justjanne, got a list of those bugs? Feb 22 18:27:19 (I've yet to meet one.) Feb 22 18:27:25 Mavrik: nope, I discover them one by one. Feb 22 18:27:38 Mavrik, +Z time format does not exist in android Feb 22 18:27:50 immediate one that I recall Feb 22 18:27:55 try "ab".split("") Feb 22 18:28:11 you’ll get: Java SE: ["a", "b"]; Android: ["", "a", "b"] Feb 22 18:28:26 lots of tiny annoying bugs everywhere. Feb 22 18:28:34 regex and calendar harmony impls were notorious in the day, maybe those were fixed Feb 22 18:28:35 justjanne, you mentioned one. Feb 22 18:28:52 Mavrik: I’d have to dig into my classes for bugs and fixes. Feb 22 18:29:14 "notorious in the day" -- that notoriety is non-existent on android Feb 22 18:29:17 As I’m on my laptop, in the kitchen, while making dinner, I don’t wish to do so. Feb 22 18:29:41 harmony's reflection implementation was poor Feb 22 18:29:52 justjanne, yeah, I'm just having trouble googling those Feb 22 18:30:06 Or at least getting a list of issues to watch for. Feb 22 18:30:16 nio.2 pieces still missing ... Feb 22 18:30:42 oh, yeah. NIO. Feb 22 18:30:54 90% of that only works after Android KitKat. Feb 22 18:31:21 And there are only 2 (!) crypto suits that work on Android 4.1 AND on Android 6.0.1 Feb 22 18:31:55 justjanne are you using any pieces of netty for your project by any chance ? Feb 22 18:31:57 overall, introducing TLSv1.1 only with KitKat was a horrible situation. Feb 22 18:32:17 g00s: I’m using nio directly, but with my own patches to get stuff running on Android. Feb 22 18:32:49 for example, to get TLS on jelly bean (not just kitkat) I use an SSLSocket with a wrapper around it exposing the Channel interface. Feb 22 18:33:01 same to get GZip on pre-kitkat. Feb 22 18:33:04 pretty painful... Feb 22 18:33:10 nio2 isn't a feature of java6 Feb 22 18:34:11 justjanne, TLS over raw socket? Feb 22 18:34:37 Whole JCA is rather slow on Android anyway. Feb 22 18:34:51 We switched to native implementation which is like 10x faster on most devices. Feb 22 18:34:54 Mavrik: With NIO you want to use TLS over channels – which are a zero-copy way to handle data. Feb 22 18:35:15 mhm Feb 22 18:35:17 Sadly, SSLEngine only supports SSLv3 on pre-kitkat devices, Feb 22 18:35:25 making it 100% unusable. Feb 22 18:35:45 minSDK 19, move on? :P Feb 22 18:36:09 Well, that’d not only prevent my users from using it, but also prevent some of my own test devices from using the app. Feb 22 18:36:33 Lots of stores still sell Gingerbread devices, even limiting to 4.1+ is already cutting off quite a large amount of users. Feb 22 18:36:41 Eh. Feb 22 18:37:51 If you randomly go into a MediaMarkt to buy a phone, you’ll end up 50% of the time with a pre-lollipop device, and often pre-kitkat, too. Feb 22 18:37:55 those api levels dont die because theres still devs that are insane enough to support them. dont be one of those :) Feb 22 18:38:27 danijoo_: I can’t stop supporting /my own devices/ ;P Feb 22 18:38:46 you can :) Feb 22 18:39:34 Yes you can. Feb 22 18:39:45 You certanly have trash bins out side the house. Feb 22 18:39:49 Let those support the devices. Feb 22 18:41:17 Well, send me a tablet (9" or larger) on Android KitKat or higher, and I certainly can. Feb 22 18:41:40 currently I’m stuck with an ancient Medion/Lenovo coproduction running Jelly Bean on an Intel processor. Feb 22 18:41:45 and her i am pondering minsdk=21 Feb 22 18:42:00 just to get rid of all teh appcompat crap Feb 22 18:42:02 justjanne, Nexus 9? :) Feb 22 18:42:09 Mavrik: if you buy me one... Feb 22 18:42:30 My current funds for projects like these are about 90€ for this month. Feb 22 18:42:44 And I already need a new keyboard, after killing yet another one. Feb 22 18:43:49 And a 400$ device like that is f***ing expensive. Feb 22 18:43:58 you dont need a cheap kitkat if you stop supporting it. win-win-situation :p Feb 22 18:44:56 then I can’t test support for any tablet device anymore ;P Feb 22 18:45:09 avd Feb 22 18:45:36 if its only gui, you can test on avd Feb 22 18:46:34 justjanne yeah, unless you are doing HW / sensor stuff - emu is your friend Feb 22 18:46:46 avd segfaults for me, 100% of the time – or throws up random bugs, like "1024x600 can not be rendered without GPU-acceleration: Only resolutions below 1280x720 are supported" Feb 22 18:46:50 g00s: sup Feb 22 18:46:55 hey thepoosh :D Feb 22 18:46:56 well, on android wear, the avd did not behave like a real device, even for the UI lol Feb 22 18:46:58 good luck Feb 22 18:47:09 thepoosh another boring androidweekly eh Feb 22 18:47:11 having avd, genymotion and real devices is the way to go Feb 22 18:47:18 less surprises Feb 22 18:47:30 g00s: I am getting really into gradle optimization in the past week Feb 22 18:47:38 * g00s wonders if /this/ is the week for AS 2 ! Feb 22 18:47:51 thepoosh oh sounds like fun :/ Feb 22 18:48:18 g00s: I like it, feels like diving into the pits Feb 22 18:48:25 thepoosh using the regular or experimental gradle plugin Feb 22 18:48:46 regular Feb 22 18:49:42 g00s: just noticed what a huge issue is, we have some dependencies... Feb 22 18:50:11 :app has A, B and C and B depends on A and C depends on A and D Feb 22 18:50:14 etc. Feb 22 18:51:08 oh so cycles in your deps Feb 22 18:52:54 in any case, I need to look into either make all dependencies transient or something Feb 22 18:53:02 thepoosh there were a few gradle optimizations articles on /r/androiddev past 1-2 weeks Feb 22 18:53:21 I'm just getting started with android development. I'm just making simple self-sufficient apps. It seems to me that my knowledge in database technology, C++, C, compiler technology, web technologies and so forth means nothing here? It feels like I'm om square 1 Feb 22 18:53:23 theres also one in this androidWeekly Feb 22 18:53:34 my linux knowledge means zero here, right? Feb 22 18:54:01 not zero, but you will see by yourself Feb 22 18:54:05 just start building an app Feb 22 18:55:38 nzt: C++ and C will only be relevant for NDK apps, and the only databse you’ll ever touch is *puke* SQLite Feb 22 18:55:58 nzt i dont think much of anything can prepare you for android dev :D Feb 22 18:56:04 well, the knowledge you gained in how to structure programs will be useful Feb 22 18:56:09 you can use sqlite and java knowledge Feb 22 18:56:35 the idea that you have a bunch of classes, rather than just sticking everything in the Activites will come in handy Feb 22 18:56:39 s73v3r but even that, structuring an android app with lolcycles and concurrency ... dont see too many parallels to other systems Feb 22 18:56:56 thats why everyone is still trying to do rxjava , mvp in 2016 Feb 22 18:57:20 'where do i put my presenter' :P Feb 22 18:57:20 i think it’s because everyone was lazy in the beginning, and just threw everything in the activity Feb 22 18:57:36 and it doesn’t help that all of Google’s example code did the same thing Feb 22 18:59:22 nzt, you can always leverage your great knowledge of web technologies and write an app in phonegap. Feb 22 19:00:06 nzt if you like dart https://github.com/flutter/flutter Feb 22 19:05:09 I set my activity enter transition with `Window.EnterTransition = new Slide(GravityFlags.Right);`. The animation slides in not only the root view, but some of the children views as well. How can I just have it slide the root? Feb 22 19:06:23 Hello Feb 22 19:06:48 test 1, 2, 3, can you hear me guys? Feb 22 19:06:49 :P Feb 22 19:07:01 yes we can >_> Feb 22 19:07:11 Hahaha, good :) Feb 22 19:07:38 hmm, how often do apps get killed prior to onActivityResult (when using startActivityForResult) Feb 22 19:08:39 @pfn you mean the application starts, but before it can run startActivityForResult, it is forcefully terminated? Feb 22 19:08:48 no Feb 22 19:08:54 I mean exactly what I said Feb 22 19:09:36 no idea then Feb 22 19:09:44 Why does a bottom fragment gets click events form while there is another fragment stacked on it? It doesn't feel right, so why do the Android engineers let the touch events reach the fragment beneath the top fragment? Feb 22 19:10:14 did the top fragment capture the touch event? Feb 22 19:10:18 I think the activity transition is also applying to the fragments? Feb 22 19:10:31 well there might be times where you'd want all fragments underneath to respond to the touch event? Feb 22 19:10:33 because top fragment or view needs to capture touch event Feb 22 19:10:52 Number5, because the top fragment doesn't receive click events, so of course it passes through Feb 22 19:10:53 uhm yeah - just have your top-most fragment consume the event Feb 22 19:10:54 sometimes it sucks ie. i had bugs with the drawer Feb 22 19:10:55 seems obvious enough Feb 22 19:11:02 s73v3r, no, but does it matter? What if I just want to show an image? Feb 22 19:11:02 so i needed to put empty onClickListener there Feb 22 19:11:12 Ashiren, setClickable(true) is sufficient Feb 22 19:11:30 would the menu still work on drawer Feb 22 19:13:06 yes Feb 22 19:13:20 mhm Feb 22 19:13:29 wee Feb 22 19:14:32 I just don't understand that if I add another fragment on top of another, the touch events goes down, the lower fragment. There must be a reason for that, or it was a design mistake from the beginning. Feb 22 19:14:48 replace fragments Feb 22 19:14:52 Number5, transparent views Feb 22 19:14:54 Number5, false Feb 22 19:15:04 so not a mistake, *your* mistake Feb 22 19:15:17 Now I have to add a silly peace of code to let the system know that I use touch events to prevent the events passed through to the lower fragment. Feb 22 19:15:43 marking your view as consuming events is silly? Feb 22 19:15:47 you're silly Feb 22 19:16:13 pfn, can you explain me why? Cause that is what I want to know, otherwise it looks like a mistake to me. Feb 22 19:16:47 well that the design Feb 22 19:17:00 Number5, I just explained why, transparent views Feb 22 19:17:01 look the other way - have cardview with image and text Feb 22 19:17:07 pfn, you can add transparent views without a fragment. So you must come with a better answer if you want to convince me. Feb 22 19:17:14 i want to mark it as read - i put white transparent view over it Feb 22 19:17:22 Number5, uh, whatever, you're dumb Feb 22 19:17:25 yet i still want the image beneath clickable Feb 22 19:17:36 call it a mistake all you want, ignoring Feb 22 19:17:55 pfn, what a smart comment man. You're brilliant. Feb 22 19:18:11 and whats wrong with transparent views and fragments Feb 22 19:18:13 not interested in discussing anything with people who want to troll Feb 22 19:19:24 pfn, I ask this so I can understand, but you just come with transparent and you suddenly expect everything is clear. Feb 22 19:19:48 it is Feb 22 19:20:04 make an inflammatory comment, get a shitty answer, take it or go away Feb 22 19:21:08 pfn, nobody asks you to answer, you little joke Feb 22 19:21:26 you asked, therefore you asked for an answer Feb 22 19:21:33 anyway, ignored, bye Feb 22 19:23:43 that’s enough. both of you stop being asses Feb 22 19:24:00 Hey guys... I'm trying to figure out how to make GridLayout fit its grid to the parent Feb 22 19:24:06 Does anyone have any tips on how I would do that? Feb 22 19:25:32 s73v3r, no problem my friend, he's just a little kid who likes to be a smart guy :) Feb 22 19:27:01 Anyone have any experience with bundles and fragments? Feb 22 19:27:12 no.. we never use those Feb 22 19:27:27 Ashiren, I understand what you mean, but I doubt that was the reason. Understanding why it was designed such, makes me be better understand how Android works. Feb 22 19:27:56 magically, it should do that automatically, provided you set the params Feb 22 19:28:05 Danijoo_ is there a better way to pass data between fragments? Feb 22 19:29:44 Is there an Id that is considered the best to use when identifying a device? Im gonna use it as a primary key in my server database Feb 22 19:29:57 RivaCom, ask your question and dont ask if someone has experience with XYZ or youll never get answers to that topic Feb 22 19:30:44 Slide Activity transition with left gravity seems to be sliding every item in a horizontal linear layout individually. How can I disable this?> Feb 22 19:30:54 pfn: I have match_parent set, I add buttons (programmatically) and it still doesn't work Feb 22 19:31:00 Here's my layout XML https://www.irccloud.com/pastebin/BE8XiGgp/ Feb 22 19:31:04 And here's my code that adds it to the gridlayout https://www.irccloud.com/pastebin/bbIzEc87/ Feb 22 19:31:42 and a screenshot of what it looks like + view bounds turned on Feb 22 19:31:51 so i have a JNI function that creates an array of shorts but i cannot seem to copy ANYTHING other than an array of BYTES from native to java Feb 22 19:31:57 it's more likely that your linearlayout isn't matching your container Feb 22 19:32:05 pfn: Ahh, I'll do that! Feb 22 19:32:08 RivaCom, you can also create methods to a fragment and after new Fragment set data using public method of your fragment before doing replace or add transaction. Feb 22 19:32:58 i can copy the data into an array of bytes but the values are 16 bits so they are split into two bytes each. i really dont want to have to go through with a for loop picking up 2 bytes, shifting them into a short and storing them in the array of shorts Feb 22 19:33:03 is there an easier way? Feb 22 19:33:04 https://usercontent.irccloud-cdn.com/file/g35YyewN/Screen%20Shot%202016-02-22%20at%202.32.55%20PM.png Feb 22 19:33:29 I440r, call the function to work with arrays of shorts... Feb 22 19:33:55 pfn: I do'nt quite understand what's happening there Feb 22 19:34:04 Well maybe I'm doing it completely wrong but I am taking data from fields using bundle.putString(data) and seting it using fragment.setArguments(bundle); in fragment 1, in fragment 2 I am grabbing the data using Bundle bundle = getArguments(); , But the data is empty on the second fragment Feb 22 19:34:04 magically, so what is the problem? the 16dp-ish border? Feb 22 19:34:16 magically, looks correct Feb 22 19:34:37 pfn i cannot copy an array of shorts from native into an array of shorts on the java side. i cant get it to work. an array of bytes works flawlessly every time. Feb 22 19:34:47 I440r, what exactly are you doing that's not working Feb 22 19:34:51 pfn: For one what I thought were "rows" seem be be being layed out in columns Feb 22 19:35:36 its kind of difficult to explain without showing you the code which i cannot do, it would take you 6 months to figure out how it works lol Feb 22 19:35:43 Secondly there should be 20 or so but there seems to only be 4 Feb 22 19:35:55 I440r, make a simple test case that copies short[] to/from java, demonstrate that it doesn't work Feb 22 19:36:01 all i know is i can copy an array of bytes from native (allocated natively) into an array of java bytes Feb 22 19:36:02 Is there an Id that is considered the best to use when identifying a device? Im gonna use it as a primary key in my server database. The answers i get when googling seems to be conflicted and mostly of old date? Feb 22 19:36:18 pfn the native side is what you wont understand. its not C Feb 22 19:36:23 its forth Feb 22 19:36:28 then your forth is doing it wrong Feb 22 19:36:35 and im kind of not releasing that code yet Feb 22 19:36:48 * pfn has no problems copying byte, int, etc. arrays in-out of jni Feb 22 19:37:11 hi! Feb 22 19:37:34 are there any "hello world" examples so that i could just copy paste and learn ? Feb 22 19:39:25 magically, you ran out of space Feb 22 19:39:39 smorgasbord, you can create a new Android project in an IDE and run it Feb 22 19:39:58 pfn: Shouldn't my buttons adjust to be the right size? Feb 22 19:40:03 How is the size of the grid cell determined? Feb 22 19:40:10 ericbsd hmm.... just want to copy paste and learn from there. :( Feb 22 19:40:25 smorgasbord: There's a whole bunch on the Android dev website! Feb 22 19:40:50 please give link thanks. magically Feb 22 19:41:05 smorgasbord: http://developer.android.com/training/index.html Feb 22 19:41:13 thanks. magically Feb 22 19:42:45 mmm, lunch today is a honmaguro otoro sashimi bowl Feb 22 19:42:59 Hey guys. How do you usually curb a Tablet oversizing text and pixel related sizes? Everything looks really good on a cellphones but seem to just get out of hand when the same app is viewed on a tablet Feb 22 19:43:16 tablet doesn't oversize anything Feb 22 19:43:31 you need to change it so that you don't use pixel sizes Feb 22 19:43:47 are you using sp ? Feb 22 19:43:53 pfn,I have been looking all over on how to avoid using pixel sizes Feb 22 19:44:00 me? Feb 22 19:44:06 ok so part of my problem is my native code has a public java wrapper function and i cannot specify a VOID address in that Feb 22 19:44:08 ... that's one of the first things they teach you to do in android Feb 22 19:44:13 cart_man, YES Feb 22 19:44:16 caps :/ Feb 22 19:44:25 i dont have one function to copy bytes, one to copy shorts, one to copy ints... ni have ONE function Feb 22 19:44:27 Shit I must have missed it : / Feb 22 19:44:47 theres no valid reason why i cannot copy a native array of BYTES into a java array of INTS Feb 22 19:44:48 I hate working with pixels always Feb 22 19:44:50 or shorts Feb 22 19:45:22 Well maybe I'm doing it completely wrong but I am taking data from fields using bundle.putString(data) and seting it using fragment.setArguments(bundle); in fragment 1, in fragment 2 I am grabbing the data using Bundle bundle = getArguments(); , But the data is empty on the second fragment , here is my first fragment(http://pastebin.com/SKk49ZDR) and my second (http://pastebin.com/CcUdpFCc) Feb 22 19:45:35 I440r, you're making no sense Feb 22 19:45:41 private static native foo(..... void blah) <-- does not allow me to make blah a void address Feb 22 19:45:45 it has to have a type Feb 22 19:45:48 I should be able to use IntelliJ IDEA CE for androi dev too, right? I've been using AndroidStudio for a while but I'm thinking it'd be nice to be able to use intellij as a java ide also. Does anyone here use CE for development? Feb 22 19:46:05 grekkos, yes, it works fine Feb 22 19:46:09 what would you call something other then Pixel Sizes ... So I can google Feb 22 19:46:12 it works better than AS Feb 22 19:46:15 and probably always will Feb 22 19:46:25 android stupdio is kind of crippled Feb 22 19:46:26 pfn: I should be able to just swap it out without any issues right? Feb 22 19:46:31 is it? Feb 22 19:46:44 cart_man: You use SP units, similar to how you use DP units for view sizes Feb 22 19:46:52 are there advantages over AS then? Feb 22 19:46:53 pfn what doesnt make sense to you, i know what doesnt make sense to me lol Feb 22 19:47:01 I440r is upset AS doesn't come bundled with the forth plugin :D Feb 22 19:47:12 the forth? Feb 22 19:47:18 g00s, ^^ Feb 22 19:47:28 grekkos, i think android studio is a MAJOR MAJOR step towards infinite complexity for development of anything Feb 22 19:47:48 forth will fix that fortunatly Feb 22 19:47:54 well so far it's only made my life easier hahaha Feb 22 19:47:57 what does forth do? Feb 22 19:48:07 g00s i would settle for it being able to handle ANY native development properly Feb 22 19:48:12 it cant even BUILD my native code Feb 22 19:48:27 because its not C/C++, its 100% pure arm assembler Feb 22 19:49:30 private static native blah(void foo); <-- why is that not allowed? Feb 22 19:49:43 why do i have to specify the type of data being passed in Feb 22 19:49:44 I440r, because void is not a type Feb 22 19:49:56 data types are a crutch for poor programmers -- Chuck Moore -- Feb 22 19:50:01 I440r: Because Google hates void* Feb 22 19:50:07 no, void is a crutch for poor programmers Feb 22 19:50:10 despite it being useful sometimes. Feb 22 19:50:10 that’s the dumbest thing I’ve ever heard Feb 22 19:50:11 justjanne, google hates everyone Feb 22 19:50:16 Indeed. Feb 22 19:50:37 But, in reality, can you try to write/read the data just to a byte[] in android? Feb 22 19:50:50 you should be able to access that natively as char* or void* Feb 22 19:51:10 justjanne, then i would have to do for(i = o/ i < datalen/2; i++ (pick up 2 bytes, convert to short, store } Feb 22 19:51:34 I440r: well, you could also just use a short* then Feb 22 19:51:45 or uint_16* Feb 22 19:52:11 if you really want to convert shit to/from a pointer, pass a long Feb 22 19:52:12 justjane now i have to have one function to read bytes, one to write bytes, one to read shorts, one to write shorts, one to read ints, one to write ints... DUMB Feb 22 19:52:35 I440r: Welcome at Google. Feb 22 19:52:40 i need one to read, one to write, not one to read one of everything and one to write one of everything Feb 22 19:52:46 and force the user to cast in code Feb 22 19:52:47 Write a preprocessor macro and automatically generate these functions Feb 22 19:52:58 pass in/return an Object Feb 22 19:53:02 pfn you cannot cast a byte to a short in java or the other way round Feb 22 19:53:03 pfn: in Java you can’t cast byte[] to short[] or similar Feb 22 19:53:04 call it a day Feb 22 19:53:20 what are you talking about, of course you can Feb 22 19:53:20 the native code has NO problems with ANY of this. its the freeking dumb java thats biting me in the ass here Feb 22 19:53:22 primitive types can’t be cast, only converted. Feb 22 19:53:28 No, pfn, you can’t. Feb 22 19:53:36 you can’t cast any primitive type to another type. Feb 22 19:53:58 (int) 2.5F is just alias for new Float(2.5F).intVal() Feb 22 19:54:01 not a cast. Feb 22 19:54:09 Object getArrayFromNative(long ptr) Feb 22 19:54:09 done Feb 22 19:54:14 ouch. Feb 22 19:54:32 myshortarray = (short[]) getArrayFromNative(ptrToShortArray) Feb 22 19:54:36 that’s a painful, but actually useful solution. Feb 22 19:54:39 interesting. Feb 22 19:54:39 primitive types cant be converted to objects either Feb 22 19:54:39 s73v3r,So SP is the one to use ? Feb 22 19:54:49 I440r, you're absolutely wrong for this case Feb 22 19:54:56 all arrays are Object types Feb 22 19:55:11 the ARRAY is, the individual cells of the array are not Feb 22 19:55:22 I solved your problem Feb 22 19:55:24 cart_man: For text, yes Feb 22 19:55:25 not my fault you can't cope Feb 22 19:56:03 I only want the root view to animate for my activity transition. I have tried remoteTarget and excludeChildren to stop the children views from animating, but they still animate Feb 22 19:56:10 I440r: It’s not Java’s fault that you’re trying to do something it’s never supported Feb 22 19:56:16 pfn with your infinite understanding of what im doing you meanh Feb 22 19:56:20 I440r: pfn practically suggested to use a long as alias for void* Feb 22 19:56:31 I440r, you keep talking but not addressing answers or questions you're given Feb 22 19:56:46 Java supports getArrayFromNative to convert a long (which is actually a void*) into an array Feb 22 19:56:50 I gave you a precise answer to do what you want Feb 22 19:57:05 s73v3r, TWO problems here. 1: im trying to NOT use more memory than is absolutely required for the data and 2: im not garbaging the buffers every time i need new data Feb 22 19:57:10 about 8 times a second Feb 22 19:57:19 I440r: yes, pfn’s solution does that. Feb 22 19:57:41 I440r: So give it a type Feb 22 20:03:19 you also realize that you can't just coerce buffer types in native either, you can't just cast an int[] to a short[], unless you're intentionally doing a bogus union type Feb 22 20:03:48 hello guys,im getting security error on developer console something like x509TrustManager.It's been 2 years my app published on store, and why im getting this error and how to solve this ? Feb 22 20:04:00 i think its about a 3rd party lib Feb 22 20:04:04 sci-fic: step 1: post the full error. Feb 22 20:05:01 google java getArrayFromNative and find 3453423454 hits on gey***ArrayElements() for char byte int short..... Feb 22 20:05:23 get*** i mean. where *** is some specific data type Feb 22 20:06:39 Indeed. Feb 22 20:06:44 this is weird. Feb 22 20:06:55 pfn: could you post javadocs link for the function you meant? Feb 22 20:07:01 https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/functions.html doesn’t contain it Feb 22 20:07:56 Is it safe to use Java 8 with android? Feb 22 20:08:08 http://electrofriends.com/articles/jni/jni-part-5-jni-arrays/ <-- neither does this Feb 22 20:08:10 smacko: Android doesn’t support Java 8. At all. Feb 22 20:08:16 smacko, its safe to use java 8 sdk if you mean that Feb 22 20:08:19 I440r, get arrayelements is used between jarray & primitive array, like GetShortArrayElements to retrieve a jshortArray on the jni side Feb 22 20:08:20 you cant use java 8 code Feb 22 20:08:21 You might want to look into RetroLambda, though Feb 22 20:08:37 ahh ok Feb 22 20:08:39 thx Feb 22 20:09:11 smacko: https://github.com/orfjackal/retrolambda allows you to use at least lambdas back in Java 6 on Android Feb 22 20:09:16 adq i know how to use that, i already am using it. getarrayelements() is NOT what i need i need getarrayelements() Feb 22 20:09:18 but on the java side you passed a short[] array, and on the jni you have to convert the jshortarray from jshort * to a short* Feb 22 20:09:34 you cannot have this voidthingy array Feb 22 20:09:45 how would it know in advance the size of the array and the size of elements? Feb 22 20:09:55 adq: he wants to have one piece of code for any type of array Feb 22 20:09:56 the contract needs to be specified Feb 22 20:09:59 he wants an arbitrary mcopy Feb 22 20:10:05 nice thx justjanne Feb 22 20:10:12 not necessarily array type copy Feb 22 20:10:29 memcpy Feb 22 20:10:33 its either that or have 5000 different copy functions, one for each data type in each direction Feb 22 20:10:46 well idk then Feb 22 20:10:57 Hi guys! Why selectionArgs parameter doesn't work for LIKE statement in SQLiteDatabase.query() method? Feb 22 20:11:05 I don't understabd Feb 22 20:11:15 I440r, use a bytebuffer, call it a day Feb 22 20:11:21 well, I440r, or do what I did, and write one piece of code first – and then generate the code. Feb 22 20:11:27 *the rest Feb 22 20:11:37 I440r, just know the type of array you pass and its length that should be enough, and yeah you can also use a direct buffer but i don't remember by heart how Feb 22 20:11:41 you can use a bytebuffer whatever way you want Feb 22 20:11:55 and then coerce it to any of char, short, long, int, etc. in java Feb 22 20:12:22 indeed. Feb 22 20:12:29 direct ByteBuffers are useful. Feb 22 20:12:33 justjanne, that still means one function per data type per direction. not ONE read() and one write() Feb 22 20:12:33 i don't see why you would need 5000 different copy though, maybe at worst one for each primitive types Feb 22 20:12:46 he exaggerates Feb 22 20:12:50 :)) Feb 22 20:12:51 I440r: yes, but you can also do code generation on the java side. Feb 22 20:12:53 slightly :P Feb 22 20:13:05 i can feel the pain Feb 22 20:13:13 you’d have one class that exposes one read() and write() function, and automatically dispatches to the relevant primitive function Feb 22 20:13:30 justjanne, im trying to simplify javas access to JNI data not tie an even worse gordian knot lol Feb 22 20:13:52 man, the redundancy of things i have to type when doing jni.... Feb 22 20:13:53 it's crazy Feb 22 20:13:54 justjanne, yes overloading hides the complexity underneath Feb 22 20:14:19 and it's prone to error Feb 22 20:14:44 getarrayregion and whatnot all copy memory anyway Feb 22 20:15:01 Hey guys, i am trying to patch an apk i have using apktool, but when i rebuild it's complaining that some 1.apk is missing, and it's looking for it in my home dir Feb 22 20:15:29 getarrayelements will also copy (potentially) Feb 22 20:15:39 grazfather, dont steal other peoples content Feb 22 20:15:43 ok im going to put this down for an hour or two and come back to it Feb 22 20:15:52 wrong channel grazfather Feb 22 20:15:56 i need a complete rethink on how ive been doing this :/ Feb 22 20:16:03 bbl Feb 22 20:16:07 danijoo_: huh. i am not Feb 22 20:16:26 bytebuffer and call it a day, I440r Feb 22 20:16:28 grazfather: is the apk using multidex maybe? (multiple .dex files in the apk?) Feb 22 20:16:45 apktool is not yet fully compatible with that. Feb 22 20:16:49 justjanne: when i used dex2jar there was only a single classes.dex Feb 22 20:16:57 not sure how else I could check? Feb 22 20:17:05 hm. Feb 22 20:17:09 so it’s not multidex. Feb 22 20:17:19 did you install the framework prior to decompilation? Feb 22 20:17:25 what are you trying to patch in/out? Feb 22 20:17:35 what's the payoff if you and have an app used by 1M people and it has adsense in it? Feb 22 20:17:39 grazfather wrong channel for reversing other preople's APKs Feb 22 20:17:49 i have the sdk, yes. this one is for 22.01 which i had to install manually after, that was the first error I got when trying to rebuild Feb 22 20:18:01 g00s: why? That’s part of app development. Feb 22 20:18:10 it’s not related to rooting at all, or modding the OS. Feb 22 20:18:13 g00s: actually it's an apk we own but lost the source to lol, just need to patch a hard coded ip address Feb 22 20:18:14 nzt, nothing up to much money Feb 22 20:18:26 nzt, this depends on more than just number of downloads Feb 22 20:18:54 danijoo_: what if it's flappy bird? Feb 22 20:19:04 grazfather: anyway, you need to install the framework with apktool first. Feb 22 20:19:07 with $ apktool if framework-res.apk Feb 22 20:19:09 nzt, this guy earned 10k a day Feb 22 20:19:10 Or rather: what's the best way to make money out of apps like flappy bird? Feb 22 20:19:15 it will respond with "I: Framework installed to: 1.apk " Feb 22 20:19:17 danijoo_: oh.. Feb 22 20:19:35 danijoo_: only on ads iirc? Feb 22 20:19:38 dont come to android for making money Feb 22 20:19:45 what, why nto? Feb 22 20:19:51 the chances you actually earn something are close to nothing Feb 22 20:20:07 for every flappy birds there are 1000 or more apps that never get a download Feb 22 20:20:26 justjanne: where do I get the framework? **** BEGIN LOGGING AT Mon Feb 22 20:22:37 2016 Feb 22 20:22:56 hey! anyone have experience with integrating data from the internet with apps? I need some insight as to when the best time to download the data would be as well as how to store the data Feb 22 20:23:38 justJanne: ty. it's not there, but running a find for framework-res.apk now Feb 22 20:23:58 tried /system/framework or whatever it’s called= Feb 22 20:24:01 *? Feb 22 20:24:08 yep /system/framework/framework-res.apk Feb 22 20:24:26 there’s your 1.apk, have fun! Feb 22 20:24:51 cart_man, r*1.2f Feb 22 20:25:58 lol, SourceTree 2.2.1 update is corrupt. dl from site , thats corrupt too. wtf has atlassian been doing? shit has been trainwreck for 6mos Feb 22 20:26:01 cart_man: you can use suffixes for types, specifically F for float, D for double and L for long. Feb 22 20:26:33 so it turns out excludeChildren does not work, but if I removeTarget on each child then it works Feb 22 20:26:41 why would this be the case? Feb 22 20:44:42 http://imgur.com/d24kZaz Feb 22 20:44:46 yum, today's lunch Feb 22 20:45:12 pfn: Is there a thing that does what I want to do? Like fills up the screen with a grid where I can place views? Feb 22 20:46:04 pfn: poke? Feb 22 20:47:08 basically Feb 22 20:48:57 I'm trying to take data from fields using bundle.putString(data) and seting it using fragment.setArguments(bundle); in fragment 1, in fragment 2 I am grabbing the data using Bundle bundle = getArguments(); , But the data is empty on the second fragment Feb 22 20:49:15 here is my first fragment(http://pastebin.com/SKk49ZDR) and my second (http://pastebin.com/CcUdpFCc) Feb 22 20:49:59 magically, anyway, you can use hierarchyviewer to see where all your views went Feb 22 20:51:19 RivaCom, you put a string into the bundle and try to get a double from the bundle../ Feb 22 20:51:39 thats not working Feb 22 20:53:26 Oh that's true.. shoot im trying to convert my stuff from activity using intent to fragments but having to take out stuff, I guess that would be hte issue Feb 22 20:53:33 google just sent me 3 mails in 2 minuates about a finished translation service. Feb 22 20:53:43 because 1 isnt enough Feb 22 20:54:24 I used Double.parseDouble(i.getStringExtra("data")); before, is there something like this that would work for getDouble ? Feb 22 20:54:40 huh Feb 22 20:54:49 but yum, a big bowl of raw fish and rice, yum Feb 22 20:55:15 RivaCom, just parse it direcly when you get the input from your edittext Feb 22 20:55:21 and put doubles into your bundle Feb 22 20:55:49 Thanks! Feb 22 21:01:25 I want this animation to animate the LinearLayout as a whole, not each item individually… how do I change that behaviour? Feb 22 21:01:28 magically, anyway, you never give your button a text label, so can't tell what's going where Feb 22 21:15:00 so basically to create a circular reveal like this http://www.materialup.com/posts/whatsapp-live the view is there from the beginning and its invisible or is there another way/technic im missing ? Feb 22 21:15:34 pfn, nice chirashi bowl Feb 22 21:15:36 :) Feb 22 21:18:48 you know how when a LinearLayout animates that it animates all the items individually, right? Feb 22 21:18:59 does that sound familiar? because that is what is happening to me Feb 22 21:19:17 need help, on inapp billing i receive PurchaseError{type=3 subtype=0} Feb 22 21:19:27 where is error meaning? Feb 22 21:20:26 did someone say chirashi Feb 22 21:20:40 Am I not allowed to call getSystemService from a non-UI thread? Feb 22 21:20:55 grekkos, so yummmmmmy Feb 22 21:21:04 I appear to get bad results from the DownloadManager when I do Feb 22 21:21:18 duboisj: the only thing I see from the docs is this: Note: System services obtained via this API may be closely associated with the Context in which they are obtained from. In general, do not share the service objects between various different contexts (Activities, Applications, Services, Providers, etc.) Feb 22 21:21:22 PendingIntent pendingIntent = iabService.getBuyIntent(3, getActivity().getPackageName(), sku, "inapp", null).getParcelable("BUY_INTENT"); Feb 22 21:21:24 getActivity().startIntentSenderForResult(pendingIntent.getIntentSender(), 42, new Intent(), 0, 0, 0); Feb 22 21:21:38 interesting, I can see the ctrl I escape sequences in the chat Feb 22 21:21:43 Hi, can I edit String recources during runtime to set some kind of flag to a text? ("seen" would be the flag for a text in a little fortune teller test app) Feb 22 21:21:58 grekkos: right. I’m not sharing from one Context to another. Feb 22 21:21:58 oO Feb 22 21:22:03 nunumint, no Feb 22 21:22:42 Is there some reason that notifyDataSetChanged() doesn’t update the UI of a RecyclerView but setting a whole new adapter does show new items? Feb 22 21:22:43 is there a channel for googleplay? Feb 22 21:22:48 duboisj: I don't know too much about it in detail, though, but I have used it before Feb 22 21:23:01 need help pls Feb 22 21:23:19 thx danijoo Feb 22 21:26:14 how can I slide all of the items in a LinearLayout simultaneously rather than the default staggered behaviour? Feb 22 21:31:30 how can I construct an empty AttributeSet? Feb 22 21:32:16 ghostmoth, the reason is doing it wrong Feb 22 21:33:22 pfn: I figured. I’m pretty new to this. But I’m using a vanilla recyclerview example from the Android docs. Feb 22 21:42:13 anyone can help me about android in app billing? Feb 22 21:52:15 no Feb 22 21:54:27 xan_IT: Just ask your question. If someone can help, they will. If they can’t, they’ll be snarky Feb 22 22:18:16 Ha Feb 22 22:35:51 how can I transition smoothly from activity A to activity B when activity A finishes when activity B is started? Feb 22 22:39:24 erisco, that is a very open ended request, and too vague about the details of your app for anyone to give a good answer. Have you tried searching google for activity transitions? Feb 22 22:39:50 truckcrash, been doing that for 5 and a half hours today Feb 22 22:40:03 So what parts exactly are you getting stuck on? Feb 22 22:40:21 just what I said Feb 22 22:40:41 ok, well then my answer is just what I said :/ Feb 22 22:40:48 it is inconsistent, but it seems at best with FinishAfterTransition() the finishing activity will play its exit animation, then exit, then the next activity will start Feb 22 22:41:20 between the exit and start the transition between the two activities is interrupted Feb 22 22:41:21 erisco, you really dont give enough information. Feb 22 22:41:35 are you using the new activity transition api? Feb 22 22:41:39 it flashes to the last activity on the stack Feb 22 22:41:56 I didn't know there was an old and new one, so I don't know Feb 22 22:42:07 it is only compatible with Android 5 something and up Feb 22 22:42:54 the only smooth, consistent activity transitions are when you start a new activity without finishing the calling activity Feb 22 22:44:53 truckcrash, if it is open ended then are you saying there are many ways to do it? because I haven't found a single one Feb 22 22:47:06 show your code and a video of what you're seeing Feb 22 22:47:50 ^^ this. We need to see more specifics of what you are doing. Feb 22 22:48:11 yeah that's not going to happen, but thanks anyways Feb 22 22:48:49 threres no way to help you then Feb 22 22:49:06 wow this looks pretty neat http://mathparser.org Feb 22 22:49:15 advertised to work on android Feb 22 22:49:24 uou cant ask a car mechanic to fix your car without showing it to him. Feb 22 22:50:22 danijoo NSA knows what will happen to your care before you do, and send report to your friendly local mechanic Feb 22 22:50:30 s/care/car :)_ Feb 22 22:52:03 g00s, what is the input there? LaTeX? an image? Feb 22 22:52:06 ¨special service¨ :p Feb 22 22:52:24 truckcrash plain old string Feb 22 22:52:50 so user can type in expression and this will evaluate it Feb 22 22:53:13 g00s, oh.... yeah took me a second. thats neat Feb 22 22:53:30 how might I finish the parent activity after the child activity has started? can I grab an activity out of the navigation stack and call .Finish() on it? Feb 22 22:54:57 erisco, http://stackoverflow.com/questions/10202903/skip-going-back-to-direct-parent-activity-when-pressed-back Feb 22 22:55:28 this finishes the first activity before the second is started Feb 22 22:55:40 which screws up the transition animation, unfortunately Feb 22 22:56:15 have you tried the second answer? Feb 22 23:09:41 i absolutely love how Android is so willing to tell me what went wrong without actually telling me what went wrong Feb 22 23:09:47 am i the only one who has to reset XML editor to Android style every time I start AS - seems like it doesn't save this Feb 22 23:10:57 you’re not the only one. The XML layout stuff in Studio is broken as fuck Feb 22 23:11:29 xml editor has an android style? Feb 22 23:12:02 when I go to prefs -> editor -> XML -> Arrangement, and then select "Set from -> predefined style -> android" ... that works until I restart AS Feb 22 23:12:27 you can actually see that applying that changes stuff in that window Feb 22 23:12:40 truckcrash, it sometimes shows the Activity anyways even with noHistory being true, but maybe more than half the time it seems to work Feb 22 23:12:49 truckcrash, that could do for now Feb 22 23:16:09 erisco, ok. Good luck with it. Im going afk for now. Feb 22 23:16:23 ugh, it seems sometimes it keeps the activity on the navigation stack as well Feb 22 23:16:25 that is a disaster Feb 22 23:18:45 ah that was a little Xamarin obscurity… never mind Feb 22 23:19:50 is android-studio spyware/grayware-free? Feb 22 23:20:56 yes Feb 22 23:23:34 nzt lol, well you have to disable telemetry to google Feb 22 23:23:49 g00s: .. rly? ffs Feb 22 23:24:28 on first install, you'll get a popup after a few minutes of use like 'send stuff to google' Feb 22 23:25:17 I would, if they weren't such **** Feb 22 23:25:35 it’s the internet, you can swear Feb 22 23:25:45 so android-studio is a zip-file with a stand alone application? Feb 22 23:25:59 what platform Feb 22 23:26:01 ? Feb 22 23:26:14 on OS X it’s a disk image, like any other application on OS X Feb 22 23:30:26 how do i access my not to google synced contacts on my broken android phone (no screen, no touch, no adb enabled, logged in to wifi)? is there no app which i can install via play store in the web which reads all contacts and uploads them? and does anything prevents me of doing such an app by myself? an app which runs at startup, access all contacts and upload? Feb 22 23:30:59 brief this is the wrong channel Feb 22 23:31:13 brief, 1) wrong channel and 2) no, without adb and screen, you are fucked Feb 22 23:31:22 s73v3r: and you update it by checking their download page once in a while? Feb 22 23:31:32 no, there’s a built in update Feb 22 23:31:59 g00s: the first question is not match perftly to this channel but i perhaps explain the later Feb 22 23:32:32 how would you get such an app installed if you have no ADB? Feb 22 23:32:47 lol you'd have to publish it to play, install from web Feb 22 23:32:55 sounds like ... FUN Feb 22 23:33:05 danijoo: i can install apps via web, so why not create an app which runs at os start (e.g. service), access contacts (which should be possible since rights are granted while installing) and upload them Feb 22 23:33:17 doesnt help because even if installed via play, the app wont run until you click it Feb 22 23:34:03 oh yeah forgot about that Feb 22 23:34:13 danijoo: sure? what about implementing a GCM listener which runs the "upload contacts"-action on receiving a message? Feb 22 23:34:21 hm.. RECEIVE_BOOT_COMPLETED is a nice idea. Feb 22 23:34:33 you won’t have a GCM token without running the app Feb 22 23:34:36 RECEIVE_BOOT_COMPLETED won't work until app is run once Feb 22 23:34:49 but you could upload to a random server Feb 22 23:35:02 so this idea isnt that bad Feb 22 23:35:02 basically you have to have some way of launching the app Feb 22 23:35:38 you can start an intentservice via broadcast receiver and android.intent.action.BOOT_COMPLETED or is this only registered on first app start? Feb 22 23:36:04 so no RECEIVE_BOOT_COMPLETED or GCM token until first start of the app? that destroys is :( Feb 22 23:36:15 it won’t be registered unless your app has started once Feb 22 23:36:37 then you are fucked :/ Feb 22 23:37:39 what about to sideload an image with debugging enabled? Feb 22 23:38:00 are you rooted ? Feb 22 23:38:04 need a compatible rom, not so common Feb 22 23:38:39 let this be a lesson: Always have your contacts synced with some server Feb 22 23:38:46 no actually not... but perhaps it can be done, volume buttons are working Feb 22 23:39:11 brief, unlocking the bootloader will wipe the phone unfortunatly Feb 22 23:39:19 s73v3r: i will tell the person, luckily, it is not mine :) Feb 22 23:39:53 depending on how desperate they are, tell them to go get the screen repaired Feb 22 23:40:37 yeah. sometimes you can get a cheap china replacement for < 50$ Feb 22 23:41:05 and replacing can be done by yourself if it doesnt have to look p[erfekt Feb 22 23:41:17 another option would be to buy a mhl adapter and connect the phone to a screen Feb 22 23:41:36 you said the touchscreen controller was broken Feb 22 23:41:45 navigation would work with an usb mouse but only screen OR mouse is working at the same time Feb 22 23:41:50 s73v3r: so the unpacked directory is the studio? I don't install it? Feb 22 23:41:57 just download it Feb 22 23:42:00 i said no touch and no screen, i dont know if it is the controller Feb 22 23:42:21 what phone is it? Feb 22 23:42:33 GT-I9305 Feb 22 23:42:35 in the time you’ve spent between then and now, you could have downloaded it and seen for yourself. I also said my situation was OS X, I have no idea what you’re running Feb 22 23:42:44 no idea what phone that is Feb 22 23:42:50 samsung galaxy s3 Feb 22 23:42:53 mini? Feb 22 23:43:17 no, not mini, samsung galaxy s3 Feb 22 23:44:05 70$ for the screen replacement part Feb 22 23:44:05 s73v3r: why did you mention the touch controller? would it affect a mouse connected via usb? Feb 22 23:44:28 you mentioned the touch controller Feb 22 23:45:31 i just said there is no screen and no touch :) the device has just fallen on the ground, looks like the standard spider app Feb 22 23:46:47 tell them to replace the screen Feb 22 23:47:16 "OpenJDK shows intermittent performance and UI issues. We recommend using the Oracle JRE/JDK." should I listen? Feb 22 23:47:23 What is it even complaining about? Feb 22 23:47:42 it’s complaining about intermittent performance and UI issues Feb 22 23:48:34 for the compiled programs or just while using android-studio? Feb 22 23:48:50 just using studio Feb 22 23:49:15 oh, who cares lol :p Feb 22 23:49:15 you have a choice of JRE on device Feb 22 23:49:35 lol right, it' doesn't run either of those on the device Feb 22 23:49:59 argh, RECEIVE_BOOT_COMPLETED was delayed to after first start of the app in Android 3.1 Feb 22 23:50:08 yeah. we told you Feb 22 23:51:24 yes, thx to everybody Feb 22 23:59:27 can I set the task affinity when I create an Intent? Feb 23 00:01:48 I am finding not… which means you cannot add affinities at runtime, which is a shame Feb 23 00:04:17 So I can install multiple SDK platforms? Feb 23 00:04:33 I should, right? Few have the latest android version Feb 23 00:07:20 yes. Go read the developer.android.com site Feb 23 00:08:08 I am, but it doesn't state Feb 23 00:08:14 it just says "do that" Feb 23 00:08:31 for example, it tells me to install ARM EABI v7a System Image Feb 23 00:08:32 most important android-dev skill: googling ;) Feb 23 00:08:35 no, it doesn't Feb 23 00:08:54 do I need ARM EABI v7a System Image for the older SDKs I downloaded too? Feb 23 00:09:05 I already have one for 6.0 Feb 23 00:09:26 you need an image for any emulator you want to run Feb 23 00:10:43 so although they both are named "ARM EABI v7a System Image" they are for two different simulators? (one for 6.0 and one for 4.0 in this case)? Feb 23 00:11:09 yes Feb 23 00:11:22 do you not look at the SDK manager? Feb 23 00:11:28 It’s pretty clear Feb 23 00:11:42 but if it's bytecode, why is there one Google API for x86 and one for Arm? Feb 23 00:11:49 I'm looking at it yes Feb 23 00:12:01 nzt: not all of it is bytecode Feb 23 00:12:11 hmm Feb 23 00:12:26 does it matter to me as a developer? Feb 23 00:12:31 not in the least Feb 23 00:12:39 why is it there? :D Feb 23 00:12:48 I mean, a simulator for both Feb 23 00:13:03 nzt: because you might want to use non-bytecoded parts yourself Feb 23 00:13:05 one is for x86 processors, one for ARM Feb 23 00:13:29 so you'd use ARM emulator for testing binary code on arm, and x86 one for day-to-day developement Feb 23 00:13:59 so x86 because it's faster to simulate/run/develop, and arm for production? Feb 23 00:14:05 generally Feb 23 00:14:10 yes Feb 23 00:14:48 I'll just go with the arm. Doesn't really matter? Feb 23 00:15:17 bad decisio Feb 23 00:15:33 either one is a terrible decision. Just use a real device Feb 23 00:15:59 nzt: ARM is *slow* Feb 23 00:16:01 emulator 2.0 is faster Feb 23 00:16:23 p_l: but so is the phone I'm developing for. My PC is probably faster even if it's emulating? Feb 23 00:16:37 doesn’t matter Feb 23 00:16:40 pc is almost never faster than phone Feb 23 00:16:53 nzt: the arm emulator is *slower* than the phone Feb 23 00:16:58 no matter which phone :P Feb 23 00:17:46 a gameboy is faster then the arm emulation Feb 23 00:18:17 lol Feb 23 00:19:10 thanks Feb 23 00:19:24 new android devices support older SDKs? Feb 23 00:19:47 generally. (I can understand if Android 6.0 don't support 1.0) Feb 23 00:19:49 read the docs.. Feb 23 00:20:03 I don't even know where the doc is Feb 23 00:20:10 d.android.com Feb 23 00:22:20 what are the support libraries? (I'm reading the doc but I don't know what support libraries is) Feb 23 00:22:42 google it. Feb 23 00:25:47 read d.android.com in its entirety Feb 23 00:26:04 there's a whole getting started Feb 23 00:26:28 the api guides are a necessity to read fully Feb 23 00:38:25 Appropriate place to talk about app names? I have an app that is basically "your portal to space events and news in your pocket". I've initally named the app Horizon but am considering naming it "SpaceHub" while its still new. Thoughts? Feb 23 00:41:54 orbyt_: i think that's more of a product/marketing question more than anything else Feb 23 00:42:25 grekkos: agreed, really just asking for general opinion Feb 23 00:42:50 orbyt_: imo, anything with "space" in it is more obviously about space Feb 23 00:43:05 Horizon makes me think of a sunset Feb 23 00:43:41 grekkos: that was my though process as well. When telling people about the app i kept saying "your space hub", so it made me question the name Feb 23 00:43:45 thought* Feb 23 00:43:57 is there some issue with CardViews and rounded corners on KitKat devices? Or Pre-Lollipop devices? Feb 23 00:44:25 you should do some research on keywords Feb 23 00:44:56 danijoo: As in seo? How much does that apply to an app? Feb 23 00:44:59 I guess including 'space' in your name will give you a better chance to get found by the people looking for such an app Feb 23 00:45:05 s73v3r: not sure about that but it wouldn't surprise me, I've had some issues with alert dialogs Feb 23 00:46:03 (point being that I would expect alert dialogs to be simpler) Feb 23 00:47:07 I’m just getting a weird error, that I’ve been able to pin down to a layout with a CardView, but that’s about it Feb 23 00:47:08 java.lang.ClassCastException: android.graphics.drawable.GradientDrawable cannot be cast to android.support.v7.widget.RoundRectDrawableWithShadow Feb 23 00:50:17 Dagger is confusing Feb 23 00:50:45 what is the huge advantage? Is it that much easier than designing for dependency injection manuall? Feb 23 00:50:55 Yes Feb 23 00:53:03 generally it’s easier to get people to join the company and be productive if you’re using standard libraries, instead of rolling your own all over the place Feb 23 00:53:07 well of course you'll say that Feb 23 00:53:31 yeah I found android-boilerplate yesterday. Lots of cool stuff there Feb 23 00:53:41 but I need to learn like 12 libraries Feb 23 00:55:08 so if I replace my CardView with a RelativeLayout, it doesn’t crash on 4.4 Feb 23 00:55:39 but the reason we used a CardView was for rounded corners Feb 23 01:00:06 do you know of a nice Dagger tutorial with lots of examples? Feb 23 01:13:50 how can I use the enter animation when my activity receives a new intent? Feb 23 01:14:17 I mean the enter transition Feb 23 01:16:15 s73v3r CardView crashed on 4.4 ? O.o Feb 23 01:16:42 i’m still not entirely sure if it’s the CardView itself, or maybe something I was doing it Feb 23 01:16:56 but it’s beginning to look that way Feb 23 01:23:32 so it’s not CardView itself, but when I try to set the background Feb 23 01:23:54 set the BackgroundResource, specifically Feb 23 01:24:11 hm. CardView had its own bg for pre-lollipop of i recall Feb 23 01:24:17 because of shadhow Feb 23 01:24:37 do you know the name of the method to set it? Feb 23 01:25:02 i see a cardBackgroundColor, but that only works if you’re setting a color Feb 23 01:25:16 don't remember ... i took CardView out of my app - no more cards Feb 23 01:27:22 what is the difference between transitions and animations? Feb 23 01:28:54 animations can happen whereever, a transition happens upon changing of an activity/fragment Feb 23 01:29:47 thanks Feb 23 01:30:27 something that is confusing me… when I set an enter transition I can instantiate a Transition object and pass it to Window.setEnterTransition Feb 23 01:30:46 but Activity.overridePendingTransition only accepts integers Feb 23 01:31:12 I want to use the same transition I am using for enter Feb 23 01:32:02 why in one case do I have to instantiate a Transition object and in another case I have to load a resource? Feb 23 01:34:23 this is related http://stackoverflow.com/questions/19380339/overriding-pending-transition-with-animation-object-instead-of-resource-id Feb 23 01:36:18 this is from 2010 http://stackoverflow.com/questions/4001440/custom-animation-object-for-transition-in-android Feb 23 01:36:47 this is insanity -.- Feb 23 01:39:46 we see a lot of device specific bugs with Samsung Feb 23 01:39:50 are we the only ones? Feb 23 01:39:53 yep Feb 23 01:40:19 hah really Feb 23 01:40:59 I don't see how we could write bugs that only appear on samsung devices Feb 23 01:41:10 but our app sucks, its totally possible Feb 23 01:46:59 you should try googling :P Feb 23 01:49:26 okay, I have the activity sliding in from the right Feb 23 01:49:44 however, I want the previous activity to stay visible on the left as the new activity slides in Feb 23 01:50:17 what happens is the previous activity disappears and the screen fills with black Feb 23 01:52:58 this seems bang on so I'll try that http://stackoverflow.com/questions/11195941/switching-between-activities-dont-hide-previous-activity Feb 23 01:53:57 RustyShackleford: I have only seen one bug related to samsung and support lib Feb 23 01:55:42 erisco: I cannot imagine what you want to achieve Feb 23 01:56:03 apparently smoothly transitioning between two activities cannot be understood Feb 23 01:56:15 not this Feb 23 01:56:17 which is a comment on how difficult it has been to find any information ot his Feb 23 01:56:47 I mean about not hiding previous activity Feb 23 01:57:00 because activity is always on full screen Feb 23 01:57:26 if that was the case then how do window transitions work? Feb 23 01:58:05 animates one view and then creates the activty ? Feb 23 01:58:30 you can see both activities while it transitions Feb 23 02:04:40 erisco, sometimes you have to animate at fragment or view level Feb 23 02:04:54 i don't feel like i have much control and precision over activity anims Feb 23 02:05:35 unfortunately it has to be activities Feb 23 02:06:15 apparently they had success in the SO link I gave, but I cannot reconstruct the solution… it is not overly clear what the solution was Feb 23 02:06:21 I still have the black region Feb 23 02:07:25 hm, maybe it is because the intent I am using is different Feb 23 02:07:34 I am using reorder_to_top Feb 23 02:07:56 try without any flags Feb 23 02:08:00 I mean reorder_to_top Feb 23 02:08:04 well I have to use that flag though Feb 23 02:08:14 Good morning android Feb 23 02:09:22 if I removed that flag then the Window transition would take over, and I already have the Window transition working Feb 23 02:09:45 window transitions do not happen for reorder_to_front, for whatever reason… I really wish they would Feb 23 02:09:46 so.. good luck! Feb 23 02:09:48 ;) Feb 23 02:17:51 here is yet another article claiming this feat http://madcoda.com/2013/09/android-activity-transition-slide-in-out-animation/ Feb 23 02:17:54 I cannot reproduce Feb 23 02:18:59 even if I remove the window transitions, and remove the intent flags, I still get black regions Feb 23 02:19:58 maybe these negative percentages are magic? I'll try copying more exactly Feb 23 02:26:50 these people are bonkers Feb 23 02:28:22 if I refactor to use a ViewPager, how can I lazily load each page? Feb 23 02:28:34 it takes too much time to load all the pages up front Feb 23 02:35:54 you cannot load each page Feb 23 02:36:07 but you can specify how many pages you want to load Feb 23 02:36:20 I dont remember what variable was taht Feb 23 02:36:23 *that Feb 23 02:38:38 <_xor> Hey guys, newbie here. I'm builing an app that I'd like, as a feature, the ability to auto-login when it's connected to a specific providers Wi-Fi network. Feb 23 02:39:41 <_xor> What would be the best way to detect that it's a Wi-Fi AP on a particular providers network? I mean I guess I could make a small, specific request to a pre-defined network location or something that would only be available on that network. Feb 23 02:42:57 ah ha! how to get the window transition to play after reorder_to_front? Feb 23 02:43:03 in OnNewIntent, just Finish and StartActivity of course! Feb 23 02:43:20 yes… destroy and recreate the same activity to play the transition… Feb 23 02:43:30 is there a shortcut to open the documentation for a Class or method in AS? Feb 23 02:44:13 maybe ctrl-q Feb 23 02:44:47 * Ping_2_Ur_Pong kicks canvs2321 in the nuts for bad trolling. Feb 23 02:46:02 don't be an idiot, try it Feb 23 02:46:14 haha Feb 23 02:46:21 CTRL + Q (Win) Feb 23 02:46:22 F1 (Mac) Feb 23 02:46:26 * Ping_2_Ur_Pong apologizes Feb 23 02:46:30 miaculpa Feb 23 02:51:55 how do you finish a task? Feb 23 02:53:08 I thought finishAndRemoveTask() would do that… it must somehow be starting more tasks than I think Feb 23 02:55:11 you cannon finish task Feb 23 02:55:27 it will finish when it's job is done **** ENDING LOGGING AT Tue Feb 23 02:59:58 2016