**** BEGIN LOGGING AT Fri Aug 19 02:59:58 2016 Aug 19 03:23:29 Anyone else playing with Kotlin for App development? Aug 19 04:12:05 why is this response null when its 'successful' http://hastebin.com/qazoyukuxu.coffee Aug 19 04:20:19 set a breakpoint and hav ea look what's going on there Aug 19 04:24:27 ohk Aug 19 04:24:28 yea Aug 19 06:56:45 Is it recommended for java developers to enable android functionality in intellij idea or use android studio instead? Aug 19 06:57:50 less problems and more support with android studio, especially for beginners Aug 19 06:58:00 less unexpected bugs Aug 19 06:58:23 Hmmmm Aug 19 06:59:06 AS already has installed/built-in neccessary android things Aug 19 07:30:53 Hey my spinner doesn't look good enough, it isn't obvious to the user that it's a selection list Aug 19 07:31:10 how do I make it look clearer Aug 19 07:32:45 Add a down arrow to the right side or something. Aug 19 07:32:57 On top. Using a frame layout if you want. Aug 19 07:33:28 It might even be something you can switch on. Aug 19 07:36:18 there is a small down error on it Aug 19 07:36:26 but I'd like a border and a background color Aug 19 07:36:57 You can theme it. There's lots of documentation on that. :) Aug 19 07:37:17 I'm in my phone currently so that's about all I can provide you Aug 19 07:37:30 On, rather. Aug 19 07:40:07 yes I guess that's the way to go thanks for the showing me in the right direction tx Aug 19 07:57:22 This update adds compatibility with Gradle 2.14.1, which includes performance improvements <--- HAHAHA Aug 19 08:02:48 does anyone know which key code to use for the all-purpose "Enter" key on a softkeyboard? there are a bunch of different codes like Keyboard.KEYCODE_DONE, KeyEvent.KEYCODE_ENTER, KeyEvent.FLAG_EDITOR_ACTION Aug 19 08:46:50 hey , I am reading fragments , in this link http://pastebin.com/cadqsvHG , when newInstance is called, it creates instance of HomeFragment, so when is create and OncreateView is called , is it when the instance is created Aug 19 08:47:23 by using HomeFragment Fragment = new HomeFragment () Aug 19 08:47:40 that is before the fragment is returned? Aug 19 08:48:02 killer, no. Its been called in the lifecycle order once you attached it to a fragment Aug 19 08:48:23 after sth like fragmentManager.beginTransition().replaceFragment(...) Aug 19 08:49:34 So purpose of creating instance is just to access Create and onCreate, and you mean by creating instance , we dont call onCreate Aug 19 08:49:39 as said in android docs Aug 19 08:50:03 creating an instance is because you need one in order to pass it to the fragment manager Aug 19 08:50:17 the fm will then take care of calling all those methods like onCreate Aug 19 08:51:19 ahhh , I see , thnx , this thing was not clear from android docs , why create an object , thnx for your help Aug 19 08:51:22 much appreciated Aug 19 08:51:48 yw Aug 19 09:06:53 "To register a widget, you create a broadcast receiver with an intent filter for the android.appwidget.action.APPWIDGET_UPDATE action." where should I put the code of this receiver? Aug 19 09:09:28 mohsen_, the receiver registration in the manifest will take an android:name attribute thats pointing to your widgetprovider class. thats where you do your widgets work Aug 19 09:09:45 similar to how you register activities, but you use a receiver. Aug 19 09:31:02 Hello. I want to load an application for testing from Android Studio to my Android phone. I am developing in a Windows machine and I have read that I need to install a driver. However I do not find where to download this driver. Can someone help me? Aug 19 09:33:14 one thing would be http://adbdriver.com/ Aug 19 09:36:39 Can I get a NPE because of the device being to slow to fetch data from my backend? I happen to get a NPE on my S4 device when fetching some strings from the cloud, but not on my S6 device. Giving me the impression of the older device not being able to cope speedwise, cause why else would I get that exception on one device and not another one? Aug 19 09:38:35 are you fetching data in the foreground? Aug 19 09:39:28 Leeds, Ehm yes I believe so. I'm not running on ui Thread atleast Aug 19 09:39:53 Ashiren, thanks but it does not detect my device? or how does this work? Aug 19 09:40:00 Should I post a runnable on the ui thread for fetching data? Aug 19 09:40:28 frankly, I use a library like retrofit2 for that sort of thing... Aug 19 09:41:40 raisondetre: do you have usb debugging enabled in your phone? Aug 19 09:43:19 Leeds, was that for me? Aug 19 09:44:33 Leeds, I took some info from this: https://vaibhavtolia.wordpress.com/2013/10/03/79/ given it is fairly correct, posting a runnable on the ui thread when fetching data should be a valid and proper way of handling it too? Aug 19 09:45:08 possibly, but personally I'd use a library like retrofit2 for that sort of thing... Aug 19 09:45:16 Ashiren, thanks that was it, had to tap 7 times the build number in this old phone lol Aug 19 09:45:30 Leeds, okey. I'll take a read on that lib and try it out Aug 19 09:45:33 thanks Aug 19 09:54:58 I follow this tutorial but when I‌ deploy the app my widget is not between widgets in my phone: http://www.vogella.com/tutorials/AndroidWidgets/article.html Aug 19 09:56:45 Android Studio is telling me that the device is not compatible with my application. It says "minSdk(API15) > deviceSdk(API1)" How can I fix this? Aug 19 09:57:13 is your device ancient? Aug 19 09:58:13 It was given to me for testing I cannot have another one Aug 19 09:58:30 what device is it? Aug 19 09:59:10 TheSchaf, SM-G361F Aug 19 09:59:51 raisondetre, your device is to old. Your options are getting a new one, using the emulator or chaninging the minSDKVersion in your gradle file. Aug 19 10:00:10 it is not that old Aug 19 10:00:11 but the latter might not be possible depending on what features your app uses Aug 19 10:00:24 seems to be from 2015 Aug 19 10:00:36 danijoo_, I use nothing special except the GPS services Aug 19 10:00:36 check if it shows in adb devices, etc Aug 19 10:00:36 amazon says its android 5.1 Aug 19 10:00:41 in this case it should work Aug 19 10:00:51 maybe try rebuilding and invalidating AS cachje Aug 19 10:00:55 check if the correct drivers are installed Aug 19 10:00:59 and so on Aug 19 10:01:11 how can I check that? Aug 19 10:01:42 I used ADB Driver Installer and it said that the driver status was OK Aug 19 10:02:14 this device is 5.1 so it should be API22 Aug 19 10:02:25 lol there are no API 1 devices are there :v Aug 19 10:02:48 raisondetre: on device list does it say something like ??????? Aug 19 10:02:52 also check the device version manually. just to be sure. Aug 19 10:02:59 on the device. Aug 19 10:03:02 Any idea to my problem? Aug 19 10:03:09 mohsen_, show your manifest Aug 19 10:04:00 danijoo_: https://ptpb.pw/BO5e Aug 19 10:04:54 There's no way of actually finding out what method is causing a OutOfMemoryError right? Aug 19 10:05:24 mohsen_, not sure if its mandatory but your widget has no label Aug 19 10:05:50 this is my working implementation https://gist.github.com/danijoo/411e0ea265e820e2f3c31504b7e88bc8 Aug 19 10:06:33 Ashiren, here are the listed drivers http://i.imgur.com/cjseeXR.png Aug 19 10:08:37 hmm have you tried unplug and plug the device again Aug 19 10:09:15 also was there a dialog in phone when you plugged in Aug 19 10:10:36 Ashiren, yes I've tried that but nothing happens and I get no dialog Aug 19 10:13:52 danijoo_: Tried your implementation, no luck. Aug 19 10:14:01 I even tried changing the minSdk version to 1 but it does not work still Aug 19 10:16:18 is 1mb images considered large when loading as resources? I'm loading about 15 of them at the same time, does it sound reasonable for my device to trow OutOfMemory because of that? Aug 19 10:17:27 Bernzel: depends how big they are in resolution. they need to be uncompressed in RAM Aug 19 10:18:24 raisondetre: the problem is not in minsdk but that somehow phone isnt 100% accurately detected Aug 19 10:18:42 raisondetre: you could try #android-root for drivers question Aug 19 10:18:55 Bernzel, depends on how you load them.. you should adjust them to screen size and dont stick the whole image in high resolution into RAM. especially because a 1mb image will take much more RAM then 1 mb once loaded Aug 19 10:20:13 low end devices will probably not allow you to allocate more than 32mb \ Aug 19 10:21:39 danijoo_, not sure how else to describe the loading process other than they are set as background on a ImageButton, loaded from my drawable folder Aug 19 10:22:50 Bernzel, check https://developer.android.com/training/displaying-bitmaps/load-bitmap.html Aug 19 10:23:26 and adjust the size of the image in resources folder for different screen resolutions. make it as close to pixel-perfect as possible Aug 19 10:26:27 you might also want to look into libraries like picasso or glide. They can do the ugly scaling work for you Aug 19 10:27:36 danijoo_, so having multiple versions of the same image but in different resolutions is common practice? My app will take up a lot of space then. Aug 19 10:28:19 yes Aug 19 10:28:37 its basically a trade. Aug 19 10:29:07 oh I see Aug 19 10:29:12 you can either put different resolutions in which will cost more memory, or do the scaling in code when loading the image which will cost you more runtime resources Aug 19 10:29:47 for smaller images like buttons, icons (..) you probably want to have multiple versions. Aug 19 10:30:06 for larger stuff like background that takes lots of space you might want process it at runtime Aug 19 10:31:04 danijoo_, okey, and people who says the placing all assets in the nodpi folder? Aug 19 10:31:44 not a good idea imo Aug 19 10:31:58 if you place an icon in the correct folder android knows how to resize it for you Aug 19 10:32:07 it doesnt if you put it in nodpi Aug 19 10:32:33 oh well. ignore that last sentence. Aug 19 10:32:35 so not use that folder at all then? Try to handle the different resolutions manually instead Aug 19 10:32:45 it knows which one to choose was what i wanted to tell. Aug 19 10:33:03 for icons better put different versions in hdpi, xhdpi etc Aug 19 10:33:18 android will then choose the one that matches the phone specs Aug 19 10:33:46 so for smaller phones it will load the smaller icon and therfor use less memory on low end devices Aug 19 10:43:10 Ashiren, after issung the command adb devices I get a device listed as unauthorized. any ideas? Aug 19 10:45:39 raisondetre, you should get a popup on the device after plugging it in to allow the adb connection Aug 19 10:45:51 if not, you might want to try another usb cable Aug 19 10:46:15 I just got it after reppluging like 5 times Aug 19 10:46:28 Thanks, this equipment is older than a dinosaur Aug 19 10:47:43 is it now reported as API22? Aug 19 10:48:10 if you only need gps, you can also use the emulator maybe Aug 19 10:50:42 How can‌ I‌ add custom buttons to the layout of the widget in this code: https://ptpb.pw/DFIO ? Aug 19 10:53:15 I‌ want to do exactly like this to the widget layout: https://ptpb.pw/BDrT Aug 19 10:54:43 danijoo_, how will the device know which asset to load then? Do I need to name them in a certain way? Since there is only one drawable folder? Aug 19 10:55:48 Bernzel, you need multiple drawable folders Aug 19 10:56:21 like this: http://prntscr.com/c7omud Aug 19 10:57:17 ah okey, and the one just named "drawable" is the smallest? Aug 19 10:59:24 no thats the one thats used as fallback when all others dont match Aug 19 11:00:22 got it, scaling time then Aug 19 11:02:07 not even my S6 phone can handle the resources I have no, so guess I have to go down A LOT Aug 19 11:03:28 you can check what dimension your image has on the phone with ddms Aug 19 11:03:42 then scale it down to that value and put it in the folder belonging to the phone Aug 19 11:04:44 all other ratios can then be calculated from that reference folder by scaling factors. See here unter "Alternate drawables" for the factors: https://developer.android.com/guide/practices/screens_support.html Aug 19 11:09:45 danijoo_, ok hold on, ddms? That was exactly what I was unsure of, how to know how much I need to scale down to. Aug 19 11:11:33 Dalvik debug monitor server. Beside a lot of other featues it allows you to make a pixel perfect screenshot of your phone and see the exact size that image takes on the screen. Aug 19 11:11:39 than you can scale it to match that size Aug 19 11:11:48 "counting pixels" ; Aug 19 11:11:53 ; Aug 19 11:11:57 ;) Aug 19 11:12:32 I got the device monitor up, so it's the "Screen Capture" button I'll press? Aug 19 11:13:14 Bernzel, follow this: https://developer.android.com/studio/profile/optimize-ui.html#pixelperfect Aug 19 11:14:09 thanks! also, when I setBackgroundResource I use R.drawable.blabla , can I keep that and Android will figure out WHICH drawable folder to use? If I got you correctly. Aug 19 11:15:36 yes Aug 19 11:15:54 thats the whole point of the folders. that android figures it out for u Aug 19 11:20:58 awesome Aug 19 11:23:52 Hello. Is anyone free to help me out with an issue where an if else statement executes both if and else? Aug 19 11:24:31 reall?:) Aug 19 11:25:17 danijoo_, that guide was for Android Studio though, saw that now, I'm using Intellij Aug 19 11:25:55 Kamihan: huh Aug 19 11:25:59 impossibru Aug 19 11:26:40 Ashiren: I can show you the code if you want Aug 19 11:26:54 eeyup Aug 19 11:27:56 Bernzel, ddms is part of the sdk. you can start if from there. Aug 19 11:29:56 so Aug 19 11:29:58 Ashiren: http://hastebin.com/ocuxenoluz.avrasm Aug 19 11:30:38 That's the method, at the bottom of which, every second, both if and else are being executed Aug 19 11:32:15 oh I can only run hierachyviewer on an emulator :/ Aug 19 11:32:49 are you sure it calls the inside if and else in once called function? Aug 19 11:33:20 Yes. Aug 19 11:34:47 So once I open the activity with the function, only if gets executed. When I leave activity, only else gets executes. When I join again, both execute Aug 19 11:36:29 but are you sure this is the same runnable Aug 19 11:36:51 because i think when you leave activity, the runnable keeps the reference. then when you enter activity, you habe new runnable Aug 19 11:36:54 and they fire both Aug 19 11:37:51 in the runnable you could ad i.e. Log.d("xxx",this.toString()) Aug 19 11:37:52 Oh, I'm not sure, how can I check? Aug 19 11:38:07 Hm Aug 19 11:38:20 and see if you have 2 xxxs each second Aug 19 11:38:42 What I did earlier was, I put Log.d("is","running"); inside the if, and Log.d("not","running"); inside else Aug 19 11:38:56 And they were both popping up Aug 19 11:39:08 now try this before the if statement Aug 19 11:40:37 Kamihan, you call that method in your onResume() ? Aug 19 11:40:52 danijoo_: yes Aug 19 11:41:26 and what is "b" ? Aug 19 11:41:58 I dont see that you set isRunning anywhere Aug 19 11:42:21 b is a boolean that I initially set to false Aug 19 11:43:00 but shouldnt u set isRunning = true once the method is called Aug 19 11:44:06 oh wait. my fault. isRunning is not for what i thought it is Aug 19 11:44:53 If you look inside the method, there's a Notification that shows up, and I only want to show that notification if the activity is not running Aug 19 11:44:53 onResume, isRunning is set to true, onPause, isRunning is set to false Aug 19 11:45:10 yeah. I misinterpreted that :) Aug 19 11:46:07 I can show you the whole code, if you want Aug 19 11:46:20 but arent you creating an infinite amount of runneables? Aug 19 11:46:34 I mean loadConversionList() is called everytime in onResume, right? Aug 19 11:46:54 and it never finished because the handler calls it again after 1 sec without a recursion end Aug 19 11:47:12 since its in both if/else Aug 19 11:47:54 Yeah, because the method is used to load chat messages, and by calling the method every second, it updates chat every second, so to display new messages Aug 19 11:48:23 yes. but then you put the phone to sleep and awake again, and it starts another handler that does the same thing Aug 19 11:48:35 and if I do that 10 times youll end with 10 such tasks Aug 19 11:48:37 What do you people here think of Xamarin? Do you use it? Why or why not? When would you use it? Aug 19 11:49:09 because there is no logic to check if the task is already running Aug 19 11:49:42 not to mention that this wont work on production because android will shut your app down once its in background for some time. you should use a service for thatt Aug 19 11:50:10 I was planning on adding a permanent notification, that wouldn't let android kill my app, right? Aug 19 11:50:25 Kamihan, No, it would just decrease the chance Aug 19 11:50:50 Kamihan, you need to use a forground service to prevent android from killing Aug 19 11:51:10 Oh. I see... I was wrong then :( I'll look into that when I get to it though, thanks for letting me know! Aug 19 11:51:35 danijoo_, You can't prevent the system from killing your app. Aug 19 11:52:13 darken, i know what you mean and you know what i mean :) Aug 19 11:52:31 k Aug 19 11:52:35 its very unlikely if itsd a forground service and dont use quadrillion resources though Aug 19 11:53:13 like ive never seen Android killing skype on my phone, no matter what i did Aug 19 11:54:57 Yeah you need a pretty low end device to see it happening Aug 19 11:56:30 So the issue for me is that I'm getting many handlers firing, right? Aug 19 11:56:43 possibly Aug 19 11:57:06 Does onCreate get called everytime I open the activity? Aug 19 11:57:36 no. only once unless it got destroyed because android needed resources elsewhere Aug 19 11:58:17 I tried removing the method from onResume, and called it inside onCreate, but still same issue :( Aug 19 11:59:25 Actually, I just figured it out... Aug 19 11:59:57 If I use the back button, the issue happens... if I use home button, and then come back into the activity, works perfectly Aug 19 12:00:16 well. back button kills the activity and onCreate gets called again\ Aug 19 12:00:25 home button pauses it Aug 19 12:00:28 Yeah. rip Aug 19 12:00:43 I need to Override onBackPressed, right? Aug 19 12:01:01 Kamihan, the user expects a certain behavior from the back button Aug 19 12:01:11 no you dont Aug 19 12:01:24 you need to put that whole stuff in a service and make it independent from the activity Aug 19 12:02:07 darken, I know, but I was thinking of having the back button open the previous activity, and pause the current one Aug 19 12:02:29 so it doesn't finish it Aug 19 12:02:37 Kamihan, that happens automatically if you start the activities right Aug 19 12:02:58 you can't assume your activity won't finish once it's paused, use a service like danijoo_ said Aug 19 12:03:52 True.. Aug 19 12:04:11 If depending how you launch your activities over each other. If you close the top activity the system will launch your previous activity with access to a 'savedInstanceState' Aug 19 12:04:44 I launched the activity using an intent Aug 19 12:05:17 you can supply flags to the intent, and flags to the activity viia the AndroidManifest.xml Aug 19 12:06:15 https://developer.android.com/guide/components/tasks-and-back-stack.html Aug 19 12:08:00 I see. I don't know how to do that right now, but I'll look into it. At least now I know why I was having the issue, and I should be able to fix it from here. Thank you draken and danijoo_ ! Aug 19 12:08:40 Is it good practice to have a static class that is accessed (via singleton design pattern) by a service to get variables? What alternatives are there? Aug 19 12:09:41 heoy, whats the reason for not having the variables in the service? Aug 19 12:10:02 heoy, depends on the data Aug 19 12:10:36 they need to be accessed by other activities that update UI elements (just TextViews) Aug 19 12:11:54 or should the communication with other activities be done with Intents / Broadcasts? Aug 19 12:12:38 accessing global data, like login token etc. though a singleton (or your application singleton) is common practice, using a singleton to access UI related data is bad practice Aug 19 12:15:28 darken, can the singleton object be destroyed when the service is just running in the background? Aug 19 12:16:03 If you don't destroy, it will live as long as any of your apps components is alive. Aug 19 12:17:10 And what is the prefered method for UI updates? Aug 19 12:17:43 Hi! I recently started using Proguard, and it works as intended. However I'm also using Retrofit to interact with my REST API. Retrofit apparently doesn't support POJO obfuscation, so now anyone who decompiles my app can see the api structure... Aug 19 12:17:49 Is there any ways around this? Aug 19 12:18:50 heoy, really depends on the project and personal preference. Some kind of event bus, or just simple service binding, maybe intents. Aug 19 12:19:23 Ikkyo, anyone looking to find your api structure will eventually do so. Aug 19 12:22:04 darken: Yeah I guess... I'm just trying to avoid fake users. Ideally I want all request to come from the actual app, what would be the best way to do this then? To hide secret keys somewhere? Aug 19 12:23:37 hey there. any idea why this doesn't create the circle? http://pastebin.com/v1sMGshf Aug 19 12:24:01 if I set another color like black, it works but not with transparent Aug 19 12:24:31 darken, thank you, i will look into event busses Aug 19 12:24:40 Because you can't see transparent items? Aug 19 12:25:52 the imageview in the xml has the property android:background="@android:color/holo_orange_dark" Aug 19 12:26:32 And then on top of that you draw an invisible circle Aug 19 12:26:57 on the top? oh that's why Aug 19 12:27:17 do you have any idea how to create an hole in a View? Aug 19 12:29:52 sure Aug 19 12:30:23 If you draw everything on the same canvas you should be able to use porterduff xfer modes Aug 19 12:31:24 hi all. is there any way to test interaction of a layout in emulator without it actually being a part of an Activity? just to see basic things like the correct keyboard come up? Aug 19 12:44:21 can't emulators handle Animations? Aug 19 12:45:02 SimonVT: thanks Aug 19 12:52:20 hello, im trying to enable jack by adding these to module build.gradle jackOptions{enabled true} and compileOptions{ source compat 1.8 target compat 1.8} howevery im getting an error Aug 19 12:52:29 aren't they enough for enabling jack ? Aug 19 12:57:59 what error are you gettin Aug 19 13:00:20 hi Aug 19 13:00:39 yo Aug 19 13:00:46 is there any way to force dalvik to create an instance of a function partially applied, ie. with some parameters replaced by fixed values? Aug 19 13:04:14 let me give some context Aug 19 13:04:48 I'm looking at extending brouter (written in java) to support arbitrary expressions, with properties that can vary over the route Aug 19 13:05:05 I believe currently it just evaluates its (semi-costly) cost function once for each route segment Aug 19 13:05:21 but with the extension, it'll have to evaluate an arbitrary function per cost check Aug 19 13:05:36 as such, I need to "compile", at runtime, a runtime expression into a _maximally fast_ function Aug 19 13:06:01 I'm using a phone that runs dalvik Aug 19 13:06:40 is there any way to force it to take a function with some (fixed at runtime) parameters and optimize it dynamically as if these were constants? Aug 19 13:06:42 or can dalvik only do aot? Aug 19 13:07:14 * Zharf has nooo idea Aug 19 13:07:18 sorry Aug 19 13:07:24 no prob Aug 19 13:13:47 Can someone point me in the right direction for integration testing a connection? Aug 19 13:13:59 Zharf: Warning:Exception while processing task java.io.IOException: com.android.jack.api.v01.ConfigurationException: Property 'jack.import.resource.policy' (in -D option): The value must be {keep-fırst,faıl} (case insensitive) but is 'keep-first' Aug 19 13:17:51 sounds logical Aug 19 13:18:03 "must be {X,Y}, but is X" Aug 19 13:18:23 could you pastebin your gradle.build Aug 19 13:18:24 er Aug 19 13:18:27 build.gradle Aug 19 13:18:28 whatever Aug 19 13:18:29 okay, looks like the way to go is to just pre-generate some common code patterns Aug 19 13:18:46 and otherwise rely on indirect function calls being fast (insert laugh track here) Aug 19 13:52:00 Hello everybody! I'm trying to run something in the background even when the app gets swiped away from the recently used apps. I tried both IntentServices and Services. Both are getting terminated as soon as I close my app. returning START_STICKY didn't help either. It doesn't even get restarted or anything.. Any ideas? Aug 19 13:54:06 I have a .mp3 file in my resource folder, but Android Studio is pulling an error because it has to end with .xml or .png? Aug 19 13:56:09 in 'raw'? Aug 19 13:59:44 anyone know why android studio 2.2 hangs on a build with gradle 2.1.3 but 2.1.2 works fine? Aug 19 14:01:39 LameName123, swipe away means app gets killed with all its components., theres no way to prevent that Aug 19 14:01:45 lamename: are you calling "startForeground" in your IntentService? Aug 19 14:02:23 dsardari, afaik nothing prevents a swipe away. not even foreground Aug 19 14:02:49 a swipe is users way of thelling you to gtfo their memory Aug 19 14:03:22 it wont kill the service since a notification needs to be shown to call that method Aug 19 14:03:54 unless the phone is low on memory Aug 19 14:05:10 I would hope it would kill it... if not, what's the point? Aug 19 14:06:04 from the docs: A started service can use the startForeground(int, Notification) API to put the service in a foreground state, where the system considers it to be something the user is actively aware of and thus not a candidate for killing when low on memory. (It is still theoretically possible for the service to be killed under extreme memory pressure from the current foreground application, Aug 19 14:06:04 but in practice this should not be a concern.) Aug 19 14:08:08 iprime, thanks Aug 19 14:09:05 But how are apps like WhatsApp for example doing it? When you swipe them away they still inform you when there's a new message. Aug 19 14:10:25 dsardari, I just tested this with spotify Aug 19 14:10:42 interestingly on the swipe the foreground notification icon also disappeared but the music kept playing. Aug 19 14:10:46 they're using gcm/fcm or some sort of push notification that wakes the app and allows them to showa notification Aug 19 14:10:48 with no way to shut it off Aug 19 14:11:13 yeah, i've noticed that too danijoo. kind of buggy. Aug 19 14:11:23 weird Aug 19 14:11:38 I remember when skype worked with a foreground service, a swipe away killed the whole thing Aug 19 14:12:22 I noticed after swiping a lot of apps they show as still running in the apps section the Force Stop button is still enabled Aug 19 14:12:28 possibly spotify runs the music in a separate process started by the foreground process? and this one will then get gc'ed later if the foreground service is not available after some time? Aug 19 14:12:50 basically service stopped -> but the thread in it still running? Aug 19 14:12:53 ES File Explorer being one of those apps Aug 19 14:13:29 Youtube is another Aug 19 14:13:44 dsardari: Isn't gcm/fcm something like a library that connects your server and clients through some other 3rd party servers? If so, that's not an option for me.. Aug 19 14:14:09 what are you trying to do? Aug 19 14:16:01 I want to get the user informed about an important message that the server sends as fast as possible. redirecting the traffic through a 3rd party server won't work, I'm afraid. Aug 19 14:16:31 LameName123, gcm is pretty instant Aug 19 14:16:38 all major chat apps use it Aug 19 14:16:40 including whatsapp Aug 19 14:17:12 danijoo_: Don't you have to tunnel everything you send through some google server tho? Aug 19 14:17:15 they do? aren't they using their own websocket/long polling/whatever? Aug 19 14:17:38 LameName123, you just send a ping via gcm telling the app to contact the server and load the data Aug 19 14:18:12 so the communication is still only between your app and your server. via gcm you just notify the app to establish a connection Aug 19 14:18:49 same for fcm? Aug 19 14:19:06 im talking about gcm Aug 19 14:21:47 I know but Google advertises fcm as a better version of gcm, right? They encourage you to use fcm when writing a new app. Is fcm working the way you just said or is fcm actually tunneling everything through their servers? Aug 19 14:21:47 fcm is gcm Aug 19 14:24:06 dani, i'm fairly certain you always go through google for downstream messages Aug 19 14:32:51 does the sqlite cursor contain all the results from query ? Aug 19 14:33:30 is it just a glorified ArrayList ? Aug 19 14:33:38 with all the rows in it ? Aug 19 14:39:22 I'm in my Hierarchy Viewer and is clicking in Inspect Screenshot, but no Pixel Perfect window appears, I'm running on a real device, but as I've understood it, it should still work? Aug 19 14:39:24 http://stackoverflow.com/questions/39041778/what-is-an-sqlite-android-cursor-conceptually Aug 19 14:51:26 dsardari, isnt that what i said? Aug 19 14:53:30 misread it, my bad! Aug 19 14:54:17 danijoo_, I can't get Pixel Perfect to work! I'm trying it on a real device, but from Hierarchy Viewer it simply won't show up.. And I have added the Environment variable etc. Aug 19 14:56:43 new to AndroidStudio and recomendations on how to learn all the cool stuff , there are a billion tutorials so I dont want to see how to make an activity 100's times just comming from VisualStudio its different and i should stop and learn my tool better Aug 19 14:57:00 any recomendations on great learning resources ? Aug 19 14:57:06 dar10s, java experience? Aug 19 14:57:36 enough to get by , but I could be better and we use the observer pattern here at work , so i need to get much better Aug 19 14:58:00 check the udacity course. I liked it Aug 19 14:58:24 good to know they are on my top list for firebaseTut Aug 19 15:14:45 danijoo_, http://prnt.sc/c7rxwf in device monitor , are the [1440, 2560] pixels? Aug 19 15:16:50 looks like Aug 19 15:17:08 but that isn't what you meant for me to check? Aug 19 15:17:54 I linked u a tutorial Aug 19 15:19:47 yeah I know.. I will keep trying on it. But what's weird is that the background I'm using is actually 1080x1920px , so it's even smaller than it should be.. still the device can't handle it. Aug 19 15:20:38 Could anyone offer their insight here on my question? http://stackoverflow.com/questions/39042572/what-is-the-purpose-of-adding-scope-modifiers-to-components-in-dagger2 Aug 19 15:20:40 Thanks! Aug 19 15:21:40 Bernzel, that makes ~ 5mb for that single image Aug 19 15:21:45 a bit more than that Aug 19 15:21:45 hey, i use jdk 8 , when i open project structure i dont see jdk 1.8 , there are only 1.7 and 1.6 Aug 19 15:22:38 i couldnt make jack enabled , i guess problem is related to this. Aug 19 15:22:53 danijoo_, okey but since the screen of that device measured 1440, 2560 , shouldn't the background image that fills the entire screen be that size? And right now it's smaller and takes too much memory. Aug 19 15:23:22 no because theres a top and bottom bar Aug 19 15:24:05 but im not that good with graphics either. I throw picasso in every proect and let that handle it for me 3) Aug 19 15:24:39 danijoo_: picasso the painter? Aug 19 15:24:41 danijoo_, so you use picasso and have only one of every asset/image? And let Picasso handle it instead? Aug 19 15:25:02 arancio, yeah I rented him Aug 19 15:25:21 no i sized them Aug 19 15:26:01 you are lying: http://square.github.io/picasso/ Aug 19 15:26:28 I'm lost. Screw this, I'll be a prostitute instead Aug 19 15:26:40 but you almost tricked me Aug 19 15:26:55 Bernzel: how much? Aug 19 15:27:17 arancio, haven't established the pricing table yet Aug 19 15:33:35 Is there an index/directory of the most used libraries for Android? Aug 19 15:36:51 arancio, looking for something specific? Aug 19 15:37:16 darken: no, just looking ahead to not reinvent too many wheels Aug 19 15:37:52 https://android-arsenal.com/ Aug 19 16:26:15 If I run my tests without having changed any code, a gradle build is run- if I run ./gradlew --stop, the build cancels but the tests run saving a lot of time. Aug 19 16:26:23 Is there a way to "just run" the tests? Aug 19 16:27:46 to my understanding it shouldnt rebuilt if you havent changed.. Aug 19 16:27:54 have you enabled incremental build? Aug 19 16:29:16 http://pastebin.com/qQhcR1jL - hey guys - anyone know why this takes like 10 seconds to process? Aug 19 16:29:37 is it the compression? Aug 19 16:30:10 i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) Aug 19 16:30:18 is there an Android Studio refactoring to add a method to an interface? Aug 19 16:30:22 Ooops Aug 19 16:31:53 danijoo_: is the the same setting as "Make project automatically" ? Aug 19 16:32:14 added debug logs. its the compression taking forever Aug 19 16:32:30 explodes, no. it makes gradle build only compile files that have changed since last build Aug 19 16:32:36 so it should skip if nothing changed Aug 19 16:32:41 I have problem I am using Kiosk Service app code to respawn activity: http://pastebin.com/hZhfNMYk Aug 19 16:33:21 danijoo_: dexOptions.incremental = true ? Aug 19 16:33:23 Problem is that when I hit home button main activity respawns as completely new activity Aug 19 16:33:54 Instead as being restored from recents Aug 19 16:34:33 And the old one still somehow runs Aug 19 16:34:51 Tried intent flags but no help Aug 19 16:40:33 I am using Android studio, there is a line I was coding for bluetooth implementation. "BTAdapter = BluetoothAdapter.getDefaultAdapter(); " I get a an error for "BTAdapter" as undefined. Is there a certain library I have to import? Aug 19 16:41:02 what is BTAdapter? Aug 19 16:41:04 leTones you'll have to learn java first Aug 19 16:41:07 danijoo_: does incremental build work with proguard? Aug 19 16:41:18 also, you’re missing a name for the variable, but that could also be a typo Aug 19 16:41:27 s73v3r: where? Aug 19 16:42:05 either BTAdapter is the variable name with no type, or it’s just a type with no variable name Aug 19 16:42:09 but BTAdapter is a variable name I set, therefore there shouldnt be Aug 19 16:42:14 yeah. Aug 19 16:42:23 shouldnt be an error* Aug 19 16:42:33 so what’s the type? Aug 19 16:42:37 it depends Aug 19 16:42:50 this isn’t Python, you have to declare your variable’s types Aug 19 16:42:57 oh. Aug 19 16:43:04 hoho Aug 19 16:43:13 explodes, you shouldnt use proguard in debug . its slow :/ Aug 19 16:43:33 Yeah, I usually use python and just started using Android Dev yesterday s73v3r Aug 19 16:43:42 yeah, you’re gonna have to learn java Aug 19 16:44:20 I see, alright. Thanks. Aug 19 16:44:36 and compiler tech Aug 19 16:44:58 and category theory Aug 19 16:45:07 explodes, i needed to enable proguard yesterday and found it isn't *toooo* slow Aug 19 16:45:10 eh Aug 19 16:46:54 bitkiller, but why take the extra step if its not neccessary. its slower than not using it :) Aug 19 16:47:10 I have a piece of code that i want to earn money on, primarily through support. I have no problem with other developers closing the source and selling it, but i would very much like to have them pass any changes/fixes back upstream. Anyone good with software licences know which i should use for this? Aug 19 16:48:10 danijoo_: its a requirement. Aug 19 16:48:21 in debug? Aug 19 16:49:36 :( yup Aug 19 16:49:50 Too many dependencies in this app Aug 19 16:50:04 same here. I do multidex in debug and proguard in production Aug 19 16:50:18 how long do your builds take? Aug 19 16:50:34 we're 1:40m over here Aug 19 16:50:39 i dont time it since i instantrun a lot Aug 19 16:50:46 or jrebel in that case Aug 19 16:50:58 danijoo_ like jrebel ? Aug 19 16:51:08 yup Aug 19 16:51:38 how much $$$ does the version you use cost ? Aug 19 16:52:03 uhm. i think it was something arround 80$ / year Aug 19 16:52:07 not sure :/ Aug 19 16:52:22 maybe more than that Aug 19 16:53:15 i'm kinda annoyed at how google develops AS. when they released instant run, it had lots of problems. now, instead of fixing those, they have gone off and been working on new shiny things like that new layout. Thats fine, but they should have followed up with instant run fixes Aug 19 16:53:34 i think people , myself included, are getting tired of shit that is constantly half working Aug 19 16:54:21 once instant run was released, there should have been a bunch of stabilizing releases for that specifically Aug 19 16:54:34 yeah well.. i got tired of complaining :p Aug 19 16:55:08 now, its been months since the lest stable - and could be weeks before even the next RCs are available - in short, if you were using AS you would have to wait for months for google to fix this crap Aug 19 16:56:01 jrebel works fine Aug 19 16:58:24 https://gist.github.com/pareshchouhan/bc340b035cbe398dcd160551eed078e5 Aug 19 16:58:34 initially my quoteBubble is INVISIBLE Aug 19 16:58:48 during the first run the animation is a bit jerky Aug 19 16:58:59 it gets VISIBLE first and then starts to animate Aug 19 16:59:02 which feels a bit weird Aug 19 16:59:11 is there any work around? Aug 19 17:00:27 subsequent runs are fine Aug 19 17:01:48 shouldn't the animation be changing the alpha? Aug 19 17:01:57 yes Aug 19 17:02:16 but I want to make it appear when user clicks a button Aug 19 17:02:29 will setFilleAfter keep the alpha value? Aug 19 17:03:06 iirc, yeah Aug 19 17:03:35 so what I did was Aug 19 17:03:38 setAlpha to 0 Aug 19 17:03:58 then ran the animation to interpolate alpha from 0 to 1 Aug 19 17:04:01 danijoo_, i had to (enable proguard in debug 'cause dex method count reached the 64k limit Aug 19 17:04:05 with setFillAfter true Aug 19 17:04:11 but now I cannot see the animation. Aug 19 17:04:16 bitkiller, as i said. multidex. Aug 19 17:04:51 not now, later Aug 19 17:05:53 how is the multidex support in older versions? Aug 19 17:06:32 can which classes go where? Aug 19 17:06:44 ^can define Aug 19 17:07:27 dsardari, not working :( Aug 19 17:07:34 dunno. i only use it in debug and only for api > 21 because mutlidex is slow below that Aug 19 17:09:46 slow to build or slow to run? i suppose both Aug 19 17:10:23 paresh: https://gist.github.com/dsardari/d109acb59d0cd5112c807d3787b3cd04 Aug 19 17:10:29 this seems to work Aug 19 17:10:48 initially you set alpha 0? Aug 19 17:10:50 multidex doesnt affect run speed on any version Aug 19 17:11:04 I don't want the view to be shown Aug 19 17:11:12 unless user clicks something Aug 19 17:12:03 danijoo_, i'll try that when i have the time, and btw i'm testing in api 16-19 Aug 19 17:12:31 weird that doesn't work Aug 19 17:13:12 odd one here this worked this morning and now it crashes on line 75 - imagePicture.setImageBitmap(resizeLargeImages(inputStream)); Aug 19 17:13:29 any Ideas ? https://gist.github.com/anonymous/e3a275ca2b81781fdc3e94dd6791ed07 Aug 19 17:14:09 I think this code if from SO or some tutorial I found and i am confident it worked , but now when I load and image crash ~ Aug 19 17:14:11 parseh, click the link again Aug 19 17:14:27 well, after updating to latest tools, started receiving a long warning "... did not target the modern .class file format..." Aug 19 17:17:09 dsardari, same jerk at the start of animation Aug 19 17:17:22 duhh !!!( feel dumb now) Aug 19 17:17:38 as soon as its state is set to visible it shown at initial position and then the animation begins Aug 19 17:18:07 I tried posting a delayed view.setVisibility(View.VISIBLE) to make it visible midway through animation Aug 19 17:18:10 but that didn't work Aug 19 17:18:28 oh I forgot to mention I am fading and translating Aug 19 17:18:34 fading and scaling* Aug 19 17:19:53 parseh, create a new blank project and copy the gist code and see what happens Aug 19 17:20:43 ok Aug 19 17:26:16 For getting location on Android, the official guides say to use Play Services and a GoogleApiClient, but every stackoverflow question about location doesnt mention that Aug 19 17:26:21 so whats the right way? Aug 19 17:27:18 I change layouts on rotation in my android program, and it stops showing the fragments I added at runtime. Does anyone know why this is and how to fix it? Aug 19 17:27:47 dsardari, yes this works flawless Aug 19 17:27:59 I have no clue why I am having trouble with this ... Aug 19 17:28:30 you're using an AnimationSet, right? Aug 19 17:28:30 dsardari, view I am animating is a RelaitveLayout which has an ImageView and a TextView Aug 19 17:29:41 yes Aug 19 17:30:29 I tested the animation set on your demo. it worked Aug 19 17:33:58 not sure. try calling "setFillAfter" on the animation set if you aren't already. Aug 19 17:36:07 yea Aug 19 17:36:15 could be because of the pivot values Aug 19 17:36:34 has anyone used retrofit2? Aug 19 17:36:43 Yeah krippykripkrip Aug 19 17:36:55 can i PM you? Aug 19 17:37:08 Sure krippykripkrip Aug 19 17:37:58 drose, you a bulls fan? Aug 19 17:38:02 Nope Aug 19 17:38:08 dsardari, I have no clue how but it worked Aug 19 17:38:16 could be because of the pivot values Aug 19 17:38:43 I made it relate to parent which I wasn't specifying explicitly when I was inflating from the XML Aug 19 17:38:53 thanks for your time dsardari Aug 19 17:39:21 np Aug 19 17:43:18 <_ADAM> can an update be sent to my phone Aug 19 17:43:19 I'm hating Server 2012r2 so bad Aug 19 17:43:38 <_ADAM> I don't like roaches so much. Aug 19 17:45:30 <_ADAM> If google isn't interactive as sentient the lies need to go away from me Aug 19 17:45:35 Do you guys prefer a CodePad paste of code if I wanted to show something? Aug 19 17:46:06 <_ADAM> Stop with the you guys yammer Aug 19 17:46:11 <_ADAM> letones Aug 19 17:46:24 what Aug 19 17:46:25 <_ADAM> it isn't cute Aug 19 17:47:11 <_ADAM> these things attract roaches somehow Aug 19 17:47:33 <_ADAM> and theyve about killed human potential Aug 19 17:48:08 leTones: Please use a paste bin site of some sort to share your code, yes Aug 19 17:49:27 http://codepad.org/afZ8N9Lu This is a tutorial I was following. The "...", what is supposed to be there. I understand it's paraphrasing by doing "...", but I wanted to test this code out though. Aug 19 17:49:36 <_ADAM> letones send a google talk Aug 19 17:49:58 <_ADAM> looks like google is the phone admin Aug 19 17:50:35 <_ADAM> so if they allow us to talk google is the option most likely to produce Aug 19 17:50:54 <_ADAM> letones privmsg Aug 19 17:51:10 why, it's clearly fine on that codepad. Aug 19 17:52:06 <_ADAM> clear as what? Aug 19 17:52:19 did you look at the paste Aug 19 17:52:28 <_ADAM> what do you want to do talk to botscripts? Aug 19 17:52:44 i'm so confused on what you're talking about... Aug 19 17:55:29 Hi, I'm pretty new to android development. I found a Github repository that is using native libraries and i copy pasted the file into my project and ran ndk-build but i keep getting the error "java.lang.UnsatisfiedLinkError: Native method not found:" when calling a library method :/ any help is appreciated Aug 19 17:58:30 why run random projects? Aug 19 17:59:01 talking to me? Aug 19 17:59:12 Jamal: I'm new to Android and Java too but if you just copied a source file using a native library and didn't add the library to the build process, a "Native method not found" is the least you can expect. Aug 19 17:59:27 http://codepad.org/afZ8N9Lu What is the "..." supposed to mean, what is missing. I wanted to test this code. Aug 19 17:59:31 Jamal: some people got their computer exploded doind something like that Aug 19 18:00:40 leTones, means you fill in the blanks Aug 19 18:00:47 leTones: it means you took that code from a tutorial and the author skipped some lines. Aug 19 18:00:57 arancio, what do you mean by build process? I added the *.so files included the path into my grade file and ran the ndk-build command Aug 19 18:01:12 Right, I took the code from the tutorial, I wanted to test it. I assumed it was finished. Aug 19 18:01:55 Well, that's just great lol. Aug 19 18:02:26 leTones: did you think that "..." was Java? Aug 19 18:02:33 no. Aug 19 18:02:46 I knew something was missing, it was paraphrasing but I thought it was just some basic java syntax Aug 19 18:02:50 needed to run it Aug 19 18:03:09 leTones: "then you can take a look at the finished project on GitHub" Aug 19 18:03:21 leTones: https://github.com/tutsplus/Android-BluetoothScannerFinishedProject Aug 19 18:03:35 How did you find this so fast. Aug 19 18:03:48 cool, thanks Aug 19 18:04:25 leTones: Google took 0.88 seconds. The rest of the time I spent checking if that was the right source of your code. My fault. Next time I'll try to be faster. Aug 19 18:04:35 :-) Aug 19 18:04:41 lol, nice. Aug 19 18:04:45 you're forgivven Aug 19 18:04:47 forgiven* Aug 19 18:07:29 leTones: "..." is used in vararg declaration in Java but not a standalone construct Aug 19 18:09:00 oh okay arancio Aug 19 18:09:18 I haven't studied Java, i have done C. But it's pretty similar though Aug 19 18:10:43 Do you follow the PWAC methodology? I love that Aug 19 18:10:46 java first. android later Aug 19 18:11:07 Jamal: you didn't wrote you added the native library to the project. I can't help you beyond that at the moment. Aug 19 18:11:35 leTones: Do you follow the PWAC methodology? Aug 19 18:12:07 PWAC? Aug 19 18:12:32 What does PWAC stand for arancio Aug 19 18:12:48 leTones: Programming Without A Clue Aug 19 18:12:59 so can i create a json object with an image and upload using retrofit2? Aug 19 18:13:29 arancio: I guess in this case, yes. But I use my python/C intuition. I just started doing android-dev about 2 days ago Aug 19 18:13:59 leTones: don't worry. 7 days of Android development here :-) Aug 19 18:14:18 I use a lot of C since I deal with hardware usually, so this is a different area for me. Aug 19 18:14:21 Nice. Aug 19 18:15:22 krippykripkrip: Yes and no. JSON is just text, and retrofit2 won't automatically know what to do with your image.png. But you can load the image data as a byte array, encode it as base64, and send that as json. Aug 19 18:15:46 If your app is going to send a lot of large images you might want to consider something else than json though. Aug 19 18:16:48 so what would be the best approach, can retrofit allow me to send images with metadata? Aug 19 18:18:00 picasso? Aug 19 18:21:07 sorry am confused Aug 19 18:21:20 instead of using retrofit, use picasso Aug 19 18:21:23 dsardari, I was reading docs and it was mentioned there Aug 19 18:21:24 "Some values, such as pivotX, can be specified relative to the object itself or relative to the parent. Be sure to use the proper format for what you want ("50" for 50% relative to the parent, or "50%" for 50% relative to itself)." Aug 19 18:21:39 s73v3r: picasso to upload images to a server? Aug 19 18:21:55 i thought picasso was just for displaying images, not for uploading?? Aug 19 18:21:59 oh, I thought he said download Aug 19 18:22:08 any ideas leeds? Aug 19 18:22:21 i think the consensus is retrofit, right? Aug 19 18:22:27 Do it like everyone else does it. Aug 19 18:22:31 HTTP PUT, send binary data. Aug 19 18:22:55 but i thought multipart was the way to go for larger images? Aug 19 18:23:33 Does your server require it? Aug 19 18:23:38 I have no idea on anything, it's 2:30am on Saturday and I'm just passing through while I close down my machine... Aug 19 18:23:50 There's not much difference, multipart is just additional overhead. Aug 19 18:23:53 A small one tho. Aug 19 18:24:02 Leeds, pff, puny non-CET timezone person :P Aug 19 18:24:35 to be honest i have a rest webservice but was thinking of using whatever is the most suitable for image upload Aug 19 18:25:09 Well, then read up on how to PUT resources in a RESTful manner :P Aug 19 18:25:23 (And for love of god, don't base64 encode stuff into JSON -_-) Aug 19 18:26:24 thats the only way i know how lol, thats why i’m asking what is the best approach, if you could use any library and any kind of server what would be the best? retrofit and php Aug 19 18:26:47 php is never the best Aug 19 18:26:57 but that's not a conversation for this channel :) Aug 19 18:29:04 so what do you guys use then, the only way i know is converting to base64 but i know thats not the best idea? Aug 19 18:29:47 What I said. Aug 19 18:29:56 You send an HTTP request with data in it. Aug 19 18:29:57 O.o Aug 19 18:30:21 HTTP is new technology :) Aug 19 18:30:21 Either PUT or POST Aug 19 18:30:28 lol Aug 19 18:30:37 Set proper MIME type, send data. Aug 19 18:30:47 Your server sees MIME type, does something with the data :) Aug 19 18:31:09 ok lemme go try and find some gd tutorials, sorry for the dopey questions, am a bit of a newbie Aug 19 18:31:12 Nothing about HTTP says it has to be text, how do you think images are served on the web? :P Aug 19 18:31:54 i’ve no idea Aug 19 18:32:02 do you know of any gd tuts? Aug 19 18:32:29 Well try looking up on how your PHP can accept a POST request. Aug 19 18:32:37 Do it MultiPart if you must. Aug 19 18:33:05 but i thought Leeds said PHP is not a good way to go Aug 19 18:33:49 it doesn’t matter; what you write your server in is outside this channel’s scope Aug 19 18:34:14 I'm using Android Studio. How do I find a certain public class? There are so many files and doing Ctrl+f isn't helping. I'm looking for "public class ListView". Aug 19 18:34:31 its still our duty to steer you away from php regardless Aug 19 18:34:40 leTones, Cmd+O, ListView Aug 19 18:34:53 lol Aug 19 18:34:54 okay, let me try. Aug 19 18:34:56 Or press shift twice and type ListView Aug 19 18:35:22 ah, thanks. Aug 19 18:35:25 worked. Aug 19 18:41:17 on Android studio, i'm trying to create a new public class called ListView, but it says it already is defined in the compliation unit. What does that even mean, I searched for "ListView" but it is a ListView.java file where it is defined and it says if I edit that file, it has no relationship to my project itself. ? Aug 19 18:41:29 What's the most straightfoward and easiest way to comply with M runtime permissions? Do you guys use any of the libs or do you implement it all manually? Aug 19 18:41:49 so are there any good tutorials that you could point me in the right direction" Aug 19 18:41:49 leTones: ListView is already a class Aug 19 18:42:26 orbyt_: If I want to add some code in that class, then it would be in ListView.java? Because I got a warning not to really edit that Aug 19 18:42:27 file Aug 19 18:42:34 you can’t edit it Aug 19 18:42:36 you cant edit it Aug 19 18:42:37 you have to subclass it Aug 19 18:42:38 ^ Aug 19 18:42:55 i mean, this is elementary programming here Aug 19 18:42:57 How would I do that Aug 19 18:43:05 leTones: by learning java Aug 19 18:43:39 same way you do it in any other language “public class MyListView extends ListView" Aug 19 18:43:46 do you mean something like this https://www.androidpit.com/forum/626144/android-image-uploading-to-server-from-gallery Aug 19 18:44:27 s73v3r: I did do that Aug 19 18:44:39 so what’s your problem? Aug 19 18:44:42 It gave me an error, so that is why I went into the ListView.java file Aug 19 18:44:50 what error Aug 19 18:45:11 orbyt_: we’ve been using the runtime stuff directly, and it’s worked ok for us Aug 19 18:46:15 its unlikely to need to extend ListView yourself at the beginning of android journey :v Aug 19 18:46:24 oh my bad, I didn't mean to say ListView. It was ListActivity, but same thing. I was doing "public class ListActivity extends ActionBarActivity ..." Aug 19 18:46:25 this is true Aug 19 18:46:26 s73v3r: Yea i just tried implementing manually and via the PermissionsDispatcher lib. Aug 19 18:46:29 but it is saying it is outdated Aug 19 18:46:39 leTones: That’s because ListActivity exists Aug 19 18:48:04 s73v3r: right, like ListView exists already. but doing public class ListActivity extends ... , I thought that would allow me to use it? Aug 19 18:48:15 why? Aug 19 18:48:25 ListActivity exists. you’re not going to be able to use that name Aug 19 18:48:26 The "Android Programming, the Big Nerd Ranch guide" mentions you guys! It says that "Lots of top-notch Android developers hang out in #android-dev on irc.freenode.net". You are celebrities! Aug 19 18:48:52 Now wave your hand if you are a top-notch Android developer! Aug 19 18:49:08 leTones: Please go get yourself a Java programming resource, and learn basic Java programming. Aug 19 18:51:07 20 reputation to chat on Stack Overflow :( Aug 19 18:51:46 aevitis: you can chat here for free Aug 19 18:52:17 That book is expensive Aug 19 18:52:23 no it’s not Aug 19 18:53:37 s73v3r: you're not from a poor country then Aug 19 18:54:15 the computer you need to buy to develop the apps is still far more expensive than the book that will teach you how to do it Aug 19 18:55:24 razor1101: you can rent it for $9.99. It's not a book that you need to keep forever in your bookshelf Aug 19 18:55:58 arancio: can't i just read from d.android.com Aug 19 18:56:04 you can do that too Aug 19 18:56:10 Its free anyway Aug 19 18:56:10 Hey guys, I made the open source app Red Moon, which I'm selling on Google Play and somebody has uploaded an exact copy using my trademark for half the price Aug 19 18:56:18 do you guys know what I can do? Aug 19 18:56:21 so issue a takedown Aug 19 18:56:22 most people active on #android-dev aren't top-notch :P Aug 19 18:56:35 s73v3r: could you tell me where I can do that? Aug 19 18:56:36 raatmarien: what license did you put the app under? Aug 19 18:56:39 and you can buy it used for $8 dollars, shipping included Aug 19 18:56:47 you’re gonna have to go into the play console and look Aug 19 18:57:06 raatmarien: dont open source the app then. Someone will copy your code. Aug 19 18:57:20 GPLv3 Aug 19 18:57:42 The name is still my trade mark Aug 19 18:57:48 i didn’t think you could put a GPLv3 app up in the store, due to the signing requirements Aug 19 18:57:51 raatmarien, it isn't trademarked until you register it Aug 19 18:57:55 that is the apple store Aug 19 18:58:02 google store is the same way Aug 19 18:58:02 unregistered trade mark? Aug 19 18:58:12 raatmarien: from the redmoon gihub page "All used artwork is released into the public domain" Aug 19 18:58:26 that does not give you much recourse Aug 19 18:58:27 yeah the artwork is Aug 19 18:58:29 yeah, it sounds like you basically asked this to happen Aug 19 18:58:37 raatmarien, issue the takedown request anyway Aug 19 18:58:48 raatmarien, you have no real case Aug 19 18:59:14 When inside of an activity, I create a new object and that object is a long running task, and I rotate my screen, did I just leak the activity. Aug 19 18:59:18 It's not a huge problem for me, since the point of the paid app is donations Aug 19 18:59:26 thanks for the advice guys! Aug 19 18:59:35 I'll email him nicely to start Aug 19 18:59:56 the most you could do is get them to change the name. and even then it’s not likely Aug 19 19:00:02 eghdk, you probably killed your task :P Aug 19 19:00:16 And perhaps leaked the activity, depends on what you're doing with references. Aug 19 19:00:23 is the object an inner class, or what is it? Aug 19 19:00:32 (Don't run business logic in your view layer. Meaning, don't start background tasks in Activity classes -_-) Aug 19 19:00:44 s73v3r: external class Aug 19 19:01:26 Mavrik: Yep. I'm ahead of you. I'm just trying to figure out, if an object (Activity) creates another object... does it hold a reference to it? Aug 19 19:01:47 raatmarien: beat them! Lower your price at half their price! Aug 19 19:02:10 the activity would hold a reference to the object it creates. The created object doesn’t have a reference by default, but it could be given one Aug 19 19:02:27 Like... if my activity creates a backgroundTaskObject and then starts the background task. Am I basically doing the same thing as just starting the background task in the activity (which is what you said not to do in the first place) Aug 19 19:02:27 eghdk, well, if you say "MyObject blah = new MyObject()", blah is obviously a reference :) Aug 19 19:02:44 haha, don't think that that is the right move here Aug 19 19:03:00 it’s not, as it’s just going to start a race to the bottom Aug 19 19:03:01 eghdk, thing is, you don't want your background task to share lifecycle with activity. Aug 19 19:03:03 "Pro version has no ads and more device support compared to normal red moon. " - pretty sure Ive never seen an ad in read redmoon :/ Aug 19 19:03:14 So you want to have a service, presenter or something that will survive destruction of activity and won't really be bound to it. Aug 19 19:03:17 although donations are usually pretty terrible for revenue anyway, so it should be ok Aug 19 19:03:17 Mavrik: I know I'll get laughed at... but... now that its created, the activity doesn't have any tie to it? Like if an object loses all references, won't it be GCd? Aug 19 19:03:23 no, there are no ads in Red Moon thatsnotmynick Aug 19 19:03:34 eghdk, it will. And if you didn't pass activity into it, it won't hold it. Aug 19 19:03:44 yeah, I'm not making any real money :P Aug 19 19:03:46 eghdk, UNLESS it's an inner (anonymous) class :) Aug 19 19:03:50 it's just an hobby project Aug 19 19:04:07 This is a basic question, but I'm just learning, so - I want to put an adapter on a Listview, and everything I've read so far says that I need to extend the ArrayAdapter class to my own subclass for it Aug 19 19:04:08 Why? Aug 19 19:04:37 If I just want a basic adapter from an Array to a Listview, what can I do? Aug 19 19:04:57 raatmarien: Yeah, it sucks what they are doing. It is scummy for sure. but unfortunately it is also the way of the world. Lesson learned for next time? I'm sure redmoon would be a great portfolio piece to show when interviewing for an android dev position if you are interested in that Aug 19 19:04:58 subclass BaseAdapter Aug 19 19:05:06 try not to worry about a handfull of lost dollars Aug 19 19:05:14 Mavrik: So if it will get GC'd... then what do I do? Aug 19 19:05:21 make the long running class static? Aug 19 19:05:31 well for basic adapters there is i.e. ArrayAdapter Aug 19 19:05:38 eghdk, think a bit, what would that accomplish? Aug 19 19:05:39 no need to subclass Aug 19 19:05:46 aevitis: you’re gonna need to subclass, because you need to write the glue code to bind your objects to the views Aug 19 19:05:54 Please stop telling people to use ArrayAdapter, it's just giving them pain -_- Aug 19 19:06:08 oh Aug 19 19:06:16 can i recommend them RecyclerView? Aug 19 19:06:33 So I should use this: https://developer.android.com/reference/android/widget/BaseAdapter.html? Aug 19 19:06:44 Mavrik: Making the class static would work though... right? Aug 19 19:06:46 yeah, that’s usually the best Aug 19 19:06:55 eghdk, what would that change? Aug 19 19:07:01 Static class just means it's not an inner class. Aug 19 19:07:13 It doesn't say anything about how long the objects built from it live. Aug 19 19:07:19 That's all about references you hold to those objects. Aug 19 19:08:24 raatmarien, wow Aug 19 19:08:25 I hate the way Google does template activities Aug 19 19:08:27 lol Aug 19 19:08:29 They're really intimidating Aug 19 19:08:33 funny how it is named Pro Aug 19 19:08:36 Red Moon Pro Aug 19 19:08:39 and is cheaper Aug 19 19:08:48 yeah :P Aug 19 19:08:56 I have a class called NetworkHelper with a method called getJSON(). It does everything in the getJSON method in another thread. So I can call it from an activity and not hit a NetworkOnMainThreadException. But if I rotate my activity right now, I can see that the network call keeps going. Aug 19 19:09:50 To my understanding... it should stop because it should be garbage collected. Aug 19 19:09:53 eghdk: that’s why you do it in a service Aug 19 19:10:19 So I should move ALL network/background tasks to services? Aug 19 19:10:29 yes Aug 19 19:10:59 Interesting. I've never heard that before. Most people say "use a headless fragment" or something. Aug 19 19:11:14 that can work too Aug 19 19:11:39 the important thing is, as Mavrik said, is to not tie the network request lifecycle to the activity lifecycle Aug 19 19:11:42 Getting an error on "DeviceListFragment" - cannot resolve symbol. I was implementing as: http://codepad.org/ZM2W3IYE Aug 19 19:12:00 DO NOT DO THAT Aug 19 19:12:21 Do not simply add an underscore to the name of an existing class Aug 19 19:13:02 But at this point... I'm just questioning my java knowledge. I have one object (Activity) that creates a new Network object, and THAT object does the network calls. If the Network object doesn't require a contxt/activity, the Network object will be GC'd... right? Aug 19 19:13:20 s73v3r, is he trolling us? Aug 19 19:13:32 The error message is from a C/C++ compiler :P Aug 19 19:14:00 who cares about the error on the pastebin or the syntax it is in Aug 19 19:14:32 the compiler Aug 19 19:14:34 s73v3r: that wasn't the issue, but I can change that Aug 19 19:14:59 you didn’t paste the whole line, anyway Aug 19 19:15:19 "the important thing is, as Mavrik said, is to not tie the network request lifecycle to the activity lifecycle". Correct. So my network request HAS to live in SOMETHINGs lifecycle? It won't just float around. If it floats... it would get GC'd. It has to go in a service or in my Application class or I have to declare it static. Correct? Aug 19 19:16:28 s73v3r: yeah, forgot the "r", and after that it's just an open curly brace. Aug 19 19:16:32 eghdk, yes. Aug 19 19:17:02 you have to post the whole line if you want accurate help Aug 19 19:17:12 Mavrik: WOOO I GET IT. Damn. That took me forever to get my head around. Aug 19 19:17:20 eghdk, you can keep it living via a service (which has it's own lifecycle), via Loaders (which survive configuration change), via MVP presenters (a design pattern), and a few ways as well. Aug 19 19:17:21 :) Aug 19 19:17:28 leTones: you’re writing this in java? Aug 19 19:17:30 I guess Loaders make sense for simple stuff? :) Aug 19 19:17:34 yes Aug 19 19:17:45 i’ve never heard of an ‘asm’ attribute in java Aug 19 19:18:26 Mavrik: So I'm learning MVP. How do people get their Presenters to live? Seems like a presenter needs an anchor point like an Activity or Applicaiton. Aug 19 19:18:42 Uhh... that's actually a question with a lot of answers :P Aug 19 19:18:51 s73v3r: Is it okay to paste the github I'm looking at to clear this out, maybe i'm confused on something very small Aug 19 19:18:57 because this code is from a tutorial. Aug 19 19:18:58 sure Aug 19 19:18:58 I think canonical way is to have a fragment with setRetainState(true) Aug 19 19:19:08 And then have that fragment hold to tasks. Aug 19 19:19:11 s73v3r: https://github.com/tutsplus/Android-BluetoothScannerFinishedProject/blob/master/BluetoothScanner/app/src/main/java/com/tutsplus/matt/bluetoothscanner/ListActivity.java Aug 19 19:19:24 that is what i'm trying to implement, Lines 14 Aug 19 19:19:25 (Fragments that retain state are detached from activity when it gets destroyed and are reattached to new activity.) Aug 19 19:19:28 that’s one way. I won’t say it’s the cannonical way, cause I’ve never really done the headless fragment thing Aug 19 19:19:53 leTones: and what’s the actual error you are getting? Aug 19 19:19:56 It's the most common I've seen. Aug 19 19:20:00 the literal paste? Aug 19 19:20:01 Seems kinda unhygienic tho. Aug 19 19:20:24 s73v3r: the error I am getting is: "cannot resolve symbol 'DeviceListFragment'" Aug 19 19:20:55 did you define it? Aug 19 19:21:27 I believe so, I mean i'm looking at the code directly I linked you that is a tutorial. Aug 19 19:21:34 Have you imported it? Aug 19 19:21:35 so I haven't changed much Aug 19 19:21:55 i mean in your code. where did you define it? Aug 19 19:23:07 Hm. Thanks both s73v3r and Mavrik . Feel a lot more comfortable with this. Just to go out on a limb here. How does an Activity or Service or Application (one of those things that have a lifecycle), know to stick around? Seems like it's any other object, and it should be GC'd. Aug 19 19:23:13 nvm, I think that was the issue. I didn't define it properly s73v3r Aug 19 19:23:17 in my code Aug 19 19:23:43 eghdk, it's referenced by Android runtime in the process Aug 19 19:24:13 It's holding references to all Activities / Services / etc. that are currently active. Aug 19 19:24:44 no ResidentBiscuit Aug 19 19:25:00 probably that's why, i was taking snippets of the code Aug 19 19:25:10 IIRC it's the ActivityManager for Activities, but don't hold me 100% to my word. Aug 19 19:30:50 Mavrik: Aha. Yes that makes sense. I can see the light. This makes so much more sense now. Every object needs an anchor point. If not it's gc'd. You can create an anchor via a static, or keep a reference in a system level component (app class, activity, service etc). WOOO Aug 19 19:31:06 yep Aug 19 19:31:10 eghdk, if you dump the heap Aug 19 19:31:12 Is Xamarin considered a bad word in this channel? Aug 19 19:31:26 eghdk, and open it on your pc with software like Eclipse MAT Aug 19 19:31:34 you can see the whole tree of what's holding what Aug 19 19:31:42 arancio, don't see why Aug 19 19:31:48 arancio, I just doubt many people use it here Aug 19 19:31:56 most people in here do native android apps Aug 19 19:32:27 what kind of people use Xamarin? In what cases? Aug 19 19:32:30 Mavrik: Yep. I have a hprof dump and I see all this crap in this simple app that I have. So I feel like it's actually kinda hard to really understand whats going on. Aug 19 19:32:57 u should ask the people that use it why they do. Aug 19 19:34:06 danijoo_: yes but maybe someone here could know something about that even if they don't use it Aug 19 19:34:06 arancio, people who want to develop cross platform apps and deal with those issues I guess? :P Aug 19 19:34:17 Ok Aug 19 19:34:19 Thanks Aug 19 19:34:29 is the Galaxy S6 really considered in the xxxhdpi category? https://design.google.com/devices/ I thought that was for the largest tablets Aug 19 19:34:46 Bernzel, there are lists for that online. just google it Aug 19 19:35:03 danijoo_, Isn't that what the link I provided shows? Aug 19 19:35:08 dpi not only depends on screen size Aug 19 19:35:17 there are 10" tablets that are only mdpi Aug 19 19:36:09 Bernzel, dpi isn't the screensize Aug 19 19:36:19 the list is not lying if this is your question Aug 19 19:36:19 large tablets tend to have smaller DPI :) Aug 19 19:36:36 ok I have my answer, thanks! Aug 19 19:39:48 Mavrik: Can't hold my excitement. Feel like it never clicked till now. Oh man. I'm gonna go get some ICE CREAM Aug 19 19:44:27 Does any part of the GeoFence api support altitudes? Eg, is there a way to see if a person inside a geofence is on the first floor or the 3rd of a building? Aug 19 19:47:43 orbyt_, there's no good way of figuring out such a small difference with phone sensors. Aug 19 19:47:56 so is this the kind of thing you are talking about Mavrik https://www.androidpit.com/forum/626144/android-image-uploading-to-server-from-gallery? Aug 19 19:48:22 Mavrik: You dont think its capable of differentiating 30+ feet of altitude? Aug 19 19:48:32 orbyt_, I'm very sure it's not Aug 19 19:48:40 Which sensor would do that? :) Aug 19 19:49:21 No idea, I know theres an ability to getAltitude but not sure how accurate it is. Guess will have to test it sometime. Aug 19 19:50:53 with enough gps endpoint its possible in theory. but its super inaccurate and i dont know if android has apis for that Aug 19 19:51:06 s/endpoint/satelites Aug 19 19:53:29 or is this better, http://www.codepool.biz/take-a-photo-from-android-camera-and-upload-it-to-a-remote-php-server.html, sorry but am stuck :( Aug 19 19:54:43 orbyt_, well, think a bit :P Aug 19 19:54:53 danijoo_, the problem is that you're inside Aug 19 19:55:16 And the reflections inside the city make altitude accuracy extremely problematic Aug 19 19:55:31 You can get a ballpark figure but 2 floors is just not enough difference Aug 19 19:56:15 yeah. even if you are on a plain field its problematic Aug 19 19:56:39 You could use the barometer Aug 19 19:56:52 But again, you need enough altitude difference to drown out the weather effects :) Aug 19 19:57:06 exactly Aug 19 19:57:16 youd need to know exact weather conditions Aug 19 19:57:23 and they change too fast Aug 19 19:58:01 or just ask the user to claim they are ground level ? and feild values from monitor them walking up stairs was one idea i had for a location that had no elevators Aug 19 19:58:33 the project died and was being done on iOS. but i thought that was cool to know the person walked up three floors Aug 19 19:59:26 if its for a coorporation and you want to track users in the coorp building you could possibly check which access point the phone is connected to Aug 19 19:59:28 Suppose you Android application must interact with your server through a web API. How would you let the application authenticate? Aug 19 19:59:36 arancio, oauth. Aug 19 19:59:56 access points, ibeacons are good if you control the environment Aug 19 20:00:06 calibrating to zero for barometer makes sense as well Aug 19 20:00:47 under water its easy :p Aug 19 20:00:51 1 bar per meter Aug 19 20:00:53 :p Aug 19 20:01:08 eh 10m Aug 19 20:01:16 Mavrik: thanks Aug 19 20:01:27 (oauth2 actually.) Aug 19 20:01:30 Mavrik: So I created a long running task that execute on a different thread and stuffed that in a class. (infinite while loop that prints to logcat every 500ms). This task gets kicked off on every Activity onCreate. If I rotate my screen a bunch of times. Force GC via AS, then dump the heap, I still see all of the references there and the logs keep printing to the console... =( thats not whats supposed to happen Aug 19 20:12:50 eghdk, if you're using anonymous inner class, it holds a reference to the activity Aug 19 20:13:57 as long as your thread is running, the activity will not be eligible to garbage collection Aug 19 20:14:26 also, separate question but is it possible to create a background service on android so when deployed it automatically starts? Aug 19 20:19:41 bitkiller: I'm not using an anonymous inner class? Aug 19 20:22:47 Hey so Aug 19 20:22:52 I have a working Listview adapter Aug 19 20:22:57 but when I rotate the screen Aug 19 20:22:59 The listview resets Aug 19 20:23:17 not just the listview Aug 19 20:23:28 your activity gets recreated Aug 19 20:23:31 bitkiller: http://pastebin.com/hWY5YMnQ Aug 19 20:23:33 Oh dang Aug 19 20:23:39 So how do I save it? Aug 19 20:23:58 onSavedInstanceState would be one way Aug 19 20:24:13 I'll look into that Aug 19 20:24:19 I might just look my app to portrait though Aug 19 20:24:49 If I'm pulling/saving from the SharedPreferences, it should work, right? Aug 19 20:24:51 depends on your apps goals whether that will be sufficient Aug 19 20:25:13 yeah its just a basic task manager Aug 19 20:25:15 there are other configuration changing events than rotation Aug 19 20:25:21 Task manager as in, to-do list Aug 19 20:25:36 I see Aug 19 20:27:04 you could override them all, means you are telling the system "I'll handle it", and the activity won't recreated. Pays off to learn to do it right though Aug 19 20:27:59 I see Aug 19 20:28:09 Yeah, I think I'll just lock to portrait for now Aug 19 20:29:12 it's not difficult, just save the scroll state and restore it Aug 19 20:29:33 I'm going to build my server side using the APS.NET MVC and ASP.NET Web API, IIS and SQLServer. Will I have problems? Aug 19 20:30:08 Do people use open source stacks usually, here? What kind? Aug 19 20:32:27 -_- Aug 19 20:32:43 Can we please beat developers that lock apps to portrait to death before they manage to release anything? Aug 19 20:33:09 Mavrik: I volunteer Aug 19 20:34:08 Mavrik: So I created a long running task that execute on a different thread and stuffed that in a class. (infinite while loop that prints to logcat every 500ms). This task gets kicked off on every Activity onCreate. If I rotate my screen a bunch of times. Force GC via AS, then dump the heap, I still see all of the references there and the logs keep printing to the console... =( thats not whats supposed to happen Aug 19 20:34:22 Heres the pastebin if you could take a look http://pastebin.com/hWY5YMnQ Aug 19 20:35:09 Threads run until run() returns Aug 19 20:35:25 That's exactly what's supposed to happen Aug 19 20:36:07 What? Threads run until run returns no matter what? That's crazy. Aug 19 20:36:22 I guess it's not. But it's not what I was expecting. Aug 19 20:36:36 Well, yeah.. That's how java works Aug 19 20:37:01 So couldn't I put a network call there, and it'd be guranteed to run to completion? Aug 19 20:37:17 Sure Aug 19 20:38:15 Guaranteed in the sense that your process can always be killed, but sure Aug 19 20:41:56 eghdk: a task (a thread) is a lower level object than the android activity object Aug 19 20:45:47 SimonVT and arancio I guess in my case... why does the activity stick around and not get GCd? The LongRun object didn't need an Activity to be constructed Aug 19 20:47:12 Check gc roots, I guess Aug 19 20:48:31 how do you figure the activity is sticking around? Aug 19 20:48:35 the Thread sticks around Aug 19 20:48:37 not the Activity Aug 19 20:50:29 so I’m confused, is it better to use http rather than the likes of retrofit2 to upload images? Aug 19 20:51:23 pfn: I'm force GC'ing Aug 19 20:51:29 so? Aug 19 20:51:38 force gc is meaningless Aug 19 20:52:38 Threads are a gc root Aug 19 20:52:43 they cannot be gc until they are done Aug 19 20:53:29 pfn: Yeah that's fine. I expect my threads to be there, but not my Activity Aug 19 20:54:25 the activity isn't there, you have something else that is leaking, and it's not the thread Aug 19 20:56:42 pfn: Did you happen to see my pastebin? Aug 19 20:56:54 There's literally nothing else there. Not sure what else it could be. Aug 19 20:57:07 that's where you learn to read the heapdump\ Aug 19 20:59:03 what paths do i have to see how close 2 players are of each other? Aug 19 20:59:09 bluetooth / wifi Aug 19 20:59:42 pfn: Yeah. I'm trying. Has to be something that points me in the right direction. As of now, all I see is that I have 18 instances of my MainActivity after rotating for a while and then force GC Aug 19 21:01:07 so, view the gc roots and figure out why Aug 19 21:01:11 ezpz Aug 19 21:02:09 pfn: All I see when I right click is "jump to source" Aug 19 21:03:07 In a Settings Activity, I need the user to set up an alarm... How would you actually do this? This is the format: HH:MM, are these 2 strings? Aug 19 21:03:20 String Set {HH,MM}? Aug 19 21:05:02 eghdk, why would you right click, click on the instance and review the reference tree Aug 19 21:05:39 reference tree? Aug 19 21:05:58 f*ck. That panel was dragged all the way down. didn't even know it existed. Aug 19 21:06:43 could someone help, I’ve found an awesome tutorial on uploading large files using OKHTTP library to a PHP server, but how can i use this for a rest webservice? Aug 19 21:12:16 pfn: Theres so many references! Aug 19 21:21:45 eghdk, sorry, i i've been away Aug 19 21:24:11 bitkiller: NP. Getting help left and right. Just want to figure out this last weirdness, then I'm turning off my laptop. hahah Aug 19 21:32:35 I literally took out all of the other code. I just have a plain activity starting, I rotate 2 times. I force GC. Dump heap. BAM 3 activites in my heap. Super strange. Aug 19 21:33:01 If there are no gc roots then it doesn't matter Aug 19 21:37:01 How can I add fragments at runtime that AREN'T fullscreen????? Aug 19 21:37:37 same way you add fragments at runtime that are Aug 19 21:37:54 Wow, thanks! You're on my ignore list now. Aug 19 21:38:01 you have the framelayout that you’re adding fragments to, and that can be any size Aug 19 21:38:02 ok Aug 19 21:39:29 IWishIKnew: how adding a fragment has anything to do with its size on screen? Aug 19 21:39:50 I never said anything about size. Aug 19 21:40:03 IWishIKnew: "fullscreen" is a size Aug 19 21:40:03 yes, you did. you said you don’t want them to be fullscreen Aug 19 21:40:14 wow.... now you're on my ignore list... Aug 19 21:40:25 Can I be on your ignore list too? Aug 19 21:40:34 let’s all be on their ignore list Aug 19 21:40:40 only if you give me a useless answer or say somthing totally absurd. Aug 19 21:40:58 nothing you’ve been told is useless or absurd Aug 19 21:41:13 Let's see if my client has an "ignore" feature too Aug 19 21:41:27 Found Aug 19 21:44:34 SimonVT: What do you mean? Aug 19 21:44:53 greetz Aug 19 21:46:44 How can I ever really know how many of an object actually exist if those numbers are "wrong". Aug 19 21:48:16 I have an activity with type singleTask, for some reason it is coming to the front whenever i open the app Aug 19 21:48:24 It doesn't really matter how many mat shows "exist", they only matter if they have gc roots Aug 19 21:48:42 Lets say singleTask is Activity A, and I open B, then hite the home button, and re-open, Activity A is coming back to the front, not sure why Aug 19 21:51:28 But if I resume the app from the task maanger, the singletask activity does not come to the front, weir Aug 19 21:51:30 d Aug 19 21:59:39 Anyone know why an acitivty with type singleTask would come to the front whenever an app resumes? Aug 19 22:03:41 what's the deal with the firebase documentation showing lists using {} ? Aug 19 22:05:40 SimonVT: Whaaaa? Really? I feel like that's super misleading. I guess I have to figure out how to find gc roots Aug 19 22:08:00 You can right click on the instance and it should be in the context menu Aug 19 22:09:40 SimonVT: I'm using the hprof viewer built into AS. Right clicking on an instance only gives me two options 1. Jump to source 2. go to instance Aug 19 22:09:58 Never used it, it's easy to find in mat at least Aug 19 22:11:52 is it generally a bad idea to have a static function registerListener() on a service? Aug 19 22:12:24 and I pass that function a IMyServiceListener interface Aug 19 22:14:25 SimonVT: Does MAT come built in? or is that a separate download? Aug 19 22:14:48 Standalone client, Eclipse MAT Aug 19 22:15:07 You can only have a single Service at a time vs an Activity, so it's not too terrible IMO parco Aug 19 22:22:34 guys, i got request to write some quick code to interact with an api that uses RPC instead of REST, so all calls are POST. Is there any reason I cant use retrofit normally here? Aug 19 22:22:57 Is their a IRC plugin I can use for Android Studio Aug 19 22:24:19 look in the plugin list Aug 19 22:24:28 s73v3r, I cant see one Aug 19 22:24:34 and look for intellij plugins Aug 19 22:24:43 if it’s not in the list, then it probably doesn’t exist Aug 19 22:42:22 satdav: why do you need an IRC plug-in for Android Studio? Aug 19 22:42:51 arancio, just to notify people I am pushing code to github or bit bucket the app code Aug 19 22:43:01 Ah Aug 19 22:43:03 can I link Android Studio to the app store aka google play Aug 19 22:44:15 link how? Aug 19 22:44:41 and I think your github/bitbucked scenario might be better served with a post-commit hook on the repo Aug 19 22:44:49 cool Aug 19 22:45:13 s73v3r, like to push the code to the beta channel for Android Aug 19 22:45:56 that’s done the same way you upload the production version to the store, I believe Aug 19 22:47:10 Cool s73v3r so the APK Aug 19 22:48:18 Why do I get the following message when I start a simulator? audio: Failed to create voice `goldfish_audio_in' Aug 19 22:49:10 emulator Aug 19 23:02:50 i think i once used an irc plugin in intellij Aug 19 23:06:03 https://plugins.jetbrains.com/plugin/1175?pr= Aug 19 23:38:22 Hello! I am trying to draw on bitmap using canvas, but drawArgb has no effect on the bitmap. What could be the cause? Aug 19 23:39:28 I am creating canvas as new Canvas(bitmap) and bitmap was created with Bitmap.createBitmap() Aug 19 23:39:48 god, I hate how google play music doesn't honor thumbs down Aug 19 23:39:56 I keep hearing shit I thumbs down over and over Aug 19 23:39:58 zup Aug 19 23:40:16 put an angry face like on facebook Aug 19 23:40:31 int scoreId = getResources().getIdentifier("contagem" + btnIdString.substring(0), "id", getPackageName()); Aug 19 23:40:31 TextView contagemX = (TextView) findViewById(R.id.scoreId); Aug 19 23:40:38 why is this not working Aug 19 23:40:50 can't find help in google Aug 19 23:41:15 define “not working" Aug 19 23:41:18 AS cannot resolve symbol scoreId Aug 19 23:41:29 SergioC: Perhaps findViewById(scoreId)? Aug 19 23:41:43 maybe Aug 19 23:41:45 the variable on the first line, or the ID on the second line? Aug 19 23:42:08 :) Aug 19 23:42:09 i’m not 1000% sure, but I thought IDs in android XML could only be lower case Aug 19 23:42:13 wow Aug 19 23:42:18 that's it Aug 19 23:42:28 loredan13 Aug 19 23:42:33 hence why most people use underscore_case_for_score_id_stuf Aug 19 23:42:34 s73v3r: I don't think so Aug 19 23:43:06 s73v3r: I'm not 100% sure, but I saw some ids in camel case Aug 19 23:43:42 only scoreId was needed Aug 19 23:44:10 s73v3r: drawable resource filenames can't contain upper case letters Aug 19 23:44:21 It can be done with getId () I guess Aug 19 23:45:52 s73v3r: Do you know why canvas doesn't draw on bitmap? Aug 19 23:46:28 s73v3r, upper case works fine Aug 19 23:46:48 it's just underscores tends to look a little nicer in xml Aug 19 23:46:51 only reason Aug 19 23:47:13 and visually, it's easier to distinguish underscore from uppercase in "hierarchical" files/resources Aug 19 23:47:23 loredan13: i haven’t done that in a long time, sorry Aug 19 23:50:03 Anybody? Aug 19 23:51:00 still needs debuging Aug 19 23:57:23 I'm trying to subclass VideoView like this: http://pastebin.com/izsJdGWC Aug 19 23:57:53 and I'm getting "java.lang.NoSuchMethodException: [class android.content.Context, interface android.util.AttributeSet]" during the inflation of the view. What does it mean? Aug 20 00:00:08 arancio: Exactly what it says. Inflating custom class via XML requires said custom class to have a constructor with two arguments: Context and AttributeSet Aug 20 00:01:41 loredan13: I didn't know that meant ctor thus I had no idea of the meaning. Thanks very much Aug 20 00:01:47 arancio: So that your class can receive those android: arguments from XML Aug 20 00:02:00 loredan13: I just have to add another ctor Aug 20 00:02:08 arancio: Yes Aug 20 00:04:20 loredan13: it worked. Thanks. I'm sorry but I have no idea how to help you with your problem. I only started recently with Java and Android. Aug 20 00:05:17 arancio: Well, we all come here hoping that someone more experienced will come and help us Aug 20 00:10:41 how do I get the ID of the current clicked button? Aug 20 00:11:15 getResourceEntryName(view.getId()) cannor resolve method... Aug 20 00:12:39 getResources().getResourceEntryName(view.getId()) Aug 20 00:12:46 maybe this Aug 20 00:12:56 yuck, what the hell are you doing Aug 20 00:13:47 Hi, has anybody ever dealt with AudioStream and Audio group? I can't really figure out how it works in terms of the chain. Aug 20 00:16:52 If I want to send mic audio from one phone to another and play it back then. Aug 20 00:18:00 Should it be 1) AudioStream ~~~> 2) AudioStream - AudioGroup? Aug 20 00:24:12 is it ok to hold onto BluetoothGattCharacteristics for the life of the connection, or should i only be searching by UUID? Aug 20 00:25:52 im using Android Studio 2.1.2 I started on with MainActivity using a acivity_main.xml but have since changed it to another layout file. it works upon initial launch, but when I hit the home button and relaunch, it is bringing up the activity_main.xml. ive cleaned the project but wonder where else it may be referring to the original xml? Aug 20 00:28:25 winegoddess: try renaming activity_main.xml and see where it fails Aug 20 00:28:39 oh good idea. thanks Aug 20 00:30:41 damn. it was an ID# 10T error. i was launching from the icon and had changed the name. ugh. Aug 20 00:44:49 int scoreId = this.getResources().getIdentifier("contagemA", "id", getPackageName()); => false. why false when the the id exists? Aug 20 00:45:04 java is crazy af Aug 20 00:47:13 it's not java Aug 20 00:47:22 it's because you're doing something stupid Aug 20 00:47:54 doing stupid things lets you learn Aug 20 00:48:13 the hard way you never forget Aug 20 00:48:27 I think "id" is not a valid second arg. Aug 20 00:48:43 it takes the kind of resource you want. ie "drawable" or "string" Aug 20 00:49:21 yes you r right Aug 20 00:51:42 slow method anyway Aug 20 01:30:50 but I got it working damn that was a pita Aug 20 01:56:19 apache arrow is ... interesting Aug 20 02:02:03 capella-5x :D https://addons.mozilla.org/en-US/firefox/addon/tab-memory-usage Aug 20 02:03:03 lol thats funny, FF is using ~1G but each tab reports a measly 10-20mb :D Aug 20 02:17:14 wow beating chrome Aug 20 02:20:40 g00s: v48? e10s not fully rolled out yet, per tab/process etc iirc Aug 20 02:20:45 https://blog.mozilla.org/futurereleases/2016/08/02/whats-next-for-multi-process-firefox/ Aug 20 02:21:26 Also, small pool of users exposed at any given time initially Aug 20 02:21:42 capella-5x "Electrolysis is the project name for Mozilla’s efforts to split Firefox into multiple processes to improve responsiveness, stability, and security. " notice they didn't say memory ;) Aug 20 02:22:05 e10s are great, but FF with everything in 1 process should i thought take up the least mem Aug 20 02:22:19 one of the reasons why chrome takes more memory is all the processes Aug 20 02:22:29 but for some reason, OS X is not compacting FF's memory Aug 20 02:23:46 jump on the moz server and check #developers ☺️ Aug 20 02:24:19 check with blassey Aug 20 02:25:32 They've been wrestling with that thing for some time... glad it's getting there 👍 Aug 20 02:26:24 * capella-5x is more interested in the jni glue jchen has been perfecting Aug 20 02:27:46 http://prntscr.com/c7zlea How could this possible be null Aug 20 02:36:47 "Google will end support for Chrome apps on Windows, Mac, and Linux" huhh Aug 20 02:36:58 yah, saw that Aug 20 02:37:32 "That might sound like a big deal, but Google says that a very tiny percentage of people are actively using Chrome apps." ha Aug 20 02:37:34 galaxy s6 and s7 are using weird dimensions in a layout for text size. How can I determine what folder (e.g. values, values-sw600dp, etc) a phone is going to use in a log statement? Aug 20 02:41:54 If they're going to do that then we should get unlimited downloads from GPM's web version .-. Aug 20 02:45:02 capella-5x so sometime mid 2017 FF should be great :) Aug 20 02:47:20 heh, mobile Text Selection major enhancements were completed, that was my main interest Aug 20 02:47:41 killed a lot of ugly Javascript Aug 20 02:47:59 i wonder if pwn2own will test it next year, if they get the sandboxing right Aug 20 02:48:20 ooooo, yah probs **** ENDING LOGGING AT Sat Aug 20 02:59:58 2016