**** BEGIN LOGGING AT Wed Aug 03 02:59:58 2016 Aug 03 03:07:04 l3g3nd, that's what calling notify does Aug 03 03:10:24 hmm, so i have notify calling, and it creates the notification, but when there is another brodcast while i'm viewing the notification, it's not changing. i'll check the debug again to make sure it's hitting notify during during the user viewing the notification Aug 03 03:17:53 I notify with the tray open all. the time, works fine Aug 03 03:23:37 hey, I've used "git reset --hard" like 40 times Aug 03 03:23:57 and it is giving me errors about other repos Aug 03 03:24:19 so is there any way to have it reset all the repos that need to be changed? Aug 03 03:24:35 pfn yeah, just tested it, and it's not updating (at least in the emulator) when i get to notification again. I have PendingIntent.FLAG_UPDATE_CURRENT sent for the PendingIntent in the notification .setContentIntent. that should replace the notification, shouldn't it? Aug 03 03:33:13 the pending intent isn't the content of the notification Aug 03 03:33:29 that's what you get when you click the notification Aug 03 03:33:49 deathcamel57, repo forall Aug 03 03:34:03 or. foreach, I forget the command Aug 03 03:34:20 repo foreach -c git reset --hard Aug 03 03:36:10 thanks Aug 03 03:38:49 ahh yeah, you are right. i'll keep trying to figure this out. thanks for the help Aug 03 03:39:56 Thank you so much, that works perfectly Aug 03 03:40:06 repo forall -c git reset --hard Aug 03 03:40:10 worked perfectly Aug 03 04:02:13 well, I ran into a similar issue Aug 03 04:02:21 error: Cannot remove project "external/busybox": uncommitted changes are present Aug 03 04:02:21 commit changes, then run sync again Aug 03 04:02:33 I already reset external/busybox Aug 03 04:02:46 and I tried the same thing twice more Aug 03 04:02:48 but no dice Aug 03 04:16:07 Hey guys Aug 03 04:16:16 hi Aug 03 04:16:17 im having some difficulty figuring out which way to go Aug 03 04:16:44 How so? Aug 03 04:16:59 i need to make an app that allows the user to activate a bar code reader integrated in the device and then have that output thrown in the active textfields anywhere like a keyboard wedge Aug 03 04:17:27 ive looked at services without being able to capture the hardware key on the device within that service to know when to start Aug 03 04:18:09 ive researched soft keyboard developement a bit to make a singular keyboard button for scanning within the custom keyboard ime but i didn't find any documentation Aug 03 04:18:37 easy enough to actually build a demo that didn't crash altough it did shop up in the settings as a keyboard option Aug 03 04:18:42 show Aug 03 04:19:05 any ideas how to accomplish this? im looking for design ideas from someone more experienced to nudge me in the right path Aug 03 04:19:30 sorry, I can't help out with that xc Aug 03 04:20:25 User action -> tell scanner service to launch scanner and capture output back to ourselves (this is not a problem for me) -> Output to active field (found this to be easy with getcontext or something like that?) Aug 03 04:20:39 yeaaah... Aug 03 04:20:55 essentially it would start off as a keylogger interested in one particular key Aug 03 04:21:33 and needs to run in the background to allow other apps to be used on top of it, essentially making a barcode reader that only outputs API into a standard HID reader Aug 03 04:37:00 how does the usa government know how much we make on the play store Aug 03 04:37:09 or do they at all > Aug 03 04:37:30 google probably sends them info Aug 03 04:37:35 I thought maybe google takes care of all the taxes ? Aug 03 04:38:41 So could we possibly put the google play account under my parents name? and then they get all the money and give it to me in cash? or is that illegal Aug 03 04:39:16 err google dev account i mean Aug 03 04:43:19 have yall heard of unity3d? Aug 03 04:44:19 Not illegal as long as someone (your parents) pays the taxes. Aug 03 04:44:27 ohh okay, thanks Aug 03 04:48:31 most people don't make enough that it's worth reporting Aug 03 04:48:48 I've never gotten any 1099 from Google for android apps Aug 03 04:49:12 which I assume they would send out Aug 03 04:49:29 amazon sent me one for like the $10 I made iirc Aug 03 05:07:49 new nexus launcher http://www.androidpolice.com/2016/08/01/exclusive-this-is-googles-new-nexus-launcher-that-may-debut-on-the-2016-nexus-phones/ Aug 03 05:46:37 How to tell when the first build sync is complete? or near it? Aug 03 06:13:22 Hi I'm grabbing a page HTML with jsoup and then feeding it to webview with loaddata. However I'm getting XMLHttpRequest cannot load . Cross origin requests are only supported for protocol schemes http data https Aug 03 06:13:35 i have a screen that consists of a few views followed by a recyclerview. i want the few views up top to scroll off the screen as if they're inside the recyclerview. any tips? Aug 03 06:30:02 mathu: sounds like you need CoordinatedLayout Aug 03 06:30:17 https://developer.android.com/reference/android/support/design/widget/CoordinatorLayout.html Aug 03 06:43:58 anyone compiled an android.mk file? Aug 03 06:44:04 (separately) Aug 03 06:49:19 can anyone tell me the good libraries , that will help me to guide the user on how to use my app? Aug 03 06:50:02 like when i open my app for the first time , i have seen many apps that has instructions and infographics about the app , which often helps the user Aug 03 06:53:07 shouldnt be hard to do it yourself i guess? just show some dialogs with back and continue Aug 03 06:56:27 i want to know various libraries , like one i found is wizard pager Aug 03 06:56:47 and tourguide https://github.com/worker8/TourGuide Aug 03 08:05:59 Hey, can anyone give recommendations on what to use to track the user's activity within my app? Aug 03 08:07:08 Firebase Events? Aug 03 08:09:27 would that allow me to track how many users login, register, etc within my app? Aug 03 08:12:42 you can set events for every interaction your users does with your app Aug 03 08:12:54 you can set funnels for a sequence of events Aug 03 08:13:04 perfinion: After looking at Firebase Events, it just looks like the default listeners which you can use when you are using Firebase in your project Aug 03 08:13:47 markyosullivan: you can add whatever strings you want for the event names Aug 03 08:14:10 markyosullivan: and you dont need to use the rest of the firebase stuff to just use analytics Aug 03 08:15:37 perfinion: I'm reluctant to go with Firebase because it's not free Aug 03 08:18:03 hm? yeah it is Aug 03 08:18:12 the database is not free Aug 03 08:18:22 but firebase analytics is just google analytics renamed Aug 03 08:20:20 perfinion: Have you used Fabric Answer's? Seems like you can track up to 3,000 unique events Aug 03 08:20:40 Whereas it seems you're limited to 500 with Firebase Analytics Aug 03 08:21:11 When you do MVP and you have a complex View, is there any way to get around having loads of methods in your ViewInterface such as setButtonXEnabled, setButtonXText() etc. if you have lots of elements in your View? Aug 03 08:35:41 i'm having trouble wrapping my head around this: my apps mainactivity should have a navigation drawer with the hamburger button at the top, the main content area is a recyclerview of cardviews, and there should be a floating action button. what should the top level layout be in activity_main.xml? Aug 03 08:35:49 i currently have , but the FAB doesn't display correctly (it takes up the full width of the screen) Aug 03 08:38:06 from reading and examples, i'm thinking the top level should probably be like a CoordinatorLayout, but then i'm not sure how to do the other stuff Aug 03 08:40:57 if you want drawer, drawerLayout should be top Aug 03 08:41:11 then coordinator might be inside Aug 03 08:41:11 Drawerlayout as top level, put a coordinatorlayout and the drawer content as its children Aug 03 08:41:34 Use the coordinatorlayout for your main list Aug 03 08:42:18 And of course the FAB as a child of the coordinatorlayout Aug 03 08:49:24 so: ? Aug 03 08:50:44 ah yep that works. Aug 03 09:06:56 Hey guys, any suggestions for a good REST client for android for my app ? Aug 03 09:13:21 markyosullivan: i havent, no. the 500 events kind of sucks yeah, but you can have a bunch of sub-events so its been okay for most things for me so far Aug 03 09:29:03 can someone help me solve this :/ http://stackoverflow.com/questions/38727842/access-fragments-textview-inside-a-viewpager-from-activity/38728132 Aug 03 09:29:40 what is good practice for a development workflow working with various resources/assets that will eventually be downloaded from the net and kept on internal storage, but for now i just want to include them statically? Aug 03 09:32:31 Hi, is the Android's map feature for location tracking with quota limits ? - My goal is to have tracking of the user on the map, is that free ? Aug 03 09:47:23 Diplomat: Firebase can be pretty useful Aug 03 09:47:51 I already started using retrofit, but thanks Aug 03 09:50:35 what about like copying the `/assets` folder to internal storage during development or something? Aug 03 09:53:35 What's the best way to show an error message? Aug 03 09:53:49 Would it be a good idea to show them as notifications? Aug 03 09:53:55 Dialogs? Aug 03 09:54:04 Or what I'm currently using - Toasts Aug 03 09:56:43 vibrations and electricity shocks Aug 03 09:58:17 markyosullivan: Dialogs probably Aug 03 09:59:08 Use dialogs for stuff the user cannot miss. Use toasts/snackbars for stuff that the use can miss. Aug 03 10:00:54 For example: use dialogs for popping up error messages as a result of a bad login. Use snackbars to notify the user your news app has just updated some articles. Aug 03 10:05:32 Thanks pduin, I think I might have to change some of my error messages so it'll display a dialog rather than Toast Aug 03 10:12:20 hello, anyone here experienced with iBeacon & AltBeacon ? Aug 03 10:15:00 With Google maps, how do I show markers with array of my places, which are nearby ? Aug 03 10:24:09 how can I get a list of available "adb emu" commands? Aug 03 10:24:56 if it matters, I'm using the latest stable android studio and sdk (installed both yesterday) Aug 03 10:26:43 when searching for different combinations of ["adb emu", list, command, available, supported], they all return the same as when I run 'adb -h' Aug 03 10:27:27 which for emulator console commands is 'run emulator console command'.... Aug 03 10:27:30 If I have a Toolbar declared in my xml file for an Activity and is using "elevation" which is for API's above the smallest I support, what will happen if a user on lower API enters? Will the paramters just be discarded or will the app crash or something? Aug 03 10:32:58 Hi! Didn't get an answer in #android, so I'm asking here as well. If I have two apps A and B installed on the same android device, is there any way for app A to check if app B is installed, or can I be sure that app A won't ever find out about app B? Aug 03 10:34:02 yes you can Aug 03 10:34:30 thats how can game list other installed games Aug 03 10:35:49 does the app need some special permission in order to be able to see all other apps? or is every android app able to see all other apps without the need of any permissions? Aug 03 10:36:37 AFAIR no permission is required Aug 03 10:41:28 can anyone confirm or refute that? Aug 03 10:49:20 Hello. I'm programming a GPS Tracker for an application and on Android Studio it is telling me that I need to include missing permissions required by locationManager.requestLocationUpdates(...) what is this? Aug 03 10:50:57 ZeNEX, perhaps the perms in ur manifest? Aug 03 10:51:30 Aug 03 10:51:33 Aug 03 10:51:39 thornekey, I have both these permissions in there: Aug 03 10:51:39 Aug 03 10:51:59 myke, you can use fine for both too from what I have read and anyway it does not make a difference Aug 03 10:52:13 (to my problem that is) Aug 03 10:55:12 Having an issue where my webview (inside fragment) is showing behind my on screen nav buttons Aug 03 10:55:31 i.e triange, circle, square Aug 03 10:56:41 ZeNEX: what about runtime permissions introduced in android M Aug 03 10:57:06 Ashiren, how do I add this to the manifest file? Aug 03 10:57:33 not manifest Aug 03 10:57:44 https://developer.android.com/training/permissions/requesting.html Aug 03 10:58:00 Thank you Aug 03 11:16:47 Does anybody know from which class is the constant 'MY_PERMISSION_ACCESS_FINE_LOCATION' member of? Aug 03 11:17:33 ZeNEX: Search for it Aug 03 11:17:46 ctrl+shift+f Aug 03 11:18:15 ZeNEX: If you're stuck with runtime permissions, I got it working in my app and could give you some help with it Aug 03 11:19:13 markyosullivan, It would be great if you could show me how to do it Aug 03 11:21:19 markyosullivan, can you show me the code if possible? Aug 03 11:24:34 ZeNEX: http://pastebin.com/RFLjF3cQ Aug 03 11:24:50 Check if permission is granted, if not prompted for permission Aug 03 11:24:57 *prompt for permission Aug 03 11:26:37 markyosullivan, cannot resolve symbol "MY_PERMISSION_RESPONSE" Aug 03 11:27:03 its your own int Aug 03 11:27:15 ZeNEX: it's a common pattern in android. you tell the method who sent it, by using an identifying integer Aug 03 11:27:16 as if youd do startActivityForResult Aug 03 11:27:50 So I need to send an Activity identifier? Aug 03 11:27:53 ZeNEX: Just replace it with an int Aug 03 11:27:58 e.g. 30 Aug 03 11:28:02 so in the callback (which is the same for everyone) you know where it originated. then you can run certain code depending on who asked for it (suppose the permissions were granted, you might want to just start the code you originally intended) Aug 03 11:28:08 can someone help me solve this :/ http://stackoverflow.com/questions/38727842/access-fragments-textview-inside-a-viewpager-from-activity/38728132 Aug 03 11:28:13 ohh okay Aug 03 11:28:16 thanks Aug 03 11:30:35 now, if it does not have the permission, it asks for it, but what happens if the user says no? Aug 03 11:30:44 then the callback is called Aug 03 11:30:53 and you can find out from its params what happened Aug 03 11:30:59 (or you can just ask the system again) Aug 03 11:31:24 so if the user says Yes, then the callback is NOT called? but if they say No the callback IS called? Aug 03 11:31:30 public void onRequestPermissionsResult(int requestCode, Aug 03 11:31:30 String permissions[], int[] grantResults) Aug 03 11:31:39 the callback is always called Aug 03 11:31:52 in it, for every permission you request, a response is provided Aug 03 11:31:56 (they are 2 arrays) Aug 03 11:32:14 So is that callback defined in the Service class? Aug 03 11:32:20 I would only have to override it? Aug 03 11:32:43 what I do is, I figure out which permissions i still need, this method returns a list of strings. If this list has length 0, i ask the system for permissions (asking the user). Aug 03 11:32:55 correction, Aug 03 11:33:00 if this list has length >0 Aug 03 11:34:07 say you need CAMERA and RECORD_AUDIO, and the user has allowed CAMERA, the method will return only RECORD_AUDIO since it is lacking. size > 0, so i cannot continue before it's 0 Aug 03 11:34:57 it's defined in activity and/or fragment i believe Aug 03 11:35:05 and yes override it Aug 03 11:35:26 thing is, the GPSTracker is not an activity.. Aug 03 11:35:42 then you cannot start that service before you have the permission Aug 03 11:35:42 I use it from an activity externally Aug 03 11:36:28 and in the service always check whether you have the permission, and degrade gracefully. I could just bypass your app and in the settings disable the permission. You don't want to crash Aug 03 11:37:01 makes sense? Aug 03 11:37:08 I see. Also, if the user grants me permission ig GPS automatically enabled? Aug 03 11:37:30 the permission means: you are allowed to call the specific methods. you still need to do all the work Aug 03 11:37:39 Okay, thanks Aug 03 11:38:23 therefore always use the compat methods, so on older androids you just get the permissions automatically (since they were agreed upon on install) Aug 03 11:39:40 i am setting firebase in my app, i want to know why did firebase doesnt require steps like some kind of key , all i have just set is the connection string , how does it now that client is really my app ? Aug 03 11:39:45 am i missing any step Aug 03 11:40:17 Is it normal that a viewpager container spans way too much in height? Aug 03 11:40:24 i.e. it doesnt fit into the viewport Aug 03 11:40:30 overflows on y Aug 03 11:42:04 xorgate: I'm not sure what happens if I reject permissions... I should probably test that out Aug 03 11:42:17 markyosullivan: then you are where you were before Aug 03 11:42:27 the callback is called and you don't have the permission Aug 03 11:42:57 Yeah but the app needs the permission to work Aug 03 11:43:09 1) do i have the permission? no) ask for permission result) do i have it now? yes) do what you wanted to do Aug 03 11:43:11 so I don't think there'd be another stage where the user would be prompted to enable it Aug 03 11:43:43 you ask when the users decides he wants to use the functionality that requires it Aug 03 11:44:03 if he says no, tell him you cannot proceed Aug 03 11:44:21 Makes sense Aug 03 11:44:36 it depends a bit on what the functionality is Aug 03 11:44:41 sometimes you can proceed without it Aug 03 11:44:50 like i have an app that uses location Aug 03 11:45:06 if the user says no, i just show the map with the entire country instead of around the user's position Aug 03 11:45:11 What is the best way to proceed when migrating an Eclipse project to Android Studio if the automatic import from Eclipse fails? Import all modules separately in a new project? Aug 03 11:46:27 xorgate: Basically the entire app needs BLE service Aug 03 11:46:31 which in turn needs location Aug 03 11:46:40 So frustrating requesting location Aug 03 11:46:50 then on startup just make it clear Aug 03 11:46:51 The users will probably question why I need it Aug 03 11:47:00 in the end, if you cannot continue, you cannot continue.. simple Aug 03 11:47:07 then you can tell them Aug 03 11:47:20 i believe permissions have an explanation callback or somethingn Aug 03 12:23:19 I have a problem where I'm trying to use the layout editor to change themes and most components on a layout aren't affected by the theme change, so I looked into the layout .xml of the activity I'm trying to change colors on, and I found this: Aug 03 12:23:20 style="@android:style/TextAppearance.Medium.Inverse" Aug 03 12:23:36 should this reference be defined in the styles.xml file? Aug 03 12:24:15 or is this some kind of reference to a premade style in Android Studio that I should look elsewhere for a definition? Aug 03 12:24:35 because there is nothing in styles.xml related to /TextAppearance.Medium.Inverse Aug 03 13:03:24 I have a project that has ndk dependencies. When doing a build I get config.h: No such file or directory. The project compiles fine in Eclipse. Any ideas how I can fix this? The .so file is already in the jniLibs folder. Aug 03 13:08:57 Hmm, I am quite new to android, followed some tutorials and kinda got the hang of the basic concepts. I am wondering if it is difficult to break an activity up in fragments, in a later stage, when the application is a lot further developped? Aug 03 13:16:09 aukeroorda: More than likely you'll have to restructure your app at least once Aug 03 13:16:27 Hmm, oke. Aug 03 13:16:29 at least I seem to have to do it every time I start a new project Aug 03 13:17:02 Good to know, thanks Aug 03 13:24:25 I get unmappable character for encoding UTF-8 everywhere in AS after migrating from Eclipse. I've already changed the encoding to windows-1252, but that didn't change anything Aug 03 13:24:31 Any ideas how to fix this? Aug 03 13:24:56 The characters get displayed properly after changing the encoding, but the build is broken Aug 03 13:25:12 Don't you want UTF8 over windows encoding? Aug 03 13:25:41 I want it to build, whatever is need to accomplish that Aug 03 13:26:30 if I make a button with elevation is doesn't show if I use transparent color. Anyone knows a workaround for that? Aug 03 13:26:36 If there's a way to convert everything to utf8 that would be good Aug 03 13:30:11 Why does it even complain about utf8 if I've set all the encodings to windows-1252 Aug 03 13:30:41 what is "set all the encodings" Aug 03 13:30:58 have you set the javac options in build.gradle yet Aug 03 13:31:26 I set compileOptions.encoding = 'windows-1252' in the build.gradle Aug 03 13:31:33 And also in the settings->File Encodings Aug 03 13:31:34 hi! Aug 03 13:32:04 I am using Android Studio 2.2 preview 7 to test some small c/c++ code Aug 03 13:32:24 the problem is, the include headers are not found, and I only use some headers form ndk directly Aug 03 13:32:36 HunterD: I get the same on 2.1.2. Aug 03 13:32:47 are you using ndk-build? Aug 03 13:32:49 on Android Studio 2.2 preview 4 I managed to make the headers visible by adding a include path in CMakeLists.txt Aug 03 13:33:03 I am using the externalNativeBuild feature Aug 03 13:33:07 with CMake Aug 03 13:33:39 *in 2.2 preview 7, the same adition of the include path does not make the headers visible :( Aug 03 13:33:56 the debugging does work though.. on both version.. in c/c++ files Aug 03 13:34:06 but withouth the header files it is useless Aug 03 13:34:36 any ideas on why this version, 2.2 preview 7, has no visible header files when using CMake/externalNativeBuild ? Aug 03 13:34:54 pfn: Is that what you mean by javac options? Aug 03 13:35:19 indeed Aug 03 13:40:48 include has to go in the cmakelists. externalNativeBuild.path points to the cmakelists.txt file Aug 03 13:53:19 anyone here worked with Unity where the end result was an Android app/game? Aug 03 14:17:17 yes Aug 03 14:25:35 Howdy Aug 03 14:26:07 AS build runs forever without stopping Aug 03 14:39:46 Is there android sdk for powerpc? Aug 03 14:40:12 hmmmmmmmmmmm Aug 03 14:40:19 very unlikely. Aug 03 14:40:37 I see Aug 03 14:40:46 shareholder; https://github.com/zeldin/android-sdk-ppc Aug 03 14:40:53 I lied, that might be helpful. Aug 03 14:41:03 only for Linux/PPC Aug 03 14:41:19 https://code.google.com/p/android/issues/detail?id=16 Aug 03 14:41:28 So there is no way to build android app from powerbook g4? Aug 03 14:41:32 haha wow, issue 16 Aug 03 14:41:41 even if there was Aug 03 14:41:43 it would be so slow Aug 03 14:41:48 Oh thank you Aug 03 14:43:59 Anybody testing with espresso here? Aug 03 14:44:21 What is your question? Aug 03 14:45:37 I'm trying to find a good way to reset state after tests, but clearing shared preferences in an @after method looks like it's adding 7-15 seconds to my tests Aug 03 14:47:13 Similarly, is there a way to setup a certain state before an activity loads? It looks like the activity loads immediately. Maybe I'm looking at testing the wrong way if I'm trying to do that though... I'm not sure what best practices are here Aug 03 14:48:33 bitkiller: were you able to use rxandroidble from within a service? Aug 03 14:49:51 why can't we have listview without adapterview? Aug 03 14:51:35 parco, yep Aug 03 14:53:27 i use a bound service Aug 03 14:53:29 purplex88, uh, refine your question Aug 03 14:54:50 pfn: in windows programming, i used to simply add items to listview but with android why is there adapterview to manage the listview? Aug 03 14:55:08 bitkiller: did you need a Service version of this class>> com.trello.rxlifecycle.ActivityEvent ? Aug 03 14:56:29 i don't use rxlifecycle Aug 03 14:57:41 purplex88, uh, you mean adapter and Windows. programming uses that as well Aug 03 15:07:31 hi Aug 03 15:07:44 how i can see the keylines of my app to see margins? Aug 03 15:08:26 pfn: hm just never heard of "adapter" being used to insert items in win32 listview Aug 03 15:09:02 any? Aug 03 15:13:33 purplex88, you haven't used it much then Aug 03 15:15:45 pfn: i'm pretty sure https://msdn.microsoft.com/en-us/library/windows/desktop/bb774737(v=vs.85).aspx <- no adapter there Aug 03 15:16:19 bitkiller: how did you handle such a line .compose(bindUntilEvent(PAUSE))? Aug 03 15:16:20 the various LVITEM and such serve as the adapter Aug 03 15:16:27 how i can see the keylines of my app to see margins? Aug 03 15:16:38 like a overlay to see the lines Aug 03 15:17:20 why doesnt a if statement inside a onclick listener for button work?? http://ideone.com/RAHHIs Aug 03 15:18:11 because that's completely and utterly wrong Aug 03 15:19:13 go back to java basics first, then android basics on how to work with string resources Aug 03 15:19:45 im gonna have a stab and say cos its checking it as an object and not the value? Aug 03 15:20:20 https://developer.android.com/guide/topics/resources/string-resource.html#string-element Aug 03 15:28:52 in relation to android yes Aug 03 15:29:52 even if i check if s = "hi" (which is what the string resource was equal to) it doesnt trigger the if Aug 03 15:30:54 ah wait, i think i got it. Aug 03 15:31:22 thats interesting Aug 03 15:33:14 though that much i can confirm from my books there were no "adapter" concept back then so thats something new to me now Aug 03 15:33:45 purplex88, there has always been an adapter concept Aug 03 15:33:52 it just hasn't been called such Aug 03 15:34:30 the name is a little weird Aug 03 15:35:19 it'd be more appropriately named ModelAdapter or something, but that's just long Aug 03 15:37:53 parco, i don't know what it does as i don't use rxlifecycle, but regarding binding/unbinding to service, i do it the usual way (in onStart/onPause) Aug 03 15:40:39 pfn: we used a for loop to insert items one by one whereas "ArrayAdapter" holds all item views at once. Aug 03 15:41:06 you could use a for loop to insert items into ArrayAdapter Aug 03 15:45:46 yes and then directly set ArrayAdapter to listview Aug 03 15:46:29 which is exactly adapter to link the data to listview? Aug 03 15:46:51 exactly what adapter does* Aug 03 15:48:43 but i heard it also manages the data for performance Aug 03 15:55:53 Has anyone here had issues clearing shared preference in an @after method with espresso? Aug 03 15:59:54 I just get weird behavior in general from espresso Aug 03 16:13:18 the bluetooth permission dialog has been broken for 3 years, wtf google ... Aug 03 16:20:01 g00s: How is it broken? Aug 03 16:20:29 oh they closed the issue in 2014, so probably ignored at that point Aug 03 16:20:56 konk3r the activity that pops up is malformed (title behind text) and when you rotate the screen new windows pop up Aug 03 16:21:23 bug 60002 - old enough to be 5 digits ;) Aug 03 16:22:07 Wow Aug 03 16:22:34 I wonder how many issues have been closed instead of being addressed Aug 03 16:23:39 Haha I also wonder if Google has a team whose job is to replicate reported issues. That could easily be a fulltime job Aug 03 16:24:36 more likely they have a team whose job is to close externally reported issues Aug 03 16:25:01 Leeds 'job qualifications: expert at whack-a-mole' Aug 03 16:25:14 Hahaha Aug 03 16:47:02 Hello, how can I make the option menu visible ? I am trying with a simple activity, but nothing appears on the top Aug 03 16:49:46 Here is all the code : https://codeshare.io/oPkou Aug 03 16:50:29 What SDK Tool do I installed to make available the 'com.google.android.gsf.login' library? Aug 03 16:51:00 mgk: What’s it doing now? Aug 03 16:51:32 s73v3r: its doing nothing xD Aug 03 16:51:44 s73v3r: just a screen with the background Aug 03 16:51:48 be more specific Aug 03 16:51:52 Espresso would be amazing if it ran consistently for me, it will randomly not run any tests and occasionally the intent capture will let intents slip through Aug 03 16:51:57 is there the 3 dots in the corner? Aug 03 16:52:01 nope Aug 03 16:52:07 thats what i want to see Aug 03 16:52:24 Well, that's not true. It never doesn't run any tests, it will ocassionally only run a single test from the same command I always use Aug 03 16:52:56 mgk: have you set breakpoints to ensure that onCreateOptionsMenu is being called? Aug 03 16:53:29 not called Aug 03 16:53:33 just tried Aug 03 16:54:00 what’s your theme? Aug 03 16:54:23 is it something with no title bar or no actionbar? Aug 03 16:54:30 android:Theme.Light Aug 03 16:55:19 are you using an actionbar or a toolbar? Aug 03 16:56:27 I wasnt using any of this until now Aug 03 16:56:47 that’s probably the issue. if you don’t have an actionbar or a toolbar, then there’s no place for the menu to appear Aug 03 16:57:34 ugh working by yourself can suck sometimes Aug 03 16:57:35 also, you should call super in onCreateOptionsMenu Aug 03 16:58:52 mgk: you’re probably gonna want to do something like this: https://developer.android.com/training/appbar/setting-up.html Aug 03 16:59:41 s73v3r: Yeah i was on the same page Aug 03 16:59:51 s73v3r: but it says : "In the app manifest, set the element to use one of appcompat's NoActionBar themes. Using one of these themes prevents the app from using the native ActionBar class to provide the app bar." Aug 03 16:59:57 yup Aug 03 17:00:08 because you don’t want the ActionBar, you want to use the compat Toolbar Aug 03 17:00:09 But how to use the native actionbar ? Aug 03 17:00:34 i mean why would I not use the native bar ? Aug 03 17:01:18 because you want consistent behavior Aug 03 17:01:36 and google is encouraging use of the Toolbar for a more material design Aug 03 17:02:14 okey, im gonna work on it Aug 03 17:02:20 s73v3r: thanks a lot :) Aug 03 17:06:03 is a service that is bound to a foreground service less likely to be terminated in the event of low memory? Aug 03 17:07:26 i'm trying to decide whether I should bind to a Bluetooth service, or just keep them separate and communicated with broadcast notifications Aug 03 17:07:35 comunicate* Aug 03 17:07:41 forget it. Aug 03 17:10:52 hithere Aug 03 17:11:29 is there a way to add shadow to a View like with android:elevation for API21 devices? but for lower API's? Aug 03 17:21:50 hi Aug 03 17:22:08 i add android:fillViewport to my ScrollView but the ScrollView is not getting all screen Aug 03 17:22:14 how i can adjust this? Aug 03 17:28:37 Morning all. I got a rather strange JNI bug I'd like some assistance with. Aug 03 17:30:45 feel free to just ask, instead of asking to ask Aug 03 17:34:48 Sure. I'm getting 'JNI DETECTED ERROR IN APPLICATION: jarray is an invalid global reference' from Check_JNI when calling 'GetIntArrayElements'. I'm passing in a local reference though. Aug 03 17:37:39 anybody ? Aug 03 17:38:29 The only thing google has for that error is my own stack overflow post for it. Aug 03 17:46:45 are you calling GetArrayLength before GetIntArrayElements? Aug 03 17:47:34 http://www.ict.nsc.ru/win/docs/java/tutorial/native1.1/implementing/array.html Aug 03 17:47:35 No Aug 03 17:48:56 'GetIntArrayElements' doesn't even return, so I'd have no chance to use the length in any way. Aug 03 18:05:26 if i make a mistake with this http://ideone.com/lMxPmS (such as the bitmap is null) it crashes. how do i handle that Aug 03 18:07:07 FM-Josh: https://www.ibm.com/developerworks/library/j-jni/#using there's section on local references that might help. Aug 03 18:11:20 BlackGold: Alas, nothing there is similar to what I'm trying to do. We're converting all JNI elements to native data types so very few local references would be made. It also doesn't explain the error I'm getting... Aug 03 18:20:29 style="@android:style/TextAppearance.Medium.Inverse" -does this explicitly rely on a definition of TextApperance.Medium.Inverse in the styles.xml file? Or is this a reference to something else? Aug 03 18:23:00 Ok, I just read that TextApperance.Medium.Inverse forces the text to be the opposite of the background, but the reality of my situation is that the text is showing dark grey over black, and it isn't readable, and light grey over white, which isn't readable... Aug 03 18:25:48 Are there any other Android development channels that anyone knows of that are pretty active? Aug 03 18:30:07 how do i get my activity context from a non-activity class..? Aug 03 18:30:24 you’re gonna have to pass it in Aug 03 18:30:29 ohk Aug 03 18:31:34 cos im using picasso. and with it there is a transform.. so ive got this class called CircleTransform.. but it seems if the image is null it crashes. so i wanted to check if its null and if it is just use a bitmap from resource. but that needs context Aug 03 18:33:26 pass the resource in when you create it Aug 03 18:33:32 hi, I'm trying to build an interface for a big struct with lots of floats and some other stuff. I tried databinding and ran into difficulties. Could anyone tell me, why this doesn't work? IfI replace the struct+property with a simple float, it works perfectly. http://paste.debian.net/786802/ Aug 03 18:34:06 (minimal example) Aug 03 18:39:28 s37v3r its a constructor class thoguh Aug 03 18:40:13 either way, you’re going to have to either pass the activity context to the class, or the resource itself Aug 03 18:42:02 ok cool, i tried http://ideone.com/AvYyUD seems to work ok Aug 03 18:42:50 parco, as i'm using that rx ble lib, i bind to the service and get an observable when needed, etc Aug 03 18:43:26 wait, s73v3r that doesnt work aha thought it did Aug 03 18:43:32 thornekey: is that a class you control, or a class from a library? Aug 03 18:44:28 also, I’m not 1000% sure, but it really does not seem like the place of the transform class to be checking if the image is null Aug 03 18:45:04 a class i control. somewhat. however, i use it in picasso which has a method .transform.. so i say .transform(new CircleTransform(context)) Aug 03 18:45:21 that should be fine Aug 03 18:45:46 hi, what is correct way to get current fragment inside view pager from activity? Aug 03 18:45:49 although, I’m fairly certain Picasso has a way to specify a default image, if the one you’re trying to load from web isn’t there Aug 03 18:46:08 xan_IT: ask the view pager adapter Aug 03 18:46:24 ((FragmentStatePagerAdapter) viewPager.getAdapter()).getItem(viewPager.getCurrentItem())) this after rotation return null Aug 03 18:46:44 s73v3r, yeah, i added .error, etc, however it crashes when i use a url that doesnt retrieve a image and try to make it a circle Aug 03 18:47:01 xan_IT: find out what part of that is null Aug 03 18:47:07 crashed from null pointer; 'attempt to read from field on null object reference Aug 03 18:47:46 so it seems that regardless, source wont ever be null if i parse a link in to picasso Aug 03 18:47:51 hmm Aug 03 18:47:59 maybe a try catch rather than if null? Aug 03 18:49:11 why doesn’t your current class work? Aug 03 18:49:54 null pointer Aug 03 18:51:02 from source (which would be the image it got from the url) Aug 03 18:51:02 so source is null? Aug 03 18:51:02 im guessing Aug 03 18:51:02 debug and make sure Aug 03 18:51:02 ok Aug 03 18:51:03 so is there no way to be certain that unbindService actually worked? Aug 03 18:51:03 well when i say if != null it still goes in there so no its not null Aug 03 18:51:03 since onServiceDisconnected() doesn't get called unless Service is killed Aug 03 18:51:43 s73v3r the problem is another. when rotate no call on getitem Aug 03 18:51:44 s73v3r seams use previous adapter Aug 03 18:51:44 xan_IT: if it’s rotation, you’re probably not restoring things properly Aug 03 18:51:51 i want to recreate all Aug 03 18:51:55 http://hastebin.com/fixowaribe.coffee s73v3r Aug 03 18:51:57 thornekey: what does your stack trace say? That should tell you what’s null Aug 03 18:52:04 just pasted it :) Aug 03 18:52:31 so at 37 we have, Bitmap bitmap = Bitmap.createBitmap(size, size, source.getConfig()); Aug 03 18:52:31 s73v3r http://pastebin.com/PpEK9xrW Aug 03 18:52:41 so it doesn’t seem as if your source is null Aug 03 18:53:18 xan_IT: and your problem is on rotation? Aug 03 18:53:54 s73v3r yes, getitem not called on rotation, i cant understand why Aug 03 18:54:09 it’s probably because you’re not restoring things properly Aug 03 18:54:52 i’m not seeing where you’re restoring the fragments Aug 03 18:54:54 s73v3r on rotation on create will called, also oncreateview of fragment Aug 03 18:55:05 i want to recreate fragment Aug 03 18:55:45 s73v3r i dont understand why getitem not called Aug 03 18:55:54 Huh.... If I run it on the simulator, I get "JNI DETECTED ERROR IN APPLICATION: use of deleted global reference" instead... Aug 03 18:56:02 s73v3r, if i add a try/catch to the class, and in the catch (nullpointer catch) i get http://hastebin.com/nibetazire.avrasm Aug 03 18:56:08 xan_IT: return portfolio.getPortfolioCertificate().size(); Aug 03 18:56:29 debug, and on rotation, check the value of that Aug 03 18:57:06 thornekey: did you return a bitmap? Aug 03 18:58:06 s73v3r correct value = 2 Aug 03 18:58:18 and what’s the value after rotation? Aug 03 18:58:25 I’m going to bet it’s 0 Aug 03 18:58:42 2 Aug 03 18:58:49 did you debug and check? Aug 03 18:58:53 yes Aug 03 18:59:11 i see correct fragment after rotation Aug 03 18:59:27 ok Aug 03 18:59:28 just i cant get fragment instance Aug 03 18:59:38 where are you trying to do that? Aug 03 19:00:04 in pastebin row 83 Aug 03 19:00:54 s73v3r, testing now. Aug 03 19:01:38 s73v3r when i call getitem with currentItem as position instead of return fragment instance already created, create a new instance. this because on rotation never call getitem. to fragments is empty Aug 03 19:01:40 ok no crash but weird transformation Aug 03 19:01:48 it looks like a slice of cake now Aug 03 19:01:57 from top down Aug 03 19:02:16 thornekey: That’s probably an issue with your transform code Aug 03 19:02:42 xan_IT: I have no idea what you just said Aug 03 19:03:09 s73v3r when i rotate getItem not will call Aug 03 19:03:13 ok? Aug 03 19:03:14 that’s fine Aug 03 19:03:25 getItem only gets called when one needs to be created Aug 03 19:03:42 so ArrayList fragments are empty Aug 03 19:04:07 s73v3r, http://ideone.com/hxbi71 Aug 03 19:04:08 s73v3r when i rotate all will recreate, no? Aug 03 19:04:12 no Aug 03 19:04:23 fragments don’t get recreated on rotate. they get saved and reused Aug 03 19:04:47 on rotate oncreateview will called Aug 03 19:04:47 thornekey: I’m not the one to ask about image transforms Aug 03 19:04:48 s73v3r, actually i just think its cropped up in the top of 0,0 of the image Aug 03 19:05:24 thats ok i think i know what to do. i think its actually the size of the image. Aug 03 19:05:28 xan_IT: you mean “on rotate, onCreateView WAS called" Aug 03 19:05:39 yes :D Aug 03 19:05:54 please take more time to type out your sentences. it is quite difficult to understand you Aug 03 19:06:03 sorry Aug 03 19:06:29 i think that my adapter is wrong Aug 03 19:06:36 Hey guys, is it possible to do a fresh build with android studio ? For some reason it randomly started giving me duplicate file errors (in META-INF etc) Aug 03 19:07:09 Diplomat delete all build folder Aug 03 19:07:10 xan_IT: I would check your portfolio thingy Aug 03 19:07:36 it seems that might not be handling rotation properly Aug 03 19:07:40 xan_IT: it's that C:\User\Name\Android Projects\Blabla ? Aug 03 19:08:00 Diplomat inside project folder Aug 03 19:09:04 Tried that, didn't work Aug 03 19:09:31 Diplomat you happen to be working from a Google Drive folder / shared? Aug 03 19:09:32 Maybe I should try deleting everything from app/build Aug 03 19:11:07 Nope, didnt work Aug 03 19:11:26 Error looks like this: http://i.imgur.com/urVb35L.png Aug 03 19:11:34 s73v3r any idea? Aug 03 19:13:33 When I do Make Project Aug 03 19:13:51 Then it works fine.. build completes successfully ,but then I try to run it in my phone.. it fails. I'll try emulator too now Aug 03 19:15:01 Yeah, fails with emulator too Aug 03 19:15:03 xan_IT http://stackoverflow.com/a/24662049/2642478 seams true Aug 03 19:15:12 s73v3r Aug 03 19:15:21 Diplomat: Try doing a command line build, it at least used to tell you how to fix it Aug 03 19:15:29 Otherwise the solution is easily googled Aug 03 19:15:38 s73v3r seams wrong to do a list of fragment Aug 03 19:15:56 If you mean this excluding thing.. then I don't think it's a good idea because it worked fine without it before Aug 03 19:16:27 Sure it's a good idea, annotations processors have no use at runtime Aug 03 19:16:57 I have to exclude the whole META-INF then because I already tried this method, it just found new files Aug 03 19:17:40 Then do that, not used at runtime Aug 03 19:22:25 I'll just exclude 'META-INF' ? Aug 03 19:23:57 how can i set a size of bitmap to 48dp programatically Aug 03 19:24:00 I think there's something else wrong.. It just can't fail like this without any logical reason Aug 03 19:27:00 @thornekey If you want to set a view size programmatically to a dp value you can do this: final float scale = getApplicationContext().getResources().getDisplayMetrics().density; Aug 03 19:27:00 final int pixels = (int) (48 * scale + .5f); Aug 03 19:27:23 that would give you pixels for 48dp Aug 03 19:27:47 then setWidth / Height on the view with the value of pixels Aug 03 19:29:03 hmm Aug 03 19:29:10 barodapride, it didnt work for me :( Aug 03 19:29:30 it works, I just did that yesterday Aug 03 19:29:41 no, that works, but in the bigger picture of things Aug 03 19:30:05 what do you mean? Aug 03 19:30:06 barodapride, http://ideone.com/cWbw1D check the catch Aug 03 19:30:47 i have to do it this way since i cant get the width/height from source Aug 03 19:30:55 yea, this excluding thing is not working for some reason or im doing something wrong Aug 03 19:31:27 so you're talking about setting the w/h of a Bitmap not a view Aug 03 19:31:35 yea Aug 03 19:31:42 to 48dp Aug 03 19:32:18 so what's not working exactly? Aug 03 19:32:41 well when it catches i want to just use a generic image Aug 03 19:32:47 hwever its way too big Aug 03 19:33:00 so it crops it from 0,0 and all u see is the corner Aug 03 19:33:05 so i want to scale it down to 48dp Aug 03 19:33:13 (the same size as the imageview itself) Aug 03 19:33:19 and then go from there Aug 03 19:33:30 bit choppy but i think itll work that way Aug 03 19:33:37 I am using GPGS for Save and I have managed to save but now when I save and then load the latest progress is not saved. WHen yo load do you need to call load and not just open on the snapshot? Aug 03 19:33:53 oh I don't know the Bitmap api but maybe there is a way to scale a bitmap? Aug 03 19:34:05 hmm Aug 03 19:34:18 this seems overly complicated Aug 03 19:34:46 if you just want a generic img to display that's easy Aug 03 19:34:50 i thought picasso would have a way to handle this (im calling this constructor transformation clas from picasso's .transform(new CircleTransform)) Aug 03 19:35:04 barodapride, yea i do, but at 48dp Aug 03 19:35:43 then you can just make an image view and set it to 48dp like above? Aug 03 19:35:56 and define the src to whatever img you want? Aug 03 19:36:26 I think you could just define it all in xml Aug 03 19:37:37 java.lang.IllegalArgumentException: parameter must be a descendant of this view Aug 03 19:37:37 E ( 4388) AndroidRuntime: at android.view.ViewGroup.offsetRectBetweenParentAndChild(ViewGroup.java:4948) Aug 03 19:37:45 tfw shit like that happens and it's not in your code Aug 03 19:38:56 I have a general question regarding images for the channel - I want to give users the ability to create profile images of many different people - should those images be saved in the app internal storage? I'm afraid it would take a lot of space? Aug 03 19:38:59 JNI is corrupting my int[]? How can that happen? Aug 03 19:39:07 FM-Josh, you're corrupting your int[] Aug 03 19:39:08 not jni Aug 03 19:39:20 barodapride, ill show you what i see.. my art skills arent that great though ;) Aug 03 19:39:49 When I break right before I enter the C function, I can see the int[] is fine. Inside the C function, it segfaults when I access it Aug 03 19:40:35 barodapride, http://picpaste.com/pics/test-9Lw9GwPi.1470253190.png Aug 03 19:40:53 now this works when the image is valid and passes the try catch test Aug 03 19:41:28 but yea, when it catches it only shows the top of his head Aug 03 19:41:35 like its going from 0,0 Aug 03 19:42:44 pfn, the C function contains just a single line right now. (*env)->GetArrayLength(env, intArray) which crashes with "use of deleted global reference". Aug 03 19:42:57 I'm not an expert here (just joined) but couldn't you just return null in the catch statement and in your calling code, check for null and set the src of the view to that image? Aug 03 19:46:09 uhhh Aug 03 19:46:12 let me try now Aug 03 19:47:20 nope Aug 03 19:47:38 the error is within the CircleTransform class itself Aug 03 19:47:47 not where im calling it Aug 03 19:48:37 by error you mean it's cutting off most of the image Aug 03 19:48:50 I am using GPGS for Save and I have managed to save but now when I save and then load the latest progress is not saved. WHen yo load do you need to call load and not just open on the snapshot? Aug 03 19:49:35 yes, if i dont use the original class i had; with my shonky hack it cuts it off, if i use the orig it crashses "null pointer" Aug 03 19:50:14 can be found here https://gist.github.com/julianshen/5829333 Aug 03 19:51:04 maybe I'm not understanding your use case here but I'm guessing you have an imageview to display the bitmap? Aug 03 19:51:15 yes Aug 03 19:51:28 so if something goes wrong you want it to display a generic image? Aug 03 19:51:29 then to set that image i use picasso Aug 03 19:51:54 picasso has methods such as .transform(new CircleTransform) Aug 03 19:52:00 so this will crop the image to a circle Aug 03 19:52:33 but if picasso cant get the image whn it does the .transform its null Aug 03 19:53:44 hi what is correct way to get view pager current fragment page? Aug 03 19:54:06 so you're trying to modify the picasso library CircleTransoform class? Aug 03 19:54:13 no Aug 03 19:54:29 the CircleTransform class im using is not in the library Aug 03 19:54:45 its just the same Aug 03 19:54:51 You want a fallback image? Aug 03 19:54:56 yep :) Aug 03 19:55:07 tried .error and .placeholder Aug 03 19:55:09 for picasso Aug 03 19:55:47 That should be doing it. Maybe the CircleTransform is returning null instead of throwing an error so the fallback never gets called Aug 03 19:56:09 explodes, yes, it sometimes returns a null Aug 03 19:56:19 so i want to handle that within CircleTransform Aug 03 19:56:32 but when i do Aug 03 19:56:45 the image is huge and cropped /circled up to the top left corner of the orig image Aug 03 19:56:54 so i only see a curve of his head Aug 03 19:59:16 Maybe write a wrapper for your CircleTransform to throw an exception if the real circle xform returns null Aug 03 20:00:16 jeez hmm Aug 03 20:00:43 never used picasso but it looks like there is this .fit() method that should make the img fit the view? Aug 03 20:02:23 will try Aug 03 20:07:21 im wondering if theres a standard on what should we use between notifyDataSetChanged and NotifyDataItemChanged/NotifyItemChanged. I know notifyDataSetChanged is a little heavy since it redraws everything but im wondering if thats a problem now a days? Because i used notifyDataItemChanged and then later i had problems when deleting items from recycler views and had to change to notifyDataSetChanged so i Aug 03 20:07:23 dont get the out of bounds exception. Or there is no better or standard way and it all depens on the situation? Aug 03 20:07:55 item changed is when a single item changes Aug 03 20:08:03 it is several orders of magnitude faster Aug 03 20:08:13 notifyItemRemoved when you delete Aug 03 20:09:24 explodes: didn't know notifyItemRemoved even existed. Ill have to check it out now to see how it should be used. Aug 03 20:12:17 when an item is removed from the underlying data, you send the notify Aug 03 20:12:18 there is also a notifyItemAdded, or is it notifyItemInserted? Aug 03 20:12:18 You shouldn't use notifyDataSetChanged. Just item inserted, changed and removed. Aug 03 20:12:18 I see. So "use notifyDataSetChanged only as a last resort" still goes. Thanks for the answers Aug 03 20:12:18 Next support library version should bring a utility class that makes it easier to diff two lists and notify, but until then you're on your own Aug 03 20:16:14 notifyItemRemoved works great. Thanks again Aug 03 20:20:55 Hello all. I'm a newish developer and as my app gets more complex my codebase is quickly spiraling out of control. I would like to refactor my code and properly structure everything but I really have no idea how. I've heard of things as such as MVC, MVVM, MVP, etc etc but I really don't know what direction I should go. Aug 03 20:21:15 barodapride, finally got it Aug 03 20:21:20 Anyone have any helpful tips or ideas? Or any good resources that can get me back on track? Aug 03 20:21:35 i guess it had to be 64dp not 48dp beecause the image was a power^2 one Aug 03 20:23:11 hmm, not sure why that would be Aug 03 20:23:22 seems to work though.. Aug 03 20:24:12 so the fit() was the key? Aug 03 20:24:17 HaSH_: It kind of depends on what you're trying to accomplish with your refactor Aug 03 20:24:26 not entirely, fit() distorted images Aug 03 20:24:30 HaSH_: MVVM and MVP can actually increase complexity Aug 03 20:24:41 that werent square Aug 03 20:25:52 explodes: Well right now my code is a mess. It's all over the place. I'm looking for a good standardized way to organize my code. If doing this adds complexity, but is worth it in the long run and I can learn something useful I"m all for it Aug 03 20:26:33 @Hash_ I would just read up on design patterns. There is no silver bullet though Aug 03 20:29:52 barodapride: I've been doing some research into design patterns the last day or two and there is such a vast spread of opinions and pros/cons Aug 03 20:29:52 Sometimes extensive design pattern usage is better suited for large enterprise teams Aug 03 20:29:52 HaSH_: personally i think you should worry about your app functionality first as a new developer rather than a readable code. I know its good to have a tidy code and you should start early for that to get the habbit but i don't think you should worry about it in the begining. Just my two cents tough Aug 03 20:29:52 lignux: I hear ya. I've most of my code written, except for UI stuff which I suck at. So I kinda wanted to refactor to give my brain a rest from doing UI stuff. Aug 03 20:31:39 thornekey: use fit with centerCrop or centerInside Aug 03 20:32:07 JakeWharton, centercrop on the imageview component itself? Aug 03 20:32:13 No Aug 03 20:32:23 as a param? Aug 03 20:32:47 A parameter to what? Aug 03 20:32:54 to fit() Aug 03 20:33:12 It doesn't accept parameters Aug 03 20:33:15 ohk Aug 03 20:33:22 is it possible to synthesize microphone input? i want to transmit an audio clip in a phone call Aug 03 20:33:23 where then? :) Aug 03 20:33:44 .fit().centerCrop() I'm guessing Aug 03 20:41:50 thanks guys; the whole thing is messy but works :) Aug 03 20:41:54 cheers for ur help Aug 03 20:51:15 hey guys Aug 03 20:51:27 anyone looked at their user acquisition lately? Aug 03 20:51:38 im trying to figure out what the usual bounce rate is Aug 03 20:51:48 eg how many store listing visits vs downloads Aug 03 20:52:01 anyone know? Aug 03 20:53:13 Instant Run is brutal Aug 03 20:53:32 It works 10% of the time, every time Aug 03 20:54:16 hah i disabled instant run when i was last using AS Aug 03 20:54:29 was buggy as hell Aug 03 20:54:47 Don't think anyone's really using instant run, might just want to disable it parco Aug 03 20:54:59 alrighty then, haha Aug 03 20:57:27 Does RadioGroup only allows one radio button to be selected at a time? Aug 03 20:57:46 Dumb question .. how do I send JSON data as a POST when opening up a new browser window from the app? I can't use webView. Aug 03 20:57:46 orbyt_ they've had a while to fix it now, but keep applying patches to 2.2 preview Aug 03 20:57:48 yes. that’s the idea Aug 03 20:57:59 sudhirkhanger: ^ Aug 03 20:58:22 s73v3r: just making sure. thanks. Aug 03 20:58:42 g00s: havent even opened AS in a month so ¯\_(ツ)_/¯ Aug 03 20:59:11 orbyt_ lol you back to eclipse :D Aug 03 20:59:27 g00s: haha no just been doing some web dev, meteor.js <3 Aug 03 20:59:38 Why would anyone use eclipse over AS Aug 03 20:59:55 these days , few do ... Aug 03 21:00:02 NDK stuff, mostyly Aug 03 21:00:17 Yea AS seems far superior for everything in android that I've done... Aug 03 21:00:23 JetBrains are just too good at making IDEs Aug 03 21:00:52 imagine if google had to make something from scratch like xcode or visual studio ... Aug 03 21:01:03 good thing they can get somebody else to make a working ide ;) Aug 03 21:01:14 Hehe I'm glad they did Aug 03 21:01:20 because the rest of their shit barely works ;) Aug 03 21:01:34 TODO: is by far the most useful comment tag Aug 03 21:01:44 parco also FIXME! Aug 03 21:01:52 only use WTF Aug 03 21:01:54 ooo i didn't know that one, any more? Aug 03 21:02:23 parco: im sure theres a way to make custom ones as well, just fyi Aug 03 21:03:47 So my situation is I have to have my app launch a browser window to an external site/API where the user allows access to the app, and then listen for the response token.. I have to send additional headers and json POST data when making this request, so I can't use webview.posturl because I need to add the extra headers, and I can't use webview.loadurl since I have to post data .. so I'm opening up a new browser window, I hav Aug 03 21:03:47 the extra headers sent with Bundle and passing them in via .putExtra .. I'm just not sure how to get the json data in there as POST data. Been frustrating to search since 90% of the answers are "use webview" :( Aug 03 21:03:50 Is there some functionality to comment tags like that other than just CTRL + Fing for them? Aug 03 21:04:20 BasedGob: theres a tab to view them... Aug 03 21:04:31 i think.. Aug 03 21:05:00 Oh yea I see that LOL Aug 03 21:05:03 surprised I've never used that... Aug 03 21:20:04 I'm seeing some responses via searching SO saying it's not possible.. there has to be a way to send post data AND additional headers, and not do it as a background request because I need the user to login and authorize access to the api and listen for the token .. Aug 03 21:23:48 Anyone know how to enable tls1.2 using okhttp3? Aug 03 21:24:35 Not sure about using the X509TrustManager in OkHttpClient.Builder.sslSocketFactory Aug 03 21:29:42 Seems like passing a blank implementation of X509TrustManager makes it work, anyone familiar with this interface Aug 03 21:30:39 ugh Aug 03 21:30:54 my experiences with that whole aspect were pretty poor Aug 03 21:30:58 i got a pinned cert working but it was ugly Aug 03 21:31:22 You familiar with x509TrustManager interface? Aug 03 21:31:56 been a while let me look at my code Aug 03 21:32:01 is that what you are trying to do, pin a cert? Aug 03 21:32:38 Nah, had to enable tls 1.2 for android kitkat Aug 03 21:32:42 Its not enabled by default Aug 03 21:32:47 So I had to set a custom SSLSocketFactory Aug 03 21:33:37 Its working, just not sure about why I need X509TrustManager Aug 03 21:33:38 http://pastebin.com/kJZLYR5c why toobar not scrol when i scrol? Aug 03 21:33:42 scool Aug 03 21:34:00 scroll Aug 03 21:34:03 :D Aug 03 21:34:23 inside viewpager i have a scrollview Aug 03 21:35:50 is your toolbar on top of your viewpager? Aug 03 21:38:06 Can anyone help? Is what I'm trying to do simply impossible and I need to find another way? Aug 03 21:40:29 that’s what it seems like. sorry Aug 03 21:41:27 ugh. didn't expect this part to be so hard, figuring sending headers and POST data would be a fairly common thing. Aug 03 21:49:57 Is there any way to provide `buildConfigField()` directives in a separate gradle file and import it into the main build.gradle? Aug 03 21:50:09 We have several different build variants and want to be able to define their properties in their own files Aug 03 21:50:16 I'm not really sure how to use apply in this case Aug 03 21:51:56 BilldaCat: One (pretty elaborate) thing you can always do is use the WebViewClient#shouldInterceptResource stuff to do the page loading yourself (e.g. with regular HttpURLConnection, or OkHttp if that's warranted) and just feed the results into the WebView for the user to see. Aug 03 21:52:09 Er, shouldIntercept*Request*. Aug 03 21:52:17 Caused by: rx.exceptions.MissingBackpressureException Aug 03 21:52:23 I wish it could tell me which observable generated it... Aug 03 21:56:33 I'll take a look.. what I'm also considering is having the app send the request with the headers to a server I control, I reformat the request into headers/POST data with php/curl, and send that off Aug 03 22:02:20 BilldaCat: Since HttpURLConnection gives you the response body as an InputStream, and an InputStream is also what you provide to a custom WebResourceResponse for WebView, maybe wiring those two things together wouldn't take *that* much code after all. Aug 03 22:04:26 give it a shot. sounds like the best way for you to go Aug 03 22:04:54 (Extra disclaimer: I think I've heard it said that intercepted requests have some rough edges on pre-L WebViews.) Aug 03 22:10:17 gotta love rxjava stacktraces Aug 03 22:15:29 explodes, are they crazy confusing? Aug 03 22:16:52 as hell Aug 03 22:17:57 im trying to get the android transfer agent running with the new r1 hd blu phone from amazon does anyone know if it has to be rooted or whatever for the file transfer program to work it works fine out the box with my lg g5 phone? Aug 03 22:18:07 Can i create my own Fragment base class? Basically i can try extending the Fragment class? Aug 03 22:18:17 I have a lot of code that repeats. What a mess Aug 03 22:19:21 of course. why wouldn’t you? Aug 03 22:19:21 Guys I have a launch screen in my app and onCreate of the home activity I set the theme back to normal, but for some reason the windowBackground is not changing on kitkat Aug 03 22:19:23 And idea why? Aug 03 22:20:27 s73v3r: not sure if it will have any impact with onCreateView() element or even conflicts. Aug 03 22:20:51 you can extend Activity. No reason why you wouldn’t be able to extend Fragment Aug 03 22:21:09 the only thing is you want to make sure to extend the right Fragment class, preferably the compat library one Aug 03 22:22:13 Good. So in the base class i don't need to inflate any layout elements, how can i implement onCreteView in this case? Aug 03 22:22:49 if you don’t want to do anything yourself, just don’t implement it, and it’ll go to the default implementation Aug 03 22:23:19 Anyone have any idea why setTheme wouldnt work in andorid 4.4 kitkat Aug 03 22:24:13 ^ nvm Aug 03 22:41:03 vol4ko, basically what i always do is create an abstract class for a singlefragmentactivity and i extend that in my activities Aug 03 23:08:43 I am experiencing a weird problem Aug 03 23:09:50 noted Aug 03 23:09:51 My app is portrait only. It doesn't allow rotation which is fine. But on tablets if the user locks the screen and then rotates the tablet to landscape the main activity acts as if its rotating and it re instantiates it self and stops my code from running.. Aug 03 23:09:56 ANY way to prevent this? Aug 03 23:10:20 not really Aug 03 23:10:21 only happens if they are rotating on the lock screen Aug 03 23:10:36 here’s a tip, though: It’s not just rotation that causes your activity to be recreated Aug 03 23:10:55 so locking to an orientation doesn’t stop you from having to handle that Aug 03 23:11:31 but if the user locks the screen and then unlocks the screen there are no issues. Its only when they are showing the lock screen and they rotate it. Then the problem occurs. Aug 03 23:11:45 or if they change language Aug 03 23:12:14 I never even thought of that part, but i dont have any local support. VERY few words. Aug 03 23:12:30 or if they change text size Aug 03 23:13:09 what causes the lockscreen rotation issue? Aug 03 23:13:20 not handling recreation properly Aug 03 23:14:12 so there is no way to prevent re-creation? Aug 03 23:15:25 what are the benefits of rroting and or bootloader ing my phone? Aug 03 23:15:35 there are none Aug 03 23:15:35 rooting Aug 03 23:17:18 i'd like to record all date and times in the same locale, should i use GMT? Aug 03 23:17:56 i'll convert them to appropriate timezones on user end Aug 03 23:19:44 oh geez, UTC == GMT :P Aug 03 23:20:36 microhaxo: nope. It’s one of the basics of android Aug 03 23:20:41 nope, utc is not a timezone Aug 03 23:21:04 is it millis since that data in 1970, but the date is GMT locale? Aug 03 23:32:06 http://stackoverflow.com/questions/17945130/prevent-activity-restarting-when-orientation-changes Aug 03 23:32:53 This prevents my activity from re instantiating for normal rotation etc, but the lock screen issue still happens. Aug 03 23:33:19 yeah. because it’s only preventing orientation changes Aug 03 23:33:33 there are a lot of other things that cause an activity to be destroyed and recreated Aug 03 23:34:01 oohh.. equals code generator were using 'that' for the casted reference. now it's using the class name (lower/camelCase) Aug 03 23:34:26 I want to know specifically what it is that causes the activity to be destroyed ONLY when the lock screen is shown AND rotated. Aug 03 23:34:56 i can’t tell you that. but I can tell you that it’s a lot easier to simply handle recreation than it is to dig down and find out what Aug 03 23:36:02 it would be quite hard for me to handle the recreation. My app plays LOTS of sounds continuously at various settings. To re- set that up would take lots of data saving and for sure cause a break in the play of sound. Aug 03 23:36:20 the activity shouldn’t be playing sound Aug 03 23:36:51 that should be handed off to something else Aug 03 23:38:48 sound is played in a separate class using audiotrack, but when my activity is re-created, it stops the sound.. Aug 03 23:40:35 Yea, this makes no sense Aug 03 23:40:57 the activity does NOT need to be destroyed when the user is at the lockscreen.. There is no reason. Aug 03 23:41:27 your activity can be killed for any reason, at any time that it’s not at the foreground Aug 03 23:41:46 then kill the app, dont leave it open.. Aug 03 23:42:00 why would it kill it and then re instantiate it Aug 03 23:42:01 life gets a lot easier when you stop fighting the framework Aug 03 23:42:08 because that’s what it does Aug 03 23:42:11 the framework is obviously FLAWED Aug 03 23:42:18 too bad Aug 03 23:42:25 you’re not going to change the framework Aug 03 23:42:32 If ondestroy is called, i clean up my work. Im not going to clean up and re-create everything for no reason. Aug 03 23:42:48 you have a reason: the system killed the activity Aug 03 23:54:07 hi Aug 03 23:54:42 What's best-practise for abstracting HTTP client-libraries? - http://stackoverflow.com/questions/38755372/abstracting-http-client-succinctly-in-android Aug 03 23:55:51 whats the most up to date way to display a Map? Aug 03 23:56:07 a lot's changed in a few years :/ Aug 03 23:58:50 AlecTaylor: You can read something like this: https://www.reddit.com/r/iOSProgramming/comments/4161ya/strategies_for_lessening_dependencies_on/ Aug 03 23:59:06 it’s about swift and backends, but the ideas are similar Aug 03 23:59:28 s73v3r: Oh, with my Python code and Node.JS code I haven't run into any trouble Aug 03 23:59:41 Just in Java it's so ridiculously verbose Aug 03 23:59:53 it’s the same idea, then Aug 04 00:00:50 Yaaa, but what about Android specifics? - I'm thinking Volley Aug 04 00:01:11 Looks like it provides some nice shortcuts, but at the end of the day messes with the UX directly (or the tutorials wants you to) Aug 04 00:01:29 So is that a good enough excuse to chuck in a retrolambda dependency so I can abstract these points? Aug 04 00:01:37 i’d have to suggest against volley Aug 04 00:01:41 PS: I've been having trouble getting retrolambda to work Aug 04 00:02:01 and there isn’t anything Android specific for this. just plain ol java Aug 04 00:02:03 s73v3r: So what should I use to get caching, multiple concurrent requests &etc Aug 04 00:02:15 So I should implement that all myself, manually? Aug 04 00:02:19 retrofit? Aug 04 00:05:01 I'm no expert but I would recommend retrofit for sure Aug 04 00:07:10 * AlecTaylor is reading their docs still Aug 04 00:21:08 does anyone have a good reference example for this? i have a screen that has 3 views followed by a recyclerview. i want the three views to scroll up as if they're part of the recyclerview. i'm told maybe a coordinatorlayout is what i want but i've not used those before Aug 04 00:23:13 do the three views have any other behavior aside from acting like they’re in the recyclerview? Aug 04 00:23:24 as in, does their size change as they scroll or something like that? Aug 04 00:24:29 nope. this is a settings view, these three are, like, device operations and then the recyclerview contains some key/value pairs Aug 04 00:24:50 a quick and dirty way to do it would be to add them to the recyclerview Aug 04 00:25:18 i guess i could make it a recyclerview around view instead of haha Aug 04 00:25:44 i thought about that, but it might not pass code review and i only have one more day at this company haha Aug 04 00:26:11 it should Aug 04 00:26:21 it’s a common way to do things like that Aug 04 00:26:43 i'll have to downcast and do some gross stuff tho Aug 04 00:26:50 not really Aug 04 00:26:59 okay lol i'll give that a shot Aug 04 00:27:58 you will have to implement getItemViewType, where you can just say if(position == 0) return SETTING_1; Aug 04 00:27:59 etc Aug 04 00:28:42 okay, ty! Aug 04 00:28:44 and then in onCreateViewHolder, you can check the view type, and instantiate the right cell Aug 04 00:43:23 in Realm, in an onChange(), is it possible to handle only new objects that were added? Aug 04 01:27:17 Hi guys. I have a problem sending POST request with multipart form using Retrofit. It seems that one of my fileds(parts) is missing for some reason. Here's a declaration of my request http://pastebin.com/yVxErUpr Aug 04 01:27:41 In the end, on the server, all parts are available except "recipient_ids" Aug 04 01:29:09 I test it with curl and Postman plugin for Chrome browser and API endpoint works well, so it's certainly not an API problem Aug 04 01:30:10 I tried to log multipart content I'm sending with HttpLoggingInterceptor but it seem to be unable to log multipart contents Aug 04 01:30:57 What's really weird, is that all other parts, such as "subject" and "body" (which is a file) deliver just great Aug 04 01:32:31 Can I somehow log Multipart content Retrofit generates in the end with something other but HttpLoggingInterceptor? Aug 04 01:33:57 Or maybe someone has custom HttpLoggingInterceptor implementation with overrided methods that can parse Multipart? Aug 04 02:30:54 hmm Aug 04 02:31:01 ah Aug 04 02:35:26 I have my SD card installed as a directory instead of a drive. Will I be able to run the ndk from it? Aug 04 02:37:47 that question makes no sense Aug 04 02:38:10 It doesn't? Aug 04 02:38:21 it doesn't. Aug 04 02:38:37 I want to save thendk tomy sd carddirectory Aug 04 02:38:53 will it be recognized? Aug 04 02:39:34 why on earth would the ndk care how you've mounted your SD card? Aug 04 02:41:04 I have had some programs not work Aug 04 02:41:53 It made a few wok that didn't when it was its own drive, but some still don't. Aug 04 02:43:43 meh, windows Aug 04 02:44:04 work not wok Aug 04 02:45:00 True but I use dev software that only runs on Windodos. So... Aug 04 02:53:03 do you guys know if the appbar tut (https://developer.android.com/training/appbar/index.html) mentions anything about a drawer. or how to set on up? Aug 04 02:54:28 found it! But it seems to require "Note that the AppCompat library has an implicit dependency on the support-v4 library. The support-v4 declaration however does not necessarily need to be declared." **** ENDING LOGGING AT Thu Aug 04 02:59:58 2016