**** BEGIN LOGGING AT Thu Oct 13 02:59:59 2016 Oct 13 03:57:35 zinx, circular references are not a memory leak and not at all important in itself Oct 13 04:14:54 $ sudo apt-get remove byobu hollywood Oct 13 04:14:59 oops wrong terminal Oct 13 04:16:24 coworker was just showing me this awful thing... Oct 13 04:16:58 it like "hollywoodizes" your terminal, and plays mission impossible music to boot. Oct 13 04:17:27 briefly considered running it while non-technical staff are in here just to see if they think its real. Oct 13 04:20:56 hi guys, got a question about timing issues. i'm storing one of the menu items as a class field from onCreateOptionsMenu(). but in onCreate() i call an async method, and the result of that dictates whether i should make the visibility true or false on said menu item. Oct 13 04:21:05 what is the best way for me to approach this? Oct 13 04:21:35 what i'm finding now is that there's no guarantee the menu item will be inflated before the async method finishes Oct 13 04:25:00 you know that there are protected methods in the AsyncTask class onPreExecute() and onPostExecute() yeah? Oct 13 04:30:17 it's not an AsyncTask, it's just some async callback happening in a third party library Oct 13 04:30:31 well it may be an AsyncTask in the background somewhere, but that's not exposed to me Oct 13 04:39:39 mmm... and you can't just check to ensure that a needed view is not null before setting visibility on it? Oct 13 04:40:21 i could do that, but once it becomes available (not null) i'd need to find a way to have it update the visibility immediately Oct 13 04:41:14 i guess the best thing to do is just add the async call in onCreateOptionsMenu Oct 13 04:41:27 then i know that it won't be null Oct 13 07:41:37 morning all Oct 13 07:51:45 thepoosh: morning poosh Oct 13 07:52:34 sup Melatonina Oct 13 08:03:15 Today is time to connect my application to my web API through SignalR so that I can dispatch real-time updates! Oct 13 08:18:51 Hi Oct 13 08:19:17 I need some help with my android layout, regarding the design of the navigation bar Oct 13 08:20:35 I am using android studio and I've created an activity with a navigation bar, but I have a problem, I dont want the navigation bar to be under the translucent status bar, instead the status bar should I have a uniform color through out Oct 13 08:20:47 Can anyone help me with that? Oct 13 08:24:47 Areeb: you can set the statusbar colot Oct 13 08:24:51 but why? Oct 13 08:39:40 bokrer thepoosh Oct 13 08:40:12 * thepoosh prays for raoul11 Oct 13 08:42:37 hi buddy Oct 13 08:42:41 how was the tzom Oct 13 08:42:47 mmmmkay Oct 13 08:43:47 thepoosh: https://scontent.fsdv1-1.fna.fbcdn.net/v/t1.0-0/p480x480/14590363_645349805625475_2107267703389280507_n.jpg?oh=46c88dc978a2e3fece6ebe12ecdbb2df&oe=586C8136 Oct 13 08:44:01 HA! Oct 13 08:44:19 that is the wrong yalmaka though Oct 13 08:44:28 should be more of a white silk one Oct 13 08:56:37 thepoosh: admob is a joke Oct 13 08:56:49 takes about 3-5 seconds to load Oct 13 08:58:14 raoul11: have you tried admob in firebase? Oct 13 08:58:29 yes Oct 13 08:58:46 it just loads slow, comparred to other 3rd party providers Oct 13 08:58:59 maybe you can do preload? Oct 13 08:59:16 also, try here: https://firebase-community.slack.com Oct 13 09:00:43 ill just put it on the backstack of the providers, if others fail to retrieve an ad Oct 13 09:02:45 Is there a way to get 180 degree rotation working on Android N? Oct 13 09:08:09 Tools: you're gonna have to use more words for this question Oct 13 09:09:37 Well, Android can rotate to the landscape 90/270 degrees, but I can't use the device upside down. In M I had an option to enable 180 degree rotation (might have been because of custom rom, but I can't say for sure, as I never really ran stock..) Oct 13 10:34:34 do you guys also have 10,000 adapters for every kind of datatype you feed into lists? Oct 13 10:34:40 it's a fucking mess really Oct 13 10:41:24 Odaym, how would you do it Oct 13 10:41:45 I don't know Oct 13 10:41:52 do you have what I mentioned? Oct 13 10:42:15 to a degree I suppose, but I've never seen it as a problem Oct 13 10:42:16 there's no other way, otherwise you have to have an adapter that accepts T, and inside you clusterfuck them in a switch and....just no Oct 13 10:42:41 you could write data-adapters :) Oct 13 10:42:55 what's that Oct 13 10:43:21 like if you want to display multiple types of data in the same kind of list, it'd be quite simple to write a wrapping interface Oct 13 10:44:26 Hey Oct 13 10:44:34 Can a view class consist of multiple elements? Oct 13 10:44:46 elements? Oct 13 10:44:47 I'm thinking of putting all my camera UI elements in a custom view class but not sure if that's good Oct 13 10:44:52 multiple widgets sorry Oct 13 10:44:55 yes Oct 13 10:45:00 ViewGroup specifically Oct 13 10:45:11 some people advocate that instead of using fragments Oct 13 10:45:17 never extended View before so i'm not 100% sure what i'm doing, but I basically want to extend SurfaceView Oct 13 10:45:42 would it be fine to have all my camera functionality (such as start/stop recording) in my view class Oct 13 10:47:06 what would you add to SurfaceView? Oct 13 10:47:20 MediaRecorder functionality primarily Oct 13 10:47:23 a record/stop button Oct 13 10:47:24 if you want buttons in it, you'll want some sort of ViewGroup instead of View Oct 13 10:47:35 which I'm pretty sure SurfaceView isn't Oct 13 10:47:45 Hmm okay Oct 13 10:47:53 so you'd extend a ViewGroup (like framelayout) and add the surfaceview into it Oct 13 10:47:56 and the buttons and stuff Oct 13 10:48:06 but to be honest, why not just build a fragment out of it Oct 13 10:48:20 I mean i'm not sure what the best approach is Oct 13 10:48:27 I've never made a custom view Oct 13 10:48:34 I want to extend JavaCameraView, which is actually a subclass of SurfaceView Oct 13 10:48:35 like ever Oct 13 10:48:42 and I need to access one of its protected variables Oct 13 10:48:48 so I figured i'd have to subclass it Oct 13 10:49:32 since SurfaceView isn't a ViewGroup, you can't do what you want with just extending it, you'll need a ViewGroup Oct 13 10:49:47 so you'd end up extending the JavaCameraView and a ViewGroup Oct 13 10:50:00 Hmm Oct 13 10:50:11 but what's the ultimate purpose here? Oct 13 10:50:22 custom camera Oct 13 10:50:37 A camera app that uses opencv - JavaCameraView is an opencv class Oct 13 10:50:54 and using OpenCV I can't declare my own camera using the camera class Oct 13 10:50:59 JavaCameraView does it for me Oct 13 10:51:22 I can declare a JavaCameraView in the layout, but that doesn't give me access to the camera variable Oct 13 10:51:44 Hi, i am trying to set up a fragment view. I used the android studio generator to create a FramentList. Now i have the problem that i always get this error message: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v7.widget.RecyclerView$ViewHolder.shouldIgnore()' on a null object reference Oct 13 10:52:05 it should Oct 13 10:52:08 So far i found out that i need to give recyclerView a final LinearLayoutManager but i already did that Oct 13 10:52:08 what do you want to do with the camera variable? Oct 13 10:52:26 I want to be able to set its profile and record using MediaRecorder Oct 13 10:52:52 don't the docs mention it? Oct 13 10:52:59 for example - mMediaRecorder.setCamera(mCamera); Oct 13 10:53:20 but I can't pass mCamera in as a parameter because it's protected Oct 13 10:53:30 no, the docs are poor for opencv4android Oct 13 10:54:12 https://github.com/opencv/opencv/blob/master/modules/java/generator/src/java/android%2BJavaCameraView.java Oct 13 10:54:26 they're still at Eclipse too Oct 13 10:54:34 Exactly lol Oct 13 10:55:04 littered with e.printStackTraces :/ Oct 13 10:55:42 Man i dunno what to do Oct 13 10:55:53 I guess extending it is the only option Oct 13 10:55:58 just try it Oct 13 10:56:09 no need for expressing how lost things are Oct 13 10:56:10 :P Oct 13 10:56:21 Doing some reading, have never extended view before Oct 13 10:56:41 Is it best to move my camera functionality all to another class then? Oct 13 10:57:26 I'd probably write my own camera + mediarecorder + opencv integration Oct 13 10:59:11 holy crap yeah Oct 13 10:59:14 that code is bad Oct 13 10:59:22 https://github.com/opencv/opencv/blob/master/modules/java/generator/src/java/android+CameraBridgeViewBase.java#L357 Oct 13 10:59:30 why the hell would you put this crap in a library Oct 13 10:59:41 No idea Oct 13 10:59:52 "sorry, no camera, finish activity!" Oct 13 11:00:32 I have literally no clue what the best approach would be for this :D Oct 13 11:00:48 just start writing a camera application Oct 13 11:00:55 integrate with opencv after Oct 13 11:01:00 I have my camera app Oct 13 11:01:04 foget about the camerabridgething Oct 13 11:01:07 integrating is what i'm doing now Oct 13 11:02:09 look at the source code for javacameraview (and others related) and figure out how to bypass it and just give the stuff to opencv instead Oct 13 11:02:58 I mean would it be stupid to change the protected field to public? Oct 13 11:03:03 in JavaCameraView Oct 13 11:03:06 can anyone help me with this exception? java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.support.v7.widget.RecyclerView$ViewHolder.shouldIgnore()' on a null object reference Oct 13 11:03:21 Faizan, it'd be hard to catch it in the right moment when the camera is initialized Oct 13 11:03:27 since you don't get a callback to it Oct 13 11:03:45 Ah Oct 13 11:04:27 I think I'm just gonna start off with extending JavaCameraView, and adding that view to my xml file Oct 13 11:04:41 public static CameraView extends JavaCameraView { Oct 13 11:04:57 in my XML, that's possible right? Oct 13 11:05:06 just be aware that if there's no camera on the device, the javacameraview will take over and just make your application quit Oct 13 11:05:11 Faizan, yes Oct 13 11:05:12 yeah Oct 13 11:05:18 but I require a camera in my mainfest Oct 13 11:05:24 so that *shouldn't* happen Oct 13 11:05:37 depending on how good/bad their code is at releasing the camera Oct 13 11:06:05 I have some need for opencv in the (near?) future for my own project, but looking at this just makes me want to write the native interfaces myself Oct 13 11:06:25 :D Oct 13 11:08:38 but in general, there's not much to extending Views Oct 13 11:08:49 especially since you're already extending a specialized View Oct 13 11:09:09 just make sure you have the same constructors available Oct 13 11:27:24 Zharf: is that a requirement to subclassing? Oct 13 11:27:28 having the same constructors Oct 13 11:28:00 no, android requires you to have certain type of constructor if you want to use it from xml Oct 13 11:28:09 (the attributeset one) Oct 13 11:28:31 and you pretty much always need at least context with views Oct 13 11:28:54 right okay Oct 13 11:29:04 apparently I can't define any of my own constructors though Oct 13 11:30:02 (in a view class) Oct 13 11:44:32 Zharf: if I subclass JavaCameraView I should be able to access its protected methods right? Oct 13 11:44:37 seems like I still can't Oct 13 11:45:01 public class CameraView extends JavaCameraView { ... }, and then CameraView.mCamera .. Oct 13 11:45:13 just mCamera Oct 13 11:45:27 or CameraView.this.mCamera Oct 13 11:45:35 otherwise it's static Oct 13 11:45:44 or it would have to be static Oct 13 11:45:45 Faizan: accessing protected members is what inheritance is all about Oct 13 11:46:27 Zharf, CameraView.mCamera is being called in a different class Oct 13 11:46:35 thepoosh: exactly, I'm doing something wrong, just not sure what :D Oct 13 11:46:54 this.mCamera... meh Oct 13 11:47:04 if you're trying to change the Camera behaviour that is probably it Oct 13 11:47:10 dont protected variables break the encapsulation things in oop Oct 13 11:47:19 Ashiren, oop is overrated Oct 13 11:47:25 oop is op Oct 13 11:47:38 Faizan, what? what class? Oct 13 11:47:49 mVariable looks meh if it isnt the current class variable : Oct 13 11:47:52 :\ Oct 13 11:48:02 if it's not an inner class of CameraView then you can't access it Oct 13 11:48:16 I have my CameraView class that extends JavaCameraView, and then another class which does the actual recording (MediaRecorder functionality) Oct 13 11:48:46 you'll have to write an accessor Oct 13 11:48:52 okay Oct 13 11:48:54 (getter) Oct 13 11:48:55 simple enough Oct 13 11:48:56 yeah Oct 13 11:49:33 Faizan: what are you trying to do? Oct 13 11:50:11 Trying to access a protected variable in an OpenCV class, mainly mCamera of JavaCameraView Oct 13 11:51:11 why? Oct 13 11:51:26 the question is not how are you doing it, but what are you doing Oct 13 11:51:31 why do you need mCamera Oct 13 11:51:32 ? Oct 13 11:51:47 he wants to give it to a mediarecorder Oct 13 11:52:06 ^ Oct 13 11:52:27 Faizan: you can register to get the buffers directly from the camera Oct 13 11:52:40 and then use the buffer input instead Oct 13 11:53:01 brb Oct 13 11:53:11 Whaaat Oct 13 11:53:28 Zharf: I guess I would need to instantiate the CameraView class to access the getter Oct 13 11:54:49 but you have the instance in the xml? -.- Oct 13 11:56:31 Exactly Zharf Oct 13 11:56:33 i'm so confused Oct 13 11:56:37 with accessing this damn variable Oct 13 11:56:44 it won't make sense to instantiate CameraView again Oct 13 11:57:03 but I can't do getCameraView() because i'm accessing it in a static context Oct 13 11:57:11 or getCamera() rather Oct 13 11:59:43 why are you in a static context Oct 13 12:01:19 I'm not sure Oct 13 12:01:42 oh boy Oct 13 12:01:47 Ye Oct 13 12:01:48 I'm bad Oct 13 12:02:28 I was calling the accessor in a constructor Oct 13 12:03:14 that is a long talk :) Oct 13 12:08:33 this isn't fun] Oct 13 12:14:36 Faizan: did you get your frame index? Oct 13 12:14:49 Yeah Oct 13 12:15:00 But now I'm having other pains :D Oct 13 12:16:49 :) Oct 13 12:20:58 I'm soooo confused Oct 13 12:21:51 Anyone see anything in this LinearLayout that might prevent images from displaying properly on just some phones? http://pastebin.com/SsgsKi7q Oct 13 12:22:50 images aren't loading only on Galaxy Note 5... Have tested on S3, S4, S5, several HTC and Motorola models, in MANY Emulators.... Oct 13 12:23:09 I am trying to set setDisplayHomeAsUpEnabled to true on my ActionBar but i always get that error: Fragment de.familyfood.familyfood.FamilyFragment did not create a view. Oct 13 12:28:47 I think I am trying to display images that are too large Oct 13 12:33:08 you usually get a message when that's happening azv4 Oct 13 12:33:34 Odaym, I get no message, none of the folks on stackoverflow who have same issue report any messages... Oct 13 12:33:36 How can I access a non-static protected variable? I can't instantiate the class because it's a view so I already have an instance in the xml Oct 13 12:33:52 http://stackoverflow.com/questions/33204925/imageview-is-not-shown-in-nexus-5-android-6-0 Oct 13 12:39:21 hi Oct 13 12:39:49 Scaffold is 100% working! :D - Now to implement 100% test coverage ;) Oct 13 12:40:26 Where does screenshots from emulator end up? I never learn this.. Oct 13 12:47:56 Bernzel, the location is defined by you when you save the SS Oct 13 12:48:10 Hi Guys in line 53, function createVideoFromCursor, how do I implement that method get the cursor from sqlite? http://pastebin.com/xxNk7AYg Oct 13 12:48:35 azv4, yeah noticed that when I used the screenshot function from logcat. Used the one on the emulator first Oct 13 12:48:53 ahh, do they both seem to save to the same path? Oct 13 12:56:43 why is startActivityForResult 2x-3x slower to start an activity than startActivity? Oct 13 13:01:25 bolovanos_: Just use Intent and pass data it extra Oct 13 13:04:35 can anybody translate what Alec's said? Oct 13 13:06:52 he means that if you dont need an onActivityResponse just use startActivity and bundle an intent Oct 13 13:07:00 but i assume you need that response. Oct 13 13:07:05 yes I do :/ Oct 13 13:07:20 really the ForResults is slower() Oct 13 13:07:20 when life give you lemons Oct 13 13:07:22 :? Oct 13 13:08:10 - startActivity Oct 13 13:08:10 10-13 09:05:23.734 - 10-13 09:05:24.251 Oct 13 13:08:10 - startActivityForResult Oct 13 13:08:10 10-13 09:06:37.843 - 10-13 09:06:43.290 Oct 13 13:09:26 i guess you can pass intents back and forth like alec suggested Oct 13 13:09:38 containing those results, and reading them on onResume Oct 13 13:11:12 I need only one thing - info that some activity has ended Oct 13 13:12:20 oO Oct 13 13:12:45 you must be doing something _very_ wrong to get more than 5 seconds with startActivityForResult Oct 13 13:13:04 you should profile, measure and find the cause, this is not normal Oct 13 13:14:21 how much can you mess startActivityForResult? you pass an intent and a request code Oct 13 13:15:01 yes that interest me too Oct 13 13:19:14 adq, any glimps what could be in mess when the only thing changed is the way intent starts? Oct 13 13:19:34 you have to figure it out yourself Oct 13 13:20:31 any idea why i get this: Oct 13 13:20:32 [javac] error: Source option 1.5 is no longer supported. Use 1.6 or later Oct 13 13:21:03 I am using openjdk-9-jre Oct 13 13:21:09 on Ubuntu 16.04 Oct 13 13:21:18 i don't see where i specify anything anywhere Oct 13 13:21:47 please, i really need help Oct 13 13:25:24 go to file/other settings/default settings /build & execution / compiler / java compiler Oct 13 13:26:00 and see if you can override jdk's default Oct 13 13:36:24 i have a recyclerview using a gridlayout manager, does anyone know how to make the elements properly fit? right now it looks like this: https://a.pomf.cat/fqrixo.png Oct 13 13:37:35 the imageview has these properties, http://pastebin.com/WmF84mdF Oct 13 13:39:09 hi Oct 13 13:39:21 can anyone help me with cmake not finding imported library? Oct 13 13:39:54 hey guys Oct 13 13:40:05 you ever done UI tests with Espresso Test Recorder? Oct 13 13:40:11 yes Oct 13 13:40:19 they're usually hooked up to 1 activity with the activityTestRule Oct 13 13:40:20 KukOrkan, you need to search for itemdecoration to space your column/row evenly Oct 13 13:40:39 and if you keep pressing on things beyond that first activity that launched, the test will fail because the views were not found in that initial activity Oct 13 13:40:45 they exist in subsequent activities that you clicked through Oct 13 13:40:57 how can I specify in the test where it should be looking for each of the elements? Oct 13 13:44:15 any idea? Oct 13 13:46:53 yea I guessed it Oct 13 13:47:05 no one is testing shit? :) Oct 13 13:47:21 you have to findViewById manually from each of those activityRules and feed that view to the assertions and whatnots Oct 13 13:47:38 yea i know but I got a Google Cloud Test Lab account for free Oct 13 13:47:42 wanted to see Oct 13 13:47:44 pretty neat too Oct 13 13:49:45 i should try that Oct 13 13:55:54 im going to make a video about it soon Oct 13 13:56:04 too easy not to make a video about it Oct 13 13:56:06 :P Oct 13 13:56:24 fixed my issue, all i had to do was add android:adjustViewBounds="true" Oct 13 13:56:34 didn't need to use itemdecoration Oct 13 13:58:28 Is there a way to track when other apps use my apps intents? Oct 13 13:59:09 Do I know from which app my app was started? Oct 13 13:59:25 To be able to handle the intent and send an event to the analytics engine ? Oct 13 14:15:15 ok :) Oct 13 14:15:24 you don't have to match the views yourself Oct 13 14:15:40 you just have to add the corresponding activityTestRule class of each of the activities that your test went through Oct 13 14:15:44 and espresso will handle the rest Oct 13 14:15:48 amazing Oct 13 14:24:12 ok, its not that simple Oct 13 14:24:15 clusterfucked Oct 13 14:37:14 anybody with even limited opencv4android knowledge at all? Oct 13 14:37:42 When trying to test my apk on an emulator: Requires development platform but this is a release platform Oct 13 14:37:59 any ideas why my emulator is thought to be a development platform? Oct 13 14:46:37 Faizan: I thought you were the opencv4android expert here :) Oct 13 14:46:46 Expert? Oct 13 14:46:46 ha Oct 13 14:47:03 not even an opencv4android amateur Oct 13 15:01:29 Sooo, I've been using List> to manage multiple references, and apparently I should've been using WeakHashMap> ? Oct 13 15:02:50 Not the biggest issue (pun intended) since the only thing being retained is the WeakReference objects themselves Oct 13 15:03:04 but probably best not to leave them hanging around Oct 13 15:11:05 yiati one thing if you are designing a library, and being proactively defensive for your users - but in your own code, thats a stinky smell Oct 13 15:11:34 g00s: yep, designing a library Oct 13 15:12:47 reto meier tweets "I imagine no screens or keyboards. Smart, cloud connected devices we talk to conversationally. " <-- i think his utopia sounds creepy Oct 13 15:14:21 Yet in many ways we live in the world described in Fahrenheit 451 which was described as creepy back then :) Oct 13 15:17:13 g00s: in reference to designing a library and retaining a list/set/map of listeners would a WeakHashMap be the route you would go? or is there something else I should consider? Oct 13 15:19:09 g00s: what's creepy? Do you still want to type text on smartphone's soft keyboards? That's creepy Oct 13 15:20:16 it will all be dystopia anyway Oct 13 15:21:16 g00s: actually conversational interfaces will have limited usage in future, as we will probably use direct BCI (Brain-Computer Interfaces) in lots of cases. Even for entering text Oct 13 15:22:43 g00s: and screenless it's because of these http://www.pocket-lint.com/news/137239-samsung-contact-lens-displays-will-put-ar-video-and-cameras-in-your-eyes Oct 13 15:23:03 ...at least until your eyes burst into flames. Oct 13 15:23:11 Dagmar: :D Oct 13 15:23:21 that's why I referred to smartphones and tablet as temporary and immature technology Oct 13 15:24:12 I look forward to the day that not only can I show someone That Which Can Not Be Unseen, but also make it impossible for them to stop seeing it without taking out their contact lenses. Oct 13 15:24:41 until they uninstall your app Oct 13 15:42:30 Hi, my app is creating some 18MB of "Cache data" on application start - however i dont know why, i never used any cache folder manually. Any idea what could cause this? Oct 13 15:42:41 Are there things which are being automatically cached by android? Oct 13 15:44:48 open your data directory and check? Oct 13 15:45:08 g00s: So adding a removeListener obviously solves the issue for a List>, as long as they call it Oct 13 15:45:44 But I guess WeakHashMap> is still preferable as you said to be proactively defensive Oct 13 15:46:14 no call to removeListener will still suffer GC pauses, but at least it won't crash with OOM Oct 13 15:46:29 Always preferable for them to call removeListener for it be buttery smooth though Oct 13 15:48:32 lots of things can cause it Oct 13 15:48:44 dexopt, oat, native libraries, etc. Oct 13 15:48:57 how do you detect potential leaking yiati? leak-canary? allocation tracking? Oct 13 15:49:14 adq: LeakCanary is definitely sweet, I use it for all my apps Oct 13 15:49:32 yup, i use both of the two examples i cited above too Oct 13 15:49:38 hmm, have a bug where an ImageView is failing to display on Note 5, but works in emu and every test env, found some stackexchange people that said too large images dont scale on some newer devices very well, checked, images are only 112x112.... Running out of ideas here! Oct 13 15:49:52 I used to go through heapdumps, but that was no fun :( Oct 13 15:49:58 Stil do if I need to Oct 13 15:50:02 but it's still no fun Oct 13 15:50:08 man, google still hasn't published 2.2.0 and dependencies to central yet Oct 13 15:50:13 lol pfn Oct 13 15:50:25 adq: Crashlytics for live code is super helpful too Oct 13 15:50:30 * pfn shrugs Oct 13 15:50:31 i use it too Oct 13 15:50:38 I fat-jar'd uast into my app Oct 13 15:50:47 i was just curious yiati, if you used something else to detect leak Oct 13 15:50:53 since you seem to focus on that Oct 13 15:51:18 Just been stress testing edge cases recently Oct 13 15:51:37 but yeah I don't know of anything other than hprof and leakcanary Oct 13 15:52:20 But honestly I've just been writing single file Java programs and pumping them full of data till they either die of OOM or continue on buttery smooth forever Oct 13 15:52:29 so I guess that's mostly what I've been doing Oct 13 15:52:48 Really just basic Java stuff, but it's nice to reconfirm Oct 13 15:53:16 well, just to clarify few things like when you said " no call to removeListener will still suffer GC pauses" Oct 13 15:53:42 weakhashmaps are relatively eager Oct 13 15:53:43 GC pause will vary a lot depending on the android version, since they changed JIT, art, etc and it has not really much things to do with leaking Oct 13 15:53:48 yiati also, if somebody uses an anonymous inner class for their listener, and you register it as a WeakReference i think thats a problem too Oct 13 15:53:51 gc pauses don't really occur when cleaning out weakreferences Oct 13 15:54:00 because even if you remove a listener, set it to null, gc might be triggered Oct 13 15:54:04 adq: Logging with System.out.println() in my single file Java program, and you can see at very consistent intervals the console pauses :) Oct 13 15:54:05 and it might pause Oct 13 15:54:16 setting to "null" is irrelevant to gc Oct 13 15:54:19 yep Oct 13 15:54:20 pfn: yeah guess it's not the cleaning out weakrefs Oct 13 15:54:22 gc will operate regardless of whether you null something out Oct 13 15:55:00 no pauses when I null out weakreference objects Oct 13 15:55:12 yiati, avoid using logging facility to get those things Oct 13 15:55:14 always profile Oct 13 15:55:17 gc pauses only occur on full gc Oct 13 15:55:29 even if the order is big, like few ms or seconds Oct 13 15:55:50 pfn: hmm yeah maybe I'm not 100% understanding but I was guess that those pauses were the heap getting full and the JVM trying to allocate more memory Oct 13 15:55:52 FedEx & UPS "will only take devices that have been packed into special boxes" and ground only Oct 13 15:55:57 s/guess/guessing/ Oct 13 15:55:59 (note 7 returns) Oct 13 15:56:10 yes, gc pauses occur when you go oom, and the gc needs to clear the world Oct 13 15:56:14 i 'm tired of those stories g00s Oct 13 15:56:26 you get a higher probability to die in your car while bringing back your note 7 Oct 13 15:56:35 pfn: Okay, yeah cool, that's what I'm seeing. Oct 13 15:56:38 and a note 7 explosion is not even lethal Oct 13 15:56:52 i'm so sick of that story lol Oct 13 15:57:17 ImageView displays on a wide range of test emu and phones, same ImageView (showing a 112x112 pixel bmp) won't display on Galaxy Note 5.... Anyone know what direction I turn to troubleshoot this? Oct 13 15:57:19 adq well, when Hiroshi L said Oct 4 was a day we would look back on, i think this is what he meant ... Oct 13 15:57:55 the day samsung ceded to pixel :D Oct 13 15:58:28 * adq shrugs like a pfn Oct 13 15:58:39 nobody shrugs like pfn Oct 13 15:58:46 at least i tried! Oct 13 15:58:49 stop trying to imitate ! Oct 13 15:59:03 so i played with diffutil recently Oct 13 15:59:07 it's really good Oct 13 15:59:09 adq: be yourself Oct 13 15:59:22 orbyt_: hi Oct 13 15:59:22 112 x 112 pixels, too much for Note 5 to handle Oct 13 15:59:27 a bit annoying with sorted list (i did not yet use SortedList) and moving detection but it's ok Oct 13 15:59:32 Melatonina: o/ Oct 13 16:00:04 hi all. Oct 13 16:00:18 Melatonina, you would be surprised, if we could detect the delta between someone IRL and on IRC, to see how little my delta is ;) Oct 13 16:00:45 winegoddess: :) hi Oct 13 16:00:47 I know wikipedia isnt always the be all end all source, but i wondered, what does the support status column mean here? https://en.wikipedia.org/wiki/Android_version_history Oct 13 16:00:52 azv4, really cannot know without more details, best for you would be to debug on this device directly Oct 13 16:01:07 no bug fixes except for kitkat and newer? Oct 13 16:01:27 winegoddess, that is correct Oct 13 16:01:30 yep winegoddess Oct 13 16:01:37 thanks azv4 and adq Oct 13 16:01:56 adq, how can I do what you suggest? Oct 13 16:02:24 Make stack trace trap around code that displays the .bmp? Oct 13 16:02:28 azv4, do you have a note 5? if yes, you would run in debug mode your app and put some breakpoints Oct 13 16:02:38 if no, you're basically screwed if you cannot reproduce elsewhere Oct 13 16:02:45 adq, I dont have one today, yesterday I had one, and I found no exceptions Oct 13 16:03:15 it's very generic, but to solve a problem it's very important to be able to reproduce on demand Oct 13 16:03:18 Here is my favorite part, one customer with Note 5 claims feature is working fine, other customer with Note 5 claims .bmp not displaying Oct 13 16:15:42 Hi, are there cases where two applications share the same user? Oct 13 16:16:48 soulisson: all applications on your smartphone have the same user Oct 13 16:17:19 soulisson: what do you mean? Oct 13 16:17:49 I thought that each application had its own user, each user having its own name, id, ... Oct 13 16:22:18 Am I missing something or do orientation changes really make DialogFragment barely worth bothering with? Oct 13 16:26:15 Orientation changes are what makes DialogFragment worth it Oct 13 16:26:32 it's for saving state right? Oct 13 16:26:38 what if there's like, no state Oct 13 16:27:21 It still destroys and creates the Dialog for you Oct 13 16:28:08 Anybody with OpenCV4android experience know how I can access the mCamera field in JavaCameraPreview? I need to pass it into a MediaRecorder object Oct 13 16:29:28 Well, it appears that the tag for .show(FragmentManager, tag) is worthless as calling .show twice will actually stack _another_ DialogFragment instance Oct 13 16:30:11 Then don't show it twice Oct 13 16:30:27 I don't think whether the tag exists is checked for any transactions Oct 13 16:32:52 Dagmar: Orientation changes shouldn't cause problems with DialogFragment. What exact problem are you experiencing? Oct 13 16:33:06 soulisson, that is correct, and it is possible to give two applications the same ID by signing them together and designing them to share Oct 13 16:33:39 One I already found the workaround for (the thing just disappearing) Oct 13 16:33:46 azv4: ah ok, thank you Oct 13 16:34:13 That show bothers to take a tag which is apparently _never subsequently looked for_ despite that the docs assure you that everything is handled for you, frankly shocks me Oct 13 16:35:03 Considering I'm using some input filtering, it's _not_ actually a big deal for me to save the state Oct 13 16:36:02 As far as I remember, Fragment tags are only for your benefit (if you want to find Fragments by tags). Though I don't use Fragments anymore, so I could be misremembering. Oct 13 16:36:42 Dagmar: To be honest, it sounds like you're doing something wrong. You shouldn't have to find work-arounds for DialogFragments disappearing. Oct 13 16:37:26 No, that one's actually a documented bug with the support v4 library Oct 13 16:37:53 The workaround is a derpy thing to be done in onDestroy Oct 13 16:40:38 Dagmar: Hmm, okay. But, from what I read, this bug happens only if you use `setRetainInstance(true);`. Are you doing that? Oct 13 16:41:37 some lively discussions on HN & /r/programming about android dev experience Oct 13 16:41:47 Yeah, because the alternative was even more fun Oct 13 16:43:41 lol "Google seems to have an almost willful disdain for developers who don't work for Google." well, i'm sure Android team folks are passionate about bringing us good stuff, but yeah - the company in general seems to disdain humans in general, except that they provide data for algorithms ;) Oct 13 16:44:12 Youre talking about the moron who still uses AsyncTask after developing android for 5+ years? :P Oct 13 16:44:46 Dagmar: I'm curious of why you're retaining a dialog fragment. Not saying it's wrong; just wondering. Oct 13 16:44:52 Oh there's plenty more examples of Google kind of ignoring outside developer concerns. The recent restrictions to AlarmManager come to mind Oct 13 16:45:36 TacticalJoke: Because thanks to onTextEnter firing when it's reinstantated, it was wiping out my edittext contents Oct 13 16:46:32 So... my options were to setRetainInstance(true) or actually go build in more complex saveInstanceState hooks than I'd need with just a plain Fragment Oct 13 16:46:47 * g00s hates dialogs Oct 13 16:47:33 i have Trio tablet with usb debugging enabled. it is not recognized by Android studio on Windows. Teh Trio website says that no drivers are needed. I tried pointing at the google usb driver and it did not work. I looked at the OEM drivers site and there is nothing there for Trio. Any suggestions or something I am missing? Oct 13 16:47:55 winegoddess maybe try different cable Oct 13 16:48:10 i really wish you could set up adb over wifi w/o initially connecting by USB Oct 13 16:48:20 but you need special rom for that Oct 13 16:48:45 winegoddess: Is Windows even noticing you plugging the thing in? Oct 13 16:49:39 If not then g00s was on the right track and you're probably using a "charging only" cable, or your USB bus has completely fallen over and died on the PC Oct 13 16:50:15 hi Dagmar - yes it is recognized. i found it in Device manager and tried to update driver pointing to the google usb driver - i read that somewhere...but it did not fix it Oct 13 16:50:46 i dont think i have another cable for it. its not the standard micro usb Oct 13 16:51:24 Dagmar: Hmm, have you tried setting the TextWatcher in onActivityCreated instead of in onCreate (or whatever)? Oct 13 16:51:47 TextWatcher isn't duplicating Oct 13 16:52:14 Right. It's the framework calling TextView.setText. Oct 13 16:52:16 Failing to retain the instance merrily obliterates the instance values where I stored the last valid bit of text entered Oct 13 16:52:38 So, far simpler to tell it to just retain hte instance Oct 13 16:53:05 I probably blew 3-5x the amount of time it would have taken to just use a regular fragment chasing this bizarreness down Oct 13 16:53:08 im going to try restarting, bbiab. thanks Oct 13 16:53:29 Another solution is to disable activity recreation on screen rotation for that activity. But that may suitable only if you use the same resources for both orientations. Oct 13 16:53:31 But hey, unlike when I found out you can't use fragments in a service... at least I didn't have to rewrite the entire damn application twice Oct 13 16:53:50 TacticalJoke: Yeah I would have written off orientation changes in a heartbeat, but... zxing library. Oct 13 16:54:12 * kbs finds the whole fragments framework... less than joyous :) Oct 13 16:54:37 That's a shame. I've disabled recreation-on-rotation for every activity in my app, but only because I have the luxury. Oct 13 16:54:41 It expects rotation and despite orientation changes being something you can specify per activity in AndroidManifest, they do not _work_ on a per-Activity basis Oct 13 16:54:49 I hate the UX of activity recreation on rotation. So slow and horrible. Oct 13 16:55:55 Too right. The reason I know about the AlarmManager change is a countdown widget I've got. Widgets don't stand a chance. Supply individual layouts and just hope no one notices Oct 13 16:56:00 And there's usually some data loss, no matter how diligent you are (e.g., EditTexts lose stuff). Oct 13 16:56:05 112x112 .bmp not displaying in an ImageView on Galaxy Note 5. WHY GOD? WHY!???!!??? Oct 13 16:56:24 azv4: Perhaps you shouldn't be using bmp format. Just a thought. Oct 13 16:57:02 Dagmar, ok, I shall convert it to .jpg and see if it helps... I've never encountered any warnings against .bmp in Android land though Oct 13 16:57:24 TBH .bmp is kind of a nasty format Oct 13 16:57:44 this has worked since SDK4, on every phone out, up to the Note 5 Oct 13 16:58:01 it would surprise me if changing formats helps, but I hope it does Oct 13 16:58:19 A format not many people use would be more likely to have it's bugs go unnoticed for longer Oct 13 16:58:48 libtiff could just be _missing_ entirely from most people's desktops and they wouldn't notice anything for a year or more Oct 13 16:59:16 Good morning Oct 13 17:06:32 Guten tag. Oct 13 17:14:15 Gawd, dark material themes are so hard to get right. Light themes are a walk in the park by comparison Oct 13 17:17:09 The first time I boot after flashing it does AOT compilation using the dex2oat command. This intermittently thread locks the kernel, no reboot, just stays locked forever. How would I go about debugging this? Oct 13 17:17:31 TacticalJoke i liked the way WP had system-wide theming. Lets say I have dark theme and start the SAF / platform file picker - its light, and is quite jarring against my app Oct 13 17:18:03 f3z0: try #android-root. they’d know more than we would. We’re just here for app development Oct 13 17:18:26 Ok Oct 13 17:18:59 i don't know what the problem was, but after a few OTAs i'd have that stop permanently hang ... Oct 13 17:19:12 I dreaded each time i saw "Optimizing app 1 or 50 .. " Oct 13 17:19:27 it would get stuck on some app, always the same one, like 35. there was something special about it Oct 13 17:20:47 TacticalJoke: Reddit syncs night themes are fantastic Oct 13 17:21:09 it'd stop? suck Oct 13 17:21:27 g00s: was it rhapsody? Oct 13 17:21:39 logcat would have told you Oct 13 17:21:55 f3z0 nope. i don't know which one. i'd flash manually and everything would be ok Oct 13 17:22:05 orbyt_: Interesting. Does it just use black/grey/white? Oct 13 17:23:03 Would be best to just download it and play around with it. It's a smooth dark grey, no hard blacks Oct 13 17:23:14 That'll make people rage at you Oct 13 17:23:20 AMOLED black! Oct 13 17:23:38 Hrmf, did the Pixels even start shipping yet? Oct 13 17:24:39 not until like the 20th Oct 13 17:25:10 Apparently BestBuy gives you $100 gift card and a new Chromecast for pre-ordering one Oct 13 17:25:12 orbyt_: Yeah, I'm so lazy with apps these days. I should check it out; thanks. Oct 13 17:25:19 it’s the Verrizon one, but apparently that’s unlocked Oct 13 17:25:30 it's not unlocked according to everything posted... Oct 13 17:25:36 Can I start any activity of an application when I'm root? Oct 13 17:25:38 then again, I rarely unlock bootloader anymore Oct 13 17:25:43 the bootloader isn’t, but the phone is Oct 13 17:25:50 as in, it’s not locked to Verizon Oct 13 17:25:52 oh, yeah, it's sim unlocked Oct 13 17:26:15 Unlockable bootloader is still very useful when you need to attach more invasive dev tools. Oct 13 17:26:31 yes Oct 13 17:26:32 yeah, but I have special devices for that purpose Oct 13 17:26:34 100$ seems like a shitty tradeoff for that :P Oct 13 17:26:47 i wouldn’t want to be doing that on my everyday phone Oct 13 17:26:49 I just ordered off of play store Oct 13 17:26:53 mhm Oct 13 17:27:00 I missed the release for like half of day. Oct 13 17:27:03 i just _not_ ordered Oct 13 17:27:03 don't want no verizon branding Oct 13 17:27:04 And the ship date is in november O.o Oct 13 17:27:07 wow, really Oct 13 17:27:16 Yeah, like 14th or something dumb Oct 13 17:27:27 here in europe, sim/carrier unlock is not anymore an issue, and would not justify any extra cost Oct 13 17:27:29 come on google, get your production chain in order... Oct 13 17:28:12 im' not gonna throw 1000€ at this phone anyway, not gonna throw 1000€ in any phone Oct 13 17:28:34 *shrug* Oct 13 17:28:45 good thing it's not $1kusd Oct 13 17:29:12 Pixel is actually like 750EUR Oct 13 17:29:24 1000 is the 128GB XL I think. Oct 13 17:29:33 (Depends on local VAT.) Oct 13 17:29:33 I got the 32gb, so $650 usd plus taxes Oct 13 17:29:45 I ordered an XL, too, but will probably return that Oct 13 17:29:59 gonna keep using the 6p, and use the pixel to replace my broken 5x Oct 13 17:30:07 i kinda wanted the blue one, but they didn’t have that in 128gb Oct 13 17:30:11 I just got the 32G, never really filled up my 5X either Oct 13 17:30:20 they didn't have the blue in stock when I was ordering either Oct 13 17:30:25 I maybe woulda gotten that Oct 13 17:30:31 It'll replace my Z5 Compact anyway. Oct 13 17:33:30 I would like another android N device Oct 13 17:33:39 I want to play around with the new features in accessibilityservice Oct 13 17:33:47 and don't want to do it on my main device Oct 13 17:33:54 (wanna try my hand at machine-learning playing games) Oct 13 17:34:25 can use the projection api -> opencv to do frame recognition, and accessibilityservice to interact Oct 13 17:38:37 hi. i've a problem with startActivityForResult. When I call it, the second activity starts, but when the onCreate method finishes, the app crashes Oct 13 17:38:44 what could be the problem? Oct 13 17:38:57 stacktrace or gtfo Oct 13 17:41:07 2$ on NPE Oct 13 17:43:28 pfn: what's gtfo? Oct 13 17:43:59 No null pointer exception here. Oct 13 17:44:08 a buddy of mine has this shirt: https://peterhoseyshirts.spreadshirt.com/stack-trace-or-it-didn-t-happen-men-s-aa-A6739118 Oct 13 17:44:09 abbreviation Oct 13 17:44:14 Stack Trace or it Didn’t Happen Oct 13 17:44:19 http://imgur.com/jacoj Oct 13 17:44:19 LucaS05: http://28.media.tumblr.com/tumblr_l8sp0mqEfG1qav3jwo1_400.jpg Oct 13 17:44:26 heh Oct 13 17:44:31 damn you beat me Oct 13 17:44:46 it's in the topic Oct 13 17:44:54 since ages Oct 13 17:45:02 not anyymore Oct 13 17:45:15 wow indeed Oct 13 17:45:39 LucaS05: basically, saying “it broke” doesn’t give anyone an idea what’s wrong. A stack trace points to the exact problem that you’re having Oct 13 17:45:40 how did you dare, SimonVT! Oct 13 17:46:07 It was kroot Oct 13 17:46:12 I think there's just no more room Oct 13 17:46:19 :] Oct 13 17:46:27 s73v3r: maybe i've some problem to me eyes, if i find it i will paste it here Oct 13 17:46:33 my* Oct 13 17:48:34 LucaS05, always watch logcat, be sure to not filtering out, and you should see a stacktrace error corresponding to your issue Oct 13 17:49:07 what's up people? Oct 13 17:49:30 played with diffutil, snaphelper & other recyclerview stuff today Afzal Oct 13 17:49:34 Someone should make a LogCat utility called LogKitten. Oct 13 17:49:45 Okay, somebody already has. Oct 13 17:49:46 all those things should have been there since they introduce RV, and i'm just playing with it now Oct 13 17:50:04 interesting, didn't know about SnapHelper adq :D Oct 13 17:50:27 Yeah, gotta get into all these fancy recyclerview options Oct 13 17:50:48 How do you handle exceptions? Because is not so easy to look at the verbose logcat output Oct 13 17:51:07 In my app, RecyclerView was actually slower than ListView. And it doesn't have smooth-scroll scroll bars. Oct 13 17:51:23 TacticalJoke how many items? Oct 13 17:51:27 filter by your package LucaS05 Oct 13 17:51:27 LucaS05: Just type "exception" in the filter. Or filter it to your app (which is buggy). Oct 13 17:51:38 what was the cause of the slowdown? Oct 13 17:51:40 Afzal: Regardless of the number of items. It was giving me more View.onMeasure calls. Oct 13 17:51:45 RV starts to be less slower with stableids, many many items, and fixed size + few tricks in viewholders & avoiding notifydatasetchanged Oct 13 17:51:50 otherwise not sure there is much diff Oct 13 17:51:52 I mean like a centralized exception handler Oct 13 17:51:53 The extra View.measure* calls. Oct 13 17:52:05 TacticalJoke: ok, i'll try it Oct 13 17:52:13 you don't centralize exception handlers Oct 13 17:52:29 LucaS05: The system in question *is* the centralized exception handler. :D Oct 13 17:52:45 TacticalJoke: oh, ok :D Oct 13 17:53:16 LucaS05, in all cases, you have to be familiar with logcat, it's a must Oct 13 17:53:36 usually you just filter it based on your app packagename to exclude other verbose logs Oct 13 17:53:36 LucaS05 most exceptions are cases you need to handle in the app. Alternate code paths. For actual crashes, you should use ACRA or Fabric or Firebase crash reporting. Oct 13 17:54:18 Thanks guys! I was trying to search those useful insights. I've found this https://www.intertech.com/Blog/android-handling-the-unexpected/ Oct 13 17:54:29 so i was thinking about a "centralized" way Oct 13 17:54:52 Note that some cases of exceptions in, e.g., SomeActivity.onCreate will not show in LogCat if you use the application filter. In that case, you have to do something like disabling all filters and typing "exception" in the search thing. Oct 13 17:55:13 Those exceptions don't get tagged with the application ID, for whatever reason. Oct 13 17:55:21 it's AS fault Oct 13 17:55:30 LucaS05 that's pretty much what the crash reporting libraries do, but this is for truly unexpected scenarios. Not scenarios you catch Oct 13 17:55:30 many issue in their logcat view ;) Oct 13 17:55:46 they are still not able to provide multiple logcat windows Oct 13 17:55:49 it's... .... Oct 13 17:56:04 Yeah, don't bother with UncaughtExceptionHandlers. There are way better solutions. Oct 13 17:56:10 ok ok Oct 13 17:56:16 Thanks guys! Oct 13 17:56:44 Those crashes without an easy-to-find exception message make me stuck Oct 13 17:56:56 there are never any crashes without an easy to find exception message Oct 13 17:57:14 and make me think that android development is very difficult Oct 13 17:57:40 LucaS05: What did this exception message look like? Oct 13 17:57:51 however, the exception message can sometimes be difficult to decipher, and not reference anything in your app directly Oct 13 17:57:56 i'm pasting it Oct 13 17:57:56 If it doesn't have your application ID on it, it is indeed harder to find. Oct 13 17:58:06 s73v3r, those issues tend to be relatively rare Oct 13 17:58:06 s/on/in/ Oct 13 17:58:27 agreed, until you work on massively distributed apps Oct 13 17:58:46 of course, when that happens, every “rare” instance still means dozens to hundreds of users Oct 13 18:00:08 here you are: http://pastebin.com/dAZTWBxu Oct 13 18:00:51 raoul11 lost 2$ Oct 13 18:01:19 do you have a dialog or something that is either launched from the previous activity, or trying to be launched in this activity? Oct 13 18:02:23 raoul11: i'm waiting them. plata o plomo Oct 13 18:02:39 s73v3r: i'm using startActivityForResult Oct 13 18:02:58 System.err? Oct 13 18:03:02 why are you doing e.printStackTrace Oct 13 18:03:07 Has *anyone* ever used Opencv4android here before? Oct 13 18:03:11 you catch an exception for no reason Oct 13 18:03:20 Faizan, no one's ever going to answer that question Oct 13 18:03:41 https://github.com/charafau/OpenCvScalaAndroid Oct 13 18:03:47 there's an example opencv4android app, though Oct 13 18:04:24 LucaS05, when you dev for android platform, you should favor Log.v Log.d Log..etc facility Oct 13 18:04:32 and not using system.out.println java style Oct 13 18:04:36 it's not just that Oct 13 18:04:42 but he's catching an exception and mishandling it Oct 13 18:04:49 resulting in this additional, perhaps unrelated, exception Oct 13 18:04:56 That's an example opencv app written in scala :( I'm trying to get MediaRecorder working with OpenCV's surface view Oct 13 18:05:07 sure pfn Oct 13 18:05:15 i think he is just starting android dev, lot of things to grasp Oct 13 18:05:38 mishandling exceptions is really a java concern Oct 13 18:05:48 same sort of issue would occur there Oct 13 18:06:08 pfn: adq I'm not using any System.err Oct 13 18:06:24 you're using e.printStackTrace Oct 13 18:06:25 which is wrong Oct 13 18:06:33 typically default generated catch block by IDE Oct 13 18:07:15 sure but e.printstacktrace is using internally s.println Oct 13 18:07:17 anyway Oct 13 18:07:26 pfn: System.err: at android.view.ViewRootImpl.setView(ViewRootImpl.java:685) this is not my class Oct 13 18:07:34 doesn't matter Oct 13 18:09:02 wow, you guys are really not helping this guy with the actual problem Oct 13 18:09:59 e.printStackTrace() is what you fill a catch block with when you don't yet know/want to handle the exception. Usually you come back to the catch block and handle is properly later Oct 13 18:10:10 that way, you get to see the full stacktrace Oct 13 18:10:24 LucaS05 look me up in montecasino Oct 13 18:11:02 Afzal: i know that ;) anyway i've searched in all my code and i don't have any occurrence of System.err Oct 13 18:11:11 Afzal: That's a really bad practice. Oct 13 18:11:11 it's not System.err you're looking for Oct 13 18:11:15 you look for printStackTrace Oct 13 18:11:15 LucaS05: Do not do that! Oct 13 18:11:34 All Throwable.printStackTrace does is make it *harder* to find bugs. Oct 13 18:11:35 TacticalJoke: I know what's that, i will not do ite ;) Oct 13 18:11:37 Never do it. Oct 13 18:11:43 it* Oct 13 18:11:48 If there's a bug, you *want* your app to crash loudly. Oct 13 18:11:54 if it's something you're going to come back to later: throw new RuntimeException(e) Oct 13 18:12:32 fail fast Oct 13 18:12:49 is anyone on linux noticing audio glitches when running the emulator? Oct 13 18:13:22 yes, so i rarely use the emulator Oct 13 18:13:32 it makes some noise to audio channel for me Oct 13 18:14:03 https://github.com/opencv/opencv/blob/master/modules/java/generator/src/java/android%2BJavaCameraView.java can someone tell me exactly where the camera is instantiated in this code? Oct 13 18:14:04 Ashiren, normally i hear it for a couple seconds when it boots, but today i'm hearing noises the entire time it's running Oct 13 18:14:15 maybe this will help me to use MediaRecorder with the damn view Oct 13 18:14:19 i have arch linux if that matters Oct 13 18:14:24 LucaS05: Are you saying "e.printStackTrace();" in your code somewhere? There's a good chance you didn't type this and Android Studio added it for you. Oct 13 18:14:26 Ashiren, ubuntu 16.10 here Oct 13 18:14:32 AMD cpu? Oct 13 18:14:36 Ashiren, no, i7 Oct 13 18:14:44 ah ok Oct 13 18:14:47 Faizan: initializeCamera, line 77 Oct 13 18:15:06 all i did was Ctrl-F Oct 13 18:15:07 Okay but i'm not sure where that gets called in my code Oct 13 18:15:17 when you want to initialize the camera Oct 13 18:15:24 hold on Oct 13 18:15:31 LucaS05: I wonder if your calling activity/context has already finished - is there something unusual about your caller - the one that calls startactivityforresult ? Oct 13 18:15:33 i’m not going to debug your code Oct 13 18:16:25 http://pastebin.com/hDUa0aEP s73v3r that's literally all I've called regarding that method Oct 13 18:16:30 that class rather Oct 13 18:16:38 just instantiated the view in my xml Oct 13 18:16:46 i’ve never used it. Oct 13 18:16:51 it's a surfaceview Oct 13 18:16:56 it connects camera when surface is ready Oct 13 18:17:01 read base classes next time Oct 13 18:17:50 and when that camera is connected, I can't pass that or a new camera into a MediaRecorder object Oct 13 18:17:58 nor can I lock/unlock the camera Oct 13 18:18:01 TacticalJoke: i've that, but i'm not using that code. So it's not part of the problem (I will delete them) Oct 13 18:18:12 kbs: my caller is not finished Oct 13 18:18:39 LucaS05: and you're calling it from an activity I assume? Oct 13 18:18:47 kbs: yes Oct 13 18:19:10 i'm calling the method from a button Oct 13 18:20:11 this is my last logcat containing the errors: http://pastebin.com/FSfGqfYb Oct 13 18:22:02 If you're able to paste the calling code/class - might be more clues. It might be the framework doesnt like the calling context and is complaining - but I'm not sure why. Oct 13 18:26:23 kbs: http://pastebin.com/AXCtAFYa the setAddButton is only a wrapper for finding the FabButton id and setting a listener (all is done in the parent class) Oct 13 18:27:44 hmm, I wish IDevice had a way to detect if the device is on and not connected Oct 13 18:28:22 pfn: Just link in libMsCleo at compile time Oct 13 18:29:31 kbs: anyway, without going step by step in debug the activity that i'm trying to start with startActivityForResult, is started and i don't have any crash Oct 13 18:29:47 i will try again Oct 13 18:29:53 i'm not sure Oct 13 18:30:41 http://javadoc.io/doc/com.android.tools.ddms/ddmlib/25.1.0 Oct 13 18:30:43 meh, no such api Oct 13 18:31:40 LucaS05: Umm... RistMenuListActivity.this.startActivityForResult what? THat actually works? Oct 13 18:31:45 LucaS05: good luck :) fwiw, oddly the error seems to point to a class that's neither one of the ones in your pastebin. (error = RistMainActivity, code = RistMenuListActivity -> RistQstMenuOwnerActivity) Oct 13 18:32:15 Dagmar, java 101 Oct 13 18:32:39 Hey everybody, I just have a simple problem with a DrawerLayout Oct 13 18:32:55 Dagmar: that is part of a listener (new View.OnClickListener), the context of the intent cannot be a listener Oct 13 18:33:36 Essentially, I have a Fragment as the content within the layout, but the toolbar overlaps the fragment content. Oct 13 18:34:13 I've tried adding the scrolling view behaviour flag to the content, but it still doesn't work Oct 13 18:34:31 paddingTop="?actionBarSize" Oct 13 18:34:40 LucaS05: What is the value of `OWNER_REQUEST`? Oct 13 18:35:30 kbs: this is strange because i'm not calling that RistQstMenuOwnerActivity from RistMainActivity. RistMainActivity is a previously started activity. The first one that is started anyway Oct 13 18:35:59 TacticalJoke: this: private static int OWNER_REQUEST = 2; Oct 13 18:36:34 what's strange is that the application doesn't crash if i don't do a step by step debug. I've a crash only in that case Oct 13 18:37:32 I've tried adding the padding to the top, but I have a TabHost, and the tabs now don't show up Oct 13 18:37:56 LucaS05, you still haven't pasted anything from the actual crash Oct 13 18:38:01 still chasing red herrings Oct 13 18:38:20 pastebin *everything* from logcat from after tapping the button Oct 13 18:41:39 what you've pasted are symptoms from the crash, not the crash Oct 13 18:43:14 hello Oct 13 18:43:47 somebody knows how i can implement a text changer (like bootstrap carousel) where i have multiple texts that can be changed with some arrows? Oct 13 18:49:04 nobody here? Oct 13 18:49:34 iso: Galaxy Note 5 Genymotion emu... Oct 13 18:50:33 * azv4 wonders if a Genymotion canned EMU is simply a generic emu that happens to target the same SDK and screen res as the emu'd device... or is there more to it? Oct 13 18:51:44 oh hi there Oct 13 18:51:50 bootstrap carousel? JS in a web view? Oct 13 18:52:23 If you have a user reporting a bug on a specific piece of hardware, and you don't have the hardware to test, what do you do? Oct 13 18:53:11 azv4: either buy it or use one of the device pool services to test Oct 13 18:53:13 azv4: did the bug report come with a backtrace? Oct 13 18:53:17 no without webview Oct 13 18:53:18 google has one and so does samsung Oct 13 18:53:25 also, that Oct 13 18:53:46 is there no component for changing texts? Oct 13 18:53:53 zinx, there is no bug report, the app simply doesn't display a .bmp in an ImageView, it works on the dozen models we test internally on, works in every EMU I can find.... Oct 13 18:54:16 thepoosh, 'device pool services'? Oct 13 18:54:39 google and samsung will allow you to use a device cloud to test Oct 13 18:54:53 https://firebase.google.com/docs/test-lab/ Oct 13 18:54:55 * azv4 googles 'device cloud' Oct 13 18:54:56 in the carousel example code maybe just s//
/? Oct 13 18:55:08 https://aws.amazon.com/device-farm/ Oct 13 18:55:17 whatever Oct 13 18:55:21 heh... still not sure of the architectures glue Oct 13 18:55:39 I dont believe this bug is going to show up in the device cloud, there is no crash involved... Oct 13 18:55:46 JS without webview is a til for me Oct 13 18:56:28 pfn: this comes from my verbose: http://pastebin.com/UsQW1WMm and this from Warn http://pastebin.com/i2CtSfFb Oct 13 18:56:41 stop using AS Oct 13 18:56:41 xpcom via jni maybe? Oct 13 18:56:42 azv4: if you just want to see if it happens, maybe you can check to see if the ImageView is displaying the bmp, or is blank? Oct 13 18:56:43 type adb logcat Oct 13 18:56:49 azv4: and throw an exception if it's wrong.. Oct 13 18:56:58 LucaS05, go into a terminal, type adb logcat immediately after the crash occurs, pastebin everything Oct 13 18:57:05 I'm not going to look at anymore logcats until you do Oct 13 18:57:12 pfn: ok Oct 13 18:57:13 s/logcats/of your pastebins/ Oct 13 18:58:06 zinx, this question you asked, "maybe you can check to see if the ImageView is displaying the bmp, or is blank?", I should setup Firebase and Firebase will show me if it loads using the screenshot? Oct 13 19:00:05 Genymotion is very bad about emulating vendor-specific fuckups Oct 13 19:00:10 I can't imagine why Oct 13 19:00:25 cause they don’t have access to the vendor-specific rom Oct 13 19:00:27 ahh dang, I need to pay to use Firebase it appears.... Oct 13 19:00:52 because they don't have the rom of the many vendor-specific Oct 13 19:00:59 and it would not even run on same architecture Oct 13 19:01:07 a user is reporting my app's widget gets cut off when they change orientation on their tablet. there's no orientation management with a widget right? is this just an issue with their ROM? Oct 13 19:01:20 No that's normal Oct 13 19:01:52 You can try supplying an alternate layout for landscape/portrait mode, with with widgets you're basically just never getting a notification about orientationchange Oct 13 19:02:15 orientation shouldn't even matter if you stay within the standard size confines Oct 13 19:02:34 pfn, yeah it looks like the OS rotates it properly on my emulator Oct 13 19:02:41 If everyone's desktop layouts were square, sure Oct 13 19:03:52 Usually the moment they go into landscape mode, not so square anymore Oct 13 19:04:11 It's normal for each cell to be taller in portrait than landscape.. So the issue is likely your widget Oct 13 19:05:16 SimonVT, i just have fixed dimensions (3x1, android:minHeight="40dp" android:minWidth="180dp") Oct 13 19:05:38 thebishop: the cells can be any amount of dp :/ Oct 13 19:05:47 Nothing fixed about that Oct 13 19:06:27 But does your layout fit within 180x40dp? Oct 13 19:06:41 it'll cut off if 3x1 ends up being smaller than 180dp Oct 13 19:06:44 on a small-ish screen Oct 13 19:06:57 although, that shouldn't happen in landscape Oct 13 19:07:26 Depends on if someone's homescreen uses a custom number of rows & columns Oct 13 19:07:44 I believe Android decides how many cells it should be based on min dimensions Oct 13 19:07:56 my widget layout is layout is android:layout_width="220dp" android:layout_height="80dp" Oct 13 19:08:06 pfn: this is what i got after running adb logcat http://pastebin.com/dsGmmrJt Oct 13 19:08:45 Any obvious bad form in this ImageView def that might prevent the drawable/btn_dialog from being displayed on a certain phone model? http://pastebin.com/Yn0PpYQW Oct 13 19:09:12 First you say it can fit in 40dp, then you define is at 80dp Oct 13 19:09:24 LucaS05, looks incomplete Oct 13 19:09:27 You need to decide what size your widget is Oct 13 19:09:46 wwhy arent you doing any filtering LucaS05 ? Oct 13 19:10:00 Because pfn told him not to Oct 13 19:10:05 SimonVT, so should i set the min dimensions in the widget config file to the same as the dimensions in the layout file? Oct 13 19:10:29 azv4: other than android:visibility="gone"? ;) Oct 13 19:10:30 If that's your minimum dimensions Oct 13 19:10:32 SimonVT, i had it that way before, but my nexus6 wouldnt let me arrange it in the leftmost cell on the desktop Oct 13 19:10:40 10-13 21:05:15.206 920 936 W ActivityManager: Activity pause timeout for ActivityRecord{28658cb u0 com.touriexpert/.activities.ristorazione.RistMenuListActivity t6164} Oct 13 19:10:40 ? seems odd Oct 13 19:10:54 Dagmar, it is set to picIso.setVisibility(View.VISIBLE); in the .java Oct 13 19:10:57 Usually you just match_parent Oct 13 19:11:17 SimonVT, for the top level layout? Oct 13 19:11:20 sounds like your app ANR and then got killed Oct 13 19:11:22 Yes Oct 13 19:11:29 SimonVT, thanks, let me try that Oct 13 19:11:43 Create it like you would any other layout, adapt to size Oct 13 19:11:52 I think the biggest problem I have here is my lack of a Note 5 to reproduce this error... Oct 13 19:12:24 SimonVT, does it matter that the layout editor makes it look enormous this way? Oct 13 19:12:41 Just use tools:layout_width/height for the preview Oct 13 19:12:49 azv4: Only thing I can think is they're using some jacked-up themeing that replaces btn_dialog Oct 13 19:13:20 Or they just fucked up bmp loading (who uses that anyway) Oct 13 19:15:32 Well, now that I see he's using @android:drawable/btn_dialog for the image I'm not sure why bmp was mentioned Oct 13 19:15:35 * azv4 tries to find the code that loads the bmp Oct 13 19:16:47 hmm, I think I'm mixed up here on where the actual images are placed, and how they load Oct 13 19:18:33 I traced through the server code and found where the .bmp is generated, placed into a byte array, then transmitted as serialized xml to the App, Oct 13 19:18:48 then I have: final View pbrTop = this.findViewById(R.id.pbrTop); Oct 13 19:19:04 actually: final ImageView picTop = (ImageView)this.findViewById(R.id.picTop); Oct 13 19:19:19 which I believed was where the image is loaded in the ImageView Oct 13 19:19:46 R.id.picTop, I need to find this def Oct 13 19:22:29 adq, ad startActivityForResult - it only happens when testing on genymo virtuals, and sometimes Oct 13 19:23:04 adq, it behaves normally on hw devices Oct 13 19:35:07 pfn: what can i do to for better find the error? Oct 13 19:35:21 LucaS05, so the app crashes after 30 seconds? Oct 13 19:35:59 pfn: even less i think. Oct 13 19:36:07 so it crashes after 30 seconds Oct 13 19:36:14 not instant: you have an anr and the system killed it Oct 13 19:37:19 hey Oct 13 19:37:33 * DelphiWorld app is publishing in playstore... Oct 13 19:38:03 congrats Oct 13 19:38:35 thx StingRay_ Oct 13 19:38:41 what if my app status is draft? Oct 13 19:38:46 that mean its in processing? Oct 13 19:38:50 or what should i do Oct 13 19:38:55 it means you haven't published Oct 13 19:39:02 pfn: i don't know what to do. Maybe i could try to start the activity that calls startActivityForResult as the "main" activity Oct 13 19:39:14 LucaS05, it means stop blocking the main thread Oct 13 19:39:19 pfn: ok, where should i go to create my listing? Oct 13 19:39:25 DelphiWorld, press the publish button Oct 13 19:39:40 pfn: i mean to change the AndroidManifest Oct 13 19:39:58 LucaS05, that has nothing to do with your app hanging Oct 13 19:40:52 pfn: i was thinking that maybe the problem is caused by activities that are opened before the one is calling startActivityForResult Oct 13 19:41:02 read /data/anr/traces.txt Oct 13 19:41:32 and fix your hang Oct 13 19:43:11 you know, it's rather crucial information that your app crashes after 30 seconds and not immediately Oct 13 19:44:48 pfn: ok. i've obtained the file by doing ./adb pull "/data/anr/traces.txt" is it right? Oct 13 19:44:52 although logcat doesn't mention this Oct 13 19:44:57 yes Oct 13 19:45:18 pfn: ok. the file is empty. Oct 13 19:45:25 * pfn shrugs Oct 13 19:45:31 no idea what's broken Oct 13 19:45:38 too many moving parts, not enough good info Oct 13 19:45:45 i need to take a break Oct 13 19:45:48 sorry Oct 13 19:47:33 pfn: what's feature graphic? Oct 13 19:47:42 the banner in play store Oct 13 19:48:03 pfn: sory for bothring but ... a blind person have a lot of dificulty to understand thoses :P Oct 13 19:48:03 LOL Oct 13 19:48:18 pfn: what content it should have ? Oct 13 19:48:21 the app logo? Oct 13 19:48:29 an image when you're featured Oct 13 19:48:39 ok, got it Oct 13 19:48:47 well explained Oct 13 19:55:50 * StingRay_ is beginning to not like swift, they say it's good but missing so much of what I like in java Oct 13 19:56:11 missing what? there's nothing missing in the language itself Oct 13 19:56:31 well is there not ? missing reference online then Oct 13 19:56:38 pfn: what's content ratting? do i need to fill some papper? Oct 13 19:56:44 DelphiWorld, there's a survey Oct 13 19:56:46 No just read it Oct 13 19:56:51 good Oct 13 19:56:51 fill it out, it gives you a rating Oct 13 19:56:58 i was afraid its something to print & scan Oct 13 19:57:09 use the google Oct 13 19:57:13 I'm not your personal question answerer Oct 13 19:57:25 pfn you ever done any socket stuff in swift ? Oct 13 19:57:26 pfn: i do use google but didnt find so i asked Oct 13 19:57:42 StingRay_, not particularly, but I assume it'd be standard posix sockets Oct 13 19:58:24 DelphiWorld, just ask the channel, if anyone knows and wants to answer, someone will Oct 13 19:58:36 adq: true Oct 13 19:58:52 i believe it's not trivial for a blind person to upload and publish his app for the first time on the store Oct 13 19:59:07 you should try to be assisted with someone close to you if possible Oct 13 19:59:10 adq: that what i'm doing it now Oct 13 19:59:16 yes ...well the convenience of SslSocketFactory I miss, and having a look at examples on line of StreamDelagte for handling events is....well....problematic Oct 13 19:59:49 raoul11: are you here man? Oct 13 20:05:32 my problem now is screenshots Oct 13 20:06:06 Well, most of the time they believe in replaceable batteries and microSD card slots Oct 13 20:10:08 screenshots are easy Oct 13 20:10:40 I mean, you should know what's on your app's screen, just take the screenshot, and save them and publish them Oct 13 20:10:44 obviously, you can't see them... Oct 13 20:23:46 hi Oct 13 20:24:00 good ebening Oct 13 20:26:24 Hi, has anyone implemented that super quick search in their app? Oct 13 20:26:37 Like iTunes search where the list of items is immidiately filtered as you type? Oct 13 20:26:49 Is there a name for that kind of search functionality? Oct 13 20:26:56 I want to implement it in my app Oct 13 20:27:40 autocomplete search Oct 13 20:27:45 https://developer.android.com/reference/android/widget/AutoCompleteTextView.html Oct 13 20:28:12 but there are other ways, like https://developer.android.com/guide/topics/search/search-dialog.html#UsingSearchWidget Oct 13 20:28:14 Pretty sure there are a few Rx tutorials where they do exactly that Oct 13 20:29:30 Thanks, i'll look into it. I'd ideally like to have my own listview/recyclerview so it doesn't feel like you've left the activity to go to a new search activity Oct 13 20:30:19 its called also searchView (at leats one way to do it) http://stackoverflow.com/questions/30398247/how-to-filter-a-recyclerview-with-a-searchview Oct 13 20:30:29 Coolio thanks peeps Oct 13 20:30:45 Im not your peeps pal Oct 13 20:30:52 SimonVT, this match_parent approach to the widget isn't working out for me. i have the tool:layout_'s matching the min sizes in the provider file. the widget looks right in the layout editor, but it looks wrong on the emulator. Oct 13 20:31:43 thebishop, tool:whatever is only for preview Oct 13 20:32:07 it's not even existing at run-time, it's just a convinient way to fill some properties fo t Oct 13 20:32:14 for preview purpose* Oct 13 20:32:17 good night guys Oct 13 20:32:25 thank pfn and everyone who helped Oct 13 20:32:32 adq, i understand, but shouldn't those values match what i see on screen? Oct 13 20:32:49 you put whatever you want in those values Oct 13 20:32:52 40dp is the minimum size, not necessarily the actual size Oct 13 20:33:30 SimonVT, so the problem could be the size of my views inside the layout? Oct 13 20:33:34 Could be 60dp, could be 50 Oct 13 20:34:07 (oh, and it's tools: not tool:) Oct 13 20:34:27 sorry, yes i'm using tools Oct 13 20:35:37 Whether you want to fix the widgets dimensions, or create a layout that adapts to the cell size is up to you Oct 13 20:35:47 tools: can be anything, depends on whatever you set xmlns: to Oct 13 21:01:50 welp, hello charts is only 15 fps lol on nexus 5 Oct 13 21:02:01 adq finally getting around to building that benchmark app :D Oct 13 21:02:13 for charting libs Oct 13 21:02:31 winner? Oct 13 21:02:38 well I just started man lol Oct 13 21:02:42 mp-android-chart? Oct 13 21:02:46 okok Oct 13 21:02:47 but the winner is the $2000 library :p Oct 13 21:02:58 scichart something? Oct 13 21:03:01 yeah Oct 13 21:03:08 that's just in for "what's possible" Oct 13 21:03:13 eheh Oct 13 21:03:43 still filling out the rest of the fragments, i'll do mp-android-chart next Oct 13 21:04:11 keep us posted Oct 13 21:05:49 Is exceeding the 64k method limit common? Oct 13 21:06:18 yes Oct 13 21:07:31 orbyt_: Okay. Thanks. Oct 13 21:07:48 will do, still wondering how to graph out the fps lol. Just used TinyDancer for the rough idea Oct 13 21:08:49 why does gravity in WindowLayoutParams seem to be backwards Oct 13 21:09:04 its like, I set Gravity.START and the dialog window sticks to the right side of the screen Oct 13 21:09:14 Gravity.END -> right side Oct 13 21:09:23 it's like the opposite of what normal views do Oct 13 21:09:41 I am tempted to use LEFT/RIGHT but it needs to align with a fab that is using gravity end Oct 13 21:09:53 I suppose I can set gravity RIGHT on that too... Oct 13 21:10:26 wow, googleadservices requests don't stop when there's no internet Oct 13 21:10:29 crazy :/ Oct 13 21:10:39 how do you determine winners Afzal_ Oct 13 21:10:41 just performance? Oct 13 21:10:43 not sure which app it's coming from Oct 13 21:10:57 missingno pretty much, it's supposed to be for realtime charting Oct 13 21:11:52 GoogleTagManager... Oct 13 21:12:03 not sure where this class is but god damn it's not even taking a break Oct 13 21:12:29 http://hastebin.com/yodagumome.vbs Oct 13 21:12:39 (xposed = made all apps on phone debuggable :P) Oct 13 21:12:50 well it's not vbs, it's logcat Oct 13 21:13:11 oh I thought you were sending the iloveu worm around for a sec :P Oct 13 21:13:32 apparently it's allo Oct 13 21:13:47 lol missingno hastebin just uses the extension for syntax highlighting Oct 13 21:13:50 hmmm Gravity.RIGHT is also flipped Oct 13 21:14:20 Gravity.END must be a thing, right? missingno Oct 13 21:15:43 If I'm storing a "duration" there is no need to use Unix time or anything is therE? Oct 13 21:15:43 yes but everything is doing the opposite of what I expected Oct 13 21:15:51 Gravity.END makes the window be on the left Oct 13 21:15:53 I can just store minutes as the smallest unit? Oct 13 21:16:19 So I can just store an int called minutes right? Oct 13 21:16:29 AKK9: Your not giving any context Oct 13 21:16:38 what are you trying to do? Oct 13 21:17:31 orbyt_: I am storing a duration against some items, which will range from 1 minute to 2 hours. Is it safe to store this in minutes as an int? Oct 13 21:18:18 sounds ok, as long as your number of minutes isn’t greater than max int Oct 13 21:18:41 which would probably be a length of time that we would all be long dead by Oct 13 21:19:24 oh weird I used getWindow().setGravity instead of getWindow().setAttributes() and suddenly all is well Oct 13 21:19:48 weird Oct 13 21:20:43 Hi sorry I just disconnected, not sure if you saw my reply Oct 13 21:21:16 I am storing a "duration" against my items, this will range from 1 minute to 2 hours. Is it safe to store this in minutes as an int? Oct 13 21:21:25 should be Oct 13 21:21:36 Thanks Oct 13 21:22:35 AKK9_: unless you use picoseconds as unite of measure Oct 13 21:22:42 unit Oct 13 21:23:01 Lol nah I'm not doing that Oct 13 21:31:12 http://pastebin.com/iFhWFxAt - does anyone see anything that sticks out that i'm doing wrong with preparing mediarecorder? Oct 13 21:31:18 it fails on IOException Oct 13 21:34:24 fix the IO exception Oct 13 21:34:46 I'm not sure what's causing it though Oct 13 21:34:57 it says what's causing it Oct 13 21:35:09 stack trace or it didn’t happen Oct 13 21:35:26 ok I fixed it - mMediaRecorder.setVideoFrameRate(30); was missing Oct 13 21:35:36 How do I do a stack trace? I'm getting another error with stopping now Oct 13 21:35:48 by reading logcat Oct 13 21:35:50 they should be shown in logcat when you have an exception Oct 13 21:39:18 10-13 22:38:48.891 28432-28432/uk.ac.ed.faizan.objecttracker E/MediaRecorder: stop failed: -1007 10-13 22:38:48.891 28432-28432/uk.ac.ed.faizan.objecttracker E/object:tracker: Runtime Excepption: java.lang.RuntimeException: stop failed. Oct 13 21:39:42 that's only what's being printed for the stop exception Oct 13 21:40:36 Faizan: Note that you're only printing the exception message, not the full stack trace. Oct 13 21:40:51 Do yourself a favour and replace that Log call with `throw new AssertionError(e);`. Oct 13 21:41:19 Though I dunno whether the stack trace will tell you much here (just general advice). Oct 13 21:41:44 Aha more info Oct 13 21:42:55 But yeah TacticalJoke you're right, really doesn't tell me much Oct 13 21:44:31 Hello. I am trying to get a text preference in a Settings activity to show its current value. I've tried multiple methods but they all end in an error saying "Must be run after super.onCreate" (which they are). Any ideas? Oct 13 21:45:13 Faizan: I wonder whether any of these answers is relevant: https://www.google.com/search?q=MediaRecorder%3A+stop+failed Oct 13 21:45:39 I've checked at least all on the first place Oct 13 21:45:55 I'm using SURFACE as a video source and there's not much about that Oct 13 21:46:10 first page* Oct 13 21:47:45 hi I am wondering if I can use my nvidia video card to compile android apps in android-studio I am training a neural net and its going to take like a month at this rate Oct 13 21:48:18 if you want to port the build system to run on CUDA or something, you might be able to Oct 13 21:49:01 not a bad idea but I dont think I can do that myself unfortunately unless its easier than I think...is it? Oct 13 21:49:09 If I use Surface as a VideoSource, do I need to setPreviewDisplay? Oct 13 21:49:19 (for MediaRecorder) Oct 13 21:50:01 what would a gpu do with compiling apps Oct 13 21:50:02 s73v3r, do you mean the ubuntu desktop as the build system or do you mean android-studio? Oct 13 21:50:12 a gpu isn't a gpcpu Oct 13 21:51:24 well I know its possible to compile some system software on clusters I just assumed maybe you could do it on the video cards as well Oct 13 21:51:45 eh, no, not possible Oct 13 21:52:04 disk IO is typically the bottleneck anyway Oct 13 21:52:06 disk io and then ram Oct 13 21:52:47 transhuman_: can't you use the idle time of your brain to compile your software. Aren't you transhuman, after all? Oct 13 21:53:01 transhuman_: I meant gradle and the different compilers Oct 13 21:53:10 you’re probably not gonna happen Oct 13 21:53:16 it’s probably not gonna happen Oct 13 21:53:22 yoiur right there Oct 13 21:54:33 you can build neural nets on the gpu or train them rather so I figured that it might be possible...obviously it isnt thanks for answering the question Oct 13 21:54:58 neural nets operate differently than typical software Oct 13 21:55:14 question what compiler is it that android compiles on? Oct 13 21:55:49 I assume its not gcc ? Oct 13 21:56:02 java compiler and lots of java code Oct 13 21:56:12 and a few c++ applications Oct 13 21:56:17 ah ok thanks Oct 13 21:56:59 gpu's are good at vector operations and such Oct 13 21:57:02 not much for anything else Oct 13 22:01:31 I have a gig of training data for the neural net embedded in my android app its going to take FOREVER... Oct 13 22:01:41 Does anybody have a tutorial of using Surface to record? Oct 13 22:01:53 Using MediaRecorder.VideoSource(SURFACE) Oct 13 22:01:59 transhuman_, what does this have to do with android apps Oct 13 22:02:12 rather, what does it have to do with building Oct 13 22:02:32 I am training the android app with a data set its not written to do it seperately Oct 13 22:02:59 if i could just insert the trained net it would be much faster Oct 13 22:03:06 its for OCR Oct 13 22:03:22 transhuman_: can't you upload the net after you trained it on a desktop? Oct 13 22:03:37 yes, you package it into the android app after you're done training Oct 13 22:03:40 building is irrelevant Oct 13 22:03:57 Yes i might have to do that I just didnt want to get into the app internals if I could avoid it but looks like I will have to Oct 13 22:04:05 huh Oct 13 22:04:07 you're making no sense Oct 13 22:04:13 I didnt write the app Oct 13 22:04:19 so? Oct 13 22:04:28 are you lazy? Oct 13 22:04:30 can’t you give the trained net to the developer? Oct 13 22:04:43 I don't understand how building is relevant to this at all Oct 13 22:04:49 I can do it I was just hoping to avoid it Oct 13 22:04:50 other than the 1 build you do after you finish all the training data Oct 13 22:05:13 why are you inserting a net into someone else’s app? Oct 13 22:05:40 and how are you sure that the app is going to be able to read it? Oct 13 22:05:42 it trains on different character sets. I am just training it on a different set of characters Oct 13 22:05:58 it can read it same formate different dataset Oct 13 22:06:16 you're still making no sense Oct 13 22:06:20 this takes no time at all Oct 13 22:06:29 you run your training, package the result into the app, done Oct 13 22:06:45 Yes I will do that, as I said I was hoping to avoid it Oct 13 22:06:51 avoid what? Oct 13 22:07:02 training it separately Oct 13 22:07:03 how else are you going to get the data into said app Oct 13 22:07:11 there's no separate training Oct 13 22:07:13 what are you talking about Oct 13 22:07:19 the app was built not to do separate training Oct 13 22:07:33 then fix the app Oct 13 22:07:36 it trains at compile time Oct 13 22:07:39 yes i will Oct 13 22:07:43 it trains at compile time Oct 13 22:07:46 that's an easy fix Oct 13 22:07:50 that's just a build change Oct 13 22:07:53 what app is that? Oct 13 22:07:58 it’s an easy fix if it’s your app Oct 13 22:08:07 it's an easy fix if it's any random app you download... Oct 13 22:08:23 easy-ocr-scanner Oct 13 22:08:24 "training at compile-time" = insert your trained data at compile time Oct 13 22:09:04 meh, costco stopped selling google play gift cards Oct 13 22:09:07 they were a good discount... Oct 13 22:12:35 Is a 1px list divider (e.g., for a ListView/RecyclerView) sensible, now and in the future? Oct 13 22:12:48 I notice that ListViews have a 1dp divider by default now (used to be 1px). Oct 13 22:13:25 On my screens, 1dp looks ugly. Oct 13 22:15:35 I was actually wrong its already trained the neural net..so thats not why its taking so long to compile must be some configuration problem with android-studio! Oct 13 22:16:34 how long is long? AS is kinda slow to compile Oct 13 22:16:40 2 days Oct 13 22:16:44 still going Oct 13 22:17:17 "Two days? That's nothing" -- Gradle, Inc. Oct 13 22:17:45 so this is normal for a gradle build? Oct 13 22:18:27 Oh no. I'm just kidding. Didn't even realise you were talking about Gradle building (which kinda ruins my joke). Oct 13 22:18:48 adq oh boy mpandroid chart 3 beta 1 is like 57fps @ 50Hz Oct 13 22:19:03 think i am going to restart android-studio and load it again Oct 13 22:20:06 hello guys, anyone know a proper way to cleanup an AsyncTask? Oct 13 22:20:24 I'm using cancel(true), but it doesn't get destroyed.. Oct 13 22:20:56 fvpinheiro: What is the task doing? Network IO? Oct 13 22:21:14 MPAndroid chart is so tedious to set up though :/ Oct 13 22:21:21 just a simple remote call to another app Oct 13 22:21:25 but I'm impressed, it's not slowing down at all for 1 axis Oct 13 22:21:48 fvpinheiro: Can you just cancel the call itself? Oct 13 22:22:07 I'm using this.cancel(true) on postExecute... Oct 13 22:22:08 There are cases where AsyncTask.cancel -- and anything like it -- will not work. One example is certain networking situations. Oct 13 22:22:44 Anyone use rxandroidble? Getting the following after a crash: Caused by: BleGattException{status=8, bleGattOperation=BleGattOperation{description='CHARACTERISTIC_WRITE'} Oct 13 22:22:56 But a property of 8 indicates write permissions Oct 13 22:23:00 By "cancel the call", I mean "close the socket" or something like that. Oct 13 22:25:42 @TacticalJoke, when I mean destroy the AsyncTask is remove the thread running it Oct 13 22:26:16 This is what I mean. You can't always do that. `AsyncTask.cancel(anything);` will not work in many cases. Oct 13 22:27:03 2 days? to compile? sounds like a bug Oct 13 22:27:11 fvpinheiro: In my app, for example, I close the socket to stop the thread. Nothing else works in certain situations. Oct 13 22:27:16 i.e. your pc froze on some network connectivity, transhuman_ Oct 13 22:27:25 either that, or you have a really piece of trash pc Oct 13 22:28:26 fvpinheiro: How are you doing this remote call? Oct 13 22:29:05 Note that what I say about AsyncTask.cancel also applies to FutureTasks, Thread.interrupt, etc. Oct 13 22:30:53 TacticalJoke: re 1px vs 1dp - as usual, depends :) in theory, 1dp is less worse, so it avoids disappearing altogether on a particularly fine (or distant) display. But (as you probably saw) can result in visually thicker than desirable dividers Oct 13 22:31:21 fvpinheiro: you said you are doing cancel in onPostExecute, that means the doInBackground has finished Oct 13 22:32:17 TacticalJoke: resolution dependent size is probably one workaround, but I'm not a big fan of how android does it, especially on devices like tvs that are viewed from afar Oct 13 22:32:50 kbs: Ah, that's true. I was in "one size fits all" mode. Oct 13 22:34:26 I guess I could use 1px all the way up to , whereupon I use 1dp. Oct 13 22:36:32 * kbs wishes luck around android dp and resolutions :) Oct 13 22:39:22 TIL I learned that N has a dynamic density bucket setting Oct 13 22:39:30 oldass news I know Oct 13 22:39:48 also wow that was redundant Oct 13 22:41:57 Hi guys! I'm trying to setup Google login feature. I call GoogleApiClient.Builder.build() method to create an instance of GoogleApiClient and it fails with java.lang.IllegalStateException: Already managing a GoogleApiClient with id 0 Oct 13 22:42:17 It drives me nuts, nothing I found in Google helps Oct 13 22:42:38 Does anybody has experience with Google SDK? Oct 13 22:43:00 then that's because you've already received a GoogleApiClient Oct 13 22:43:10 and you're trying to create another when you've already gotten it Oct 13 22:43:19 I mean, going by reading english in any case... Oct 13 22:43:41 In addition to what pfn said, literally first few results have the answer: http://stackoverflow.com/questions/36105118/already-managing-a-googleapiclient-with-id-0-in-fragment Oct 13 22:43:56 Should i put my java classes in different folders? Oct 13 22:44:02 Yes Oct 13 22:44:15 orbyt_: yes to me? Oct 13 22:44:19 yes Oct 13 22:44:42 Because it's getting crowded here. Also layouts ? Oct 13 22:44:56 pfn: well, I understand that, it's just that I have the only place where I create this object. Oct 13 22:45:04 you cant put layouts into subdirectories without a few hacks torak Oct 13 22:45:11 AlexBerdnikov, doesn't mean you can't be calling it multiple times Oct 13 22:45:23 s/can't be/aren't/ (or the framework doing such a thing) Oct 13 22:45:27 orbyt_: hmm okay than. Oct 13 22:45:34 orbyt_: thank you btw Oct 13 22:45:41 mhm Oct 13 22:45:59 pfn, thanks, I'll check it for this behavior Oct 13 22:48:02 pfn, you were right :) Oct 13 22:48:28 The method I'm trying to initialize google api in called twice. Oct 13 22:49:45 Damn, it's so silly... I have similar gotchas in the past and I didn't even think about it this time :) Oct 13 22:49:56 Thank you, mate Oct 13 22:53:30 Anyone mind checking this out: http://stackoverflow.com/questions/40031985/blegattexception-when-writing-to-a-particular-characteristic Oct 13 22:57:05 best way to test an app coming out of sleep? go Oct 13 22:57:06 :) Oct 13 22:58:58 xximjasonxx: You mean "having been killed while running in the background"? Oct 13 23:11:36 Does anybody have any experience recording from a Surface (using setAudioSource(SURFACE) on a MediaRecorder? My app doesn't seem to throw any errors when starting the recording, but when it's stopped, the file doesn't open. Oct 13 23:32:47 I'd like to detect if my main Activity is launched again after being sent to the background with the HOME button, but I can't find how to do this. Any help please? Oct 13 23:33:55 write something in the shared preferences Oct 13 23:35:04 when would you write that? I can't detect the HOME button being clicked Oct 13 23:35:23 Does it have to only be the home button? Oct 13 23:35:41 cause you could just do it in onPause or something Oct 13 23:35:46 http://stackoverflow.com/questions/40032686/android-opencv-recording-javacameraview if anyone can take a look i'd *greatly* appreciate it Oct 13 23:37:20 but onPause is launched even when you switch from one activity to another Oct 13 23:37:49 I'd like to know when the user has exited my app, but it's still running in background Oct 13 23:38:25 aksn: Why do you want to know this? Oct 13 23:40:10 TacticalJoke, well, it's a bit tricky. I'm using Firebase Cloud Messaging, and when you click on a notification and the app is already running in background it doesn't work Oct 13 23:40:37 but it does work when the app is not running, or when it's in foreground Oct 13 23:40:51 What happens when you click the notification? Not sure what you mean by "it doesn't work". Oct 13 23:41:16 I can't get the payload sent with the FCM console Oct 13 23:43:38 when the app is running I get it with a FirebaseMessagingService, when it's not running I get it with an Intent sent by the notification in the onCreate method Oct 13 23:43:52 but this doesn't seem to work when the app is in background :( Oct 13 23:45:54 Oh, not sure; sorry. Have you seen these SO answers? https://www.google.com/search?q=firebase+cloud+messaging+notification+app+background Oct 13 23:46:11 Never used FCM, personally. Oct 13 23:46:38 likely need to just reget the instant on a different lifecycle method :) Oct 13 23:46:42 *intent Oct 13 23:48:23 TacticalJoke, thank you for your help. it's driving me crazy and all those google links are already clicked in my browser ;-P Oct 13 23:49:53 kbs, that sounds interesting, I'll take a look at it, but I'm afraid I'll still have to detect this situation, because I can't execute the action I want whenever onCreate is execute Oct 13 23:50:04 I'll have to play with many onXXX :((( Oct 13 23:50:14 is your activity set to singletop by any chance? Oct 13 23:50:24 kbs, no, it's not Oct 13 23:50:52 but it has this intent-filter Oct 13 23:51:11 Oct 13 23:51:11 Oct 13 23:51:11 Oct 13 23:51:11 Oct 13 23:51:19 sorry for flooding Oct 13 23:51:49 one suggestion - just confirm what you see out of getIntent() within your onResume() Oct 13 23:56:09 there isn't the information I need in onResume() Oct 13 23:56:16 why not? Oct 13 23:56:30 I don't really know Oct 13 23:56:56 meaning, the intent from which (presumably :) you populate info in the onCreate() is also available at onResume() Oct 13 23:56:56 I'm just a couple of days using FCM and it is a real pain Oct 13 23:57:44 the intent is populated automatically by the FCM notification when you click on it Oct 13 23:58:12 yes, but you unpack it within the activity of interest under discussion, no? Oct 13 23:58:23 any way to exclude certain files/directories in assets from build/? Oct 13 23:58:27 http://stackoverflow.com/questions/40032686/android-opencv-recording-javacameraview if anyone can take a look i'd *greatly* appreciate it Oct 13 23:58:34 kbs, exactly Oct 13 23:58:50 aksn: then take a look at the output of getIntent(), from within your onResume() method Oct 13 23:59:13 let's take a look again Oct 14 00:01:45 aksn: if it's simplest/quickest - populate your UI state from examining getIntent() within your onResume(), rather than onCreate(). You can set up your layout in onCreate() and populate it within onResume() - that's the thought. You can also do this in other onXX methods, but if onResume() works, is simpler to "do the right thing" in more situations Oct 14 00:01:48 Faizan, uh, ask once a day, not every 10 minutes Oct 14 00:01:59 bitkiller__, exclude from build/ what? Oct 14 00:03:28 pfn: It's a new day for me :> Oct 14 00:03:53 But yeah sorry, just aggravated with it Oct 14 00:03:54 pfn, good evening.. i have a html SPA and would like to include only the minified files in the build output Oct 14 00:04:12 but keep the sources in the project tree Oct 14 00:04:16 Faizan, then do better googling Oct 14 00:04:26 bitkiller__, #1 suggestion, do not care about what goes into build/ Oct 14 00:04:47 care about what goes into your apk Oct 14 00:04:59 and you can use packagingOptions to declare what to exclude Oct 14 00:05:05 pfn, yes, build=apk Oct 14 00:05:12 no, build/ != apk Oct 14 00:05:27 pfn, in what i said above, i mean Oct 14 00:05:54 kbs, your approach seems to work when the app is not running when receiving a notification, which gives me some hope Oct 14 00:05:57 I'll give it a try Oct 14 00:05:58 use packagingOptions exclude Oct 14 00:06:09 thank you so much for your time :) Oct 14 00:07:04 pfn, that looks the way to go Oct 14 00:07:08 Meh pfn I guess but I really don't know what to google now at this point Oct 14 00:07:09 pfn, found this http://stackoverflow.com/a/29168827/656927 Oct 14 00:07:25 pfn, but it's ugly Oct 14 00:08:13 why are you putting it in your assets/ folder if you don't want it included Oct 14 00:08:23 that's the whole point of the assets folder Oct 14 00:09:12 well, i inherited the code, which is a mess, and i'm trying to organize it Oct 14 00:09:13 the aaptOptions mentioned there work as well Oct 14 00:09:25 then organize it by moving it out of assets Oct 14 00:10:09 the result apk is getting too large (30MB) but it should be 3MB of effectively used resources Oct 14 00:11:08 bitkiller__ also there have been some recent devbyte videos on shrinking the apk Oct 14 00:42:49 I hate when accessibilityservices eat a dick on android Oct 14 00:43:20 there is absolutely no indication that they stop working, other than that they stop... and you have to reboot the device to get them started again Oct 14 00:59:43 hi Oct 14 01:00:10 "CastButtonFactory.setUpMediaRouteButton" -- if using that to set up a cast button, is there a way to set up a listener so i know WHEN a device becomes available? Oct 14 01:08:04 hi Oct 14 01:08:47 hi AlecTaylor, been scoring lots of runs lately? Oct 14 01:08:59 My app is data-driven, and uses OkHttp. Is there some mock server enabling every component to be tested without actual server connection? Oct 14 01:09:12 (including e2e) Oct 14 01:09:22 ir7466 totally ;) Oct 14 01:09:37 https://github.com/square/okhttp/tree/master/mockwebserver ? Oct 14 01:11:12 ir7466: Yeah I looked at that, but AFAIK that was just for testing the low-level stuff, it's not a proper DI that can be compiled into the app Oct 14 01:16:40 I've got a menu item, for: " app:actionProviderClass="android.support.v7.app.MediaRouteActionProvider" " Oct 14 01:16:55 when a device becomes available, the menu item magically appears Oct 14 01:17:09 is there a way to monitor for changes in that icon? Oct 14 01:17:23 like if the menu item appears, have a listener to // do someting Oct 14 01:19:02 You can just println when it's instantiaed Oct 14 01:21:28 how do i know when its instantiated? Oct 14 01:26:33 Actually the layout debugger might help Oct 14 01:32:43 gah this samsung phone is pausing animations during bluetooth operations for some reason Oct 14 01:37:48 the phone is or the app is Oct 14 01:39:36 that is a good question that will be answered when I figure out what threads are involved Oct 14 01:39:44 but most other phones do not have this issue Oct 14 01:40:19 s/will be/may be/ Oct 14 01:40:41 last samsung issue was a mysterious entire-phone freeze upon allocating a bitmap, don't think I got to the root of that Oct 14 01:41:26 your phone is freezing, other peoples phones are burning Oct 14 01:41:31 samsung not having a good run Oct 14 01:42:03 [canned laughter] Oct 14 01:42:27 How do I transparently intercept calls to my server with mock responses? - http://stackoverflow.com/q/40033482 Oct 14 01:43:07 actually I am pretty sure it is not the main thread because most of the ui remains interactive and moving Oct 14 01:43:14 just this one animation stops Oct 14 01:43:19 a circular reveal Oct 14 01:43:32 animatedvectordrawable? continues to spin along in the meantime Oct 14 01:44:28 now if only the threads tab did not become so difficult to work with Oct 14 01:47:19 huh happens on an s5 as well Oct 14 01:59:05 missingno lol ! thats a new one ! Oct 14 01:59:14 (animations paused during BT) Oct 14 02:00:09 ugh the moment I hit pause in the debugger the animation completes Oct 14 02:00:23 RenderThread I want to see what you are doing! Oct 14 02:00:28 maybe I should check if that is the right thread Oct 14 02:03:19 so anyways, is adding new permissions a disaster for your play store autoupdate anymore? Oct 14 02:03:27 I figure this should be different with M Oct 14 02:08:10 ooo interesting logcat 'ViewRootImpl: sendUserActionEvent() mView == null' Oct 14 02:09:03 oh unrelated Oct 14 02:17:41 After creating a new project via Android Studio from a Github repo., Android Studio isn't detecting nor using gradle to build my project. Oct 14 02:17:53 Can someone point me in the direction of some docs on how to ensure Android Studio builds using gradle? Oct 14 02:20:03 dragorn wtf, 80 next week ? Oct 14 02:21:04 ok I have discovered that it is one of the other animations on the screen that happily continue on with their lives Oct 14 02:23:12 narrowed it down to the animatedvectordrawable Oct 14 02:24:09 ah that might explain why it doesn't happen on the newer devices that probably have a different impl for thay Oct 14 02:24:12 *that Oct 14 02:26:43 kind weird for circular reveal to just stop half way when a few frame are dropped tho Oct 14 02:28:23 I can't tell where RenderNodeAnimator tries to do its work Oct 14 02:28:29 all native calls... Oct 14 02:49:06 lol they use hungarian notation in cpp too Oct 14 02:52:16 wow, "it takes roughly 165 pounds of raw mined materials to make the average cell phone," Oct 14 02:52:24 is it possible to put an onclicklistener directly on a menuitem? Oct 14 02:52:29 instead of having to go through onOptionsItemSelected() Oct 14 02:53:38 ah... setOnMenuItemClickListener looks like it might work Oct 14 02:58:53 hmm I can probably think of a more efficient way to rotate this icon, but it is only going to get fancier Oct 14 02:59:07 maybe I can bypass VectorDrawableCompat for 5.0 and 5.1 **** ENDING LOGGING AT Fri Oct 14 02:59:58 2016