**** BEGIN LOGGING AT Wed Feb 01 03:00:02 2017 Feb 01 03:01:32 sip is already available as an api on android Feb 01 03:01:37 included in like 2.2 Feb 01 03:03:06 <_genuser_> pfn: sip was for example to indicate what kind of realtime I meant. Feb 01 03:03:55 Afzal what did you pick :) Feb 01 03:04:02 <_genuser_> I'm looking to send messages from server to client X and the latency should be less than 250ms. maybe 500ms might be acceptable. but if it drag more, will be unacceptable. Feb 01 03:04:05 g00s 23 :D Feb 01 03:04:13 Android wear 2.0 app Feb 01 03:04:14 Good luck with that one Feb 01 03:04:25 <_genuser_> I see cloud pub-sub is there. but I hate the hosted model where you have to subscribe. Feb 01 03:04:40 everything requires subscription Feb 01 03:04:55 You could get that with peer-to-peer connections over wifi, but across the internet things can get a bit dodgy sometimes Feb 01 03:05:07 depends on distance Feb 01 03:05:24 Internet latency is under 300ms cross continent, typically Feb 01 03:05:40 ...unless someone's using something like HughesNet or Dish... Feb 01 03:05:52 Boom >1000ms latency Feb 01 03:05:54 satellite Internet doesn't count Feb 01 03:06:00 that's not cross continent Feb 01 03:06:07 that's to outer space and back Feb 01 03:08:09 <_genuser_> mmm outer space signal..... Feb 01 03:08:37 <_genuser_> so I'm looking to do this over the internet. Feb 01 03:08:42 <_genuser_> but I wonder if wifi will work. Feb 01 03:09:11 <_genuser_> what if the server is on corporate network, user connects from home over VPN, then their android device is wifi enabled. Feb 01 03:09:47 Well, to low earth orbit and back Feb 01 03:09:55 <_genuser_> that would be a wifi connection, but the server is still remote sending notifications over VPN (which are throttled heavily at corporate sites) Feb 01 03:10:11 I used to raid in a guild that had a tank/healer pair using HughesNet. They had to be practically psychic Feb 01 03:12:33 <_genuser_> lol, all my online gaming was limited to playing trivia with mIRC bots while dcc downloading episodes.... Feb 01 03:13:04 <_genuser_> (which i haven't implied or explicitly stated to have been copyrighted) Feb 01 03:32:16 anyone guess what the most popular continuous deployment setup is for android ? Feb 01 03:33:38 there should be some stats for this somewhere ... Feb 01 03:40:35 Im a fan of gitlab CI Feb 01 03:40:52 The CI is a misnomer, it handles whatever pipelines you throw at it Feb 01 03:42:48 ResidentBiscuit what if the repository is on github ? (i'm totally clueless) Feb 01 03:43:39 says its integrated with gitlab Feb 01 03:43:44 lol of course :D Feb 01 03:46:30 Oh yeah, it's part of gitlab Feb 01 03:46:56 I host most of my stuff on gitlab anymore Feb 01 03:55:16 hi guys Feb 01 03:55:55 Gitlab is great Feb 01 03:56:03 I kinda wish we used it instead of Bitbucket for work Feb 01 03:56:07 i have an app which that feeds on PHP backend JSON strings my issue sometimes its doesnt parse and crashes Feb 01 03:56:35 Are you using GSON to parse or something else? also post code @mx8manger Feb 01 03:56:39 throwing exceptions like missing JSON data while its not missing and keeping in mind db vals not changed Feb 01 04:04:11 guys here is my code http://pastebin.com/QSTYvaq5 Feb 01 04:05:20 mx8manger: I see a disturbing lack of try/catch around the HttpURLConnection Feb 01 04:05:39 i exec it inside try catch Feb 01 04:06:48 Ah.. in that case... if you broke this down into functions, it _might_ even become readable Feb 01 04:07:02 http://pastebin.com/MrwHStDi Feb 01 04:08:17 i test on 2 devices real ones i mean they gave same error msg Feb 01 04:08:28 then minutes later they suddenly worked Feb 01 04:08:40 You're sure hte data you're feeding it isn't actually _missing_ the LOCLONG bit? Feb 01 04:08:41 now emulator is doing the error ! Feb 01 04:09:25 Remember... GIGO. Feb 01 04:09:30 Check your input data carefully Feb 01 04:09:52 wait i login into PMA and see Feb 01 04:11:08 g00s it's probably circle ci now, used to see travis a lot a couple years back Feb 01 04:11:13 but I'm a fan of gitlab ci too Feb 01 04:11:29 Afzal cool thanks Feb 01 04:13:59 at some point i thought maybe i should compress inside a tar and use apache common to decompress then parse it i though maybe packet are damaged all the way from server to client or some rote have Q.O.S bottleneck lol Feb 01 04:14:07 should i or that not wise ? Feb 01 04:18:08 Dagmar: its has this val -1000.0000000000000 and its my input is invalid for JSON string or wut? Feb 01 08:06:30 * thepoosh pats raoul11 Feb 01 08:13:12 thepoosh sorry if i asked this already, what CI / CD system do you guys use ? Feb 01 08:18:01 you haven't Feb 01 08:18:10 we us Jenkins with Kubenetis Feb 01 08:20:26 thepoosh did you set it up? how hard was it? Feb 01 08:21:30 I didn't set it up Feb 01 08:25:14 but I hear kubernetis is hard Feb 01 08:25:20 try using travis Feb 01 08:25:40 Hi all, does somebody know a documentation reference about creating an Android Launcher? where isn't needed for etc. Feb 01 08:25:54 android launcher? Feb 01 08:25:57 launcher app? Feb 01 08:27:07 launcher activity? Feb 01 08:35:54 Hello everyone :) Feb 01 08:36:32 I'm working on my 1st app in android - I just want to plot my location on google maps Feb 01 08:37:14 I'm running into some problems and was wondering if anyone could help Feb 01 08:38:59 I'm on a windows machine & I've installed genymotion from their website Feb 01 08:39:26 When I try to add it to android studio, it says "need to specify the path for genymotion" Feb 01 08:39:31 thepoosh: http://www.androidcentral.com/android-z-what-launcher Feb 01 08:39:33 something like this Feb 01 08:40:36 Which path should I give? Feb 01 08:43:18 * raoul11 thepooshes thepoosh Feb 01 08:43:23 showing up l8, as usual. Feb 01 08:45:57 Guntor: for starters, launch genymotion emulator then run the project Feb 01 08:49:48 Ashiren, thanks for your help. I had installed virtual box a long time ago & installed genymotion just now. I put them both in the same folder and I gave the folder where genymotion is installed as the path without genymotion.exe and it worked! Feb 01 09:09:37 Hi Feb 01 09:09:49 I just added this line to my gradle.properties Feb 01 09:09:50 org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 Feb 01 09:10:09 what for Feb 01 09:10:24 I read that it increases the memory allocated for gradle Feb 01 09:10:31 I did it so the build will become faster Feb 01 09:10:46 Increases the available memory for android studio to 2Gb Feb 01 09:10:53 throw away android studio, install XCode and don't bother Feb 01 09:11:02 Now I get an out of memory exception error Feb 01 09:12:14 I'll look into xcode, but I've invested a lot of time in setting up android studio & I need to get this app running by today Feb 01 09:12:32 Any suggestions on removing this error? Feb 01 09:30:42 invested a lot of time in setting up android studio Feb 01 09:30:48 :) Feb 01 09:34:19 squ, don't troll beginners Feb 01 09:34:24 It's a shitty thing to do. Feb 01 09:34:47 Mavrik: don't give advices Feb 01 09:35:06 *advice Feb 01 09:35:46 It's an uncountable noun. ;) Feb 01 09:35:51 added to ignore list Feb 01 09:35:59 hahaha Feb 01 09:36:02 squ, you suck Feb 01 09:36:10 Zharf: you too :) Feb 01 09:36:23 grow up Feb 01 09:39:41 i suck at making drawable shape in xml Feb 01 09:39:57 any good tutorial on how to create complex shapes? Feb 01 09:40:53 raoul11: I did write svg in text editor Feb 01 09:40:57 :) Feb 01 09:41:58 not svg squ Feb 01 09:42:05 just trying to make a bubble shape Feb 01 09:42:40 aren't bubbles just circles? :) Feb 01 09:42:51 more like sphere Feb 01 09:43:05 ... projected on a 2d plane, a sphere is a circle Feb 01 09:43:10 :) Feb 01 09:43:16 ohuguise /: Feb 01 09:43:28 well depends on the projection and angle I guess Feb 01 09:44:13 and in 1d is just a point, easy Feb 01 09:50:20 hi all Feb 01 09:50:43 what is the best real-time gps app for android? where I also can see the world map Feb 01 09:51:00 Google Maps seems to be slow in positioning Feb 01 09:51:34 I think it uses algorithms to place your position on the map more precisely, but this slows down the process Feb 01 09:53:36 not that many map applications out there that don't use google maps, I think... but you should probably try #android instead, might find better luck there Feb 01 09:53:55 Zharf: okay, thx Feb 01 09:54:36 hey, I'm writing an application which translates text into morse code, everything else is going just as planned, but I can't figure out a good way to generate the audio. I've had the idea of making 2 audio files, long and short and using MediaPlayer to play them as required Feb 01 09:55:06 R-Z, urf, no... just generate it on the fly into audiotrack? Feb 01 09:55:06 but that sounds a bit of a messy way to approach things Feb 01 09:57:16 R-Z, or you can read the audio into buffers and write it into audiotrack in teh right order as well if you don't want to generate the audio in code Feb 01 09:57:31 but mediaplayer seems like a super big overkill Feb 01 09:57:56 MediaPlayer will be painful for this use-case. Feb 01 09:57:59 Use AudioTrack yeah. Feb 01 09:58:23 That's because MediaPlayer has a startup buffering and setup time which doesn't really react well for such "play effects in quick succession" use-cases. Feb 01 09:58:48 Maybe store "short" and "long" wav sounds into assets, load them into memory and then feed them into AudioTrack as required. Feb 01 09:58:48 yeah that's what I kinda figured, I've been trying to find examples of audio generating code or good sources on how to generate tones, just didn't manage to find anything. I'll check out if audiotrack gives me some good examples Feb 01 09:59:02 Look for gaming tutorials. Feb 01 09:59:15 Games usually use AudioTrack because they require low-latency playback of effects. Feb 01 10:00:27 generating more than simple sine waves can get a little bit complex Feb 01 10:00:37 but generating specific tones for sine waves is easy Feb 01 10:00:53 Yeah, hence why create an effect in Audacity or something and then store the raw wav you can just throw at audiotrack Feb 01 10:01:13 yep Feb 01 12:08:21 I have a recycler view with a style (including textColor), that style is also applied to a textView, in a spinner, in a containerView within that recylcer view. Feb 01 12:09:12 now I want to define the popupBackground of that spinner in this style as well, but just adding @android:color/darker_gray to the style does not seem to work. Feb 01 12:09:25 How could I pass on the style of the parent to the children? Feb 01 12:14:54 note that the style is applied as a theme. Feb 01 12:20:56 g00s_, https://www.theregister.co.uk/2017/02/01/gitlab_data_loss/ Feb 01 12:42:22 * raoul11 thepooshes thepoosh Feb 01 12:49:45 what is gitlab? Feb 01 12:50:05 lol? Feb 01 12:50:38 Some people who are now learning the hard way about snapshots Feb 01 12:50:40 > GitLab, founded in 2014, scored US$20m of venture funding. Feb 01 12:50:53 just random folks Feb 01 12:51:00 not worth mentioning :) Feb 01 12:52:38 > out of 5 backup/replication techniques deployed none are working reliably Feb 01 12:52:56 had washing investors money for 2 years :) Feb 01 12:53:10 ...and no one very experienced Feb 01 12:53:35 why, maybe it was their goal to wash money Feb 01 12:54:06 raoul11: HAI Feb 01 12:54:14 hi Feb 01 12:54:17 thepoosh: how is the science stuff Feb 01 12:54:34 squ: science stuff? Feb 01 12:54:37 whatcha up2 today thepoosh Feb 01 12:54:50 finishing up the redesign feature Feb 01 12:54:56 going over pull requests Feb 01 12:54:59 and stuff Feb 01 12:55:11 not burning tyres in amona? Feb 01 12:55:27 nope, I respect the supreme court's decisions Feb 01 12:55:41 resistance is futile Feb 01 12:55:49 yep Feb 01 12:55:52 what happens in amona? Feb 01 12:55:53 :) Feb 01 12:55:59 don't want to hear any vogon songs Feb 01 12:56:06 *poetry Feb 01 12:56:12 people gets evicted from their homes Feb 01 12:57:40 sux for them honestly Feb 01 12:57:48 but this is for #israel Feb 01 13:00:14 squ: I managed to change some stuff in the design to make it more compliant in the end Feb 01 13:00:21 so i got that going for me which is nice Feb 01 13:00:36 cool Feb 01 13:01:11 show it? Feb 01 13:02:29 sec Feb 01 13:08:30 hi! Feb 01 13:11:41 if i show the current date in my app, how can i change it when the clock hits midnight ? Feb 01 13:13:04 by still showing current date Feb 01 13:13:41 there is a textview and i just set it's text to the current date Feb 01 13:14:05 i didn't find anything like the textclock widget Feb 01 13:14:16 so i guess i have to create one Feb 01 13:14:25 .. or am i wrong? Feb 01 13:14:44 It's right there in the Date & Time subsection of the layout editor in Android Studio Feb 01 13:15:22 Dagmar: which one? I see only time and date pickers, chronometer and the textclock Feb 01 13:15:45 ohh and the calendarview Feb 01 13:16:50 Dagmar: which one do u think? Feb 01 13:17:54 The TextClock Feb 01 13:19:00 TextClock can show current date too? Feb 01 13:20:08 _Yes_. Feb 01 13:20:30 Clock widgets are _going_ to need to be localized. Feb 01 13:20:55 ...this means they're almost guaranteed to be able to take format strings, because that's how they're specified in the localization data. Feb 01 13:21:24 Lo and behold, there are both android:format12Hour and android:format24Hour attributes to let you explcitly set the format used. Feb 01 13:21:44 The DateFormatter doesn't really distinguish between "hours and minutes" and "days/years". Feb 01 13:22:15 ...so you can pretty much slap whatever format string you want in those attributes and it will merrily update them with the same rules it updates the default clock. Feb 01 13:22:48 Dagmar: thanks you very much :) Feb 01 13:23:12 no problem Feb 01 13:29:53 zedz: Your big concern should probably be using the _correct_ formatstring for the locale. Thinking about it, you shoudl absolutely read https://developer.android.com/reference/android/text/format/DateFormat.html and especially the bit about getBestDateTimePattern Feb 01 13:30:10 android:format24Hour="yyyy.MM.dd" do the trick Feb 01 13:30:14 I think Feb 01 13:30:14 :D Feb 01 13:30:28 Whether the month goes first or the day goes first is definitely affected Feb 01 13:31:20 If you're just letting the widget do all the work, what you propose is fine, but technically you should probably run it past that getBestDateTimePattern() if you're diddling the widget in java at all Feb 01 13:32:34 Actually getDateFormatOrder will probably be good enough for your stated use-case Feb 01 13:32:48 That'll let you keep yer dots Feb 01 13:58:50 Where is `adb` usually installed? And should I get it with android studio..? Feb 01 14:00:07 I got it with Android Studio, yes Feb 01 14:00:52 in android sdk path, which is mostly separated with android studio Feb 01 14:01:01 android studio just downloads it on install Feb 01 14:01:10 ahh wait okay, I think I need to use the standalone SDK manager or something to get the version I need (compatible with 6.0) Feb 01 14:01:15 thanks yall :) Feb 01 14:01:44 it's in sdk/platform-tools Feb 01 14:01:49 if only clicking it would work :| Feb 01 14:03:03 is the standalone SDK manager binary / script somewhere in the `android-studio` release folder? I know `bin/android-studio.sh` is the script which opens the studio itself, but for some reason the "Launch standalone SDK manager" link is not working in that window Feb 01 14:03:48 http://i.imgur.com/ufQieUG.png that blue text near the bottom Feb 01 14:04:17 I have "SDK Manager.exe" in sdk Feb 01 14:04:35 it's not that one Feb 01 14:04:40 no, it's that one Feb 01 14:04:58 that's the stand-alone SDK Manager Feb 01 14:05:39 ahh alright, I'll do a search :) thanks Melatonina Feb 01 14:06:04 hm, what folder path was it in by chance? Feb 01 14:06:10 in sdk Feb 01 14:06:54 I guess that the stand-alone SDK Manager is part of the SDK itself Feb 01 14:07:17 aie karumba, I can't find it :\ Feb 01 14:07:37 in the installed path, or the distribution for android-studio? Feb 01 14:07:47 which OS are you on Feb 01 14:07:52 in the installed path Feb 01 14:08:14 X/Y/Z/sdk is the path of the SDK in my computer Feb 01 14:08:30 Ashiren: linux - ubuntu Feb 01 14:08:35 ahh hm Feb 01 14:08:50 I'm on Windows 10 Feb 01 14:08:59 could be /home/user/Adnrodi/Sdk/... or /opt/android-sdk/... Feb 01 14:09:20 or just look for platform-tools directory Feb 01 14:09:31 check 'em, I don't think `~/Android/Sdk/sdk` exists: http://i.imgur.com/04eh5G1.png Feb 01 14:10:30 plenty of `.java` files, but no binaries v_v Feb 01 14:10:57 Thankfully you can get standalone downloads of those bits Feb 01 14:11:39 Dagmar: of the SDK manager? Feb 01 14:13:12 hm, I'm just going to try the latest version I guess :x *does a rain dance for security* Feb 01 14:13:56 Yeah, way down at the bottom of https://developer.android.com/studio/index.html#downloads is one standlone bit that includes a cli tool you can bootstrap the rest in with, and you can get platform tools from the links referenced at http://www.androidpolice.com/2017/01/05/google-makes-adb-fastboot-platform-tools-available-without-full-sdk-android-studio-download/ Feb 01 14:14:30 The last few days there's been a person a day in here suffering from knackered downloads Feb 01 14:14:38 ahh wicked, thank you Dagmar Feb 01 14:15:15 yeah what gives, I'm just trying to build enterprise-grade apps on the cheap and all :) Feb 01 14:15:38 Ignorance has a costs. Feb 01 14:19:22 just like gitlab fuckup Feb 01 14:19:46 THat should probably be a resume-generating event for whoever was supposedly making sure backups were restorable Feb 01 14:20:31 ...and probably a scolding for the admin who didn't trigger a snapshot before having to do something involving deleting data with privs Feb 01 14:21:15 https://s3-eu-west-1.amazonaws.com/uploads-eu.hipchat.com/129580/965217/TXQGBvyCJCkSOrv/16462916_1367485229974524_6898206381514809250_o.jpg Feb 01 14:21:34 lol Feb 01 14:23:32 Ashiren: gitlab screwup? What happen? Feb 01 14:23:33 You'd really think that people working for a company that revolves around intelligently branching data structures would just *instinctively* be using snapshots Feb 01 14:23:57 athan: Word has it someone deleted the wrong directory in a terrible, terrible way Feb 01 14:24:13 ...and now supposedly 4 of their five backup methods are failing Feb 01 14:24:16 ROFL Feb 01 14:24:28 I think someone over there is bullshitting about that Feb 01 14:24:33 that is funny/not funny Feb 01 14:24:47 yeah that is hard to do Feb 01 14:24:52 should be hard* Feb 01 14:25:01 I am unconvinced they're utilizing five different backup methods Feb 01 14:25:34 Well, clearly reality supports my view on that, but I think they weren't actually trying to run five different backup methods at once Feb 01 14:25:38 http://checkyourbackups.work/ Feb 01 14:25:57 ugh v_v react native is wonky Feb 01 14:26:20 better add "more security" with another layer of untyped garbage because automagical Feb 01 14:26:24 "Problems encountered" #1 smells like dead fish and rotting fecal matter to me Feb 01 14:26:53 I suspect anyone famiiliar with LVM snapshots will find it terribly suspect as well Feb 01 14:27:24 "Disk snapshots in Azure are enabled for the NFS server, but not for the DB servers" Feb 01 14:27:32 ^-- @#$@$# windows people. Feb 01 14:28:07 rofl Feb 01 14:28:23 That was one of my major beefs at my last large office gig Feb 01 14:28:30 The windows admins spent a lot of time _pretending_ shit was working Feb 01 14:28:42 i just installed IntelliJ Idea, i want to use it to develop Android Apps, is this the files that contain android JDK tools_r25.2.3-linux.zip ? Feb 01 14:28:43 that sounds right :) Feb 01 14:29:10 They pretty much threw a hissy about Nagios monitoring, claiming it was too hard and setting up their own MS product so they had basically, a formal mechanism for sweeping problems under the rug Feb 01 14:29:25 I just can't wait to use a _real_ typesystem like haskell or purescript to develop apps >.> I'm so tired of garbage Feb 01 14:29:29 I need my app to be able to take pictures, automatically resize/compress an image, and upload them in the background as new ones are taken from the app. Feb 01 14:29:35 What's the best way to go about this? Feb 01 14:29:42 Many AsyncTasks Feb 01 14:30:04 the cringe is strong x_x Feb 01 14:30:23 CrowX-: programs :v Feb 01 14:30:51 it sounds like you need to invoke some form of continuation / concurrency system Feb 01 14:30:53 asyncs everywhere Feb 01 14:30:57 You have _several_ non-trivial tasks there Feb 01 14:31:14 ...all of which have essentially a variable amount of time in which they'll complete Feb 01 14:31:37 CPS ftw :) Feb 01 14:31:48 yo dawg I heard you like continuations Feb 01 14:31:50 CrowX-: https://developer.android.com/training/camera/cameradirect.html Feb 01 14:31:59 Hi, Is there a way to get x509 cert chain from a SslCertificate object? Feb 01 14:32:04 You're going to need to take the pic, and then send it off to be recompressed with a callback for when that's done, which will trigger it being sent off to the uploader with another callback for when THAT's done Feb 01 14:32:19 but nowadays Camera2 (used since Lolipop) is used Feb 01 14:32:53 anyway, it just that in PictureCallback.onPictureTaken you just send to executor a task that will compress and send picture in background thread Feb 01 14:35:34 i just installed IntelliJ Idea, i want to use it to develop Android Apps, is this the files that contain android JDK tools_r25.2.3-linux.zip ? Feb 01 14:50:04 Akuw, no Feb 01 14:51:09 Akuw, what are you attempting to do exactly? Feb 01 14:52:04 oh, you found that there Feb 01 14:52:52 it's been so long since I downloaded the sdk... maybe it is that nowadays... let me check Feb 01 14:54:28 gradle can download the sdk, I think Feb 01 14:54:53 just gotta get a gradle wrapper/install and set up a bare build script Feb 01 14:56:10 I'm unclear on why AS isn't being used, since afaik IntelliJ is what AS uses Feb 01 14:56:14 Akuw, yeah the tools thing contains all you need Feb 01 14:56:46 well, it contains some tools and a tool to download more stuff Feb 01 14:56:57 because people do other development besides just Android in intellij Feb 01 14:57:10 ^ Feb 01 14:57:32 I don't see a reason to use AS when intellij already offers me that functionality Feb 01 14:58:04 intellij is equivalent to as 2.2 atm Feb 01 14:58:11 Mainly because when it downloads its pieces correctly it's one-stop shopping for Android dev Feb 01 14:58:41 i do all my builds in sbt, android studio doesn't make it 1-stop for me Feb 01 14:58:53 This week not so much but usually new AS installs basically "just work" Feb 01 14:59:21 I haven't made a clean install in years, so I'm not sure :p Feb 01 14:59:42 I still have remnants of IDEA 11 Feb 01 14:59:59 YjK5&sZzZrK492LVc8zJh9S Feb 01 15:00:04 nice password Feb 01 15:00:07 go change it Feb 01 15:00:07 it's awesome Feb 01 15:02:19 Okay, Mr. Spicer Feb 01 15:03:35 I'd set something up to wait for that guy to do it again, but by now I'd just be racing against at least two dozen other people Feb 01 15:10:46 sean? Feb 01 15:30:44 hi is there a way to set a cardfragment layout in the gridViewPager kinda like this cardFragment.getView().setLayoutParams(?); Feb 01 15:32:29 emmanuel_, you should adjust the views through the adapter, it's not advisable to change them directly Feb 01 15:34:14 emmanuel_, as in, change data in the adapter to reflect what you want it to do and then call notifyDataSetChanged or similar Feb 01 15:47:28 so i'm querying content://mms-sms/conversations/ to get a list of all of the conversations/threads Feb 01 15:47:41 but it looks like sometimes the address is null Feb 01 15:50:55 mhmm i think group conversations count as mms? Feb 01 15:52:16 mhmm interesting i'll look further into it Feb 01 15:53:32 Zharf: I don't quite get it how can you change the view while your inside a getFragment() method inside the adapter: https://slack-files.com/T03HB40F7-F3YQ5A8SD-6d9a4f669a Feb 01 16:05:45 emmanuel_, oh, well just tell the fragment to change its stuff? Feb 01 16:05:57 emmanuel_, don't mess with fragment internals from outside :) Feb 01 16:07:28 Zharf: should I need to cast the cardFragment to a Fragment then change it layout then? Feb 01 16:08:39 just add a method for it and call that? Feb 01 16:08:56 I need to go, maybe someone else can help you if you have questions Feb 01 16:10:46 nvm, i got it Feb 01 16:12:40 Zharf: ok thanks a lot you gave me clue to solve my problem, do you know anybody who can answer my question? Feb 01 16:36:16 hi Feb 01 16:51:21 Is there any way to get a CardView to go border to border with margin, yet also still have a shadow from elevation? Feb 01 16:51:56 Setting card_view:cardUseCompatPadding gives elevation, but limits me to always set margin/padding on left and right Feb 01 17:00:40 Hmm seems that setting a bottom margin on the cardview (and no app:cardElevation or app:cardUseCompatPadding) show border to border with an elevation Feb 01 17:16:52 Hi! Feb 01 17:17:01 Someone knows if Ionic supports bluetooth 4.0? Feb 01 17:25:51 http://i.imgur.com/6zsNGcc.gif Feb 01 17:31:03 Hi Feb 01 17:31:33 does anyone know how to fix this exception: 'Neither user 10179 nor current process has android.permission.CONNECTIVITY_INTERNAL' ? Feb 01 17:33:49 spchal: Add that same permission on the manifest file Feb 01 17:34:02 yea.. But I can't find that permission Feb 01 17:34:29 it doesn't appears? Feb 01 17:34:33 you're using Android Studio? Feb 01 17:34:53 yea.. I am using android studio Feb 01 17:36:01 Probably requires system privs Feb 01 17:36:16 I am trying to bind to a specific network interface Feb 01 17:37:02 You can probably hand your package that permission using adb Feb 01 17:37:38 GSAM has a workaround for this sort of thing documented because 7.x moved BATTERY_STATS into signature|privileged Feb 01 17:37:58 You aren't likely to be able to get that permission via the manifest Feb 01 17:38:16 alternatively, you might need to find another way to do what you need to do... Feb 01 17:38:52 By "bind to a specific interface" are you trying to control the source IP of a network connection? Feb 01 17:39:02 ...or are you trying to do something related to routing? Feb 01 17:39:21 The former can be done without privs, although it's not exactly something people do anymore Feb 01 17:39:28 The latter will require elevated privs Feb 01 17:40:13 It's Close Enough(tm) measurements Feb 01 17:40:15 @#$@ Feb 01 17:40:28 I am building an app that can make VoLTE call. I need to send traffic via rmnet1 (which is the GBR interface) Feb 01 17:41:30 http://stackoverflow.com/questions/16965388/binding-a-java-application-to-an-interface Feb 01 17:41:54 You _can_ select the source IP for the socket, if you know it Feb 01 17:42:26 Generally source auto-selection takes place when you don't specify (i.e., binding to the default of "0.0.0.0" for IPv4) Feb 01 17:45:13 If a library is 5 MB and I need to call just a single function 10 lines code from it, will the whole library be baked into .apk or just the called function? Feb 01 17:46:54 Proguard (if enabled) should strip it out. Feb 01 17:46:59 Unless you tell it not to. Feb 01 17:54:13 hmm.. this is a career specific interface with only ipv6 addressing! currently I am using the bindProcessToNetwork() function selecting with interface name. I will try using source IP and see if it works. Feb 01 17:54:46 thanks :) Feb 01 18:05:50 I love having users... Feb 01 18:19:23 http://imgur.com/a/nJOqP Feb 01 18:21:59 <_genuser_> so is anyone using any other emulations other than AS default ones? I can't launch any of those (vt-x is diabled in bios and bios is locked, can't run haxm), arm ones just don't even spin up. Feb 01 18:22:07 <_genuser_> AVD says launching but nothing after that. Feb 01 18:22:38 <_genuser_> genymotion, doesn't have a free one. so I'm curious if there's another options that someone might recommend. Feb 01 18:24:48 genymotion isn't free anymore? Feb 01 18:25:03 well, it’s not free if you’re using it for commercial purposes Feb 01 18:25:15 _genuser_: use a device Feb 01 18:25:32 I see Feb 01 18:25:40 <_genuser_> s73v3r: damn corporate laptop. using a device is even more cumbersome. Feb 01 18:25:42 I thought everyone uses it for cmmercial purposes but says otherwise Feb 01 18:25:55 ask for a mac is usually the best solution Feb 01 18:25:57 people lie? Feb 01 18:26:11 <_genuser_> pfn: INDIE (independent developers and small businesses) from $136/yr Feb 01 18:26:50 <_genuser_> mac would be impossible to get for our organization (even tho we do use iphones for phone). Feb 01 18:26:53 _genuser_: talk to your boss, and see if they can get corporate IT to relax things so you can do your job Feb 01 18:27:12 have a look into bluestacks _genuser_ Feb 01 18:27:13 so I guess your organization doesn't create ios apps? Feb 01 18:27:13 _genuser_: What do they use for the iOS app, then? Feb 01 18:27:16 they create ios but not android? Feb 01 18:27:19 er, vice versa Feb 01 18:27:22 <_genuser_> s73v3r: hopefully, I'm not sounding like a person shooting down every idea for the sake of it. :) Feb 01 18:27:43 _genuser_: I mean, there’s nothing we can do. it’s all on you to go bitch and yell at corporate IT Feb 01 18:27:54 <_genuser_> s73v3r: basically my boss is trying somethign new and wants to pitch to his boss IF it works. without any proof, he doesn't want to even mention any android stuff. Feb 01 18:28:09 and if they don’t let you do your job, to tell your boss that they’re not letting you do your job Feb 01 18:28:18 <_genuser_> s73v3r: yeah, agreed. I'm hoping to find some ideas. if not, I might then just use personal resources. Feb 01 18:28:22 well, in that case, it sounds like it’s not possible Feb 01 18:28:57 <_genuser_> sounding like it. I was trying to launch the arm emulator (no matter how slow) but that didn't run at all. :) Feb 01 18:29:09 <_genuser_> probably personal laptop would be the best route to take in this cas. Feb 01 18:29:11 <_genuser_> *case. Feb 01 18:29:34 maybe, but depending on the security policy at the company, and the laws in your state, that might be an even worse idea Feb 01 18:29:46 <_genuser_> wifi debugging was kinda pretty awesome. but lately on my test device it only works if you first plug in usb. Feb 01 18:30:04 <_genuser_> s73v3r: oh, using personal resources for work? Feb 01 18:30:09 yeah Feb 01 18:30:11 <_genuser_> because then they can claim all your personal stuff as theirs too? Feb 01 18:30:23 yup Feb 01 18:30:25 <_genuser_> they love saying stuff like that already. Feb 01 18:30:40 <_genuser_> anything used for work purposes and any resources used are automatically theirs. Feb 01 18:31:22 so i wouldn’t risk it Feb 01 18:31:39 <_genuser_> we're pretty niche in a fortune 50 company. they mostly just layoff. haven't had new hires in long time. Feb 01 18:31:54 <_genuser_> so boss (even me to an extent) are looking for new ideas to pitch to mgmt. Feb 01 18:32:11 <_genuser_> get a product line or services going. Android was the only thing I could suggest to him. Feb 01 18:32:21 _genuser_, wifi adb only works if you first connect usb Feb 01 18:32:27 or if you use a rom that allows you to toggle in Feb 01 18:32:29 <_genuser_> pfn: ok, so that's by design then. Feb 01 18:32:38 so get him to tell IT that you need permissions and stuff on your work computer Feb 01 18:32:43 * pfn uses adb over wifi daily now... Feb 01 18:32:56 does it work well? Feb 01 18:32:59 since I can't connect phone to pc for this app Feb 01 18:32:59 <_genuser_> pfn: but each day you first have to plug it in, correct? Feb 01 18:33:01 it works well Feb 01 18:33:05 _genuser_, yes Feb 01 18:33:10 but that takes a second to do Feb 01 18:33:10 <_genuser_> ok, that's what I noticed too. Feb 01 18:33:16 plug in, run my adb-wifi command, and unplug Feb 01 18:33:26 <_genuser_> pfn: plugging into usb port of a locked down laptop <-- that breaks. Feb 01 18:33:29 then operate over wifi for the rest of the day Feb 01 18:33:34 <_genuser_> for my personal use, I do plug it in, then enable wifi and just go. Feb 01 18:33:48 windows10 comes with adb drivers now Feb 01 18:33:48 <_genuser_> yeah, that's my experience too. Enable once then use wifi rest of the day. Feb 01 18:34:04 get your laptop updated to win10 Feb 01 18:34:21 <_genuser_> so win10 you do'nt have to plug it in? Feb 01 18:34:48 <_genuser_> the wifi adb feature is dependent on adb.exe or on android side? Feb 01 18:35:02 <_genuser_> also, I'll see if I can get an update to win10. that might be doable. Feb 01 18:37:03 _genuser_, no, you have to plug it in, but don't require any privileges to install drivers Feb 01 18:42:44 <_genuser_> pfn: I see. checking on win10 now. :) Feb 01 18:54:27 I have an app with a newsfeed, and an icon in the nav drawer that needs to display if there are newsfeed updates or not. My current plan is to create an observable when the newsfeed requests an update, but to have the nav drawer subscribed to a subject that gets updates every time another observable requests newsfeed updates Feb 01 18:54:38 Does that sound like a clean approach? Feb 01 19:16:32 I'm using Android Studio on Windows to compile libpcap into my app. I'm running into this error in pcap-linux.c. Does it mean I need to compile on linux with kernel sources installed? Error:(215, 10) 'linux/net_tstamp.h' file not found Feb 01 19:19:01 there should be an #ifdef guard around that Feb 01 19:19:16 so that it doesn’t try to compile that on windows Feb 01 19:19:29 Ah, ok Feb 01 19:20:14 Hmm, oddly enough the #include line is preceeded by #ifdef HAVE_LINUX_NET_TSTAMP_H Feb 01 19:20:33 dougquaid see if they have an android target Feb 01 19:21:33 g00s: What exactly should I look for? This is the version of libpcap I'm trying to use https://android.googlesource.com/platform/external/libpcap.git Feb 01 19:21:52 use this one i guess https://android.googlesource.com/platform/external/libpcap.git Feb 01 19:21:56 and the Android.mk file there Feb 01 19:22:23 from old SO post https://ducbh.blogspot.co.uk/2013/12/cross-compile-libpcap-for-android.html Feb 01 19:22:36 probably changed since then Feb 01 19:22:44 Yeah, I saw that post but didn't understand a bit of it Feb 01 19:23:28 it will be a learning experience :D Feb 01 19:25:32 Maybe I'll try to cross compile libpcap in linux and just import the .so file info my app Feb 01 19:25:33 How to get ip of emulator? Feb 01 19:25:47 android studio Feb 01 19:30:09 adb -s youremulatordevices shell ifconfig eth0 Feb 01 19:30:37 but you won't be able to reach it from your host anyway Feb 01 19:31:17 cannot reach from phone either? Feb 01 19:31:35 do you even network Feb 01 19:31:50 ? Feb 01 19:31:52 what are you trying to do? Feb 01 19:31:57 i smell another xy problem Feb 01 19:32:21 connect to emulator. simple Feb 01 19:32:27 via ip Feb 01 19:33:02 then you have to be on the same subnet Feb 01 19:33:34 i am Feb 01 19:33:34 maybe you need some route, or play with adb forward Feb 01 19:33:43 thx Feb 01 19:33:46 i cannot help you more sorry Feb 01 19:33:50 np Feb 01 19:34:43 i would search on stackoverflow if i were you, i cannot imagine this problem has never been asked nor solved Feb 01 19:53:07 hey there. I've got an issue with changing screen orientation and views not resizing properly Feb 01 19:53:56 I'm starting in portrait mode and have a button that, when clicked, will set orientation to landscape and resize a video to full-screen (as well as setting proper ui flags for full-screen) Feb 01 19:54:42 my issue is that when exiting full-screen, and setting orientation back to portrait, certain views are not full-width anymore Feb 01 19:55:22 has anyone seen this? I'm not entirely sure I'm using the correct approach here Feb 01 19:55:28 So I'm having a little luck getting libpcap to cross compile for android in linux. I'm just running into this error during the make command. Any ideas what could be wrong? https://paste.ofcode.org/YUTKefD7BZvQsgcWG9Aemp Feb 01 19:58:22 * capella been wondering what the heck the libpcap project is about since yesterday 👀 Feb 01 19:58:45 complexity fascinates me 👍 Feb 01 19:59:28 Complex is right, at least for me since I've never done any android programming. I feel like I picked the wrong thing to start learning on Feb 01 20:01:30 well for begining android learning usually hello world app in java is made Feb 01 20:02:15 Yeah, but I've done hello world's in enough languages that I just wanted to start right in. And anyway, I'm just forking an open source project and making a few changes Feb 01 20:25:16 So I think I got libpcap finally compiled. If I just put libpcap.so in the jniLibs/armeabi folder, will Android Studio automatically put it in the APK when my project compiles? Feb 01 20:25:33 yes Feb 01 20:25:42 why do you have to compile libpcap by hand anyway? Feb 01 20:25:47 it should be handled automatically.... Feb 01 20:27:15 pfn: I've been trying to compile libpcap in Android Studio for Windows but I've run into several different issues Feb 01 20:30:57 Telephony.Mms.DELIVERY_REPORT = what do the integers mean? can't find any documentation on it Feb 01 20:31:11 it seems like it returns 129 Feb 01 20:31:53 same with READ_REPORT Feb 01 20:33:20 same with MESSAGE_TYPE, combination of 129 and 132 Feb 01 20:35:56 aspire, the integers mean what they're documented to mean :P Feb 01 20:36:46 pfn, can't find any documentation? :( Feb 01 20:36:52 https://developer.android.com/reference/android/provider/Telephony.BaseMmsColumns.html#DELIVERY_REPORT Feb 01 20:36:56 where does it describe the result Feb 01 20:37:16 aspire, they're correlated to values returned by the content provider Feb 01 20:38:42 well, this is the content provider i'm using https://developer.android.com/reference/android/provider/Telephony.Mms.html Feb 01 20:40:40 read documentation at large on mms delivery reports Feb 01 20:41:15 i'm just trying to find it Feb 01 20:42:29 what do you suggest to call REST services and from where ? i need to update the UI for each rest api called Feb 01 20:43:18 I assume it's 0 or 1 for delivery report Feb 01 20:43:26 from the Activity using a Loader ? or from a Service ? and with library ? Volley or Retrofit ? Feb 01 20:44:44 pfn d_rpt=129 Feb 01 20:44:48 i'm getting 129 for all of them Feb 01 20:45:09 aspire, try reading aosp to determine their meaning Feb 01 20:46:11 i'm guessing theres 4 different possible values Feb 01 20:46:23 if i had to guess i'd say 129 would be a 'delivered' id Feb 01 20:46:35 as i know for sure that these pictures went through Feb 01 20:47:17 rr (READ_REPORT) is returning 129 as well Feb 01 20:48:20 but then i look at the rpt_a (READ_REPORT_ALLOWED) column Feb 01 20:48:28 which returns a boolean and its 0 all the way through lol Feb 01 20:48:48 the docs for READ_REPORT says it returns a boolean too but that doesn't really make sense Feb 01 20:49:03 ech0s7: I use retrofit, usually in singletons or (most often) in objects that don't get recycled on configuration changes, for example in objects allocated in retained fragments Feb 01 20:49:56 ech0s7: if connection are shared between activities, I place them in a singleton managed by the application object Feb 01 20:50:17 pfn there's good documentation on message_box Feb 01 20:50:28 seems to be either 1 (INBOX) or 2 (SENT) for the most part Feb 01 20:50:41 Melatonina: google suggest to avoid singleton managed by application object Feb 01 20:51:10 and just by observation it looks like m_id changes a lot Feb 01 20:51:44 ech0s7: I use it to maintain a websocket connection which has the same lifespan of the application. I don't see why I should not do it in the application object Feb 01 20:52:34 ech0s7: if the connection or the request belong to a single activity (which is the case, most of the times) I use the other approach Feb 01 20:53:03 Ok, so you never use Service to consume rest api ? Feb 01 20:53:19 i mean you could create a websocket connection into a Service Feb 01 20:53:40 ech0s7: coolest thing you can do: manage all connections in a service. I never did it but I will try it in the next development iteration Feb 01 20:53:40 Service is only a lifecycle container Feb 01 20:53:42 nothing more Feb 01 20:53:47 if you use a Binder, it's useful for IPC Feb 01 20:53:59 but that's about the extent of Service Feb 01 20:54:44 pfn TEXT_ONLY looks interesting Feb 01 20:54:56 ech0s7: REST API interactions usually belong to a single activity and I manage them in (objects allocated in) retained fragments Feb 01 20:55:02 even if it returns false that doesn't mean it doesn't contain text Feb 01 20:55:09 i don't think the service is useful to consume rest api Feb 01 20:55:09 could contain an image and text which would cause it to be false (probably) Feb 01 20:55:28 ech0s7: I also have a WebSocket-based real-time connection with my server and that's application-wide Feb 01 20:55:42 Melatonina: using retained fragments i think is a good design Feb 01 20:56:07 ech0s7: it's the best I could figure so far Feb 01 20:57:00 a different design could be making the call from a thread pool managed into a service Feb 01 20:57:44 ech0s7: I enqueue() the calls. The callback is called in the main thread Feb 01 20:58:11 Melatonina: why retrofit and not volley ? Feb 01 20:58:16 ech0s7: if you use retrofit + rxjava you can easily control threading as you wish Feb 01 20:58:21 did you compare both ? Feb 01 20:59:19 I googled about both before choosing retrofit. It looked more supported. There have been few years when Volley was not maintained. But I think that's past Feb 01 20:59:43 Retrofit looked slightly more modern. It's RxJava-ready Feb 01 20:59:59 My information could be outdated Feb 01 21:00:14 9 people out of 10 here use Retrofit Feb 01 21:00:26 Volley is still used, tho Feb 01 21:03:48 it will be 10 when i use it. Feb 01 21:16:48 Need assistance locking down Android device features such as camera and also apps. Is this possible without using an MDM? Feb 01 21:18:58 can someone point me to some sites online to learn more? Feb 01 21:20:04 MDM? Feb 01 21:20:44 android user (not developer) specific things usually go to into #android-root or #android Feb 01 21:21:43 MDM = mobile device managemer Feb 01 21:23:19 * capella knew dougquaid was beyond "Hello World" :-p Feb 01 21:55:56 I finally figured out my problems with compiling libpcap. My error was that linux/net_tstamp.h didn't exist and my minSdkVersion was set to 19. ndk for android-19 doesn't have linux/net_tstamp.h, so I set minSdkVersion to 21, which does have linux/net_tstamp.h, and it worked. SO my question is this - why doesn't 19 have linux/net_tstamp.h? I'd really like to support android 4.4 with my app Feb 01 21:59:28 They probably didn't need it then Feb 01 22:01:18 Dagmar: Is there a chance I can get a copy of that file that would work for android-19? Feb 01 22:01:34 Like from the official linux kernel sources or something? Feb 01 22:02:14 Sure. Just pull down a copy of the matching Linux source Feb 01 22:02:18 ...or just FAKE IT Feb 01 22:02:58 It hasn't changed much in the last several years and looking at the changelog for it should be very illuminating Feb 01 22:03:04 https://github.com/torvalds/linux/blob/master/include/uapi/linux/net_tstamp.h Feb 01 22:03:10 Good call. Thanks Feb 01 22:05:01 so, silly question, but isn’t libpcap something that’s included? Feb 01 22:20:50 dougquaid: update to NDK r14 beta and set `APP_UNIFIED_HEADERS := true` Feb 01 22:20:59 https://android.googlesource.com/platform/ndk/+/master/docs/UnifiedHeaders.md Feb 01 22:21:07 danalbert: Thanks, I Feb 01 22:21:11 I'll try that Feb 01 22:21:50 On a completely unrelated topic, how can I make sure my app only pulls location from the GPS chip and not wifi or gsm? Feb 01 22:22:09 tl;dr on that doc: the way we used to manage all the headers made it really difficult to backport changes in the headers, it's different now so linux headers will always be up to date Feb 01 22:24:02 dougquaid: you’re not supposed to care Feb 02 00:31:33 hi, when coding for android do I have to worry about inlining functions for optimization Feb 02 00:33:42 the android runtime does not inline methods ? Feb 02 00:33:59 jagguli: ART sometimes does. Not certain of the details, though. Feb 02 00:34:14 If you're asking "Should I copy-and-paste code for manual inlining", the answer is almost certainly "no". Feb 02 00:35:20 ok so what cases should i be worried about inlineing functions Feb 02 00:36:29 It's hard to answer that question. I think there aren't many cases where it would make sense to do this, though. Feb 02 00:36:36 It'd be easier to ask you why you're asking. :D Feb 02 00:37:19 i was reviewing some android code and the developer says that he has to consider performance when refactoring a large function Feb 02 00:38:42 jagguli: does he have numbers? Feb 02 00:38:43 I guess it's possible that he's wrong. It's also possible that he's right. Feb 02 00:39:36 not realy its a really simeple function Feb 02 00:40:22 can some one point me to some reference Feb 02 00:43:03 jagguli: This is the only one I know of: https://android.googlesource.com/platform/art/+/master/compiler/optimizing/inliner.cc Feb 02 00:43:44 cool thx Feb 02 00:44:02 lol the code ... Feb 02 00:44:26 ok Im not intimidated 8} Feb 02 00:44:52 The VCS log for that file might be useful: https://android.googlesource.com/platform/art/+log/master/compiler/optimizing/inliner.cc Feb 02 00:45:34 i just need to find the inliner for class methods Feb 02 01:09:02 Does anyone know if the ath9k wifi driver has been ported to android? Feb 02 01:11:47 ok... why would you need it? I'm guessing no Feb 02 01:13:35 capella: I have my use case. I'm just here for the how, not the why. Feb 02 01:13:53 ooops there goes my interest Feb 02 01:14:27 That's fine, you were only guessing anyway Feb 02 01:15:17 YOU WILL ANSWER MY QUESTION. I WILL NOT ANSWER YOUR QUESTION. Feb 02 01:15:41 yah leeds, fuck em Feb 02 01:30:02 im using a ListView currently to display content. right now i only have one type of content implemented, but im going to have more content types. about 5 or so. what im trying to achieve is basically having a Recycler cache for each content type i have in my ListView, so is RecyclerView with RecyclerView.ViewHolder the way to go, and does it factor in the different ViewHolder types when Feb 02 01:30:02 asking for a new View in getItem? Feb 02 01:31:30 emceelovin: Both ListView and RecyclerView support multiple view types. Feb 02 01:31:39 yes i understand that Feb 02 01:31:51 i'm new to android development and java but have studied for around a month now but im in no way new to programming. givent hat would the following be difficult to implement? i have an idea for a personal app, ive looked for functionality of this in playstore and couldnt find it, can prolly be achieved through IFFT or android scripting layer and python, i want real android dev experience though. i want to create timers, alarms, and Feb 02 01:31:52 notifications based off where i am, broader idea is a precise location based productivity app. ive stood in several areas and used an app to log the coords, but need to log more so i can form areas. if phone is in area would be the condition. then i register events for several locations when device is in a defined location. the onevent methods will then do things i want my phone to do. if its entirely possible to easily implement any Feb 02 01:31:54 suggestions about how to go about would be appreciated, thanks a lot. Feb 02 01:31:57 i dont think youre understanding my question though. i want to have a cache of each type. i want to avoid reinflating views constnatly Feb 02 01:32:01 damn that was longer than i thought, sorry. Feb 02 01:32:50 TacticalJoke instead of detecting what type of content my data is im about to render, and reinflate the view for it, id like to have separate View caches dependant on which type of data Feb 02 01:32:53 above You're looking for geofencing Feb 02 01:33:21 yeah i saw that code snippet and got excited since ive had the idea for a while Feb 02 01:33:32 TacticalJoke i want to have recycled views for content A, content B, and content C. not one set of recycled views for all the content types Feb 02 01:33:57 it doesnt make sense to me to keep reinflating views. basically the same way as a ViewHolder pattern, but for content type instead Feb 02 01:34:02 emceelovin Yes, create separate viewholders Feb 02 01:34:12 emceelovin: Are you aware that ListView and RecyclerView already have the ability to do this built in? Feb 02 01:34:28 orbyt_ so if i create separate ViewHolders, the RecyclerView will factor each different type in and ask me for a view only if it needs another view for that type? Feb 02 01:34:36 TacticalJoke thats what im trying to find out Feb 02 01:34:56 the documentation isnt exactly too clear, so i needed some clarification Feb 02 01:35:34 Yes, they have this ability. Feb 02 01:35:36 e.g., https://developer.android.com/reference/android/support/v7/widget/RecyclerView.Adapter.html#getItemViewType(int) Feb 02 01:35:37 nice Feb 02 01:35:46 emceelovin Give this a read: https://github.com/codepath/android_guides/wiki/Using-the-RecyclerView Feb 02 01:35:57 It will help you better understand RecyclerViews Feb 02 01:36:08 thats all i needed to know. so do i have to ditch my ListView or can i keep it? Feb 02 01:36:24 emceelovin: ListView also has this ability. Feb 02 01:36:30 orbyt_ thanks. i pretty much get the jist of them. i just needed to know how they handled multiple content types Feb 02 01:36:42 RecyclerView isn't necessarily better than ListView. In fact, sometimes, ListView is better. Feb 02 01:37:17 thats fine. i just wasnt sure if a ListView had this ability or not, but it also extends a RecyclerView doesnt it? which is the same thing in away Feb 02 01:37:19 I've seen cases where ListView does a *far* better job of view recycling than RecyclerView does, for example. (I've also seen the opposite.) Feb 02 01:37:39 does a ListView implement its own ViewCacheExtension? Feb 02 01:37:46 No, ListView doesn't extend RecyclerView. Feb 02 01:38:02 thought it did. maybe i read it wrong Feb 02 01:38:08 No. They are totally separate things. ListView predates RecyclerView by years. Feb 02 01:38:20 ahhh Feb 02 01:38:32 probably why its better in certain cases. more mature Feb 02 01:38:47 above: someone else in this channel was developing a location based task reminder thing (I'm sure it was more than that). So it's possible Feb 02 01:39:14 emceelovin: To achieve this with ListView, it's this stuff: https://developer.android.com/reference/android/widget/Adapter.html#getViewTypeCount() Feb 02 01:39:29 Just return more than 1 from there and handle it in Adapter.getItemViewType. Feb 02 01:39:56 TacticalJoke thats awesome man thank you. just what i need/needed to know Feb 02 01:39:59 emceelovin: Maybe. Though RecyclerView is intended to replace ListView, I think. Feb 02 01:40:16 im big on optimization, so ive been searching for ways to not constnatly reinflate views after i already figured out the viewholder pattern Feb 02 01:40:33 I'm just giving these words of caution because many seem to think RecyclerView is better in basically all ways. But it really isn't. Feb 02 01:40:45 im looking through the geofencing api docs now, thanks a lot for those orbyt_ btw looks very possible indeed. Feb 02 01:40:51 TacticalJoke if ListView predates RecyclerView, it makes sense why there is a RecyclerView now since ListView does already what RecyclerView does. they just exposed it now Feb 02 01:41:20 TacticalJoke gotcha. i never really used it honestly. ive been using ListViews because i didnt know a RecyclerView existed, and that ListViews are in api level 1 Feb 02 01:41:29 emceelovin: The "view holder" pattern is about avoiding calling View.findViewById over and over, not avoiding re-inflation. ListView and RecyclerView avoid re-inflation by design. Feb 02 01:41:40 the only reason i looked at it is because i didnt know ListView had the behavior i needed Feb 02 01:42:10 TacticalJoke yeah i understand that. i was just trying to avoid reinflating different layouts Feb 02 01:42:50 i avoided the constant searching for views, but now i want to not constantly reinflate layouts just because i have different content types Feb 02 01:43:08 Yeah. This is a standard ListView/RecyclerView use case. Feb 02 01:43:29 it just doesnt make any logical sense to me, other than resource usage, to reinflate layouts when its not necessary Feb 02 01:44:19 basically what i want, which im sure you gave the answer to, is say i have content A B and C, and theyre all the same height, and say 5 fit in a screen. id like to have 3 sets of 5(+/- the off screen views) of recycleable views available Feb 02 01:45:04 that way i dont have to check the current view in getItem, that isnt null, and reinflate a layout for it Feb 02 01:45:26 if its a view for another content type Feb 02 01:45:41 ugh, youtube is spamming me with advertisements in the notification area Feb 02 01:46:03 oh, set that off phew Feb 02 01:46:45 TacticalJoke so when i override getViewTypeCount, and return X types, itll have that many viewcache data structures? Feb 02 01:47:08 Yeah, I think so. It's been a while since I've looked at the code. Feb 02 01:47:23 It should have that number of lists/arrays. Feb 02 01:47:24 TacticalJoke gotcha. im still learning this android. ive gotten pretty good with it, but its literally night and day coming from a heavy win32 background Feb 02 01:47:31 TacticalJoke thanks i appreciate it Feb 02 01:48:05 Yeah, I came from Win32 too. Feb 02 01:48:17 Android is so foreign at first. Feb 02 01:48:38 i love win32 and am a big fan of microsoft, but ive gotten into android not really by choice, but becasue i have an android phone and lots of people do, and i do development, so i had no choice really Feb 02 01:48:46 but man, i seriously wanna puke sometimes and rip my hair out Feb 02 01:48:56 go with Xamarin then Feb 02 01:49:07 the foreign-ness is somewhat out of the way, but this more stuff comes along and its insane Feb 02 01:49:14 some stuff is like why are you doing it like this? Feb 02 01:49:32 emceelovin: That's a standard reaction. A lot of the Android framework is horrible. Feb 02 01:49:44 i was gonna check xamarin out. when i first started there was no xamarin or xml layouts. XAML/longhorn was in the works, but i havent checked out xamarin Feb 02 01:49:57 TacticalJoke horrible is an understatement lol. i seriously cant stand most of the API Feb 02 01:50:11 the organization, the term usage, the way things are looked up by strings a lot and not constants Feb 02 01:50:28 an "app" is broken down into like several different sections. its just weird Feb 02 01:50:46 a process has activities which have fragments. its just too much for me Feb 02 01:50:46 The string thing is just about translation. You could use constants if you wanted. Feb 02 01:50:48 if you enjoy programming in win32... Feb 02 01:51:07 rc files in win32 are equally maddening Feb 02 01:51:17 i never used those becuase they definitely are cancer lol. Feb 02 01:51:18 emceelovin: They're organized this way to facilitate task switching Feb 02 01:51:20 i left that up to visual studio Feb 02 01:51:57 Dagmar i see. that makes more sense then Feb 02 01:52:16 another thing i think is really bad, but viewless fragments saved me from, is configuration changes destroying an activity Feb 02 01:52:19 makes no sense to me honestly Feb 02 01:52:21 Activity and Fragment have bad design. There's really no excuse. Feb 02 01:52:24 It's a mess. Feb 02 01:52:43 You get used to the mess, though. Feb 02 01:52:48 like i rotate my screen and you takeout my activity? who decided that...how cant you just resize everything when all youre doing is making things larger(sometimes) Feb 02 01:52:55 i have mostly Feb 02 01:53:03 because some people want the UI to change on rotation Feb 02 01:53:10 emceelovin: Because not doing so would break people's layouts Feb 02 01:53:12 Yeah, it's a shame Activities are so fragile. They didn't need to design things in that way. Feb 02 01:53:17 should be optiojal, but i did notice configurationChange in the manifest Feb 02 01:53:23 they really didnt Feb 02 01:53:37 bankai_: Could've been avoided by simply not tearing down the Activity (but re-initializing everything else). Feb 02 01:53:49 how does not killing an activity break a layout though? its just reorganizing it/moving/resizing Feb 02 01:53:54 I suppose you'd rather see the display just _stretch_ to suit the new orientation? Feb 02 01:53:57 taking out an activity to do that is really weird Feb 02 01:54:21 how is it stretching? resizing is not hte same as stretching Feb 02 01:54:37 android cant resize a view is what youre telling me? Feb 02 01:54:48 Usually one's entire layout has to change on orientation change Feb 02 01:55:05 well then reinflate a layout. why take out the activity lol? Feb 02 01:55:14 but if you use RelativeLayout, things are, relative right? Feb 02 01:55:32 To some degree people can take advantage of the XML being switched out, but that doens't handle all use cases Feb 02 01:55:40 i can see a different layout, which would require reinflation at most, but taking an activity? this is kiddy stuff Feb 02 01:55:56 Your activity isn't generally doing all that much Feb 02 01:55:58 Dagmar: They could've done all that without destroying and recreating the Activity. It's a design flaw, IMO. Feb 02 01:56:19 i dont think anything warrants destroying an activity. not even a language change. which is severely rare Feb 02 01:56:28 in that case all youre doing is reloading views new text Feb 02 01:56:37 Right. Feb 02 01:56:50 ...and very possibly pulling out an entirely different layout with different features Feb 02 01:56:50 i seriously think a lot of things android does is highly unnecessary Feb 02 01:57:03 but thats a layout. i can reinflate layouts at runtime Feb 02 01:57:11 nothing special there. why tank an activity? Feb 02 01:57:29 thats like me taking a process in windows just for a data change or resize. all i have to do is MoveWindow Feb 02 01:57:33 tanking* Feb 02 01:57:40 Like video playback for example. Video is seldom portrait orientation, which leaves a lot of space someone could use for media info or controls, and it's not unreasonable to just make the video use the whole screen if the display matches it's orientation Feb 02 01:57:50 Dagmar: An Activity doesn't need to bind to some particular layout. It's just a weird choice they made. Feb 02 01:57:57 i agree Feb 02 01:58:08 thank gosh i can have a viewless retained fragment Feb 02 01:58:26 Being that we're not supposed to be tying long-running operations to the UI thread... Feb 02 01:58:29 What are you retaining? Just curious. Feb 02 01:58:31 my app basically lives inside a fragfment. its what i learned to do with apps honestly. i dont even use the MainActivity for anything other than stuff that pertains to the activity itself Feb 02 01:58:51 threads, a bunch of stuff i download from my server, and pretty much any data my app has in it Feb 02 01:59:07 Threads are independent of the activity life-cycle, FWIW. Feb 02 01:59:15 They just run. Feb 02 01:59:16 any normal developer knows not to hang a main/UI thread Feb 02 01:59:24 i did read that recently yes Feb 02 01:59:30 after weeks of keeping them in my retained fragment lol. Feb 02 01:59:35 its all good though Feb 02 01:59:37 They do after having their app force-closed a few times for being lazy about it Feb 02 01:59:56 i just highly dislike the whole Bundle thing Feb 02 02:00:04 Meh. It's easy enough serialization Feb 02 02:00:15 and the way android saves date Feb 02 02:00:18 If you want pain, you should look into how home screen widgets work Feb 02 02:00:23 lol Feb 02 02:00:43 There's some _real_ fun, where pretty much everything can go away at any time Feb 02 02:00:44 Bundles exist because dumb situations like tanking an activity for no reason, so i just severely hate that Feb 02 02:00:46 emceelovin: Having to use Bundle for Activity arguments is a pain, yeah. Feb 02 02:01:10 i really like that i can have a viewless retained fragment and work inside that as if im making a windows app Feb 02 02:01:14 emceelovin: Bundle is also about your process being killed when running in the background. Feb 02 02:01:14 emceelovin: In theory, your app's activity is going to be spending the majority of it's time just waiting on the user. Feb 02 02:01:14 its really nice. i never touch a Bundle Feb 02 02:01:30 if my process is killed then it is what it is Feb 02 02:01:42 I fail to see how it's a problem for a bit of otherwise quiescent code to tidy up and prepare to rebuild the display because of an orientation change Feb 02 02:01:43 stuff i need to save is on disk etc. itll just reload that Feb 02 02:02:05 emceelovin: If the user comes back after a background kill, data should still be there. Bundle helps with this. Feb 02 02:02:15 Kills can happen quite often. Feb 02 02:02:22 right. i understand they can be merciless Feb 02 02:02:27 ...spesh if you run Pokemon GO Feb 02 02:02:33 im just saying data in the current process, is all i care about Feb 02 02:02:39 current lifetime i should say Feb 02 02:02:55 anything thats valuable will be on disk, and if the process is tanked by the OS, ill just reload that stuff Feb 02 02:03:17 Okay, that's a fine approach in some cases. Feb 02 02:03:30 but other than that, i dont really care if its tanked because theres nothiing that is saved really Feb 02 02:03:33 its a client/server app Feb 02 02:03:37 data mostly comes from the server Feb 02 02:03:56 the only thing im gonna be saving would be messages in the messaging part of the app. other than that, if you take my app out have at it Feb 02 02:03:56 Note that Android uses Bundle under the hood to restore the activities/fragments the user had open. Feb 02 02:04:06 In that situation. Feb 02 02:04:30 youre saying like TextViews etc. that are attached to a fragments view will automatically be repopulated bty android? Feb 02 02:04:38 like when i pass the bundle to super.onCreate in the fragment Feb 02 02:04:49 Under certain conditions, yeah Feb 02 02:04:56 TextViews aren't persisted by default, but a lot of Views are. Feb 02 02:05:04 well i was using that as an example Feb 02 02:05:05 And the stack of open Activities is. Feb 02 02:05:05 DialogFragments drive me nuts at first because of the way they do it Feb 02 02:05:19 lol i had to make a dialog the other day, and i wanted to puke again Feb 02 02:05:27 it just amazes me at how much you have to do to do something so simple Feb 02 02:05:35 You were doing something wrong then Feb 02 02:05:39 i needed an alert dialog, which required a builder, which required a fragment Feb 02 02:05:42 i was like uhhhhh ok Feb 02 02:05:49 There's an easy way to do most of this stuff, and a whole crapton of hard ways to do them Feb 02 02:06:02 just starting out im sure im going through the hard ways Feb 02 02:06:07 I have learned over time that when my code starts looking "hard" I am doing something fundamentally insane Feb 02 02:06:09 Dagmar: Why do you assume he's wrong? What emceelovin is saying sounds pretty accurate to me. Feb 02 02:06:12 ive got a pretty good grip of android, but its still insane Feb 02 02:06:28 its weird how i cant just be like Dialog.show(R.layout.dialog_layout) Feb 02 02:06:30 and call it a day Feb 02 02:06:40 i have to get this builder thing, put it all into a fragment etc. Feb 02 02:07:03 the naming and structure makes me laugh Feb 02 02:07:19 theres adapters everywhere, builders, tons of -ables Feb 02 02:07:31 emceelovin: FWIW, if you use the same resources for portrait/landscape, you could actually disable Activity recreation on screen rotation. Feb 02 02:07:48 i was thinking about that Feb 02 02:07:53 I think that offers a better UX (rotating is much faster, for example). Feb 02 02:07:55 specifying everything in configurationChange in the manifest Feb 02 02:08:00 and just not letting it kill my activity Feb 02 02:08:12 It's also basically necessary at times (when using WebView, for one). Feb 02 02:08:14 because nothing changes in it like you said. everythings reinflated Feb 02 02:08:16 and its like why? Feb 02 02:08:17 just why Feb 02 02:08:25 gotcha Feb 02 02:08:41 because it has to do the layout calculations all over again Feb 02 02:08:56 with how fast phones have gotten, and how much memory we have, i wish android would evole and ditch the whole constant view recreation/reflow of data into a viw Feb 02 02:09:00 and just keep views Feb 02 02:09:11 Dagmar i understand reinflating for a rotation Feb 02 02:09:16 its justified in that case Feb 02 02:09:44 i can understand recycling views in a list, absolutely Feb 02 02:09:57 data structures can have thousands of items Feb 02 02:10:34 if i create a main view and a few fragments, all of their views should never be recreated, or at least if your phone fits a certain spec allow that scenario Feb 02 02:10:54 You can cache them if you like Feb 02 02:11:09 i could youre right Feb 02 02:11:11 and was thinking about it Feb 02 02:11:14 emceelovin: I think Views are quite heavyweight. Holding onto them at whim could be problematic. Feb 02 02:11:23 i just understand that back in the day caused a lifecycle to exist Feb 02 02:11:30 but were in present day, and i think its unnecessary really Feb 02 02:11:43 TacticalJoke are they? i dont know the internals. doesnt seem like theyd be that resource heavy Feb 02 02:11:46 I don't think 2Gb of RAM is so much it can be readily wasted Feb 02 02:12:00 you dont think thats a lot of ram lol? Feb 02 02:12:03 ...and the operational model is that the device is actually pretending to have LOTS of apps "running" Feb 02 02:12:22 i get the paused/started lifecycle. thats fine Feb 02 02:12:32 i just would like to have a true mobile OS Feb 02 02:12:48 but i understand that its all tied to a limited power source Feb 02 02:13:21 but in the case of hgolding onto views, like you said, apps spend most of their time waiting/suspended Feb 02 02:13:28 so thats a ram scenario then Feb 02 02:13:31 When was the last time you had only 2GB RAM on your desktop Feb 02 02:13:53 i never had it honestly. i stopped building computers in 2005 and built my recent one almost 2 years ago which has 16gb lol. Feb 02 02:14:09 Yeah and when they're quiescent they don't need to hang onto all those other views that you're creating for other parts Feb 02 02:14:11 its funny to see now that ram is so much more, apps take advantage of it. which is fine. its there, use it Feb 02 02:14:35 apps now use 100s of megabytes Feb 02 02:15:01 you dont think that, assuming i have enough ram, that it doesnt make sense to hold onto something if you can? Feb 02 02:15:12 and avoid recreating it. which is cpu cycles. which is power usage? Feb 02 02:15:21 RAM is pretty limited on phones Feb 02 02:15:38 that is true, but phone OSs are lightweight compared to say full blown windows. id think 2gb should be enough Feb 02 02:15:48 For single apps run one at a time, sure Feb 02 02:15:54 compared to most cojmputers its not a lot of ram, but 2gb is sitll a lot Feb 02 02:16:44 ...but CPU cycles are quite a bit cheaper than RAM, relatively speaking Feb 02 02:17:01 now that ive been developing for android, i understand the persistant options in most power-apsp Feb 02 02:17:12 i assume thats probably the viewcaching etc. which ill offer in my app Feb 02 02:18:22 Anyone here? Feb 02 02:18:22 What view caching will you do? Feb 02 02:18:22 android is still very interesting under the hood. not my favorite API by far Feb 02 02:18:35 mainly i was just talking about the fragment views Feb 02 02:18:48 since caching of views starts at the highest most view in the hierarchy Feb 02 02:18:54 cache that one and the rest come with it Feb 02 02:19:18 It's often a bad idea to cache Views via static fields. Feb 02 02:19:18 they will go into and out of plcae a lot. i just wanted to cache them/offer an option to Feb 02 02:19:41 like when i load my viewpager, it hits a nice spike before it fully loads on my phone, and my phone is fast Feb 02 02:19:45 which is inside a fragmetn Feb 02 02:19:51 idk if its because im running the debug app or what Feb 02 02:20:05 but it hesitates when its loaded Feb 02 02:20:17 Is it possible to retreive anonymous maps location data without my app being installed? Feb 02 02:20:22 im also on a custom rom too, so idk Feb 02 02:20:28 If there's noticeable lag on a fast phone, I doubt it relates to View creation. Feb 02 02:20:42 Unless you have a crazy number of Views. Feb 02 02:20:43 i have a note 5, so im not sure honestly what the deal is Feb 02 02:20:51 i only have like 4 views in one viewpager, and 2 in another Feb 02 02:20:53 both do the same thing Feb 02 02:20:57 4 fragments that is Feb 02 02:21:48 when i load the fragment that contains the viewpager frmo the navigation pane, the pane doesnt close instantly and it kinda freezes for a few milliseconds before the fragment with the Viewpager is in Feb 02 02:22:15 i have an issue with spinners also. when i click on them they hesitate Feb 02 02:22:22 Are you saying the close-navigation-drawer animation lags? Feb 02 02:22:46 yeah Feb 02 02:22:57 it lags on closing Feb 02 02:23:23 Oh, that's an issue relating to navigation-drawer animations that play at the same time as another animation or anything CPU-intensive. Feb 02 02:23:30 which causes the viewpager fragment to lag opening, so maybe theyre two separate issues and the creation of the viewpager fragment is because of the lag of the navigation drawer closing Feb 02 02:23:43 You can, for example, delay the CPU-intensive thing until the animation has completed. Feb 02 02:24:19 well this is what i have, i have the item selected in the navigation drawer replacing whatever fragment, if any, with the viewpager fragment Feb 02 02:24:25 so can you help me with might be the other animation? Feb 02 02:25:47 when i go to the one viewpager fragment, its almost as if the closing of the drawer has to wait for whatever the current fragment is doing before it can finish Feb 02 02:25:49 which is weird Feb 02 02:26:05 emceelovin: I have to go in a minute. I could probably help tomorrow. Feb 02 02:26:05 because i load like 1000 items into my ListView for test purposes Feb 02 02:26:22 thats fine me too. thanks for the help anyway though. im gonna go bowling and punish my liver. i appreciate it all. have a good night Feb 02 02:26:25 The key thing here is that if you're animating and *doing* at the same time, the animation can easily lag. Feb 02 02:26:33 stupid android Feb 02 02:26:45 Gotta basically do nothing while animating. Feb 02 02:26:47 i wish it was like windows Feb 02 02:26:53 Which might mean not animating at all. Feb 02 02:26:54 no matter what you do, somethings always handling the message loop Feb 02 02:27:08 so you can animate and still have a responsive UI Feb 02 02:27:28 makes sense Feb 02 02:27:45 Yeah. I'm not an expert on animation, but I have had these issues. Feb 02 02:27:46 so is there a way to know when the navigation drawer closes, and THEN create the current fragment? or just leave it the way it is Feb 02 02:27:58 because thats basicallyt whats happening. its trying to slide while creating that fragment Feb 02 02:28:13 I think there's a callback, but I can't easily remember. Feb 02 02:28:15 so it starts to slide, stops, creates the fragment loading 1000 items, and continues to slide closed Feb 02 02:28:25 im gonna find that callback and see what i like better Feb 02 02:28:37 Some people post a message to the UI looper 200ms later (though that's an arbitrary number). Feb 02 02:28:49 looper. another funny word lol Feb 02 02:28:55 message queue makes so much more sense Feb 02 02:29:53 looking at the playstore, it doenst start loading content until its closed, so maybe thats the design choice i should take as well Feb 02 02:30:01 thanks again man. cya later Feb 02 02:30:28 No worries. Ask again later if you want (this is something I had to look at in depth once). Feb 02 02:30:47 I've been doing everything possible to try and programmatically set the colSpan of a child in a gridlayout.. but nothing works Feb 02 02:30:50 anyone have experience with that? Feb 02 02:30:52 I just can't remember the details off hand. Feb 02 02:31:01 offhand* Feb 02 02:37:23 So I have an application structured with a main activity and drawer which upon selection swaps out fragments in the acitivity's container. The main fragment is a news feed which im adding a filtering option. I've added a sub menu group in an overflow menu item to select checkboxes to filter the feed. Feb 02 02:38:08 The issue is, these options become irrelevant on fragments that arent the news feed. Would it be better to show/hide the overflow menu when switching fragments, or implement another way to filter items? Feb 02 02:39:53 I first considered a right side drawer, but there are only a few options so most of that space would go unused. I could also use a FAB but that is an odd solution given that filtering probably isnt considered a main action of the page. Feb 02 02:43:05 fragments have their own action menu which contribute to the activity action menu. Filtering menu option should be in the menu of the fragment they belong to Feb 02 02:44:13 I didn't test fragment swapping + fragment menus but I had a fragment with its own menu options and they were correctly added to the activity menu Feb 02 02:44:23 orbyt_: ^ Feb 02 02:45:37 Synchronizing server-side video download and processing and a custom Android video player in real-time is quite painful Feb 02 02:48:00 Melatonina Are you saying it overrides the options in the main activities toolbar? Feb 02 02:48:14 No, it should contribute to them Feb 02 02:48:33 But I have little experience. Only 1 activity with 1 fragment with its menu Feb 02 02:48:34 The only fragment with relevant menu options is the news feed Feb 02 02:48:51 then put those options in that fragment Feb 02 02:49:33 at least try, if the framework is implemented correctly it should work as you wish Feb 02 02:49:55 I am assuming from your suggestion the menu will only be inflated in the main activity's toolbar when that particular fragment is running? Feb 02 02:50:48 as I said Feb 02 02:50:55 I have little experience. Only 1 activity with 1 fragment with its menu Feb 02 02:51:05 but I expect it to work in that way, yes Feb 02 02:56:04 Swapped the relevant menu code from my activity into the specific fragment and called setHasOptionsMenu(true) in onCreate(), seems to work as expected. Thanks Melatonina Feb 02 02:56:14 :) Feb 02 02:56:31 You are welcome. Happy I could help you **** ENDING LOGGING AT Thu Feb 02 03:00:01 2017