**** BEGIN LOGGING AT Tue Feb 24 02:59:58 2015 Feb 24 03:00:05 CedricBeust kind of, it works, I touch the login button, it takes me to Facebook auth (asking for app permissions), but it does not ask the user for the permissions I already asked(mentioned above) Feb 24 03:00:17 so, I click "accept" and then i'm back to the app Feb 24 03:00:35 no errors at all, but I get no user info Feb 24 03:00:54 Should be easy to diagnose, if you ask for the right permissions, you should be redirected to a page on facebook.com listing all the permissions the app is asking Feb 24 03:01:12 if you see the code at the tutorial there's some code that is supposed to log returned user info but nothing happens. Feb 24 03:01:34 Where's the tutorial you're following? Feb 24 03:01:37 This is the line supposed to get those permissions: authButton.setReadPermissions(Arrays.asList("email", "public_profile","user_friends")); Feb 24 03:01:48 javatechig.com/android/using-facebook-sdk-in-android-example Feb 24 03:03:04 That tutorial doesn't call that method anywhere Feb 24 03:03:16 wich method? Feb 24 03:03:31 setReadPermissions Feb 24 03:04:18 oh, you're right, perhaps i've added that following other tutorial Feb 24 03:04:49 keniobats: Have you read https://developers.facebook.com/docs/android/login-with-facebook/v2.2 ? Feb 24 03:05:17 CedricBeust indeed, but I'm kind of lost with some concepts (can't remember which ones now) Feb 24 03:05:35 keniobats: I suggest sticking to the facebook.com one and avoiding random web sites until you know what you're doing Feb 24 03:05:45 Even tho I've managed to make it work but it seems that the issue is related with permissions and fetching user data Feb 24 03:05:49 (better odds of the facebook.com being correct:) ) Feb 24 03:06:25 CedricBeust yes, but it seems to be a little old dated 'cause the use eclipse instead of android studio. Feb 24 03:06:30 but thanks anyway :) Feb 24 03:06:32 Do that and ask again if you encounter a problem Feb 24 03:06:42 For this particular thing, eclipse/AS should be a non issue Feb 24 03:06:53 just a different way of specifying the fb jar file you depend on Feb 24 03:07:10 but the tutorial is mostly Java code so you should be fine Feb 24 03:07:34 thanks CedricBeust :), I'll give it a shot Feb 24 03:07:50 sorry for being unclear about my problem Feb 24 03:23:06 keniobats: permissions go in scope Feb 24 03:23:31 keniobats: probably best to use an existing lib...i got fb working with both spring social and the official oauth lib over the weekend Feb 24 03:23:51 btw, you know "user_friends" now only returns friends using that app, right? Feb 24 03:23:56 myke, already configured that on app dashboard(the scope) Feb 24 03:24:14 myke, :O what?, nope, didn't know that! Feb 24 03:24:17 yeah Feb 24 03:24:26 I need the user friends Feb 24 03:24:34 if you're using a test app (which you should) you can also create test users, and validate it's working Feb 24 03:24:48 but that doesn't help with the bigger issue that you can no longer just grab all the user's friends Feb 24 03:25:18 i thought my app wasn't working (no friends returned) until i tried with test users and there it worked fine Feb 24 03:25:20 myke, so that's definitive?, there's no way of getting user friends anymore? Feb 24 03:25:40 keniobats: maybe with the old api but i think fb said that would be deprecated in april Feb 24 03:25:46 so basically no, afaik Feb 24 03:25:49 let me know if you find otherwise Feb 24 03:25:49 yes, i've heard that Feb 24 03:26:00 I will myke, thanks :) Feb 24 03:26:12 this is of course the problem with writing apps for sites like facebook...no control Feb 24 03:27:28 of course, what to do if not? Feb 24 03:27:47 iirc the faq linked to a section on fb-approved ways to invite friends...i didn't read it Feb 24 03:27:52 TacticalJoke, is there an example of mocking an android class you can link to? Feb 24 03:30:18 TacticalJoke i've never seen a website have more 500s than reddit Feb 24 03:30:30 amazing the thing stays up Feb 24 03:30:37 hope your client is super robust :D Feb 24 03:32:35 Norrin: I can't really find much (though my Internet connection is amazingly slow right now). There's a tiny example on this page: https://raygun.io/blog/2014/01/android-testing-with-junit-mockito-and-robolectric/ Feb 24 03:32:58 g00s: Yeah, I'll be testing it a lot. :D Feb 24 03:33:08 I'm just gonna show a TextView or something for reddit being down. Feb 24 03:33:34 Maybe an image would be cool. Feb 24 03:33:53 Norrin: I guess the best documentation is the Mockito documentation. Feb 24 03:34:05 * pfn is still happy with baconreader Feb 24 03:34:42 Norrin: Also see this: http://tools.android.com/tech-docs/unit-testing-support Feb 24 03:34:53 We can now JVM-unit-test in Android Studio. Feb 24 03:35:58 well i need it automated. so anything unique to AS may not be applicable Feb 24 03:36:13 Oh, it works with Gradle too. Feb 24 03:37:58 Now I can see a stack trace! What was keeping a stack trace from being displayed before, launching a malformed activity? Feb 24 03:38:38 Hey guys, anyone know why we have to call super.onAttached() inside onAttached in a subclass of Fragment Feb 24 03:39:10 drose379 you generally have to call super on all lifecycle methods Feb 24 03:39:17 the same reason you have to call superclass methods everywhere else Feb 24 03:39:18 in activity, fragment Feb 24 03:39:47 So its calling the onAttach method from the DialogFragment class? Feb 24 03:40:19 drose379: because java doesn't have event bubbling Feb 24 03:40:40 What Feb 24 03:41:17 drose379: that's what you're doing manually, sending an "onAttached" event all the way up the class hierarchy Feb 24 03:41:31 Right, that is what super() is doing Feb 24 03:43:36 By overriding DialogFragment.onAttach, you're preventing it from being called. Only your onAttach is called. Feb 24 03:43:52 Ohh ok that makes sense Feb 24 03:43:53 Unless you say "super.onAttach(activity);", in which case both DialogFragment.onAttach also runs. Feb 24 03:43:56 -both Feb 24 03:44:06 As g00s said, you have to do this in lifecycle methods. Feb 24 03:44:22 Because lifecycle methods tend to do important stuff. Feb 24 03:44:32 Cool, onAttach would be lifecycle Feb 24 03:44:36 so that the method will do what it would normally do and allow you to add more code to it Feb 24 03:44:40 Wonder what is inside that method Feb 24 03:45:07 drose379: Easy to find out Feb 24 03:45:10 https://android.googlesource.com/platform/frameworks/support/+/master/v4/java/android/support/v4/app/DialogFragment.java#264 Feb 24 03:45:41 so when I call super.onAttach() that method is also calling super.onAttach()? Feb 24 03:45:48 Yep. Feb 24 03:46:20 Wait, whats the difference between the support lib and the regular lib Feb 24 03:46:35 I suppose I could google that, but if you guys have a quick and easy answer.. Feb 24 03:46:43 Personally, I prefer using the support lib because then we get consistent behaviour regardless of Android version. Feb 24 03:47:11 Oh is support lib the long term support lib? Feb 24 03:47:23 but at the same time, you wind up with android.fragment and support.v4.fragment which don't have a common ancestor Feb 24 03:47:39 drose379: backwards compatibility Feb 24 03:47:40 So always use the support version Feb 24 03:47:53 CedricBeust can't there is no PreferenceFragment for example Feb 24 03:48:00 Yeah, I think the only time we can't use support Fragments is with PrefernceFragment, right? (And then it's no big deal.) Feb 24 03:48:06 Jinx. :D Feb 24 03:48:15 So i should switch over to the support library instead? Feb 24 03:48:19 So always use the support version (when you can)* Feb 24 03:48:21 drose379: IMO, it's a good idea. Feb 24 03:48:28 Will all the code be the same, or will i have to change some stuff Feb 24 03:48:33 And in the O of others, apparently. :) Feb 24 03:48:53 the support lib also has some weird bugs though, like startActivityForResult not working in nested fragments Feb 24 03:48:58 You'll have to say getSupportFragmentManager instead of getFragmentManager. Feb 24 03:49:02 damned if you do, damned if you dont Feb 24 03:49:12 I have an issue with touch-handlers where adding an OnTouchListener breaks child handling Feb 24 03:49:39 Thanks guys Feb 24 03:50:07 drose379: Did you get your DialogFragment up and running? Feb 24 03:50:59 Yeah Ive got an example one running with a button callback and stuff Feb 24 03:51:05 Cool. Feb 24 03:51:13 just learned of catrobat Feb 24 03:51:19 i'm really out of all the loops Feb 24 03:51:29 So they call this modular design right? Keeping each dialog in a seperate module? Feb 24 03:51:34 Not sure what habit I'm about to break, but for instance I might have an element that I want to show a click animation that is deeper in the view (a child displayed on top) and...lets say I had five child views that I want to show click animations while handling the touch on a parent Feb 24 03:52:00 drose379: Yeah, that description seems to fit. Feb 24 03:52:41 Cool, thanks for the help earlier Feb 24 03:52:52 Pissed g00s off a little bit, but thats alright :D Feb 24 03:53:37 I think he was just offering guidance. "Teach a man to fish", and all that. :) Feb 24 03:54:18 Ohh what is that quote Feb 24 03:54:24 Give a man a fish feed him for a night Feb 24 03:54:27 Can two events that are supposed to return true onTouchDown both continue recieving the event? Feb 24 03:54:29 TacticalJoke: Did you have an easier way to parse XML than using XMLPullParser? I think I will eventually need add/delete xml elements for this geocache app. Feb 24 03:54:31 Teach a man to fish feed him for a lifetime Feb 24 03:54:47 Mittendeep: i think there's at least 3 stock parsers Feb 24 03:55:14 Mittendeep: the dom-based parser may work better if you need to make a lot of changes Feb 24 03:55:23 pull parser is a stream-based parser Feb 24 03:55:33 TacticalJoke: So can most part of the application be split into modules (Fragments) ? Feb 24 03:55:50 Cause I really like the organized code architecture Feb 24 03:55:53 Modules aren't necessarily Fragments. They could be any class. Feb 24 03:55:57 Just adding and deleting items, last time I used xmlpullparser and it would probably be a pita to implement it correctly in this case Feb 24 03:56:09 I'm not sure about the idea of using Fragments a lot. Hmm. I guess sometimes it could work. Feb 24 03:56:20 Another option is custom Views. Feb 24 03:56:20 Just organizing classes into modules would be modular design too? Feb 24 03:56:36 Using classes at all would qualify as modular design. Feb 24 03:56:51 Ok cool Feb 24 03:56:51 Mittendeep: I think it'd be fairly easy. Feb 24 03:56:56 Fragments are useful if you have UI data that doesn't persist on models or would be a PITA to recreate when you want to start drawing views again Feb 24 03:57:07 Adding or deleting elements to or from your output file is just a case of writing or not writing certain elements. Feb 24 03:57:19 Blow away the views, keep what you need to show them until you are sure you're done with the fragment Feb 24 03:57:24 Though a tree model would probably be simpler overall, yeah. Feb 24 03:57:25 that seems to be where I'm dividing things up Feb 24 03:57:54 But how can I render a click in five child views while handling the onTouchDown in the parent? Feb 24 03:58:28 the accelerated emulator on my i3 is significantly faster than my real phone...time to upgrade Feb 24 03:58:31 android:background="?attr/selectableItemBackground" seems to be picky about where clickable is set etc Feb 24 03:58:54 TacticalJoke: I would need to delete elements and all their child elements (i think that is what they are called) Feb 24 03:58:56 myke: Which phone is that? (Just curious.) Feb 24 03:59:09 TacticalJoke: Droid4...because keyboard Feb 24 03:59:11 Mittendeep: But isn't that simply a case of overwriting the file *without* writing those elements? Feb 24 03:59:15 Hey TacticalJoke: (Once your done helping these guys) Instead of having a Listener interface stored in each one of these class files, I could just make an interface that the Activity implements and works for all the Fragmentgs Feb 24 03:59:20 Fragments* Right? Feb 24 04:00:06 If the callback methods all had the same signature, yeah. Feb 24 04:00:09 TacticalJoke: No, that is the best part. The design requirements were so vague as to be worthless. I actually got real directions for the application this week so I had to redo what I had. Feb 24 04:00:11 Kinda like View.OnClickListener. Feb 24 04:00:25 by best i mean worst =( Feb 24 04:00:45 The Fragments would just have to import the interface right, since its not found in the class Feb 24 04:01:02 Yeah, unless it's in the same package. Feb 24 04:01:16 TacticalJoke, smh my unit tests need to download some folks and I don't know how to provide a download destination without context.getFilesDir().getAbsolutePath() Feb 24 04:01:18 If its in the same package I just need the name? Feb 24 04:01:26 download some files* Feb 24 04:02:14 i have no idea what the filesDir would be outside of an andriod context Feb 24 04:02:31 * Mittendeep is super proud Feb 24 04:02:35 drose379: If it's in the same package you don't need an 'import' statement. Feb 24 04:02:55 Got it, thank you. Feb 24 04:05:31 Im out, talk later. Feb 24 04:05:43 Norrin: Not sure; I haven't used Mockito with Android yet. Though in general it's way easier to unit-test code that doesn't rely on the existence of a particular file-system entity. Feb 24 04:05:50 Dependency injection makes life easier ther. Feb 24 04:05:51 there* Feb 24 04:06:55 yeah it doesn't actually. it needs a folder location to put files. but what is that folder location during unit testing? TacticalJoke Feb 24 04:11:41 Since JVM unit tests run on the local machine, it'd be some directory on that machine. I guess in theory you could mock that Android method to return the value of 'System.getProperty("java.io.tmpdir")', but it seems messy. Feb 24 04:11:54 Is this one of those cases where it would be better to use instrumentation tests? Feb 24 04:25:06 do drawable states have a different bubbling system than touches? where do I find out how to pipe parent states to children or reverse? Feb 24 04:26:07 ignores are so annoying, need text filters Feb 24 04:28:09 wow, wireshark looks like GTK 1 unthemed on mac Feb 24 04:28:31 better than motif Feb 24 04:28:57 barely ... looks very athena Feb 24 04:29:50 maybe not. ibut i thought they were converting over to Qt Feb 24 04:32:29 that is the nice thing about windows, often very specialized desktop apps for embedded only run there - not mac Feb 24 04:32:49 like some of these cool bt tools from TI and nordic Feb 24 04:33:07 and before that they only ran on DOS Feb 24 04:34:17 i would say you can just run windows on a virtual machine but i can't even get my roku to use the flash cards in my phone as mass storage properly, so never mind Feb 24 04:44:51 Well, Android Studio is barely native on Mac. Feb 24 04:45:15 Wow, this is the worst I've seen reddit, I think. Feb 24 04:45:19 Just down constantly. Feb 24 04:45:33 Then again, it was bad a few years back too. Feb 24 04:45:34 probably for the best Feb 24 04:48:30 I hate when a software looks completely alien with other ones. Even for android apps. Feb 24 04:48:44 To be fair, IntelliJ looks kinda alien on Windows too. Feb 24 04:48:59 It's not too bad, though. Feb 24 04:48:59 thats correct Feb 24 04:49:07 why does adding a tuch handler break clickability? Feb 24 04:49:09 not as bad as eclipse Feb 24 04:49:18 tuch lol Feb 24 04:49:19 Eclipse looks native on Windows here. Feb 24 04:49:30 i didn't sed it Feb 24 04:49:38 knapper_tech: It doesn't Feb 24 04:51:07 I don't think so. All the controls in eclipse, including tabs, toolbar buttons, looks different. Feb 24 04:52:35 scroll bars are somehow very native. :) Feb 24 04:54:40 Eclipse looks native on both Windows and Mac OS to me (don't ask me about Linux, I don't have time for that) Feb 24 04:54:40 yiati, child view animates on touch down. setting parent or child to clickable makes this animation take place. after adding a touch handler, i can't get the child's animation to go off Feb 24 04:56:12 knapper_tech onTouch is chained with onClick I think. You need to tell methods down the line that you have consumed the event or not. Feb 24 04:56:34 napster, tried returning false Feb 24 04:57:41 Anyone know how hard / easy it is to import an AS project into Eclipse? I have both IDE's configured already. Feb 24 04:58:46 why, you don't do that Feb 24 04:59:03 yeah seems like a tough endeavor Feb 24 04:59:07 Mittendeep: Not sure, but can I ask why you're doing that? Feb 24 04:59:13 (I forgot what you said earlier.) Feb 24 04:59:14 I have imported projects from eclipse to AS, but not the other way around :) Feb 24 04:59:28 napster, jacked with return values some more and got it working. thanks. Feb 24 04:59:42 yw Feb 24 04:59:42 Probably depends on Eclipse's support for gradle and then Eclipse's support for Android+Gradle (close to nonexistent I believe) Feb 24 04:59:50 I thought returning false would prevent future events Feb 24 04:59:53 non existent Feb 24 05:00:16 CedricBeust, so what brings you back here so actively? working on android stuffs again? Feb 24 05:01:25 TacticalJoke: I just looked at the requirements for the next assignment and realized that the createtreasure xml reader has to be tied to a main menu, gameplay screen, etc. so I decided to remake it from the ground up. I used AS this time since Eclipse was a PITA for me. I have to turn in an eclipse project folder when I am done otherwise it wouldnt matter. =) Feb 24 05:02:12 That's lame that they require you to use Eclipse. Feb 24 05:02:33 AS didn't exist when my textbook was created haha Feb 24 05:02:58 School classes behind industry standards, movie at 11! Feb 24 05:03:23 AS doesn't support the newest JDK though, does it? Feb 24 05:03:30 It does Feb 24 05:03:38 Books get outdated very fast. So true. :) Feb 24 05:03:55 yes it does jdk 8 Feb 24 05:03:57 I use Java 8 with AS, no issue (obviously, it doesn't generate java8 byte code though) Feb 24 05:04:15 dalvik code Feb 24 05:04:33 We should all rebel and move to Kotlin. :D Feb 24 05:04:41 * CedricBeust grabs his pitchfork Feb 24 05:04:50 Which way to the gates of the castle? Feb 24 05:05:33 the castle is in mountainview :) Feb 24 05:05:37 I wrote a quick retrofit+kotlin client, I was almost disappointed instead of excited at how easy and small it was Feb 24 05:06:14 Yeah I know where that castle is very well :) Feb 24 05:06:26 TacticalJoke celon has multiple constructors :) but they have to be named differenltly Feb 24 05:06:43 Named constructors. ;o Feb 24 05:06:49 I should research Celon. Feb 24 05:06:55 *ceylon sorry Feb 24 05:07:02 celon is a castle in france Feb 24 05:07:07 which we could storm Feb 24 05:07:43 "and can be compiled to JavaScript". Wai?! Feb 24 05:07:54 Everything can be compiled to Javascript these days Feb 24 05:08:05 people have used ceylon on android, just isn't any support in gradle Feb 24 05:08:07 Yeah, it's crazy. JavaScript as a VM. Feb 24 05:08:22 Gavin hasn't shown much interest in committing to Android so far, sadly Feb 24 05:08:29 and no AS support - gavin likes eclipse Feb 24 05:08:48 i think the pure OS diehards like eclipse even though intelliJ is open source Feb 24 05:08:53 CE Feb 24 05:09:03 "The world didn't need another JVM language. So we built yet another one." - http://golo-lang.org/ Feb 24 05:09:15 These crazy French people and their golo Feb 24 05:09:18 (well, one person) Feb 24 05:09:33 "Do we really need yet another functional library for Java?" - http://www.fun4j.org/ Feb 24 05:09:55 They could've called it "Junctional". Feb 24 05:10:47 You know fun4j is in a bad shape when it uses Object as the main type everywhere. Yup, that's right, written in 2011 and no generics Feb 24 05:10:55 and casts up the wazoo Feb 24 05:11:20 * CedricBeust sobs Feb 24 05:15:42 g00s: The documentation seems to say that it doesn't have constructors at all. Hmm. Feb 24 05:15:58 Oh, wait, I just saw something about distinct names. Feb 24 05:16:29 TacticalJoke the daily /r/androiddev question "What does it take to be employed as an Android Developer?" Feb 24 05:16:40 next time i'm just going to answer "high tolerance to pain" Feb 24 05:16:54 :) Feb 24 05:17:33 If you like pain, I highly recommend Objective C Feb 24 05:17:45 Think Java is old and creaky? Boy, do I have a surprise for you Feb 24 05:17:58 i liked obj-c :) Feb 24 05:18:03 oh dear ... Feb 24 05:18:11 The syntax makes me shake. Feb 24 05:18:14 Me too! Back when I was writing it on on a NeXt in the early 90s Feb 24 05:18:21 yeah verbose, and no namespaces :( Feb 24 05:19:04 well, seems like swift is catching on like wildfire among ios devs so Feb 24 05:19:22 adoption was going very very well Feb 24 05:19:30 Definitely a stepup Feb 24 05:19:34 Diffs must be hard to read in Objective-C. Feb 24 05:19:40 Still not ready for production though, the compiler crashes a lot Feb 24 05:19:41 objective c is not my most fun lang Feb 24 05:20:48 I think Java gets way more flak than it deserves. We could be using a far worse language. Feb 24 05:20:55 * CedricBeust nods Feb 24 05:21:13 since I started using retrolambda, I can't really complain Feb 24 05:21:34 that nested calling syntax in objc Feb 24 05:21:57 most of the code I had to edit to integrate some stuff on iOS was C++ Feb 24 05:27:23 TacticalJoke: actually, because of the verbosity, lines are often pushed into multiple which makes diffs very incremental Feb 24 05:29:26 granted, it makes diffs larger Feb 24 05:36:14 Whoa, /r/ProgrammerHumor had a somewhat humorous post today. Feb 24 05:36:19 What next -- /r/funny having a funny post? Feb 24 05:36:32 hi. So, can anyone tell me the difference between BluetoothGatt.disconnect() and .close()? One apparently disconnects, and the other apparently closes the device. I've got no idea how these differ though and the documentation doesn't say. Underneath it all disconnecting from a BLE device is just the close() system call on a socket... Feb 24 05:43:31 serviscope_minor look at BluetoothGatt.java Feb 24 05:43:32 What's a way to identify touches between ACTION_DOWN and ACTION_MOVE's? Feb 24 05:44:06 disconnect and close obviously do different things :) Feb 24 05:44:35 ah dig into the source, then. Feb 24 05:44:37 right... Feb 24 05:45:02 close() cleans up resources on the client. you can't use it any more Feb 24 05:45:15 you can connect() disconnect() all day long though Feb 24 05:45:30 huh. Feb 24 05:45:34 Ah Feb 24 05:46:02 er Feb 24 05:46:51 so is there any real difference between close(), followed by discarding any references (i.e. letting the GC do it's work) and disconnect()? I have started digging down the rabbit hole of reading the sources, but this may take some time... Feb 24 05:46:51 the ble docs are the worst, you'll spend a lot of time experimenting :D Feb 24 05:47:00 :( Feb 24 05:47:03 yeah Feb 24 05:47:23 and of course I'm using the buggy, deprecated APIs because, well, no one has Android 5 yet to a first approximation. Feb 24 05:47:24 close unregisters the client, so its important Feb 24 05:47:38 I sadly don't really know what that means. Feb 24 05:47:45 its under the hood Feb 24 05:48:23 what deprecated apis are you using? startLeScan ? Feb 24 05:48:27 yeah Feb 24 05:48:31 without filters Feb 24 05:48:35 because they are broken Feb 24 05:48:58 so, if you od a scan and get a bunch of devices, should one connect() to one and close() the rest? Feb 24 05:49:03 heh yeah, the whole thing is broken. i' still writing up a bug report on some (i think) serious concurrency bugs in the apis Feb 24 05:49:08 or do you only need to close() after a disconnect? Feb 24 05:49:11 oh god no. Feb 24 05:49:14 that too?? Feb 24 05:49:25 its very busted Feb 24 05:49:30 Good luck tracking down those little buggers Feb 24 05:49:52 and the stuff isn't going to be fixed any time soon Feb 24 05:50:10 they can put out a miracle update in 5.1.1 but we'll suffer for years Feb 24 05:50:46 bugger. Well, if you can drop down to Linux syscalls, we could do it ourseles. Feb 24 05:50:54 i.e. reimplement a sane bluetooth stack. Feb 24 05:51:05 thats beyond me Feb 24 05:51:16 or more practical, nick one from Linux that's already been written. Feb 24 05:51:29 i have to work with what people have Feb 24 05:51:29 Someone posted one to the BlueZ IRC a while back. Feb 24 05:51:32 but that requires NDK Feb 24 05:52:19 serviscope_minor do you have BLE experience on another platform ? Feb 24 05:53:53 Linux Feb 24 05:54:12 well, a biy Feb 24 05:54:13 If I can't find my adb.exe in my android-sdk install directory or anywhere else what should I do? I tried downloading it again but I can't find adb.exe anywhere Feb 24 05:54:14 a bit Feb 24 05:54:50 oh so it looks like close() de-registers all the callbacks and so on Feb 24 05:54:58 It's in /platform-tools/ Feb 24 05:55:12 but a connectGatt(...blah...) call will add them back again. Feb 24 05:55:16 -_- Feb 24 05:55:43 g00s: also, I've got some experience from the other end with the Bluegiga stack. Feb 24 05:56:13 TacticalJoke: Thank you! Feb 24 05:56:22 serviscope_minor ah, maybe you know this then. are there any BLE stacks that let you read multiple characteristics at the same time (ATT multi attribute reads) ? Feb 24 05:57:59 er Feb 24 05:58:17 not that I know of Feb 24 05:59:14 Hi guys Feb 24 05:59:24 I have a problem related to ActionBarSherlock’s SearchView. It leaks and stands in memory if I don’t override SearchAutoComplete class’ onCreateInputConnection and return null. Am I missing something? Feb 24 05:59:53 ok. its called a Read Multiple Request Feb 24 06:00:02 yeah Feb 24 06:01:21 I've not seen it as an API call. Feb 24 06:01:27 the iOS guys told me i should do that - i thought erm, do you guys actually have that ? :) Feb 24 06:02:00 then again it's best used for efficiency. Most BLE stacks aren't that efficient: they query the whole tree in one go and do none of the caching. Feb 24 06:02:15 and in fact, there's no need to get the characteristics of any but the services you want anyway Feb 24 06:02:24 but none of them seem to allow you to be more selective. Feb 24 06:02:54 also, I don't think I've ever encountered a device where that request would be a whole lot of use. Feb 24 06:03:28 mostly one just sets notifications. Sometimes one reads a big blob. Feb 24 06:06:03 Hey guys, i have an application, and for some reason, the notification icon isn't the standard icon, it's just a white circle, this is the same in the emulator and on a real device Feb 24 06:06:11 Any ideas as to what that could be about? Feb 24 06:12:09 g00s: also, I'm guessing Android uses write-req not write-cmd, since it has a callback for writes. Feb 24 06:13:00 hm, i'd hate to check the hci snoop log Feb 24 06:15:04 Hi, I'm working on an android NDK application, and for some reason ld will only link to shared libraries but not static ones, is there something special I Feb 24 06:15:11 'm supposed to be doing? Feb 24 06:42:29 Goodnight guys. Thanks for the help again! Feb 24 07:25:51 elo Feb 24 07:26:09 lemonxah: HARRO Feb 24 07:26:24 * lemonxah 's foon broke this morning :( so if you have a oneplus one invite that you are not using .. *wink* *wink* Feb 24 07:26:32 hey thepoosh Feb 24 07:27:15 lemonxah: I have an invite, it's good for 24 hrs Feb 24 07:27:23 if you want it, pm me your email address Feb 24 07:27:52 Don't they open sales every Tuesday or something like that? Feb 24 07:27:54 its good for the next 24 hours or just 24 hours? Feb 24 07:28:15 oh really every tuesday? cause i will only get paid later this week so i couldn't get it today Feb 24 07:28:23 i am a poor man Feb 24 07:28:23 lol Feb 24 07:28:38 lemonxah: I'll be here all week long! Feb 24 07:28:44 cool Feb 24 07:29:08 only other problem is how do i get it here :/ .. Feb 24 07:29:13 thepoosh, you have one of those? Feb 24 07:29:21 yesir Feb 24 07:29:25 good? Feb 24 07:29:28 oh Feb 24 07:29:29 it looks good Feb 24 07:29:29 wait Feb 24 07:29:32 it's on it's way Feb 24 07:29:41 oh when did you buy it? Feb 24 07:29:45 sent it to my uncle and he's bringing it to Israel Feb 24 07:30:00 oh cool Feb 24 07:30:03 ordered last Wednesday Feb 24 07:30:21 wonder how i will get it to me .. do they ship it or do i have to organise my own shipping? Feb 24 07:30:55 where are you from? Feb 24 07:31:14 south africa Feb 24 07:31:24 hmmm, they don't ship there? Feb 24 07:32:06 not a lot of us company does i dont know where they are though Feb 24 07:32:18 lemonxah: http://www.reddit.com/r/oneplus/comments/2i9id5/finally_got_my_new_oneplus_one_in_south_africa/ Feb 24 07:32:39 ask that guy Feb 24 07:32:51 :) Feb 24 07:33:37 i dont have a reddit account heh Feb 24 07:33:44 well, it's free Feb 24 07:33:45 dont know if i want to make one for this .. hmmmm Feb 24 07:33:46 so.... Feb 24 07:33:47 yeah i know Feb 24 07:33:57 i just tend to not want to cause i am stupid Feb 24 07:34:04 lol Feb 24 07:34:32 there are companies that will be a fake address for you in the US and ship it to where ever Feb 24 07:34:45 also ebay Feb 24 07:35:05 oh cool Feb 24 07:36:22 lemonxah: http://www.shipito.com/ Feb 24 07:36:35 this is the one that is recommended in the israeli OPO facebook group Feb 24 07:57:12 do any of you know if GPS data is stored anywhere on the internal SD Feb 24 07:57:34 i'm trying to figure out a workaround for a GPS bug in the ROM i'm running Feb 24 08:14:48 how do you configure the injars for proguard for declared gradle dependencies? Feb 24 08:36:46 happens automatically Feb 24 08:44:29 morning Feb 24 08:45:06 I got a question, what system does androids Location longitude and latitude follow? Feb 24 08:45:17 are those also WGS84? Feb 24 08:57:29 yes Feb 24 08:57:35 probably epsg 4326 Feb 24 08:58:45 or 3857 (those two are commonly used for web maps with lnglat Feb 24 09:03:36 JakeWharton: did gliffy deliver? Feb 24 09:03:50 i have no idea to what you are referring Feb 24 09:04:07 you asked on Thursday about a design program Feb 24 09:04:11 oh Feb 24 09:04:12 i said gliffy is good Feb 24 09:04:16 you seemed happy Feb 24 09:04:18 yes, it did Feb 24 09:04:21 i was very happy Feb 24 09:04:25 yay! Feb 24 09:04:36 it gave me a good static image which I could then move into Photoshop and turn into a half-decent GIF Feb 24 09:04:45 oh Feb 24 09:04:47 cool Feb 24 09:05:05 just animating some connecting lines and making dotted lines walk like ants Feb 24 09:05:06 how expensive (in dev time and effort) would it be to move to an eventBus? Feb 24 09:05:32 it seems like this is going to be the same issue such as with GreenDAO Feb 24 09:05:45 that we are using and not replacing just because of effort estimation Feb 24 09:07:50 thanks KekSi! :) Feb 24 09:21:25 hey thepoosh Feb 24 09:22:35 is it my imagination or does ValueAnimator not run synced with screen refresh?' Feb 24 09:22:38 thepoosh, adding a line in build.gradle doesn't take that long ;) Feb 24 09:22:52 knapper_tech, depends on OS Feb 24 09:23:01 Android version? Feb 24 09:23:08 after I think 17 or 18 the animations are vsynced Feb 24 09:25:23 Must be my imagination. I did enough 3d rendering to unfortunately get super picky about frames. Feb 24 09:27:31 g00s: ! Feb 24 09:27:42 Mavrik: how do you mean? Feb 24 09:28:02 Morning All Feb 24 09:28:10 * thepoosh greets Ankhwatcher Feb 24 09:28:33 * Ankhwatcher is greeted Feb 24 09:28:52 How are you thepoosh? Feb 24 09:29:08 better than yesterday Feb 24 09:29:10 i was sick Feb 24 09:29:18 knapper_tech, well, do an OGL trace. Feb 24 09:29:48 thepoosh: ah, you poor fellow. What ails you? Feb 24 09:30:10 according to my family physician, it's a virus Feb 24 09:30:16 i assume he eliminated the rest Feb 24 09:30:23 and this was the default clause Feb 24 09:32:06 11:22 Mavrik: thepoosh, adding a line in build.gradle doesn't take that long ;) Feb 24 09:32:07 ? Feb 24 09:32:11 JakeWharton: dont think so. proguard complains about missing classes... Feb 24 09:32:12 still pussled Feb 24 09:32:19 * puzzled Feb 24 09:36:23 hey guys Feb 24 09:36:27 I have a tough question Feb 24 09:36:42 Odaym i have a question for you too :D Feb 24 09:37:20 say I have drawn a line from one point to another point on a map, I got driving directions and I've traced that line on the map. I also placed a marker with the icon of a car and I've managed to move the car all along those points which I have Feb 24 09:37:47 how do I make the car turn left and right as its moving on that line Feb 24 09:38:09 what I have is an array of latlngs, that's it Feb 24 09:42:33 just a guess: Feb 24 09:42:45 calculate the slope of the line from 1 point to another Feb 24 09:42:49 apply that rotation to the car Feb 24 09:49:23 Odaym, take the next point, calculate a line and its angle, rotate the car accordingly? Feb 24 09:50:18 hi. i'm trying to use android account manager, but am stuck with the auth token. i successfully get the token from the server, but have no idea how to store or retrieve it Feb 24 09:50:56 for getAuthToken i need to provide an authtokentype which i have no idea where to get it from as i didn't specify it to store the token in the first place Feb 24 09:51:20 i assume the token is being stored as i followed various tutorials on how to do so Feb 24 09:51:54 can anyone clarify what i need to provide as authTokenType when implementing my own account authenticator? Feb 24 09:59:33 anyone? Feb 24 10:01:26 whats the most reliae way to kill a game thread when activity is destroyed Feb 24 10:03:46 ravilov, Im using this answer to do the calculation, Im giving it two latlng points Feb 24 10:03:47 http://stackoverflow.com/a/16340752/764897 Feb 24 10:03:52 the y is lat and the x is long Feb 24 10:04:04 Im getting fine answers, but havent done objectanimator yet Feb 24 10:07:30 is there a way to call the login form whenever i try to get the account (or token) and it's not available? Feb 24 10:08:19 njcomsec: put a flag to your game loop Feb 24 10:08:42 then i just altr the flag on activity pause/destroy Feb 24 10:08:55 hi Feb 24 10:08:57 After each configuration change, the Android system creates a new Activity and leaves the old one behind to be garbage collected. However, the thread holds an implicit reference to the old Activity and prevents it from ever being reclaimed. As a result, each new Activity is leaked and all resources associated with them are never able to be reclaimed. Feb 24 10:09:13 The fix is easy once we've identified the source of the problem: declare the thread as a private static inner class as shown below: private static class MyThread extends Thread { Feb 24 10:09:27 is it a good idea to make it a private static class like this? Feb 24 10:09:31 I have a problem with a toast and a ListView and need some help to fix it Feb 24 10:09:33 http://paste.ubuntu.com/10386535/ Feb 24 10:10:13 Well. I would make it independent of Activity class, for example I could bind gamethread variable to Application class Feb 24 10:10:26 So, when activity is destroyed, nothing would change Feb 24 10:11:13 (but yes, technically you can use static inner class, it has the same effect) Feb 24 10:12:04 However, if there is a chance that game can continue or pause in the background even if the activity is destroyed, I think you should put those things in their own files and keep them in application class instead of activity Feb 24 10:14:48 But ofcourse, if Activity and yout Game thread cannot live without each other, make it a static variable or class. Feb 24 10:15:10 I only get a empty Toast Feb 24 10:20:08 where exactly did you assign a value, dot8? Feb 24 10:20:34 maybe you should paste more code Feb 24 10:21:11 ravilov is right, also you may be showing another empty toast right after the one that’s not empty. Feb 24 10:22:35 the most logical thing would be to check your json data Feb 24 10:26:52 ravilov: when I change the content of the toast Feb 24 10:26:53 eg. the match_score then the toast shows me the match_score Feb 24 10:26:53 but match_goals contians \n is this a reason Feb 24 10:26:53 the json data works fine Feb 24 10:29:01 \n is not the reason Feb 24 10:29:10 the output of match_goals in line 5 Feb 24 10:29:19 oh ok Feb 24 10:30:07 here I get match_goals Feb 24 10:30:08 match_goals = e.getString("match_goals"); Feb 24 10:30:54 then check what exactly you got in there Feb 24 10:43:40 ravilov: sorry, no idea what you mean Feb 24 10:46:52 dot8 how sure are you there is data in that bundle when its being consumed? just Log.d(..) it before you make the toast you will most likely find that it is an empty string Feb 24 10:52:49 lemonxah: ok, I check it Feb 24 10:52:55 just a moment Feb 24 10:57:53 Hey everyone, when using the appcompat library, do you need to check the version and rely on the base component or appcompat component depending on the version OR rely always on the compat component ? Feb 24 10:59:16 for instance if shall I use ListViewCompat and ListView depending on the SDK version or just use ListViewCompat on both ? Feb 24 11:05:24 always on the appcompat Feb 24 11:05:31 it will internally decide which one to use Feb 24 11:14:52 launching my android game today Feb 24 11:15:05 does anybody have some suggestions about promoting the app? Feb 24 11:15:08 to space ? Feb 24 11:15:10 i have no idea about marketing Feb 24 11:17:59 me also .. marketing isn't my strong suite Feb 24 11:18:08 nothing realy is my stron suite .. except maybe sleeping Feb 24 11:18:12 i am really good at that Feb 24 11:20:05 thx lemonxah Feb 24 11:20:18 ok .. Feb 24 11:24:36 Hi! Feb 24 11:25:49 hi Feb 24 11:26:25 I need to download some resources from a remote server in my app Feb 24 11:26:50 they're images and mp3 files, for images I use volley and that works really fast Feb 24 11:27:19 but for mp3 i'm not able to use volley, using input stream instead, which is very slow Feb 24 11:27:40 is there a better way? Feb 24 11:35:35 i call notifyDataSetChanged in my adapter filter for a listview. but the listview only updates when i do something on the ui (close keyboard, scroll, etc) Feb 24 11:35:45 so i don't get live update. how can i fix this? Feb 24 11:40:02 please show code dnano91 Feb 24 11:40:06 pastebinit Feb 24 11:44:12 lemonxah: https://dpaste.de/0jfO Feb 24 11:44:20 i hope it contains everything relevant Feb 24 11:58:00 Can someone help with following issue: how to connect local aar to android library? Feb 24 11:59:48 dnano91, it looks ok Feb 24 12:00:02 connect local aar to android library? Feb 24 12:00:50 had to get eclipse . anyone still on eclipse? Feb 24 12:05:46 lemonxah: for work? i left it years ago Feb 24 12:08:33 yeah same here but i am trying to convert an eclipse android project to android studio so i had to get eclipse Feb 24 12:08:43 its still in eclipse cause the ppl that made eclipse also wrote this source Feb 24 12:10:06 isn't it possible to import it to intellij/android studio? as far as i know it offers migration for android/gradle projects Feb 24 12:10:19 its not a gradle project Feb 24 12:10:31 i need to export it first to get the gradle files Feb 24 12:10:35 i dont want to do it manually Feb 24 12:10:44 oh Feb 24 12:10:55 but i sam stuck having to download some android plugins for eclipse there are some issues Feb 24 12:26:21 here's the code that animates my marker along a path I've drawn on the map and also makes the car rotate according to how it's headed http://pastie.org/9978046 Feb 24 12:27:24 problem is, though, the animations to make that happen are being stacked up inside the loop and then played sequentially outside. Meaning that at line 23 where I set the animation of the car to rotate, the beginning value of the car's rotation is zero and will remain zero until the animations are applied Feb 24 12:27:51 so you get this animation where it always goes back to zero and then to the value you want, because nothing has affected the car yet, the animations are just being gathered at this point Feb 24 12:28:59 alternatively, if I set the car.setRotation to the value I want, this affects the car and gives me the ability to have the car object affected by every change and the animation runs fine, except for the beginning where it flips to the final degree rotation (cause the loop ran and the setRotation was applied a 100 times) Feb 24 12:29:22 quite a predicament Feb 24 12:30:18 In a listview onItemClick fires up after onItemLongClick is fired, even though return is set false Feb 24 12:30:31 sorry return is set true Feb 24 12:30:44 Hi, im looking for a android developer for a project (Android RAT) // PM if intrested! Feb 24 12:31:05 also if i click list item the onItemClick doesnt fire Feb 24 12:31:05 no advertising, jobs or otherwise, qwk Feb 24 12:31:17 kk sorry Feb 24 12:31:30 it onlyfires after the longpress is fired Feb 24 12:33:13 any clues why list item is not clickable? Feb 24 12:33:20 on longclicks working Feb 24 12:33:32 i want both longclick and onclick Feb 24 12:34:01 here is the listi tem layout http://fpaste.org/189668/47811671/ Feb 24 12:34:33 i have set focusable false to imagebutton, set istextselectable to false Feb 24 12:34:40 still the onclick doesnt fire Feb 24 12:37:16 any experiences ?? Feb 24 12:39:43 gud evening sir. how to transform eclipse into android ide Feb 24 12:39:50 plz tell me the process Feb 24 12:40:46 you download something called Android Studio Feb 24 12:40:51 and your Eclipse will become an Android IDE Feb 24 12:41:29 i downloaded android sdk n adt from developer android Feb 24 12:41:52 and i made the needed changes in the eclipse Feb 24 12:42:04 but my eclipse is not running properly Feb 24 12:42:22 anyone using ActionBarSherlock’s SearchView? Feb 24 12:42:24 Hey guys, is there any facebook application I can use for debugging purposes? Feb 24 12:42:32 don't use Eclipse Feb 24 12:42:39 ADT and Eclipse are not supported by Google anymore Feb 24 12:42:43 use Android Studio Feb 24 12:42:44 I wanna implement a sharing function in my app, but I do not wish to create fb api keys and app for this reason only Feb 24 12:42:48 k Feb 24 12:43:03 then i should dwnload android studio Feb 24 12:43:09 u mean to say Feb 24 12:44:43 having hard day with onclick in listview :( Feb 24 12:45:03 is android studio ok for running android programs Feb 24 12:45:32 no its good for Python Feb 24 12:45:38 that's why it's called Android Studio Feb 24 12:46:11 :-D Feb 24 12:47:10 no the software was not working properly in my laptop so i thought of shifting eclipse into android one Feb 24 12:47:29 no Feb 24 12:47:42 u tell me plz what should i do Feb 24 12:47:45 i do that Feb 24 12:48:00 no Feb 24 12:48:01 i need to make an android app i have threed ays Feb 24 12:48:02 you find out Feb 24 12:48:23 ServerCrash, why dont you just remove the onItemLongClickListener first and make the onItemClickListener work Feb 24 12:48:55 whats that Feb 24 12:49:35 Odaym, did that, basically onItemClickListner doesnt fire if i click, it only gets fired after onItemLongClickListner is fired Feb 24 12:49:54 how can onItemLong fire if you haven't implemented that Feb 24 12:50:05 remove its implementation and see if onItemClickListener will fire fine Feb 24 12:50:33 plz tell me what should i do for making android app Feb 24 12:50:46 you can't make an android app dude Feb 24 12:50:49 you don't have what it takes Feb 24 12:50:51 quit now Feb 24 12:50:59 Odaym, well if i remove onItemLong then also onItemClick Feb 24 12:51:05 doesnt get fire Feb 24 12:51:18 if onItemClick is not firing, there's something very wrong Feb 24 12:51:35 it cannot not fire Feb 24 12:51:56 yes its not firing when i touch, it gets fired interally after the longclick is fired Feb 24 12:52:12 always quiting not the solution Feb 24 12:52:18 what you're saying doesn't make sense, sorry I cannot understand Feb 24 12:52:20 plz show some light Feb 24 12:52:21 so probably onlclick event is not getting registered for listview item Feb 24 12:52:57 u just tell me the process, rest i will do Feb 24 12:53:47 Odaym i am sure some other item is capturing the onclick event...is there is any method to debug which layout item is receiving onclick event Feb 24 12:54:49 Maybe someone can halp with android gradle plugin. I have following issue: want to connect local aar to android library project. using repositories {flatDir{}} but during compile gradle looks for my aar in repo1.maven.org. When i move this repo declaration to main project - everything ok. Is it possible to connect local aar to android library project? Feb 24 13:12:38 once again I can t find the error Feb 24 13:12:43 http://nopaste.linux-dev.org/?442983 Feb 24 13:14:26 on line 135 I set match_goals Feb 24 13:14:27 on line 53 I want to get match_goals in the toast, but this does not work, why? Feb 24 13:15:55 result of "match_goals":"Ramos (34)\nKagawa (41)\nAubameyang (78)\nSorg (90)\n" Feb 24 13:17:59 hi, is it possible to use a custom spanstyle on a textfield in a remoteview? Feb 24 13:22:53 aaearon, no Feb 24 13:24:11 so the only way to support custom fonts is to render the text as an image? Feb 24 13:24:25 using actionbarcompat how can i display a 'next' button with text? the likes you see on forms (e.g. when configuring android for the first time) Feb 24 13:25:08 or is there a better way to do this? Feb 24 13:26:23 compound drawables Feb 24 13:26:35 has nothing to do with appcompat Feb 24 13:35:32 no one? Feb 24 14:07:25 Hello. Feb 24 14:08:17 hi guys, got a question for experienced android developers Feb 24 14:08:41 released an android game.. it got published just a few moments ago! please play and let me know? :) goo.gl/kBo30i Feb 24 14:08:41 I know that in iOS, web apps are forbidden from the appstore Feb 24 14:09:08 by webapps I mean apps that just open up a webview and your whole app experience is governed by some external website and not the native app Feb 24 14:09:25 are such apps also forbidden on google play? Feb 24 14:09:27 I am trying to use a in my activity_main.xml in Android Studio but I get the error 'java.lang.ClassNotFoundException: android.view.vector' when I run the app. The Vector class comes from API level 21, Lollipop. I already set my sdk version to 21 and I rebuilt but that didn't help. What do I need to do to make the Vector class recognizable? Feb 24 14:10:11 do I need to make a native android app as a front-end to my already existing web platform? Feb 24 14:13:01 just found about WebView, I guess this covers it Feb 24 14:15:16 Yeah. Feb 24 14:19:45 thanks :) Feb 24 14:21:03 * Mittendeep wakes up Feb 24 14:23:05 * VnM tries to stay awake Feb 24 14:24:39 If I have a couple of classes already built and functioning is it trivial to make them run on different threads on launch, or do I need to take that into consideration when creating the classes? Feb 24 14:36:10 36137571 Feb 24 14:41:15 MikeWallaceDev: are you that lonely ? Feb 24 14:41:23 I am. Feb 24 14:41:51 I'm actually expecting someone else to react to that :) Feb 24 14:42:10 Hiya MikeWallaceDev Feb 24 14:42:16 you are not alone! Feb 24 14:42:28 #ForeverAlone Feb 24 14:43:04 MikeWallaceDev: NOOOOOOOO Feb 24 14:43:07 WE LOVE YOU!!! Feb 24 14:43:09 https://code.google.com/p/android/issues/detail?id=78377 Feb 24 14:43:11 :( Feb 24 14:43:15 :D Feb 24 14:43:39 Actually... I's Romain Guy's ICQ ! hahaha I just found it on an old blog of his :D Feb 24 14:44:05 cool story Feb 24 14:44:13 ;) Feb 24 14:56:05 hi,i need 2 tables and aprx 15 field for my sqlite database and i decided to use greenDao. What do you think ? i don't know anything about it.I made some research but i want to know your opinions Feb 24 15:07:00 for unit tests, what do you do if the code you're testing uses some android calls such as android.util.Log? Feb 24 15:10:39 sorry sci-fi I've never tried it :-/ Feb 24 15:14:50 Hey guys, i have an application, and for some reason, the notification icon isn't the standard icon, it's just a white circle, this is the same in the emulator and on a real device Feb 24 15:14:51 Any ideas as to what that could be about? Feb 24 15:15:09 so i hit an issue just now. RuntimeException: Stub! Feb 24 15:15:27 what would fix this? InstrumentationTestRunner? AndroidTestCase? Feb 24 15:15:50 Norrin, google tells me you're not running your app inside of an emulator. Feb 24 15:15:56 this document is not getting to the point of answering what those two options actually accomplish Feb 24 15:16:03 http://stackoverflow.com/questions/8982631/error-java-lang-runtimeexception-stub-in-android-with-fitnesse-testing Feb 24 15:16:10 Question isnt all that relevant, mostly the answer Feb 24 15:16:36 zack6849, yeah, i know. i want to know what the solution is. InstrumentaitonTestRunner, or AndroidTestCase Feb 24 15:16:43 ? Feb 24 15:16:44 zack6849 i are you testing on nexus4 / Lolipop Feb 24 15:16:50 Oh, pardon me, perhaps i should read up first, lol Feb 24 15:16:56 ServerCrash, yes, i think Feb 24 15:17:06 im not sure of the emulator, but the device i used is running lolipop Feb 24 15:17:26 for some reason i am also facing similar issue on nexus4/lolipop Feb 24 15:17:29 yeah, so is the emulator. Feb 24 15:17:45 joy, i presume you've had little to no luck as well? :D Feb 24 15:17:54 zack6849, it's a unit test, so as far as i know, it has to run in the jvm. so i'm trying to find out what InstrumentationTestRunner and AndroidTestCase actually accomplish Feb 24 15:18:25 I'm afraid im fairly useless here, as i know nothing of testing Feb 24 15:18:34 no prob Feb 24 15:18:57 thanks for trying. unfortunately i'm usually on app icons also Feb 24 15:19:05 . . . useless* on app icons also Feb 24 15:21:02 hm Feb 24 15:21:31 ServerCrash, someone on SO said that changing your icon size to 16x16 and using only white worked for him, but still, that's annoying :| Feb 24 15:22:27 zack6849 ya sounds odd, given that otherapps have colored ones Feb 24 15:22:33 indeed Feb 24 15:22:42 perhaps because they werent compiled for that API level though Feb 24 15:22:50 i might just push my api level back and see if that works :D Feb 24 15:23:17 So frustrating, Listview onItemLongClick works but onItemClick doesnt :( Feb 24 15:23:44 can we have both onItemClick and onItemLongClick for a item in listview ? Feb 24 15:25:28 yes Feb 24 15:25:57 Can some one look at this list item layout http://fpaste.org/189668/47811671/ and let me know if i am missing anything...onClickItem is not working Feb 24 15:26:39 ormlite or greendao, which one has a good community support ? :D Feb 24 15:27:11 onItemClick does automatically fires when OnItemLongClick gets clicked Feb 24 15:27:49 Norrin, those are for on device testing Feb 24 15:28:22 ServerCrash, I don't see an onClick declaration in that layout... Feb 24 15:29:08 MikeWallaceDev: android:clickable="true" Feb 24 15:29:15 list item click are not defined in layout Feb 24 15:29:23 ServerCrash, I don't see an onClick declaration in that layout... Feb 24 15:29:45 and then i am doing mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() { Feb 24 15:29:54 do capture the click event Feb 24 15:29:56 pfn, there's no list in there either :D Feb 24 15:30:29 MikeWallaceDev thats list item layout Feb 24 15:30:50 oh! Feb 24 15:31:00 I thought it was the main layout... Feb 24 15:31:13 and i have android:longClickable="true" and android:clickable="true" set in ListView too Feb 24 15:31:26 then... what does this layout have to do with anything? :D Feb 24 15:32:08 need more codez to evaluate Feb 24 15:32:44 onItemLongClick works fine and when its completed it for some reason activates onItemClick , but if i click on the screen onItemClick doesnt get fired Feb 24 15:33:28 MikeWallaceDev , googling around makes me feel that its issue with layout as someother item is getting focused or something like that Feb 24 15:33:49 there are some queries already posted with similar issue where using imagebutton etc has caused similar issue Feb 24 15:34:18 i have tried all those methods but still no success. Like focusable=false Feb 24 15:34:24 etc etc Feb 24 15:35:48 like http://stackoverflow.com/questions/6703390/listview-setonitemclicklistener-not-working-by-adding-button Feb 24 15:41:15 so the material design icons are Attribution 4.0 International? That means attribution has to be made somewhere in the app? Feb 24 15:44:58 mmk yeah idk they don't seem huge on it, but you could I guess Feb 24 15:45:03 https://creativecommons.org/licenses/by/4.0/ Feb 24 15:45:11 However you want to interpret that Feb 24 15:47:20 hi, in oncreate i start a new activity (because the user is not logged in), but the method continiues even though i call finish(). it crashes (cause there's no account) but then the login activity appears Feb 24 15:48:07 https://dpaste.de/x6PU this is the part in onCreate Feb 24 15:48:59 dnano91: unless you kill an application a function will always terminate Feb 24 15:49:32 yiati: so what would be the best solution? put everything after if() in an else? Feb 24 15:50:04 you can always return if you want a function to terminate Feb 24 15:52:29 okay, thanks Feb 24 15:54:00 yiati I'm really surprised they are CC attribution. I hadn't even checked. Feb 24 15:57:18 pfn, interesting Feb 24 15:59:21 if you want to test on the jvm, use robolectric Feb 24 15:59:33 pfn, robolectric crashes for me.... Feb 24 15:59:49 then make it stop crashing Feb 24 15:59:51 this sucks Feb 24 16:00:05 works fine for me Feb 24 16:06:35 pfn, https://github.com/robolectric/robolectric/issues/1520 Feb 24 16:07:12 and in the source it's commented that it's a known crash. but no hint as to why. or how to remedy Feb 24 16:13:27 Norrin, looking g at their code, you're testing on the wrong thread Feb 24 16:13:54 pfn, what's "the wrong thread" Feb 24 16:14:00 it's not ui code. there's a wrong thread? Feb 24 16:16:22 pfn, just fyi those line numbers are in reference to robolectric v2.4 Feb 24 16:17:15 otherwise, make sure you initialize the shadow application Feb 24 16:23:42 Hi, i am trying to implement this : https://github.com/neokree/MaterialTabs but i have some problems. I am using a navigation drawer and i need the Tabs on only one Section. I can see the TabHost when i open it, but no Tabs. This is my class : http://pastebin.com/5P7Fkm0A Feb 24 16:30:59 Hi all! Feb 24 16:31:22 I was wondering whether I could pick your brains about an application I'm developing Feb 24 16:31:50 I want to find out the amount of time a certain bluetooth device has gone out of range for Feb 24 16:32:06 Seconds (even milliseconds) matter in my application Feb 24 16:32:06 pfn, is there an example of how to do that? Feb 24 16:32:31 I see shadowactivities but not shadowApplications Feb 24 16:32:33 Norrin, probably in their wiki Feb 24 16:32:40 currently I'm doing a continous bluetooth discovery, but I'm limited by Androids 12 second inquiry interval Feb 24 16:32:57 Is there anyway to reduce that? Or a better way to do what I am proposing? Feb 24 16:36:40 Kiet1: assuming you can get notified of when the bluetooth connection gets connected/disconnected, couldn't you just use timestamps and just calculate the delta between the two? Feb 24 16:37:33 Kiet1: i.e. currentTime - lastConnectedTime Feb 24 16:37:38 or something like that Feb 24 16:44:38 alexfu: Hi! Thx for your suggestion, but it implies that I have to have connected to the remote device in the first place. Feb 24 16:45:53 alexfu: I want to get readings from the device (address and RSSI) as soon as possible, I imagine the fastest way for that is using bluetooth discovery Feb 24 16:46:01 alexfu: rather than connecting to it first Feb 24 16:48:28 Hi, i am trying to implement this : https://github.com/neokree/MaterialTabs but i have some problems. I am using a navigation drawer and i need the Tabs on only one Section. I can see the TabHost when i open it, but no Tabs. This is my class : http://pastebin.com/5P7Fkm0A Feb 24 16:48:35 Hi guys. I create a TextView object in onCreate(), append it to the RelaiveLayout (main content view layout) and try to set its position with setX() and setY(). In the end the position is wrong. Let's say I set x:100; y:200 but in fact it's positioned with x:205;y y:500... Feb 24 16:48:39 Any ideas? Feb 24 16:49:22 I don't even see any connecition between the initial coordinate values and the resulting ones... Feb 24 16:51:44 Does anybody know if we can reduce Android's bluetooth discovery interval (12 seconds)? Or somehow interrupt discovery and begin a new one? I am looking for bluetooth signal polling with a 1second interval maximum Feb 24 17:10:35 hi Feb 24 17:26:22 hey Feb 24 17:28:02 I'm trying to use HttpPost to retrieve a result from a web page, and I use httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs, "nb_NO.UTF-8")); Feb 24 17:28:03 sup Feb 24 17:28:44 but nb_NO.UTF-8 is not supported and I get java.io.UnsupportedEncodingException . Any ideas? Feb 24 17:30:18 Quacked have you tried Retrofit Feb 24 17:31:35 nah.. I really don't want to do too much since it works otherwise perfectly Feb 24 17:31:46 looking for an easy fix :) Feb 24 17:32:12 I'd look into Retrofit if you're going to be doing a lot of web calls. Otherwise, why not just use "utf-8"? Feb 24 17:32:26 No more easy fixes all the time if you use Retrofit Feb 24 17:32:29 uTF-8 also throws UnsupportedEncodingException Feb 24 17:32:37 hmm, any good ideas on how to mock http stuff in tests? Feb 24 17:32:45 hey, I'm trying to build a custom rom but make command returns this error "build/core/java.mk:23: *** cts/common/device-side/device-setup: Invalid LOCAL_SDK_VERSION 'current' Choices are: . Stop." Feb 24 17:32:51 its worked for two years without issues :/ Feb 24 17:32:56 any pointers? Feb 24 17:34:28 hi all, is there a way to replace a staged rollout apk with another one with a lower percentage release? Feb 24 17:37:03 quinnjn, the site uses nb_NO.UTF-8 Feb 24 18:08:30 How should I be passing in my paramaters for line 107? Trying to pass in a collection of treasure objects. http://pastebin.com/UATY0NKd Feb 24 18:11:55 Hi! I finally managed to build V8 for android as a standalone library. Now I'd like to test with GenyMotion. As far as I know, GenyMotion uses the X86 architecture. Does it mean I need to build V8 for X86 if I want to use it with Geny Motion ? Thanks! Feb 24 18:12:37 Mittendeep, looks like that methods signature is blank, so pass nothing Feb 24 18:15:41 hi guys, the now recommended way to get position is to use google play services Feb 24 18:15:51 I have a static class of variables i initialize with a context, like resources, since I dont want views decoding resources multiple times for the same thing. Is this premature optimization / anyone do something similar? Feb 24 18:16:02 because of battery, accuracy etc, however, it never asks the user to turn gps on if it's disabled Feb 24 18:16:09 should I do that in the old way using location manager? Feb 24 18:16:34 how can i run an intent to call a browser passing a HTML code instead of an url? if i tell Uri.parse(url) to parse “html” instead it gives me an error: http://paste.ofcode.org/YyZMFLmDbyhWc6NhtJ74Gn Feb 24 18:16:37 alex88: you dont necessarily need to turn on location, you can get old location values and see if they are temporally close enough Feb 24 18:16:51 lasserix: otherwise use the location manager? Feb 24 18:16:58 yeah probably Feb 24 18:17:14 oh ok, my question was to know if there is a newer way to do that Feb 24 18:17:18 it doesn't seems so :) Feb 24 18:17:20 thanks lasserix Feb 24 18:17:21 Sweet, turns out it’s impossible to update the UI of an activity during a configuration change any time *after* onSaveInstanceState(). Feb 24 18:17:35 Which means no loss of UI updates in async callbacks Feb 24 18:18:25 alex http://pastebin.com/j7wwBWEf Feb 24 18:18:39 single shot, you can do thru an anonymous implementation of the location callback interface Feb 24 18:18:47 usually takes a second or two Feb 24 18:18:55 lasserix, best to not keep to many strong references of all your static resources that you load, unless all will be used. As far as multiple getResources() call, keep everything in scope. So yes avoid multiple calls, but keep the variables in scrope of usage, then let em be GC'd when outta scope, if that is what you are asking Feb 24 18:18:56 note that grabs cell first, then gps since i only needed cell Feb 24 18:19:36 whatitis: i mean for like colors, why do context.getResources.getColor(R.color.x) a thousand times when i can just do it once and reference it statically? Feb 24 18:19:51 its not going to cause a memory leak and it's a single int so memory is not an issue Feb 24 18:20:58 keep em in scope of use, so if entering territory of R.color.spicy_flamingo, pull it to a local variable of whatever method needs it, then just use that local variable Feb 24 18:21:20 lasserix: thanks for that! however I need to handle the "no-gps enabled" situation Feb 24 18:21:30 so open a box telling the user to enable gps Feb 24 18:22:03 seems like getResources() on colors shouldn't be to expensive as it's just referencing a static int of R.color.x, but less method calls the better Feb 24 18:24:12 lasserix, i do what you are wanting todo, say i have a custom view, in the constructor/init of the view i load all usable resources for Paints and such, but if later needing other resources such as Drawables, i'll add a method to my class to load from resources my drawable to a class instance drawable i can later just reuse Feb 24 18:25:26 alex: http://pastebin.com/HUJsEr6N Feb 24 18:25:28 trevor-e: you there? I got a bit further on the story Feb 24 18:25:36 it's all about keeping things in the right scope and creating as few objects as needed, and letting the rest get GC'd Feb 24 18:25:52 whatitis: "class instance drawable"? Feb 24 18:25:59 well... getColor() does still do the typed-value dance, and seems to go through the normal resource loading paths. probably mostly light weight, but not free. Feb 24 18:26:35 well the whole point is the view is complicated enough, so i wanted to optimize out anything i could Feb 24 18:26:54 like in my class MyClass{ Drawable whatEverDrawable; void loadDrawable(int drawable){whatEverDrawable = context.getResources().get..... etc.. Feb 24 18:27:47 samskiter: oh yea? Feb 24 18:28:54 lasserix, it's all about just keeping everything in scope of use. Just optimize to have what you need when you need only when you need :) But i'm just squawking, if you are curious about some code you are working on that you think can be faster, paste it and see if others can see things you didn't Feb 24 18:29:40 trevor-e: yea, you might already know this…. anyway, during a config change, onsaveinstancestate is called sequentially with destory and launch. this means you can’t lose UI state on an activity during a config change. so if that’s your only concern, no need for pausehandler. Feb 24 18:30:01 trevor-e: but if you care bout backgrounding, thats still got a questionmark Feb 24 18:30:09 With working with Android, one rule I'm trying to perfect is, minimize objects, and reuse as many as can be Feb 24 18:31:37 trevor-e: i.e. if you can treat a user leaving the app as the same as cancelling your operation, no need for the pausehandler to buffer responses Feb 24 18:31:39 But a lot of the times, I go with get it working, then follow that rule :) So i'll write tons of boilerplate and just expensive stuff, then refactor Feb 24 18:31:46 yea backgrounding is what I'm interested in Feb 24 18:32:15 trevor-e: so the case where user starts request, pressed home and then resumes the app? Feb 24 18:32:35 yea Feb 24 18:33:04 with "don't keep activities" to trigger the system killing your activity Feb 24 18:33:56 trevor-e: what kind of request? the requests i think this really matters to are onces that are solely for updating ui…. Feb 24 18:34:47 in which case your activity would be gone for good no? or does it still use onrestore instancestate? Feb 24 18:34:48 in my app a user can "book" something, which takes time for the server to process hence the long request Feb 24 18:35:26 trevor-e: I see, could you treat a user hitting home as equivalent to them cancelling the request? Feb 24 18:35:41 im using viewPager with FragmentStatePagerAdapter , how can i update all the data in the viewPager ? Feb 24 18:35:53 what you mean? Feb 24 18:36:19 john67 call notifydatasetchanged and return the new data in the callbacks of adapter Feb 24 18:36:34 once a booking request is sent there's no canceling it, the user will be charged Feb 24 18:36:44 it's an edge case for sure Feb 24 18:36:46 can Uri.parse() parse html strings? Feb 24 18:36:51 but I see crashes for it in crashlytics Feb 24 18:36:57 samskiter: oki, i will try that Feb 24 18:36:58 trevor-e: yea, so when you open the app, does it not do some kind of “get my requests” from the server? Feb 24 18:37:06 presumably, a user will multi-task to a memory-hog like chrome to wait for the booking to finish Feb 24 18:37:20 trevor-e: yea i was imagining exactly that Feb 24 18:37:23 and android then kills my app Feb 24 18:37:24 trevor-e, use a service with foreground priority if it's that important that it doesn't crash Feb 24 18:37:35 yea I might have to refactor to doing that Feb 24 18:37:41 luist: I don't see why it would... a uri is a specific syntax, html is entirely different Feb 24 18:37:43 you don't have to refactor Feb 24 18:37:46 just launch a service Feb 24 18:38:01 trevor-e: under the hood robospice uses a service... Feb 24 18:38:01 groxx: it does parse an html file tho Feb 24 18:38:07 your app will be lower on the kill priority list while it has a service running Feb 24 18:38:30 oh that's what robospice does? didn't get a chance to investigate Feb 24 18:38:31 trevor-e: think i remember reading something or seeing something along the lines your on. If by book you mean just change state,such as selected,enabled etc, just some flag. Then 'book' your item, send your request, mark item as pending til request has completed. Request is completed by a intentservice launched on 'book'ing. intentservice writes requestReturn; activity checks pendingItems Feb 24 18:38:32 for completion Feb 24 18:38:35 luist: by "parse an html file" do you mean "parse the uri which points to a file containing html"? Feb 24 18:38:39 long rant, i got lost :) Feb 24 18:39:05 trevor-e: yea it uses a bound service that also ‘starts’ itself to prevent it dieing during an ongoing request. or at least that’s my current understanding Feb 24 18:39:15 bound services ftl Feb 24 18:39:29 pfn: really? what’s up with them? Feb 24 18:39:41 pfn: they are a great way to say “hang onto this resource! im using it!” Feb 24 18:39:43 samskiter, there's no reason to use them unless IPC is involved Feb 24 18:40:04 other than confusing your lifecycle and callback hell Feb 24 18:40:10 if that's your goal Feb 24 18:40:35 callbacks on callbacks on asynchronous lifecycle D: Feb 24 18:40:35 https://github.com/pfn/qicr/blob/master/common/src/com/hanhuy/android/irc/LifecycleService.scala Feb 24 18:40:36 pfn: i don’t see it as that confusing. you pass it a listener object and it calls back on it later Feb 24 18:40:41 pfn, you said he'll be lower on kill priority, but think he set in debugging to destroy/kill activities Feb 24 18:40:56 whatitis, destroying activities won't affect anything Feb 24 18:41:05 well, if you depend on updating ui in the destroyed activity, sure Feb 24 18:41:08 it'll go bonkers Feb 24 18:41:20 but any thread/async task work you have attached to the activity will continue Feb 24 18:41:33 just stating your statement as not working Feb 24 18:41:51 whatitis, nope, works as intended Feb 24 18:42:25 just because the activity object has been destroyed, doesn't mean the object has been removed from heap, nor any associated code gone Feb 24 18:42:44 trevor-e: im thinking something like this pattern https://github.com/samskiter/BoundServiceTest Feb 24 18:43:25 I'm saying, you say start service because it'll have activity on lower kill list, but he has his OS set to kill activities, doesn't help meaning he needs a service. Sounds more like an IntentService answer Feb 24 18:43:46 huh? Feb 24 18:43:59 destroying activity != killing process Feb 24 18:44:01 period Feb 24 18:44:03 <_genuser_> would you guys rather enable device encryption on android or use specific applications to encrypt specific data files? Feb 24 18:44:12 trevor-e: where your request would be of the ‘long request’ variety. but this is roughly equiv to what robospice does anyway i think Feb 24 18:44:35 trevor-e: although i’m still a little confused why you can’t cancel the request? Feb 24 18:44:36 <_genuser_> I see pro of doing device level encryption that you don't have to worry about the app doing it correctly. Feb 24 18:44:52 <_genuser_> on the other hand, if the device is already booted, the data is already being decrypted as needed. Feb 24 18:45:31 service still needs a thread, why not just use an IntentService which is built for this purpose of one off shot Feb 24 18:45:35 pfn: what makes boundservice so confusing? Feb 24 18:45:51 samskiter, who said confusing? it's terrible to write code for Feb 24 18:46:05 _genuser_: different scenarios. though personally I'd say encrypt the device before worrying about sub-things, because that way there can't be any leaks to e.g. caches that your app doesn't control. Less of a problem on android, as there's no swap file, but still true in general. Feb 24 18:46:08 there's little reason to write a ton of boilerplate for it, unless you need IPC Feb 24 18:46:21 Do anyone have experience with RemoteMediaPlayer.requestStatus(...) https://developer.android.com/reference/com/google/android/gms/cast/RemoteMediaPlayer.html#requestStatus(com.google.android.gms.common.api.GoogleApiClient) should i call RemoteMediaPlayer.requestStatus(...) on a background thread ? or do the RemoteMediaPlayer handle this ? Feb 24 18:47:04 <_genuser_> groxx: yeah, just thinking back to my "work document repository on personal phone" app. Feb 24 18:47:05 samskiter: by the time I try to cancel a request the user may have already been charged Feb 24 18:47:26 trevor-e: shouldn’t your server be master on this and make it atomic? Feb 24 18:47:29 _genuser_: ah. yeah, there you have different security needs - encrypting at the boundaries makes sense. Feb 24 18:47:42 <_genuser_> groxx: device level encryption doesn't help if the phone is already booted. but app-level encryption doesn't help if it's not done right. Feb 24 18:48:01 trevor-e: the request arrives. or it doesnt. if it arrives, yo make the payment. a user could just as well enter a tunnel as exit the app Feb 24 18:48:16 <_genuser_> groxx: my work android phone is not encrypted but we use Good for Enterprise for work email and I don't know if that encrypts the stored emails, etc. Feb 24 18:48:22 _genuser_: yep. and app-level encryption can be rendered useless by non-encrypted cache data, hence why I say encrypt the device first :) Feb 24 18:48:46 oh you mean cancel the request before the device actually sends it Feb 24 18:48:57 _genuser_: dunno. most crypto on android is complete snake-oil, though it's definitely possible. Feb 24 18:48:58 I thought you meant the request is already made, then try to cancel it Feb 24 18:49:06 (in practice, not in theory) Feb 24 18:49:20 <_genuser_> groxx: altho, only if the app ever contained an unencrypted cache. otherwise, if it's disk to memory then decrypted for use but never stored, it might be fine. Feb 24 18:49:22 trevor-e: i mean whatever is going on asynchornously, cancel it. Feb 24 18:49:23 by made I mean packets sent to the server, not queued up to be sent Feb 24 18:49:31 <_genuser_> groxx: altho, noone can really ensure that about third-party apps. Feb 24 18:50:37 _genuser_: yeah. and I don't see a reason why an OEM wouldn't e.g. decide that it's nicer to "deep sleep" by hibernating (save ram to disk, load ram at boot). you can't quite trust the OS either, since it's not something you really control. Feb 24 18:50:53 android 5 improved whole device encryption - before that i guess it was iffy Feb 24 18:50:56 where should i write down a file to re-open it right after? Feb 24 18:51:13 _genuser_: but yadda yadda, I'd say sure, separate encryption for a work-app's contents makes perfect sense. Feb 24 18:51:27 <_genuser_> groxx: intersting point about hibernating. altho, do android phone hibernate? Feb 24 18:51:34 trevor-e: so the user exits the app, you cancel the request, but it still manages to get through. you reopen the app and your first port of call would be to get the latest purchases information from the serve Feb 24 18:51:40 _genuser_: not afaik Feb 24 18:52:08 trevor-e: i guess you’re not going to get the “success” or “failure” screen in that case…. Feb 24 18:52:23 <_genuser_> groxx: and also, it's really more of a "learner project". I don't really envision going all out and writing a "work vault" where we can copy off work stuff, when we can just email it ourselves and read it on teh device. Feb 24 18:52:29 _genuser_: some do a weird "quick boot" (HTC?), but I forget what exactly that was. I don't think it's hibernating anyway, I think it's closer to a deep ram-sleep state. Feb 24 18:52:44 <_genuser_> if they were worried about data security, they would have prevented emailing on un-encrypted devices, etc. Feb 24 18:52:51 true :) Feb 24 18:53:09 O.o Feb 24 18:53:16 what. Feb 24 18:53:22 everything ever. Feb 24 18:53:44 <_genuser_> I got tired of my gridview projects, loading expense reports, and images project. so I moved to my other fun project altho now I"m realizing it's pretty useless to implement. Feb 24 18:54:10 <_genuser_> might take a break for a while and look into material design or something completely different. Feb 24 18:54:20 luist: is it a semi-permanent file? you can do cache dir, or files directory Feb 24 18:54:29 luist: those will be inside your apps folder, only visible to your app Feb 24 18:54:46 _genuser_: I wish you luck. I don't totally understand styles / how to use them without flipping out and killing everything. Feb 24 18:55:00 lasserix: it should be temporary… im just storing the string in a file because i cant find a way to run an intent passing the html code, but a html file Feb 24 18:55:20 <_genuser_> groxx: the biggest problem with material design is: it's just a recommendation. there's not clarity in what's already implemented and what's upto you to implement. Feb 24 18:55:23 luist: so you can do context.getCacheDirectory and write it there Feb 24 18:55:24 samskiter: yea I think the best solution would be to modify my server api so that I can async poll an order status. that way even if the previous network connection failed due to app being killed or w/e, but the order still went through, then I can just request the details again Feb 24 18:55:25 <_genuser_> groxx: I think that really throw a lot of people off. Feb 24 18:55:33 <_genuser_> s/throw/throws/ Feb 24 18:55:37 trevor-e: after onsaveinstancestate, the system can write your activity to disk and completely kill your application (including your pausehandler which has queued the sucess/failure), then sometime later recreate the activity from disk. you need to deal with that right? so maybe your request should be going into your model. the activity stores which transaction it is paying for in it’s onsaveinstancestate. when it’s recreate Feb 24 18:55:38 if it finds that the model has marked that transaction Feb 24 18:55:53 _genuser_: yeah, I can see that. tbh I wonder if they're waiting for some patterns to emerge so they can add them to appcompat or something. Feb 24 18:56:12 I'd much prefer them doing that, rather than baking it into the SDK for forever and ever, 'till death do us part, amen. Feb 24 18:56:18 samskiter: on save instance doesn't go between process cycles, just between pause / resume Feb 24 18:56:32 <_genuser_> groxx: probably. but it would have been nice for google to just make an implementation. I mean why dictate what to do and leave it up to users. Feb 24 18:56:47 <_genuser_> groxx: each will do it their way and some will be slow and some fast. and overall android experience will vary from app to app. Feb 24 18:56:47 _genuser_: cause then it would be ios Feb 24 18:56:53 lasserix samskiter: saved instance state goes between process cycles. maybe I missed an important part of that conversation though? Feb 24 18:56:56 I think you're missing what "guideline" means. Feb 24 18:57:08 Material is a design guideline, not law. Feb 24 18:57:35 <_genuser_> understood. I stated that above. then added my opinion that it would be nice to go ahead and provide an implementation too. Feb 24 18:57:35 lasserix: okay thanks Feb 24 18:58:00 <_genuser_> because each one doing it their way, will ultimately result in different user experience. Feb 24 18:58:10 samskiter: oops, groxx is right. what i meant to say is restoreinstancestate is only called if the os killed your app, not if the user quit out of it Feb 24 18:58:36 <_genuser_> but I hardly think google cares about all that. they only wants to "can haz userz"!! Feb 24 18:58:40 _genuser_: i much prefer freedom to do things than be forced to do things. Feb 24 18:59:08 <_genuser_> lasserix: if they provide an implementation, and you'd like to do it your way, you'd be free. Feb 24 18:59:36 <_genuser_> lasserix: it wouldn't be any different than the multiple snackbar libs out there. just because one wrote it doesn't mean the rest were restricted to it. they wrote their own. Feb 24 18:59:56 *shrug* Feb 24 18:59:57 _genuser_: yeah and that's what they've done ? Feb 24 19:00:03 lasserix samskiter: just to butt in briefly: you'll get restore on rotation/etc too, and if they hit home -> process dies -> later resume from the recent apps list, you'll get it there too (and this happens IRL, not just with "don't keep activities"). "back"-ing out of activities destroys their saved state though, if that's the question. Feb 24 19:00:08 lasserix: you can use onrestoreinstancestate after a user hits home and then resumes right? Feb 24 19:00:12 lasserix: isnt the method getCacheDir? Feb 24 19:00:16 I think Google has more important stuff to fix in Android than waste time giving incompetent people basic tools. Feb 24 19:00:22 _genuser_: the material design page clearly outlines how to implement material design in your app Feb 24 19:00:28 groxx: yea that was my understanding. Feb 24 19:00:31 ++Mavrik Feb 24 19:01:05 samskiter: no i dont think so Feb 24 19:01:08 <_genuser_> lasserix: I think you're assuming I don't understand that a guideline is just a guideline, which I understand. I just thought an implementation would be nice. Feb 24 19:01:17 samskiter: it'll only happen if the process died though, or don't-keep-activities fakes it for you. normally it'll just resume. Feb 24 19:01:24 samskiter: not all the time, only if the process dies while your activity is in the background Feb 24 19:01:26 <_genuser_> lasserix: still leaving it upto you to implement your own if you so choose. Feb 24 19:01:57 _genuser_: what exactly do you want? a navigation drawer? a toolbar? a set of theme variables you can use to decorate your app? Feb 24 19:02:08 snackbar + fab, probably Feb 24 19:02:08 _genuser_: or an entire set of icons to use? Feb 24 19:02:10 lasserix: but does the same bundle get passed in in oncreate? Feb 24 19:02:21 you know, those two things they use all over in the guidelines, but have no reference for Feb 24 19:02:41 fab is just a button with fancy selector states, yes i wish they had a snackbar but many people have already created them Feb 24 19:02:55 is chris banes still working on appcompat? Feb 24 19:02:59 is anyone ? Feb 24 19:02:59 yeah. and omg yay gradle for making that easier than Eclipse. Feb 24 19:03:12 samskiter: it depends on how the activity dies. Feb 24 19:03:25 <_genuser_> lasserix: I think I've stated that multiple times, clearly. Feb 24 19:03:42 samskiter: http://stackoverflow.com/questions/4096169/onsaveinstancestate-and-onrestoreinstancestate read tge 91 points comment Feb 24 19:03:54 lasserix samskiter: afaik, if the saved state is still around (e.g. it was not .finish()ed), the same bundle is given to onCreate. Feb 24 19:06:22 <_genuser_> lol http://imgur.com/gallery/gd2lO Feb 24 19:06:38 groxx: yes Feb 24 19:06:45 thanks lasserix Feb 24 19:08:59 so trevor-e are you worrying about the case where your request makes it to the server but the response never get’s back to your app? that’s very unlikely right? i think network IO is uninterruptable.... Feb 24 19:09:43 any other case you can mark something in your model that the request is done Feb 24 19:11:49 fwiw: network IO is never guaranteed. ever. it can and will fail, and if it's important that it only happens once you'll need some way to query the server before retrying, because it could have sent -> you missed the response. you're essentially _required_ to do a two-phase commit somewhere if it's important. Feb 24 19:14:09 _genuser_: LOL Feb 24 19:14:22 im using viewPager with FragmentStatePagerAdapter , how can i update all the data in the viewPager ? i have use notifyDataSetChanged() , it doesnt update all the datas Feb 24 19:17:42 john67: what isn't getting updated? Feb 24 19:19:36 back$ Feb 24 19:19:47 im using viewPager with FragmentStatePagerAdapter , how can i update all the data in the viewPager ? i have use notifyDataSetChanged() , it doesnt update all the data Feb 24 19:20:47 samskiter: yes exactly. it is very unlikely, but with an app that has 5mil+ downloads it still happens occasionally. when the response doesn't come back, some users then try to buy it again and get double charged, which costs us money to refund Feb 24 19:20:53 which is why I'm looking into improving this Feb 24 19:21:47 [14:17] john67: what isn't getting updated? Feb 24 19:22:52 samskiter: notifyDataSetChanged() doesnt refresh data changes for the viewPager Feb 24 19:23:18 maybe unless, fragments were added/removed Feb 24 19:24:54 Instead of using fragments, can you use activities in conjuction with the navigation drawer? That is--when you click on an item in the navigation drawer, can you safely start an activity, or do you need to delay it/do it once the navigation drawer closes? Feb 24 19:25:00 trevor-e: interesting… so the transaction doesnt appear in their recent transactions? or they go ahead with the purchase anyway? Feb 24 19:25:06 groxx: whatitis the data inside the viewPager, Feb 24 19:25:35 lasserix i thnk there is a drawer closed listsner - i start the activity when it closes Feb 24 19:26:05 data inside viewpager just sounds like 0,1,2,3,4 of position of fragments Feb 24 19:26:07 g00s how do you do it? set a onCloseTarget and if its not null start or something? Feb 24 19:26:08 yeah otherwise it stutters and looks bad if its closing at the same time Feb 24 19:26:19 john67_: doesn’t the fragmentstatepageradapter callbacks like getCount() get called? Feb 24 19:26:37 whatitis: i just 1 fragments with a textView , Feb 24 19:26:47 samskiter: it does, but it's on a different screen so we are trying to improve that UX as well since it's confusing what happened. then again, these are the same users where 400+ of them put down "Visa" as their name on our payment form Feb 24 19:26:48 samskiter: it does Feb 24 19:27:06 lasserix http://developer.android.com/reference/android/support/v4/widget/DrawerLayout.html#setDrawerListener(android.support.v4.widget.DrawerLayout.DrawerListener) Feb 24 19:27:09 trevor-e: there are a few options. personally though I like: make a client-side identifier for the transaction. send it with the purchase. record on the server. then when you get another purchase request on the server, make sure the identifier isn't being reused. Feb 24 19:27:42 g00s: yeah i have that, but how do you link the listener to which item was clicked? Feb 24 19:27:44 trevor-e: so after relaunch from this kind of situation you could try and land them on the trensactions screen? wwhere are they currently getting put back?back to the payment page? Feb 24 19:29:11 lasserix: it worked perfectly with the location manager Feb 24 19:29:49 now I'm handling the case user closes the "go to enable gps" alert and enables location within notification bar Feb 24 19:29:54 whatitis: u mean i should use public Object instantiateItem(View container, int position) ? Feb 24 19:30:18 since no pause/resume activity event is fired, I've this code https://gist.github.com/alex88/5cb6698b421fdbaf5feb that should be fired, but it doesn't work, it's not called when user enables gps Feb 24 19:30:21 any clue? Feb 24 19:30:58 Hello! Feb 24 19:31:11 Do you guys know if a list of device-specific issues exists? Feb 24 19:32:10 cborgz: many. none are complete. do you have something specific you're looking for? Feb 24 19:32:55 only one that I'm particularly familiar with that I can easily re-find is that there's a reasonable list of camera-specific stuff here: https://github.com/commonsguy/cwac-camera Feb 24 19:35:22 trevor-e: i suppose you know that if you get called with onrestoreinstancestate then you know there is a chance your network IO got interrupted. you only get called with onrestoreinstancestate if your activity got properly destroyed, and in that case your process may have dies and transaction IO may have been interrupted. would that cover this edge case without being too general? Feb 24 19:36:26 Having Internet-connection issues is like living life in slow motion. ;| Feb 24 19:36:37 oops, it should be == null :D Feb 24 19:36:49 hey groxx everything went well, I manage to solve memory problems with help of the tools you said, my memory now is not being leaked :) Feb 24 19:37:06 Gliese: great! how do ya like the tools? Feb 24 19:37:28 TacticalJoke: haha, you mean every and any method may be your last ? :P Feb 24 19:37:37 it’s certainly an interesting problem. Feb 24 19:37:58 for me they were great, they do the job that they are made for Feb 24 19:38:02 groxx: I'm about to run a suite of test on Xamarin Test Cloud. It basically runs Calabash scripts on any device you want. There are about 150 different devices. Feb 24 19:38:44 groxx: But device time costs money, and I don't want to run tests on both a Galaxy S5 and a Galaxy S5 Active, since they're pretty much identical devices. Feb 24 19:39:08 Can I expect my code to work fine on any device? Feb 24 19:39:18 samskiter: yea I'm going to use onrestoreinstancestate to perform an async check of the order Feb 24 19:39:55 cborgz: ah. yeah :\ _generally_ you can expect it to work on any if it works on one (as long as you haven't done something silly, like ignored the API version lint warnings) Feb 24 19:40:40 trevor-e: ah nice. do you still deal with regular backgrounding ok? (i.e. acitivity not destroyed) this wouldn’t call the onrestoreinstance method, but you might not have been able to deliver a success to the activity from your network io Feb 24 19:41:33 groxx: So if I test on one device of each version, AND I test on 1 device / resolution (or DPI bucket), and tablets, I should be fine? Feb 24 19:41:35 cborgz: personally though: try a couple widely-varying samsungs, especially an older one or two, and if you're using AppCompat test it on a samsung 4.2.2 specifically. samsung is probably the most problematic. otherwise, one / two from the major brands (htc, lg, etc), and making sure you hit multiple screen sizes + densities at least _somewhere_ will Feb 24 19:41:35 probably cover it. Feb 24 19:42:15 groxx: I've had issues with Samsung and HTC. I had some weird black background on HTC, while it worked on other items. Feb 24 19:42:32 pfn, i got a little bit further by assigning an applicaiton object to robolectric Feb 24 19:42:36 yeah, styling can vary a lot :( it's hard to trace those down. Feb 24 19:42:39 pfn, it still crashes though. http://pastebin.com/KUV0TcKv Feb 24 19:43:19 Norrin, weird, for the most part, though, I thought robolectric got rid of all their shadows Feb 24 19:43:26 pfn, it keeps getting nullpointerexceptions. it seems incredibly buggy. i can see in that stacktrace it attaches the activity but the context is still null later when it tries to access it Feb 24 19:43:26 or most of them, I don't know why you're running into this Feb 24 19:43:39 cborgz: what's your minimum SDK version? Feb 24 19:44:20 pfn, it's failing right at the beginning of a test case. on the 2nd of these two lines. Robolectric.application = new Application(); Feb 24 19:44:21 activity = Robolectric.setupActivity(MainActivity.class); Feb 24 19:45:08 TestAllDownloaderCallbacksWereCalled(com.dmo.ampslib.AMPSTests)  Time elapsed: 60.278 sec  <<< FAILURE! Feb 24 19:45:20 It fails here Feb 24 19:46:27 oh and trevor-e a rotation of the phne would also result in an onrestoreinstancestate. does that put a spanned in the works? Feb 24 19:46:33 But I imagine you knew that😉 Feb 24 19:46:37 spanner* Feb 24 19:46:53 I'm using this in combination of a retained fragment Feb 24 19:47:23 groxx: Minimum SDK version is 4.0, but since there's pretty much no 4.0 device, I start at 4.0.3 Feb 24 19:47:35 groxx: I have access to 150 devices at >4.0.3 Feb 24 19:48:01 I tested my code on about 20 devices, and the only issues I had were with MDPI devices (HTC Desire C, not wide enough), and the Nokia X (no Google Play Services) Feb 24 19:48:34 That's about all we can do -- test on many devices. Feb 24 19:48:34 trevor-e: i see, so if the retained frag was found, you’ve just had a config change, but if it wasn’t your coming back from a deeper level of activity death. nice Feb 24 19:48:34 And one tablet (low-res 10" samsung tablet) had weird issues in the action bar Feb 24 19:48:40 such a lot to think about! Feb 24 19:48:53 I know haha, I sketched out a big diagram of possibilities Feb 24 19:49:09 so do you still need pausehandler? Feb 24 19:49:30 is it used in the case of a regular backgrond, without activity death? Feb 24 19:49:42 I had one before that I just left in, haven't considered if it's still necessary Feb 24 19:51:08 hey, so with dagger, I'm creating a scope for my fragment and using it to populate some things such as a LayoutManager for my RecyclerView, however, unlike Butterknife, there's no way to "reset" the injections Feb 24 19:51:09 lol. i think that’s the case it would be needed for, that i just mentioned, but if your results go to a model rather than directly to the acitivity, i can’t think of any other reason you’d need it Feb 24 19:51:27 herriojr: why would you reset them? Feb 24 19:52:51 JakeWharton: I'm using a FragmentPagerAdapter, which reuse fragments and calls onDestroyView(), which if I'm using dagger to populate my LayoutManager, it causes an exception due to already being attached to a RecyclerView Feb 24 19:52:58 which means its leaking my RecyclerView Feb 24 19:53:21 ah i see Feb 24 19:53:26 fragments truly are terrible places to put code Feb 24 19:53:48 the easiest thing to do would be encapsulate everything related to the views into a single class that you can null out in onDestroyView Feb 24 19:54:27 How can I get an alert/dialog to also point at or highlight an element? Feb 24 19:54:27 i.e. a presenter? Feb 24 19:54:31 like a static inner-class that just injects everything related to the view Feb 24 19:54:48 yeah, I was just assuming if dagger had the same "reset()" option as ButterKnife, I wouldn't have to create that extra class Feb 24 19:54:57 meaning an encapsulating class Feb 24 19:55:18 injections should never need reset (and butter knife is not injection) Feb 24 19:55:38 yes, I understand Feb 24 19:55:40 this is just yet another fragment fail of conflating two lifecycles Feb 24 19:55:42 similar flow, though Feb 24 19:55:46 indeed Feb 24 19:55:47 yeah Feb 24 19:56:15 no, I know you have a library to do away with fragments, I just didn't want to try it out for this particular project Feb 24 19:56:28 i mean you shouldn't have to Feb 24 19:56:43 Do you ever blacklist some devices, or apply fixes for specific devices? Or as long as you're covering all SDK versions and resolutions, things are good? Feb 24 19:58:07 anyways, yeah, I guess I'll not inject the LayoutManager Feb 24 19:59:51 but yeah, basically, I need to keep track of my injections in terms of what would leak context and manually null them out Feb 24 20:00:11 so maybe what I need to do is create a new scope Feb 24 20:00:55 TacticalJoke, i ripped out robolectric but then hit stub exceptions when the lib tried to log anything Feb 24 20:02:02 anyway i can void those calls out without editing the test target (the lib)? Feb 24 20:02:36 groxx: whatitis samskiter solution found, u have to use public int getItemPosition(Object object) with adapter Feb 24 20:02:59 john67_: to do what? Feb 24 20:03:08 Norrin: The bottom of this page talks about that, I think: https://sites.google.com/a/android.com/tools/tech-docs/unit-testing-support Feb 24 20:03:15 john67_: where do you put that call? Feb 24 20:03:47 Whats the call to invalidate the menu for the toolbar? Feb 24 20:03:53 samskiter: update , the viewPager , i call in the adapter , with in return return POSITION_NONE; Feb 24 20:04:13 herriojr: hi fine? Feb 24 20:04:17 in which callback on the adapter john? Feb 24 20:04:32 TacticalJoke, dang, how do you do that w/o gradle? Feb 24 20:05:19 Not sure. I guess you'd have to use Robolectric in that case. Feb 24 20:05:57 lasserix: interesting question.. you could always do Toolbar.getMenu and remove all items and then call ToolBar.inflateMenu Feb 24 20:05:59 lasserix: Couldn't you just call Toolbar.inflateMenu again? I haven't tried it, but that was my assumption. Feb 24 20:06:07 Oh, true, it'd append. Feb 24 20:06:09 TacticalJoke: no it'll stack Feb 24 20:06:17 there is a specific call if i remmber correctly Feb 24 20:06:32 lasserix: you can remove the previous items Feb 24 20:06:39 i mean, when parses that, what does it do? should be repeatable w/o gradle (hopefully...) Feb 24 20:06:55 when gradle* parses that, what does. . . . Feb 24 20:07:12 toolbar.getMenu().clear ! Feb 24 20:07:17 I think there is special code for this in the Android plugin for Gradle, Norrin. Feb 24 20:07:17 i said that Feb 24 20:07:19 omg Feb 24 20:07:26 lasserix: pay attention Feb 24 20:07:29 lasserix: is this Toolbar the window's ActionBar? Feb 24 20:07:32 That configuration data "switches on" that special code (as far as I know). Feb 24 20:07:33 no you said remove the items, Feb 24 20:07:36 yes Feb 24 20:07:39 thats what clear does Feb 24 20:07:40 lol Feb 24 20:07:52 samskiter: put the method, inside the adapter class, and i call the notifyDataSetChanged() to refresh in my case the mainActivity Feb 24 20:07:54 yeah I asked specific call, you said remove all the items i thought you meant like individually Feb 24 20:07:56 anyways Feb 24 20:08:14 TacticalJoke, i never would have guessed something as basic as unit testing would be so mature on andriod Feb 24 20:08:21 It finally is, yeah. Feb 24 20:08:32 daasdasdfasdf typos Feb 24 20:08:38 TacticalJoke, i never would have guessed something as basic as unit testing would be so immature on android Feb 24 20:08:41 I think the next version of the Gradle plugin will allow us to load resources in unit tests. Feb 24 20:08:42 immature* Feb 24 20:08:57 samskiter: u get me? Feb 24 20:08:58 why the hell is it dependent on gradle Feb 24 20:09:02 there was no option before? Feb 24 20:09:06 lasserix: it looks like thats what the system does anyway https://github.com/android/platform_frameworks_base/blob/master/core/java/com/android/internal/app/ToolbarActionBar.java#L435 Feb 24 20:09:10 Norrin: The problem is that you're calling Android stuff on the JVM. Feb 24 20:09:12 john67_: i think so. Feb 24 20:09:35 And that the methods inside the mockable Android JAR throw exceptions. Feb 24 20:09:44 TacticalJoke, i get that. but there seems to be no viable test path Feb 24 20:09:51 I mean "inside android.jar". Feb 24 20:09:56 gradle? it just came out. there was no way of doing this before? Feb 24 20:10:10 probably didn't just come out, but just now being recommended it seems Feb 24 20:10:23 Norrin: I see three options: 1. Use instrumentation test. 2. Use Gradle. 3. Use Robolectric. Feb 24 20:10:30 3 crashes Feb 24 20:10:35 in several different ways Feb 24 20:10:40 What crashes? Feb 24 20:10:45 robolectric Feb 24 20:11:05 Napalm: it always stacked everytime i inflated Feb 24 20:11:24 is option 1) doable on a headless box & automatable? Feb 24 20:11:25 lasserix: yes, thats what its suppose to do Feb 24 20:11:42 I'm not sure. Someone else might know. Feb 24 20:11:47 lasserix: the link i sent you does menu.clear(); before onCreateOptionsMenu Feb 24 20:12:29 BTW, on the topic of Toolbar, I found a bug in my app: if I select text it shows the contextual ActionBar and pushes my Toolbar down. I'm guessing there's no way to avoid this without calling ActionBarActivity.setSupportActionBar? Feb 24 20:12:39 I kinda wanted to avoid setSupportActionBar. Feb 24 20:12:52 TacticalJoke: erm.. dude overlayactionbar Feb 24 20:12:54 * Norrin goes to start over from scratch with intrumentation Feb 24 20:13:06 TacticalJoke: just turn on the window feature bit Feb 24 20:13:28 Hmm, okay. I guessed that wouldn't be enough (because it won't know my Toolbar is basically an ActionBar). I'll try it in a bit. Feb 24 20:14:05 TacticalJoke: you can implement your own ActionMode overlay on your Toolbar Feb 24 20:14:24 Napalm: Yeah, but in this case it's the system showing the contextual action mode. Feb 24 20:14:32 From the user selecting text in an EditText, for example. Feb 24 20:14:45 TacticalJoke: no, its a series of callbacks Feb 24 20:14:55 TacticalJoke: you can incept and put the options in your own Toolbar Feb 24 20:14:59 *intercept Feb 24 20:15:17 How? Feb 24 20:15:23 This happens with EditTexts and WebViews. Feb 24 20:15:42 Oh, you mean detecting the long-press and manually showing? Feb 24 20:15:55 no Feb 24 20:16:29 TacticalJoke: the EditText calls startActionMode on itself.. which propogates to the parent view and up the view hierarchy Feb 24 20:16:43 TacticalJoke: when it reachs the Activity it passes into the Window Callback Feb 24 20:16:46 i believe Feb 24 20:17:00 the default PhoneWindow handles it Feb 24 20:17:03 toolbar icons for material are 18 or 24 dp? Feb 24 20:17:22 Napalm: So I'd have to subclass EditText and WebView and override startActionMode? Feb 24 20:17:25 no Feb 24 20:17:26 omh Feb 24 20:17:28 omg Feb 24 20:18:01 How do I get the emulator to not downscale the device resolution? (Mac OS X) Feb 24 20:18:26 doesn't it have a scale command line option ? Feb 24 20:18:29 Napalm: Then how? Feb 24 20:19:01 TacticalJoke: i just told you .. handle it in your Activity or any parent in your view hierarchy Feb 24 20:19:01 TacticalJoke you may want to check out the guides for 'selection' Feb 24 20:19:06 TacticalJoke: Activity has onWindowStartingActionMode Feb 24 20:19:36 TacticalJoke: http://developer.android.com/reference/android/app/Activity.html#onWindowStartingActionMode%28android.view.ActionMode.Callback%29 Feb 24 20:19:43 oh look "Give the Activity a chance to control the UI for an action mode requested by the system." Feb 24 20:19:47 eactly what you want Feb 24 20:20:15 You didn't just tell me that, but now you have. Thanks. That looks way easier than I had anticipated. Feb 24 20:20:17 g00s: yeah, thanks Feb 24 20:20:43 TacticalJoke: i did tell you that. if you really want spoon feeding.. go someplace else Feb 24 20:20:52 * Napalm grumbles Feb 24 20:21:11 * Napalm is in a bad mood Feb 24 20:21:13 Uhh, I'm doing like 15 things at once. I didn't pick out your subtle hint. Feb 24 20:21:19 Anyway, thanks for the assistance. Feb 24 20:21:22 np Feb 24 20:21:52 i offically hate networks and bandwidths and speed calculations Feb 24 20:22:10 /moan /moan Feb 24 20:22:30 STOP WHINING! Feb 24 20:22:53 :) Feb 24 20:24:05 Napalm, lel Feb 24 20:24:11 Feb 24 20:24:17 hey pfn Feb 24 20:29:36 Does this code look better than what I was working with last week? http://pastebin.com/9fMMFWdb and http://pastebin.com/mBr3xwiP (keep in mind it is a work in progress) Feb 24 20:30:05 Whoops, that was directed at TacticalJoke Feb 24 20:32:06 can anyone help me with this? need to run an intent with my html file: http://paste.ofcode.org/kw4gWKavLDsdrM5ji5Ktb5 Feb 24 20:32:38 Mittendeep: Yeah, but ideally all that file reading/writing code would be in the Treasure class. Feb 24 20:32:41 It should read/write itself. Feb 24 20:32:53 Maybe the Activity could give it a File to work with. Feb 24 20:35:12 IDK how I was going to implement back and next buttons with xmlpullpusher, but it looked like a lot of work. Feb 24 20:41:35 I set up a new project with the Tabbed Activity using Android Studio and I only get a white screen on a Lollipop emulator (works on a KitKat emulator)… this is using the latest version of android studio and no modifications to the generated code from AS.. Does anyone have any ideas how to fix this? Feb 24 20:42:44 Mittendeep: Ideally, your activity would have no idea that XML is being used. Feb 24 20:42:55 anyone? Feb 24 20:42:56 In such a setup, the code is way easier to read and change. Feb 24 20:44:20 TacticalJoke: Do you mean the project ideally wouldn't use XML at all or that it would be taken care of outside of the activity? Feb 24 20:44:44 bodagetta: i think that's deprecated isn't it? Feb 24 20:44:48 The latter. Feb 24 20:45:16 luist: whatever you're trying to startActivity on should have documentation for intents it accepts. and that file:/// uri won't be recognized by any other application because it's not an absolute path, so it's unlikely to work for anything. Feb 24 20:45:44 bodagetta: material design completely changed how you should implement tabbed navigation, but the tab host (i assume that's what you're using) was deprecated long before that Feb 24 20:46:16 TacticalJoke: Thank you for the tip. I put it on my // TODO: list Feb 24 20:46:21 groxx: so if i saved a cache File can i just pass its getAbsolutePath() to the parse? Feb 24 20:49:42 myke: if i change the tabbed navigation to material design standards won't that break in previous versions? I'm targeting API15+ Feb 24 20:52:15 groxx: maybe adding setClassName("com.android.browser", "com.android.browser.BrowserActivity"); to specify what intent it is? Feb 24 20:52:25 luist: a) depends. if it's a private file to your app, no. b) only if the recipient accepts it. Feb 24 20:53:58 groxx: so where should i save the HTML file to be able to pass it in the intent? Feb 24 20:54:11 groxx: i mean… whats recommended Feb 24 20:56:37 luist: does the browser accept file uris in intents Feb 24 20:56:44 ? Feb 24 20:58:57 groxx: no idea Feb 24 20:59:15 luist: that would be a good thing to find out first, since if it doesn't, nothing you can do will make it work Feb 24 20:59:21 gradle plugin 1.1.1 Feb 24 20:59:35 groxx: how do i test that? Feb 24 21:04:02 hm, some build system docs now at https://developer.android.com/tools/building/plugin-for-gradle.html .. but seems far less than what was on tools.android.com Feb 24 21:04:18 public static Utility getInstance() { Feb 24 21:04:18 if (utility == null) Feb 24 21:04:18 return new Utility(); Feb 24 21:04:18 else Feb 24 21:04:18 return utility; Feb 24 21:04:20 } Feb 24 21:04:23 hahahahahahahha Feb 24 21:04:25 fuck my life Feb 24 21:09:42 matt_j: http://i.kinja-img.com/gawker-media/image/upload/s--FsfjcQkA--/c_fit,fl_progressive,q_80,w_636/17vyt0zgrb5o8jpg.jpg Feb 24 21:11:09 return user.isProgrammer() ? "ship" : "pirate"; Feb 24 21:11:42 g00s: also https://developer.android.com/tools/building/configuring-gradle.html Feb 24 21:11:50 more readable than tools.android.com's documentation at least Feb 24 21:14:17 do i dare use the AS updater in the middle of a project or am i asking for trouble? Feb 24 21:14:52 Mittendeep: Check the changelog on http://tools.android.com/recent Feb 24 21:15:29 groxx: is there any other way to open that html? Feb 24 21:16:05 luist: put it up on the internet somewhere, or use a webview in your own app, since you can load html files into a webview Feb 24 21:16:22 Mittendeep: if from 1.0+, you should be fine Feb 24 21:16:36 groxx: its generated dinamically… and i cant use webview because it wont support some html5 features on api 15 Feb 24 21:17:05 groxx: this html is generated just to make a POST to a url tho Feb 24 21:17:09 luist: you can't guarantee that their browser is new enough either, it could be anything Feb 24 21:17:58 so, why not just do the POST yourself? Feb 24 21:17:59 groxx: oh i know… but the webview its guaranteed that its old, because its a government project with a crappy rom Feb 24 21:18:34 groxx: how would i do that? i tried a couple ways but didnt work Feb 24 21:19:38 luist: http://developer.android.com/reference/java/net/HttpURLConnection.html has an example for posting content right at the top. or pretty much any other networking library will have loads of examples for this, it's a common thing to do. Feb 24 21:22:23 groxx: ok ill take a look Feb 24 21:22:27 groxx: thanks Feb 24 21:37:03 JakeWharton: sorry, we lost internet, I missed wherever our conversation was going Feb 24 21:45:15 so I got a call from a hiring manager at a company in town looking to hire me for mobile app & web development today... kinda cool Feb 24 21:54:30 ლ(ಠ益ಠლ) why does view.getViewTreeObserver() return multiple different instances (on the same view) at runtime? and why are multiple "alive" at once? I can work around it, but... srsly. how does this make sense? Feb 24 21:57:02 sheesh. between onResume and onPause I get different tree observers. even when I run before super.onPause. Feb 24 21:59:35 I'm trying to use ScheduledThreadPoolExecutor to run a periodic UI update task. Scheduling works, but when I try to cancel() the returned handle, the scheduled runnable keeps running. Feb 24 22:00:06 cancel() returns true but the task keeps running along like I never asked it to stop. Feb 24 22:00:37 I'm using HttpPost against a site with the following header: . Can I modify that so that the response reads UTF-8 instead of nb_NO.UTF-8 ? Feb 24 22:00:49 for instance with the setHeader method? Feb 24 22:02:09 Quacked: sure AbstractHttpMessage has that method. Feb 24 22:02:42 HttpPost also has it, but I'm not succeeding for some reason Feb 24 22:02:56 HttpPost is a subclass of AbstractHttpMessage. Feb 24 22:03:03 Right Feb 24 22:03:08 I'm getting UnsupportedEncodingException Feb 24 22:04:22 gauthierm: in general, .cancel() just prevents things from starting. if you want to interrupt a running instance, you'll need to pass 'true' _and_ check for the thread's interrupted flag in your code (most IO / sleep will throw an interrupted exception, but your code will not, that's up to you) Feb 24 22:04:32 Wait, is this a response header or a request header? Feb 24 22:05:01 request Feb 24 22:05:30 Quacked: It looks like a HTML meta tag that overrides response headers from your paste. Feb 24 22:06:21 here is some code: http://pastebin.com/W66MSpgn Feb 24 22:06:31 I've tried all kinds of setHeaders, hehe Feb 24 22:07:46 I tried the site again, and looks like this is the response header from the site: Feb 24 22:09:22 Quacked: the third and fourth headers look valid. The other ones aren't standard HTTP request headers. Feb 24 22:10:00 HTTP response headers should be "Name: Value" not a meta tag. Feb 24 22:10:06 I still get that error though Feb 24 22:10:27 I have an activity that can have various states (X, Y…). When a notification comes for my app, I’d like the intent service to query the current state of the app. I’m thinking of using SharedPreferences since it’s cheap but I feel like it’s a bit abusing it (and sqlite seems overkill for that). Any thoughts? Feb 24 22:10:45 Quacked: Did into the source and debug it Feb 24 22:11:02 when I check the headers on the site using "inspect" in Chrome it says response headers Content-Encoding: gzip and request headers Accept-Encoding: gzip, deflate Feb 24 22:11:57 I don't get it, hehe Feb 24 22:12:24 Content-Type in response headers on site is text/html; charset=nb_NO.UTF-8 Feb 24 22:12:51 What class/library are you using for your HttpPost Feb 24 22:12:53 I'm creating a utility class but I want to call findViewById, what should I pass to my class to access it? Feb 24 22:13:01 ej: you should pass in the activity as a parameter Feb 24 22:13:14 thanks Feb 24 22:13:51 org.apache.http.client.methods.HttpPost; Feb 24 22:14:30 Quacked: attach the sources for that, put a breakpoint in the class, and step through it Feb 24 22:14:37 bam, problem solved Feb 24 22:15:11 hm Feb 24 22:17:00 groxx: Thanks for the quick reply. I made a separate test project that only does the scheduling and cancelling and it works as expected. That narrows down my problem to something else :) Feb 24 22:18:45 jaana: some sort of persistent storage would be needed. What if a notification arrives and your app isn't even running? Feb 24 22:19:13 gauthierm: does the separate test project cancel the future before it starts? to really test it you kinda need to .cancel while it's "active", since that may happen IRL. Feb 24 22:19:58 Hey everyone Feb 24 22:20:44 groxx: It starts the task and waits on the current thread before cancelling. See http://pastebin.com/ddcV8cnJ Feb 24 22:21:42 gauthierm: Yeah it needs to be persistent, so SharedPReferences looked like a low hanging fruit, although it’s not really suppoed to be used for simulating messaging Feb 24 22:21:45 gauthierm: aaah, I see. for some reason the "period" part escaped my notice :) Feb 24 22:22:01 s/period/periodic/ Feb 24 22:23:42 jaana: as long as it doesn't matter that it's going to stay in memory for pretty much forever: shared preferences are reasonably fast and save, if a bit icky in their API. I'd probably lean that way until you know you need something more. Feb 24 22:24:10 groxx: The app would store and delete the state from the preferences as warrants, but yes, that’s the idea Feb 24 22:24:13 jaana: you could also look at overriding the onSaveInstanceState for your activity and adding custom properties to the bundle. Feb 24 22:24:15 the activity* Feb 24 22:24:29 gauthierm: But only the activity will have access to that state, the service can’t access it Feb 24 22:24:41 jaana: yeah, that's no good then. Feb 24 22:26:07 gauthierm: sharedprefs is perfect for that Feb 24 22:26:14 just make sure to clear it whenever you pull Feb 24 22:33:09 any pre-baked method to change the object’s physical/clickable location after animation? or is it standard to do it in onAnimationEnd()? Feb 24 22:37:36 tricknology: setFillAfter() I think? Feb 24 22:37:50 ah groxx I did that Feb 24 22:38:02 what that does is hold the animation at its final position Feb 24 22:38:22 but the actual locations of the views.. their clickable boxes.. they remain in the initial location Feb 24 22:39:00 what I’m doing now is moving locations manually onAnimationEnd() to their final position Feb 24 22:39:26 but I mean.. how do they make animations that are clickable during animation? Feb 24 22:40:25 tricknology: sadly, dunno :| haven't done enough with animations. Feb 24 22:40:36 this sums it up pretty well. haha Feb 24 22:40:37 http://stackoverflow.com/questions/14881575/how-to-make-the-animation-clickable-in-android Feb 24 22:40:45 after explaining myself I was able to find a googleable term Feb 24 22:40:52 thanks groxx ;-) Feb 24 22:41:54 haha Feb 24 22:42:20 don't suppose this is something that the newer animation systems handle for you? like view.animate().translateX(123) Feb 24 22:43:01 I mean, it's still a translation property so the "it's still at the original location" is still true, but maybe it integrates better Feb 24 22:43:07 I am not sure, I’m taking a look at ViewPropertyAnimator. since 3.1 Feb 24 22:43:25 yeah they do things with the interpolator Feb 24 22:44:47 view.animate().y(direction).withEndAction(runnable) Feb 24 22:44:56 pretty nifty Feb 24 22:45:40 instead of direction that should be dy Feb 24 22:47:32 how to remove navigationicon from toolbar? Feb 24 22:48:04 I dont think I'm understanding openFileOutput. content I MODE_APPEND doesnt stick around for the next time I open the app? Feb 24 22:48:38 lasserix: "toolbar.setNavigationIcon(null);" should work (untested). Feb 24 22:49:27 newbQ: Too little info to answer. Feb 24 22:50:12 LOL Feb 24 22:50:26 lasserix: Sorry, it's an int. ;o I was looking at the source. Feb 24 22:50:47 Wait, never mind: there's a Drawable overload. Feb 24 22:51:09 TacticalJoke: when I open the app, I check if the file already exists. if it doesnt, i create it with MODE_PRIVATE. but info I add later with MODE_APPEND doesnt stay there the next time I open the app. in fact, the app acts as if the file doesnt exist every time it opens Feb 24 22:51:34 It should work with MODE_APPEND. I guess something is going wrong in your code. Feb 24 22:52:40 MODE_APPEND is only valid for the handle with which you opened the file. Feb 24 22:53:22 so, next time you start your app, you have to open it with mode append again Feb 24 22:53:22 you mean the file name? it's the same both times Feb 24 22:53:32 no, File Feb 24 22:54:11 Anyone have a way to override swipe to refresh progress animation? Feb 24 22:54:59 MikeWallaceDev: I've only been opening the file with openFileOutput(fileName, Context.MODE_PRIVATE or APPEND) Feb 24 22:55:08 is that wrong? Feb 24 22:55:28 "or" ?? Feb 24 22:55:50 that's just to tell you it's either private or append. that parts not actually in the code Feb 24 22:56:30 I open it with PRIVATE again later so I can rewrite the data if a variable changed Feb 24 22:56:47 newbQ: You may as well post the code. Feb 24 22:56:49 PRIVATE create the file. only use that the first time. the other times use APPEND Feb 24 22:57:20 creates Feb 24 22:58:29 MikeClassic: so how do I overwrite it? destroy it then create it again? Feb 24 22:58:37 Can't you use only MODE_APPEND always? Feb 24 22:58:42 TacticalJoke: http://pastebin.com/BQzNhUsH Feb 24 22:59:02 TacticalJoke, yeah, PRIVATE is the default... Feb 24 22:59:23 MikeWallaceDev: Qu'est-ce qui passe? Again triggered lol Feb 24 22:59:27 you want to overwrite it?? then why are you using append?? Feb 24 22:59:40 People love you MikeClassic ! Feb 24 22:59:46 append for new data. overwrite when old data needs to be modified Feb 24 22:59:49 haha Feb 24 22:59:50 hi, when a fragment is pushed back to stack the search widget in action bar gets reset, how to overcome this Feb 24 23:00:44 newbQ: Are you sure it's not appending? Feb 24 23:01:14 newbQ, I'm not sure that you understand files completely... Feb 24 23:01:33 TacticalJoke: I know it is appending. but when I open the app, it acts as if the file is empty when I try to read form it Feb 24 23:01:34 you can't "modify" old values (at least not easily) Feb 24 23:01:53 newbQ, do you close/flush the I/O ? Feb 24 23:01:55 MikeWallaceDev: thats why I need to rewrite the file Feb 24 23:01:59 newbQ: Then the reading code seems wrong. Feb 24 23:02:00 exactly Feb 24 23:02:13 crap. I gotta go or I'll be locked in. cya people. and thanks for the help. Feb 24 23:02:20 adios Feb 24 23:07:15 hi, when a fragment is pushed back to stack the search provider widget in action bar gets reset, how to overcome this Feb 24 23:46:50 i want to update data inside the viewPager with the adapter, when i click on the Button it cleans all the data but doesnt refresh the data, this is the code http://pastebin.com/sT2x5m0c Feb 24 23:47:08 how can i update the data ? Feb 24 23:50:44 I am trying to implement Material Tabs library from here : https://github.com/neokree/MaterialTabs but i can't get the tabs to show up. This is my class : http://pastebin.com/MQmybNU1 and my activity : http://pastebin.com/6NKyChAj. I can only see the TabHost, but nothing else. Feb 25 00:06:03 i want to update data inside the viewPager with the adapter, when i click on the Button it cleans all the data but doesnt refresh the data, this is the code http://pastebin.com/sT2x5m0c . plus i want to update data inside the viewPager with the adapter, when i click on the Button it cleans all the data but doesnt refresh the data, this is the code http://pastebin.com/sT2x5m0c is depreciated . how can i do the update Feb 25 00:06:21 Anyone know of a pull to refresh library where i can customize the refresh animation? Feb 25 00:08:55 im a newbie sorry Feb 25 00:18:57 err. addVies() producing.. 02-24 16:16:36.424: E/AndroidRuntime(13240): java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewGroup$LayoutParams android.view.View.getLayoutParams()' on a null object reference Feb 25 00:20:43 tricknology: What's the rest of the code? Feb 25 00:21:10 teh stack trace? Feb 25 00:21:30 right before that layout.removeAllViews() Feb 25 00:21:34 Nah, I mean the code around the addView call. Feb 25 00:22:00 I’m tryign to get around a problems when shifting an object with TranslateAnimation and not having the onClick register in the same spot Feb 25 00:22:09 it remains registered at the old x,y coord Feb 25 00:22:52 a SO suggestion was to move the views, I’m just removing the last row, but then I want to add all the rows back again Feb 25 00:23:02 I should jsut be using a layoutinflater… Feb 25 00:25:43 TActicalJoke, it’s to removeAllViews() from the layout Feb 25 00:32:42 samskiter: u told me to remove and add all the fragments in order to update data inside the viewPager with the adapter? Feb 25 00:34:22 nope Feb 25 00:34:29 might have been someone else? Feb 25 00:35:45 samskiter: ah, oki then sorry Feb 25 00:41:30 i wonder how google would describe material adoption across all apps in the play store Feb 25 00:42:26 as a criteria for success, they must have goals like "80% of the top 25 apps should be material by X date" Feb 25 00:42:56 top 25 in each catagory Feb 25 00:45:08 "clash of clans should be material by X date" would be an interesting goal. Feb 25 00:45:27 If I call Activity.startActivity with an Intent whose data is an HTTP URI, would Android ever throw an ActivityNotFoundException? Feb 25 00:45:32 The documentation doesn't give any details here. Feb 25 00:46:51 I think I've seen it, yeah Feb 25 00:47:16 groxx: On a device without a browser installed? Feb 25 00:47:16 rare, certainly, but there's no requirement that they have a browser. also it could be blocked by permissions / for the childrens Feb 25 00:48:10 yeah Feb 25 00:48:29 Ah, okay. Feb 25 00:59:02 Sup TacticalJoke Feb 25 01:00:15 g00s, that criteria for success is meaningless unless google is actively helping to get those apps updated Feb 25 01:00:29 ie monetary incentives Feb 25 01:00:32 Hey. Feb 25 01:02:03 I've heard that was the case with chromecast Feb 25 01:02:22 You seen the new Dell XPS 13? Feb 25 01:02:33 need to mount the /root/ directory read/write, then make a folder in that directory, then make a black file inside that folder, then undo the first step. How do i do that ? Feb 25 01:02:46 blank* Feb 25 01:03:11 Eclipse and Intellij are both a pain to configure Feb 25 01:03:26 i need to do this all from terminal emulator Feb 25 01:06:14 my AVD keeps hanging on a black screen before boot Feb 25 01:08:40 drose379: Not bad. Small screen though. Feb 25 01:08:48 Were you thinking of getting something like that? Feb 25 01:09:03 I was thinking the ThinkPad t440s but this thing looks awesome Feb 25 01:09:22 infinity display, 256GB SDD i5 8GM RAM for 1,099 Feb 25 01:11:54 Are those screens big enough for college or whatever? Feb 25 01:12:17 Does college have a screen requirement? It has a 13" display Feb 25 01:15:45 Oh no. lol. I just wasn't sure what you were gonna be using it for. Feb 25 01:15:58 Well, software development and web surfing Feb 25 01:15:59 Thats really it Feb 25 01:16:13 Would you reccomend a bigger screen? Feb 25 01:17:12 Oh, they do have very high resolutions. Feb 25 01:17:28 Yeah, I would get the non-touch screen one Feb 25 01:18:45 What do you think? I would prob go i5 with 8GB Feb 25 01:19:53 as long as the ram can be upgraded to 16gb later, probly Feb 25 01:20:06 ewe want all the rams. Feb 25 01:20:10 You dont think 8 is enough? Feb 25 01:20:32 depends. for android + having a browser + something else, it's probably pushing it Feb 25 01:20:47 Anyone use swiperefershlayout? Feb 25 01:20:50 Im doing that on 2 gigs now :) Feb 25 01:21:00 plus ram use in general will keep going up, and it's relatively cheap to add afterward Feb 25 01:21:12 Yeah I wonder if it is upgradable Feb 25 01:21:13 Ill have to check Feb 25 01:21:20 I'm doing it on 4GB. :D Feb 25 01:21:25 The emulator *seriously* pushes it. Feb 25 01:21:25 masochists Feb 25 01:21:28 lol Feb 25 01:21:41 I know the max you can buy it at is 8GB, do you think that means thats all it can handle? Feb 25 01:22:14 layout problem.. I have a layout which is layout_above another layout. That lower layout eventyally moves messign up the bounds of the upper layout. How to lock? Feb 25 01:22:27 I'm pretty happy with 16, I usually sit at about 8-9gb active. if I start up a server VM + an emulator, that goes up to like 12gb. Feb 25 01:23:28 Hmm, I'm dealing with people clicking YouTube links in my reddit app. Should I try to start the YouTube app (when it's installed) directly, or should I send a general intent (so that they can choose the app)? Reason I ask is that I don't know whether people use alternative apps for YouTube. Feb 25 01:23:31 Ill have to make sure its upgradable, groxx do you have any reccomendations? (Im looking for a new machine) Feb 25 01:24:00 I see that some exist, but it's hard to say how popular they are. Feb 25 01:24:09 if there is an alternative, start an intetn Feb 25 01:24:09 I would offer the choice Feb 25 01:24:16 otherwise why not embed? Feb 25 01:24:26 drise379 good siggestion Feb 25 01:24:35 Yeah, eventually I'll probably embed with the YouTube Player API thing. Feb 25 01:25:11 Then it's ++reasonsToUseProGuard; Feb 25 01:25:57 if I addView(0) does it push the other views? Feb 25 01:26:01 err act like push Feb 25 01:26:11 i.e. send all the other views down 1 row? Feb 25 01:26:45 drose379: hm. not sure if it's upgradeable or not. dunno. in general I'm recommending against Lenovo, because they're being absolute fuckers ("superfish" if you haven't read about it), but I don't have any specific recommendations in favor of anyone :) Feb 25 01:26:53 tricknology: I think that depends on the layout rules of your ViewGropu (e.g., RelativeLayout). Feb 25 01:26:59 Group* Feb 25 01:27:17 Yeah, I'm so disinclined to go to Lenovo now. Feb 25 01:27:19 the parent is relative Feb 25 01:27:34 Hmmm, this Dell looks wicked nice :D Feb 25 01:27:35 well.. Feb 25 01:27:38 Lenovo used to be my go-to company. Feb 25 01:27:45 I really hope its upgradeable, gonna look into it later tonight Feb 25 01:27:49 On Error GoTo Lenovo Feb 25 01:28:04 other arguments against lenovo: they used to be really excellent devices. now if you look around, it sounds like they've been steadily dropping in quality. seems like they may be coasting on the (incredibly valuable) ThinkPad brand name. Feb 25 01:28:23 What else is out there? Feb 25 01:28:34 Besides the Macbook Pro line Feb 25 01:28:44 Lots of people like Asus. Feb 25 01:28:48 Meh Feb 25 01:29:00 Are they no good? Feb 25 01:29:13 Dont know Feb 25 01:29:18 I'm thinking of getting a laptop soon, so I need to know this. :) Feb 25 01:29:31 I have heard alot of crab about Dell, but this XPS looks freaking beautiful Feb 25 01:29:34 crap* Feb 25 01:29:40 I've heard bad stuff about their customer service. Feb 25 01:30:09 Im thinking that theyre trying to turn things around with this new machine Feb 25 01:30:12 I've pretty much only seen meh-to-negative stuff on Dell. I've fixed a lot of busted hardware on my friends dells, for instance, and I gather they haven't improved. That aside / if it doesn't bite you, they seem decent for the price. Feb 25 01:30:27 groxx: Do you know anything about Asus? Feb 25 01:30:36 was just looking at laptops on newegg Feb 25 01:30:37 That's who I was thinking of going with, possibly. Feb 25 01:30:38 TacticalJoke: not really Feb 25 01:30:44 asus seems good Feb 25 01:30:48 i've used a new asus laptop irl Feb 25 01:30:54 myke you seen the new Dell XPS 13? Feb 25 01:30:56 lot of bang for the buck Feb 25 01:30:58 HP laptops look damn nice. Feb 25 01:31:04 drose379: no i have an ancient dell Feb 25 01:31:05 Aesthetically. Feb 25 01:31:15 Yeah I saw one of those Tactical Feb 25 01:31:23 I've had good results with some ASUS laptops. Have not needed service, can't comment on it. Feb 25 01:31:25 I love those deep-blue ones. Though I'd probably get annoyed with it. Feb 25 01:31:53 All new machines should be USB bootable right? Im thinking about booting Linux from USB? Feb 25 01:32:10 Brother-in-law replaced some ASUS laptop parts like keyboard without too much grief. Feb 25 01:32:14 drose379: not really sure why you'd do that but yea Feb 25 01:32:16 Every new machine I've used has been (laptop or desktop). Feb 25 01:32:24 yeah, I'd assume usb boot by now Feb 25 01:32:37 Everyone's liking Linux Mint lately. Feb 25 01:32:41 How is windows 8.1 anyways? Ive been on OS X for a while Feb 25 01:32:50 8.1 isn't bad. Feb 25 01:32:54 8.1 seems fine. fixes a lot of 8.0's sins. Feb 25 01:32:56 It'd be nice if it had a real Start menu, though. Feb 25 01:32:56 Windows 8.1 is like a black friend I never had. Feb 25 01:33:06 But there are alternatives. Feb 25 01:33:11 All I really do is run Android Studio, sublime text, and surf the web Feb 25 01:33:14 Plus some command line stuff Feb 25 01:33:17 8.1 boots so much more quickly than 7. Feb 25 01:33:21 And the Task Manager is way nicer. Feb 25 01:33:27 maybe they'll port android studio to chromebooks eventually :) Feb 25 01:33:29 I used to work tech support Feb 25 01:33:37 honestly don;t expect a computer to last more than 2 years Feb 25 01:33:45 unless you’re very nice to it.. but even then Feb 25 01:33:50 You serious, im using a macbook from 09 Feb 25 01:34:11 Dells and HPs had the worst issues and were the hardest to fix Feb 25 01:34:12 Yeah, mine last for years. Feb 25 01:34:20 tricknology: I find they last the longest when you format the drives bi-anually Feb 25 01:34:24 My late 2011 macbook pro died last year Feb 25 01:34:38 wipe with WIndex? Feb 25 01:34:41 tricknology what do you reccomend for a new machine Feb 25 01:34:56 I would recommend a macbook pro, really Feb 25 01:35:05 Really Feb 25 01:35:12 I had one, it died, I got an ASUS desktop and Lenovo laptop with the warranty money Feb 25 01:35:14 Boring :( Feb 25 01:35:14 My current laptop has a bunch of dead pixels on top. Drives me crazy. Feb 25 01:35:15 drose379: wipe out windows and run lnux on it Feb 25 01:35:22 desktop is nice for gaming.. Feb 25 01:35:39 but since I’ve started my job.. we have nothing but Apple.. I love it Feb 25 01:35:50 i'm way too cheap to buy apple Feb 25 01:35:54 Coolest thing is with the thunderbolt monitors.. you can just thunderbolt right in Feb 25 01:35:57 well yeah there’s that too Feb 25 01:36:08 what do you mean thunderbolt right in? Feb 25 01:36:10 Apple hardware is crazy-expensive. Feb 25 01:36:11 Like plug it in? Feb 25 01:36:15 about time Feb 25 01:36:23 we should have a single high speed serial bus for everything Feb 25 01:36:27 Yeah you can plug your monitor into the thunderbolt port and get all your ports working Feb 25 01:36:31 Windows isn't bad now (from 7 onwards). Feb 25 01:36:50 I can't wait for 10 (though I suspect it'll bore me to death within about two hours). Feb 25 01:37:20 sry I was talked to Feb 25 01:37:49 You can take your laptop and plug it into your thunderbolt monitor (which looks exactly like an iMac) then you have access to hardline network, usb, everything right from the monitor Feb 25 01:37:57 TacticalJoke: is the win8 default task manager finally sysinternal's? Feb 25 01:38:15 crtl+shift+excape Feb 25 01:38:29 Hi all, I have a general design question. I have two activites, one that is used for navigation and another that provides a map overview. What is the best method for fetching GPS location data in terms of program design. Would a singleton instance of the current Location be okay? Feb 25 01:38:44 THat’s how I do it Feb 25 01:38:53 but the whole locator is a singleton Feb 25 01:38:59 or a service Feb 25 01:39:15 that way I don’t have to deal with the location being null every time I start my locator Feb 25 01:39:30 tricknology oky thank you that helps :) Feb 25 01:40:24 myke: It looks kinda similar, but they have their own spin on it. Feb 25 01:42:38 What is it called when an image does this? http://imgur.com/0CQRLV4 Feb 25 01:42:52 Ah, to hell with it. I'll let them choose how they wanna view YouTube links. If I get an ActivityNotFoundException, they get to use a WebView. Feb 25 01:42:53 er EditText text Feb 25 01:42:58 Code simplicity FTW. Feb 25 01:43:43 Mittendeep: You mean artifacts? Or is it something specific relating to text-insertion cursors. Feb 25 01:43:49 Or 'carets', I guess. Feb 25 01:44:48 I just wanted to know if it was an emulator issue or a code issue. Feb 25 01:45:42 Have you tried on a device? Feb 25 01:46:04 I don't pay much attention to graphics artifacts on the emulator, personally. Feb 25 01:48:21 I hate when I can't think of a better name for a class than FooManager or FooDirector (or even FooExpert). Feb 25 01:59:49 TacticalJoke: maybe try FoosExpert? Feb 25 02:02:51 Is it bad to have an activity implement too many interfaces? Or no big deal Feb 25 02:03:18 What is the minimum volume int in android? Feb 25 02:03:22 I can never tell if I want to interface all the things, or say "none, use adapter objects, because those shouldn't be public methods on the activity" Feb 25 02:04:20 I feel that on Android it isn't necessarily a bad sign if an Activity (especially a launcher Activity) ends up implementing a lot of interfaces. Feb 25 02:04:58 Ok, its just gonna be the 3 Listener interfaces from the 3 different DialogFrags Feb 25 02:05:30 Oh, that sounds sensible to me. Feb 25 02:05:55 Do you prefer the code now that you're using DialogFragments? Feb 25 02:06:10 Shoud the Fragment do work such as Taking the view and sorting the values of its children into a List and returning it? or is that for another class? Feb 25 02:06:18 And yes, I really like the organized modular idea Feb 25 02:06:36 Before, I had all the dialog code on one activity, I knew sooner or later I would be re-writing it Feb 25 02:07:21 drose379: Why do you need the values sorted? Feb 25 02:07:39 Well like in the Objectives dialog Feb 25 02:07:54 I need to go through each EditText, make sure there is a value, get the value, and add it to a list Feb 25 02:08:00 Thats what I meant by "Sorted" Feb 25 02:08:41 Oh. Yeah, that sounds like a responsibility of the DialogFragment. Feb 25 02:09:03 Great, nice and organized :D Feb 25 02:09:21 Dude, this XPS looks really nice, dont know if I can pass up on the infinity display Feb 25 02:09:42 The dialog fragment's raison d'être could be "Take input from user; return List of validated input" or something. Feb 25 02:09:57 Right, thats exactly what its doing Feb 25 02:42:57 drose379 get an iphone instead, imho Feb 25 02:43:32 What? Feb 25 02:43:32 drose379: I'm gonna get the one with i5 and 8GB ram but no touch display, second cheapest one Feb 25 02:43:44 Your getting the XPS 13? Feb 25 02:43:48 yeah Feb 25 02:43:52 For dev? Feb 25 02:43:57 for everything Feb 25 02:44:04 No way, I really want one Feb 25 02:44:13 128 SSD or 256? Feb 25 02:44:54 if you get the touch screen the battery lasts like 5 or 6 hours, but they claim the non-touch one lasts 15 hours Feb 25 02:45:11 Yeah, im going with the non touch also Feb 25 02:45:17 How awesome does the infinity display look?? Feb 25 02:45:36 it's nice, but it's also reflective, I've played with it Feb 25 02:45:47 Well the non touch one is matte Feb 25 02:45:51 Is it still reflective? Feb 25 02:46:00 it's less reflective Feb 25 02:46:28 You think its a good computer for software dev and everything? Feb 25 02:46:43 for now Feb 25 02:46:44 $1000 seems to be the sweet spot for "workstation" laptops...i7, 16G, 256G or better SSD Feb 25 02:46:58 you gotta get the 8GB one minimum Feb 25 02:47:09 Right, is it upgradeable to 16 or no? Feb 25 02:47:20 dunno Feb 25 02:47:26 When you gonna order it? Feb 25 02:47:41 soon Feb 25 02:48:09 Sweet, I think im going to also Feb 25 02:49:06 I wanted a laptop... but I upgraded my desktop instead Feb 25 02:49:08 shmooz where did you get your hands on one? Feb 25 02:49:35 at the Microsoft store in the mall Feb 25 02:49:52 Do you think best buy would have one on display? Feb 25 02:50:07 check Feb 25 02:50:15 Im gonna Feb 25 02:50:35 Are you gonna run AS on this thing and everything Feb 25 02:50:43 yeah Feb 25 02:50:48 shmooz: ;o Feb 25 02:50:51 Cool Feb 25 02:51:13 I'll run it as a desktop at home Feb 25 02:51:25 With an external monitor? Feb 25 02:51:35 yeah and keyboard/mouse Feb 25 02:51:42 Right Feb 25 02:52:00 Will you let me know how it is? Feb 25 02:52:22 it's just another laptop, just the sleekest one ;) Feb 25 02:52:50 Yeah, Ive never spent this much on a laptop before so I gotta be sure Feb 25 02:53:08 Anyone know why http://imgur.com/0CQRLV4 is happening using this code? (i realize the clearTextBeforRefresh() method is superfluous, it was for a test) http://pastebin.com/C76Pk5hF Feb 25 02:54:31 TacticalJoke you there Feb 25 02:55:06 I doubt it's caused by your code, Mittendeep. It's probably just the emulator. Feb 25 02:55:18 You don't need to clear an EditText's text before setting it -- just set it. Feb 25 02:55:34 (On a side note.) Feb 25 02:55:39 Yeah, drose379. Feb 25 02:55:48 I looked at a ton of examples and gathered as much, but I wanted to be sure. Im grabbing my usb cable. this is ridiculous Feb 25 02:55:57 The android emulator belongs in the garbage, imho Feb 25 02:56:06 Im trying to add an edittext when a user click a button inside the dialog, but I dont think the fragment will let me do that Feb 25 02:56:17 Since it builds the dialog and returns it, I dont think I can edit it... Is that true? Feb 25 02:56:58 I think you can, drose379. Just hold onto the reference to the parent ViewGroup in onCreateDialog or whatever. Feb 25 02:57:24 Im doing dialog.addView() Feb 25 02:57:30 and nothing is adding Feb 25 02:57:58 Ill try something else Feb 25 02:58:43 Mittendeep: You can also connect to your phone wirelessly for debugging, BTW. Feb 25 02:59:05 I just ran and got the cable Feb 25 02:59:17 How? bluetooth? Feb 25 02:59:42 pablotron: http://stackoverflow.com/questions/14357705/adb-over-wireless **** ENDING LOGGING AT Wed Feb 25 02:59:58 2015