**** BEGIN LOGGING AT Mon Jul 06 02:59:59 2015 Jul 06 03:00:00 The code ir7466 is working with doesn't seem very Android-friendly, since Android GUI stuff tends to be asynchronous. That code basically requires a quick `finish();` no matter what. Jul 06 03:00:12 adq ah Jul 06 03:00:36 why not just disable your thing with like a overlay while OK is doing its thing? Jul 06 03:00:53 like powerdown animation, then reactivate it Jul 06 03:02:25 yep lasserix, will find a way and provide a filler/placeholder until i got the mic again Jul 06 03:02:33 Anyone have expi using Osmidroid or MaxBop sdk? Jul 06 03:03:08 is so what is a surfaceView again? Jul 06 03:03:27 rtfm Jul 06 03:03:29 a view for drawing to from another thread usually Jul 06 03:03:41 like a canvas? Jul 06 03:04:34 Provides a dedicated drawing surface embedded inside of a view hierarchy Jul 06 03:04:38 http://developer.android.com/reference/android/view/SurfaceView.html Jul 06 03:07:43 so its ideal for a game? where you draw things with xs and ys changing around alot? Jul 06 03:13:52 NateRiver, not really or depends on the type of game (for a chess game it should be ok), FPS will quickly suffer, openGL is the road for game Jul 06 03:14:27 usually when you make a fragment class you throw all the fragment specific code and logic in the onCreateView? Jul 06 03:14:34 adq okay cool Jul 06 04:07:22 Hi!!! Jul 06 04:07:42 Is there a website where I can see version differences between the APIs? (not user point of view, developer point of view) Jul 06 04:16:13 grepcode Jul 06 04:16:32 will give you the source, then you can diff some classes Jul 06 04:17:10 but you probably want like this: http://developer.android.com/tools/revisions/platforms.html Jul 06 04:23:18 lasserix ty! Jul 06 04:23:34 hello all Jul 06 04:23:54 sup twofer Jul 06 04:35:35 i got a new comp, but downgraded from i7 to i5 and it lags a ton compared to old comp even though old comp had 3 gig ram and was from 2012 Jul 06 04:45:07 what type of image file uses least memory? Jul 06 04:47:28 That petition got 150,000 signatures. Jul 06 04:51:07 I've got Ubuntu guys Jul 06 04:51:32 all image files use the same amount of memory Jul 06 04:51:34 yay! Jul 06 04:51:53 and seems adb on ubuntu does not detect my phone either Jul 06 04:52:35 sounds like you didn't turn on usb debugging then Jul 06 04:52:37 maybe adb does not like my phone Jul 06 04:52:37 lsusb Jul 06 04:52:52 pfn, I've it on Jul 06 04:53:21 I can see my phone with 'lsusb' Jul 06 04:53:33 exoloastic: exactly what can you see? Jul 06 04:54:07 Leeds: I see its vendor ID and Product ID Jul 06 04:54:08 Leeds: is DrawerLayout suitably modern when coupled with Material Design via AppCompat? Jul 06 04:54:17 also, on Linux, you need permission to the /dev device Jul 06 04:54:31 I followed this instruction: http://bernaerts.dyndns.org/linux/74-ubuntu/245-ubuntu-precise-android-adb-fastboot-qtadb Jul 06 04:54:41 exoloastic: ok, I didn't ask you to *describe* what you see Jul 06 04:55:24 they make it wayy too hard to make your own circular imageview...! Jul 06 04:55:25 RudyValencia: for a navigation drawer? should be ok Jul 06 04:55:26 pfn, yes I know Jul 06 04:55:32 ah Jul 06 04:55:34 exoloastic: what are the IDs? Jul 06 04:55:42 Leeds: okay Jul 06 04:55:48 pastebin lsusb Jul 06 04:55:49 they are okay? Jul 06 04:55:55 well, that's good to know Jul 06 04:56:28 RudyValencia there is a new NavigationView thingy Jul 06 04:56:38 you can check that out also Jul 06 04:57:39 cool, it uses a standard menu Jul 06 04:57:48 pfn: lsusb: http://pastebin.com/Grujgp3Z Jul 06 04:58:13 -v Jul 06 04:58:53 exoloastic: presumably the one without a vendor name is the phone? Jul 06 04:59:48 ok, I'm done with this, for good Jul 06 05:00:01 pfn: have fun Jul 06 05:01:25 pfn: a moment pls Jul 06 05:03:09 Leeds: Those IDs and Broadcom Corp means its my phone, the same ID and vendor name when I used Windows Jul 06 05:04:27 exoloastic: sorry, I'm out of this conversation now... you really need to reply faster if you're actually talking to people Jul 06 05:05:10 pfn: lsusb -v : http://pastebin.com/gmcDMKmT Jul 06 05:06:23 Leeds: Im sorry for my slow response. anyway, thanks for your time, I really apriciate it. Jul 06 05:07:06 is i5 8 gigs of ram not good enough to run android studio? it always lags a ton Jul 06 05:08:04 i run with Core2 Duo and 4G ram, so i'm sure its enough Jul 06 05:08:25 then again i dont have enough memory to run anything else :D Jul 06 05:08:44 it always starts off okay, then after like 30 min it gets laggier and laggier until it locks up and freezes Jul 06 05:08:57 doesn't sound right Jul 06 05:09:16 when your programming in an IDE like android studio it always automatically saves every second righT? what is the purpose of save all? Jul 06 05:09:16 I've got 16GB, and I normally have to kill off the Chrome GPU process by lunchtime/mid-afternoon to stop it swapping... but then I do typically have, well, *many* tabs open Jul 06 05:09:47 Leeds next Firefox has multi process, in some form - pretty excited about that Jul 06 05:10:50 this last chrome (43) has been terrible stability wise for me, i get maybe 20-30 'Aw Snap!'s per day Jul 06 05:11:08 NateRiver: Ctrl+Shift+A > "asterisk" > Enter. Jul 06 05:11:17 You'll see the difference between manual saving and automatic saving. Jul 06 05:11:35 k i need to restart anyways, brb Jul 06 05:21:26 that really is a slow box nate has :) Jul 06 05:29:18 I'm new to programming...... Should breakpoints stop at anywhere? Jul 06 05:29:37 Or are there rules like it can't stop on a if statment etc? Jul 06 05:32:58 Almost anywhere Jul 06 05:38:31 My breakpoints don't always stop Jul 06 05:38:48 THey get checked as the debugger executes that line but it doesn't pause Jul 06 05:44:01 lets say you had 15 or so Objects; each needs to run 2 independent repeating tasks. Would you (1) use one ScheduledExecutorService and pass it to each object (2) let each object create its own SES (3) use Observable.interval() for each task Jul 06 05:44:20 these are in the order of seconds, so its not JobScheduler / AlarmManager territory Jul 06 05:46:27 hi Jul 06 05:53:05 How can I prevent getActivity from my fragment to return null? This only happens sometimes after being idle for a while? Jul 06 05:53:30 I read a few stackoverflow posts, some say to keep the reference of the activitty by overriding onAttach, but others say this is bad practice. Jul 06 05:53:33 Where is the root for a debug source set correctly placed? Attempting to implement cool trick here for overriding strings in debug builds: Jul 06 05:53:38 http://stackoverflow.com/questions/19830972/different-app-names-for-different-build-flavors Jul 06 05:54:06 barq: It shouldn't be null between onAttach and onDetach. Jul 06 05:54:15 I guess you're calling getActivity after onDetach. Jul 06 05:55:33 TacticalJoke: I call it from onActivityCreated Jul 06 06:01:08 Would you recommend doing if (isAdded()) before doing getActivity? Jul 06 06:01:38 barq: Yes, always Jul 06 06:02:05 I thought `getActivity()` wouldn't return null in onActivityCreated. Am I forgetting something? Jul 06 06:02:21 oh in onActivityCreate()... that I'm not sure Jul 06 06:02:30 Basically, I want to change the status of the NavigationBar, which is hosted in my Activity from the fragment. This is why I need getActivity. Jul 06 06:04:19 ((MyActivity) getActivity()).setButtonEnabled(true); Jul 06 06:04:37 barq: If it's part of the Activity, I'm not sure how sensible it is for a Fragment to be changing it. Jul 06 06:04:48 I would definitely consider firing an event and letting the Activity do it itself. Jul 06 06:05:00 In any case, are you sure that `getActivity()` is returning null in onActivityCreated? Jul 06 06:06:06 Usually it is not, just after letting the device idle for a long time in this Activity/fragment Jul 06 06:12:23 Looking at the code (FragmentManager.java), I can't see how `getActivity()` could return null in onActivityCreated. Jul 06 06:13:39 hi, i am trying to put the button at the bottom center of a relative layout. I set true to button's align parent bottom, and center horizontal, but it's always at the top right corner of the screen. but if I add relativelayout.addrule(align_parentbottom,1) then it shifts to the left center of the screen. Jul 06 06:14:24 hi, i am trying to put the button at the bottom center of a relative layout. I set true to button's align parent bottom, and center horizontal, but it's always at the top right corner of the screen. but if I add relativelayout.addrule(align_parentbottom,1) then it shifts to the left center of the screen. Jul 06 06:14:45 argyris: Might have to post the code. Jul 06 06:19:45 http://pastebin.com/T8bzydMT Jul 06 06:20:15 http://pastebin.com/bR4bun0r Jul 06 06:27:15 TacticalJoke: I am using a handler that accesses the fragment via an interface. Maybe this is the problem. Jul 06 06:27:20 Try `params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);` and `params.addRule(RelativeLayout.CENTER_HORIZONTAL);`. (And remove that ALIGN_BOTTOM thing.) Jul 06 06:28:56 barq: Why are you doing that? Just wondering. Jul 06 06:30:27 TacticalJoke: it's the same. Jul 06 06:31:02 argyris: Wait, you're using MATCH_PARENT for width and height. Jul 06 06:31:10 You surely don't want that. Jul 06 06:31:43 TacticalJoke: I have a bunch of listeners in my activity. Every listener triggers a validation to check, whether all mandatory fields have been completed. In order for this validation to run only after the UI has been completely initialized I use a handler to delay everything by 500ms. Jul 06 06:33:02 Why 500ms? Can't you just do the check once you know the UI has been initialized? Jul 06 06:33:45 Also, using a delay may lead to race conditions. Jul 06 06:34:03 e.g. The UI might now be ready even after 500ms. Jul 06 06:34:47 TacticalJoke: The problem is that I can only check whether the UI is initialized and then start the validation. However, the listeners are executed once asynchronously, which leads to race conditions with the validation. Therefore I want to start the validation delayed to make sure the listeners have completed. Jul 06 06:34:53 argyris: On a side note, your XML file seems pointless here. If you're doing everything else in Java, do the button in Java. Jul 06 06:37:23 sorry, internet connection. Jul 06 06:37:30 was offline just now. Jul 06 06:37:40 argyris: You're using MATCH_PARENT for width and height. Jul 06 06:37:44 yes, Jul 06 06:38:37 barq: I wonder whether something is wrong with the design. What are these async things you're listening out for? Jul 06 06:40:36 argyris: Note that the layout params in your XML file are being completely ignored, because that button is being added to a different container. Jul 06 06:40:49 And the XML file is probably not worth even keeping. Jul 06 06:40:59 I thought I am adding the view. Jul 06 06:42:21 could it be the orientation? Jul 06 06:42:50 argyris: `new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);` Jul 06 06:42:52 Surely that is wrong. Jul 06 06:45:59 TacticalJoke, I switched it to RelativeLayout.LayoutParams.MATCH_PARENT. it went back to top left. Jul 06 06:46:15 top right. Jul 06 06:47:00 I guess you didn't remove the ALIGN_BOTTOM thing (and perhaps didn't make the other changes I mentioned). Jul 06 06:47:25 I did Jul 06 06:48:25 now with addrule(RelativeLayout.ALIGN_PARENT_BOTTOM) and addRule(RelativeLayout.CENTER_HORIZONTAL); Jul 06 06:48:38 Can you post the latest code? Jul 06 06:48:47 did you mention something else while I was offline? Jul 06 06:49:14 TacticalJoke: What do you mean by async things I am listening for? I listen for keyboard input/spinner/checkbox-selections. Each action triggers the validation. I use the handler to send messages and only handle them if more than 500ms have passed. This is to prevent the validation to run lots of times if someone is entering a text and the validation would be triggered with every character input. Jul 06 06:49:58 Hmm, wouldn't it be easier to do the validation when they click a button or something? Jul 06 06:50:33 TacticalJoke: It needs to be on input Jul 06 06:50:50 http://pastebin.com/4GUNMnf3 Jul 06 06:51:06 The best thing would be to somehow make sure the initialization has completed and then just run the validation on user input without any handler. Jul 06 06:51:09 argyris: You're still using MATCH_PARENT. Jul 06 06:51:12 Why would you use that? Jul 06 06:51:26 But I don't know how I can do this, since the listeners run once during init and also run async. Jul 06 06:51:48 I thought it was a view that was being inflated? Jul 06 06:52:08 You're adding the button and giving it MATCH_PARENT width and height. Jul 06 06:52:11 and from within that view we change the position of the imagebutton? Jul 06 06:52:38 so the view containing the image button has to be the same size as the layout that's holding that view? Jul 06 06:54:54 I switched it to WRAP_CONTENT and it moved to left center. Jul 06 06:55:06 Actually, I just realised that you're trying to add the RelativeLayout (not the Button). ;o Jul 06 06:55:24 argyris: I feel like you're creating the most painful code possible to do the simplest thing. Jul 06 06:55:31 yes, Jul 06 06:56:05 I guess it'd be fixed by simply removing those addRule calls. Jul 06 06:56:19 Or adding the button instead and using WRAP_CONTENT, Jul 06 06:56:30 Also, it would probably be best to get rid of the fragments completely in the long run and just move everything over to the activity. Jul 06 06:57:01 can some please help me to solve this error Unable to execute dex: method ID not in [0, 0xffff]: 65536. I am using eclipse and yesterday ported my project to gradle used this blog http://karanbalkar.com/2014/12/tutorial-95-resolving-the-dalvik-compiler-limitation-on-65k-methods/ and the official https://developer.android.com/tools/building/multidex.html#avoid but all in vain Jul 06 06:57:28 tiger98, enable multidex or proguard Jul 06 06:58:08 works fine, nothing in vain Jul 06 06:58:26 I tried adding the button, it crashed. Jul 06 06:58:39 ah Jul 06 06:58:42 ok Jul 06 06:58:46 i try another way Jul 06 06:59:34 Are there any problems using multidex like debugging? Jul 06 07:00:37 no Jul 06 07:09:00 pfn can you please tell me how to enable proguard I did what is given in this page http://developer.android.com/tools/help/proguard.html Jul 06 07:10:32 tiger98: eclipse or AS? Jul 06 07:10:41 eclipse Jul 06 07:10:59 in your project.properties point to your proguard configuration file Jul 06 07:11:17 ActivityA launches ActivityB, user now minimizes while on ActivityB. now from launcher user starts ActivityA. I need the instance which is minimized should open (ActivityB) if its in minimized state. else ActivityA should start. Jul 06 07:11:36 tiger98: proguard.config= Jul 06 07:12:23 tried singleTask and singleInstance both not working as I need Jul 06 07:12:40 t2mkn: sounds like you need a gate keeper Jul 06 07:12:59 activiyZ that will navigate to activityA or activityB Jul 06 07:13:20 tiger98: anything else? Jul 06 07:13:23 gate keeper ? u mean logically i should keep track of it ? Jul 06 07:13:45 you cannot avoid the launcher activity Jul 06 07:13:57 this means you need a gate keeper to navigate to wherever you need Jul 06 07:14:03 and store the state machine Jul 06 07:14:13 in sharedpreferences or anything similar Jul 06 07:14:18 Isn't the default behaviour for ActivityB to show? (I'm assuming that, by "minimizes", he means "presses Home".) Jul 06 07:14:19 g00s: HAI Jul 06 07:14:27 ooo ok Jul 06 07:14:32 TacticalJoke: depends on the device Jul 06 07:14:37 Hey guys I trying to send push notification using gcm, I followed this example https://developers.google.com/cloud-messaging/android/start but when my device is registering and I get this message GCM Registration Token: cMValHCCkq0:APA91bEn6OcG2-zMdgecB_GVgmDefRlngtOKGrTReHtNBH8BrNmbXhRa0OMfbaL3X6NiwJwc9bypHDVdaNeOXfZQonKB4K49xqzQRys0vFxkcA3VN57H6C Jul 06 07:14:37 vlKQTAiZx4M-YPAnuLox8z Jul 06 07:14:37 07 so I trying to send push notification using that token and my api key but I get {"multicast_id":9104533179274360437,"success":0,"failure":1,"canonical_ids":0,"results":[{"error":"MismatchSenderId"}]} I using this code http://stackoverflow.com/a/22169411/3546760 Jul 06 07:14:43 some devices will call the launcher activity Jul 06 07:14:53 from the applications drawer Jul 06 07:15:06 Almis90: try pasting this Jul 06 07:15:10 TacticalJoke: yes press home Jul 06 07:15:20 thepoosh: That's gotta be a bug, right? I've never seen that on any device. Jul 06 07:15:22 thepoosh post what exactly? Jul 06 07:15:31 paste* Jul 06 07:15:43 your previous 3 messages Jul 06 07:15:51 TacticalJoke: I think S3 devices behave like that Jul 06 07:16:01 if a recall correctly Jul 06 07:16:04 t2mkn: Which device do you have? Jul 06 07:16:18 thepoosh : I am trying what you said will let you ..... Jul 06 07:16:39 MotoG. YU, Xperia Jul 06 07:17:00 t2mkn: If I open an app, open a secondary activity, press Home, and come back to the app, the secondary activity always shows. Jul 06 07:17:04 No matter how I come back to the app. Jul 06 07:18:14 TacticalJoke: yes thats what I need. but its not happening. i am using singleTask. what happens is, the ActivityA always starts by closing ActivityB Jul 06 07:18:34 t2mkn: what are you running on? Jul 06 07:18:52 YU Jul 06 07:18:54 thepoosh same error Unable to execute dex: method ID not in [0, 0xffff]: 65536 Jul 06 07:19:10 t2mkn: Does it happen on the Sony? Jul 06 07:19:14 tiger98: damn! how big is your app? Jul 06 07:19:17 Cynogen issue may be. Jul 06 07:19:22 its happening on YU Jul 06 07:19:45 t2mkn: not a CM issue, I've seen it on touchwiz as well Jul 06 07:19:54 i think it's a 4.2.2 issue maybe Jul 06 07:19:57 or 4.3 Jul 06 07:20:27 its 5.0.2 Jul 06 07:20:40 t2mkn: That doesn't answer whether it's happening on the Sony. Jul 06 07:21:05 Ah, so you need certain api version for multidex to work properly? Jul 06 07:21:42 thepoosh : application not a big but the libraries external .jar files which i am using are big. I am using those .jar files to fetch data from .xlsx file Jul 06 07:21:43 TacticalJoke: hold on testing Jul 06 07:22:28 tiger98: you need to have multidex support or better proguard configurations Jul 06 07:23:47 tiger98: why do you need to parse an excel document? just curious. Jul 06 07:24:31 surf2bl : fetch data from .xlsx sheet Jul 06 07:24:57 TacticalJoke: yes its on Sony also Jul 06 07:24:58 ugh sometimes R buts out and wont fix after a rebuild Jul 06 07:25:07 surf2bl : i am using apache poi Jul 06 07:25:20 t2mkn: I wonder whether your code is doing it. Jul 06 07:25:23 I've never seen that before. Jul 06 07:26:48 Intent intent = new Intent(this, ActivityB.class); startActivity(intent); Jul 06 07:26:55 thats how its started Jul 06 07:27:00 no flags at all Jul 06 07:27:20 Anything weird going on in ActivityB.java? Jul 06 07:27:44 wtf R still isnt recognized after restart Jul 06 07:27:46 onPause -> finish(); // #yolo Jul 06 07:27:50 tiger98: well, I figured that part out :P Does it have to come from an excel sheet? Can you convert the data to JSON or do you not have control over the excel document? Mr Data Converter is pretty handy. http://shancarter.github.io/mr-data-converter/ Jul 06 07:29:48 TacticalJoke, I fixed it after treating "Right' as "Top" and "Width" as "Vertical Height". Strange how it's that way. Thanks. Jul 06 07:29:49 I don't have control over excel sheet it will be given by the user Jul 06 07:30:28 argyris: You might as well delete that XML file. Jul 06 07:30:37 argyris: It's unnecessary complexity. Jul 06 07:30:38 yes, deleted it already. Jul 06 07:30:53 TacticalJoke: nothing in onPause or Destroy Jul 06 07:31:40 argyris: ah, okay. kinda sucks since all those java libraries are pretty big. Maybe you should load it as a secondary dex. Jul 06 07:32:09 surf2b1, which one? Jul 06 07:32:23 i dont think we are on the same page. :D Jul 06 07:32:47 which library are you using to parse the xlsx? Jul 06 07:33:18 what xlsx. Not me. Jul 06 07:33:41 oh... wrong guy. my bad. haha Jul 06 07:34:04 also a strange thing notised. sometimes its getting removed from History also ! not always ! Jul 06 07:34:40 sorry, I will just ask shamelessly, how about to change the weight of the imageButton? I dont see it in LayoutParams / in the imagebutton members. Jul 06 07:34:46 Is there some weird stuff in AndroidManifest.xml? Jul 06 07:34:56 I'm too falling-asleep to define "weird stuff" right now. Jul 06 07:35:12 screenorigentation landscape. Jul 06 07:35:29 surf2b1 i am using apache poi Jul 06 07:35:44 argyris: Weight? Jul 06 07:36:10 yes, to change the width and height of the imagebutton. Jul 06 07:36:55 percentage preferably, saw some stackoverflow posts from 2012 and 2011. But it doesn't show up in AS Jul 06 07:37:07 tiger98: So, one option would be to use DexClassLoader and have apache poi already built in your assets folder. You would need to use reflection. I guess that's the old method for dealing with apps over 65k methods. Try out multidex like someone suggested before. https://developer.android.com/tools/building/multidex.html Jul 06 07:38:00 that seems unnecessarily complicated for just pulling out data from xlsx. after all, it's just a zip file with an xml inside... Jul 06 07:38:18 it all depends on what exactly you need, but there might be lighter (not necessarily easier) ways to do it Jul 06 07:38:41 anyone ever had a java.lang.IllegalArgumentException: bitmap size exceeds 32 bits ? it seems like a weird error? Jul 06 07:39:22 it seems like there is something wrong with your bitmap and/or code Jul 06 07:40:03 its a 180x180 png (24-bit color) 67.64k Jul 06 07:42:31 and i use int R.drawable.chopin and image.setImageResource to set it Jul 06 07:42:51 Chopin? Jul 06 07:43:23 year its chopin.png Jul 06 07:43:28 yeah* Jul 06 07:43:40 My app is published as alpha but play services are required to be published first, is it okay to do so? Will my app still remain private to my assigned testers only? Jul 06 07:44:28 NateRiver: What kinda app is it? Jul 06 07:44:43 it plays chopin music Jul 06 07:44:56 kdarknight: What do you mean by play services are required to be published first? Jul 06 07:45:05 Does it have the complete collection? Jul 06 07:45:08 Are there new guidelines for widgets? Jul 06 07:45:15 I am using leaderboards along with it Jul 06 07:45:20 obviously you can't compress all the greatness of Chopin into just 32 bits :p Jul 06 07:45:25 so if your chopin wood in the backyard you have some good music to chop to. chopin music Jul 06 07:45:44 Or if you're out Chopin at the store. Jul 06 07:46:32 Ballade No. 2 fo lyfe! Jul 06 07:47:15 what does this mean though. im setting the wrong file type or something to the wrong setter? Jul 06 07:49:12 barq: Should i publish game service? Jul 06 07:49:52 I don't know. I thought you were referring to something else. Jul 06 07:51:28 NateRiver, seems legit, so long as that's really a PNG Jul 06 07:51:37 hey thepoosh Jul 06 07:51:45 hi Jul 06 07:51:57 are you all hung over after July 4th ? Jul 06 07:52:50 thepoosh: no Jul 06 07:53:03 thepoosh lol no - i found your SO post on ScheduledExecutorService :D Jul 06 07:53:14 oh that Jul 06 07:53:22 one of my better rated questions Jul 06 07:53:25 thepoosh has it worked as expected for you? Jul 06 07:53:29 yeah Jul 06 07:53:49 not for that specific feature that has been deprecated Jul 06 07:53:53 due to server issues Jul 06 07:54:01 but for other ones like presence Jul 06 07:54:24 it was either that, or Handler postDelayed with recursive rescheduling Jul 06 07:54:38 mornin co-sufferers Jul 06 07:55:19 g00s: using a ScheduledPoolExecutor with 1 thread running periodically Jul 06 07:55:28 Mavrik: mownin' Jul 06 07:55:28 yeah Jul 06 07:55:35 moanin* Jul 06 07:55:42 sufferin' Jul 06 07:56:48 g00s: https://gist.github.com/yishai-glide/a7e2f3d6910892d49f7c Jul 06 07:57:23 wakelock its only a 68kb image... isnt that tiny? Jul 06 07:57:50 thepoosh ok thanks Jul 06 07:57:54 np Jul 06 07:58:06 NateRiver, I never said anything about size Jul 06 07:58:42 g00s: forgot this: mScheduleFuture = mScheduler.scheduleAtFixedRate(mPresenceTask, TIME_OF_SLEEP_CYCLE, TIME_OF_SLEEP_CYCLE, TimeUnit.SECONDS); Jul 06 07:59:08 thepoosh so you used an initial delay, ok Jul 06 07:59:25 I only start once the user has logged in Jul 06 07:59:30 that is why I didn't find it Jul 06 08:00:06 i have a *bunch* of timers polling something, like 14 - trying to decide the best strategy, ScheduledExecutorService, netty HashedTimingWheel, or something Jul 06 08:00:41 each of 7 bluetooth devices has 2 repeating tasks Jul 06 08:01:00 i guess one SES instance should suffice for all of them Jul 06 08:01:34 g00s: that shouldn't be an issue Jul 06 08:01:43 do you require a thread per device? Jul 06 08:03:21 the task is non blocking so i guess i can just have SES with pool of 1 thread Jul 06 08:03:40 i hope :| Jul 06 08:03:53 you can always do what the AsyncTask does Jul 06 08:04:01 each client has a receive / transmit thread already, don't want to make any more Jul 06 08:04:02 and calculate the amount you are allowed to have Jul 06 08:04:07 nah just add more threads :p Jul 06 08:04:27 let the wakelock tell you about preserving resources... Jul 06 08:04:29 asshole! Jul 06 08:04:32 :D Jul 06 08:04:43 * wakelock hogs thepoosh's cpu for no good reason Jul 06 08:05:00 thepoosh can i have SES of thread=1 handling arbitrary # of repeating tasks ? Jul 06 08:05:03 and then my users blame me for killing their devices Jul 06 08:05:05 you are managing 7 bluetooth devices at once though? Jul 06 08:05:09 wakelock then why wouldnt it work? if its a small size shouldnt it be well under 32 bits? Jul 06 08:05:12 wakelock yeah Jul 06 08:05:23 NateRiver, you are missing the point entirely Jul 06 08:05:32 g00s: yes, but some might be waiting on a queueu Jul 06 08:05:34 queue Jul 06 08:05:42 since there is only one thread executing Jul 06 08:05:43 ueueueue Jul 06 08:05:43 sure thats ok, since they are nonblocking Jul 06 08:05:54 so one shoule be enough Jul 06 08:05:59 ok thx Jul 06 08:05:59 whats the point then, you never said the point Jul 06 08:06:15 NateRiver, yes I did, read again Jul 06 08:06:22 g00s, that seems... very (unnecessarily) complex (to handle 7 devices at once) Jul 06 08:06:55 * wakelock has trouble imagining the situation where I'd have 7 devices connected at once Jul 06 08:07:07 that theres something wrong with my bitmap or code? Jul 06 08:07:18 well hopefully it would be 3-4 but android's limit is 7 for api 19 i think Jul 06 08:07:32 gotta check those undocumented limits again Jul 06 08:07:39 NateRiver, nope Jul 06 08:08:26 g00s, so you're pre-allocating/assuming fixed amount of resources based on arbitrary undocumented limits? lol :p Jul 06 08:08:38 can't you allocate as needed? Jul 06 08:08:41 wakelock no of course not Jul 06 08:09:19 each client works independently. if only 1 device, only one client Jul 06 08:09:28 NateRiver, NateRiver, seems legit, so long as that's really a PNG Jul 06 08:09:40 it is a png Jul 06 08:09:47 but i didn't really want to create 7 SESs though. so as long as i can share that once across all the clients its good Jul 06 08:10:05 android is big-endian? Jul 06 08:10:30 android is endian-agnostic Jul 06 08:10:45 (you're not supposed to have to deal with endianness) Jul 06 08:11:09 (endianness probably depends on the actual hardware - there's both ARM and intel) Jul 06 08:11:19 monkeyisl don't assume any endian-ness. arm and x86 vs mips could be different Jul 06 08:11:54 dude I just said that :p Jul 06 08:12:01 you forgot mips :) Jul 06 08:12:05 :p Jul 06 08:12:06 DONT FORGET MIPS Jul 06 08:12:21 my bad my bad Jul 06 08:12:28 should probably include SPARC too :p Jul 06 08:12:51 wakelock : i receve packet from some node.js server and it's xor encrypte byte basis. Jul 06 08:13:21 wakelock : so probably 0xAABB is swaped or whatever.. Jul 06 08:13:54 monkeyisl, network communication is big endian, always Jul 06 08:14:01 unless you fucked up your protocol Jul 06 08:14:27 Java is also always big endian, no matter the underlying arch Jul 06 08:14:29 Mavrik : it wasn't standard in windows and unix. Jul 06 08:14:48 NIO has endianness flags Jul 06 08:14:53 in C you have to use htons or what are those silly flags Jul 06 08:20:04 is 768 x 1280 a tablet or a phone? Jul 06 08:21:16 could be either Jul 06 08:21:19 yep Jul 06 08:21:25 genymotion has no real phones... like i want a phone emulator not a tablet emulator Jul 06 08:21:30 You're asking the wrong question :) Jul 06 08:21:41 Genymotion of course has phone emulators. Jul 06 08:21:52 They're pretty much all phones with some exceptions. Jul 06 08:22:24 Custo Phone 5.1.0 API 22 - 768 x1280 is smallest they have for api 22 Jul 06 08:23:18 And that's a phone. Jul 06 08:23:35 and i cant run it on my phone because after a runtime error logcat keeps spewing out crap so i cant scroll back and see what it was Jul 06 08:23:42 Why are you still asking the wrong question? Jul 06 08:23:57 Display resolution has nothing to do with what the device actually is Jul 06 08:24:10 I really hope you're not using that internally anywhere Jul 06 08:24:22 there are 1920x1080 phones and 800x480 tablets Jul 06 08:24:54 im using dp shouldnt it scale? it just feels really small on geny compared to designer Jul 06 08:25:06 thepoosh androidweekly was boring again :( seems like momentum slowed down already after i/o. only so much you can blog about snackbar in the design support lib Jul 06 08:25:15 *sigh* Jul 06 08:25:29 g00s, eh, noone does hard stuff :) Jul 06 08:25:38 NateRiver have you read the d.android.com docs ? Jul 06 08:25:38 g00s: yes, but I still enjoy reading about the design lib Jul 06 08:25:59 they are very good Jul 06 08:26:02 yeah but i cant remember all the details about everything Jul 06 08:26:03 mostly Jul 06 08:26:32 http://developer.android.com/training/displaying-bitmaps/load-bitmap.html Jul 06 08:26:35 NateRiver: ^ Jul 06 08:27:11 Mavrik do you have a blog? Jul 06 08:27:20 yeah, but I rarely write Jul 06 08:27:27 and mostly not about Android :P Jul 06 08:28:09 at least you're not pfn who wrote a post 2 years ago about how AsyncTask suks Jul 06 08:28:09 intentionally? :p Jul 06 08:28:21 Where is the root for a debug source set correctly placed? Attempting to implement cool trick here for overriding strings in debug builds: Jul 06 08:28:22 i think i found out what was happening with the png.. i put it in its own layout before adding it to gridview and that fixed it. It was trying to expand the 60 kb image to fit the entire screen which increased its bits passt 32 Jul 06 08:28:23 http://stackoverflow.com/questions/19830972/different-app-names-for-different-build-flavors Jul 06 08:28:48 I think my last Android post was about how to get Gradle to publish artifacts to bintray Jul 06 08:28:53 knapper_tech: is that a question? Jul 06 08:28:55 Checked gradle docs. Another dev attempted to implement and got hung up. Built, but didn't work Jul 06 08:29:01 thepoosh, yes Jul 06 08:29:07 oh, ok Jul 06 08:29:26 so you need to have buildTypes and have a String resource for the app name Jul 06 08:29:33 that will change according to build type Jul 06 08:29:45 just did that Jul 06 08:30:04 thepoosh, we did the strings part. putting the /variants folder inside /src didn't seem to map correctly Jul 06 08:30:34 knapper_tech: do you have a build-types folder? Jul 06 08:31:00 NateRiver, it's not really about "remembering all the details" (no sane person would ever remember everything there is about tech docs), it's about knowing where to look and how Jul 06 08:31:04 thepoosh, we added a folder called src/variants/debug/res/strings.xml. Jul 06 08:31:07 file* Jul 06 08:31:20 but seriously can someone explain why the stuff in designer isnt scaling with emulator in geny? Jul 06 08:31:27 there are flavors such as src/full/res and src/sandbox/res' Jul 06 08:31:42 the vuze client for windows is****** horrible Jul 06 08:31:51 its all super tiny compared to designer Jul 06 08:31:52 we tried to follow the SO post verbatim Jul 06 08:31:59 because you're using dp Jul 06 08:32:12 the docs clearly state all the available units Jul 06 08:32:40 isnt dp the one that scales? Jul 06 08:33:07 also, if you want full visual scalability, use percentages and/or use appropriate resource buckets Jul 06 08:33:37 thepoosh, is there a naming convention for buildtype source sets? not flavors, just build type Jul 06 08:34:07 dp is the default Jul 06 08:34:27 and i never had this problem with AVD just all the weird geny stuff Jul 06 08:36:40 geny is unofficial and therefore basically unsupported Jul 06 08:37:41 then i run it in my phone and it scales like the designer, it must just be like half a tablet that i was using, idk dp should scale Jul 06 08:38:44 the terms "tablet" and "phone" are so moot nowadays, especially when it comes to physical screen resolutions Jul 06 08:39:36 my wife's old phone has a higher physical resolution than her tablet Jul 06 08:40:45 is there anyway to freely place things in a layout? i was gonna do some artsy gridView where i fit all the rectangles together in a jagged puzzle like way(like paintings covering the wall in hogwarts, no padding or margins) Jul 06 08:42:01 wouldnt that be really cool? Jul 06 08:42:07 That's usually done by implementing a custom viewgroup Jul 06 08:42:14 where you get exact control of where imageviews go Jul 06 08:42:46 yeah itd be tough, id probably have to specify the exact x and y? Jul 06 08:43:22 seems dumb there isnt a layout like that, relative layout is a pain - things snapping all weird Jul 06 08:43:52 It's dumb because Google didn't predict an obscure use case for you and write it for you? Jul 06 08:44:01 What else is dumb? That your app isn't completely packaged in samples? Jul 06 08:44:18 NateRiver: What problem are you actually facing? Jul 06 08:45:02 Like RelativeView is always a struggle to get things to go where you want... why not just use x and y values to move things around Jul 06 08:45:22 hmm, noone made a gradle-adb-plugin yet Jul 06 08:45:39 then you could have complete control, its not obscure at all... relativeLayout is obscure Jul 06 08:46:00 NateRiver: What problem do you actually have using the api that is available? Jul 06 08:47:06 NateRiver, that's too trivial and too inflexible to include as a standard viewgroup. that's why you make your own custom viewgroup. Jul 06 08:47:07 barq i was saying it would be cool to position views around the layout wherever I like, to make an artsy arrangement, based on x&y not snaps Jul 06 08:47:41 NateRiver: How is that supposed to work with different screen sizes? Jul 06 08:48:03 absolute positioning is: a) a Bad Idea, b) not very useful in most cases, c) not very needed in real life. Jul 06 08:48:14 have it scale as screen size increases Jul 06 08:48:53 NateRiver: Whta if you have different aspect ratios? Jul 06 08:49:24 don't even need different ratios, just rotate the screen Jul 06 08:49:41 er, actually that is in fact a different ratio, lol Jul 06 08:49:44 scale to that shit too, lock the landscape to portrait Jul 06 08:50:05 NateRiver, do you even realize you're constantly trying to generalize your very specific use case? Jul 06 08:50:23 NateRiver: How do you scale different aspect ratios without distorting the images?!?!? Jul 06 08:51:51 barq you mean like a tablet? Jul 06 08:52:03 ? Jul 06 08:52:14 apparently the definition of "aspect ratio" is also a struggle Jul 06 08:52:29 NateRiver, if you really feel this is so generally useful it should be in the core framework, I suggest you implement the viewgroup and package it as a library, and see how that fares Jul 06 08:52:34 that's what square does after all Jul 06 08:53:56 Morning Jul 06 08:54:14 Memery: morning Jul 06 08:55:05 Is there a way to trigger an onItemSelectedListener programatically? Jul 06 08:57:17 tried .setSelection()? Jul 06 08:59:56 barq: ListView. getOnItemSelectedListener(). Jul 06 09:00:44 wakelock: setSelection doesn't fire, though, if the selection does not change. I want it to fire in that case as well when I do setSelection and nothing changes. Jul 06 09:01:14 i want the image views to look like this wall http://www.housecleaninglondon.co.uk/blog/wp-content/uploads/2014/09/Organise-a-gallery-wall-in-your-sweet-home-300x297.jpg Jul 06 09:01:32 http://nbviewer.ipython.org/url/norvig.com/ipython/Gesture%20Typing.ipynb Jul 06 09:02:16 barq: What are you doing in the onItemSelectedListener? Jul 06 09:02:24 Can't you just do whatever that is without going through the listener? Jul 06 09:03:42 I could to something like this http://stackoverflow.com/questions/16012470/how-can-i-invoke-an-action-on-the-same-selection-of-spinner-value Jul 06 09:07:43 In RemoteViews (widget), can I set tag (2 tags actually) to a view? Jul 06 09:10:25 Can I create a method which returns an ArrayList ? Jul 06 09:10:40 Yep Jul 06 09:10:57 how? Jul 06 09:11:07 Memery: I am setting the adapter for another Spinner and optionally setting a selection. Jul 06 09:11:13 For example: Jul 06 09:11:15 public Type[] toArray(Type... elements) { return elements; } Jul 06 09:11:44 hi Jul 06 09:12:32 Is is true that application library projects don't create the R class ? Jul 06 09:12:36 which package is Type? Jul 06 09:12:41 thank u very much btw Jul 06 09:12:48 I was using T instead of Type Jul 06 09:12:49 Gandalf84: Type is generic name, it can be T Jul 06 09:13:27 markpollard, they do Jul 06 09:13:41 They create R class? Jul 06 09:13:53 yes. Jul 06 09:14:09 private static ArrayList getArrayFromParcelable(ArrayListparcelableList) Jul 06 09:14:14 it gave me an error Jul 06 09:14:25 cannot resolve symbol T Jul 06 09:14:37 yoavst: as I understand it here are 'changing' actions available on a remote view. http://developer.android.com/reference/android/widget/RemoteViews.html so maybe not Jul 06 09:14:38 private static ArrayList getArrayFromParcelable(ArrayListparcelableList) Jul 06 09:15:33 icedp: what abouts - views.setInt(R.id.layout, "setTag", 4) Jul 06 09:16:04 Actually it is better to use String there, I don't know if auto-boxing will work with reflection Jul 06 09:16:14 thank u very much Jul 06 09:17:24 Oh, but there is not get :/ Jul 06 09:17:27 Code: http://pastebin.com/GzSzG5JB Jul 06 09:17:34 Error: http://pastebin.com/kLk2erGV Jul 06 09:17:51 yoavst, can you also share the code how to invoke it? Jul 06 09:18:17 i am trying to play a simple mp3 file in a android library project which i am getting the error 07-06 10:16:44.325: I/Unity(22178): AndroidJavaException: android.content.res.Resources$NotFoundException: Resource ID #0x7f050000 Jul 06 09:18:34 I'm making an applicaton which uses the PostgreSQL JDBC driver to connect to a database, and all was well. Now suddenly I'm getting this weird seemingly unrelated error. Jul 06 09:18:42 Let's say we have list of Parcelable called "list" Jul 06 09:18:49 so getArrayFromParcelable(list) Jul 06 09:20:09 the error steam to be coming from this line mPlayer = MediaPlayer.create(this, R.raw.sound); Jul 06 09:20:23 yoavst…now i see….the input parameter must be of type ArrayList…the return must be generic Jul 06 09:21:06 The connection to the database wasn't even successful so I don't understand why I'm getting this error Jul 06 09:22:22 And most importantly I'm getting this error after performing a long click Jul 06 09:22:26 yoavst, I’ve changed like that Jul 06 09:22:26 private static ArrayList getArrayFromParcelable(ArrayList parcelableList, Class type) Jul 06 09:22:51 Do you need the class object? Jul 06 09:23:00 My long click is defined to show a dialog asking the user whether they want to delete it or not. Jul 06 09:23:12 Normal click opens the connection Jul 06 09:23:20 because I think you may be able to use (at least in kotlin it works): private static ArrayList getArrayFromParcelable(ArrayList parcelableList) Jul 06 09:23:58 anybody ? Jul 06 09:24:30 So the long click should not be triggering the short click Jul 06 09:24:57 markpollard, the exception states that the resource isn't found... do you have a resource R.raw.sound? Jul 06 09:25:54 Memery: yes i have sound.mp3 in the folder res/raw/ Jul 06 09:26:27 F. Adjust_pan is not panning far enough Jul 06 09:26:31 is there a way to add it to the library project ? Jul 06 09:26:48 I am creating a unity3d plugin Jul 06 09:26:50 Has anyone gotten it to pan the same height as the keyboard before? Jul 06 09:26:51 I've also returned true in onItemLongClick Jul 06 09:27:49 It was working before I changed the intent to point to GraphicalQuery Jul 06 09:28:01 Earlier it was pointing to TextQuery Jul 06 09:28:16 markpollard: Is it showing in the Android Studio folder? Jul 06 09:28:45 Memery: i am using the eclipse Jul 06 09:28:53 i can see it in the folder Jul 06 09:29:56 And when i goto export it to a jar file its ticked Jul 06 09:36:09 Memery: any clue? Jul 06 09:36:51 Not really, maybe try a different file? Jul 06 09:37:27 to put the sound file into that folder i just drag and drop it in right ? Jul 06 09:38:16 Not sure about eclipse but I would guess so, I don't think Android Studio likes drag + drop though so you usually have to copy + paste or import it Jul 06 09:38:23 Try a different method. Jul 06 09:41:27 Is it still possible to get SDK updates with ADT in the future? Jul 06 09:42:22 I think they're not supporting eclipse anymore Jul 06 09:42:48 http://android-developers.blogspot.co.uk/2015/06/an-update-on-eclipse-android-developer.html Jul 06 09:42:52 Why does ADJUST_PAN suck so badly? Jul 06 09:44:24 It's panning...about 10% of the keyboard height Jul 06 09:44:55 Does it really suck this bad or has anyone gotten it to work like a reasonable developer would expect? Jul 06 09:45:00 Usually customViews are what take an app from that "looks like they built it in some app building software and have no idea how to code" look to the proffesional level? Jul 06 09:45:15 Can't you use adjust resize instead? Jul 06 09:45:42 Memery, I need pan because I have a text input that's obscured by keyboard Jul 06 09:46:24 knapper_tech, aparently adjustPan is retarded and people work that around with adjustResize + ScrollView :/ Jul 06 09:46:40 ^ I do this, although I agree I don't like it Jul 06 09:46:43 I see that part. The scrollview doesn't ever quite scroll as much as I need either Jul 06 09:47:04 It should scroll as much as you need if you're using resize Jul 06 09:47:06 Everything would be perfect if I got the keyboard height scrolled 1:1 Jul 06 09:47:06 last time I did that was to just adjust views manually :/ Jul 06 09:47:19 but of course getting keyboard size is its own fun Jul 06 09:47:42 Lol Jul 06 09:48:01 Code: http://pastebin.com/GzSzG5JB Error: http://pastebin.com/kLk2erGV I'm making an applicaton which uses the PostgreSQL JDBC driver to connect to a database, and all was well. Now suddenly I'm getting this weird seemingly unrelated error. The connection to the database wasn't even successful so I don't understand why I'm getting this error And most importantly I'm getting this error after performing a long click My long Jul 06 09:48:02 Keyboard size can change depending on the input also Jul 06 09:48:36 the user whether they want to delete it or not. Normal click opens the connection So the long click should not be triggering the short click I've also returned true in onItemLongClick It was working before I changed the intent to point to GraphicalQuery Earlier it was pointing to TextQuery Jul 06 09:48:37 So...fun Jul 06 09:49:02 I think I'll got the manual route and use translation =D Jul 06 09:49:13 Mavrik, keyboard size quick & dirty? Jul 06 09:49:26 Using the framework has been plainly awful in this case Jul 06 09:52:32 So I have an activity who's parent activity can be one of two activities... Any idea on how I can get the back button to return to the correct parent? Jul 06 09:52:40 back button on the toolbar** Jul 06 09:58:52 hmm, Rx people Jul 06 09:59:05 any good idiom to express "single or nothing" idiom? Jul 06 09:59:18 not really happy about returning null in an observable Jul 06 09:59:39 Memery, that should "just work"? Jul 06 09:59:54 you always go back one step up the back stack Jul 06 10:01:01 It doesn't Jul 06 10:01:21 It works using the physical back button, but not the back button on the toolbar Jul 06 10:01:39 That back button points to the parent activity which is declared in the manifest Jul 06 10:03:25 Mavrik: complete but not emit? Jul 06 10:04:02 hmm, I want to be able to check on the consumer side if there was no hit Jul 06 10:04:10 (e.g. it's a get_object_by_id type call) Jul 06 10:04:31 if onCompleted is called and onNext wasn't - there was not Jul 06 10:05:25 To permenantly change the color of a clicked item in grid view ive realised you can do android:listSelector="#ffffff" but what if i only want to change for a second? or for as long as a finger is on it? whats setting for that? Jul 06 10:06:48 NateRiver, you need to provide list selector with proper states Jul 06 10:07:11 http://stackoverflow.com/questions/2562051/listview-item-background-via-custom-selector Jul 06 10:08:24 so that means, while true do drawable? Jul 06 10:13:03 and stat_focused means while your finger is held on it? or is that state_pressed? Jul 06 10:14:29 what is a seekbar with 2 points called? Jul 06 10:14:49 like I could select the start AND end from a range Jul 06 10:14:54 not just a value Jul 06 10:16:28 range seek bar? Jul 06 10:18:25 question Jul 06 10:22:14 Yes, GitGud? Jul 06 10:22:29 answer Jul 06 10:22:34 hold on Jul 06 10:22:46 lol Jul 06 10:22:56 ok so we know that android apps are a java program that runs on an ARM chip Jul 06 10:23:01 so basically its a linux machine Jul 06 10:23:09 I hate having to support older android versions :( Jul 06 10:23:21 so when java updates, how does it update on the phone? Jul 06 10:23:27 Why can't we all just be on Lollipop already Jul 06 10:23:30 does it even update automaticall on the phone? Jul 06 10:23:41 automatically* Jul 06 10:26:54 No idea Jul 06 10:27:28 GitGud, document yourself, it's not a regular java vm at all Jul 06 10:28:13 GitGud, Android has it's own JVM baked into the OS itself Jul 06 10:28:36 which is different from desktop Java you use and is updated only when core OS is updated Jul 06 10:28:40 it's not a separate app Jul 06 10:28:45 oh ok Jul 06 10:29:02 so how do i know what version of java my particular android phone is running? Jul 06 10:29:20 read about "dalvik vm" (and bionic too) if you need a keyword to search for documenting yourself about Jul 06 10:29:28 GitGud, hmm, that's really not a useful question Jul 06 10:29:39 Your phone has either DalvikVM or ART Jul 06 10:30:02 which run their own version of Java bytecode (DEX format, which has to be translated from desktop) Jul 06 10:30:17 reason i ask Jul 06 10:30:19 is because Jul 06 10:30:21 as for language level, Android runs on Java 6 compatible since forever. Jul 06 10:30:29 ah ok Jul 06 10:30:46 well i'm developing apps. i dont want to dev some java 8 and then run into problems when i deploy Jul 06 10:30:55 with some features from Java 7 being available with newer tools Jul 06 10:30:57 if java 6 is what it supports. 6 is what i'll develop on desktop Jul 06 10:30:58 thank you Jul 06 10:31:08 yeah, it's Java 6 with some minor Java 7 additions Jul 06 10:31:13 ah i see Jul 06 10:31:19 maybe take a gamble with 7 then? Jul 06 10:32:16 yes Jul 06 10:32:28 http://stackoverflow.com/questions/20480090/does-android-support-jdk-6-or-7 Jul 06 10:32:38 first link when typing: android java 7 Jul 06 10:36:32 Wow I think I was thinking too much into this parent activity business... Jul 06 10:36:44 I should just be able to finish() the activity and it will show the previous one... right? Jul 06 10:37:02 yes Memery Jul 06 10:37:07 (in windows) is there a way to scan for hardware changes without having a plug and play run? Jul 06 10:37:18 ... Jul 06 10:37:19 my android device keeps installing the wrong adb interface Jul 06 10:37:22 I'm an idiot Jul 06 10:42:14 my hardware I has REV_???? in it? Jul 06 10:42:16 that seems wrong. Jul 06 10:42:19 wtf? Jul 06 10:45:56 Anybody in here savvy with animations? Jul 06 10:46:04 the Rx philosophy is not quite in my head i'm afraid. I have a Preference that I monitor in my fragment in onresume, if it has changed, i wish to do another network call with a modified parameter. Then I want to display this data on screen. How do i go about this? I think manually call onNext somewhere.. but where? Jul 06 10:47:35 I want to achieve this animation, where the splash screen background morphs into the Toolbar, any ideas? Jul 06 10:47:36 https://lh5.googleusercontent.com/-51sn1r_RnQk/VZBCtttn8EI/AAAAAAAADWU/A7yNr5hDmoQ/w800-h656-no/splash-concept.gif Jul 06 10:50:26 Memery: start the following image the same as the splash, and animate from there? Jul 06 10:53:35 I'm afraid I don't follow Jul 06 10:54:40 ? you want the splash to animate into a tool bar? Jul 06 10:54:46 Yes Jul 06 10:54:53 Like in the gif Jul 06 10:55:11 ok, so have the first image that's show after the splash, be exactly the same as the splash. Jul 06 10:55:13 then animate Jul 06 10:55:44 I see Jul 06 10:55:49 Ideally, there won't be any black screen flashing between the splash and the program, so you'll have a visually smooth transition Jul 06 10:55:57 detracting from the idea of the splash. Jul 06 10:56:11 Okay I'll try that Jul 06 11:13:27 hey guys, which would be the best method ( less battery usage ) to communicate between X ( mostly 4-6 ) smartphones? It should allows them to communicate on idle/display locked. Bluetooth, Nfc ? Jul 06 11:19:17 Hi! Jul 06 11:20:39 I'm trying to install Cucumber on android Studio, does anyone know how can I install those plugin, it seems jetbrains has it on https://plugins.jetbrains.com/plugin/7212?pr= Jul 06 11:21:05 but it does not found them from #AndroidStudio Jul 06 11:35:22 I've solved it guys, now adb detects my phone. I tried with Ubuntu, at first adb on Ubuntu did not detect my phone either, then I create adb_usb.ini (with vendor id inside it) in home/.android, finally adb detected my phone. On Windows I do have 'adb_usb.ini' in folder Users\user_name\.android, but seems adb does not use this folder. Unintentionall Jul 06 11:35:23 y, I found the same folder on android-sdk\.android, then I create adb_usb.ini (with vendor id inside it), eventually adb detects my phone on Windows. Jul 06 11:37:25 Thanks everyone for helping me. Im sorry for my slow response, I promise to make it faster. Jul 06 11:39:06 I'm having an aar library that has the support libraries too , is there anyway to not compile the support libraries from the aar file because now I'm getting an error when compiling because I've got the libraries 2 times? Jul 06 12:14:12 using rxjava, i'm trying to understand why my observable is getting completed. any ideas? https://gist.github.com/xorgate/31b176d15edfb6c94033 Jul 06 12:14:56 i want to be able to onNext a value, and receive an adapter as a result Jul 06 12:15:22 but after the first onNext, mAdapterObservable is already done Jul 06 12:41:06 Afternoon all Jul 06 12:46:04 Hi Jul 06 12:47:59 this device is making me a special type of angry... Jul 06 13:05:37 any RxJava heroes around? http://stackoverflow.com/questions/31246656/in-rxjava-how-to-retry-resume-on-error-instead-of-completing-the-observable Jul 06 13:06:12 How can you exclude double dependencies from a library you include via gradle? Jul 06 13:13:47 Hi, In my application I was not using action bar, Now I thinking about implementing it on my app. But when I change the Theme from Theme.AppCompat.Light.NoActionBar to Theme.AppCompat.Light I got errors and my app don't even open. I also tried to keep the theme as it is and just add a ToolBar inside a Activity that I'm working in, but I get error in set content layout. I'm using activities from AppCompatActivity Jul 06 13:31:49 wviana: OK. What is your question? Jul 06 13:32:05 Hi barq, :) Jul 06 13:32:38 barq: I did change the view in the layout to v7.ToolBar. Part of it is working Jul 06 13:33:15 yay Jul 06 13:33:28 barq: do you suggest some material to learn about action/tool bar ? I'm trying to make my app more in the pattern. Jul 06 13:33:50 wviana: have you read the docs? Jul 06 13:33:56 d.android.com/training Jul 06 13:34:14 I'm reading thepoosh Jul 06 13:34:23 I have one question Jul 06 13:35:44 after material introduced in api 22, I'm using AppCompatActivity, so should I use ToolBar instead ActionBar? does everything that use to apply to Actionbar now apply to toolbar ? Do I have to use a theme with noActionBar ? Jul 06 13:38:25 hi anyone knows how to make a notifications via webview? Jul 06 13:39:03 wviana: In 22 the theme is Material, not Holo Jul 06 13:39:33 barq: I'm using this: Theme.AppCompat.Light.NoActionBar Jul 06 13:39:45 wviana: https://developer.android.com/training/material/theme.html Jul 06 13:41:16 AndroidStudio used to ask whether to open a new project in the current window or a new window. I must have checked the option "don't ask again" Jul 06 13:41:23 I want it to ask again. What do I do? Jul 06 13:41:45 format hdd and try again Jul 06 13:42:11 * Buoy172 tells barq to fuck off Jul 06 13:45:14 thepoosh, what's your problem, and I've never written an android blog post Jul 06 13:45:28 pfn: woah Jul 06 13:45:38 no problem man Jul 06 13:45:40 chill Jul 06 13:49:21 Custom viewgroup, special "add" functions that change the view ID and influence the child ordering. Jul 06 13:49:41 I try to use Fragments with this, but it's not working quite the way I intended. Jul 06 13:50:50 I can call FragmentTransaction.add without container ID, and just add it myself using Fragment.getView, so that they are added appropriately. Jul 06 13:51:37 They are naturally not restored when I recover. However, the Fragments are still in the manager, and their views have not been instantiated. Jul 06 13:52:28 Or, rather, the fragments are rebuilt on an orientation change, but it looks like their views have not been restored. Jul 06 13:53:48 I then tried adding the views using the FragmentTransaction anyway, but this appears to negate the special viewgroup's ordering on restoration. Jul 06 13:55:03 Anyone got any thoughts? Jul 06 14:05:28 If there is something that I have about android-dev is that there is a support, compat for everything, than u read the tutorials, but what they teach in one tutorial does not work with some other new feature. Is so hard to follow a line that I know I'll be able to get everything working. so frustrating. Jul 06 14:13:30 for example, I have my theme set as Theme.AppCompat.Light. But I get error, if I search for it I find someone telling to use https://gist.github.com/wviana/74e61a52c62ad52cb857 , but WTF, I want to use the action bar, If i didn't want to I would use Theme.AppCompat.Light.NoActionBar instead. Jul 06 14:15:53 wviana, It's all changed again if you're using material design and toolbar instead of actionbar Jul 06 14:16:07 http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html Jul 06 14:18:09 Actually it's changed less than I thought Jul 06 14:28:26 EwoudCP: What is your question? Jul 06 14:44:32 Currently, I'm trying to get a handle on a Fragment's view after it has been restored by the FragmentManager. But getView() returns null. Jul 06 14:45:35 I'm using the support library, and I'm trying to retrieve the state at the end of the onCreate in the activity. Jul 06 14:46:04 How do I retrieve a Fragment's view after it has been restored with the FragmentManager? Jul 06 14:54:08 Oh, wait. Looks like the Fragment's views were not yet created when I try to access their views. Jul 06 14:57:59 can anyone tell me if there's any solutions to have a viewpager that works like on a grid instead of just LTR Jul 06 14:59:03 wait for OnCreateView to be called Jul 06 15:02:32 Yeah, I was looking into that just now. I moved the appropriate logic to onRestoreInstanceState and now it works. Jul 06 15:02:34 Thanks! Jul 06 15:47:00 is there any way i can export R.java? Jul 06 15:47:33 like so i can just include all the resources from one project to another, without copying all the xml files? Jul 06 15:47:54 that is a spectacularly bad idea Jul 06 15:48:13 why? Jul 06 15:48:32 i thought i could just copy R.java. but then i see it's just a dummy file or something for the IDE? Jul 06 15:48:52 firstly, because it's a generated file, so let it be generated Jul 06 15:49:07 secondly, because it contains references to resources, not the resources themselves Jul 06 15:52:04 Does anyone have strong opinions on RxJava? I'm seeing it pop up more and more - seems to be the new hotness at startups Jul 06 15:52:23 Seems to me I wouldn't want another thing to train a new dev on. I'd have to have a really good reason to use it Jul 06 15:52:30 saving a few loc is not enough Jul 06 15:53:14 Just... try it. Jul 06 15:53:33 "Saving a few loc" is understatement of a century :P Jul 06 15:53:43 well is there a at least a way to have resources with a different package than the default? Jul 06 15:54:10 bendavisnc, create a library project Jul 06 15:54:20 libraries (AAR) have their own code and resrouces Jul 06 15:54:24 *resources Jul 06 15:54:27 ok, thanks Jul 06 15:54:30 @Mavrik I've written a small POC using RxAndroid with retrofit. Not sold from that Jul 06 15:55:01 don't use it then :) Jul 06 15:55:18 Just looking to get opinions - wonder if anyone is using it in production Jul 06 15:56:16 Well, other than the learning curve, there really are no downsides right? It's not like you have to rewrite the whole project Jul 06 15:57:35 @liuwenhao well it's not clear to me yet how it affects debugging. I could see it leading to some really tricky bugs Jul 06 15:59:14 sort of like AndroidAnnotations. It's great boilerplate savings until you have to debug and you have a bunch of generated source to drudge through in the stacktrace Jul 06 16:01:13 True. I've only messed with it a little bit but not in anything serious. So I have no opinions about debugging it Jul 06 16:01:25 But it seems like it would be worth whatever hassle comes with it Jul 06 16:03:33 @liuwenhao along those lines, JakeWharton posteda cool writeup of Kotlin earlier this year: https://docs.google.com/document/d/1ReS3ep-hjxWA8kZi0YqDbEhCqTt29hG8P44aA9W0DM8/edit?hl=en&forcehl=1 Jul 06 16:03:54 makes me really reconsider the stack I use in new projects Jul 06 16:04:13 I have a multi-apk project that has one project that only contains resources that are shared by the apks. So right now all the apks include these resources. This makes the apks big and they don't need all of the resources during compile time. What would be my best bets for optimizing this? Building an apklib? Jul 06 16:05:38 use the resource shrinker Jul 06 16:05:44 apklib is irrelevant Jul 06 16:06:05 Or generate an aar? Jul 06 16:06:09 also irrelevant Jul 06 16:06:46 thanks Jul 06 16:07:17 This only works with gradle, though, right? Jul 06 16:07:48 no Jul 06 16:08:12 works with any relevant build system Jul 06 16:08:35 As part of proguard? Jul 06 16:10:41 Hmm, I wonder how to do this in ADT Jul 06 16:15:25 pfn: How would this work with maven/ADT though. I only find documentation on Android Studio. Jul 06 16:16:51 is it possible to use a SurfaceView within a DialogFragment? When I try I just see all the content behind the DialogFragment in a box where the SurfaceView is supposed to be. Jul 06 16:21:22 @moogoo you probably need to use a TextureView instead http://developer.android.com/reference/android/view/TextureView.html Jul 06 16:23:16 so it seems that whenever a new "window" context is created, like within a DialogFragment or PopupWindow, you cannot use a SurfaceView Jul 06 16:30:49 barq, by reading the maven plugin docs Jul 06 16:31:15 Will that work with shared resources as well? So it will remove more than manually doing it with lint/? Jul 06 16:31:28 Anyone having problems getting icepick as a dependency? I added the repo, compile, and provided line. Jul 06 16:32:24 Anyone use Osmidroid or MapBox sdk? Jul 06 16:33:57 pfn: So I can only use part of the shrinking available by using ProGuard? Not the android shrinking here: http://tools.android.com/tech-docs/new-build-system/resource-shrinking ? Jul 06 16:34:36 barq, you can use it in sbt, too Jul 06 16:34:40 dunno if maven has the feature Jul 06 16:34:51 and lint doesn't remove resources, just warns Jul 06 16:35:22 Yes, but say I have a shared library that I use in multiple apks, then if lint warns I cannot remove resources that are unused in 9/10 apps, because 1/10 will need it. Jul 06 16:35:33 I guess resource shrinker is a bit cleverer than that. Jul 06 16:40:48 I don't think you can do it for maven. But thanks for the pointer. Jul 06 16:42:23 is there a way to wait for a service to start before the next call? Jul 06 16:43:05 Yes. Jul 06 16:43:30 binding, right? Jul 06 16:43:51 What exactly are you trying to do? Jul 06 16:43:59 What's a great SQL library, preferably an ORM Jul 06 16:44:52 barq, I have a race condition. My library accepts sensor data input, there's a service that is started in the constructor that actually deals with that sensor data. In some cases, the sensor data starts coming in before the service starts Jul 06 16:45:01 explodes: sqlite? Jul 06 16:45:29 What do you want to do with your database explodes_? Jul 06 16:45:49 I could ignore all the data that comes in before the start of the service but there are other cases where that listener might be null Jul 06 16:46:02 and the app would need to know when that happens Jul 06 16:46:15 Afzal: Can you delay the processing of the sensor data or does it have to be done live? Jul 06 16:46:41 How do i set textcolor in toolbar ? Jul 06 16:46:48 barq I can ignore the processing of the data if needed Jul 06 16:47:19 Afzal: Check whether service is initialized, set a flag and skip if that flag is false Jul 06 16:48:02 barq hmm, and reset that flag in the service's onDestroy? That might work :) Jul 06 16:48:06 when using Rx, import RxJava or is RxAndroid up to it? Jul 06 16:48:20 explodes_: did you look at realm.io? Jul 06 16:48:21 Afzal: No, not in onDestroy Jul 06 16:48:41 barq I mean set it in onCreate and reset in onDestroy Jul 06 16:48:50 Afzal: don't start the input until the service is created? Jul 06 16:49:11 or just make the service a callback, and don't propogate unless the callback is not nul Jul 06 16:50:11 Hello Jul 06 16:50:23 is it possible to add a Context into an intent? Jul 06 16:50:50 Gandalf84: you shouldn't need to do that, why are you asking? Jul 06 16:51:17 lasserix that's what I do now (there's a listener that is set in onStartCommand), I'll see if that works still. I used to throw an exception if it was null because I remember that could happen in some edge cases without intending, and the developer needed to be informed Jul 06 16:51:18 thanks! Jul 06 16:51:24 I’m starting an intent in order to retrieve the notification token…from there I would like to send the token to my server….to do that the method requires the context Jul 06 16:51:47 Afzal: don't set it in onStartCommand Jul 06 16:51:50 Afzal: You shouldn't throw exceptions for regular procedures. Jul 06 16:51:56 this context is used to start the Login activity, in case the oauth2 access token is expired Jul 06 16:51:57 lasserix then? Jul 06 16:52:01 Afzal: you should bind, then you can do mService.setCallback Jul 06 16:52:06 barq it's a library, it needs to throw exceptions Jul 06 16:52:27 Gandalf84: wherever you are getting the intent from should also provide a context object Jul 06 16:52:31 Afzal: Don't throw exceptions for things like finding out if the service has started if you can deal with that by contract. Jul 06 16:52:39 is binding a service with application context even a good idea? lasserix Jul 06 16:52:46 lasserix, do u know how to retireve that? Jul 06 16:52:52 Services are singlenton's so sure Jul 06 16:53:03 but why are you using application context? Jul 06 16:53:18 lasserix because it's a library which is a singleton Jul 06 16:53:22 if you are manually starting the service, just manually kill it and make sure you unbind Jul 06 16:53:26 holding a reference to activity context would be bad Jul 06 16:53:33 not if you unbind in onstop Jul 06 16:53:36 I’m following the Google guide: https://developers.google.com/cloud-messaging/android/client Jul 06 16:53:50 how to obtain a registration token Jul 06 16:53:53 Gandalf84: you'd have to post some code i dont know off the top of my head Jul 06 16:54:17 lasserix it's supposed to run sensor dat analysis in the background, it can't be bound to the activity's lifecycle Jul 06 16:54:20 data* Jul 06 16:54:36 Gandalf84: are you using an intents ervice? Jul 06 16:54:57 Afzal: then send it via a handler Jul 06 16:55:04 *handler messenger Jul 06 16:55:11 lasserix, I’m not sure if I’m doing it correctly Jul 06 16:55:20 though are you starting the sensor with an activity context? Jul 06 16:55:24 lasserix, how do u request a token? Jul 06 16:55:44 if you sensor is started with context of activity, then the callback is to the service, you still have the same problem: the key is too properly unbind Jul 06 16:55:54 I’ve declared the InstanceIDListenerService, GcmListenerService in the manifest Jul 06 16:55:58 Gandalf84: i dont know post some code Jul 06 16:56:08 ok Jul 06 16:57:23 Gandalf84: http://rdcworld-android.blogspot.in/2013/11/android-push-notification-google-cloud.html Jul 06 16:57:33 Send what via handler? I'm not starting the sensor, I'm getting the sensor data. The library fetches objects from the server (on initialization) to compare the data against. The sensor data is sent through a listener to the library and then passed on to the service handler to analyze. That's the gist of it Jul 06 16:58:17 the analysis is done in the background and needs to persist when the activity is not active, so it holds a reference to the application context instead of the activity context, and uses a service Jul 06 17:00:54 lasserix ^^ Jul 06 17:01:31 Afzal: http://www.truiton.com/2015/01/android-bind-service-using-messenger/ Jul 06 17:01:37 you can make the handler your callback Jul 06 17:01:59 or you can push the callback through the messenger Jul 06 17:07:12 Does the type of the observer change if map is used to transform the obserable from T -> T1 (so that the observer is now type T1 now T) ? Jul 06 17:11:27 lasserix I would assume so, the observer acts on the type of the result of the map Jul 06 17:11:45 thanks for the link! I'll check if it's better to do it that way Jul 06 17:14:43 Afzal: its just another way to bind, since its all local to your app, you can pass everything through a message (handler) Jul 06 17:14:59 that way you can delay registering your callback Jul 06 17:20:32 lasserix, yeah. I have a service handler (http://hastebin.com/aleqahonow.java). I'll look into binding and see if that works better though. Jul 06 17:21:14 so I basically keep a reference to that listener in my Kiwi singleton. This is an iteration of an older design though, which is why this might not be a good way now. Jul 06 17:21:43 I could just hold the reference to the ServiceHandler in Kiwi instead Jul 06 17:34:18 What are you working on, #android-dev? Jul 06 17:34:27 world domination Jul 06 17:35:47 danijoo, great! how is it going? Jul 06 17:36:09 could be better ;) Jul 06 17:37:50 I have a list of cards, each card contains text but the layout for each is very different (although made up of same parts, title subtitle, details), since this is a listview for n = each card, what's the best way to implement? Jul 06 17:38:32 different viewtypes for different cards Jul 06 17:49:12 Does anyone know of android sdk (or maps) supports mbtiles ? Jul 06 17:49:14 Is there a way to have Android Studio also suggest completions for AppCompat features? Jul 06 17:49:41 Binero, code completion? Jul 06 17:50:11 danijoo: but each row is unique, ie no converted views. Is that stil better than a linear layout with all the views inside a scrollview? Jul 06 17:50:39 lasserix, in a scrollview ALL items will get initialized at once. this can result in huge memory usage Jul 06 17:50:39 danijoo CTRL+SPACE to complete Jul 06 17:51:05 lasserix, in a listview only visible items are instantiated and use memory Jul 06 17:51:14 hmm good point Jul 06 17:51:58 maybe just return the position as view type id. then you wont have recycling and can instantiate one view per role Jul 06 17:52:01 row Jul 06 17:55:18 If no one knows how, does anyone know where to find a list of all AppCompat themes? Jul 06 17:56:40 Binero, the source Jul 06 17:56:46 And where is that? Jul 06 17:57:13 the google Jul 06 17:57:54 sdk/extras/android/support/v7 has resources Jul 06 17:58:24 odd Jul 06 17:58:44 Android Studio doesn't have the support library in "External Libraries" Jul 06 17:59:36 Probably looking in the wrong place Jul 06 18:00:18 no Jul 06 18:00:28 needed to build first Jul 06 18:01:06 after build it autocompletes too Jul 06 18:02:50 Is there a type of Fragment whose lifetime extends an activity? Jul 06 18:03:06 no Jul 06 18:03:20 or. what do you mean with that? Jul 06 18:03:52 for a screen rotation they would get reinstantiated. Jul 06 18:05:09 hmm Jul 06 18:05:17 I'm puzzled on how to best implement a Navigation Drawer Jul 06 18:05:32 It doesn't help that the Android Studio default isn't valid code Jul 06 18:05:38 since lates IO there is a view for that in design library Jul 06 18:05:44 specified for showing navigation drawer Jul 06 18:05:52 NavigationView Jul 06 18:06:00 Right? Jul 06 18:06:19 i think so. didnt use it yet. i only read the docs Jul 06 18:06:35 Requires a LOT of boilerplate code Jul 06 18:07:19 less than before :p Jul 06 18:07:21 How to make Android Studio respect the API level? Jul 06 18:07:39 I have it set to API 7, but it still generates code for API 15 Jul 06 18:07:39 you'll get warnings if you do something thats against your api level Jul 06 18:07:42 Yeah Jul 06 18:07:50 api 7. oh my gosh Jul 06 18:07:53 But it doesn't help that the one writing that code is Android Studio itself Jul 06 18:07:59 Binero: Set your compileSdkVersion Jul 06 18:08:35 That's set to 22 Jul 06 18:08:39 Why would I set it lower? Jul 06 18:08:54 Maybe you have a device, which only targets a certain api version. Jul 06 18:09:02 Can't build for API 7, that's not in the SDK manager Jul 06 18:09:05 Or rather only works for one. Jul 06 18:09:35 What is your minSdkVersion and targetSdkVersion? Jul 06 18:10:19 minSdkVErsion is set to 7 Jul 06 18:10:29 targetSdkVersion is set to 22 Jul 06 18:10:45 How do you know it generates code to 15? Jul 06 18:11:01 Because it warns me that the code is only valid for API 15 Jul 06 18:11:08 like after it generated Jul 06 18:11:23 That's a warning, not compiled code. Jul 06 18:11:33 That means the code will only run on api 15 or higher Jul 06 18:12:07 why dont you just edit the code to be valid? Jul 06 18:12:52 Binero: What code shows this warning? Jul 06 18:12:54 you shouldnt target below 15 anymore btw. thats why AS generates that Jul 06 18:13:22 hi, I am using libgdx to make a game. Everything seems to be fine except when I pause and resume, it doesn't render anything. Jul 06 18:13:38 there is #libgdx argyris Jul 06 18:14:17 I tried, it seems they dont know as well. or no one online currently knows. Jul 06 18:14:18 danijoo: Really? I have min 10 and I don't think I get thtat. Jul 06 18:14:41 barq, not sure but i think so Jul 06 18:14:45 and min 10? really? Jul 06 18:14:49 Yes. Jul 06 18:14:53 Should really be 9 Jul 06 18:14:54 how many devices run 10? 0.01 % ? Jul 06 18:15:02 should really be 15 you mean :p Jul 06 18:15:04 15% of my app users. Jul 06 18:15:12 No should either be 9 or 15. Jul 06 18:15:44 Should be 16 Jul 06 18:16:26 Devices maybe 5%, but more important is the people who actually use my app. And there the number is frighteningly high. Jul 06 18:16:35 SimonVT: Why 16? Jul 06 18:17:13 argyris: also look https://github.com/libgdx/libgdx/wiki/Continuous-&-non-continuous-rendering Jul 06 18:18:08 should I expand AppCompatActity even if I am on API 15+? Jul 06 18:18:13 hopefully new dashboard stats will be out in the next day or so. curious how Lollipop is going Jul 06 18:18:23 Binero, yes Jul 06 18:18:27 Binero: Depends on what devices you want your app to run. Jul 06 18:19:31 barq API 15+ Jul 06 18:19:42 Ooh, the number of users for 2.3.3-2.3.7 dropped from 15 to 10% in the last few days. I wonder how that happened. Jul 06 18:19:49 People buying new phones over the holidays. Jul 06 18:19:58 same results. Jul 06 18:20:12 Oh, I looked at the average, not my app lol Jul 06 18:20:24 it doesn't render. but it senses inputs Jul 06 18:20:41 Binero: Then extend AppCompat Jul 06 18:20:44 barq: Because there's not a lot of ics devices Jul 06 18:21:08 For my app 6% Jul 06 18:23:11 but theres also not really a difference in 15 and 16 code wise\ Jul 06 18:23:46 how does anyone have 15% userbase on 2.3 anymore? Jul 06 18:23:50 overall 2.3 is well under 10% Jul 06 18:24:01 maybe some kind of legacy app Jul 06 18:24:19 bringing features to 2.x that noone needs on higher api levels Jul 06 18:26:08 I don't know. Overall 2.3 is less than 5%, not sure why my users are so deprecated. Jul 06 18:26:36 What do you mean by legacy app? Jul 06 18:29:04 barq, they're not, the dashboard % data is just useless Jul 06 18:29:10 because it has a too large dataset Jul 06 18:29:31 it's like determining your target audience in Texas from world-wide data Jul 06 18:29:53 Trust me, even though 70% of people on the world eat rice, that probably won't gonna work there ;) Jul 06 18:30:14 Dashboard says 5%, but my app says 15%. So for me the 15% are relevant. Jul 06 18:30:37 Indeed. Jul 06 18:31:18 any one know how i might go about imported a .aar file in intellij with an sbt android project? Jul 06 18:32:14 sbt? sounds like a job for pfn :p Jul 06 18:32:28 hi, in a project i need to disable (or force hide) home, return buttons(all 3 control buttons, i don't know the 3rd name) that user cannot access the OS. how can i done this? or in other words, i need to take control whole screen :) Jul 06 18:32:49 ehsanv, you cant Jul 06 18:32:54 same way as any other library Jul 06 18:33:12 danijoo: but i saw someone done it, Jul 06 18:33:29 ehsanv, ah well. theres kiosk mode Jul 06 18:33:53 but last time i looked into that it required root to have it being "real" kiosk mode Jul 06 18:33:54 ehsanv, http://developer.android.com/reference/android/app/Activity.html#startLockTask() Jul 06 18:33:58 Android 5+ Jul 06 18:34:21 ehsanv: The user can still send an intent to get to the home or the settings. Jul 06 18:34:54 that sounds like a bad thing to allow to happen Jul 06 18:35:10 pagefault, depends. Jul 06 18:35:56 we're designing a hardware, it should control by a tablet, so we want users to only have access to our program Jul 06 18:35:56 at that prompts the user to allow it Jul 06 18:36:05 pfn: it's a local .aar file, i guess i need to add it to my maven repository? Jul 06 18:36:06 :( im bored, give me something to code :P Jul 06 18:36:11 Does LockTask allow starting an activity in a different task? Jul 06 18:36:31 before i was just copying jars to my lib folder if they were local Jul 06 18:36:36 bendavisnc, or just set localAars Jul 06 18:36:40 ehsanv, which api level are you targeting? if its below lollipop, kiosk mode is as close as you can get Jul 06 18:36:50 if its lollipop, follow Mavriks link Jul 06 18:37:10 danijoo: lollipo Jul 06 18:37:11 p Jul 06 18:37:39 could you expand on that a little? Jul 06 18:37:53 ehsanv, then make an app that's the default launcher which uses the task locking api Jul 06 18:38:19 it's made for your usecase Jul 06 18:38:28 that works Jul 06 18:38:33 Mavrik: :) thanks Jul 06 18:38:53 before lollipop you'd have to basically manually hack/recompile AOSP Jul 06 18:39:43 Mavrik: the big problem is, i never code for android, and my employer wanted me to do it!!! :( Jul 06 18:39:53 and? Jul 06 18:40:02 ehsanv: get Head First Android book Jul 06 18:40:19 Mavrik: and i need to learn the basics fast Jul 06 18:40:26 onr: thanks Jul 06 18:40:30 If I want to use resource shrinking in AS (http://tools.android.com/tech-docs/new-build-system/resource-shrinking) do I need to specify this for every module or just the global app gradle file? Jul 06 18:40:32 right. Jul 06 18:40:37 how about you forget about the "fast" Jul 06 18:40:42 and replace it with "properly" Jul 06 18:41:08 barq, hmm, it's per-apk flavour IIRC Jul 06 18:41:23 Mavrik: seems better Jul 06 18:41:39 i couldn't done magik Jul 06 18:42:01 Hmm, it is not showing any shrinking resources in the log. Jul 06 18:42:02 barq, i think if you try to shrink the module that builds the app, this will also affect and shrink all submodules Jul 06 18:42:04 with special 'k' version lol Jul 06 18:42:35 maybe theres nothing to shrink :) Jul 06 18:43:38 Maybe because I am not building for release? Jul 06 18:44:07 bendavisnc, no, set localAars Jul 06 18:44:13 barq, do you actually have unused resources in your project>? Jul 06 18:44:40 Probably, I have a few k lint warnings Jul 06 18:44:42 if there arent any, theres nothing to remove Jul 06 18:44:53 It should still output 0 removed or something Jul 06 18:45:24 you could try adding a random image to your res folder Jul 06 18:45:27 and see if it gets removed Jul 06 18:45:39 Hi!! Jul 06 18:46:01 I have connected my mobile via USB and then go to the command line and typed adb devices Jul 06 18:46:29 but the list of devices attached is empty, what I can do? It seems it doesn't recognize my mobile (the OS recognize it as well) Jul 06 18:46:44 Iarfen, developer options enabled on the phone? Jul 06 18:46:53 yes, they are Jul 06 18:47:20 I have "depuration by USB" active Jul 06 18:47:23 Iarfen, unplug the phone, remove every driver related to it manually, also remove stuff like HTC sync or samsung crapware Jul 06 18:47:32 then install the adb drivers from google Jul 06 18:47:40 how I unplug the phone Jul 06 18:47:41 and plug your phone in again Jul 06 18:48:07 how to unplug? Jul 06 18:48:10 .. Jul 06 18:48:12 yes Jul 06 18:48:38 pull it out Jul 06 18:48:58 unplug = remove from computer. Jul 06 18:49:02 my mobile model is own S3010 Jul 06 18:49:51 I don't find the adb drivers from google because own doesn't appear Jul 06 18:51:40 https://developer.android.com/tools/extras/oem-usb.html here my mobile model own S3010 isn't Jul 06 18:52:20 hi, i have a fragment with setHasOptionsMenu(true); in onCreateView, i override onCreateOptionsMenu but the menu is not showed, can help me? Jul 06 18:56:02 If I have the path of a file. How do I create a Object of file from that? Jul 06 18:58:36 pfn, i feel like i'm so close, but i'm still struggling Jul 06 18:58:48 i've got localAars in Android += baseDirectory.value / "libs" / "SwipeNavigationDemo-debug.aar" in my build.sbt file Jul 06 18:59:08 but now, when i look in my gen folder, all i see is things related to resources Jul 06 18:59:27 i don't see or seem to have references to any of the actual class files Jul 06 19:00:26 Nvm... ignore that question Jul 06 19:01:33 t0th_-_, set it in a constructor Jul 06 19:01:38 onCreateView is too late Jul 06 19:02:16 bendavisnc, you do have them, you mean in intellij? refresh the sbt project Jul 06 19:02:26 setHasOptionsMenu(true); in MyFragment() ? Jul 06 19:02:53 t0th_-_, yes Jul 06 19:02:54 t0th_-_, yeah. or maybe in onCreate() before calling super does work too Jul 06 19:03:25 strange Jul 06 19:03:34 i put it in onCreate Jul 06 19:03:50 pfn, in my gen directory, the only thing i have under that package is R.java Jul 06 19:04:00 i think the optiomns menu stuff is called somewhere in the middle of onCreate Jul 06 19:04:02 bendavisnc, that's normal Jul 06 19:04:10 i will test in oncreate Jul 06 19:04:31 no :( Jul 06 19:04:33 ok, i just synchronized but intellij can also on find the .R reference Jul 06 19:04:44 also only* Jul 06 19:04:54 bendavisnc, you have to compile in sbt first Jul 06 19:05:01 the method onCreateOptionsMenu never called Jul 06 19:05:25 t0th_-_, call it in the constructor then Jul 06 19:05:50 callit manually? Jul 06 19:06:01 the setHasOptionsMenu Jul 06 19:06:12 i've done that, perhaps i need to actually reference these classes in my own code before it gets generated? Jul 06 19:06:16 i'm a little at a loss Jul 06 19:06:24 huh? Jul 06 19:06:34 how do you know intellij can't find it if you don't reference it in your code... Jul 06 19:06:58 how can you be at a loss if you're not using it Jul 06 19:08:22 not working, very strange Jul 06 19:08:29 i have other activity and work Jul 06 19:08:33 http://pastebin.com/2KeQkXq0 my fragment Jul 06 19:09:12 with the autocomplete feature, when i'm trying to import, it only suggests the .R class Jul 06 19:09:25 danijoo: The problem was I was building for debug. With release I get Removed unused resources: Binary resource data reduced from 4567KB to 4568KB: Removed 0% Jul 06 19:09:55 barq, didnt you specify to do that for debug build? Jul 06 19:10:01 No, for release Jul 06 19:10:03 also, under the bin/classes folder, with the .aar package namespace, the only files are also a bunch of R$*.class files Jul 06 19:10:16 I don't have a debug configuration Jul 06 19:10:20 but for my own code, all of the class files are there as expected Jul 06 19:12:53 t0th_-_, show the correcspnding activiy Jul 06 19:14:15 danijoo: http://pastebin.com/sS6CHYg3 Jul 06 19:14:37 pfn, strange, and now ive tried putting the localAars line under the libraryDependencies line in the build.sbt file, and now i can't compile Jul 06 19:15:01 t0th_-_, do you use toolbar or actionbar? Jul 06 19:15:09 toolbar Jul 06 19:15:25 you need to register your toolbar as the activities actionbar Jul 06 19:15:44 or it wont be identified as the holder of the menu and no menu inflation will get triggered Jul 06 19:15:51 aff, off course sorry Jul 06 19:15:53 my fail Jul 06 19:15:56 :) Jul 06 19:16:05 setSupportActionbar(yourToolbar) Jul 06 19:16:17 after that it should work Jul 06 19:18:37 bendavisnc, maybe you should learn some sbt basics first Jul 06 19:19:33 pfn, probably, but no comment on why there aren't any class files except R.class files? Jul 06 19:19:49 why does this search item does not get white ? https://gist.github.com/wviana/38d264a81afbe5242c1b Jul 06 19:20:17 this is a toolbar, not a search item Jul 06 19:20:40 pfn, i noticed that there's a classes.jar file inside the .aar file Jul 06 19:21:08 bendavisnc, I already said why, because that's how it works Jul 06 19:22:09 ok... Jul 06 19:22:40 bah. Intel x86 Emulator Accelerator is not available on Linux Jul 06 19:23:02 *cough* genymotion *cough* Jul 06 19:23:36 genymotion is available on linux? Jul 06 19:24:00 yup Jul 06 19:24:32 This is my top level gradle file: https://ghostbin.com/paste/m4cre How can I get this to work? I get the error AndroidManifest not found. I bascially want to enable shrinking for the entire app so I pasted the code for it in here as well. Jul 06 19:25:31 bendavisnc, how about you actually ask what you're having trouble with Jul 06 19:25:34 bendavisnc, instead of random crap Jul 06 19:25:51 Android phone can handle more than 2 devices in the same application, right_ Jul 06 19:25:52 ? Jul 06 19:25:56 barq, shrinking belongs in the modules gradle file, not top level Jul 06 19:26:17 OK, so I cannot shrink my library dependencies? Jul 06 19:26:29 barq, they will shrink with the module you are building Jul 06 19:26:34 ok Jul 06 19:26:41 (its in the docs) Jul 06 19:27:06 barq, http://tools.android.com/tech-docs/new-build-system/resource-shrinking first 2 sentences Jul 06 19:27:09 pfn, i've been pretty clear imo. i'm trying to use a .aar dependency in my app in intellij with your plugin Jul 06 19:27:19 Is it possible to get the packet from wifi ? Scan for AP in range and get all received packets. Jul 06 19:27:50 danijoo: Yes I read that. It was not clear though, where you need to define the shrinking, though. Jul 06 19:28:02 bendavisnc, no, you haven't Jul 06 19:28:05 I already told you how Jul 06 19:28:06 you did it Jul 06 19:28:08 now what is the problem Jul 06 19:28:12 you haven't ever asked Jul 06 19:28:23 But thanks, apparently nothing to shrink here. Jul 06 19:28:54 i simply don't understand why intellij can only find the .R files for this package of the .aar Jul 06 19:29:02 wtf are you talking about Jul 06 19:29:08 you said you aren't using the aar Jul 06 19:29:12 so why should you see the aar Jul 06 19:29:30 what, i've been talking about this .aar this whole time Jul 06 19:29:39 talking about *what* Jul 06 19:29:41 "this" aar Jul 06 19:29:44 "that" thing Jul 06 19:29:54 describe exactly the problem you are having Jul 06 19:29:56 http://tinyurl.com/p8hfv3u Jul 06 19:30:05 trying to include a .aar file in my sbt project Jul 06 19:30:30 bendavisnc maybe give pfn a pastebin Jul 06 19:30:36 and honestly, your attitude just makes me feel like i'm dealing like a really smart, but really obnoxious twelve year old Jul 06 19:31:05 I'm really not going to waste my time anymore Jul 06 19:31:08 you're clearly trolling me Jul 06 19:42:00 What's the difference between a DrawerLayout and a NavigationView? Jul 06 19:42:19 a navigationview is just the list Jul 06 19:42:28 aha Jul 06 19:42:37 DrawerLayout is part of v4 support library? Jul 06 19:42:40 you still need to put it into a drawer to make it possible to show/hide it Jul 06 19:43:04 v4 or 7. im not sure right now Jul 06 19:43:48 Should I use a SearchView or a AutoCompleteSearchView ? Jul 06 19:43:59 I don't have v4 as a dependency but it seems to compile fine? Jul 06 19:44:16 wviana, i think you mean autocompletetextview Jul 06 19:44:32 danijoo: yeah Jul 06 19:44:46 wviana, depends then Jul 06 19:44:46 I'll use it inside my actionbar Jul 06 19:45:16 Drawer is v4 Jul 06 19:45:26 barq, i think 7 depends on 4 Jul 06 19:45:38 wviana, id stick to searchview Jul 06 19:47:14 danijoo: It sucks, cause I'll have to implement my adapter. I have it working in a AutoCompleteTextView. Jul 06 19:47:35 wviana, why you ask theen? Jul 06 19:47:58 wviana: What kind of adapter do you need? Jul 06 19:48:06 jo point in rewriting code if you already have a working implementation with the other one Jul 06 19:48:14 no* Jul 06 19:48:29 danijoo: cause I had the booth options. I didn't know which one to use. I was using a AutoCompleteTextView before using Action/Tool bar Jul 06 19:48:44 Can support libs ever provide upwards compatibility? Such as supporting fragments in older api versions? Jul 06 19:49:09 Anyone use osmdroid or mapbox sdk? Jul 06 19:49:26 barq, i dont understand? support library gives you support fragments for that Jul 06 19:49:26 I had a kind of toolbar implemented by myself, through a LinearLayout. Jul 06 19:49:51 wviana, maybe just replace the linearlayout with toolbar and stick to your textview then :) Jul 06 19:50:01 If fragments were release in api 8, can you use supportlib to use it in lower api versions? Jul 06 19:50:05 unless you need some features from searchview Jul 06 19:50:24 barq v4 supports Fragments iir Jul 06 19:50:26 *iirc Jul 06 19:50:30 barq, thats what the support lib does Jul 06 19:50:35 it gives you support fragments Jul 06 19:50:55 danijoo: I don't look nice, cause in my "toolbar", the search was static. By using android toolbar I'll be able to expand the search when clicking in its icon. Jul 06 19:51:08 which is kinda like a copy/paste from real fragment source, but under another package name Jul 06 19:51:31 is there a support lib for BluetoothLE? Jul 06 19:51:33 wviana, ah yeah. then you would have to implement it for searchview (which sucks) Jul 06 19:51:33 I'm quite puzzled Jul 06 19:51:43 Afzal not from google Jul 06 19:51:47 g00s well shit Jul 06 19:51:47 https://stackoverflow.com/questions/31254190/android-get-packets-from-wifi-results Is this possible in Android ? Jul 06 19:51:49 danijoo: it won't l ook nice* Jul 06 19:51:50 The Support Library is the only real way to efficiently make your application work between versions Jul 06 19:51:59 So why is there even a standard SDK Jul 06 19:52:00 I thought with support lib you just implement for your compileSdkVersion and then support provides the same features for lower api versions. Jul 06 19:52:13 barq No Jul 06 19:52:19 Binero, because the framework provides native features Jul 06 19:52:29 the support lib is only to backport /some/ functionality Jul 06 19:52:40 pfn That's my entire point Jul 06 19:52:50 but your point is lacking Jul 06 19:52:50 pfn It is being backported, why is that functionality part of the SDK in the first place? Jul 06 19:53:06 Binero, without a standart sdk, each app would have to bundle the whole source into its apk Jul 06 19:53:09 because it comes out in the sdk first, then gets backported for shits and giggles Jul 06 19:53:24 and only *parts* of it Jul 06 19:53:25 danijoo They do that now, they bundle the Support Library Jul 06 19:53:29 hello world would be like 100 mb then Jul 06 19:53:38 no, support library isn't bundled Jul 06 19:53:42 But say you have maxSdk 7 and you want to use fragments, then using support lib won't help you, right? Jul 06 19:53:51 barq, it does. Jul 06 19:53:56 pfn I don't see how that's a reason. If DrawerLayout is in the Support Library, why is it also in the standard SDK? I see no reason for ever using the SDK version Jul 06 19:54:01 because it gives you the library implementation via support Jul 06 19:54:06 Binero, anyway, arguably, fragments should never have been a part of framework Jul 06 19:54:10 thats exacltly what it is for. Jul 06 19:54:17 pfn, absolutly agree Jul 06 19:54:20 Even if you are not compiling for 8? Jul 06 19:54:28 Binero, drawerlayout isn't in the standard sdk Jul 06 19:54:48 Now I am really confused about the point of the Support Library Jul 06 19:54:56 I thought it was a backport of features? Jul 06 19:55:05 barq, it just ads an implementation of fragments to your apk. you can then use this embedded implemenation instead of the native one Jul 06 19:55:16 Binero, it is Jul 06 19:55:23 what do you not understand Jul 06 19:55:33 Binero, mostly, some features cannot be backported, so they must exist in framework Jul 06 19:55:34 danijoo DrawerLayout isn't part of the SDK. Jul 06 19:55:34 What is the difference between embedded and native? Jul 06 19:55:35 that's all Jul 06 19:55:52 Binero, yeah they decided to not add some features into the real sdk Jul 06 19:55:56 pfn My point is, if features can be backported, there is little point in having them in the Framework Jul 06 19:55:58 main reason why fragments are in framework is because of shit like PreferenceFragment Jul 06 19:56:04 Because it seems like there is no reason you'd ever use that Jul 06 19:56:04 Binero, nope, see reason above Jul 06 19:56:14 barq, native = part of the phones ROM. embedded = part of your APK Jul 06 19:56:28 PreferenceFragment are used in native framework, thus fragments must exist in framework Jul 06 19:56:29 pfn Your point was that some features cannot be backported Jul 06 19:56:35 Binero, yes, see above Jul 06 19:56:35 pfn That's entirely irrelevant Jul 06 19:56:40 it is not irrelevant Jul 06 19:56:42 It is Jul 06 19:56:43 Binero also support has some things like NotificationCompat which lets you use the api as if 22 but gracefully degrades across all versions. if you look at the source for that, you will understand why support exists :D Jul 06 19:56:50 Because my entire point is, if they can be backported Jul 06 19:56:52 because PreferenceFragment depends on Fragment, it is NOT FUCKING POSSIBLE to use support fragments Jul 06 19:56:53 do most of you publish to the play store with your personal gmail account? My company has a Google Apps for Business account, should I publish via an account on there? Jul 06 19:56:56 danijoo: I always associate native with c code. Jul 06 19:57:16 thebishop dont use personal, even goofle says Jul 06 19:57:19 Binero, but not everything can be backported Jul 06 19:57:28 pfn You're not reading what I say at all Jul 06 19:57:39 Binero, I did, they exist in framework because the shit cannot be backported Jul 06 19:57:41 period Jul 06 19:57:45 pfn omfg Jul 06 19:57:52 You did not read what I said at all. Jul 06 19:57:52 And backporting is using new api in old api version without any problems? Jul 06 19:58:05 barq, yes Jul 06 19:58:06 barq Backporting literally copies the entire implementation Jul 06 19:58:24 it just bundles the implementation into your APK, because its not available on the phone already Jul 06 19:58:33 It does the same on any device Jul 06 19:58:35 Ah, got it now. Thanks. Jul 06 19:58:37 Binero, your point is "if it can be backported" why is it in framework, the answer is, "it can't be backported, thus it must exist in framework" Jul 06 19:58:44 ie fragments are part of andoroid 21 already. but not for android 9 Jul 06 19:58:59 so you add the code to your apk in order to use them on 9 Jul 06 19:59:02 thats what the support lib does Jul 06 19:59:07 pfn That makes no sense. A feature that can be backported, by definition cannot not be backported. Jul 06 19:59:23 what's up with all the stupid people today... Jul 06 19:59:29 I wonder the same. Jul 06 19:59:33 I already gave the prime reason why fragments must exist in framework Jul 06 19:59:39 I am not talking about fragments Jul 06 19:59:44 Binero, not everything can be backported. some parts can. they are still part of of the SDK because in 10 years you dont want to include 50 different support libs Jul 06 19:59:47 Does that mean your apk gets smaller the higher the version you build for if you use supportlib? Jul 06 19:59:50 but gracefully dismiss old ones Jul 06 19:59:53 Binero, there is nothing in the support lib, other than fragments, that duplicates framework Jul 06 19:59:58 danijoo Aha, that makes sense Jul 06 20:00:06 barq, no that means if you build high enough, you just dont use support lib anymore Jul 06 20:00:36 pfn That's untrue. Jul 06 20:00:42 but google seems to kinda go the way of not including a lot of stuff in the sdk right now Jul 06 20:00:44 Binero, it's completely true Jul 06 20:00:49 ie design library, databinding Jul 06 20:00:55 Binero, that's only untrue of appcompat, but that's a visual library Jul 06 20:00:59 We talked about how DrawerView was ONLY in the Support Library Jul 06 20:01:00 Aha Jul 06 20:01:08 Binero, no shit, drawerlayout is only in support lib Jul 06 20:01:10 what's your point? Jul 06 20:01:14 And also, my entire point was, why have a single feature in both the support library and the Framework Jul 06 20:01:20 but it's /not/ Jul 06 20:01:22 And danijoo answered that Jul 06 20:01:29 what feature is in support lib and framework? Jul 06 20:01:31 you haven't named any Jul 06 20:01:40 fragments :) Jul 06 20:01:41 Activity Jul 06 20:01:45 activity isn't in support lib Jul 06 20:01:46 Loaders too Jul 06 20:01:47 ActionBar Jul 06 20:01:54 actionbar isn't in support lib Jul 06 20:01:58 It is Jul 06 20:01:59 it's in appcompat for visual ui Jul 06 20:02:04 support != appcompat Jul 06 20:02:14 pfn: I thought ActionBar is in v7 Jul 06 20:02:15 Same point different name Jul 06 20:02:42 hey guys, how can i identify if the user changed wifi? i currently see when he conects/disconects from wifi Jul 06 20:02:51 Oh, mixed up with appcompat Jul 06 20:03:26 Is AppCompat not a supportLib Jul 06 20:03:37 luist, check BSSID of the access point Jul 06 20:04:05 barq I am confused as well, it even uses the support namespace Jul 06 20:04:24 it's all in android.support Jul 06 20:04:30 it is if you ask me ;) Jul 06 20:04:39 https://developer.android.com/tools/support-library/features.html This has AppCompat listed in support Jul 06 20:04:47 yup Jul 06 20:05:14 google should just add a way to pull in dependencies on the device at install time Jul 06 20:05:21 Mavrik Indeed Jul 06 20:05:21 and decouple half of framework into such libs Jul 06 20:05:35 then we can get rid of all this "fragmentation" crap Jul 06 20:06:18 maybe google should should construct an army of robots to seek out and destory all android phones < 4.4 Jul 06 20:06:19 Or give the option of updating supportlib Jul 06 20:06:47 yeah. some delocalized support libs would be awesome Jul 06 20:06:57 lasserix I still have a Phone < 4.4 Jul 06 20:07:01 yeah, I mean, pretty much every app pulls in support Jul 06 20:07:05 when the first app that requires v7 installs, it just downloaded v7 with the app Jul 06 20:07:08 so why not have those on a central storage instead of having 30 duplicates Jul 06 20:07:20 just like gradle/maven already does Jul 06 20:07:21 Binero: its people like you holding android down, with all these support libraries! Jul 06 20:07:22 together with some nice inverlop so developers dont need to take care of it Jul 06 20:07:41 you type getActionbar() and the system sorts out if it needs to use support Jul 06 20:07:44 lasserix I suppose, I would update it, but no update available Jul 06 20:08:19 just an amry of drones with one simple task: seek and out and destroy any android device below a certain api and hand out a rebate to replace the device destroyed to its owner. Jul 06 20:08:34 the only p[roblem i can see with this is for features that are not backported Jul 06 20:08:53 danijoo Every feature would be backported using that design Jul 06 20:09:05 danijoo, yeah, you can't really get around some things Jul 06 20:09:12 Binero, no Jul 06 20:09:13 Just make the UI a library Jul 06 20:09:14 if you need a new kernel to support new camera features, there's nothing much you can do Jul 06 20:09:30 or support fingerprint sensors or secure storage, or somethin Jul 06 20:09:34 hotswap kernel features :p Jul 06 20:09:39 Well no need to backport those Jul 06 20:09:43 but that's fine, we can deal with that :) Jul 06 20:09:49 yep Jul 06 20:09:57 Because devices that don't support those won't suddenly have the hardware when the software updates Jul 06 20:10:03 a nice lint warning and its k Jul 06 20:10:22 and then there's the VM changes Jul 06 20:10:24 e.g. new language features Jul 06 20:10:27 Binero, but if you request those features and the system does not support it, it would break Jul 06 20:10:36 Mavrik i get the impression what you are describing is coming in Java 9 Jigsaw Jul 06 20:10:38 danijoo Yeah? Google already deals with that Jul 06 20:10:51 What if you request GL ES 2 when the device only supports 1? Jul 06 20:10:56 g00s, on desktop we had this since forever really Jul 06 20:10:59 You just put in the manifest what you're going to use Jul 06 20:11:02 Binero, crash Jul 06 20:11:05 no Jul 06 20:11:11 it won't even install Jul 06 20:11:12 or it doesnt compile lol Jul 06 20:11:13 yeah Jul 06 20:11:18 yeah, it won't show up in the store Jul 06 20:11:24 I'd like to have more granular controls for that as well Jul 06 20:11:27 hello Jul 06 20:11:36 "" Jul 06 20:11:45 ^ this is really missing Jul 06 20:12:00 Jul 06 20:12:07 *requires Jul 06 20:12:24 maybe with api level 30 :p Jul 06 20:12:40 probably never Jul 06 20:12:42 My app uses a socket connection to download some http content and display it in a list view. everything works fine on all the devices up to 4.4. on 5.0+ it looks like it doesnt download the content Jul 06 20:12:46 how can i debug it? Jul 06 20:12:46 probably Jul 06 20:12:48 as such an update would be incompatible with old versions Jul 06 20:12:56 Binero, not really Jul 06 20:12:57 they screwed up from the start and now are stuck with it Jul 06 20:12:58 hTmlDP: Show code. Jul 06 20:13:07 danijoo older phones wouldn't understand Jul 06 20:13:10 it uses a swiperefreshlayout Jul 06 20:13:10 you can make it like the new permission system Jul 06 20:13:18 mh. Jul 06 20:13:20 idk Jul 06 20:13:21 barq: the downloader? Jul 06 20:13:27 anyway Jul 06 20:13:28 for this i would build different apks :) Jul 06 20:13:29 Ye.s Jul 06 20:13:42 Android development is terrible in the sense that I have 1k lines of boilerplace Jul 06 20:13:47 *boilerplate Jul 06 20:13:50 and no features yet Jul 06 20:13:52 Binero: why is that bad? Jul 06 20:13:58 Binero, thats the definition of every java project :) Jul 06 20:14:01 yeah Jul 06 20:14:23 kotlin reduces a lot :) Jul 06 20:14:27 some nice libs too Jul 06 20:14:48 oh god Jul 06 20:14:50 that's the downloader http://lpst.tk/?eQqK Jul 06 20:14:50 yeah, we fixed a lot of that with libs and kotlin Jul 06 20:14:51 optional semicolons Jul 06 20:14:56 danijoo i just read from Gavin Kinf that that Ceylon community is fully focused on Android Jul 06 20:14:57 nothing suspicious in logcat Jul 06 20:15:02 *Gavin King Jul 06 20:15:05 I better not get used to that Jul 06 20:15:25 Binero, optional or how i call it: no semicolons :p Jul 06 20:15:31 g00s: yeah he just said this on the reddit thread, interesting Jul 06 20:15:36 Ceylon expects android compat by the end of this year hopefuly Jul 06 20:15:37 wonder how well ceylon will run on Androi Jul 06 20:16:16 hTmlDP: catch (Exception e), that's why you are not seeing any error. Jul 06 20:16:31 barq: k ill make it throw it Jul 06 20:16:32 man looking at some issues list on github makes me sad Jul 06 20:16:39 g00s, interessting Jul 06 20:16:48 but im fine with my K Jul 06 20:16:50 :) Jul 06 20:16:54 hTmlDP: Print some log so you see something or the stacktrace. Jul 06 20:16:54 danijoo That's going to be so annoying Jul 06 20:17:02 Not when using the language, that will be amazing Jul 06 20:17:08 But after using the language and trying to use something else again Jul 06 20:17:15 Binero, dont ask me.. Jul 06 20:17:21 i build everything new with kotlin Jul 06 20:17:26 and support some java projects Jul 06 20:17:43 they are similar enough to constantly forget semicolons and confuse some keywords Jul 06 20:18:00 or trying to use lambdas in java Jul 06 20:18:06 hTmlDP: Also don't catch a general Exception. Catch SocketException for example. Jul 06 20:18:06 Well yeah but I am just doing Android to quickly get this app out of the way and move on with real stuff Jul 06 20:18:21 hTmlDP: Or SocketTimeOutException. Jul 06 20:18:27 danijoo Yeah, that's what I expect to go wrong Jul 06 20:18:30 danijoo, retrolambda ftw :) Jul 06 20:18:34 Expecting features that aren't there Jul 06 20:18:59 barq: kay Jul 06 20:19:29 I remember a bit about Ceylon Jul 06 20:19:36 but wasn't that primarily aimed at WebDev? Jul 06 20:20:03 android is really the thing for jvm languages isnt it? Jul 06 20:20:16 they are all like "if we support android, people will use it!" Jul 06 20:20:48 hmm Jul 06 20:20:50 i imagine every language has to decide whether its worth suporting android; the platform imposes limitations Jul 06 20:21:01 *alternative jvm language Jul 06 20:21:05 wonder if Google could avoid the Oracle fuckup with just pitching in to Kotlin Jul 06 20:21:27 google begins building features with kotlin. im really happy to see this Jul 06 20:21:31 Mavrik no, they would still need the java runtime stuff (java.util.*) Jul 06 20:21:55 g00s, re-implement that? Jul 06 20:22:05 still significantly easier than moving to another runtime Jul 06 20:22:16 now its copyright issue Mavrik on the API signature Jul 06 20:22:22 well. you could add those java.util.* implementatons to any languages Jul 06 20:22:35 its just way harder than using the java classes and building an inverlop Jul 06 20:22:47 it doesn't matter if you cleanroom your own java.util.* the argument in court is API is copyrightable Jul 06 20:23:12 true Jul 06 20:23:27 danijoo Do you use Android Studio with Kotlin? Jul 06 20:23:31 Binero, yes Jul 06 20:23:48 Do you have both the Kotlin and Kotlin Extensions for Android plugins? Jul 06 20:23:55 Because the latter one seems to have a really bad rating Jul 06 20:24:15 i use the extensions in one project Jul 06 20:24:18 but not in all Jul 06 20:24:30 I'll check it I suppose Jul 06 20:24:32 I just use IDEA Jul 06 20:24:36 Let's see if this is any better Jul 06 20:24:49 I pretty much have time till Windows 10 arrives to work on this app Jul 06 20:24:54 you basically have to start a project with it. introducting it after a while will break everything (or at leastdid for me). i think thats the reason for the rating Jul 06 20:25:13 ah Jul 06 20:25:22 that's okay, all I have atm is broken boilerplate Jul 06 20:25:27 because it creates variables under the hood Jul 06 20:25:45 and if you tend to name a variable listView becaus its id is listview, the extensions will break Jul 06 20:25:54 because they generate listView variable Jul 06 20:26:02 and then duplicates, and apocalypse Jul 06 20:26:02 hmm Jul 06 20:26:17 hello, does anyone have done android upgrade from 4.4.4 to 5.0 on samsung galaxy s a5 Jul 06 20:26:18 ? Jul 06 20:26:19 I find that way of generating UI downright hideous Jul 06 20:26:22 worse than XML Jul 06 20:26:29 if i had to guess - looking at Android 5-10 years from now, it will look a bit like FFOS; you have the native libraries, linux kernel, and then a runtime that runs webassembly Jul 06 20:26:33 ronaldsmazitis, if you're not developing an app, you're not in the right place. Jul 06 20:26:35 Mavrik, thats not extensions, thats anko Jul 06 20:26:47 and im absolutly with you on that Jul 06 20:26:49 ronaldsmazitis: Why? #android Jul 06 20:26:59 danijoo, are you talking about the auto-import from XML ids stuff? Jul 06 20:27:04 danijoo Sounds like a nightmare Jul 06 20:27:04 Mavrik, yes Jul 06 20:27:12 What does it create those variables for? Jul 06 20:27:15 ah Jul 06 20:27:16 kotlin-android=-extensions Jul 06 20:27:27 danijoo, can IDEA do refactoring on that? Jul 06 20:27:48 Mavrik, no. under the hood the create extension functions Jul 06 20:27:50 lol IDEA barely manages to refactor now for me so can't be much worse Jul 06 20:28:04 ? Jul 06 20:28:08 and if the name of those extension functions clash with local variables, you cant import them without errors Jul 06 20:28:09 Doing something very wrong then. Jul 06 20:28:21 my app is already there ,but damn html5 video can't be backgrounded in any browser from beta to stable Jul 06 20:28:52 for example if you have R.id.listview, it will generate a file with fun Activity listView() { .... } Jul 06 20:29:06 and you cant import that for obvious reasons if you already have a variable names listView Jul 06 20:29:31 Activity.listView() ** Jul 06 20:29:50 the current problem with Kotlin is that framework is still in Java. ?-classes should be forced to use in Java interop when there is @Nullable or no @NonNull annotation Jul 06 20:30:47 icedp, you can remove the ? in method params at least Jul 06 20:30:52 if you are sure its never null ofc Jul 06 20:32:18 What if it is Null after all? Jul 06 20:32:18 danijoo: yep, I should track it manually then. Now if it the method call with null argument - there is an runtime exception which happens only in that case but not normally Jul 06 20:32:45 Binero, Exception Jul 06 20:32:51 ah so regular behaviour Jul 06 20:33:01 you really shouldnt change it if you arent 100% sure Jul 06 20:33:03 no, not regular Jul 06 20:33:11 even if I don't use the argument, the method will fail Jul 06 20:33:12 In Rust there is no such thing as a Null Pointer Jul 06 20:33:20 all pointers point to something valid Jul 06 20:33:26 yeah you get that exception at method call Jul 06 20:33:28 grown really used to that Jul 06 20:33:29 not at argument use Jul 06 20:34:10 for examle onCreate(instanceState: Bundle?) {} you cant remove it or the method call will crash Jul 06 20:34:25 but for onCreateView(inflater: LayoutInflater?, ...) its save to remove it Jul 06 20:34:47 What's the point of that? Jul 06 20:34:55 It just moves the point at which it crashes Jul 06 20:35:00 easier to debug? Jul 06 20:35:05 Binero, part of kotlin is null safty Jul 06 20:35:15 if you declare a variable without the ?, you can be sure its never null Jul 06 20:35:23 and null cannot be assinged to it Jul 06 20:35:28 ah Jul 06 20:35:29 so you never have to check for it Jul 06 20:35:36 Seems like some loose safety then Jul 06 20:35:43 but safety nonetheless Jul 06 20:36:15 if i decalare it in a method header, i can be sure noone can call it with null and therefore it reduces boilerplating null checks Jul 06 20:36:28 and also NPE Jul 06 20:37:02 but kotlin cant know what java methods expect. Jul 06 20:37:17 ie if you extend a javaclass, kotlin does not know if a param can be null or not Jul 06 20:37:35 and the convention right now is that everything can be null, but you can change that manually by removing the ? Jul 06 20:42:17 how do you do onItemTouchListener? i know you can do onItemClickListener, but that isnt sufficient for calculating held down buttons Jul 06 20:42:40 NateRiver, you would need to register the listener manually Jul 06 20:42:45 in getView() for example Jul 06 20:42:58 view.setOnTouchListener() Jul 06 20:43:10 oh that not too hard Jul 06 20:43:58 does it become a problem ? how can griview tell your not trying to swipe the view? and not just holding down item? Jul 06 20:44:39 timber doesn't log to logcat? Jul 06 20:45:24 danijoo do you ever use onItemLongClick? it seems like that does held events? Jul 06 20:47:47 honestly i dont know how the ios native user exp holds up at all Jul 06 20:48:00 lasserix what do you mean by holds up? Jul 06 20:48:05 It's more responsive, for on Jul 06 20:48:07 one* Jul 06 20:48:08 i feel like im in kindergarden everytime i use an ios device because you get one button Jul 06 20:48:16 not more responsive Jul 06 20:48:18 not at all Jul 06 20:48:18 lol true Jul 06 20:48:27 i just crashed the app store Jul 06 20:48:38 yes more responsive, dude, I hate my nexus 5 because how long it takes for the buttons to respond Jul 06 20:48:42 trying to download an app by not logging in before i pressed GET Jul 06 20:48:44 especially the system buttons Jul 06 20:48:51 then your system is f--ked Jul 06 20:48:54 my n5 is fast as .... Jul 06 20:48:54 well, that's the app store's fault Jul 06 20:49:01 there are only like 250 apps on my phone <_< Jul 06 20:49:15 how do i force quit ? Jul 06 20:49:24 still that's your fault not the phone Jul 06 20:49:25 you swipe the app up Jul 06 20:49:43 umm it just makes the page go up Jul 06 20:49:44 does timber log to logcat? Jul 06 20:50:16 double-tap home + swipe up Jul 06 20:50:34 whats the home button? Jul 06 20:50:51 there's only one button on the phone, tap it twice and swipe up <_< Jul 06 20:50:59 exactly what i mean Jul 06 20:51:15 there's space for two more home buttons why isn't it used? Jul 06 20:51:16 meh, you shouldn't need to close apps anyway Jul 06 20:51:19 just like android Jul 06 20:51:22 except when it fails Jul 06 20:51:27 and i can no longer GET the app Jul 06 20:51:30 i need to download Jul 06 20:51:31 not #ios Jul 06 20:51:37 because its stuck trying to GET the app Jul 06 20:54:25 danijoo Am I supposed to fill in the in "classpath 'org.jetbrains.kotlin:kotlin-android-extensions:'"? Jul 06 20:54:29 hmm do i have to associate a cc to even download an app damn Jul 06 20:54:50 Binero, yes Jul 06 20:54:54 lasserix: a free one? Jul 06 20:55:02 0.12.613 is the current one Jul 06 20:55:04 danijoo That's the kotlin version, right? Jul 06 20:55:06 err i am doing someting on ios device, barq Jul 06 20:55:07 So I just fill in $kotlin_version Jul 06 20:55:09 just griping Jul 06 20:55:12 yup Jul 06 20:55:27 hmm Jul 06 20:55:30 gradle project sync failed Jul 06 20:55:44 lasserix: I didn't put in any cc details. Jul 06 20:55:44 (yes it does) Jul 06 20:56:52 Afzal: you talking to me you mean? Jul 06 20:57:04 nah I meant Timber does log to logcat Jul 06 20:57:06 oh Jul 06 20:57:13 Folks. Where is a good place to store some visual constants, like font colors or sizes, to refer on activities? On the string.xml resource file? Jul 06 20:57:13 Hey all I am having some trouble with setting up a media player service, I am following this tut: http://code.tutsplus.com/tutorials/create-a-music-player-on-android-song-playback--mobile-22778 but I cant get it to work Jul 06 20:57:19 i'm a newbe Jul 06 20:57:22 it seems like the service is not starting at all Jul 06 20:57:24 microsoft just made a new android app https://play.google.com/store/apps/details?id=com.microsoft.hddl.app Jul 06 20:57:31 Peste_Bubonica: styles and dimensions Jul 06 20:57:34 Peste_Bubonica colors.xml Jul 06 20:57:39 Here is the github of my app https://github.com/NeuroWinter/bFMRadio Jul 06 20:58:00 Peste_Bubonica dimens.xml Jul 06 20:58:13 Not sure about fonts Jul 06 20:58:43 NeuroWinter: that tutorial is wack Jul 06 20:58:59 Yeah it does seem to be all over the place Jul 06 20:59:00 NeuroWinter: since he's binding to the service, it'll stop the service when he leaves the activity (eg presses home) Jul 06 20:59:08 he doesn't explicitly start the service Jul 06 20:59:11 colors.xml does not exist yet.. but dimens and styles yes.. I will check how to fill it. Thanks by your help! Jul 06 20:59:17 Ahh damn thats not what I want... Jul 06 20:59:32 NeuroWinter: you need to read how to implicitly (binding) and explictily start/stop a service Jul 06 20:59:54 how do i remove gridViews selection? everytime i click an item it selects it by default and leaves it colored. What can i override to remove this \ Jul 06 20:59:56 you want to start and stop a service external to the activity (or at least, not through the activity binding) Jul 06 21:00:11 although it is okay to bind to get a reference to service's methods Jul 06 21:00:59 Ok so really I should just rewrite all of it? Jul 06 21:01:07 that tutorial is kind of useless Jul 06 21:01:22 \o/ great.... Jul 06 21:01:22 you should read up on service lifecycle Jul 06 21:01:25 waht binding does Jul 06 21:01:42 then look up another tuturial how to use mediaplayer to play music Jul 06 21:01:47 then hook that inside your service Jul 06 21:02:33 ok thank you will do lasserix Jul 06 21:04:09 Do I want a IntentService? Jul 06 21:04:13 anybody hear when iosched 2015 sources will be on github? Jul 06 21:10:24 NeuroWinter: no Jul 06 21:10:39 IntentService is for a execution task, ie, something that finishes and completes and goes away Jul 06 21:11:16 Ahh ok so just a normal service then? Jul 06 21:13:34 https://developer.android.com/training/run-background-service/create-service.html this seems to say that an intentService would work Jul 06 21:13:44 NeuroWinter: no README.md/10 Jul 06 21:14:14 how do you replicate the snapChat button mechanism where click means one thing, and hold means do something else Jul 06 21:14:29 explodes_: ? Jul 06 21:14:52 NateRiver: long click Jul 06 21:15:51 barq so how do you tell LongClick when the finger is released to stop doing something Jul 06 21:16:33 NateRiver: onpress/onrelease Jul 06 21:16:51 http://developer.android.com/reference/android/view/View.OnTouchListener.html Jul 06 21:18:17 so i shouldnt use longclick? Jul 06 21:18:34 NateRiver: Depends on what you actually want to do. Jul 06 21:18:46 I don't use snapChat so I don't know how this feature works exactly. Jul 06 21:19:14 click fast do one thing, and if held do something while held until released Jul 06 21:20:26 NateRiver: read the link above and then about MotionEvent/ACTION_DOWN/ACTION_UP Jul 06 21:21:57 i already know about that and have been trying to get it to work, but its like it still does the onItemClick regardless, and i dont know what to write in Action down to make it keep looping? like while(Actiondown)? Jul 06 21:22:21 NateRiver: Paste what you have tried so far. Jul 06 21:26:36 Why does ActionBarDrawerToggle take a Toolbar? Jul 06 21:27:24 ? Jul 06 21:27:29 https://stackoverflow.com/questions/31254190/android-get-packets-from-wifi-results Is this possible in Android ? Jul 06 21:27:30 And why isn't it called ToolbarDrawerToggle? Jul 06 21:27:42 barq why the '?'? Jul 06 21:28:00 guess Jul 06 21:28:31 No idea Jul 06 21:28:43 Because I didn't understand what you are asking. Jul 06 21:29:12 Well Jul 06 21:29:23 The constructor for ActionBarDrawerToggle take as Toolbar Jul 06 21:29:23 why Jul 06 21:29:41 Binero, before there was a toolbar, there was the actionbar Jul 06 21:29:49 Binero: And why do you think it is called ActionBarDrawerToggle and not ToolBarToggle? It's in v7 support Jul 06 21:29:51 danijoo I know Jul 06 21:29:52 they rewrote the class to work with toolbar but kept the name Jul 06 21:30:08 I don't like that Jul 06 21:30:14 It causes confusion Jul 06 21:30:20 Complain to Google Jul 06 21:30:27 ^ Jul 06 21:30:29 I would but Google doesn't care Jul 06 21:30:40 same here :p Jul 06 21:30:54 oh Jul 06 21:31:01 Now I'm confused Jul 06 21:31:12 what's the difference between the constructor with a toolbar, and the one without? Jul 06 21:31:20 and I dont want to remeber new class names ;) Jul 06 21:31:27 One is with a ToolBar, the other without Jul 06 21:31:31 https://developer.android.com/reference/android/support/v7/app/ActionBarDrawerToggle.html#pubctors Jul 06 21:31:38 barq That's my question Jul 06 21:31:50 That's my answer Jul 06 21:31:55 That's not an answer Jul 06 21:32:00 that's repeating the question Jul 06 21:32:12 You just switched around some words Jul 06 21:32:29 Binero, im not sure but my guess would be one adds the toggle to the given toolbar, the other one to the activities actionbar (getActionBar) which might be a toolbar or an actionbar Jul 06 21:32:40 Ah Jul 06 21:32:43 That seems to make sense Jul 06 21:32:52 Android needs more templates Jul 06 21:32:55 lol Jul 06 21:33:13 Binero: Are you too lazy to google yourself? You can look at the source and find out for yourself. Jul 06 21:33:27 barq If I didn't Google it I wouldn't have found out Jul 06 21:33:34 btw if you read the description of both constructors, you would have get the same answer Jul 06 21:33:42 without complaining here ;) Jul 06 21:33:45 Oh, so you've found out. Jul 06 21:33:47 !next Jul 06 21:33:57 :public:uiwidgets:preDexDebug Jul 06 21:33:57 AGPBI: {"kind":"SIMPLE","text":"trouble processing \"javax/security/cert/CertificateException.class\":","position":{},"original":"trouble processing \"javax/security/cert/CertificateException.class\":"} Jul 06 21:34:06 Anyone know why this would keep showing up in android studio and command line? Jul 06 21:34:12 If I clean then recompile, it works fine Jul 06 21:34:19 but every second attempt at compiling fails Jul 06 21:34:46 or rather, everything after the successful compile fails. I have to do a full clean + rebuild to get past this issue Jul 06 21:34:53 it's only happening with one of my 26 modules Jul 06 21:35:01 26 modules? Jul 06 21:35:02 o.O Jul 06 21:35:12 ya Jul 06 21:35:29 danijoo I did read the description of both constructors Jul 06 21:35:30 this must be fun to manage Jul 06 21:36:00 It's not bad with some organization. I have subdirectories for internal/external/sample stuff.. distribution script to make a public-facing release, etc Jul 06 21:36:02 Binero: Look at the code then if that's not enough. Jul 06 21:36:08 but one sample app is failing repeatedly with the above error Jul 06 21:36:45 barq Given how Android is written that'd take me about 2 hours to figure it out Jul 06 21:36:50 while someone here probably already knows Jul 06 21:37:10 that's too bad, learn for yourself Jul 06 21:37:15 No need to reexplore the world when someone already has a map Jul 06 21:37:15 we're not your free help Jul 06 21:37:25 Binero: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.1.0_r1/android/support/v7/app/ActionBarDrawerToggle.java Jul 06 21:37:35 I am at the source code... Jul 06 21:37:47 that's where I got the documentation in the first place Jul 06 21:38:16 Maybe you can find some explanation as to the naming in the comments. Jul 06 21:38:53 if you would have looked at the source, you would have realized that one constructor just calls the other passing null Jul 06 21:39:17 and your question would be obsolete Jul 06 21:39:20 ;) Jul 06 21:39:27 danijoo No it wouldn't Jul 06 21:39:43 yes it would because thats a really common pattern in android Jul 06 21:39:44 danijoo My question was what was the difference between the two Jul 06 21:39:57 an arg Jul 06 21:39:57 one is a shortcut Jul 06 21:40:05 pretty comman java pattern Jul 06 21:40:10 danijoo That's still not my question Jul 06 21:40:19 trollol Jul 06 21:40:24 i give up Jul 06 21:40:36 danijoo What is the difference between passing null and not passing null? Jul 06 21:40:40 dont feed the troll I guess Jul 06 21:40:41 That was my question Jul 06 21:41:01 what represents the params where you pass null, that should explain it Jul 06 21:41:06 Binero: The question is the answer. Jul 06 21:41:09 and I forgot who already, but I think it was you, suggested that it'd use the default action bar Jul 06 21:41:12 why is it when i debug on my phone the logcat goes crazy and i can never see runtime errors? it just keeps going Jul 06 21:41:16 barq No it isn't? Jul 06 21:41:24 It is. Just remove the what Jul 06 21:41:32 set the what to null Jul 06 21:41:44 You cannot have an ActionBarDrawerToggle without an ActionBar (or Toolbar) Jul 06 21:41:51 So passing in null wouldn't make sense Jul 06 21:41:57 Binero, constructor with toolbar accepts a toolbar OR null. if its null, it will use the default one of activity Jul 06 21:42:08 Binero, "The toolbar to use if you have an independent Toolbar" Jul 06 21:42:11 the constrcutor without toolbar param passes null so you dont have to do it Jul 06 21:42:13 in the doc Jul 06 21:42:15 danijoo Yeah, that's what you suggested, which sounds good Jul 06 21:42:20 or in short: read the source Jul 06 21:42:26 passing null means you won't use an independent one Jul 06 21:42:26 I am at the source... Jul 06 21:42:37 try to understand it Jul 06 21:42:39 The whole point of a Toolbar is it's independent... Jul 06 21:42:46 that's why it replaced ActionBar Jul 06 21:43:03 this has no meaning here Jul 06 21:43:29 what hasn't? Jul 06 21:43:47 an activity can have multiple toolbars Jul 06 21:43:56 Yes? Jul 06 21:44:01 with passing null you tell it you want to use the actionbar toolbar Jul 06 21:44:07 Well I know that now Jul 06 21:44:11 with passing a seperate toolbar you tell it you want to use the specific one Jul 06 21:44:27 Yes, seems likely Jul 06 21:44:32 now you wasted 10 minutes of 3 people instead of 5 minutes of your own for actually reading Jul 06 21:44:37 I did read Jul 06 21:44:45 If I didn't read I wouldn't have been able to ask the question Jul 06 21:44:50 You spent more time complaining that we suck at answering your questions. Jul 06 21:44:57 no you clearly didnt Jul 06 21:45:01 because the answer stands there Jul 06 21:45:04 I never said you suck at answering my question, you merely repeated my question Jul 06 21:45:08 The answer doesn't Jul 06 21:45:12 Then ask better questions. Jul 06 21:45:23 i need to go to bed.. Jul 06 21:45:27 good night Jul 06 21:45:30 don't worry, this is just the beginning of ranting, when you will get your hands more dirty in android, you will be beyond that point :D Jul 06 21:45:32 better for me ^^ Jul 06 21:45:38 gn danijoo Jul 06 21:45:42 barq I would, but it is still unclear to me what wasn't clear about my question Jul 06 21:46:15 adq Hopefully I won't have to spend too much time on Android Jul 06 21:46:31 Binero: Instead of repeating the same question over and over again you can be more specific. Jul 06 21:46:58 barq Sorry Jul 06 21:47:21 "Carefully explaining your problem is half the solution." prevails Jul 06 21:47:24 Your actual question was not, what is the difference between the two, but how can an ActionBarToggle exist without passing it a ToolBar. What will it reference. Jul 06 21:47:35 to be clear about independent toolbars: independent means: not set as activities main actionbar Jul 06 21:48:19 so main constructor just takes activity and sets the toggle to the main actionbar Jul 06 21:48:34 the second constructor is for if you dont like this behaviour and want it on another toolbar Jul 06 21:48:36 barq Well to be fairly honest I got an answer to my question fairly quickly as it was Jul 06 21:48:40 So it must've been clear Jul 06 21:49:21 Anyway, thanks for your answers Jul 06 21:57:30 I'm used to Visual Studio-style programming and debugging and I want to get started on Android development. Are there any tips or guides on how to make Android Studio similar to it? Jul 06 21:57:54 I have a button that calls an asynctask.... the asynctask ruturns a value through onPostExecute...... The variable is returned too late. I have other instructions for this variable on the same onClickListner. What am I doing wrong? Jul 06 21:58:38 I'm very new to programming and I know this is probably simple but I've been on it for over 10 hours and can't make any progress. Jul 06 21:58:45 TinFury: Show your code Jul 06 21:59:16 Anybody used the new BLE apis in lollipop? Jul 06 22:01:10 http://pastebin.com/jSFNY97g Jul 06 22:01:28 Should I paste the AsyncTask as well Jul 06 22:02:00 yes Jul 06 22:03:25 http://pastebin.com/hsNiUdFw Jul 06 22:03:48 What's the error? Jul 06 22:03:55 Thats it. there is an interface too. I'm getting what I want returned but It's returned at the VERY end of the onclick listner Jul 06 22:04:20 I want to use the return value in the onclick listner Jul 06 22:04:34 What line? Jul 06 22:06:01 On line 121 the lisner is called. Right below that call I would like to get the value of imageurls from the Asynctask Jul 06 22:07:31 TinFury: What's the expected return type that you need? Jul 06 22:07:44 ArrayList Jul 06 22:08:04 quit ma jawb Jul 06 22:08:06 oh yea Jul 06 22:08:14 it's an array of successfully uploaded image URLs Jul 06 22:08:36 TinFury: Can you move the code you want to execute to onPostExecute? Jul 06 22:09:09 Yea I've been moving it between the post execute and the onclick listner Jul 06 22:09:20 I've been in that sittuation recently, what I did was add up the final paths of the images to an array of Strings, and when the size of that array reached the number of images I was expecting to have downloaded, I moved on to the final action that happens when the downloads are done Jul 06 22:09:40 Hi, what's the verdict on RoboVM is it any good? Can I develop credible apps with it? Jul 06 22:10:51 The size of the String array will vary. between 0 -3 will that sitll work? Jul 06 22:11:32 I am also calling the AsyncTask multiple times depending on the number of uploads (0-3) Jul 06 22:11:35 Wait, am I actually supposed to set my Toolbar as my ActionBar, or is that just legacy support? Jul 06 22:12:16 why is it that once i set an onTouchListener in getView of a grid view all of a sudden android:listSelector="@drawable/circle" dosent work at all Jul 06 22:12:35 then i take out onTouch and it works Jul 06 22:12:50 Binero: if you want to call anything like getSupportActionBar()..... then you need to set it first Jul 06 22:13:29 I think I got IT http://stackoverflow.com/questions/14912826/asynctask-not-working-correctly-when-executed-from-within-an-setonclicklistener Jul 06 22:13:36 does that look like a possible answer? Jul 06 22:14:26 Oh.... in the answer doesn't seem to work. Jul 06 22:14:32 You can run the AsnycTask from the listener Jul 06 22:14:47 Seems to explain what I'm experiencing though. Jul 06 22:15:19 Maybe you can pass your array in so that you don't have to loop and create multiple asynctasks Jul 06 22:16:06 And then process the rest of what you need to do in postExecute Jul 06 22:16:34 NateRiver: try returning true from onTouchListener Jul 06 22:16:35 hmm Jul 06 22:16:42 icedp So it's just a convenience thing? Jul 06 22:16:45 NateRiver: correction. try false Jul 06 22:17:00 barq, Ok let me try that. Jul 06 22:17:08 Thanks Jul 06 22:17:22 then you limit to over zero and below 3 Jul 06 22:17:30 umm, no Jul 06 22:17:43 you'll end up only reaching 1 download then Jul 06 22:20:43 icedp that makes it select like i wanted, but really fucks it up in other ways Jul 06 22:20:44 Binero: why convenience? there is no another way if you need some support actionbar behaviour Jul 06 22:20:59 NateRiver: in what ways?) Jul 06 22:21:08 icedp Just put the toolbar at the top? Jul 06 22:21:27 Binero: what? Jul 06 22:21:42 That basically makes it an ActioBar, no? Jul 06 22:22:27 icedp now the ActionDown ActionUP dosent work, like ACTIONUP used to stop the musicPlayer, now it just keeps going and music players stack on top of each other even though the playMusic method nulls it Jul 06 22:23:25 isnt there just some method to select it? setSelected and setActivated dont work Jul 06 22:23:58 NateRiver: ACTION_UP doesn't work how Jul 06 22:24:07 Binero, no. just putting it at top does not make it native Jul 06 22:24:26 What does "make it native" mean? Jul 06 22:24:31 ie if you want to add menu items, you need to set it as actionbar Jul 06 22:24:41 Binero: it sets a Toolbar as an ActionBar exactly as it says Jul 06 22:24:58 Yeah Jul 06 22:24:59 in onCreateOptionsMenu you can set menu items Jul 06 22:25:04 they will go to actionbar Jul 06 22:25:08 So what's the difference with putting it on top and adding the controls? Jul 06 22:25:11 but you need to set it first Jul 06 22:25:15 yeah Jul 06 22:25:16 also stuff like title Jul 06 22:25:19 So just a convenience? Jul 06 22:25:20 icedp when it was set to true you could hold it down and the music would start to play.. then the moment you take finger off the music stopped. now if you just tap it the music starts to play and dosent stop Jul 06 22:25:21 or back button Jul 06 22:25:23 no Jul 06 22:25:39 but you can do all those things in a toolbar can't you? Jul 06 22:25:58 with this interpretation also fragments are just convenience Jul 06 22:26:04 and the whole toolbar implementation too Jul 06 22:26:11 I suppose Jul 06 22:26:12 because you could also write all this stuff by hand Jul 06 22:26:15 in 100k lines Jul 06 22:26:38 Well it won't be 100k lines Jul 06 22:26:44 I have sub-toolbars in cards and they took like 5 lines Jul 06 22:26:46 you are right. way more Jul 06 22:27:04 can't be that much effort to add a menu to it Jul 06 22:27:13 or is it? Jul 06 22:28:03 actionbar is more than menu Jul 06 22:28:52 it's an icon and a title and a menu Jul 06 22:29:00 oh Jul 06 22:29:03 NateRiver: you may try setActivated. I don't remember Jul 06 22:29:14 is the tabs thing a ActionBar only thing? Jul 06 22:29:25 Wait no that was deprecated Jul 06 22:30:07 danijoo i thought you were retiring for the night D: Jul 06 22:30:18 can't get enough can you Jul 06 22:30:22 NateRiver: and in xml you should have a selector with android:state_activated="true" Jul 06 22:30:25 NateRiver: should work then Jul 06 22:30:35 g00s, yes. that was before I realized I have a kolloquium tomorrow morning :D Jul 06 22:30:53 now the plan changes into learning all night :p Jul 06 22:31:21 colloquium it is in english i guess Jul 06 22:31:31 or examination Jul 06 22:31:55 danijoo what subject ? Jul 06 22:32:30 Scanning tunneling microscopy Jul 06 22:33:16 ugly quantum mechanics theory :-! Jul 06 22:33:40 oh my Jul 06 22:34:34 sounds more interesting than toolbars :) Jul 06 22:34:51 true. but toolbars are definitly easier to explain :p Jul 06 22:35:02 are you sure :P Jul 06 22:35:14 depends on the listener maybe Jul 06 22:35:58 relativistic theory is not applicable to android framework, it is the realm of quantum effects. now that makes sense then Jul 06 22:36:17 but since the script is 32 pages of formulars, im pretty sure toolbars are eaiser ;p Jul 06 22:37:00 danijoo this was a few days ago https://news.ycombinator.com/item?id=9801904 Jul 06 22:37:11 icedp, schroedingers app. before you start it, its working and crashing at the same time ? :P Jul 06 22:37:41 g00s, i like the title: "Experiment confirms quantum theory weirdness" Jul 06 22:37:43 danijoo: yep, it works on your device and crashes on that rooted Chinese copy of Samssung Jul 06 22:37:49 thats should be the title of a book Jul 06 22:37:58 icedp, hehe Jul 06 22:38:24 i dont understand half of that Quantum stuff Jul 06 22:38:40 but i think that goes for nearly everyone so im fine Jul 06 22:39:00 hmm Jul 06 22:39:25 The Android Studio Navigation View example crashes saying a fragment cannot be cast to a View Jul 06 22:39:32 and the traceback is just some Android internal code Jul 06 22:40:48 danijoo: rephrasing, if you understand Activity/Fragment lifecycles you don't really understand it Jul 06 22:41:52 nobody understands fragment lifecycle Jul 06 22:41:56 _noone_ Jul 06 22:42:21 you can only learn to deal with it in some way :p Jul 06 22:42:22 its like microsoft COM, only a few people really knew that :P Jul 06 22:42:40 don box and 5 other people Jul 06 22:42:50 its like the einstein quote about relativity Jul 06 22:44:15 where he gets told only 3 people understand his theory and he responds "whos the third"? Jul 06 22:46:19 i got BB84 protocol in a cursus and at an exam when i was a student at uni Jul 06 22:46:52 stop saying noone understand quantum thing, there are many stuff which anyone can grasp Jul 06 22:46:55 :) Jul 06 22:47:18 and this schrödinger cat metaphor is overrated and overused making it not anymore so fun ;) Jul 06 22:47:53 also one of the schor algo is in fact a poem Jul 06 22:48:07 Shor* Jul 06 22:48:17 understanding many of it doesnt mean understanding it ;) Jul 06 22:48:56 http://www-math.mit.edu/~shor/notapoet.html :D Jul 06 22:49:08 i meant, one of the shor poem is an algo, of course :p Jul 06 22:49:18 in chemistry we cant even solve quantum mechanical euqations for more than a hydrogen atom Jul 06 22:49:47 oh yeah, it's an enormous field Jul 06 22:50:31 fascinating topic though Jul 06 22:50:35 totally Jul 06 22:50:51 as long as you dont have to calculate stuff with it (i hopefully never have to after my studies lol ) Jul 06 22:52:34 https://developer.android.com/index.html#q=quantum 2 results, no occurence Jul 06 22:53:02 it's like play store search, where is the google search engine when we need it lol Jul 06 22:53:20 second recult is in Random class Jul 06 22:53:21 :D Jul 06 22:53:25 result* Jul 06 22:53:31 yeah but ctrl-f reveals nothinig Jul 06 22:53:33 -i Jul 06 22:53:38 wonder how they got be indexed lol Jul 06 22:53:42 maybe another google trolling Jul 06 22:53:48 :) Jul 06 22:53:53 everthing has random as last result :p Jul 06 22:54:28 "SPONSORED BY CONOCOPHILLIPS Something to Take Seriously: Revoke the Ban on Crude Oil Exports" ... so the Koch brothers are advertising on phandroid now? wtf Jul 06 22:54:37 maybe quantum computer smartphones in year 2100 Lo Jul 06 22:55:21 shouldnt there be a method to call on a view that says "hey select this item in the gridView" Jul 06 22:55:22 who are koch brothers? Jul 06 22:55:34 nvm. googled Jul 06 22:55:38 i had to google it too, not famous in europe Jul 06 22:55:44 yeah Jul 06 22:55:56 in german we just call those "evil americans" Jul 06 22:56:03 ahahah Jul 06 22:56:13 oh man, what a circus recently with the greece Jul 06 22:56:25 true Jul 06 22:56:28 g00s, did you hear about the greece referendum and stuff in US? Jul 06 22:56:34 a lot of errors have been made on both sides though Jul 06 22:56:40 BOTH Jul 06 22:57:07 adq, where are you from? Jul 06 22:57:13 adq only superficially - i guess they are saying no to austerity Jul 06 22:57:21 your neighbor danijoo, france Jul 06 22:57:38 ah :) i've been there on new years eve Jul 06 22:57:42 in disney land :p Jul 06 22:57:42 g00s, here it was all the day, the only news Jul 06 22:57:52 all the weekend too Jul 06 22:58:13 danijoo, i've been in germany few times too :) really enjoyed oktoberfest Jul 06 22:58:22 i'm not really familiar with their predicament, sounds bad though Jul 06 22:58:29 it's complicated Jul 06 22:58:31 we have enough problems in the US to worry me :) Jul 06 22:58:31 as always Jul 06 22:58:42 eheh enjoy hillary bush trump etc Jul 06 22:59:03 i like bernie so far Jul 06 22:59:09 yeah its a circus Jul 06 22:59:24 damn, i also have to google Jul 06 22:59:44 I heard about vermine supreme at least Jul 06 23:00:19 what i find interesting though, is when governors announce they are running for president - but you look at the states they come from, and they are in financial ruin Jul 06 23:00:33 its like, wtf - you failed and you are running for president Jul 06 23:00:56 g00s dont you know financial ruin is the new economic oppurtunity? Jul 06 23:01:01 ahah same scheme everywhere.. wait it's not funny s/ahah// Jul 06 23:02:02 lasserix, tell that greece :D Jul 06 23:04:31 I'm guessing you've all seen this: http://www.reddit.com/r/announcements/comments/3cbo4m/we_apologize/ Jul 06 23:04:57 danijoo: why do you suppose land developers salivate when a massive hurricane comes through? Jul 06 23:05:02 no - it doesn't matter what happens, in a few weeks everyone will have forgotten :) Jul 06 23:05:13 just eyeing greece seeing how far they can push them into austerity measures after they lose Jul 06 23:06:02 TacticalJoke, did not, should i upvote or downvote ? :D Jul 06 23:06:08 you could say countries like germany destroyed greece. I totally understand they said "no" Jul 06 23:06:34 https://www.indiegogo.com/projects/greek-bailout-fund?#/story Jul 06 23:06:39 old Jul 06 23:07:10 relevant :P Jul 06 23:07:14 TacticalJoke, just a big "sorry but please shut up now" Jul 06 23:07:24 "it will get better soon (tm)" Jul 06 23:07:40 RIght. Jul 06 23:07:42 Right* Jul 06 23:07:50 No mention of the admins shadow-banning people for questionable reasons. Jul 06 23:08:07 TacticalJoke what is shadow banning ? Jul 06 23:08:29 Something I sometimes wish existed on irc :) Jul 06 23:08:33 Banning someone in such a way that they don't realise they're banned (their comments still show to them only). Jul 06 23:08:47 There was a guy who was shadow-banned for three years without realising it. lol Jul 06 23:08:48 i never knew reddit could do that Jul 06 23:09:01 that's evil Jul 06 23:09:03 I heard it was intended to be used against spammers, but some admins have been using it for other stuff. Jul 06 23:09:05 Ncxp, what happens if the target is met. does the 1600.000.000 EUR go to Thom Feeney and he needs to wire it toi greece ? :D Jul 06 23:09:17 I have an acitivity. on Restart, it does a short animation. The problem I'm having is when I restart from the app launcher, the animation is happening before the view is visibile. What's the best approach to knowing when the view has become visible on restart? Jul 06 23:09:49 TacticalJoke: umm from that list is any of that applicable? Jul 06 23:09:52 dcorbin_, should be visivle after onStart Jul 06 23:09:56 I thought people were pissed of censorship or something? Jul 06 23:10:04 oh it does CedricBeust, starting from /msg ChanServ QUIET #android-dev *!*@*somehost* to freenode staf operserv commands ;) Jul 06 23:10:21 oh didn't know about that, thanks Jul 06 23:10:23 dont show him adq. :D Jul 06 23:10:24 danijoo, lol didn't think about that. Jul 06 23:10:29 i pointed out a bot last time, no one took action by the way Jul 06 23:10:36 despite the topic is clear about bot and public log Jul 06 23:10:36 danijoo: I don't think onStart is being called in this case. Jul 06 23:10:39 lasserix: How do yo umean? Jul 06 23:10:41 you mean* Jul 06 23:10:49 adq: Was there a bot here? Jul 06 23:10:55 here Jul 06 23:10:59 there have been a few Jul 06 23:11:00 Ncxp, i wonder what the interest is if you leave that money on your account for.. lets say a month Jul 06 23:11:09 ^^ Jul 06 23:11:11 Is the bot still here? Jul 06 23:11:13 if you do a quick google search, you will see an almost live stream of this chan Jul 06 23:11:36 and you can find it by intersecting nicks in other channel it logs and are also visible in their repo Jul 06 23:11:40 could be everyone with a bouncer :/ Jul 06 23:11:47 still it's public log danijoo Jul 06 23:11:49 danijoo, denpends on the coupon Jul 06 23:11:56 depends* Jul 06 23:11:56 Yeah preventing logging is not easy Jul 06 23:12:03 yeah Jul 06 23:12:06 dcorbin_: Why is onStart not being called? What is the scenario you're talking about? Jul 06 23:12:15 Ncxp, but I like those ideas. if we would just all come togehter this world would be so much better :) Jul 06 23:12:50 or germany buy greece on ebay :D Jul 06 23:13:07 I launch the app. I then return the app launcher, and select the app again. Jul 06 23:13:17 Ncxp, "we" are earning way to much from the greece bankrupt Jul 06 23:13:22 (the first one is fine) Jul 06 23:13:22 why really help them :/ Jul 06 23:14:36 onStart and onResume should be happening every time you see the Activity once again. Jul 06 23:14:37 CedricBeust, http://logs.nslu2-linux.org/livelogs/ here the culprit Jul 06 23:15:00 i did not intersect it myself, but i'm sure by taking all nicks in all chan in this repo, it's easy to find it Jul 06 23:15:11 TacticalJoke: ok. I'll revisit it and double-check. Thanks Jul 06 23:15:14 and as you said, it's not easy to prevent logging Jul 06 23:15:24 one would need to check which nick sits in all those channels Jul 06 23:15:37 It's probably easiest to just say `Log.e("dcorbin_", "onStart");`, etc. (I like Log.e because it's so red. :D) Jul 06 23:15:44 dcorbin_: are you sure this happens if the app is not running and you push from android studio? Jul 06 23:15:45 just a few should be enough, cause the proba to have someone in all thse chans is low Jul 06 23:15:48 and they could even use one acc per channel and you couldnt prevent it at all Jul 06 23:15:48 danijoo Who earns from the Greece bankruptcy? Jul 06 23:15:58 Binero, germany for example Jul 06 23:15:59 ah indeed danijoo Jul 06 23:16:07 danijoo They will never see their money back Jul 06 23:16:39 Binero, who cares. theres more than credits Jul 06 23:16:58 for example: the last credit we gave was something like 125 mrd Jul 06 23:17:11 How exactly does Germany make money of this? Jul 06 23:17:31 we are paying 80 mrd less in interests each year because greece got downrated in interest ratings Jul 06 23:17:49 the national economy of greece is broken because everybody want to save money, but the national economy relies on consumption. And i think you have to push this cycle with alot of money to get consumption going. Am I right? Jul 06 23:17:53 CedricBeust: adq how about nslu2-log Jul 06 23:18:03 The predicted cost for Germany is 80 billion toug Jul 06 23:18:06 lol pretty obvious ;) Jul 06 23:18:07 *though **** ENDING LOGGING AT Mon Jul 06 23:18:17 2015