**** BEGIN LOGGING AT Sat Mar 07 02:59:58 2015 Mar 07 03:05:33 CedricBeust here are the relevant bits http://pastebin.com/MfMpjzYS Mar 07 03:06:09 so i have SynchronousQueues for each kind of request/ response Mar 07 03:06:43 THat's a lot of code :) Mar 07 03:06:46 then @112 you see a read operation, which makes this Observable defined @166 that waits on a queue Mar 07 03:06:49 What's "gatt", is it your wrapper? Mar 07 03:06:57 gatt is just BLE talk Mar 07 03:07:24 thats only 10% of the code :| i cut out the state machine, not important for this discussion Mar 07 03:07:30 yikes Mar 07 03:07:55 I like seeing Observables everywhere but beyond that, I can't really comment on this without spending some time on it Mar 07 03:08:04 ah ok Mar 07 03:08:28 well i can condense it down more, i have all the operations ... but really all i need is one since they are all the same Mar 07 03:09:59 so yeah, the question behind all of this is - is there any point trying to match request and response Mar 07 03:10:23 Alright, I need some advice on user experience. So I want to be able to show users a list of "time slots" that they can sign up for... what would be the best way to do that? Once a user signs up for that time slot, no one else can sign up for it. I was thinking maybe like a bar graph or something? I'm not too sure :P Mar 07 03:12:26 g00s: Since there is risk for mismatch, ask yourself: is it worth it? What if you mismatch? (my guess: disaster) Mar 07 03:14:21 g00s: Where's the documentation for what you are trying to use? I don't see any of these classes in the BLE standard doc Mar 07 03:15:38 CedricBeust there really isn't much documentation on the BLE side except for https://developer.android.com/guide/topics/connectivity/bluetooth-le.html Mar 07 03:16:05 Yeah that's what I'm reading Mar 07 03:17:32 so the OEM has a protocol that they are tunneling through BLE characteristics (think, 20 byte buffers). and this requires that I ack/nack, count packets, detect ordering problems, etc. so i have to make a state machine for that (which i use ragel for). but doing all of this async is soooo messy Mar 07 03:17:45 And since it's async, I guess that the ordering of responses is not guaranteed to match that of querying? Mar 07 03:18:12 hmm. well remember - even though the docs don't say, you can'only have 1 in flight at once Mar 07 03:18:12 (actually, it might? Ray of hope?) Mar 07 03:18:18 oh right Mar 07 03:18:23 Then it's trivial Mar 07 03:18:35 The key is the ordering number, right? Mar 07 03:19:08 well for the tunneled protocol yeah i get sequence #s - but for the BLE stuff we are talking about, there is no token you can pass / stuff anywhere Mar 07 03:19:11 If I send 3 queries, the first response is guranteed to be the response for query #1, right? Mar 07 03:19:28 Then you don't even need a token Mar 07 03:19:39 you have to send 1, wait for the other. but the problem is, it may not come :| Mar 07 03:19:42 You maintain a list of pendingQueries, and for each response, you pop Mar 07 03:19:47 Ah Mar 07 03:19:50 Then specify a timeout? Mar 07 03:20:02 Ah but then you're back to square one Mar 07 03:20:07 This is terrible Mar 07 03:20:09 i have a timeout. but what then if it does arrive, after the timeout, and gets associated with the next in queue Mar 07 03:20:21 heh Mar 07 03:20:23 You automatically pop() past the timeout Mar 07 03:20:30 But BT needs to play along with that Mar 07 03:20:37 and not send you a response past the timeout Mar 07 03:20:42 Can you tell the BT stack what your timeout is? Mar 07 03:20:47 i can't make it do that Mar 07 03:20:57 This is BBB Mar 07 03:21:00 Broken Beyond Belief Mar 07 03:21:01 android does whatever ;) Mar 07 03:21:08 How does anyone get anything done with this?! Mar 07 03:21:41 this api has a very bad reputation. nevermind the usability of the API, but it was very broken like - stuff wasn't working. seems like 4.4 stuff kinda works Mar 07 03:22:09 and i still have to write up that bug report about the multithreaded access to mutable objects heh Mar 07 03:23:06 well, what i could do - seems very drastic, is on timeout tear down the connection and restart. that would guarantee not getting late events Mar 07 03:23:55 How expensive is it to tear down and re-init? Mar 07 03:24:24 if there is no service discovery, it takes about 1-2 seconds Mar 07 03:24:45 service discovery is after connection, enumerating all the metadata of the device. but android caches this Mar 07 03:24:47 Ouch Mar 07 03:25:08 Does the stack support batching operations? Mar 07 03:25:27 no, you have to coordinate this yourself. only do one thing at a time Mar 07 03:25:43 Of course. Mar 07 03:26:00 iOS does though. older samsung apis did too Mar 07 03:26:10 before BLE was official in android Mar 07 03:29:00 CedricBeust thanks for thinking about this though, i think you confirmed my suspicion that - its a leaky abstraction and i can't 'fix this' by putting another layer over it very well Mar 07 03:29:31 but i am trying to keep the complexity and ugliness in one spot and not let it go to other parts of the app Mar 07 03:35:03 You know what they say, pig... make up... Mar 07 03:35:34 a story about how great your app is and hope they don't try it in the first 15 minutes? Mar 07 03:58:30 anyone know of a library that can stylize a textview formatted in markdown? and ideally allow for slight modifications to the formatting? or am i going to have to do this from scratch >_> Mar 07 04:06:47 8 - Hellophone] Installing Hellophone.apk...[2015-03-07 04:56:02 - Hellophone] Success[2015-03-07 04:56:02 - Hellophone] /Hellophone/bin/Hellophone.apk installed on device Mar 07 04:06:47 sdo how do i execute it Mar 07 04:07:00 i can see it in managged apps in the emulator Mar 07 04:07:08 sd-gpu2: you need to declare an activity with certain attributes in the AndroidManifest.xml Mar 07 04:07:45 you have to add an intent filter with the MAIN action, and the LAUNCHER category Mar 07 04:08:41 android.intent.action.MAIN and android.intent.category.LAUNCHER Mar 07 04:09:20 and then that will be the activity that will get started when the user clicks on your app's icon in the launcher Mar 07 04:09:21 ok i think the short setup eclipse tutorial is bit outdated since this all was missing ill look into this Mar 07 04:09:37 sd-gpu2: I can't speak to the tutorial, but that's been true since android 1.0 :) Mar 07 04:14:25 ill look into it tomorrow i guess 5am is prehaps not best time to "quickly" setup a development suite Mar 07 04:46:15 Can anyone recommend a good QR code scanner? Mar 07 04:47:26 isn't zxing the popular one ? Mar 07 04:47:53 sounds right Mar 07 04:48:52 interesting https://github.com/reactive-ipc/reactive-ipc-jvm Mar 07 04:50:29 Planning to release by the end of 2015 doesn't exactly inspire confidence. Mar 07 04:50:56 they just announced the project today :D Mar 07 04:51:02 Alright, a little OT here, but I built a website called http://androidbetaapps.com. I offered to help the guy build the website, etc. but it's basically been all me. Basically, I'm kind of looking around seeing if anyone would be interested in helping out, suggestions, anything. Mar 07 04:51:23 g00s: Maybe it's just me but I would never announce a project I start on day one. Sounds ridiculously cocky and unrealistic. Mar 07 04:51:59 CedricBeust i think there are a few projects kinda doing overlapping stuff ; reactive-streams ; spring reactor; rxjava , etc Mar 07 04:52:41 i get the impression its a way to talk about it / share ideas, etc Mar 07 04:54:28 what is the best solution for getting fonts to behave in a static way across multiple devices? Mar 07 04:54:41 g00s, Liking this very much. Thanks! Mar 07 05:12:26 how do i acess an oracle db from an android app Mar 07 05:13:32 and is there anyway that i can have a device pull certain data from the db, only when certain criteria in the DB has been met...what is the best way to do that Mar 07 05:24:17 Where's your Oracle db? Mar 07 05:37:24 Where could I find out QR code text? Mar 07 05:47:26 CedricBeust: what do you mean where is it Mar 07 05:57:00 i have a floating action button, and when i click it a want 2 more to apear above it. wahts the best way to do this? Mar 07 05:58:08 click listener and an animation! Mar 07 06:00:07 JakeWharton: would i add the buttons using setContentView()? sorry i'm kinda a noob to android dev Mar 07 06:00:23 or can i programticly add them above the existing button? Mar 07 06:30:50 Hey guys Mar 07 06:31:03 If I call findFragmentByTag, and have a fragment object Mar 07 06:31:11 then call fragment.onAttach(this) Mar 07 06:31:18 Will that call the onAttach method from the fragment? Mar 07 06:31:57 yes, but don't do that Mar 07 06:32:09 Why? Mar 07 06:32:22 I need a way to get the current instance of a fragment, and call a method from it Mar 07 06:32:38 because you'd be misusing the life cycle event Mar 07 06:32:55 Hm, Ok, Mar 07 06:33:03 So im in the main activity Mar 07 06:33:09 And the main activity has a tab view Mar 07 06:33:19 With 3 different frags Mar 07 06:33:22 call any method you make is ok Mar 07 06:33:50 How can I call that method from outside the fragment? Do I have to create a whole new fragment? Mar 07 06:35:14 The code is being called from MainActivity but the view is on the fragment Mar 07 06:36:12 so call your method Mar 07 06:36:25 onAttach is automatically called when adding fragment in transaction (and i.e. after orientation change) Mar 07 06:36:38 I dont have an instance of the fragment though pfn Mar 07 06:36:49 I tried to make a static method for getting the current instance Mar 07 06:36:56 Didnt work out Mar 07 06:36:57 you mean reference? Mar 07 06:36:59 but you do when you find it Mar 07 06:37:02 yes Mar 07 06:37:25 I do but i cant call methods insdie the fragment and I cant cast it Mar 07 06:37:27 MyFragment fragment = (MyFragment)getFragmentManager().findFragmentByTag(xxx) Mar 07 06:37:32 fragment.something() Mar 07 06:37:47 Right I ttried to dothat but it said it could not be cast Mar 07 06:37:52 how can you not cast it Mar 07 06:38:10 does it extend fragment Mar 07 06:38:14 or probably Mar 07 06:38:21 you are mixing support fragments with fragments Mar 07 06:38:34 Yes, that is it Mar 07 06:39:03 Should I go all support? Mar 07 06:39:30 are you targeting <3.0 devices as well? Mar 07 06:39:40 Yes Mar 07 06:39:43 then yes Mar 07 06:39:47 Ok Mar 07 06:39:52 Thank you Mar 07 06:39:58 I may have another question in a min Mar 07 06:41:14 Ashiren so initially I am creating the Fragment from a FragmentPagerAdapter Mar 07 06:41:30 And I read to add a tag with a fragmentTransaction Mar 07 06:41:34 Would this be correct? Mar 07 06:41:58 http://pastie.org/10006827 Mar 07 06:42:37 fragments made in FragmentPagerAdapter are automatically tagged Mar 07 06:42:56 what is the name of the auto tag? Mar 07 06:43:59 maybe something like https://stackoverflow.com/questions/11976397/android-getting-fragment-that-is-in-fragmentpageradapter Mar 07 06:44:25 android:switcher:ViewPager.getId:position Mar 07 06:45:10 Can I override the default tag with the code I posted above? Mar 07 06:45:52 and where do you post Mar 07 06:46:06 http://pastie.org/10006827 Mar 07 06:46:07 afaik viewpageradapater creates and transacts things automatically Mar 07 06:46:54 So I cannot create my own tags? Mar 07 06:47:55 no Mar 07 06:48:35 Hmm Mar 07 06:49:26 so the auto generated ID i s Mar 07 06:49:42 android:switcher:R.id.viewPager:0 Mar 07 06:49:44 For example? Mar 07 06:50:22 yes Mar 07 06:50:38 although R.id.viewPager would be some 'random' number Mar 07 06:51:01 So how do I get that? Mar 07 06:51:37 findViewByID? Mar 07 06:51:38 thats in the link i posted Mar 07 06:52:13 Yeah but where does that method go ? Mar 07 06:52:48 wherever you want Mar 07 06:53:01 So I would have to pass the info in manually? Mar 07 06:53:08 then you call String tag = makeFragmentName(viewPager.getId(), 0) Mar 07 06:53:47 viewPager.getID() Mar 07 06:53:59 Is that after I findViewByID()? Mar 07 06:54:39 Has anyone here got much experience with AsyncTaskLoaders? I'm populating a dataset using an AsyncTaskLoader and a cursor (not a cursor loader!), and I'm looking for some advice on how to observe changes to the cursor's underlying dataset.. Mar 07 06:56:07 Ashiren http://pastie.org/10006842 Mar 07 06:56:42 drose379: ok Mar 07 06:56:44 does it work Mar 07 06:56:54 Running now Mar 07 06:57:04 But what is android:switcher Mar 07 06:57:10 Just a child of a viewpager? Mar 07 07:17:11 anyone know what happens when you scroll away from a fragment and then back? does it destroy? Mar 07 07:18:54 @drose, what do you mean 'scroll away'? Mar 07 07:19:20 Im in a viewpager with a tab view Mar 07 07:19:33 OK, it depends on your viewPager's offscreenPageLimit Mar 07 07:19:52 I think the default is 2. This means that it will keep up to 2 pages around 'off screen' Mar 07 07:19:55 I need to set it to higher, i dont want my frags to destroy Mar 07 07:20:02 test Mar 07 07:20:06 You can set it via setOffscreenPageLimit Mar 07 07:20:08 Right, it is 2, becasuse if I scroll over 3, my frist frag gets destroied Mar 07 07:20:12 Ok Mar 07 07:20:19 Thank you! Mar 07 07:20:29 NP Mar 07 07:20:52 Ashiren it did not work Mar 07 07:22:29 timusus have you ever grabbed an instance of a fragment? Mar 07 07:22:32 From another activity Mar 07 07:27:52 I don't really understand the question.. Mar 07 07:28:19 I am using a FragmentPagerAdapter to create the fragments Mar 07 07:28:28 OK.. Mar 07 07:28:35 And im in my MainActivity and need to gain access to the current instance of a fragment Mar 07 07:29:11 This sounds like one of those ridiculously complicated questions. Mar 07 07:29:23 Its really not Mar 07 07:29:30 Just need to get an instance of a fragment Mar 07 07:29:55 You can give your fragment a tag and then retrieve it from your Activity's FragmentManager Mar 07 07:30:23 But.. I would recommend you google "get fragment from FragmentPagerAdapter" Mar 07 07:30:25 Right but I guess FragmentPagerAdapter gives the fragment a tag automatically Mar 07 07:31:23 It depends on your implementation of FragmentPagerAdapter Mar 07 07:31:40 I believe there are some examples of how to override this behaviour to make it easier to obtain a reference to your fragment. Mar 07 07:31:40 It does? Mar 07 07:31:47 Hmm Mar 07 07:31:51 Google it ;) Mar 07 07:31:59 When I try to update settings in Android Studio it says "09:29:25 AssertionError: null" Mar 07 07:32:06 using Ubuntu 14.10 Mar 07 07:34:01 actually it only happens with vcs->github Mar 07 07:35:31 See ya guys Mar 07 07:35:59 See ya Mar 07 07:50:15 hello i am trying to build my project using cmd line instead of android studio Mar 07 07:50:20 im in my project root Mar 07 07:50:29 and have gradle installed Mar 07 07:50:44 not sure what command to give with it tho? Mar 07 07:55:23 ./gradlew build Mar 07 07:55:30 or gradlew.bat build Mar 07 08:01:39 JesusFreke: i have gradle that i installed from apt-get, no gradlew script however Mar 07 08:01:53 i do notice that is how its done in the tutorial Mar 07 08:02:09 where is this gradlew typically located? Mar 07 08:06:06 ginseng: in the root of the project Mar 07 08:06:30 it should be checked into the source repository as part of the project (if you're using version control, at least) Mar 07 08:08:51 ok thank you for that Mar 07 08:09:12 i don't seem to have it in my project root Mar 07 08:10:39 can i get it using android sdk manager? Mar 07 08:14:53 how did you create your project? Mar 07 08:15:42 Android Studio should create it when you create a new project Mar 07 08:15:58 If you're using eclipse, well, don't :D Mar 07 08:18:53 yeah the majority of the tutorial seems to be aimed at android studio Mar 07 08:18:56 but im using command line Mar 07 08:19:00 i used: Mar 07 08:19:29 tools/android create project --target --name MyFirstApp --path /MyFirstApp --activity MyActivity --package com.example.myfirstapp Mar 07 08:20:47 gradle-plugin 1.1.3 & rx 1.0.8 :) Mar 07 08:25:48 ginseng: yeah, I don't think that makes a gradle project Mar 07 08:26:58 ginseng: it looks like there might be a -g option for android create project Mar 07 08:26:58 i found gradlew in some subfolder Mar 07 08:27:09 which causes it to create a gradle project Mar 07 08:27:23 oh really Mar 07 08:27:39 okay thank you gonna try that Mar 07 08:27:44 see e.g. http://stackoverflow.com/questions/20801042/how-to-create-android-project-with-gradle-from-command-line Mar 07 08:48:48 wow, sim cards are 25 years old Mar 07 09:29:31 JesusFreke: thx got it to work! Mar 07 10:00:38 whats the dumbest reason there could be if your viewpager doesnt show anything but you don't get an error? case that's probably what I'm doing Mar 07 10:06:16 nevermind Mar 07 10:21:52 My Nexus 4's screen's bottom area uptil ending just above the bottom row of the keyboard i.e. the zxcv.. row. Is there any xposed module to reduce the screen size? make it end just above the non-responsive area? Mar 07 10:23:41 WantToCode try #android-root for that Mar 07 10:23:54 Thanks! Mar 07 10:24:04 np Mar 07 10:58:34 JesusFreke: Thanks, nice link. Mar 07 11:13:16 i have small sets of images i want to display, anyone know of any views (3rd party or otherwise) that i could use for this purpose? i googled it and got hits about using viewpagers etc to do it but that seems a bit heavy Mar 07 11:18:20 has Google gone away from menu button in soft key bar? Mar 07 11:18:45 yes Mar 07 11:18:49 very much so Mar 07 11:19:32 hmm.. I want Lollipop on my Z3C then so I can root and force the menu key there for all apps :P Mar 07 11:19:59 no, you don't Mar 07 11:20:15 too much of a stretch of fingers to reach top corners Mar 07 11:20:17 Hi guys, SyndAdapter is pretty well documented. But the actual transfer progress is not. What would you use, for syncing of media files from a remote server? Everything I can find is json, or pure txt data. Mar 07 11:20:49 Quacked, why don't you simply turn your device upside-down? Mar 07 11:21:20 hehe.. what? Mar 07 11:21:23 Leeds: what vim plugins do you use for your android dev? another guy here pointed out you were a vimmer too Mar 07 11:21:32 ah, none, to be honest :) Mar 07 11:21:41 Leeds: legit bro haha Mar 07 11:22:05 Leeds: was hopinf you would be able to help me sort an issue im having with eclim but all good! Mar 07 11:23:29 Leeds: out of interest, how do you have your folder structure set out? toplevel & app dir or more older style structure? Mar 07 11:23:51 I'm very old-fashioned Mar 07 11:25:18 yus, im not the only one haha Mar 07 11:50:27 morning happy people Mar 07 11:54:40 Hello folks! Mar 07 11:55:43 I am facing some real issues here in order to boot an emulator on Elipse+SDK in a Mac running Yosemite. Process gets unresponsive. Any help please? Mar 07 11:58:19 Hi, i have a question, i would like to switch from ActionBar to Toolbar, but i am using a fadeOnScroll library for AB, is it possible to do this with Toolbar ? Mar 07 12:01:11 I have a MainActivity viewpager with fragments and in one of them I launch a SherlockDialogFragment. When I suspend the app and resume, I have ifs in onResume() in MainActivity that gets current item from viewpager. But if the SherlockDialogFragment is active on resume, it will still say that current item is the fragment. Suggestions on how to prevent that? Mar 07 13:01:51 hi Mar 07 13:05:47 hi =) Mar 07 13:08:49 What are Dialogs actually? A transparent Activity that wraps a layout? Mar 07 13:21:49 https://gist.github.com/Moter8/c94c27cb7ca291fae402 Hmm, I wonder why I get an error? Mar 07 13:22:07 Why cant I assign the intent inside the case? Mar 07 13:22:46 you probably need a default case Mar 07 13:23:04 im using android with viewpager and FragmentStatePagerAdapter , i have created a classe which select from the database and i send it to the adapter , the problem is some times it doesnt send it to the adapter. i guess the data isnt selected before the fragment is created. how can i select before fragment is created ? Mar 07 13:24:37 memorion, <33 i love you Mar 07 13:24:46 Moter8: You're also missing 'break;'. Mar 07 13:25:00 Those matter? Mar 07 13:25:14 Srsly? Mar 07 13:25:48 in onOptionsItemSelected switch'es it never mattered I think Mar 07 13:25:50 unless you return in the case you need them Mar 07 13:26:04 Moter8: You really need to learn Java. Mar 07 13:26:11 oh :D Mar 07 13:26:39 so a return implies break Mar 07 13:27:08 yay. Mar 07 13:27:16 without the breaks it opened the default Mar 07 13:29:21 if you'd switch on an enum the compiler would know if every possible case is covered and you wouldn't need the default, I think Mar 07 13:31:09 oh righteo Mar 07 13:35:47 https://gist.github.com/Moter8/e7ff2cea2eed1574f5d2 Mar 07 13:36:01 But now I dont know how to get these things inside the switch case Mar 07 13:36:15 See file 3 on a similar thing i have working Mar 07 13:37:17 hey guys anyone done encoding with the MediaCodec recently? Mar 07 13:37:19 oh I think i have it Mar 07 13:37:21 hmm, try writing "case" before SINGLE_CATEGORY Mar 07 13:37:22 :P Mar 07 13:38:13 nah that wasnt the error Mar 07 13:38:52 ah you mean the parameter? Mar 07 13:39:30 yeah^^ see https://gist.github.com/Moter8/edfa59382caecb39b06a Mar 07 13:39:39 that seems to work. But it's still complaining about intent. Mar 07 13:41:47 It hasn't been assigned. Mar 07 13:42:14 hm sorry, apparently the compiler doesn't see that you covered every enum :/ Mar 07 13:42:31 The compiler needs 'default' for that, I think. Mar 07 13:42:39 Yeah, arguably the compiler should be able to see this. Mar 07 13:43:08 Error:(103, 23) error: variable intent might not have been initialized Mar 07 13:43:17 Meh, a default case doesnt hurt Mar 07 13:43:29 yeah, you still need a default sorry for that :/ Mar 07 13:43:40 np, I like enums more Mar 07 13:44:02 It's still better to use enums here. Mar 07 13:44:13 This is what enums are made for. Mar 07 13:44:44 apparently the compiler doesn't accept it because you could compile the switch change the enum, recompile only the enum part and now it fails Mar 07 13:45:36 Why are you still using GameModeConstants? Enums don't have to be inside a class. Mar 07 13:47:05 Note that that code can be simplified a lot: http://pastebin.com/Y2ApZECU Mar 07 13:47:09 In fact, you can probably go even further. Mar 07 13:47:35 I'd go further and extract a "getIntent" kinda method. Mar 07 13:47:43 hey, what frameworks/languages i have as an option in addition to java regarding android development? must support gui development Mar 07 13:47:44 Then just "startActivity(getIntent(gameMode));". Mar 07 13:48:51 so far kivy and corona look promising Mar 07 13:48:53 you could put the getIntent inside the enum even Mar 07 13:48:57 I think Mar 07 13:49:04 TacticalJoke, Im not following Mar 07 13:49:42 isnt what you posted the exact same thing as mine? Mar 07 13:49:48 but without curly braces Mar 07 13:49:57 Moter8: Dude, half the time I think you're trolling. Mar 07 13:50:02 What no Mar 07 13:50:04 It's weird. It's like you're asking for help while making absurd statements. Mar 07 13:50:41 the other three cases' destination activites are not created yet Mar 07 13:50:48 that's why 3 are LoginActivity.class Mar 07 13:51:05 Okay. Never mind then. Mar 07 13:52:06 dont jump to conclusing that fast, heh Mar 07 13:52:12 conclusions Mar 07 13:54:19 And now it says default cases' intent is never used :D Mar 07 13:55:38 you could do it like this I believe to simplify your activity https://gist.github.com/Memorion/8a5cae872c48496e891a Mar 07 13:56:38 probably should set the flags inside the getIntent method even Mar 07 13:56:41 Ah yeah Mar 07 13:56:48 Also, i cratched the flags Mar 07 13:56:52 scratched Mar 07 13:57:12 But how do you have a class inside an enum? Mar 07 13:57:19 (that is legal?) Mar 07 13:57:45 you mean the static method? Mar 07 13:57:54 public static Intent getIntent(GameMode gameMode) Mar 07 13:57:59 line 15 Mar 07 13:58:10 yeah, that's a method and is legal in java Mar 07 13:58:19 oh not class, woops Mar 07 14:22:33 q: when I do !mvn package , everything is ok. And project is compiled correctly. But when I run it on device, I see in logcat Didn't find class "android.support.v4.widget.DrawerLayout" Mar 07 14:22:40 how is this possible ? Mar 07 14:27:27 i need noob help with an object http://pastebin.com/7nfd9Mwf Mar 07 14:29:25 your Stats object is only definded in onCreate so you can't use it in onClick unless you define it in the Activity Mar 07 14:32:04 aah. i guess i misunderstood a bit when someone said you cant run code in the class body Mar 07 14:38:31 hmph Mar 07 14:44:19 Old black-and-white films are so boring. Mar 07 14:46:43 3 months google play all access for 3$ for new subscribers: https://play.google.com/music/listen?signup=1&coupontype=vanity&coupon=PLAY3 in case anyone is interested Mar 07 15:08:29 can someone help I keep getting an IllegalStateException on line 84 Mar 07 15:08:30 http://pastebin.com/LzZ2aYkV Mar 07 15:19:04 TacticalJoke: how about new black and white films? Mar 07 15:35:15 x29a: Which ones? Mar 07 15:35:25 I don't think I've heard of a recent one (though I mainly watch mainstream movies). Mar 07 15:39:45 Is something like this sensible? try { decodeBitmapWithSuitableSampleSize(); } catch (OutOfMemoryError e) { decodeBitmapWithWayHigherSampleSize(); } Mar 07 15:40:09 Maybe the last one could have this: catch (OutOfMemoryError e) { justUseWebView(); } Mar 07 15:41:25 Or is that crazy? Mar 07 15:45:56 TacticalJoke: sin city? Mar 07 15:46:58 Ah, haven't seen that. Mar 07 15:59:51 Hi ! For an android 4.3 target, I did an app service (derived from NotificationListenerService) to catch all notifications. Tested with an incoming sms, the notification shows the debugger show that onNotificationPosted isn't called ! Mar 07 16:00:22 But can I really catch every notifications ? Or just mine ? Mar 07 16:00:59 Sup TacticalJoke Mar 07 16:01:13 PS : the notification but the debugger show that onNotificationPosted isn't called ! Mar 07 16:43:17 Guys im trying to grab an element inside the layout for a fragment Mar 07 16:43:48 But it keeps giving me NullPointerException, when i know it is not null Mar 07 16:44:19 ViewGroup layout = (ViewGroup) getView(); Mar 07 16:44:19 ProgressWheel spinnerAnimation = (ProgressWheel) getView().findViewById(R.id.spinnerAnimation); Mar 07 16:44:46 Anyone have any idea why Mar 07 16:47:56 um... are you sure the first line is returning the ViewGroup? Mar 07 16:48:13 Well why wouldnt it? Mar 07 16:48:28 Doesnt getView() in a fragment return the view Mar 07 16:49:34 I'd check if I were you... Mar 07 16:50:36 hey guys, having issues with repo, error code is "fatal: cannot obtain manifest" regardless what url I try. any tips? Mar 07 16:50:52 ident rassawyer Mar 07 16:50:58 oops lol Mar 07 16:51:02 Hi ! Can I cancel another application's Notification (to get rid of its of that anoying app) with my own app ? Do I need a permission ? Mar 07 16:52:24 Ok Leeds so I guess they layout is null... Mar 07 16:52:35 Why would that be though, im in the middle of a fragment Mar 07 16:52:58 that one I can't help you with - still successfully avoided Fragments Mar 07 16:53:16 Oh how come? Mar 07 16:54:07 never found the need to use them :) Mar 07 16:56:32 wait, I'm on android-dev, this is for app development, not roms, isn't it? Mar 07 16:57:50 eeyup Mar 07 16:58:05 Ashiren have you ever seen the problem Im having before? Mar 07 16:58:19 getView is returning null inside a fragment Mar 07 16:58:19 dunno Mar 07 16:58:28 did you override it Mar 07 16:58:37 no Mar 07 16:59:03 calling it before the layout is rendered, maybe? Mar 07 16:59:17 Its after onCreateView() Mar 07 16:59:30 Wait, nevermind. I may have found the problem Mar 07 16:59:39 i dont know i never use getView() Mar 07 16:59:46 How come? Mar 07 16:59:54 You never change the views in your fragment Mar 07 16:59:59 (s) Mar 07 17:00:13 i do everything in onCreateView, and get the references from there Mar 07 17:00:29 just like from activity's onCreate in the past Mar 07 17:00:29 Prob what im gonna end up doing Mar 07 17:01:18 Thats the best way im finding out Mar 07 17:01:42 Is there a list of the methods that get called when starting a fragment in order? Mar 07 17:01:50 Like onCreate,onAttach,onCreateView() Mar 07 17:02:03 http://developer.android.com/images/fragment_lifecycle.png Mar 07 17:02:17 Thanks Mar 07 17:02:38 So i was calling the method that uses the views in onCreate Mar 07 17:02:47 And I was getting null because the view hadnt been infalted yetr Mar 07 17:02:49 yet* Mar 07 17:04:54 Thanks guy Mar 07 17:04:58 guys* Mar 07 17:58:32 Hey people, who remembers what a star/asterisk means when referencing a resource Mar 07 17:59:45 Napalm, http://stackoverflow.com/questions/15650376/what-is-the-meaning-of-the-asterisk-when-referring-to-android-xml-resources <- that? Mar 07 18:00:32 yep, i did search but couldnt find crap Mar 07 18:00:34 thanks matey Mar 07 18:00:40 Looks like its not what I hoped it was Mar 07 18:01:35 Napalm, search terms were: asterisk resource android i'm guessing you cleaned up the question before asking here. :) Mar 07 18:01:53 fucking crap shit Mar 07 18:01:56 heh Mar 07 18:02:00 why does android have to annoy me Mar 07 18:02:16 I have a shape resource that I want to use a color attribute from the theme Mar 07 18:02:30 however it crashes the app if I use a attribute reference in android:color Mar 07 18:02:35 on APIv15 Mar 07 18:02:41 where-as it works fine on APIv21 Mar 07 18:02:43 grrr Mar 07 18:03:08 probably because that attribute doesn't exist on older androids. Mar 07 18:03:13 you ARE using system stuff. Mar 07 18:03:24 nope Mar 07 18:03:31 its my own attribute Mar 07 18:03:38 i also tried a system one on apiv15 Mar 07 18:03:40 and still no luck Mar 07 18:06:08 *shrug* Mar 07 18:13:52 how do i handle an implicit intent ("share URL") without any UI popping up (even briefly) or defocusing the current foreground application? Mar 07 18:14:22 the only thing i've seen along these lines is linkbubble Mar 07 18:14:37 Is there standard action bar icon for settings? Mar 07 18:19:25 dcorbin_, yep Mar 07 18:19:31 ic_action_settings Mar 07 18:20:16 https://github.com/google/material-design-icons/ Mar 07 18:46:43 I'm having to allocate a potentially large amount of memory, and I've realised that I can simplify the whole guessing-game thing by looking at an HTTP response's Content-Length value. But how much can I trust an arbitrary HTTP server to give me the right value? Mar 07 18:47:02 I'll do sanity checking, but I wonder how I can assume it's correct. Mar 07 18:47:45 how much* Mar 07 18:48:20 I guess the only real risk is purposely malicious HTTP server. In my experience with HTTP, the response headers are usually accurate. Mar 07 18:50:26 quiick question: if i call findViewById(R.id.foo) on the view that is R.id.foo, will it return itself? Mar 07 18:51:40 The documentation says this: "Look for a child view with the given id. If this view has the given id, return this view." Mar 07 18:55:07 zzxx: Also, the code makes it clear: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/view/ViewGroup.java#3560 Mar 07 18:55:30 (That's called from View.findViewById.) Mar 07 18:55:59 TacticalJoke: Ah great. it does. thanks Mar 07 19:08:20 Hmm, is it sensible to subclass ByteArrayOutputStream, override toByteArray, and access 'buf' directly? Mar 07 19:08:33 'buf' is protected (so it's not some crazy reflection thing). Mar 07 19:09:01 I mean with regard to potential future breaking changes in ByteArrayOutputStream. Mar 07 19:12:51 how long should your main activities oncreate take? I mean what's an "okay" duration? Mar 07 19:13:40 oncreate? as soon as possible Mar 07 19:13:56 unnoticeable to user Mar 07 19:14:00 Someone was talking about 30ms the other week. (Or I could be misremembering.) Mar 07 19:14:07 What are you doing in there, memorion? Mar 07 19:14:11 Just curious. Mar 07 19:14:32 TacticalJoke, um... it sounds like you're trying to do something very strange with that BAOS Mar 07 19:14:39 currently instantiating a viewpager with fragments with a recyclerview inside Mar 07 19:14:48 Mavrik: Just trying to avoid the extra allocation (by returning 'buf' rather than a copy of 'buf'). Mar 07 19:16:37 hrmf Mar 07 19:17:31 I see real results by doing this (way fewer GC_FOR_ALLOC events). Mar 07 19:17:45 TacticalJoke, I'd probably rather grab BAOS source and modify it Mar 07 19:17:48 instead of subclassing it Mar 07 19:17:52 Yeah, was thinking of it. Mar 07 19:17:53 just to avoid breakage Mar 07 19:18:06 or even just roll my own if it's a trivial use case Mar 07 19:18:21 my onCreate currently takes about 60-100ms but it doesn't seem particularly slow in the sense that it doesn't feel unresponsive Mar 07 19:19:06 what are you doing in onCreate? can you put it in an async task? Mar 07 19:19:10 memorion: Hmm, that sounds a little high to me. Are you doing something really intense in there? (I can't see how instantiating a ViewPager and other GUI-y stuff could take that long.) Mar 07 19:19:42 My app could read several large files in onCreate and probably finish in under 100ms. Mar 07 19:21:07 currently I'm finding the ids of the viewpager and a tabthingy for the viewpager, and setting the adapters for the viewpager and the recyclerview inside each viewpager page, I'm pretty sure only 2 get instanciated in onCreate to smoothly scroll to the next one Mar 07 19:23:03 memorion: How are you measuring the 60ms-100ms thing? Mar 07 19:24:42 TacticalJoke with https://github.com/JakeWharton/hugo on the onCreate, not sure how accurate that is Mar 07 19:24:56 it's a diff of System.nanoTime() Mar 07 19:25:09 the length measuring is accurate Mar 07 19:25:14 accurate enough Mar 07 19:25:33 thanks! Mar 07 19:26:04 currently AS doesn't warn me that I'm doing too much stuff on the UI thread so there has to be some kind of limit somewhere? Mar 07 19:26:52 wow that's a nice logging library, going to try that out Mar 07 19:26:57 LogCat warns when a large number of frames are skipped (I forget the number). Mar 07 19:27:12 Or "a large enough number". Mar 07 19:27:39 http://developer.android.com/training/articles/perf-anr.html says "Generally, 100 to 200ms is the threshold beyond which users will perceive slowness in an application." so I guess I'm ok for now Mar 07 19:36:09 Ohoh, my code is indented by 48lines || 12 tabs Mar 07 19:42:26 Sounds like a candidate for extra method/class/whatever. Mar 07 19:42:34 extract* Mar 07 19:43:29 Though 'extra' also works. Mar 07 19:43:40 memorion: yes, you should try to avoid doing heavy processing, disk io and/or networking on the main thread Mar 07 19:44:30 Hmm, guess I'm gonna have to roll my own ByteArrayOutputStream. I hate doing that, though, because then I end up feeling compelled to write a gazillion unit tests. ;| Mar 07 19:44:35 JesusFreke I'm not doing any of these, just the layout stuff with dummy data from a String array Mar 07 19:51:15 Does anyone know -- do web browsers generally trust HTTP servers' Content-Length values? Mar 07 19:52:01 Hmm, I guess that would violate the "Be liberal in what you accept" thing. Mar 07 19:52:18 um Mar 07 19:52:51 TacticalJoke: you have to trust it for connection re-use Mar 07 19:53:01 Ah, okay. Mar 07 19:53:25 TacticalJoke: are you tactical joke from twitter? Mar 07 19:53:38 mrfu: Didn't you ask that yesterday? No, I'm not. Mar 07 19:56:25 TacticalJoke, I asked that Mar 07 19:56:26 lol Mar 07 19:56:34 how expensive is getting something from sharedpreferences? Mar 07 19:56:50 Moter8: I know, but he also kinda tagged onto your question. Mar 07 19:57:29 memorion: From what I've seen, it's not necessarily lightning-fast on first read. (Subsequent reads avoid disk access, though, I think.) Mar 07 19:58:27 memorion: It can be hard to avoid reading SharedPreferences on the main thread. It might be a necessary evil in some cases. Mar 07 19:58:36 But it's a one-time cost. Mar 07 19:59:34 TacticalJoke how do apps which let you choose all the colors yourself etc do it then? Mar 07 20:00:35 That's what I mean -- it's hard to avoid it in some cases. Mar 07 20:01:33 ok, thanks Mar 07 20:03:14 I guess one idea is to avoid storing loads of stuff in SharedPreferences. I haven't tried measuring the access speed for different file sizes here, though. Mar 07 20:04:26 !@§#§ emulator Mar 07 20:04:45 You want to start an app? Nope! I dont exist! Mar 07 20:04:49 currently I only have an option for the tab titles for my viewpager Mar 07 20:05:14 can't measure any differences in the onCreate Mar 07 20:12:34 TacticalJoke: Don’t overthink it, it’s unlikely you’ll ever see SharedPreferences access at the top of a profiler dump. It’s also heavily cached once read Mar 07 20:15:00 cbeust_, he wasnt the one who was asking :p Mar 07 20:15:17 https://gist.github.com/Moter8/c6076de055613ca51b90 Is there a way to make this cleaner? Mar 07 20:15:34 (it works as it is now) Mar 07 20:16:09 http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#endsWith(java.lang.String) Mar 07 20:16:41 gahh! thanks Mar 07 20:16:46 Moter8: use endsWith()? Mar 07 20:16:52 I tried with AS' autocomplete but that didnt show up Mar 07 20:16:53 also, trim just in case Mar 07 20:16:59 yeah will do Mar 07 20:23:42 meh these methods seem incomplete Mar 07 20:24:47 there is stuff like endsWith() but there is no "easy" toUppercase for a single char Mar 07 20:24:50 eh im probably dumb Mar 07 20:25:24 Character.toUpperCase. Mar 07 20:25:42 yeah I realized char prob has that Mar 07 20:25:56 But then I have to split the string up and join them together later Mar 07 20:26:41 If you're doing dedicated text parsing, create a new class for it. Mar 07 20:27:29 forcing the 1st char to be Uppercase and the last char to be ? is the only goal Mar 07 20:27:58 Not tooo dedicated :D Mar 07 20:28:08 String output = GrammarCorrector.correct(input); Mar 07 20:28:10 I'd definitely do that. Mar 07 20:28:20 Easy to unit-test. Mar 07 20:28:49 I dont even know how to do tests :/ Mar 07 20:28:55 It's also extensible. Maybe later you want to correct their comma misuse, too. Mar 07 20:29:05 I will look into making another class Mar 07 20:29:53 The tests could look like this: assertThat(GrammarCorrector.correct("this is a sentence")).isEqualTo("This is a sentence."); Mar 07 20:30:47 (Some people don't like static methods there, but personally I love them.) Mar 07 20:30:53 does anyone know how to use https://plus.google.com/+ChristianGollner/posts/badausxo1J6 ? I get an error trying to use it in the preferences.xml Mar 07 20:31:07 In my main Acitivity, how can I distinguish bettween a) launch of the app, b) return to the app after having presseed Home, and c) returning to the activity from another activity in my app. Mar 07 20:31:08 Some would prefer something like this: String output = new GrammarCorrector(input).correct(); Mar 07 20:31:23 static utility methods are the best! Mar 07 20:31:53 But they make for harder unit-testing. Mar 07 20:33:18 dcorbin_: You mean when using something like Mockito? Mar 07 20:34:15 there really should be a v7.support.preference fragment or something, which uses the switchcompat Mar 07 20:35:14 memorion: I quite like utility methods (in some cases), though I much prefer specific naming to "Utils" naming. Like, I'd much rather have UrlAnalyzer.analyze than UrlUtils.analyzeUrl or something. Mar 07 20:36:00 TacticalJoke: in that you can't mock their complex behaviors. Mar 07 20:37:54 Yeah, that can be annoying. Mar 07 20:38:06 TacticalJoke “There are only two hard things in Computer Science: cache invalidation and naming things” Mar 07 20:38:21 and off-by-one errors. Mar 07 20:38:44 yeah, remember when google forgot december? Mar 07 20:39:32 don't want to ask 2 ask so I'm going to just ask. I have been trying to use a master/detail layout kind of thing and reading docs/trying things and I am stuck. So simple starting question: Mar 07 20:39:41 Where do I add the items to my list: ListActivity or ListFragment ? Mar 07 20:39:56 yes Mar 07 20:40:22 Both? Mar 07 20:40:35 a little joke of mine Mar 07 20:40:57 :( Mar 07 20:41:24 I think i was sort of getting the idea that the ListFragment was like a visualization(view) for a single item within the list Mar 07 20:42:02 Doesn't the fragment contain the ListView? Mar 07 20:42:48 Never mind -- you said ListFragment. (lol) Mar 07 20:42:50 My brain is asleep. Mar 07 20:43:24 no, is that the problem? Mar 07 20:43:29 It made two different things: Mar 07 20:43:48 activity_singletagview_list and the same thing with an sw600dpso I think it's one small screen one large screen Mar 07 20:44:06 which i interpret it does because the list hides on a small screen, but stays more like a two pane view on big screens Mar 07 20:44:33 so each one of those two things I jus said has in it: (excusing the typos) Mar 07 20:44:36 sup, looking for coder who could create a client for this http://code.kryo.se/iodine server. pls write desired $ and approx time needed to pm Mar 07 20:44:36 ut there's no 'items' Mar 07 20:44:50 I think that's right though, i get my items from a database, so I need to add my items to list_content ................ ? Mar 07 20:45:51 CanyonMan: I'm confused -- is ListFragment your own creation or is it android.app.ListFragment? Mar 07 20:46:00 I'd assume the latter, but you were also talking about ListActivity. Mar 07 20:46:01 It's something of theirs. Mar 07 20:46:34 I did: New, Activity, Master/Detail Flow Mar 07 20:46:44 it did what it does, generated a buttload of stuff :) Mar 07 20:47:24 If you're using ListFragment, you're not gonna be using ListActivity at all, right? Mar 07 20:48:03 I think that's kind of the outer activity that contains all this, because from my MainActivity when the guy clicks "Browse the stuff" it sends him to this whole master/detail panel Mar 07 20:49:08 That part of android ... intents, going from place to place / activity to activity has been pretty nice, I mean in 24 hrs I can basically make a functional navigable app :) Mar 07 20:49:25 navigable? haha Mar 07 20:49:26 that's from 20+ years of experience, and a zero starting point on android itself Mar 07 20:49:43 yeah i mean going from screen to screen, swiping, launching intents, waiting for responses, that sort of thing Mar 07 20:49:50 Ah thats what you mean Mar 07 20:49:53 Yeah, the intent system is pretty nifty Mar 07 20:49:58 yeah Mar 07 20:49:59 http://i.imgur.com/c7M8M6F.png this is switch looks so bad and weird with the supportlibrary :( Mar 07 20:50:08 Starting external activities is great. Mar 07 20:50:12 e.g., the YouTube app. Mar 07 20:50:20 Just if these compatibility crap wouldnt exist... Mar 07 20:50:24 but like when i first learned java when awt was the new hotness, awt made me hate guis Mar 07 20:50:31 it set me up to hate gui design for 20 years Mar 07 20:50:36 when swing came out I thought this should be better Mar 07 20:50:39 it made me hate it worse Mar 07 20:50:57 Most GUI frameworks turn people into sad pandas. Android is not bad here, IMO. Mar 07 20:50:58 Well, doing gui in android is its own sort of painful :) Mar 07 20:51:01 TacticalJoke, https://gist.github.com/Moter8/d7167cf1ec3b6a24e0cc half-way works now :D Mar 07 20:51:11 Android's layouts are more sane ... but my brain still isn't really that equipped for this. Mar 07 20:51:14 except that answers get ?'s too Mar 07 20:51:44 I just noticed the 3rd argument to new ArrayAdapter<>() and I'm wondering if I need to understand where it's putting my item content Mar 07 20:51:55 crap, changng it to android.r.id.title didn't help :( Mar 07 20:51:57 Moter8: Better to use StringBuilder. Mar 07 20:52:06 now c# though. doing GUIs in that wasn't too bad. Mar 07 20:52:49 CanyonMan, you really really need to go read a basic tutorial about how a ListView works Mar 07 20:53:02 because your questions/issues show that you need to learn basics :/ Mar 07 20:53:43 OK I'm with you. I'm tryign to run before I can walk, and if I build a more solid foundation of understanding of ListView, then it'll perhaps make it more sense to me when I go to try to put all that together into a full blown master/detail Mar 07 20:54:08 I will take that advice with appreciation, reading ..... Mar 07 20:54:26 yeah, listview is fairly complicated Mar 07 20:55:02 http://developer.android.com/guide/topics/ui/layout/listview.html :) Mar 07 20:55:16 shouldn't you use recyclerview now? Mar 07 20:55:18 Yeah, it's complicated but it's by far the most commonly used and important UI element Mar 07 20:55:23 yea Mar 07 20:55:53 memorion, it works the same way and it's not as well documented Mar 07 20:56:20 I have activity A. It starts activitiy B. if press "back", things go like I expect. But if I press the navigation button on the action bar, it destroys A and then recreates it. I don't want that. Mar 07 20:56:23 Moter8: StringBuilder is a mutable String. Mar 07 20:56:26 Suggestions? Mar 07 20:56:32 I got the recyclerview sample working almost immetiately and it's more flexible Mar 07 20:56:36 sec Mar 07 20:56:41 CanyonMan, I think this is a more relevant description: http://developer.android.com/guide/topics/ui/declaring-layout.html#AdapterViews Mar 07 20:56:50 dcorbin_: launchMode="singleTop" for activity A fixes that. Mar 07 20:56:55 basically those are views where an Adapter provides data Mar 07 20:57:00 and look/layout Mar 07 20:57:36 memorion, it's also significantly more complicated and requires more boilerplating for basic usecase. Mar 07 20:57:45 memorion, all a terrible properties for something to give to a beginner. Mar 07 20:58:03 you don't get additional test score points for following a cargo cult. Mar 07 20:58:19 TacticalJoke, Oh I just read what mutable means, seems nice Mar 07 20:58:57 TacticalJoke: thanks Mar 07 20:59:44 I don't want to force it on anyone but I thought it's pretty much the same you just need a LayoutManager and people in talks always complain about listviews Mar 07 21:00:17 dcorbin_, or you can use a proper intent flag when handling the home button Mar 07 21:00:27 dcorbin_, so you don't have to change the whole launch mode behaviour of activity A Mar 07 21:00:40 Mavrik: That doesn't apply if he's using android:parentActivityName, though, right? Mar 07 21:01:15 yeah, but that's broken across different API levels in so many ways I wouldn't use it -_- Mar 07 21:02:32 Mavrik: can you point me at documentation that would better explain these concepts? Mar 07 21:02:49 FWIW, this talks about setting launch mode as well as setting Intent flags: http://developer.android.com/training/implementing-navigation/ancestral.html#NavigateUp Mar 07 21:03:06 dcorbin_, which concepts exactly? :) Mar 07 21:03:42 dcorbin_, this perhaps? http://developer.android.com/guide/components/tasks-and-back-stack.html Mar 07 21:03:57 you're looking for FLAG_ACTIVITY_CLEAR_TOP Mar 07 21:04:01 Possibly. Thanks. Mar 07 21:05:11 Mavrik: Why is that better than setting launchMode="singleTop"? Mar 07 21:05:19 singleTop is a pretty run-of-the-mill launchMode. Mar 07 21:05:22 hey guys Mar 07 21:05:51 i have one question. I have this video file in my res folder its like 300mb but it fails to copy it on the device.. what could be the problem Mar 07 21:06:17 TacticalJoke, those aren't comparable and don't do the same things. Mar 07 21:06:22 One changes global task behaviour of the activity. Mar 07 21:06:29 Other changes the behaviour of a single transition. Mar 07 21:06:49 While for you that might be interchangable, it often isn't. Mar 07 21:07:26 pentarex, the fact that your APK is too large to be stashed on cache/internal storage when installing Mar 07 21:07:39 pentarex, and that your app is never going to be published due to 50MB APK limit on play store Mar 07 21:07:46 what are you trying to do? Mar 07 21:07:52 And why do you even have a 300MB video file? O.o Mar 07 21:08:01 if you wrote a brand new app without any obligations to anyone how would you implement your settings? Mar 07 21:08:23 Mavrik well i have this video file... its for testing purposes... the apk will not be released for now on the play store Mar 07 21:08:30 how I can bypass that? Mar 07 21:08:38 pentarex, don't put he video in the APK Mar 07 21:08:49 OK I'm starting to get pieces of this. simple_list_item_single_choice is a "standard layout" that's like from a library of android layouts in the sdk. And 'text1' is the name of the text field inside that layout. Mar 07 21:08:51 because devices don't have space on storage for them. Mar 07 21:09:03 memorion, that's a very general question :) Mar 07 21:09:06 the preferencefragment is nice but I can't seem to figure out how to use the switchcompatpreference with it Mar 07 21:09:07 Mavrik ok and how i can proceed then Mar 07 21:09:24 how to access it from external folder Mar 07 21:09:54 Mavrik yeah I'm having trouble with the "up" button and want to use https://plus.google.com/+ChristianGollner/posts/badausxo1J6 do I need to roll my own implementation? Mar 07 21:09:58 pentarex, http://developer.android.com/guide/topics/data/data-storage.html#filesExternal Mar 07 21:10:05 Mavrik thanks Mar 07 21:20:17 Is there any material spec for how much screen space a master and detail view should each get in landscape/portrait? Mar 07 21:28:08 Mavrik u here mate? one last question Mar 07 21:28:20 exit Mar 07 21:28:25 ive copied the file to Downloads Mar 07 21:28:28 negative, ghost rider! The pattern is full! Mar 07 21:28:30 File videoFile = new File(Environment.getExternalStoragePublicDirectory((Environment.DIRECTORY_DOWNLOADS)) Mar 07 21:28:44 and i am accessing it like this and the file name Mar 07 21:28:54 File videoFile = new File(Environment.getExternalStoragePublicDirectory((Environment.DIRECTORY_DOWNLOADS), "sample.mp4"); Mar 07 21:29:11 Mavrik: so, when I press the "left-point navigation button" on the action bar, is that creatinga third activity on the stack? Mar 07 21:29:40 the dir which is returned is that one /storage/emulated/0/Download/sample.mp4 Mar 07 21:29:44 i think is not correct Mar 07 21:29:51 how to access the real Download folder Mar 07 21:30:11 pentarex that is the correct one Mar 07 21:30:27 dcorbin_, it depends on how do you invoke it Mar 07 21:30:41 pentarex, why wouldn't it be correct? Mar 07 21:30:41 ok. Mar 07 21:30:47 memorion really? its returning me error Mar 07 21:30:55 dcorbin_, hard to say since I don't know how your back button is wired up :/ Mar 07 21:30:56 E/MediaPlayer﹕ error (1, -2147483648) Mar 07 21:31:06 pentarex do you have permissions to acces that? Mar 07 21:31:18 i add that Mar 07 21:31:23 i already told him the pattern was full Mar 07 21:31:31 pentarex, you added write permission to read external storage? Mar 07 21:31:44 lol Mar 07 21:31:47 Mavrik yeah ive saw it in the tutorial you send me Mar 07 21:31:58 i dont know how to add permission for internal storage Mar 07 21:32:03 and i said maybe thats the correct one Mar 07 21:33:27 ok no need for permissions as i see not sure whats the problem then :( Mar 07 21:33:54 pentarex try READ_EXTERNAL_STORAGE Mar 07 21:34:37 pentarex oh Any app that declares the WRITE_EXTERNAL_STORAGE permission is implicitly granted this permission. so that shouldn't be your error Mar 07 21:34:41 memorion again the same mistake Mar 07 21:34:57 i mean not mistake... exception Mar 07 21:35:35 thats for my videoView Uri video = Uri.parse(videoFile.getAbsolutePath()); Mar 07 21:35:52 what kind of file are you trying to play? Mar 07 21:35:56 mp4 Mar 07 21:37:13 memorion http://imgur.com/23553Yx to be more specific Mar 07 21:38:35 pentarex hm that looks like it should work if I read http://developer.android.com/guide/appendix/media-formats.html sorry, maybe something here helps you http://stackoverflow.com/questions/11540076/android-mediaplayer-error-1-2147483648 Mar 07 21:38:53 pentarex: hm, that's not quite enough info. afaik the only h264 support that's guaranteed is with the baseline encoder, not any fancier ones Mar 07 21:39:47 verify that file plays with the internal video player first Mar 07 21:39:52 then continue. Mar 07 21:39:54 good thinking Mar 07 21:39:59 (internal - built-in) Mar 07 21:40:14 most new devices have High capable decoders, practically everything since 2.3 era has at least main capable decoder Mar 07 21:40:55 Mavrik you mean with the default android applicaiton Mar 07 21:41:00 mhm Mar 07 21:41:05 ok Mar 07 21:42:20 Mavrik ok with Sony xperia z2 tablet i have only Movies and Photos which Movies is comming from Sony its working with it Mar 07 21:42:36 with Photos as well Mar 07 21:42:45 the sony app doesn't count Mar 07 21:43:01 memorion i dont have any other stock player i think Mar 07 21:43:43 which one should i download or if you say to convert the file to other format np just recommend me one Mar 07 21:45:05 I'm not sure if you can get the stock player anywhere, maybe try quickpic, it can play video but I think it uses the same one you're trying to use Mar 07 21:46:03 memorion ok i am downloading android video converter Mar 07 21:54:08 Love the documentation on the Movie class: http://developer.android.com/reference/android/graphics/Movie.html Mar 07 21:54:39 nice Mar 07 21:55:16 solid android docs right there Mar 07 21:55:32 It'd be kinda cool if the Android documentation were a wiki. Mar 07 21:55:35 Though it'd be kinda crazy, also. Mar 07 21:55:49 id actually love something like that Mar 07 21:56:11 people could list all the stupid quirks and one-off cases where there is odd functionality that isnt documented Mar 07 21:56:40 That's probably because that class isn't meant to be used by end-users and has no usability at all. Mar 07 21:56:44 Yeah, even just comments would be nice. Mar 07 21:56:49 yeah, I've wanted a wiki too :| Mar 07 21:56:51 Mavrik: That's not true. Mar 07 21:57:07 s/not/too/ Mar 07 21:57:09 Romain Guy recommends using it for animated GIFs, for example. Mar 07 21:57:30 ehh Mar 07 21:57:32 i wouldnt Mar 07 21:57:38 You wouldn't what? Mar 07 21:57:42 use that for gifs Mar 07 21:57:45 Indeed. Mar 07 21:57:48 Why? Mar 07 21:58:07 https://twitter.com/romainguy/status/383602653428592640 Mar 07 21:58:30 if you want to see something funny in the android source: http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/5.0.2_r1/android/support/v7/widget/RecyclerView.java#RecyclerView.LayoutManager.onLayoutChildren%28android.support.v7.widget.RecyclerView.Recycler%2Candroid.support.v7.widget.RecyclerView.State%29 Mar 07 21:58:34 GIF's are kind of a difficult format to play in some regards, they can be finnicky Mar 07 21:58:45 TacticalJoke, he says "can use" not "should use" Mar 07 21:59:10 also, wtf gifs. Mar 07 21:59:18 What would you use for displaying animated GIFs? Mar 07 21:59:21 https://github.com/koral--/android-gif-drawable Mar 07 21:59:29 I think that's what most apps use Mar 07 22:00:13 That. Mar 07 22:00:28 Also I'd make sure to use a decoder that can handle strange stuff if I'd be forced to read random internet GIFs Mar 07 22:00:45 yeah ive seen plenty of apps struggle on gifs Mar 07 22:00:45 And avoid using a format with limited color palette and terrible compression in all other cases. Mar 07 22:01:00 gifs need to die, anyway Mar 07 22:01:19 reddit sync uses that library Mar 07 22:01:21 All right, I'll be sure to check that out when implementing animated GIFs. Mar 07 22:01:38 The reddit app I use uses Movie, and I can't remember it being unable to play an animated GIF I've tried. Mar 07 22:01:50 Well, I don't really use it anymore. I should say "used to use". Mar 07 22:02:24 why are there so many reddit apps? write a nice irc client! Mar 07 22:02:38 I don't think there are any good reddit apps yet. Mar 07 22:02:56 memorion, right :/ Mar 07 22:03:05 Holy crap, I figured it out, and it was stupid. Mar 07 22:03:06 There is not a single good one, except irccloud Mar 07 22:03:07 holy crap. Mar 07 22:03:08 * CanyonMan cries Mar 07 22:03:09 reddit sync is pretty good Mar 07 22:03:19 +1 for reddit sync Mar 07 22:03:27 i want to write an android irc client Mar 07 22:03:30 lets do it Mar 07 22:03:31 oh excuse me, sync for reddit Mar 07 22:03:48 Sync for reddit wastes so much space. Mar 07 22:03:51 feature request chathead style irc channel! Mar 07 22:03:52 It's terrible on my phone. Mar 07 22:03:53 you can fork holoIRC Mar 07 22:04:02 what phone do you have? Mar 07 22:04:30 A Sony Xperia M. Mar 07 22:04:52 memorion the same mate... ive converted the video with MIRO specially for android and its not working... dunno what to do more Mar 07 22:05:09 if i write an irc client i can make > do green text Mar 07 22:05:12 its all i want Mar 07 22:05:19 in what way does it waste space? Mar 07 22:05:27 screen space? Mar 07 22:05:35 Is there a way to play gifv videos without using WebView or just starting an external browser? Mar 07 22:05:38 dbrosyth, really? Mar 07 22:05:39 lo Mar 07 22:05:48 reddit sync does it somehow Mar 07 22:05:51 desmin88: Look at the post list. Those cards waste so much whitespace. Mar 07 22:06:01 you can set it to a listview Mar 07 22:06:03 As a user, I want a very, very simple list. Mar 07 22:06:04 pentarex, how about double checking your path / permission / etc.? Mar 07 22:06:12 there are 4 views to choose from Mar 07 22:06:17 case sensitivity, permissions, quickstart on mp4? Mar 07 22:06:24 reddit sync can play gfycat, gifs and .gifv all in the same interface Mar 07 22:06:47 those really aren't formats you know :P Mar 07 22:07:04 Mavrik permissions.... Mar 07 22:07:04 well gfyfact is webm Mar 07 22:07:09 yeah I know but it's what's posted on reddit Mar 07 22:07:17 its working now Mar 07 22:07:21 my god i want to cry Mar 07 22:07:51 TacticalJoke: how much simpler do you want? http://gyazo.com/09e42674e8736d4dfb8fdfb82b5160d0 Mar 07 22:08:09 True, you do have a choice. Mar 07 22:08:17 those with larger phones might use cards Mar 07 22:08:18 But look at that awesome ad there. Mar 07 22:08:23 And the fact that you have to long-press comments to collapse them. Mar 07 22:08:37 Collapsing comments should be a first-class citizen. Mar 07 22:08:59 you take contention with the ad? Mar 07 22:09:16 in soviet russia, comments collapse you! Mar 07 22:09:20 :p Mar 07 22:09:29 desmin88: Yeah, I hate ads. Especially on small screens. Mar 07 22:09:43 then you can support the dev by purchasing it, or use adblock Mar 07 22:09:48 or upgrade your phone Mar 07 22:09:49 more like comments make putin collapse you Mar 07 22:09:49 Or I can not use it. Mar 07 22:09:53 Which is the choice I make. Mar 07 22:10:29 I went all dyslexic when i named my package and instead of what i wanted (edu.rit.gis) I typed gis.rit.edu ... and eclipse let me refactor/move the packages, but there's still something somewhere that has the wrong name, and I can't find it Mar 07 22:11:16 do you plan to monetize your reddit app? Mar 07 22:11:44 Wait a second, if I'm in android studio why do I have an .idea directory Mar 07 22:11:57 it's based on intellij Mar 07 22:12:02 holy crap Mar 07 22:12:06 no wonder I know how to use it! Mar 07 22:12:10 omg Mar 07 22:12:20 * CanyonMan punches his head Mar 07 22:12:32 thank you guys for helping me Mavrik memorion and all others :) Mar 07 22:12:57 np Mar 07 22:13:13 anyone encountered "hierarchyviewer]Unable to get view server version from device 030798f508e6c4f4" before? Mar 07 22:13:20 memorion: Did you have another name before? Mar 07 22:13:39 TacticalJoke no why? Mar 07 22:13:54 You seem to have insider info. :D Mar 07 22:14:04 * Moter8 facepalms Mar 07 22:14:07 TacticalJoke how so? Mar 07 22:14:27 CanyonMan, the Startup image of AS shows "IntelliJ platform" Mar 07 22:14:40 wow, i must be oblivious Mar 07 22:15:19 Last tuesday a week ago I fell on ice, broke my scapula, and was paralized in a snow bank from 12:30 am until 2:30 AM ... I got frostbite on my eyeballs, and possibly scrambled my brain a little. (truth). Mar 07 22:15:31 So what I'd like us to do here is assume that is the problem :-) Mar 07 22:15:40 memorion is secretly the dev of reddit sync Mar 07 22:15:41 memorion: In case the other question was directed at me: hell nah, I am not gonna monetize it. :) Mar 07 22:16:22 TacticalJoke yeah I meat you, cool! Mar 07 22:16:42 no, I haven't created a single app yet :D Mar 07 22:16:43 OK! It's time to learn how to write an android Loader to populate my list!! Mar 07 22:17:04 On that topic, reddit is in the process of changing their rules. They might actually start charging reddit-app programmers who show ads or take money. Mar 07 22:17:08 no no dont use loaders Mar 07 22:17:18 no? Mar 07 22:17:21 TacticalJoke: i'd like to see how they ' Mar 07 22:17:23 charge' them Mar 07 22:17:24 Use what instead? Threads? Mar 07 22:17:58 like anything else -_- Mar 07 22:18:05 Are Loaders deprecated? Mar 07 22:18:08 threads, executors, asynctask, RxJava, etc. Mar 07 22:18:12 no, they just suck. Mar 07 22:18:22 did you jst say RxJava sucks Mar 07 22:18:23 also, use Retrofit for network and you have that issue sorted. Mar 07 22:18:24 memorion: How did you get that insider info if you're new? :D Mar 07 22:18:41 You said something earlier that made you sound familiar, too (though I've forgotten what it was). Mar 07 22:19:37 What do you guys think of this method of handling a navigation drawer? http://pastie.org/private/bnbjrkenhevcuv1kylz6ag Mar 07 22:19:38 I'd understand if reddit charged. I have never paid a penny for reddit and yet some apps would charge me to use them... and they don't pay a penny to reddit. Seems a bit screwed up to me. Mar 07 22:20:09 reddit has ads Mar 07 22:20:11 TacticalJoke I'm lurking a lot, here and on the g+ pages of developers, I check out all the oss licences in applications :D I tried to get into android development pretty much since I got my galaxy s1 when it launched but I always lost motivation to learn on my own Mar 07 22:21:01 Ah, okay. Mar 07 22:21:21 TacticalJoke and now I finally have a project with 2 friends from university Mar 07 22:21:58 What is the project? Mar 07 22:23:09 nothing special, and pretty simple to implement, mostly it's the fact that I have people to learn with that makes the difference, I make the android version, one friend the iOS version and one the server Mar 07 22:24:16 http://www.androidpolice.com/wp-content/uploads/2015/03/nexus2cee_material-728x323.png lol Mar 07 22:26:20 memorion, what will it do? any hint? :D Mar 07 22:26:35 Im currently dev'ing a quiz app with Parse Mar 07 22:26:59 Didnt run into issues yet, yay Mar 07 22:27:11 BTW, FTR, I don't think Sync for reddit is that bad. It's probably one of the better ones to me. Mar 07 22:27:18 I just find it, like basically all the others, annoying. Mar 07 22:27:30 you cant fault it for having ads Mar 07 22:27:36 (e.g., images don't show in a dedicated activity -- they're just laid over the post list.) Mar 07 22:27:39 Why not? Mar 07 22:27:44 display what's on the menu in the local university cafeteria for a start and then build features on top of that Mar 07 22:28:02 Ads ruin reddit apps. reddit apps need all the space they can get. Mar 07 22:28:10 do you fault reddit itself for ads? Mar 07 22:28:15 No, but it's their site. Mar 07 22:28:21 its the devs app Mar 07 22:28:22 And it's not a tiny-screen mobile app. Mar 07 22:28:30 The dev pays $0 to reddit. Mar 07 22:28:32 And makes money from it. Mar 07 22:29:04 TacticalJoke, you probably like flow for reddit? Mar 07 22:29:10 most phones nowadays have quite a bit of screen real estate Mar 07 22:29:13 Yeah, it's not bad. I used it a while back. Mar 07 22:29:23 same here, was really good Mar 07 22:29:28 until dev dissapeared Mar 07 22:29:53 there's a fork of reddit flow somewhere I believe Mar 07 22:30:08 you could argue reddit app devs are providing a service to reddit in the fact that they dont have an official app themselves Mar 07 22:30:41 found it https://github.com/hfatih/ReFlow Mar 07 22:30:45 dem mobile eyes Mar 07 22:30:49 i like reddit sync Mar 07 22:30:53 err, sync for reddit Mar 07 22:31:09 oh he reimplements it? I thought he forked it Mar 07 22:31:12 its not perfect, but it's the one i've used most recently Mar 07 22:31:30 TacticalJoke: how is your app coming along, got some test builds? :D Mar 07 22:31:45 dbrosyth: It's going well. :D Not yet, unfortunately. Mar 07 22:31:53 It's got to the stage where I just like using it. Mar 07 22:32:03 nice Mar 07 22:32:05 And I am finally past that painful "Why the hell am I doing this" stage. Mar 07 22:32:10 lol Mar 07 22:32:22 do you have a subreddit for it yet? :D Mar 07 22:32:27 Yeah, memorion. Mar 07 22:32:31 It's top secret, though. lol Mar 07 22:32:39 (For the moment.) Mar 07 22:32:45 just making sure no one steals it Mar 07 22:32:49 supa sekrit Mar 07 22:32:52 dbrosyth: Are you guys able to talk about anything you may or may not be making yet? Mar 07 22:33:06 probably not Mar 07 22:33:09 :D Mar 07 22:33:19 I have a really nice name for my cafeteria app but I can't tell anyone yet :D Mar 07 22:33:21 ;) Mar 07 22:33:30 memorion: It's great when you think of a good name. Mar 07 22:34:07 We humans are so superficial. Names can be such a big deal. Mar 07 22:34:13 And app icons. Mar 07 22:34:19 TacticalJoke yeah, I'm still searching for one to create the german equivalent of a limited to release my apps with, but I can't come up with a nice name for that Mar 07 22:35:06 names like ShiftyJelly are so weird, they only work because they have an established product but with nothing release it looks silly :D Mar 07 22:35:31 Yeah, a lot of popular names are bizarre. Mar 07 22:35:38 Consider "Twitter". Mar 07 22:35:46 Wtf is that. Mar 07 22:35:52 "Gradle" is bad, IMO. Mar 07 22:36:12 Groovy is groovy Mar 07 22:36:21 If I was going to make a software development company, it would be "Twisted Spork Works" Mar 07 22:36:23 yeah, and I need a name which sounds good in German and English :D Mar 07 22:36:23 "Facebook". Mar 07 22:37:00 I hate when people use "Facebook" as a verb. Mar 07 22:37:04 Or "inbox". Mar 07 22:37:06 I need some JSON data from a REST service, is HttpClient really the way to do that, then read an input stream and convert it to an object maually Mar 07 22:37:14 TacticalJoke: well, you google something, don't you? :) Mar 07 22:37:25 CanyonMan: OkHttp is better. Or perhaps you could use Retrofit. Mar 07 22:37:34 I guess I like 'google' as a verb. Mar 07 22:37:36 It's so handy. Mar 07 22:37:52 I hate all names with "bits" Mar 07 22:37:55 ok. I just wanted to make sure i wasn't missing something like super.getJsonData("http://crap") Mar 07 22:38:04 why hasnt sling some out with their nexus player app yet. jeez. Mar 07 22:38:10 HttpClient is old and stuff. OkHttp is the new name in town. Mar 07 22:38:21 AgileBits, wtf is that? Mar 07 22:38:28 say, I have a question about Retrofit and OkHttp, since it came up: if all I want to do is use Retrofit to pull json from a rest api, do i need to import OkHttp, or can I just use the OkClient that's in Retrofit? Mar 07 22:38:31 I don't mind IbtBucket so much. Mar 07 22:38:34 BitBucket* Mar 07 22:38:41 But 'bits' sounds weird, yeah. Mar 07 22:38:48 yeah ok, maybe its bit + a modifier Mar 07 22:38:58 Tibbits! Mar 07 22:39:10 ^ random name for the taking Mar 07 22:39:11 bitbucket is a better name than github imo vOv Mar 07 22:39:18 Yeah, GitHub is bad. Mar 07 22:39:36 And why couple your site name with some implementation detail? Mar 07 22:39:39 I dunno, I don't mind the name GitHub Mar 07 22:39:42 really? I think it's pretty descriptive Mar 07 22:39:53 it's the product :D Mar 07 22:39:55 What about when Mercurial takes over? What will they do then? Mar 07 22:40:01 Okay, I can dream. :D Mar 07 22:40:17 VSSHub Mar 07 22:40:19 I'm gonna become one of those "This year is the year of the Linux desktop!" people. Mar 07 22:40:31 nice Mar 07 22:40:36 Though Mercurial might actually take over when Evolve is released. Mar 07 22:40:36 TacticalJoke++ Mar 07 22:40:47 Though people are so clueless about non-Git stuff that it probably won't. :[ Mar 07 22:40:57 I hope not :) Mar 07 22:41:07 I genuinely love the git model Mar 07 22:41:24 sorry for offtopic, but can you guys tell that I'm not a native speaker? Mar 07 22:41:32 memorion: Nope. Mar 07 22:41:40 memorion: I wouldn't have guessed Mar 07 22:41:50 Ok, great thanks :) Mar 07 22:42:38 Now we can, though. Mar 07 22:42:46 TacticalJoke: from what I recall when I briefly looked an mercurial, you can't (easily?) edit local history, right? Mar 07 22:43:02 Oh, you can. It's basically the same as Git. Mar 07 22:43:07 Rebasing, etc. Mar 07 22:43:27 Mercurial just doesn't have it enabled in settings by default (which I think is a bad idea). Mar 07 22:43:28 it is not basically the same as git Mar 07 22:43:31 ah Mar 07 22:43:34 Though this'll probably change when Evolve is released. Mar 07 22:43:39 JakeWharton: History mutation is,. Mar 07 22:45:15 JesusFreke: Evolve is an append-only history-mutation system which tracks versions of changesets. It enables safe and simple mutation and propagation of mutation. It's pretty awesome. Mar 07 22:45:22 It's basically a meta-history system. Mar 07 22:45:43 (You can easily delete any changeset, so you're not required to append everything.) Mar 07 22:46:14 And in fact you can kill all meta-history in one command. Mar 07 22:47:29 TacticalJoke: that's pretty neat Mar 07 22:47:45 What's the deal with ViewPropertyAnimator? I doesn't extend Animator so it doesn't fit into AnimatorSet.play(...) Mar 07 22:48:00 I could see it being useful with like the gerrit model of reviewing Mar 07 22:48:25 Zta: it's just a convenience API Mar 07 22:48:27 where you are changing an existing commit, instead of the github model, which seems to be to upload a new commit to fix any comments during the review Mar 07 22:48:36 Yeah, that makes sense. :) Mar 07 22:48:52 JesusFreke: The really cool thing is that you can safely and conveniently mutate published changesets. Mar 07 22:49:05 ah, that is nifty Mar 07 22:49:09 JakeWharton: Any way I can get the ObjectValueAnimator out? Or whatever it's behind it? Mar 07 22:49:14 no Mar 07 22:49:21 make your own Mar 07 22:49:32 And when people pull and find that an old changeset that their changes are based on they can just run "hg evolve" to fix the problem. (Though this may still mean dreaded merges. It seems hard to get around that.) Mar 07 22:49:50 find that their changes are based on an obsolete changeset* Mar 07 22:49:52 yeah, you can't get away from merging in all cases Mar 07 22:50:05 although, I would *love* to see more language-contextual merging Mar 07 22:50:09 Yeah. Mar 07 22:50:55 it does sound like it might be a bit confusing though Mar 07 22:51:06 but maybe it's just a learning curve Mar 07 22:51:57 JakeWharton: I was about to make my own AnimUtils helper class with various factory methods for creating convenient Animators. I converted some into ViewPropertyAnimator instances because the API seemed so easy. But I'm unsure how to actually play all my ViewPropertyAnimators sequentially or simultaneously like normal Animators.. Mar 07 22:52:16 It's a little different, but it's the same old system: plain changesets. In the above case, a "hg log" will show that the changeset we're standing on is now obsolete, and it'll show the "new" path. It's fairly clear how we get to the new path (basically rebasing). Mar 07 22:52:20 why can't I use the hierarchyviewer on my genymotion device nor my nexus 5? Mar 07 22:52:34 Though "hg evolve" takes care of whichever rebase/cherry-pick needs to happen. Mar 07 22:54:43 (Note that rebasing is also append-only, so any mistake is no big deal whatsoever.) Mar 07 22:58:00 so it's kinda like a persisted reflog? Mar 07 22:58:26 Yeah, I think so. Mar 07 22:58:34 but with more functionality Mar 07 22:58:48 Yeah, one with first-class UI exposure (via 'hg log' or whatever). Mar 07 22:58:54 yea Mar 07 22:59:43 Here's more info (in case you get bored): http://evolution.experimentalworks.net/doc/user-guide.html Mar 07 23:01:00 haha hghub.com Mar 07 23:18:55 this is what the hierarchy viewer shows me http://imgur.com/fIcUlYr I manually created the one I circled, do I need the ones with the red dots? Mar 07 23:29:05 hey has anyone here worked with the MediaCodec Encoder? Mar 07 23:31:03 mediacoder-decoder encoder Mar 07 23:37:38 hey, question about services and phonesleep: if i have a foreground service thread just spinning [e.g. while(true){}] will the cpu get to sleep? Mar 07 23:50:37 http://www.sciencedaily.com/releases/2015/03/150305110546.htm Mar 07 23:52:59 That's probably true Mar 07 23:53:27 that's why I use a tablet Mar 07 23:53:32 lol Mar 07 23:55:56 Hello, is this normal? http://pastie.org/10008296#21-23 When a fragment is calling onViewCreated, one of the views of that fragment's layout is still not aware of it's dimensions? Mar 07 23:57:02 miketo: yep. try it, spin & log, then lock your phone. usually the output stops in like 10 seconds. Mar 07 23:57:25 it'll resume periodically when something else wakes the CPU, but without a wakelock it will sleep whenever it feels like it. Mar 08 00:02:57 groxx, thanks :D i'd like to know if there's a good way to pause threads when screen goes off / or otherwise cause threads to pause immediately Mar 08 00:08:42 Excuse a newbish question, so i have a google play services class that manages all the connect/disconnect, and other stuff. How am I supposed to pass the onConnected() callbacks to the activity I'm using? Should I define an interface and implement it in the activity, and then have the google play services class call those methods in the activity? Mar 08 00:08:58 another, different question: AlarmManager.set()'s behavior was changed in api19 to be inexact. the docs say that if targetsdk<19 then it will work the old way. what about the case where targetsdk>19, but the device is api<19 ? (minsdk=16,device=16,targetsdk=21) Mar 08 00:12:07 my Android studio project is pointed at the wrong repo Mar 08 00:12:13 where can I change that in the IDE? Mar 08 00:15:07 nevermind, had a google search epiphany as soon as I asked in here Mar 08 00:23:07 So I had 3 activities I created in addition to my other 4 recently Mar 08 00:23:20 Two of them I decided I didn't want to deal with until later Mar 08 00:23:26 And so I delete them Mar 08 00:23:52 All of a sudden (I didn't have this problem this morning), AS is hijacking my manifest file Mar 08 00:24:56 I was able to manually edit my manifest before, and all of a sudden now, it's readding references to those deleted activities, and rewriting my existing third activity. Mar 08 00:25:22 dun dun dun! Mar 08 00:25:32 I also now see the yellow "generated and should not be edited" bar under the manifest's text tab Mar 08 00:25:34 Any ideas? Mar 08 00:25:43 you are messing with the wrong files Mar 08 00:25:48 Nope Mar 08 00:25:56 Same AndroidManifest I've always tweaked Mar 08 00:26:14 Things like adding android:launchMode to, I always tweak that file if I need to, Mar 08 00:26:22 lasserix did you have the xml thingy to emulate elevation pre lollipop? Mar 08 00:26:30 Just started happening in the last 5 minutes though Mar 08 00:26:39 memorion: one sec Mar 08 00:26:44 My loader doesn't ever really start Mar 08 00:26:47 it gets created but it doesn't start Mar 08 00:27:04 I'm calling initLoader Mar 08 00:28:50 AS has always modified my manifest file, for example, if I add a new activity, but it's never force taken control and deleted my recent changes befor Mar 08 00:28:50 I have usb debugging enabled on my phone, and I connect my phone to my computer with android studio running. However, the verification message never pops up on my phone and android studio never detects it. what am I missing?? Mar 08 00:29:20 memorion: http://pastebin.com/YHFDUx55 Mar 08 00:29:47 bilb_ono: usb drivers, try changing connection mode from mtp to camera Mar 08 00:30:46 lasserix thanks! what's the easiest usage? include in the layout and set it to gone on lollipop+? Mar 08 00:31:29 memorion: probably make a file that has your actiobar/toolbar and the shadow, then reference via include statement, then make two versions one for lolli and one without: the one with lolli uses elevation Mar 08 00:31:40 *and doesn't have the edge Mar 08 00:32:58 lasserix can you dynamically include the right one in xml? or where do I include the different ones? Mar 08 00:33:47 memorion: like this res/layout-v21/toolbar.xml and res/layout/toolbar.xml the v21 uses elevation and does not have the view with the shadow edge, the one in res/layout has 0 elevation and uses the view with the shadow dge Mar 08 00:34:03 then just in your layouts with the toolbar, do *thats one way to do it Mar 08 00:34:28 lasserix ah yeah, that makes sense, just one question what would it do on api 22? Mar 08 00:34:38 use 21 or the normal one? Mar 08 00:34:39 22 will pull from v21 Mar 08 00:34:46 ok thanks! Mar 08 00:35:05 * i am assuming v21 is lollipop Mar 08 00:35:08 Do you have any ideas on fixing manifest hijacking? Mar 08 00:35:17 start a new project? Mar 08 00:35:46 it sounds like something you did Mar 08 00:35:54 like safe usage delete or something Mar 08 00:36:01 lasserix oh btw, I knew you posted the xml here so I searched for it on github by searching "lasserix" and there's a guy who has some part of this channel online in his dotfiles with you in it https://github.com/nathanmarck/dotfiles/blob/6d46afd5459429619a21b7e520d81000a590a2fe/.config/hexchat/scrollback/BNC/%23android-dev.txt Mar 08 00:37:15 heh Mar 08 00:38:09 wow Mar 08 00:38:15 lots of fun stuff in there Mar 08 00:38:27 chrome cookies and session data Mar 08 00:38:43 login data Mar 08 00:38:47 <_genuser_> really appreciating android studio. Mar 08 00:38:54 <_genuser_> without it, I would have never realized how fast eclipse is. Mar 08 00:38:56 oh really? maybe I shouldn't have posted that :/ whoops Mar 08 00:40:29 why? it's easy to search and find Mar 08 00:41:18 yeah.. I may have found him on twitter and told him to delete it Mar 08 00:41:38 Can anyone help me understand why these two methods don't both work? Why is the broken one broken? http://pastebin.com/35stmH4y -- NOTE line 3 and 37 Mar 08 00:42:14 fadeInBROKEN doesn't animate; it instantly fades in the view. Mar 08 00:44:03 zta setalpha has api level Mar 08 00:44:39 api 11 Mar 08 00:44:46 so if you are using old phone it wont work Mar 08 00:45:34 If I understand this API thing right, my app would crash if I tried to invoke a method that isn't available on my particular phone, right? Mar 08 00:45:55 well if it is less than 11 Mar 08 00:46:04 swap setVisibility and setALpha? Mar 08 00:46:08 My app doesn't crash. I get two different behaviors. Mar 08 00:47:17 Hmm Mar 08 00:47:21 My phone is level 21. It's not an api-incompatability issue. Mar 08 00:47:49 I have no idea where the manifest file copy I was working with came from, but I closed and reopened the manifest and it fixed it Mar 08 00:48:06 If I'm using GSON to create some POJO's from JSON, is there a way to get an object in that JSON to create a POJO with a different name? For example my POJO Model is Reservation. Say my results return madeReservation or emptyReservation (just examples) which have the same attributes as a Reservation. Can those objects in JSON still become a POJO Reservation? Mar 08 00:48:50 lasserix: swapping line 37 and 38 doen't change anything. Mar 08 00:49:25 Zta all i can think is the interpolater first grabs the current value before on animation starts (when it is initialized, then it calls start) Mar 08 00:49:37 so setting alpha to 0 after the interpolater has grabbed it does nothing Mar 08 00:49:43 if that makes sense Mar 08 00:50:01 I'm thinking something like that too. I just hoped someone could confirm =) Mar 08 00:50:01 lasserix is there a workaround for the scroll indicator starting below the shadow thing? Mar 08 00:50:09 ? Mar 08 00:50:18 i have no idea what you mean Mar 08 00:50:19 scroll indicator? Mar 08 00:50:30 wait I'll try to screenshot it Mar 08 00:51:23 or, I have a recyclerview belog the toolbar and if I drag down I get the blue thing to indicat that it doesn't scroll more in that direction but it starts below the shadow Mar 08 00:51:54 memorion: just setting layoutmargintop to 4 dp on your listview Mar 08 00:54:42 lasserix ok, now my listview is a viewpager with a recyclerview, I set margintop 4dp on both and it doesn't seem to change anything Mar 08 00:55:27 whats your layout file look like Mar 08 00:56:52 lasserix https://gist.github.com/anonymous/2f05a003a8f3ea89f200 Mar 08 00:58:22 try putting it as bottommargin on the view Mar 08 01:00:05 still no change :/ Mar 08 01:00:40 take a screenshot? Mar 08 01:00:47 android:layout_marginBottom="-4dp" works Mar 08 01:00:57 oh cool Mar 08 01:01:53 thanks for everything! Mar 08 01:04:56 DNS isn't a permission I need to add to the manifest is it? Mar 08 01:10:09 You need INTERNET Mar 08 01:10:34 OK, I do have that Mar 08 01:11:07 very strange though i get a hos tnot found, but on the exact same tablet i can go to the same host with chromium and it's fine Mar 08 01:25:48 is there a dimen resource somewhere for the standard toolbar elevation? Mar 08 01:27:15 no Mar 08 01:27:35 i believe it's 6dp, but can't remember Mar 08 01:27:39 800dp Mar 08 01:27:48 over 9000dp Mar 08 01:27:55 4dp according to http://android-developers.blogspot.nl/2014/10/material-design-on-android-checklist.html Mar 08 01:27:57 120000dp Mar 08 01:28:18 "The app bar normally has a 4dp elevation." Mar 08 01:28:20 seems like it would have been smart to make that a resource Mar 08 01:28:29 one billion million trillion dp Mar 08 01:28:37 muahahaha Mar 08 01:28:44 yeah, I dont understand why that isn't available Mar 08 01:28:56 'cause UI designers are not smart ;D Mar 08 01:29:27 Anyone got links to a good radial drawble? Mar 08 01:29:32 *radial gradient drawable Mar 08 01:29:59 https://developer.android.com/reference/android/graphics/drawable/GradientDrawable.html Mar 08 01:30:13 hm "?attr/elevation" exists, where can I see what that does? Mar 08 01:30:37 https://developer.android.com/reference/android/R.attr.html#elevation Mar 08 01:32:09 thanks, but I still don't quite understand what it's set to by default Mar 08 01:32:43 can i call stopSelf in a service's onStartCommand? (if so, what should onStartCommand return) Mar 08 01:38:30 does radialgradient work for anyone on lollipop? Mar 08 01:39:03 its just flat for me Mar 08 01:39:07 *just startcolor Mar 08 01:41:06 lasserix in your pastebin for the fake elevation you set height in the view twice Mar 08 01:58:07 miketo sure Mar 08 02:02:17 g00s, thanks Mar 08 02:12:43 Do you think it's normal that when your Loader finishes you call setListAdapter( ) and give it a brand new ArrayAdapter or whaatgever ? Mar 08 02:16:03 shouldnt matter Mar 08 02:16:08 but ideally you'd not want to have to Mar 08 02:16:13 that is what notifydatasetis for Mar 08 02:16:37 oh so that's what I'm doing wrong, I need to keep a reference to the ArrayAdapter so I can notify it that the list changed? Mar 08 02:19:42 Is it possible to have a TextView in an ActionMode CAB? Mar 08 02:23:35 A design question: My app makes a lot of API calls to fetch data to fill views. I am using Retrofit to make API calls which also has a SigningClient (extends UrlConnectionClient) which checks if it has Request tokens else it makes OAuth1.0 synchronous API call to get request tokens, signs the request, then executes the request. I don’t like the design of SigningClient which makes OAuth call (if doesn’t have request tokens Mar 08 02:23:35 Is it possible to move the OAuth api call to Application.onCreate? But I wouldn’t want to block the UI Thread with synchrounous call. so can I make an Asynch request in Application class. Mar 08 02:26:33 Err, not a TextView, an EditText Mar 08 02:28:17 I'm a maven user, meaning maven central and all that. But android stuff seems to use something called jcenter? Mar 08 02:35:52 hm i see project structure / external libraries Mar 08 02:36:05 i don't see what this stackoverflow says though: "Add Dependency" Mar 08 02:43:42 https://android-arsenal.com/tag/40 Mar 08 02:43:50 any opinions on any of these? The williamchart one looks neat Mar 08 02:44:26 So I'm looking to have a button in my action bar to add an item to a list Mar 08 02:44:32 cool Mar 08 02:45:25 And I want to hopefully have that button, rather than a new activity for a text box, add a text box in a CAB ActionMode-like bar at the top, with a button to add the item Mar 08 02:45:38 Is there any way to do something like this? Mar 08 02:46:52 just put edit text in your action bar and adda menu item for adding Mar 08 02:47:09 it aint rocket science yo Mar 08 02:47:41 I think I want to try this one: http://androidplot.com/ Mar 08 02:47:50 Can I put an EditText in an action bar? Mar 08 02:47:57 but do i have to download an actual jar or can I just add it like I could if android were maven? Mar 08 02:48:07 CanyonMan: you using gradle? Mar 08 02:48:25 yeah, because I'm using the out of the box android development kit Mar 08 02:48:48 lasserix: Yeah, no. No EditTexts allowed in a menu Mar 08 02:48:57 canyonman right click on your project goto module settings select your app module click dependencies tab click add select library and you can do a text search for the library Mar 08 02:49:13 otherise you can open build.gradle in your app module and manually add the dependency Mar 08 02:49:21 option 1: add library depenedency? Mar 08 02:49:25 (which is what the first means of doing it does for you behind the scenes) Mar 08 02:49:38 ok i see cool there it is Mar 08 02:49:40 if you want to add it as a dependency from a server repo Mar 08 02:49:42 androidplot 0.6t.1 Mar 08 02:49:44 0.6t.1 Mar 08 02:49:45 that Mar 08 02:49:46 wow Mar 08 02:49:46 yeah Mar 08 02:49:48 0.6.1 Mar 08 02:49:54 i don't know where that t came from but that's a scary version # Mar 08 02:49:55 so that's the best way of doing it Mar 08 02:50:00 ok Mar 08 02:50:09 will this come from jcenter or maven central then? Mar 08 02:50:11 TechGeek01: use a toolbar Mar 08 02:50:15 CanyonMan: yeah Mar 08 02:50:46 It's probably like maven where it'll get all the transitive deps it needs too right Mar 08 02:51:12 aye Mar 08 02:52:32 cool Mar 08 02:52:52 now i have to figure out how to use it, I'm guessing i have tgo create a fragment **** ENDING LOGGING AT Sun Mar 08 02:59:58 2015