**** BEGIN LOGGING AT Sat Oct 01 02:59:58 2016 Oct 01 03:11:41 hi Oct 01 04:22:20 When should I call `activity.finish();`? - The login example showed it being called in `onPostExecute` Oct 01 04:22:44 Do I call it before I call `startActivity`? Oct 01 05:14:42 is there a way to check inside my compiled APK to see if one of the icon specs made it into the build? Oct 01 05:22:42 Sure, just google apk decompiler. There's even an online service that you pass an apk and get a zip in return Oct 01 05:23:26 You could probably also just unzip the apk, I believe pngs should still be viewable Oct 01 05:33:48 How can I tell a SmoothScroller to scroll the target to the top of the page? Oct 01 07:38:26 thanks SimonVT Oct 01 07:38:42 unzipping gave me what I need I think Oct 01 07:39:29 I have an icon in drawable-xxxhdpi-v4, but the docs are saying there should be res/mipmap-xxxhdpi/my_icon.png - drawable is what Unity put by default, anyone able to explain the difference? Oct 01 07:42:39 ok jumped the gun on that question, my bad. Found the reading I somehow missed initially. Oct 01 07:58:15 Totally unrelated, but think of this whenever you think that the Android documentation sucks https://developer.wordpress.org/themes/basics/the-loop/#remove-this-section Oct 01 08:00:20 Awesome, it doesn't take you to what I'm seeing. It's this particular block of text: "This section needs to be removed, but exists because of a bug in the handbook plugin that does not properly show the next section in the topics box." Oct 01 08:03:45 hi guys Oct 01 08:03:55 i am on android studio Oct 01 08:04:07 i am using genymotion emulator Oct 01 08:04:31 i have installed genymotion plugin Oct 01 08:05:55 and when i click on genymotion icon in android studio i can see device and status is on but when i click on green icon to run my app adb cant find genymotion device Oct 01 08:06:00 what should i do ? Oct 01 08:32:28 I wonder whether Jake Wharton gave up on this channel. Oct 01 08:50:19 you can ask him Oct 01 09:52:05 I know all about Realm, now! Oct 01 10:32:21 How does Realm Mobile Platform compare with Google Firebase on scalability? Oct 01 10:37:29 How do you host a Realm Mobile Platform server? There is nothing about that in the documentation Oct 01 10:38:45 Hello Oct 01 10:38:59 anybody got Android wear 2 preview 3 working with an iPhone? Oct 01 10:40:06 Can you run Android on an iPhone? Oct 01 10:43:15 Nope.. on a huawei watch Oct 01 10:43:25 I want to pair it with an iPhone. Oct 01 10:43:45 It worked when I had Wear version 1 Oct 01 10:44:21 but after flashing it with wear 2, preview 3 it gets stuck on "continue setup on phone" screen Oct 01 10:45:16 Seen that problem solved on an Android phone by updating play services and wear app Oct 01 10:45:27 but no mention about an iPhone Oct 01 10:45:48 it worked with preview 2, although it was pretty unstable Oct 01 10:46:52 SUP everyone Oct 01 10:47:02 Melatonina: do you have a 10 Inch tab? Oct 01 10:48:01 DelphiWorld: You already asked me that. I don't have any tablet, sorry. Oct 01 10:48:12 Melatonina: i forget :-P Oct 01 10:48:20 someone have a 10Inch tab... please shoot :P Oct 01 10:49:10 what's wrong with an emulator? Oct 01 10:49:25 Melatonina: HAHAHA, accessibility ;) Oct 01 10:49:38 i have a 5.5Inch phone, and a 7 inch tablet. but not 10 Oct 01 10:55:09 only > 8.5 inch matter Oct 01 10:55:40 Ashiren: i think you're allready busy ... so no need to bother you Oct 01 10:57:09 oh ok Oct 01 10:57:27 Ashiren: i just wanted someone to take me a screenshots from my app into the tablet Oct 01 10:58:02 i hae 8" tablet, some noname, i havent turned it on since 2 years :o Oct 01 10:58:14 haha Oct 01 10:58:17 plus why dont you use emulator Oct 01 10:58:24 i have a huawei 7Inch tablet (4.4.2 Oct 01 10:58:39 Ashiren: emulator dont work with TalkBack, accessibility ;) Oct 01 10:58:42 mine has 4.0 or maybe 4.1 Oct 01 10:58:52 aww Oct 01 10:59:08 so scale up the phone screenshots :v Oct 01 10:59:21 HAHAHA Oct 01 12:08:54 Hi. I'm looking to learn app development. I am making toy apps to understand the different methodologies that can be used to update apps. I'm looking at both a real-time implementation and one where immediate notification is not needed. What technologies should I look at? Oct 01 12:26:08 hi Oct 01 12:26:35 Is this the right way of serialising a POJO array into an ArrayView? - http://www.vogella.com/tutorials/AndroidListView/article.html#androidlists_inputtype Oct 01 12:44:12 AlecTaylor: hi Oct 01 12:45:47 hi Oct 01 12:58:56 hey is someone using visual studio with C++ for android development? Oct 01 12:59:38 I have an app for windows,ios and android that share their graphics code (opengl es 2). Can i also use shared audio code somehow? Oct 01 12:59:44 like OpenAL for desktop Oct 01 13:02:58 feliwir: are you writing Android applications in C++? Oct 01 13:03:24 Melatonina, yes. I am using C++ for all mobile platforms Oct 01 13:03:49 feliwir: are you writing a game or a more typical application? Oct 01 13:04:12 more a graphical application that is using OpenGL ES Oct 01 13:04:20 i would call it a game, yes Oct 01 13:06:31 is it advisable to use that approach for your average Android application? Oct 01 13:07:52 Melatonina, the thing is that i don't want to write seperate code for every platform (android, ios and windows phone). The java approach seems very bound to android Oct 01 13:08:33 feliwir: ok. Thanks for your answers Oct 01 13:10:02 feliwir: did you know this one? http://superpowered.com/superpowered-audio-sdk-for-ios-and-android Oct 01 13:13:01 ah thanks i'll look at it Oct 01 13:13:44 what would be the native to do it? Which header to i need to play sound Oct 01 13:14:48 What do you mean? Oct 01 13:15:47 well in C++ i can include headers: #include etc. but i don't know whats the header for sound in android Oct 01 13:17:37 Ah, ok. Sorry, I only programmed Android in Java Oct 01 13:18:05 feliwir: https://github.com/googlesamples/android-ndk/tree/master/native-audio Oct 01 13:18:21 feliwir: don't you like google? :D Oct 01 13:18:39 no, i hate it :D Oct 01 13:20:31 what kind of game are you developing? Oct 01 13:23:37 Melatonina, i was thinking about a simulation game that teaches principals of technical informatic Oct 01 13:23:49 a little bit like redstone Oct 01 13:23:53 from minecraft :D Oct 01 13:24:15 :D Oct 01 13:24:19 Cool Oct 01 13:45:54 Can you prevent Google from spying your data on Firebase? Oct 01 13:59:14 Melatonina: out of curiosity, why would you want to prevent that? Oct 01 14:00:10 Idiosyncratic: my data contains information about crimes that I committed and I plan to commit Oct 01 14:00:23 Idiosyncratic: including murders Oct 01 14:00:40 Melatonina: oh. I understand now. Oct 01 14:00:46 :D Oct 01 14:01:12 Idiosyncratic: Or simply protect the privacy and of my users Oct 01 14:01:24 Idiosyncratic: one of the two Oct 01 14:01:39 Melatonina: don't think that they care Oct 01 14:02:05 Idiosyncratic: I would be my first user. I care. Oct 01 14:02:42 Melatonina: not when Google handles that stuff. No-one can penetrate Google's defenses, steal the db and expose the information in it and make you liable for a lawsuit. Oct 01 14:03:48 Melatonina: you corporate developer :P Oct 01 14:04:15 Idiosyncratic: protecting their privacy from Google. Every string you write there is fodder for their data mining engines Oct 01 14:04:47 Melatonina: of course, but do you think that you stopping them datamining your particular data will do something? Oct 01 14:05:47 Melatonina: waste of time Oct 01 14:05:50 Idiosyncratic: sure. It will prevent them from data mining my particular data Oct 01 14:06:42 Melatonina: you haven't read Stallman literature, have you? You know that's a banned in most of the world, right? Oct 01 14:06:50 *that's banned Oct 01 14:07:10 Gah, the phrasing's wrong. You get what I mean. Oct 01 14:07:30 Idiosyncratic: encrypting strings it's not such a big problem Oct 01 14:07:48 Stallman is an idiot Oct 01 14:08:09 Melatonina: supporting the extra functionality of encrypted string is a big problem Oct 01 14:08:33 really it's just a function call Oct 01 14:08:52 Now, but what could happen in the future? Oct 01 14:09:05 what could happen? Oct 01 14:09:58 Melatonina: the point is that you can't know what could happen, so you must prepare for the unknown unknowns Oct 01 14:10:25 right, I'll encrypt my documents so that I'm prepared Oct 01 14:10:27 :D Oct 01 14:11:11 I wrote my first Firebase application! Oct 01 14:12:28 i encrypt everything with double rot13 Oct 01 14:12:52 :D Oct 01 14:13:29 Idiosyncratic: are you drunk today? Oct 01 14:13:35 ROT36 is more efficient. Oct 01 14:13:39 26* Oct 01 14:13:53 Melatonina: 1) I don't drink 2) feeling sick Oct 01 14:14:13 Idiosyncratic: I'm sorry. Flu' Oct 01 14:14:14 ? Oct 01 14:14:35 Melatonina: not that serious, but I feel like crap Oct 01 14:15:13 Idiosyncratic: it shows up in your discourses Oct 01 14:15:25 Yep Oct 01 14:16:49 Ashiren: do you use firebase? Oct 01 14:16:59 TacticalJoke: do you use firebase? Oct 01 14:17:12 Nope. Oct 01 14:17:28 nah Oct 01 14:17:44 Don't you two do analytics? Oct 01 14:18:39 I don't, no. Oct 01 14:19:09 TacticalJoke: but how do you pick which ones go to the gulag and which don't? Oct 01 14:21:47 I'm not really a fan of analytics. :S Oct 01 14:22:16 I don't exactly what analytics are Oct 01 14:22:38 My app is supposed to be a Good Citizen[tm]. Oct 01 14:27:08 What is a Good Citizen[tm]? Oct 01 14:27:52 Guys why don't I understand what you say? Am I retarded? Oct 01 14:27:54 Melatonina: Analytics is gathering data about users. Stuff like what buttons they click, how long they use the app for, etc. Oct 01 14:28:08 ok Oct 01 14:28:16 TacticalJoke: thanks Oct 01 14:28:37 It used to be called "spyware". :D Oct 01 14:31:18 Idiosyncratic: do you spy your users? Oct 01 14:32:10 What if they stare a bit too much to the nude picture of question n.63? Oct 01 14:32:23 at Oct 01 14:33:12 Melatonina: oh yeah Oct 01 14:33:21 Totally Oct 01 14:34:07 TacticalJoke: you sound kinda opinionated about analytics :D Oct 01 14:34:16 and n.48 and 23 to 31 and 37 to 45 and Oct 01 14:36:20 Melatonina: dude, what the hell? Did you bother so much as to name all of the questions that have women in them? :P Oct 01 14:37:00 Melatonina: oh wait, not all of them are like that Oct 01 14:37:02 Oct 01 14:40:07 capella-5x: ping Oct 01 14:43:54 My company has several apps that all authenticate against the same oauth server, getting the refresh and access tokens. I would like to be able to share these tokens between my companys different apps so I only have to log on to one of them. any idea what's the best way of doing this? my google fu is failing me Oct 01 14:54:04 ping indeed ☺️ Oct 01 15:02:40 how do u guys relax after a hard day of studing? Oct 01 15:02:45 studying* Oct 01 15:03:09 go drink with friends and forgot all-the-things Oct 01 15:36:13 Guys, is there a better method than the following one to execute some code not more often an "limit" milliseconds? https://gist.github.com/anonymous/733939eef9462e56defb65ddcc9576db Oct 01 15:36:37 I'm using this to update the database not more often than 1 sec, for example Oct 01 15:37:06 Does Android have some device to be used for this purpose? Oct 01 15:42:53 Melatonina: you mean execute something at a set interval? Oct 01 15:44:18 Idiosyncratic: no. I have to update the database when a EditText changes but not more often than 1 time per second to avoid sending an update for each keystroke. Oct 01 15:44:58 Idiosyncratic: you can call the schedule() method of that class as often as you wish, the Runnable won't be executed more often than limit milliseconds Oct 01 15:45:11 than one time per limit milliseconds Oct 01 15:57:38 anyone have any suggestions for a menu hanging off the screen? like these examples, and tried those solutions and others nothing works :( http://stackoverflow.com/questions/11603210/overflow-menu-incorrectly-positioned http://stackoverflow.com/questions/10257565/action-bar-menu-shows-off-screen Oct 01 15:58:27 menu is not only to far to the right, but its to low as well, hangs off the bottom and the right side Oct 01 16:06:36 hm, Andromeda dev kit might be available 10/4 Oct 01 16:10:11 wonder if this will be dart / flutter or something else Oct 01 16:14:51 how can I keep focus on an EditText after pressing enter on the keyboard? Oct 01 16:15:14 the keyboard remains, but the EditText loses focus Oct 01 16:15:38 this is what I'm doing http://gsick.com/paste/151/ Oct 01 16:23:37 pfn does SAF handle file locking at all? if you open a file to read, what happens if another app is writing to it ? Oct 01 16:30:20 Same as what happens if you don't lock a file on FS :) Oct 01 16:37:18 Mavrik have you done any work with SAF ? Oct 01 16:37:24 Yes. Oct 01 16:37:34 any pitfalls you can recommend avoiding :) ? Oct 01 16:37:48 does it work as expected .. Oct 01 16:38:26 It's essentially a rather thin layer over 3rd party content providers. Oct 01 16:38:33 So be as conservative as possible. Oct 01 16:38:48 E.g. I've seen apps do network requests when you ask for filesize (so don't do it on main thread) Oct 01 16:38:59 And being able to append to files isn't a given. Oct 01 16:39:05 And mostly it's out of your control :) Oct 01 16:39:51 Mavrik so for dropbox, how do you handle that, include their sdk / etc ? Oct 01 16:40:00 like to make it seamless ... Oct 01 16:40:24 For now SAF is enough for us. Oct 01 16:40:39 Defensive copy of files sometimes is still a smart thing to do if you need to do really fast accesses. Oct 01 16:40:51 Dropbox "SDK" is kind of a joke :) Oct 01 16:41:14 But... they don't export a contentprovider so you'll have to deal with it if you want access to DB Oct 01 16:41:18 *to DropBox Oct 01 16:42:25 Mavrik SAF is pretty old , 4.4 - i've found surprising little on it. would you say its pretty simple to get right ? ? Oct 01 16:42:51 it seems pretty straightforwards, but i'm confused about where the files are physically located Oct 01 16:43:25 technically, you just get FD, then a stream, so is the file even cached on device before you start reading it ? Oct 01 16:43:54 as i'm reading from the stream, is this just data being piped but the SAF provider from someplace over the network? Oct 01 16:44:01 s/but/by Oct 01 16:44:16 That's completely under the control of the content provider on the other side. Oct 01 16:44:22 hm k Oct 01 16:44:27 So the answer is "depends" :) Oct 01 16:44:31 Most of them will cache it locally. Oct 01 16:45:12 can you elaborate more on the defensive copy? are you saying just sink the whole stream into a file and operate on it directly ? Oct 01 16:45:39 and have you found any of the providers specifically to be buggier than usual ? Oct 01 16:45:50 i think most of my users will use google drive and box.net Oct 01 16:48:32 Umm, if you want to keep a longterm access to a file it's probably better that you copy it to your own apps storage and then start working on it (depends on your usecase) Oct 01 16:49:15 The annoyace we had is that you can't really check if the URI you get is writeable, which can be annoying if you also get URIs from GMail apps or whatnot Oct 01 16:49:41 Aaaand as I said, I wouldn't depend on the ability for the provider on the other side to append to a file. Oct 01 16:55:51 Mavrik ok thanks .. is there any way to know when a file you are interested in has changed ? Oct 01 16:56:41 since its a Uri, is it as simple as setting up a contentObserver for it ? Oct 01 16:56:47 Uri from provider Oct 01 16:56:59 (can i watch both files and directories, etc) Oct 01 16:58:30 Hmmm... I actually never tried that. Oct 01 16:58:56 ok thx Oct 01 16:59:28 even so, i'd imagine its up to each provider impl to do a notifyUriChanged on it Oct 01 17:00:04 yp Oct 01 17:00:13 We don't really hold on to files for a long time so that's not something we need. Oct 01 17:18:01 Mavrik have you ever built a DocumentsProvider ? Oct 01 17:18:06 nope Oct 01 17:19:21 lets say my app maintains a number of stored sessions, each with a bunch of sensor data. does it make any sense at all to expose these as 'files' from a custom DocumentsProvider ? Oct 01 17:19:40 they are just chunks of data in sqlite, not real files Oct 01 17:20:48 i'm guessing ... not. just want to make sure Oct 01 17:22:10 What format would the files be? What's the use case? Oct 01 17:22:40 I finally found a good tutorial for doing multiple api calls with RxJava using Observalbe.zip Oct 01 17:23:03 If anyone is interested -> https://newfivefour.com/android-rxjava-wait-for-network-calls-finish.html Oct 01 17:25:01 Mavrik yeah, i guess it doesn't make sense. the exported format would be ORC or RCFile Oct 01 17:25:25 but the user would go to the app and just export to their provider instead, i don't see why another app would need access to it Oct 01 17:30:09 g00s, no locking Oct 01 17:30:21 pfn thanks Oct 01 17:30:26 and yeah Dropbox is stupid, they refuse to support saf Oct 01 17:30:52 I assume last write wins Oct 01 17:30:52 pfn is there any way to know when a file changed ? Oct 01 17:31:14 you mean get a timestamp or notification? Oct 01 17:31:19 notification Oct 01 17:31:26 the latter with a content observer, possibly Oct 01 17:37:00 Hey. Is it possible to draw, say a circle, on a surface view when the user taps it? Oct 01 17:37:06 During recording of a video for example Oct 01 17:43:05 Faizan, of course it is possible to draw a circle in the surfaceview canvas, you just need a little logic to retrieve coordinates & event of your touch and draw the circle when necessary Oct 01 17:44:59 I'm doing something like so: http://pastebin.com/xrmXgVGL Oct 01 17:45:19 this will not work well Oct 01 17:45:31 it's less trivial than that to draw on a surfaceview Oct 01 17:45:41 you will find lot of examples online Oct 01 17:46:42 but basically the part where you draw the circle is more or less correct, so at least you have that, instead of doing it here just store in some members or attributes your coordinates & touch events (knowing x, y and if it's down, up, etc) Oct 01 17:47:25 and in onDraw of your surfaceview (see doc for lifecycle of surfaceview with surfacecreated & other stuff + some game loop with a fixed fps), you will draw your circle based on what you have in your members/attributes from the touch event Oct 01 17:47:55 Ah okay Oct 01 17:48:32 I think that makes sense, I'll read up on the lifecycle because i didn't know about onDraw.. Oct 01 17:48:35 appreciate the advice Oct 01 17:48:51 usually don't do anything blocking or heavy in onTouchEvent, just store/set variables there that you can reuse in another part Oct 01 17:49:29 okay gotcha, that was what I was thinking of doing, because I was also going to write the x/y coordinates as well as timestamp in a yml or xml file Oct 01 17:49:37 and save on the device somewhere Oct 01 17:58:16 adq: I can't seem to find anything about the lifecycle of surfaceView that mentions onDraw. Only surfaceCreated, surfaceDestroyed, and surfaceChanged Oct 01 18:00:00 You retrieve the SurfaceHolder in onSurfaceCreated Oct 01 18:00:16 and then use lockCanvas() / draw / unlockCanvasAndPost sequence to draw Oct 01 18:01:00 I retrieve the holder in onCreate Oct 01 18:01:17 I did that so that I could display a preview to the user even if the user wasn't recording yet Oct 01 18:14:42 I'm back! Oct 01 18:15:43 how to set a custom image as background of a recyclerview activity? i tried myRecyclerView.setBackground(R.layout.kitchen_background); but it's not the supported parameter Oct 01 18:17:38 setBackground does not want a layout id (which is internally an int, which will be taken as a color) Oct 01 18:25:44 adq how should i go about it? i swear i've tried tons of different things Oct 01 18:26:18 I don't really to recommand that, but since you asked Oct 01 18:26:52 lazy and inefficient: you could use a framelayout or a relativelayout with an imageview behind your recyclerview Oct 01 18:27:04 a bit better: use itemdecoration with your recyclerview Oct 01 18:27:58 more work: custom recyclerview Oct 01 18:27:59 adq, thanks i'll try the second option Oct 01 18:28:02 you have at least 3 choices Oct 01 18:28:10 yeah, good choice Oct 01 18:28:17 it is a custom recyclerview Oct 01 18:29:52 but i just want to make clear, i'm trying to add a background to the hole view, not just for every individual items Oct 01 18:30:08 yep Oct 01 18:30:15 and you said an image, not a color Oct 01 18:30:34 yes :) i found our how to make it as a color Oct 01 18:30:42 but i'm trying to attach my custom image to it Oct 01 18:31:04 Backgrounds are drawables, not layouts Oct 01 18:31:49 oh yeah, that's too Oct 01 18:32:03 so maybe you just need myRecyclerView.setBackground(R.drawable.yourdrawablebeingyourimage) Oct 01 18:32:17 don't expect good scaling Oct 01 18:33:31 i tried that last one adq, but after R.drawable i can't set my image Oct 01 18:33:42 "cannot resolve symbol" Oct 01 18:34:18 your image must reside somewhere in drawable folder or drawable-nodpi or drawable-hdpi or etc... in order to be available Oct 01 18:34:30 (and do not use an exotic format, png & jpeg no worry) Oct 01 18:34:49 but you will be horrified if the image ratio must be preserved anyway Oct 01 18:34:57 it's on every dpi directory and is a png image Oct 01 18:35:15 weird, idk then Oct 01 18:40:12 setBackground in View cannot be applied to int Oct 01 18:40:15 that's the error Oct 01 18:40:24 Is there a better method than the following one to execute some code not more often an "limit" milliseconds? https://gist.github.com/anonymous/733939eef9462e56defb65ddcc9576db Oct 01 18:43:36 hexagonSun_, oops sorry I forgot a part like: myRecyclerView.setBackground(ContextCompat.getDrawable(context, R.drawable.your...)); Oct 01 18:44:10 or maybe there is a setter which get a drawable res id as paramater i don't remember by heart you need to check the doc Oct 01 18:44:59 i'm pretty sure it will look ugly if your image is not something like a solid color or a deep gradient anyway Oct 01 18:46:01 adq, you beautiful human being Oct 01 18:46:34 it ended up working with myRecyclerView.setBackground(ContextCompat.getDrawable(myRecyclerView.getContext(), R.drawable.kitchen_background)); Oct 01 18:46:50 thank you so much :) Oct 01 18:47:02 thanks SimonVT, cause I totally forgot setBackground can take a drawable too ;) Oct 01 18:48:08 There's a bunch of different setBackground methods. Drawable, resource ids, colors Oct 01 18:48:24 thanks SimonVT i learn a new thing everyday :p Oct 01 18:48:38 Was my question understandable? Oct 01 18:51:39 hexagonSun_: I knew that but SimonVT has been quicker than me Oct 01 18:53:32 haha don't worry, im sure there'll be next times :p Oct 01 18:53:33 Melatonina, i saw your question but I'm not sure Oct 01 18:53:45 adq: thanks Oct 01 18:54:00 usually, when ppl don't answer to you, it's not that you're being ignored Oct 01 18:54:07 it's they don't know or don't want to answer Oct 01 18:54:27 no, I was sincerely worried that my question was not clear Oct 01 18:54:34 thanks Oct 01 18:54:36 you don't want 335 ppl to tell you they don't know the answer when you ask a question ;) Oct 01 18:54:39 yeah. i saw your question too Melatonina but i'm afraid i can't help you Oct 01 18:55:13 ok. that's fine. If you understood my question, other people will understand it too Oct 01 19:09:54 hey guys, why i am suddenly getting Error:(301) Error: Expected resource of type string [ResourceType] on a simple getString(); operation in my activity Oct 01 19:12:08 try clean / rebuild Oct 01 19:13:05 lol no i found out, for some reason those strings were not in strings.xml but in ids.xml Oct 01 19:15:45 File name don't matter in values/, you likely just forced it to recompile something by moving resources around Oct 01 19:47:33 hi guys Oct 01 19:47:51 can somebody tell me that how can i check if a broadcastreceiver is registered or not? Oct 01 20:06:00 I'm developing a widget-only app on the command line with ant+adb+am. What options do I pass to adb so I can debug the widget when it crashes? Oct 01 20:16:41 mcantor: what's a widget-only app? Oct 01 20:30:27 i assume it's an app which only defines a widget and not an activity. Oct 01 20:38:53 dragorn: Theoretically I need a configure activity too Oct 01 20:39:00 First Android app I've built, so I'm quite confused! Oct 01 20:39:43 why not the usual android studio approach Oct 01 20:39:52 for logging you do adb logcat Oct 01 20:40:01 or adb logcat -v time for more detaisl Oct 01 20:40:02 Ashiren: Aye, I figured that out, it even has -C for color output! Very handy Oct 01 20:40:04 details Oct 01 20:40:13 I can't use IDEs. Too confusing. tmux and vim are easier Oct 01 20:40:32 although youd need filter the output for just your app yourself Oct 01 20:40:42 also how android studio is more confusing than vim Oct 01 20:40:48 is it because you cant exit vim? Oct 01 20:40:54 and youre stuck :v Oct 01 20:43:00 yes ctrl-c doesn't work :( Oct 01 20:46:01 Oooh, I actually got it running! Phew Oct 01 20:48:49 mcantor: whoot! Oct 01 20:55:35 anyone work with the new nougat Html.fromHtml? Oct 01 21:23:12 g00s: Weekend !!!! Drink moar everything !!! :p Oct 01 21:25:32 capella: do you drink much alcohol? Oct 01 21:29:57 I'm wondering if someone can assist with drawing a circle on a touched position while a user is recording? Oct 01 21:30:12 I have the recording functionality working, I just cant seem to register on touch clicks on a surfaceview Oct 01 21:30:46 Melatonina: used to, hadda stop ... but I'm still there in spirit :p Oct 01 21:31:03 :D Oct 01 21:31:41 http://pastebin.com/ni1PVZ1F - is my logic wrong for this? Oct 01 21:31:42 Faizan: what does "can't seem to register on touch clicks" mean? Oct 01 21:31:53 As in, when I touch anywhere on my view, nothing happens at all Oct 01 21:32:01 None of the logs in the method I pastebinned are printed Oct 01 21:32:45 is there any other view in front? Oct 01 21:33:02 nope Oct 01 21:33:28 but it shouldn't matter should it? I'm not actually checking which view was touched Oct 01 21:33:35 just checking if there was *any* touch Oct 01 21:34:50 Faizan: http://stackoverflow.com/a/28979802 Oct 01 21:34:56 Faizan: does it help? Oct 01 21:35:10 brb killing myself Oct 01 21:35:15 forgot to register the listener........ Oct 01 21:35:56 thanks alot Melatonina lmao.. Oct 01 21:36:05 :) Oct 01 21:38:39 doh! Oct 01 21:39:59 Is overriding onDraw the only way to draw something on the surface view? Oct 01 21:40:18 I don't really fancy extending view because I have my own custom constructors and AS is shouting at me saying I can't use it when I extend view Oct 01 21:45:06 Yes, I guess onDraw is the only way Oct 01 21:48:30 ugh Oct 01 22:12:55 ]Canvas canvas = mHolder.lockCanvas(); - any idea why this might be returning null even though mHolder is set? Oct 01 22:13:27 the exact error is: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Canvas.drawColor(int)' on a null object reference, meaning mHolder.lockCanvas() returned null I guess Oct 01 22:16:01 what's mHolder? Oct 01 22:16:31 my SurfaceHolder, SurfaceView is defined in the xml, and mHolder = view.getHolder(); Oct 01 22:18:00 Ah, ok. I never do that. I always got the Canvas from the onDraw() parameter Oct 01 22:18:17 My way might not be good Oct 01 22:18:29 I'm not 100% sure how I'm doing this myself Oct 01 22:18:48 I wanted to extend View but I have a custom constructor that takes in widgets from the caller activity Oct 01 22:19:04 because I wasn't sure how to access the layouts (textview, button etc) otherwise, in the View class Oct 01 22:20:15 So how would you recommend I do this? Oct 01 22:23:19 I don't understand what's the problem with the constructor and subclassing. To work around that you could set properties post-construction instead of passing the information to the constructor Oct 01 22:23:35 I don't know if that solves your subclassing problem Oct 01 22:23:46 I still need to access widgets that are in another activity's layout Oct 01 22:23:51 I'm not sure if I'm making sense Oct 01 22:24:04 Yeah, you create the view with a default constructor Oct 01 22:24:23 then pass the other views by setting some properties Oct 01 22:24:26 or Oct 01 22:24:46 Say I have a MaiNActivity, and within the laoyut, a TextView. If I have a class say CameraPreview extends View, and in that CameraPreview class, I want to access the TextView in MainActivity, that's what I'm trying to do Oct 01 22:25:02 because CameraPreview is responsible for updating the timestamp of the recording, updating the buttons etc Oct 01 22:25:05 Yeah, you can do as I said Oct 01 22:25:15 but I would do it in another way Oct 01 22:25:33 CameraPreview should not update a timestamp TextView Oct 01 22:25:45 CameraPreview should signal that the timestamp is changed Oct 01 22:25:52 by calling a callback, if present Oct 01 22:26:02 Hmm Oct 01 22:26:04 from the outside you register a callback that updates the text view Oct 01 22:26:18 that's a good way to do it AND solves your problem Oct 01 22:26:24 I wanted to keep the camera functionality in one class Oct 01 22:26:44 Would I define my own callback? Oct 01 22:26:49 Yes Oct 01 22:26:59 OnTimestampChanged Oct 01 22:27:02 Hmm. Never done that before Oct 01 22:27:13 This is a good moment to begin Oct 01 22:27:18 Is there no simple way to access the textviews for now? Oct 01 22:27:51 I would design the class like that even if I didn't have your inheritance problem Oct 01 22:28:05 Fair enough Oct 01 22:28:34 If you change the way to display the timestamp, you just have to pass another callback. The preview class is done once for all Oct 01 22:28:47 It's not its business to know how you DISPLAY the timestamp Oct 01 22:28:53 only to provide an updated timestamp Oct 01 22:28:55 There's more than just the timestamp though Oct 01 22:29:00 Yeah understood Oct 01 22:29:15 well, make a different callback or multiple callbacks Oct 01 22:29:27 I'm also passing it the actual surfaceview defined in the layouts xml file Oct 01 22:30:17 does long click work on the emulator? it seems to be firing back instead of longpress, long press works on the app on real phones but not in the emulator Oct 01 22:31:06 Faizan: I didn't understand your last message, sorry Oct 01 22:31:28 wltjr: it works in my emulator Oct 01 22:33:02 Melatonina: odd is not here, even with default message app, on my phone long press brings up menu, on emulator nothing, just goes back Oct 01 22:33:42 wltjr: I have no idea. I can just tell I'm emulating a Nexus 5x. Oct 01 22:33:54 Sorry Oct 01 22:34:16 Melatonina: I found a way for now Oct 01 22:34:25 But i'll definitely take your advice when I have the functionalikty working Oct 01 22:34:30 I can extend the class with View now Oct 01 22:34:33 Ok :-) Oct 01 22:34:36 Melatonina: what version of android? 23? Oct 01 22:34:50 so to draw on a camera preview, should I override onDraw()? Oct 01 22:34:51 wltjr: yes Oct 01 22:35:19 Faizan: I never subclassed that view but I always do that Oct 01 22:35:28 Melatonina: ok will try that, x86 or x86_64? Oct 01 22:35:31 I'm listening for clicks and storing the click position in a few member variables, and now all I want to do is draw say a circle on that position Oct 01 22:36:07 Faizan: invalidate your view when the parameters that affect your rendering change Oct 01 22:36:10 Has anyone here used mopub? Is there a different between using mopub directly and using Fabric to implement it? Oct 01 22:36:17 difference* Oct 01 22:36:37 invalidate my surfaceview? Oct 01 22:36:45 Melatonina: no difference :( how long is your long press? 2 seconds or so? seems to just go back for me, never fires the menu Oct 01 22:36:59 wltjr: x86 Oct 01 22:37:02 I have an app where the menu shows half off screen, trying to see if the same on emulator Oct 01 22:37:14 Melatonina: I am on x86_64, not sure if that matters Oct 01 22:37:27 wltjr: no idea either Oct 01 22:37:29 also not sure if that is the image or host, I guess image, so can try x86 Oct 01 22:37:46 yeah seems menu alignment is handled by OS, its an old app trying to update Oct 01 22:37:59 God this is gonna be a lot of code change because of subclassing View Oct 01 22:38:04 Faizan: invalidate the view you are subclassing, yes. I guess the method is invalidate() Oct 01 22:38:18 apparently any methods in my class have to be run in the UI thread Oct 01 22:38:25 I'm currently running them in an Async thread Oct 01 22:41:30 off-topic: how many programmers do you guys estimate are in the world? Oct 01 22:43:55 Melatonina: keyboard works to fire off the stuff just will use that vs mouse Oct 01 22:44:58 orbyt_ lol Oct 01 22:45:12 g00s: serious question Oct 01 22:45:20 orbyt_: https://www.infoq.com/news/2014/01/IDC-software-developers Oct 01 22:45:33 Is there no other way to draw to a camera preview without onDraw at all? Oct 01 22:46:37 hmm ~15m in 2014 Oct 01 22:46:40 orbyt_: in the 2014, 18.5 millions of which 11 millions of professional and 7.5 millions of amateurs Oct 01 22:46:56 guess the menu alignment issue with the app is phone/device specific, it is aligned properly in the emulators, but not on my s7, will see if I can get a profile for the s7 and replicate Oct 01 22:47:03 recent online education bubble probably expedited that rate Oct 01 22:47:05 hmm Oct 01 22:49:02 Will FirebaseDatabase.getInstance().getReference().child("things").equalTo(username, "owner"); return all things owned by username in Firebase? Oct 01 22:51:09 orbyt_: do you use Firebase? Oct 01 22:51:24 I've 'used' it but dont actively use it Oct 01 22:51:50 Ok. Thanks Oct 01 22:52:06 How is your application going? Oct 01 22:52:25 Mine? Which one? Oct 01 22:52:29 All! Oct 01 22:52:40 Haha, I have lot's =/ Oct 01 22:52:46 :-) Oct 01 22:53:02 I only remember one application about planets Oct 01 22:53:02 Currently completely re-branding and re-releasing my favorite though Oct 01 22:53:06 Yup Oct 01 22:53:32 It's v1.4 in an open beta now, but will be pulling it from the store and rebranding Oct 01 22:56:02 What does it do? Oct 01 22:57:01 Could anybody help me with some simple XML? Oct 01 22:58:11 hey, I've added a FAB to my layout but it doesn't show, here is the layout http://pastebin.com/7P2vAfa8 Oct 01 22:58:23 what might be wrong? Oct 01 22:58:45 http://pastebin.com/RMG6QfiN - I'm trying to create 2 surface views, one on top of the other, but they both take up the entire screen. Oct 01 22:58:56 when I say one on top I mean one covering the other Oct 01 23:00:08 Faizan: use a LinearLayout. Set layout_heights to 0dp and layout_weights to the same value Oct 01 23:00:56 I meant overlaying each other Oct 01 23:01:02 would that not have one on top of the other Oct 01 23:01:16 Melatonina: Previous version: space news outlout, real time tracker, more. New versions goal is to make the topic of "space" more mainstream and easier to access. Oct 01 23:01:21 outlet* Oct 01 23:01:38 ah damn my original query is badly worded Melatonina Oct 01 23:01:52 I want surface view 1 completely overlapping surface view 2, i.e on top of it Oct 01 23:01:57 you may also need to mess with some things to get transparency, if you want that Oct 01 23:01:59 because one of them will be transparent, and the other wont Oct 01 23:02:14 Faizan: Have you tried a Framelayout? Oct 01 23:02:18 It orders on the z axis Oct 01 23:02:19 Yeah I have Oct 01 23:02:27 Faizan: isn't it what you are getting? Oct 01 23:02:29 What was the issue Oct 01 23:02:33 tried that first, then went for RelativeLayout Oct 01 23:02:44 RelativeLayout also orders on the z xxis Oct 01 23:02:47 axis* Oct 01 23:03:21 i have it working with RelativeLayout Oct 01 23:03:48 Hmm Oct 01 23:03:51 Let me try again Oct 01 23:04:08 it's stacked first to last, so the last element in your layout will be on top Oct 01 23:04:18 and you have to mess with color bits to get transparency Oct 01 23:04:26 Was it the same attributes I used? Oct 01 23:04:30 yeah that's no problem Oct 01 23:04:42 I have it working with relativelayout, but it covers my top and bottom toolbars Oct 01 23:05:21 god damn Oct 01 23:05:23 I really need sleep Oct 01 23:05:28 forgot to change layout_height to 0dp Oct 01 23:05:48 got it guys, thanks Oct 01 23:07:31 Hey all Oct 01 23:08:24 I'm making a simple app that sets an alarm based on the sunrise - if I want the only view in the app to be a preference-setter, how would I go about doing that? Oct 01 23:09:04 using 0dp for width/height is a linearlayout thang Oct 01 23:09:04 (i.e. The only screen a user will see/be able to access is a list of preferences they can edit (offset, alarm, alarm volume, etc.)) Oct 01 23:09:59 whatitis: the parent of the framelayout is linearlayout Oct 01 23:10:14 so wouldn't it be fine to set 0dp height and weight of whatever to the framelayout? Oct 01 23:10:23 i really need to rewrite it but I just want something working for now Oct 01 23:10:35 amorbix: Theres nothing you would do for it that you wouldnt for any other app Oct 01 23:10:38 if you have weights set Oct 01 23:10:55 yeah I do Oct 01 23:11:07 3 childs for linearlayout, each with 1, 8 and 1 weight respectively Oct 01 23:13:06 linearlayout won't overlap Oct 01 23:15:18 i know Oct 01 23:15:22 linearlayout is the root Oct 01 23:15:25 the second child is framelayout Oct 01 23:15:38 and within framelayout is the stuff that I want to overlap Oct 01 23:21:59 Awesome got it working Oct 02 00:24:58 hey guys, how have you gone about creating a preferences/settings activity that uses a material theme? The settings activity from the new activity wizard in android studio still uses some unthemed elements such as switches Oct 02 00:27:42 Are YAML files supported in android? Oct 02 00:35:08 fb|: Simply design it in a material theme. Oct 02 00:53:31 anyone notice , on OS X ... when screen goes off (sleep) that AS pegs the CPUs when using instant run ? Oct 02 01:09:45 as 2.2 is more of a memory hog than 2.1 .. Oct 02 01:11:59 java.util.concurrent.TimeoutException: Preview timed out while rendering the layout. This typically happens when there is an infinite loop or unbounded recursion in one of the custom views. Oct 02 01:12:01 lol Oct 02 01:16:34 Hey all! I'm trying to use CoordinatorLayout and CollapsingToolbarLayout to scale a custom View up and down when the Toolbar is expanding/collapsing. The simplest thing I can think of is to set the custom View's top, right, bottom, & left to match the parent's. Can anyone offer some guidance on what I should override and where, to achieve this? Oct 02 02:57:38 how to build a system with my own kernel and device tree **** ENDING LOGGING AT Sun Oct 02 02:59:58 2016