**** BEGIN LOGGING AT Thu Jun 25 02:59:59 2015 Jun 25 03:12:33 I recreated the broadcast and receiver projects with an older version of Android (2.2) and it worked Jun 25 04:08:51 kinda cool http://www.gizmag.com/oura-sleep-fitness-tracking-ring/38175/ Jun 25 04:09:41 just needs infrared blood ox say & blood pressure sensor, which would be good things to know while sleeping Jun 25 04:09:47 *ox sat Jun 25 04:17:15 g00s: what it measure? Jun 25 04:17:45 https://youtu.be/7zTCgMPZRuo Jun 25 04:19:57 yeah saw that Jun 25 04:20:20 :) Jun 25 04:22:11 "The MX4 is the third Ubuntu Mobile smartphone to be released, following the BQ Aquaris E4.5 and E5 devices" ... never heard of those O.o Jun 25 04:22:23 http://www.techweekeurope.co.uk/mobility/meizu-mx4-ubuntu-edition-canonical-171007 Jun 25 04:23:28 ubuntu smartphone Jun 25 04:23:39 so noob Jun 25 04:24:49 they gotta join the technologies (with android probably) Jun 25 04:27:12 * g00s wonder what writing ubuntu mobile app is like, javascript, c++ ? Jun 25 04:27:45 that's the main question Jun 25 04:28:04 if they split technologies, create new languages, this will fail Jun 25 04:29:13 unfortunately android created their own system instead of reusing achievements of the past Jun 25 04:30:04 as it is built on top of linux, it could be port of glib for GUI Jun 25 04:30:22 but they decided to create a new :) and continue till now Jun 25 04:31:42 apple, at least, have wide range of products to use with their technology Jun 25 04:34:32 squ: I'd argue that Android reused a ton of achievements of the past and we added a bunch of our own on top of that Jun 25 04:35:22 reused operating system, instead of creating new one, that was good Jun 25 04:35:35 Reused a lot of great ideas from the Sidekick too Jun 25 04:35:44 what's that? Jun 25 04:36:00 The fact you're asking the question makes me wonder whether you researched any of the history at all before making such claims Jun 25 04:36:17 no I didn't Jun 25 04:36:22 Clearly Jun 25 04:38:06 squ: Here is a great book that will teach you tons of things about the history of Android and iOS: http://www.amazon.com/Dogfight-Apple-Google-Started-Revolution-ebook/dp/B00BIV1R98 Jun 25 04:38:16 Let's talk again after you've read it :) Jun 25 04:38:33 thanks, but no Jun 25 04:38:58 "Thanks but I'd rather continue to make claims without having the burdens to verify whether they are true" Jun 25 04:39:14 yes, kind of Jun 25 04:40:00 * CedricBeust shrugs Jun 25 04:41:47 The truth is so 1996. Jun 25 04:43:11 RopeProgressBar - how do people think of these things Jun 25 04:44:30 Weird how the animation on the page goes to 1,000. Jun 25 04:45:05 is there a common way to namespace your objects? i have a location object that i don’t want to interfere with the native android one. in obj c you would do something like LALocation (if your app was called little app) Jun 25 04:45:25 LittleAppLocation seems a bit verbose Jun 25 04:45:57 Duckily gotta learn java, just goes in another package Jun 25 04:46:39 g00s: right, but i’m referencing both classes in the same method Jun 25 04:46:51 the only way to differentiate then is with the whole package name right? Jun 25 04:46:58 oh, well then just fully qualify them Jun 25 04:47:02 Yeah, unfortunately. Jun 25 04:47:03 For at least one. Jun 25 04:47:13 x.y.z.Location, a.b.c.Location :) Jun 25 04:47:15 for your own sanity, name it something else Jun 25 04:47:15 prefixing is fine Jun 25 04:47:16 Other languages (e.g., Kotlin and Scala) solve this. Jun 25 04:47:29 import one, prefix the other one (the one that's the least used in the source file) Jun 25 04:47:39 bankai_: thats what i’m thinking Jun 25 04:47:46 CedricBeust: i can’t prefix the native one though Jun 25 04:47:55 Duckily: What do you call "native"? Jun 25 04:48:02 platform Jun 25 04:48:12 Still not getting it Jun 25 04:48:12 android.location, sorry Jun 25 04:48:30 Duckily: Why? Are you using wildcard imports? Jun 25 04:48:32 Sure, you can prefix that one if it's the one you use the least, and import your own Jun 25 04:48:48 import my.package.Location and use os.android.Location whenever you need it Jun 25 04:49:07 (I mean android.location.Location or whatever) Jun 25 04:49:15 Location, location, location. Jun 25 04:49:27 that's not what I meant by prefixing... that's qualifying. I meant prefix your class name with something Jun 25 04:49:37 fully qualifying if you use it a lot is dumb Jun 25 04:49:52 do what's easy, not what's arguably "right" in strict (and dumb) Java rules Jun 25 04:49:54 Oh, the other guy means that "prefix" too. Jun 25 04:49:58 is that really better than just having com.littleorg.littleapp.location referenced as LALocation Jun 25 04:50:01 Yup. And reusing a name that's part of the standard is dumb too (looking at you java.awt.List) Jun 25 04:50:32 meh, Java should have added import aliasing long ago Jun 25 04:50:35 AppLocation Jun 25 04:50:42 CedricBeust: ok i’ll just use LALocation then Jun 25 04:50:46 ftl Jun 25 04:50:51 Duckily: No, LaLocation Jun 25 04:50:58 don't spend more than 2 seconds on it, renaming is easy Jun 25 04:51:01 Do the camelcase right Jun 25 04:51:11 +1 camel casing acronyms Jun 25 04:51:20 hmmm really? Jun 25 04:51:23 pfn: I never liked import renaming, confusing as hell Jun 25 04:51:29 and, fully qualifying android.location.Location isn't bad if you don't use it often Jun 25 04:51:36 I disliked it the first time I saw it 20+ years ago in Eiffel, still dislike it today Jun 25 04:52:13 pfn i feel like it’s just begging for issues, if i use my own location class as Location, someone is going to get confused Jun 25 04:52:14 Fully qualifying is the way to go Jun 25 04:52:38 (another reason why I was never a fan of static imports, a feature that fixes one of Josh's pet peeves that never really bothered anyone else) Jun 25 04:52:53 Duckily, eh, not really Jun 25 04:53:00 I find the name of HttpURLConnection funny. (I guess it's because of URLConnection, but the combination of the two styles is silly.) Jun 25 04:53:08 And, yeah, "HttpUrlConnection" would be way more readable. Jun 25 04:53:33 TacticalJoke: also because of URL Jun 25 04:53:43 Ah, yeah. Jun 25 04:53:45 TacticalJoke: Yes we learned that lesson but back in the Java 1.0 days, the rule was to fully capitalize acronyms except if you have two back to back, and in such case, camelcase the second one. Totally retarded but hey, we were young, we were experimenting Jun 25 04:53:50 What about classes specific to your app, like your apit client Jun 25 04:54:07 LaClient Jun 25 04:54:08 static imports can make typesafe DSLs a little easier to implement Jun 25 04:54:14 ? Jun 25 04:54:18 Ah, two back to back. I see. Jun 25 04:54:53 stupid question, can you partially qualify the package name? Jun 25 04:54:59 Much more sane to go camel case all the way. No special rules, very systematic, code generator friendly. Everybody wins Jun 25 04:54:59 LittleApp.Location Jun 25 04:55:03 no Jun 25 04:55:06 ok Jun 25 04:55:10 I used to capitalise all initialisms until I got to C#. I think basically every framework/library I had used until then had used all caps. Jun 25 04:55:20 CedricBeust, I don't care too much for static imports in java Jun 25 04:55:27 Treating initialisms as words is a nice high-tech thing. :D Jun 25 04:55:42 so everyone agrees with LaLocation? Jun 25 04:55:47 yes Jun 25 04:55:49 LaClient, etc Jun 25 04:56:00 ok cool ty Jun 25 04:56:01 do you have two Client types? Jun 25 04:56:15 for different apis Jun 25 04:56:26 perhaps choose a more semantic prefix then Jun 25 04:56:35 sounds French Jun 25 04:56:48 haha name of the app isn’t actually Little App Jun 25 04:56:48 I like import alises here because the consumer can choose the prefix. So I'm looking forward to them in Kotlin. :) Jun 25 04:57:00 Duckily: i meant UserClient, TweetClient, etc. Jun 25 04:57:15 JakeWharton: i was responding to icedp Jun 25 04:57:40 icedp: that would be BluetoothLeScanner Jun 25 04:57:42 JakeWharton: but this client accesses all the endpoints of LittleApps api Jun 25 04:57:53 what differentiates them then? Jun 25 04:57:59 similarly TwitterClient access all of theirs Jun 25 04:58:11 * surf2b1 spends too much time naming things :\ Jun 25 04:58:14 a completely different service Jun 25 04:58:23 JakeWharton: ^ Jun 25 04:58:29 so then why are both called Client if they point to different things? Jun 25 04:58:32 Naming is such a big deal, IMO. It's how Real Programmers[tm] document stuff. Jun 25 04:58:46 FooClient, BarClient, where Foo and Bar are the services Jun 25 04:58:57 JakeWharton: exactly Jun 25 04:59:18 FooClient is the singleton for accessing the service Jun 25 04:59:22 of foo Jun 25 04:59:49 so the question is whether to go with LittleAppClient or LaClient Jun 25 05:00:05 second is easier, but not sure if it looks bad in java Jun 25 05:00:07 it doesn't matter Jun 25 05:00:19 ok ty Jun 25 05:00:19 Long identifiers can harm readability. Jun 25 05:00:29 Having said that, I don't totally shy away from them either. Jun 25 05:01:16 one more unrelated question, i’m storing records in the database and trying to do an amateur sync with the service. whats the best storage mechanism for storing cached retrivel times Jun 25 05:01:27 shared preferences? a db table/ Jun 25 05:01:28 ? Jun 25 05:01:45 ex usersLastFetchedAt Jun 25 05:03:36 use databases for row oriented data Jun 25 05:03:39 JakeWharton: what phone model you use? Jun 25 05:03:43 N6 Jun 25 05:03:47 android? Jun 25 05:03:53 M preview Jun 25 05:04:00 pfn: this is sort of like metadata though Jun 25 05:04:05 I'm surprised Jun 25 05:04:10 not sure if a db table is a good fit Jun 25 05:04:26 squ: no choice, Project Fi requires a N6 and L has too many memory leaks Jun 25 05:04:39 Project Fi? Jun 25 05:04:44 Duckily, that was the point Jun 25 05:04:55 squ: fi.google.com Jun 25 05:04:58 pfn: so shared preferences? Jun 25 05:05:01 I have an N6 too but I hope by the time Fi becomes a reality, it will cover more than just N6 Jun 25 05:05:11 Project Fi is a program to deliver a fast, easy wireless experience in close partnership with leading carriers, hardware makers, and our users. Jun 25 05:05:15 Duckily, if it's not row oriented, don't bother Jun 25 05:05:15 very descriptive Jun 25 05:05:28 deliver wireless experience Jun 25 05:05:38 pfn: what do you mean? how do i store it? Jun 25 05:05:41 I wonder who is author of that sentence Jun 25 05:07:06 JakeWharton: is that like apple connects iphone to macbook? Jun 25 05:07:21 wtf) Jun 25 05:07:33 Duckily: What exactly do you need to store? Jun 25 05:08:04 no, it's a meta-carrier that switches between T-Mobile and Sprint cell networks for mobile data as well as using Wi-Fi for calling and transparently switching between the three as needed Jun 25 05:08:06 AFAIR, SharedPreferences isn't great for lists and stuff. Jun 25 05:08:20 TacticalJoke: cached retriviel times from api endpoints, such as usersLastFetchedAt, jobsLastFetchedAt Jun 25 05:08:31 probably 1 for each table Jun 25 05:08:59 JakeWharton: doesn't android do that by default? Jun 25 05:09:10 no Jun 25 05:09:26 when you connect to internet it opens wifi or mobile link Jun 25 05:09:32 automatically : Jun 25 05:09:50 if you have wifi, it opens it, if not it tries mobile data Jun 25 05:10:00 you did not read my sentence close enough Jun 25 05:10:18 1. it switches between two cell carriers as needed, transparently for mobile data Jun 25 05:10:25 what for Jun 25 05:10:28 2. it switches between Wi-Fi and mobile networks for calling Jun 25 05:10:47 how do you make a call over wifi Jun 25 05:11:00 open the phone app, dial a number Jun 25 05:11:03 the same as a normal phone call Jun 25 05:11:19 normal phone call doesn't use TCP\IP Jun 25 05:11:23 TacticalJoke: any suggestion? Jun 25 05:11:29 you asked how Jun 25 05:11:38 previously the carrier had to add special extensions for calling over wifi Jun 25 05:11:39 so, both phones have to use your app? is it skype clone? Jun 25 05:11:45 the implementation details are irrelevant Jun 25 05:11:52 no, it's fi Jun 25 05:12:22 g00s, nothing special, sip would work automatically Jun 25 05:12:25 probably good thing Jun 25 05:12:28 good luck :) Jun 25 05:12:52 g00s, stock dialer supports sip Jun 25 05:12:54 I'm not sure. It sounds like a table to me, with "last user download time", "last job download time", etc. along the top and "table 1", "table 2", etc. down the side. Jun 25 05:13:11 also at least with t-mo, wifi calling isn't available on all plans Jun 25 05:13:14 You could use a flat file, but then you have to worry about atomicity and so on. Jun 25 05:13:26 I guess you could use SharedPreferences. Jun 25 05:13:36 g00s: it is an app for 1 operator? Jun 25 05:13:43 t-mobile is where? Germany? Jun 25 05:14:38 if i recall, if the carrier offered wifi calling, they would add a setting to your phone ... and extra stuff would be needed. so if you had a nexus device, it screwed things up because ontop of aosp there would be some extra carrier bits Jun 25 05:14:43 That was "I guess you could use SharedPreferences". Jun 25 05:15:12 and now they make an app to support t-mobile feature Jun 25 05:15:13 Oops, that should be ``. Jun 25 05:15:16 TacticalJoke: if used a table it would be column_one=table_name, column_two=last_fetched_at Jun 25 05:15:19 I get it Jun 25 05:15:26 it could just be as simple as one setting 'use wifi for calling when available', but you wouldn't know from the dialer Jun 25 05:15:41 my lumia has the same thing Jun 25 05:15:52 if tmo implemented sip, no special options necessary Jun 25 05:16:11 the app doesn't support a t-mobile feature, it implements a feature of Google's carrier Jun 25 05:16:27 you could already do data-based calls with Google Voice Jun 25 05:17:07 do data-calls sound like R2D2? Jun 25 05:17:18 if you receive data in your ear Jun 25 05:17:59 you realized mobile calls have always been digital right? it's really no different Jun 25 05:18:28 google voice isn't a data call Jun 25 05:18:32 afaik operator base stations use same protocols as regular internet Jun 25 05:18:36 unless you do it through hangouts Jun 25 05:18:50 meh actually on android, looks like t-mo has a special app for wifi calling Jun 25 05:19:02 skype? Jun 25 05:19:11 special skype :) Jun 25 05:19:48 pfn: which is why i said you could do data-based calls with Google Voice Jun 25 05:20:13 JakeWharton, with hangouts, not Google voice Jun 25 05:20:21 it's still Google Voice Jun 25 05:20:44 the mechanism goes out as a call Jun 25 05:20:48 I got a $200 phone bill recently and realized I recently change phones, forgot to install Google Voice on it and blissfully kept calling my family in France with it... ouch Jun 25 05:21:01 JakeWharton: so it sounds? Jun 25 05:21:06 not really, and speaking of, I don't understand why outbound voice quality on hangouts is so shit Jun 25 05:21:17 the hangouts tech is Google Voice Jun 25 05:21:24 how do you think it works? Jun 25 05:21:36 so yes really Jun 25 05:22:11 well, the pstn hookup can be anything, that aspect of google voice is trivial Jun 25 05:22:20 oh so it is google voice Jun 25 05:22:24 gotcha Jun 25 05:25:11 hey guys, i got a thread, but thread.stop() is depricated since v1. whats best way to stop a thread? Jun 25 05:25:30 Find a way to tell it to stop and have it listen to that Jun 25 05:26:06 so use a bool and check for it while its running? Jun 25 05:26:14 i ready about calling thread.interrupt() Jun 25 05:26:21 but wasnt sure which method is best? Jun 25 05:27:07 hi, I am analyzing the source code of the AOSP Dialer Jun 25 05:27:31 jareddlc: What is your thread doing? Jun 25 05:27:47 In this line /res/layout/dialpad_fragment.xml: Jun 25 05:28:28 include a dialpad_view layout file but this file doesn't exist in the layout folder Jun 25 05:28:44 while(true) -> while(mInStream.available() > 0) , bluetooth Jun 25 05:28:55 TacticalJoke: Jun 25 05:28:59 Uh no, that will pin your CPU. No busy wait. Jun 25 05:29:01 Who can help me? Jun 25 05:29:47 CedricBeust: have a sleep? Jun 25 05:29:53 also available() can return 0 Jun 25 05:30:09 the default implementation does, for example, which offers no indication of actual bytes available Jun 25 05:30:17 Whatever your thread is doing, check that boolean once in a while, but not in a tight loop Jun 25 05:30:21 well i have a while(true) Jun 25 05:30:30 Where is the dialpad_view.xml file? https://android.googlesource.com/platform/packages/apps/Dialer/+/master/res/layout/dialpad_fragment.xml Jun 25 05:30:34 CedricBeust: how do i do that? Jun 25 05:31:11 No sleep() needed, check that boolean but not all the time. Keep a timestamp of last time you checked it Jun 25 05:31:27 hmm, got a question about okhttp POST methods: can I directly use a query string ("?key1=value1&key2=value2") in a RequestBody? From the docs, it looks like I could do that with JSON, but I'm not sure how to with the urlparams Jun 25 05:31:38 chihau: https://android.googlesource.com/platform/packages/apps/PhoneCommon/+/master/res/layout/dialpad_view.xml Jun 25 05:31:41 well isnt checking timestamp same as checking a boolean? Jun 25 05:32:13 shoerain: http://square.github.io/okhttp/javadoc/com/squareup/okhttp/FormEncodingBuilder.html Jun 25 05:32:34 JakeWharton, but the Phonecommon is another package Jun 25 05:32:47 chihau: so? Dialer depends on it. Jun 25 05:33:21 JakeWharton: ah thanks. I guess I have to split the queryparams into key/value pairs? Jun 25 05:33:28 here is my current implementation any help would be appreciated: https://gist.github.com/jareddlc/4d41e73182448d55e809 Jun 25 05:33:50 shoerain: if you have a string just call RequestBody.create with it Jun 25 05:33:53 jareddlc: Yes fair point, it really depends on whether your thread is CPU bound or other-bound Jun 25 05:36:17 so CedricBeust instead of my while(true) have it be something like while(shouldStop) Jun 25 05:36:30 or how can i limit how fast my thread runs? Jun 25 05:36:36 You have to be careful with this, it really depends on what happens in that while Jun 25 05:36:41 i would like for it to be non cpu intentsive Jun 25 05:36:45 If it's very fast, you're going to pin your CPU, not good Jun 25 05:36:46 is there a way to disable a mic? one of mine is broken Jun 25 05:36:59 and the call app is using the one broken Jun 25 05:37:07 so I have to use headset everytime Jun 25 05:37:17 jareddlc anyhow, you probably want while (!Thread.currentThread().isInterrupted) { } or something Jun 25 05:37:49 thanks g00s but this will still execute at 100% cpu wuold it not? Jun 25 05:37:55 i guess now that i figure how to stop it Jun 25 05:37:59 how do i optiize it xD Jun 25 05:38:16 this will run for long periods of times, as its an app for my bluetooth watch Jun 25 05:38:27 so i need to leave a service running to notify my watch of any notifications Jun 25 05:39:12 so g00s to stop i would simply call Thread.interrupt(); Jun 25 05:39:16 jareddlc i thought the chat example had all of that Jun 25 05:39:26 haven't looked at it in a while Jun 25 05:39:45 no idea, its been a long time Jun 25 05:39:45 I wonder why this document doesn't mention Thread.isInterrupted? https://docs.oracle.com/javase/8/docs/technotes/guides/concurrency/threadPrimitiveDeprecation.html Jun 25 05:39:51 I would've expected that to be the first suggestion. Jun 25 05:39:58 im trying to clean up code, as im going to make a first alpha release of my app on XDA Jun 25 05:40:22 TacticalJoke: i opened with that, saying its depricated Jun 25 05:40:47 TacticalJoke lol why would it be deprecated Jun 25 05:43:26 Wait, what's deprecated? Jun 25 05:43:29 I'm running on a lack of sleep. Jun 25 05:45:04 https://gist.github.com/anonymous/cdb6c4abaa97d5861763 Does anyone know why my animation is buggy. If I uncomment setDuration and setFillAfter then my ImageView rotates for a second and disappears. However if I leave the two lines commented out my ImageView just keeps blinking rapidly. Jun 25 05:45:07 TacticalJoke: Thread.Stop() is depricated Jun 25 05:45:08 What's wrong here ? Jun 25 05:45:59 so is thread sleeping a way to optmize? Jun 25 05:46:08 JakeWharton: So I passed it in as a string, but I get a different result in the "form" field than if I do it via curl. I would need FormEncodingBuilder then? results: http://sprunge.us/UbAB?java Jun 25 05:46:17 to replicate it the way curl does it Jun 25 05:46:52 jareddlc you should set that loop up so that you are always blocked on the stream, and if the thread is interrupted you fall through Jun 25 05:46:59 look at bluetoothchat Jun 25 05:51:39 will do g00s Jun 25 05:52:39 Whoa, there's a static method Thread.interrupted (checking the current thread). Didn't know that. Jun 25 05:53:38 TacticalJoke: yup, i tried it and it worked, but now im looking into the chat app see how i can improve my thread Jun 25 05:53:49 g00s: it usning read, eventhough it may not have data Jun 25 05:55:44 "Whole Foods supermarkets have been routinely overcharging customers" wow Jun 25 05:56:23 "Conscious Capitalism" lol Jun 25 05:58:22 g00s: did you mean to take a look at the syncronized methods? or just the connected thread of bluetoothchat? Jun 25 05:58:42 jareddlc the one reading the socket :| Jun 25 05:59:13 yeah, its not doing anything special Jun 25 05:59:18 in fact all it does is close socket Jun 25 06:03:00 looks they do while(true) also Jun 25 06:03:21 so i guess guaranteed to get IOException there when interrupted, so should be fine then Jun 25 06:03:24 I don't know anything about bluetooth, but I found with my app (which does HTTP requests) that the only way to break a blocking read is to close the socket. (Though interruptible channels, which I didn't try, might be another way.) Jun 25 06:04:43 In fact, I think that applies to writes too. Jun 25 06:05:17 yeah they have ConnectedThread#cancel() which does socket.close() Jun 25 06:06:06 still seems icky to me though to be infinite loop in Thread.run() while not checking thread interrupted state Jun 25 06:06:11 yeah but calling a socket.close() doesnt cause thread to stop Jun 25 06:06:39 and im getting a infinit errors with just calling socket.close() Jun 25 06:06:39 jareddlc it should, not sure why you dont see it Jun 25 06:07:10 BluetoothChatService is kinda weird, but it hasn't changed in a long time. it works Jun 25 06:08:24 I guess the IOException they're catching is (mainly) the SocketException from Socket.close? Jun 25 06:08:51 Thought the Android documentation for Socket.close doesn't mention what the Java documentation does: "Any thread currently blocked in an I/O operation upon this socket will throw a SocketException." Jun 25 06:09:09 it calls cancel and sets it to null ... Jun 25 06:10:03 jareddlc: What errors are you getting with Socket.close? Jun 25 06:10:13 too fast to see, since its in a forloop Jun 25 06:10:21 but looks like is the read Jun 25 06:10:36 inStream.read() Jun 25 06:11:20 Is it because you're catching IOException? Jun 25 06:11:24 And SocketException is an IOException Jun 25 06:11:35 anyone here know about nativescript? I had a question regarding the file system Jun 25 06:11:47 Wait, you're not breaking out of the loop when catching the IOException. Jun 25 06:11:59 Hence your infinite errors, I guess. Jun 25 06:12:07 TacticalJoke: i follow tuts, and example used IOException Jun 25 06:12:08 Or maybe you've changed that. Jun 25 06:12:22 but calling socket.close() Jun 25 06:12:25 In any case, I think you'll have to say `while (!canceled) { doStuff(); }` or something. Jun 25 06:12:30 doesnt stop my thread from running Jun 25 06:12:54 jareddlc: In that code you posted, you're catching the SocketException, logging it, and then continuing to loop. Jun 25 06:13:05 But at that point you're trying to reuse a closed stream, and I guess you're getting the exception again. Jun 25 06:13:16 The solution would be to stop looping. Jun 25 06:13:49 Or I could be misreading. I've hardly slept in the past few days. :D Jun 25 06:14:10 oh snap, its my server bluetoothSocker Jun 25 06:14:14 thats complaining Jun 25 06:15:07 This is an interesting naming example: http://docs.oracle.com/javase/7/docs/api/org/omg/CORBA/portable/InputStream.html Jun 25 06:15:10 haha TacticalJoke yes, i am in a while(true) so it will always try to do Input.read() Jun 25 06:15:14 InputStream subclassing InputStream. Jun 25 06:21:22 so the issue was my BluetoothkServerSocket Jun 25 06:22:13 :) Jun 25 06:25:17 You can use Thread.interrupt too, but I'm not sure it's needed. Personally, I just use Socket.close along with my own flag (basically). Jun 25 06:26:01 I say "basically" because in my case it's more or less a list of flags. Jun 25 06:26:10 im using interupt Jun 25 06:26:49 but becuase its in a while loop i do get a few errors only like 3-4 since it runs soo fast and takes time to set the boolean Jun 25 06:26:57 but doesnt cause an app crash Jun 25 06:27:48 Why does it take time to set the flag? Jun 25 06:28:34 I'd expect that setting the flag and then closing the socket would yield only one SocketException. Jun 25 06:29:31 TacticalJoke: i was using isConnected flag, which is set after i actually connect or disconnect Jun 25 06:30:17 so the thread is still running Jun 25 06:31:37 Wouldn't it make more sense to set it before disconnecting? Also, you might need to make it volatile (to avoid issues with relating to caching). Jun 25 06:31:44 s/with // Jun 25 06:36:04 TacticalJoke: this is how im doing now: https://gist.github.com/jareddlc/0e5ffa8aa44aba5aec8d Jun 25 06:36:43 lol at using break to exit while loop Jun 25 06:38:05 hmm now that i think of it. i should be doing while(isThreadRunning) set that to false, then close thread with interupt()? Jun 25 06:39:15 You're calling Thread.close? Jun 25 06:41:07 I wouldn't do any of that. Jun 25 06:41:11 TacticalJoke: ? Jun 25 06:41:32 I'd simply set a volatile `canceling` flag, close the BluetoothInputStream (which calls Socket.close), and check `canceling` in the loop. Jun 25 06:41:51 Being sure to set `canceling` before closing the InputStream. Jun 25 06:42:22 hi, is it possible to update spinner max and min values as the selected values changes? Jun 25 06:42:50 jareddlc: It seems weird to call Thread.stop and Thread.interrupt. It's like you just can't decide. :) Jun 25 06:43:07 And the first is deprecated. Jun 25 06:43:08 im not calling .stop() Jun 25 06:43:34 Oh, sorry. I misread that part. Jun 25 06:43:53 so isRunning should be voliile? Jun 25 06:43:55 What does `onconnect.close();` call? Jun 25 06:44:09 i updated the gist Jun 25 06:44:14 it closes sockets and streams Jun 25 06:44:25 Okay, I see. Jun 25 06:44:31 but i agree i do not like the thread.interupt Jun 25 06:44:46 isRunning should probably be volatile is one thread is reading it and another thread is writing it. Jun 25 06:44:49 and can be avoided if i use a boolean instead of the isInterrupted Jun 25 06:44:56 Otherwise the reading thread might not get updated. Jun 25 06:45:05 thanks just read up on volitile Jun 25 06:45:06 s/is/if/ Jun 25 06:46:18 so im iterating over a volitile boolean, and set that to false before closing socket Jun 25 06:46:25 let me run, id expect to work Jun 25 06:47:12 dang TacticalJoke ; i'm either a shitty OO modeler - can't get out of this downcasting; i have 2 things which are kinda the same but not totally, so they inherit an interface. but one does much more so it has extra methods Jun 25 06:47:37 some languages like ocaml don't even allow downcasting Jun 25 06:47:46 I hate stuff like that. I have a situation in my current local branch kinda like that. Jun 25 06:48:07 Sometimes I just copy-paste stuff and see whether I can refactor so much that I can avoid inheritance somehow. :D Jun 25 06:48:38 in some places i want substitutability, in others the specific type needs to be known Jun 25 06:49:05 awesome thanks guys, thanks g00s TacticalJoke cedric Jun 25 06:49:16 np Jun 25 06:49:19 Are you getting just the SocketException now? Jun 25 06:49:25 1, yes Jun 25 06:50:13 *trumpets play* Jun 25 06:50:28 but that is expected, and im not logging Jun 25 06:51:09 catch (IOException e) {if(isThreadRunning) {Log.e(LOG_TAG, "Error: mInStream.read()", e);}} Jun 25 06:51:16 so only logg if it i didnt expect it Jun 25 06:51:40 now in terms of optimizing my while loop :) Jun 25 06:51:49 is sleeping the thread a good practice? Jun 25 06:53:22 but maybe thats enough questions for tonight :) Jun 25 06:53:27 I have a coordinator layout with a FAB which shows a DialogFragment full screen; however, the dialog is transparent and covers the action bar. I think it's an issue with the coordinator layout, but I need that for the FAB. Jun 25 06:53:40 I'm not sure about bluetooth stuff, but I've definitely seen Thread.sleep used for this kinda thing before. Jun 25 06:54:11 TacticalJoke if you use interface segregation, and have a few small interfaces, do you ever find it convenient having an empty interface that combines though? is that a bad idea ? Jun 25 06:54:19 The code for it is here: http://stackoverflow.com/questions/31020462/android-full-screen-dialog-appears-transparent-and-in-the-wrong-position Jun 25 06:54:43 *combines those Jun 25 06:55:48 g00s: Hmm, not sure. I've not used interface segreation very much lately. Jun 25 06:56:04 segregation* Jun 25 06:56:30 At least not in a way that motivated me to think about creating a combining interface. :D Jun 25 06:57:55 hmm Jun 25 07:05:54 hi could somebody explain what is the purpose of this receiver : https://code.google.com/p/csipsimple/source/browse/trunk/CSipSimpleCodecG729/AndroidManifest.xml the associated broadcast is empty and it seems that only the meta-data as a role Jun 25 07:08:31 TacticalJoke seems pita to say List Jun 25 07:08:59 rather just say interface X implements A & B & C, List Jun 25 07:12:03 Yeah, I know what you mean. Jun 25 07:12:08 I've not really done the combining thing much. Hmm. Jun 25 07:12:38 Are Step Counter and Step Detector separate sensors or some interface built upon accelerator ? Jun 25 07:13:54 thanks guys, im about to go to sleep Jun 25 07:13:58 much appreciated for the help Jun 25 07:14:37 jareddlc.sleep(7 * 60 * 60 * 1000); Jun 25 07:15:39 neredsenvy: https://source.android.com/devices/sensors/sensor-types.html#step_detector Jun 25 07:16:12 oh its funny TacticalJoke just today i ran into github api limiter becuase my cron job Jun 25 07:16:13 :) Jun 25 07:16:21 i hat the max allow for 1hr in 4mins Jun 25 07:16:23 hit Jun 25 07:16:54 When I try Sensor stepDetector = manager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR) I get null : ( Jun 25 07:17:12 Doh! Jun 25 07:17:13 I wondered why since it's built on top of the accelerometer Jun 25 07:21:38 neredsenvy: it's not supported by all (most?) devices Jun 25 07:31:14 How do you make an ImageView content appear with twice the size Jun 25 07:31:15 I mean Jun 25 07:31:29 I have gifs of different sizes Jun 25 07:31:39 Contained in a fixed size ImageView Jun 25 07:31:44 With ScaleType.CENTER for now Jun 25 07:31:51 And I want them to appear twice as big Jun 25 07:32:06 But I don't want for them to scale to the imageview size nor anything like that Jun 25 07:37:21 Ribesg: Show your xml. I don't understand how you want the image to differ from the iamgeview Jun 25 07:37:54 I'm using Anko Jun 25 07:38:02 Well. Jun 25 07:38:24 Currently I've got an ImageView of 125x125 Jun 25 07:38:42 I'm putting a drawable inside with scaletype "CENTER" which doesn't change the size of the original image Jun 25 07:38:54 So the image appear a bit too small, I would like for it to be double the size Jun 25 07:39:22 Without changing the previous behaviour, which allowed me to use various sizes of images there Jun 25 07:39:22 Ribesg: Then provide a larget image if you are using fixed size. Jun 25 07:39:41 Well, resizing the original images isn't a possibility Jun 25 07:39:52 Those are hundreds of gifs :s Jun 25 07:39:56 Then use different scaling Jun 25 07:40:06 But I don't want to Jun 25 07:40:30 Right now I'm trying to put the ImageView into something else of fixed size, then change the imageview size to match 2x the image Jun 25 07:40:38 Not sure if this can work Jun 25 07:41:05 You want to change the image size without chaning anything? Jun 25 07:41:09 Show your xml Jun 25 07:42:44 s/xml/Kotlin :D Jun 25 07:42:57 s/xml/Kotlin :D Jun 25 07:42:59 Oops. Jun 25 07:43:30 https://github.com/Ribesg/Encypokedia/blob/master/PokeApp/src/main/kotlin/fr/ribesg/android/encypokedia/activity/fragment/PkmnFragment.kt Jun 25 07:44:44 barq, ^ here's my "XML" Jun 25 07:44:55 :D Jun 25 07:45:23 The bad part is that my apk with all the resources is 62MB Jun 25 07:45:32 It's super-nice to test ._. Jun 25 07:48:14 Ribesg: change width/height? Jun 25 07:48:30 barq, those are width/height of the ImageView Jun 25 07:48:52 If the ImageView is set to show the image with its original size, the size of the ImageView doesn't matter Jun 25 07:49:16 If you put a 64x64 image in a 150x150 ImageView or a 500x500 ImageView, it will be the same Jun 25 07:49:26 With scaletype=center I mean Jun 25 07:50:15 If you use setTextSize on a Paint object, which unit is it used? Jun 25 07:51:09 TacticalJoke lol, i found some antipatterns https://sourcemaking.com/antipatterns/software-development-antipatterns Jun 25 07:51:35 looking through these, they look like they came from the original AntiPattern book a few years ago Jun 25 07:51:41 https://sourcemaking.com/antipatterns/the-blob Jun 25 07:51:51 FrancescoV: Pixels. Jun 25 07:52:04 TacticalJoke: thanks Jun 25 07:52:17 Ribesg: So what do you want to change then if not the dimensions, scaleType or original image? Jun 25 07:52:52 I just want the image to appear with twice its size Jun 25 07:53:28 I want an image to appear with twice its original size in a fixed size frame bigger than any of the images' size I have Jun 25 07:53:29 g00s: Never heard of The Blob before. :D Jun 25 07:53:40 Well, I've seen the code (just not heard the name). Jun 25 07:54:07 the AntiPattern book was the dual of GoF - but it was kinda comical Jun 25 07:54:32 I never read that. Hmm, not sure how I missed it. Jun 25 07:54:37 I read GoF. Jun 25 07:54:38 thats why the other day in reddit when retards were bellyaching about concept of antipatterns, i thought - you haven't seen shit man Jun 25 07:55:14 The GoF book was so dry. Ugh. I kinda hated it. Jun 25 07:55:19 With its outdated examples in C++. Jun 25 07:55:30 Head First Design Patterns was a much happier read. Jun 25 07:55:42 http://www.amazon.com/AntiPatterns-Refactoring-Software-Architectures-Projects/dp/0471197130 Jun 25 07:55:53 Is that worth reading? Jun 25 07:56:03 hmm .. probably not at this point Jun 25 07:56:09 good mornings Jun 25 07:56:25 i think like many things, the important points get absorbed in more modern material Jun 25 07:56:35 Yah. Jun 25 07:57:04 GoF = best, the examples are only outdated if you don't know C++ or any newer language with a syntax deriving from C/C++ Jun 25 07:57:51 and if you don't know that... it brings us to a point where one can question whether you should really reach for such a book in the first place :P Jun 25 07:57:54 The examples being outdated had nothing to do with the language. I just added that because I hate C++. Jun 25 07:58:03 TacticalJoke: that's what I thought ;) Jun 25 07:58:12 I hate C++ because I spent many years with it. Jun 25 07:58:46 GoF is 1994 guys, it was a pivotal point back then, of course trends and patterns have changed since then ;) but yeah Jun 25 07:58:56 So you're agreeing that it's outdated? Jun 25 07:59:21 the presentation - hmm, maybe Jun 25 07:59:30 in relation to now? yeah, optimal-wise, but as a reference book? no, it's not Jun 25 07:59:37 for example, when they describe where they found each pattern - thos esystems are really old now Jun 25 07:59:56 who's looked at the source code for WindowMaker Jun 25 07:59:59 heh Jun 25 08:00:10 Yeah, I think that's the exact thing I had in mind. Jun 25 08:00:26 it's like saying that books on how to do good photography by the 20th century masters of the field are "outdated" because they used analog range finders instead of digital ;) Jun 25 08:00:27 That's the one they keep mentioning in the book, AFAIR. Jun 25 08:00:30 also, at some later OOPSLA they voted a few patterns off the block Jun 25 08:00:37 though I suspect they survived longer in java than in C++ due to certain inflexibilities (though custom annotation processors chaned that) Jun 25 08:00:41 Kanalia: I don't understand your criticism of my criticism. Jun 25 08:00:42 as if the optical side of photography changed since then Jun 25 08:00:59 I'm saying it's a book with outdated examples. What's the problem? Jun 25 08:01:06 It's still recommended today (even highly). Jun 25 08:01:14 outdated as in unusable? Jun 25 08:01:18 Kanalia: the difference is that GoF patterns aren't based on some laws of reality, but on particular deficiencies of language used and their chosen problem space Jun 25 08:01:32 or outdated as in they can't teach you anything and you better get a newer book about design patterns? Jun 25 08:01:49 if that's what you meant TacticalJoke then I can't agree with your criticism Jun 25 08:02:10 p_l: true enough Jun 25 08:02:17 yeah i wish we had multimethods Jun 25 08:02:18 I mean that some (many?) of the examples aren't very applicable to the kinds of things we're doing today (e.g., mobile-app programming). Jun 25 08:02:23 java sucks heh Jun 25 08:02:25 And yet people recommend it today. Jun 25 08:02:51 what have i missed? Jun 25 08:02:55 TacticalJoke: mobile-app programming wasn't a thing back then, true :) Jun 25 08:02:58 well if you are using a c++ / java looking language, most of the patterns still apply Jun 25 08:03:01 like "GOTO Considered Harmful", Design Patterns book is mostly dogma/religion :P Jun 25 08:03:21 people recommend it today because in a general programming sense it's still a good reference Jun 25 08:03:27 Kanalia: Of course it wasn't a thing back then. Jun 25 08:03:38 (the book is afaik actually useful, but most people who use design patterns won't read it with understanding...) Jun 25 08:04:13 g00s: Yeah, the patterns themselves aren't so outdated (AFAIR); I just didn't like the examples much. I think I read it about eight years ago. Jun 25 08:04:45 The patterns are a bit outdated in that they come from inheritance-heavy class-oriented programming :) Jun 25 08:04:49 if we look at database programming, web development, mobile apps, game dev, each scope has it's own useful design patterns. Some general ones apply everywhere, others not. I don't see that as something bad Jun 25 08:05:02 p_l: true that Jun 25 08:05:08 http://martinfowler.com/bliki/OOPSLA2004.html Jun 25 08:05:21 "Four patterns were voted off." ... Jun 25 08:05:31 Kanalia: My point is simply that the GoF book is nowhere near as good (IMO) as people tend to suggest. Jun 25 08:05:53 TacticalJoke: SHAME!!! Jun 25 08:05:54 TacticalJoke: some people tend to have the same opinion about Cormen's algorithms book, or Knuth's for that matter Jun 25 08:05:59 not sure why they would vote bridge / flyweight Jun 25 08:06:04 Mainly because it's so dry, (some of) its examples are so outdated, and the programming language it uses heavily is so... ugh. Jun 25 08:06:05 TacticalJoke: as with "GOTO Considered Harmful", it's mostly dogma Jun 25 08:06:12 Fo sho. Jun 25 08:06:42 g00s: !! Jun 25 08:06:53 thepoosh :D Jun 25 08:06:58 I literally LOLed when I read a review of Cormen's where the main point of criticism was that most algorithms explained are nowadays available inside standard or 3rd party libraries Jun 25 08:07:05 Kanalia: I think everything you've said in response to my claim has been some kind of straw man. ;o Jun 25 08:07:20 TacticalJoke: what was your claim? Jun 25 08:07:28 Kanalia: Cormen et al is some of dryest algorithms book I ever encountered. Good encyclopedic reference with crappy westernish pseudocode, still used like bible by certain groups while ignoring (IMO better) other books Jun 25 08:07:44 Something like "Design Patterns isn't worth reading today". Jun 25 08:07:51 TacticalJoke: you can think what you like, see if I care :) Jun 25 08:08:02 I think I disagree Jun 25 08:08:05 p_l: yep, good reference book Jun 25 08:08:11 thepoosh: welcome to the team lol Jun 25 08:08:22 many people write crappy unmaintainable unscalable code because they just don't know better Jun 25 08:08:27 i deal with that shit daily Jun 25 08:08:40 mostly my early code Jun 25 08:09:05 what books have you guys read that mattered most to your code quality ? Jun 25 08:09:37 Clean Code affected mine a bit. I realised that it's fine to have tiny methods, even if called only once. Jun 25 08:09:55 I had always wanted to write those tiny methods but had felt that I shouldn't've. Jun 25 08:10:59 TacticalJoke: it's very important when building huge components from scratch such as server/client API Jun 25 08:11:13 we hade lots of crap happen because code was not-scalable Jun 25 08:11:18 g00s: Practical Common Lisp XD Jun 25 08:11:20 I find, though, that almost nobody follows the advice in that book -- even the author. Jun 25 08:11:28 you can see that very clearly when designing DB Jun 25 08:11:46 not talking about a specific book, but about knowing the material Jun 25 08:11:46 g00s: though Skiena's "Algorithm Design Manual" is simply best algorithms book I know Jun 25 08:11:54 When I read Uncle Bob's code I often see methods that work at multiple levels of abstraction (rather than following the one-level-below approach). Jun 25 08:12:10 i remember skiennas book; damn i had to sell that too Jun 25 08:12:51 thepoosh: Did you ever read Head First Design Patterns? Jun 25 08:13:00 Less comprehensive than the GoF book, but way more enjoyable to read. Jun 25 08:13:20 Though it's more like a basic intro to a few design patterns. Jun 25 08:13:44 Managed to get my "image twice the size" thing working Jun 25 08:14:06 I've got a question for you not super-beginners like me, isn't it a bad thing to have nested layouts? Jun 25 08:14:48 grady booch has been working on a architecture patterns book for ... years, maybe 10 now Jun 25 08:14:49 Ribesg: You mean nested ViewGroups? Jun 25 08:14:52 can't wait until he's done Jun 25 08:14:59 Ehm Jun 25 08:15:15 I mean I've got a linearLayout inside a linearLayout inside a verticalLAyout Jun 25 08:16:32 this is interesting, see slide 18 http://fose.ethz.ch/slides/gamma.pdf Jun 25 08:17:02 written by gamma recently Jun 25 08:17:21 TacticalJoke: yes Jun 25 08:17:26 Ribesg: Having a lot of nesting can slow things down (especially with measuring, I think). Jun 25 08:17:47 Though this might matter mainly with things like ListView/RecyclerView. Jun 25 08:17:47 TacticalJoke: I got bored with the ducks and fish and also learned enough of it in college Jun 25 08:18:12 Ribesg: A single RelativeLayout can be very powerful. Jun 25 08:18:15 " Erich Gamma is considered the enemy by many CS students" :D Jun 25 08:18:23 Hmm yeah RelativeLayout could work Jun 25 08:18:31 I guess I think too much CSS Jun 25 08:18:33 :P Jun 25 08:18:50 yakk Jun 25 08:18:54 Wait I only saw RelativeLayout in XML Jun 25 08:19:00 Can you reference things made in Anko? Jun 25 08:19:07 Like don't you have to create ids yourself and all Jun 25 08:19:33 Yeah, you can do that in Anko. Jun 25 08:19:46 Ctrl+F "relativelayout" on this page: https://github.com/JetBrains/anko Jun 25 08:20:44 TacticalJoke, yeah but you need some way to generate "unique" IDs Jun 25 08:20:50 I had something for this I think Jun 25 08:20:57 Ah, okay. Jun 25 08:21:20 Ribesg: I've not used Anko, personally, but I'm not sure whether I'd pick it over XML. Hmm. Jun 25 08:21:23 At least in general. Jun 25 08:21:26 https://github.com/Ribesg/Encypokedia/blob/master/PokeApp/src/main/kotlin/fr/ribesg/android/encypokedia/Utils.kt Jun 25 08:21:36 I'd certainly consider it when I'm already avoiding XML (e.g., for extreme performance). Jun 25 08:21:48 TacticalJoke, I just hate XML with a passion, and as I'm just starting with Android it's not like I have to forget anything Jun 25 08:22:02 ViewUtils? ;o Jun 25 08:22:13 Yeah not sur how you would call that Jun 25 08:22:15 x) Jun 25 08:22:34 I don't even remember why I did this Jun 25 08:22:43 But I found some SO on the matter and used it Jun 25 08:22:48 Now it's there, ready in the repo Jun 25 08:22:50 So no probleù Jun 25 08:22:56 problem* Jun 25 08:22:57 Couldn't you use extension functions? Jun 25 08:23:05 someView.generateId() Jun 25 08:23:14 Yes I could Jun 25 08:23:28 Seeing "ViewUtils" in Kotlin code made me lose track of reality for a moment. Jun 25 08:23:40 But when I hit Ctrl+Space in IDEA in Android development the IDe already burns Jun 25 08:23:56 Wait, we wouldn't even need extension functions, I guess. Jun 25 08:23:58 I wasn't reading the code. Jun 25 08:24:05 Maybe a top-level function? Hmm, not sure. Jun 25 08:24:17 Yeah ofc I could just use a top level function Jun 25 08:24:29 I just don't know how to organize them in general Jun 25 08:24:39 See that ViewUtils thing as a prefix Jun 25 08:24:47 I guess I'll use an extension function Jun 25 08:24:59 As long as there's only this one util Jun 25 08:25:05 I feel like taking back that suggestion. Jun 25 08:25:11 As the function is not doing anything with the instance. Jun 25 08:25:33 Well the problem is that it is using a property Jun 25 08:25:46 I could just define an extension function which calls the util Jun 25 08:26:14 Why are you using AtomicInteger? Won't this always be called on the main thread? Jun 25 08:26:41 Better safe than sorry? Jun 25 08:26:46 I don't know I really copy pasted that code Jun 25 08:26:49 Well mostly Jun 25 08:28:44 I'm not sure it's a good having this function at all. It's complicated. Jun 25 08:28:57 There's a hidden static thing backing it. Jun 25 08:29:20 And it's bad? Jun 25 08:29:31 The IDs only need to be unique within a limited score (e.g., two separate layouts can use the same IDs without problem). Jun 25 08:29:34 scope* Jun 25 08:29:47 Ribesg: The fact that it tries to be thread-safe for no reason is a problem. :D Jun 25 08:29:56 Yeah maybe Jun 25 08:30:21 Chances that 2 threads are working on the same view... kek Jun 25 08:31:41 Only the main thread is allowed to touch views, AFAIR. Jun 25 08:34:40 TacticalJoke, do you think that Random#nextInt() can return good ids? :P Jun 25 08:36:13 That sounds like a bad idea, as you could easily experience a clash. Jun 25 08:36:36 Also, in general, don't make code thread-safe just because you might need this in future. Making code thread-safe often makes it way more complicated. Jun 25 08:36:58 This is pretty important: https://en.wikipedia.org/wiki/You_aren't_gonna_need_it Jun 25 08:37:38 easily? Jun 25 08:37:58 rand.nextInt(0x00FFFFFF) Jun 25 08:38:09 I can't see this clashing Jun 25 08:38:36 Would need to check the probability for a single Random instance to return twice the same int in like, 10 calls Jun 25 08:38:41 Maybe let's say 50 calls to be safe Jun 25 08:38:54 I think you're trying to solve a problem that doesn't exist. Jun 25 08:39:22 All you need to do is this: val FOO_ID = 1; val BAR_ID = 2; val BAZ_ID = 3 Jun 25 08:39:24 In every context. Jun 25 08:39:36 Hmm Jun 25 08:39:37 why randomly generate ids? Jun 25 08:39:53 Start at 1 every time. There's no problem there. Jun 25 08:40:02 I don't know what if I have 20 or 30 of those Jun 25 08:40:12 20 or 30 views in a single layout? Jun 25 08:40:21 Which all need IDs? Jun 25 08:40:45 Most views need ids in a relativelayout, don't they? Jun 25 08:41:05 I'll do that Jun 25 08:41:18 I'll see if I end up having too many of those val Jun 25 08:41:29 Hmm, a lot just align with the parent in some way (e.g., bottom-right). Jun 25 08:44:19 What do you use when you want to put something in a fixed-size "box" ? Jun 25 08:44:30 For now I've got a fixed-size linearLayout Jun 25 08:44:36 I'm pretty sure it's not the right thing Jun 25 08:45:16 Ribesg, single item? Jun 25 08:45:30 Yes Jun 25 08:45:34 FrameLayout Jun 25 08:45:44 I've got an ImageView in a LinearLayout Jun 25 08:45:45 Hmm ok Jun 25 08:46:04 Why do you need a "box" at all if its single item Jun 25 08:46:05 Ribesg, what behaviour do you want? Jun 25 08:46:11 Ribesg, e.g. do you want to center it, move it, etc? Jun 25 08:46:16 just use the item Jun 25 08:46:45 I need a fixed size "box" containing an image which can have various sizes Jun 25 08:46:58 I need that sort of thing because I need to scall the image view to twice the image size manually Jun 25 08:47:03 To scale the image x2 Jun 25 08:47:05 you could do that with just an imageview Jun 25 08:47:08 Nope Jun 25 08:47:14 Or just tell me how :P Jun 25 08:47:22 But I'm pretty sure you just can't Jun 25 08:47:35 Ribesg, you still didn't answer clearly - the image view should be centered inside? Fitted? Larger than the box? Jun 25 08:47:38 pressed the Run button to launch app on simulator... any ideas why it is not launched after 5 minutes have passed? Jun 25 08:47:44 guys? Jun 25 08:47:52 squ: Because there is no simulator? :D Jun 25 08:47:58 no it is Jun 25 08:47:58 Mavrik, centered, I'm trying to set the box' size to something bigger than all the images I use there Jun 25 08:47:59 lol Jun 25 08:47:59 squ, whats the output ? Jun 25 08:48:01 squ, my crystal ball says that it's because your HDD smells of fish. Jun 25 08:48:12 squ, for more useful answer *PROVIDE INFORMATION* Jun 25 08:48:24 Ribesg, ah, yeah, you make a FrameLayout for the box Jun 25 08:48:34 Ribesg, and put in an ImageView that has layout_gravity="center" Jun 25 08:48:56 this will make Android center the view inside the FrameLayout and you'll probably want "adjustViewBounds" on ImageView so it'll resize according to image size Jun 25 08:48:56 it launched, hooray Jun 25 08:49:07 squ, also, do yourself a favour and install Genymotion :) Jun 25 08:49:47 I'm looking for a way to execute javascript on a webview after it has redirected to another website. Jun 25 08:49:53 any idea how I could do that? Jun 25 08:50:27 Mavrik, nope, I don't want the imageview to resize to imagesize Jun 25 08:50:46 Ok. Jun 25 08:50:47 I want the image to resize to the imageview size and set the imageview size to 2x image size :P Which is a bit more complicated Jun 25 08:50:55 I'll just show you what I have Jun 25 08:51:02 I've got the expected result but with wrong things Jun 25 08:51:09 set imageview to the fixed size and scale the bitmap to what you want it to be Jun 25 08:51:16 Mavrik: can you add me to ignore list Jun 25 08:51:17 play arround with scale types Jun 25 08:51:28 danijoo, "the bitmap" Jun 25 08:51:31 my irc client unfortunately doesn't have it Jun 25 08:51:32 Got a gif here Jun 25 08:51:33 :P Jun 25 08:51:54 (thunderbird) Jun 25 08:52:03 /ignore is not a supported command. Type /help to see the list of commands. Jun 25 08:52:05 Ribesg, not relevant Jun 25 08:52:39 squ, ? O.o Jun 25 08:52:40 danijoo, sure it is Jun 25 08:52:52 Mavrik: can you please? Jun 25 08:52:54 Here's my code https://github.com/Ribesg/Encypokedia/blob/master/PokeApp/src/main/kotlin/fr/ribesg/android/encypokedia/activity/fragment/PkmnFragment.kt Jun 25 08:53:00 squ, no I can't you dimwit. Jun 25 08:53:13 Are you taking offence to being asked for information? :D Jun 25 08:53:15 then please don't respond to my chat Jun 25 08:53:22 can you? Jun 25 08:53:33 squ, no, unless you really start asking proper quesitons. Jun 25 08:53:38 Ribesg, your kotlin looks aweful :D Jun 25 08:53:47 http://ci.ribesg.fr/job/Encypokedia/ Jun 25 08:53:51 You can play with it here Jun 25 08:54:05 try to get rid of all your !! :D Jun 25 08:54:36 danijoo, not sure how Jun 25 08:54:48 I'm force to use nullables Jun 25 08:54:57 sec.. Jun 25 08:54:58 how do I use ‘-’ with "@dimen/size" Jun 25 08:55:03 at least with this i can help :) Jun 25 08:55:05 Ribesg, ok, so set scale type to fill if you want the image to be stretched to exactly the size of the ImageView Jun 25 08:55:23 Mavrik, I just didn't touch it. I think it's the default Jun 25 08:55:25 (there's others "fit_" modes which will stretch the image depending if you want to keep the AR or not) Jun 25 08:55:30 He doesn't want that Mavrik Jun 25 08:55:39 Hmm Jun 25 08:55:43 Then I'm not really sure what does he want :) Jun 25 08:55:43 He wants the image independent of the imageview Jun 25 08:55:54 And not change the resource image either. Jun 25 08:56:51 Ribesg, http://pastebin.com/1s1dF1Nd Jun 25 08:56:52 I've got a shiton of gifs Jun 25 08:57:02 Just want to put them in a simple fixed size box Jun 25 08:57:09 Hmm, looks like he just has to set imageScaleType to fill, change the image container to FrameLayout and set layout_gravity to center Jun 25 08:57:12 Without breaking the gif ratio Jun 25 08:57:19 But while still showing them with twice their original size Jun 25 08:57:22 this will make sure the image is the exact size of imageview (twice the original size) and centered inside the container Jun 25 08:57:35 It works currently Jun 25 08:57:50 Replacing that random linearLayout with a frameLayout shouldn't change anything Jun 25 08:57:51 ues FIT_CENTER then Jun 25 08:58:02 ... Jun 25 08:58:15 I mean, it should work :P Jun 25 08:58:39 danijoo, oh yeah I forgot that Jun 25 08:58:46 okey, I launched the emulator Jun 25 08:58:48 :) Jun 25 08:58:48 now waiting Jun 25 08:58:53 danijoo, for some reason was locked in "Delegates = val" for some reason Jun 25 08:59:03 Woot Jun 25 08:59:10 danijoo, my brain* was locked in "Delegates = val" for some reason Jun 25 08:59:15 on* Jun 25 08:59:15 I mean pressed the Run button (not started emu) sry Jun 25 08:59:15 for things like layoutparams you should avoid !! too Jun 25 08:59:19 brb rebooting brain Jun 25 08:59:20 better use ? Jun 25 08:59:28 to avoid exceptions Jun 25 08:59:38 danijoo, depends if I want to avoir exceptions Jun 25 08:59:47 I don't, this needs to work all the time Jun 25 09:00:00 So if it doesn't work at some point during my tests I want to know it immediately Jun 25 09:00:16 in this case it doesnt really matter Jun 25 09:00:20 there will always be params Jun 25 09:00:30 thats just the shitty java inverlop :/ Jun 25 09:00:45 application just started Jun 25 09:00:47 but in general you better make a ? and give an alternative with an elvis operator Jun 25 09:00:53 it took 2 minutes to run Jun 25 09:01:16 what might be wrong with android ? :) Jun 25 09:01:34 danijoo, yeah but my alternative would be throw Something() Jun 25 09:01:36 lol Jun 25 09:01:59 Ribesg, no. in this case if theres a change there are no params your alternative would be to add them :) Jun 25 09:02:19 Hmm Jun 25 09:02:21 Oh yeah I see Jun 25 09:02:24 but in this case who cares :) Jun 25 09:02:43 it will be already set because you know anko does it Jun 25 09:03:28 whats the reason for not using getLayoutParams() ? Jun 25 09:06:31 Hello everyone... What do I have to do to be able to use android.support.v7.widget.RecycleView? Jun 25 09:07:02 It does not seem like I can use it..just does not exist although I see it working on videos about and dev Jun 25 09:07:03 cart_man, gradle? add it to your dependencies. not gradle? move to gradle and reread Jun 25 09:07:09 And dev` Jun 25 09:07:41 danijoo, Well should it come standard with Android though? Jun 25 09:07:47 cart_man, no Jun 25 09:07:50 It's part of the support library. Jun 25 09:07:58 its in its own library Jun 25 09:08:15 compile 'com.android.support:recyclerview-v7:21.0.+' Jun 25 09:08:37 Will this make less Devices support the app in any way? Jun 25 09:08:46 no Jun 25 09:13:33 So dont I have to donwload it though? Jun 25 09:13:36 download` Jun 25 09:13:44 gradle does that for you Jun 25 09:13:50 when you set it as dependency Jun 25 09:13:59 Hmm...well it just crashed now though Jun 25 09:14:16 Gradle DSL method not found : 'compile()' Jun 25 09:14:34 at what place did you put that line? Jun 25 09:15:59 In Gradle Scripts>build.gradle(Project CustomListView) in the dependancies { compile 'com.android.support:recyclerview-v7:+' } Jun 25 09:16:36 dependEncies? Jun 25 09:16:55 yip dependencies` Jun 25 09:17:05 show the whole file please Jun 25 09:17:07 this should work Jun 25 09:17:15 Hi, can anyone recommend a charting/graphing library? Besides simple timeseries I want to display spectrograms, preferably in realtime, or as close as it gets considering Android's audio stack. Jun 25 09:18:04 danijoo, http://pastebin.com/364y3ttB Jun 25 09:19:36 cart_man: You need to put it in the other build.gradle (the "module" one). Jun 25 09:21:48 (There's even a huge warning about that right underneath :P ) Jun 25 09:22:30 ^^ Jun 25 09:22:31 TacticalJoke, Ok cool that seems to work..thanks Jun 25 09:23:13 Mavrik, Hmm did not see that : / Jun 25 09:23:17 ^^ Jun 25 09:23:24 It's fine, that difference is confusing really. Jun 25 09:29:05 fucking gradle and executor singleton not started crap Jun 25 09:29:34 Wait, what. Jun 25 09:30:41 woah Jun 25 09:35:00 Hello, I'm on branch a and I'd like to merge into it branch b. Theres a screen on Android studio that show the conflicts and lets you move pieces of code from side to side.... I can't find tha screen... Any idea how do I get to it? Jun 25 09:38:42 Is it Alt+9? (Not sure -- I never use it.) Jun 25 09:39:43 * Mavrik passes a fluffy android robot to Zharf. Jun 25 09:40:15 fluffy is no good, I can't break that with typical violence Jun 25 09:40:15 You can almost create an `until` keyword in Kotlin: http://pastebin.com/Emw74rqi Jun 25 10:06:43 TacticalJoke, Is it normal to NOT have a mirror folder under the app dir? Jun 25 10:07:36 TacticalJoke, The tutorial im following has a mirror folder under App dir and inside it some xml files that the guy is editing now...but I can not find mine? Jun 25 10:09:44 when would ContentResolver#takePersistableUriPermission throw a SecurityException? Jun 25 10:15:01 Hey Jun 25 10:15:15 The access time on my files doesn't seem to update consistently. Jun 25 10:15:21 I copied a file and all the times changed, but when I read the file, the access time doesn't change. Jun 25 10:16:16 Not sure if this is the best channel to ask about the OS, but I didn't get a response in #android and the other questions I saw seemed less technical. Jun 25 10:20:41 are you talking about file system markers? Jun 25 10:20:53 Yes Jun 25 10:21:10 Not sure what you mean by "markers", but I think so Jun 25 10:21:24 For example, if I do touch test; stat test; cat test; stat test Jun 25 10:21:30 The access time doesn't change Jun 25 10:28:36 Could anyone please explain to me why some android projects will have a mirror file and other (Like mine) wont? Jun 25 10:38:45 TacticalJoke, Apparently it is a Mirror program that you download from JetBrains Jun 25 10:41:55 Hey ho people. I have a question regarding push messages. If the user disables notifications for their app does the app still receive the push message. Example: i send a push message regarding new data for the user. I parse it in a background service and display a push notification. Does the parsing happen if the user doesnt have push norifications enabled? Jun 25 10:48:50 What is the minimum version of Android that can handle Material ? Jun 25 10:50:22 2.x Jun 25 10:51:56 arkaros, afaik you still get the GCM message, just the Notification is suppressed Jun 25 10:55:13 is there a way to detect (within my app) whether it is the most up-to-date version from the store? Jun 25 10:59:45 fancy42, one word: why? Jun 25 11:01:35 because we agreed with our customers that they have to update immediately Jun 25 11:03:00 we have a bunch of web services our app is using. they're all pretty young and with each customer come new requirements Jun 25 11:04:03 being able to just 'shut down' old app versions would be simply delightful Jun 25 11:05:56 Hi, Does anyone know how to get the real path from a Google Drive URI on the from? Jun 25 11:06:08 on the phone* Jun 25 11:06:33 danijoo, so, do you have an idea? Jun 25 11:07:12 fancy42, make a simple website that shows the current version number Jun 25 11:07:20 and update this together with play store Jun 25 11:07:50 but the better alternative is to support older versions for some time, too :) Jun 25 11:11:52 yes. so we're aware of the fact that APIs should be extensible. most of ours are, but we're currently kind of making up use cases for the api as we hand out new versions on customer demand... it's just necessary to get rid of old stuff to not pile up every possible request / parameter set ever invented Jun 25 11:24:52 fancy42, we've had an API in our webservices that tells our clients if they must, should or don't need to update given a version number Jun 25 11:25:12 but google doesn't really offer anything like that so you need to make your own Jun 25 11:26:07 because its bad practice :) Jun 25 11:26:41 Which jdk do you use for building Android projects? Jun 25 11:26:57 Or rather which jdk would you recommend? Jun 25 11:28:32 doesnt mattter Jun 25 11:32:29 Zharf, how does your service know which App when to update? Manually_ Jun 25 11:33:44 fancy42, manually setting the current available version after it's been published in the store, yes Jun 25 11:34:35 Zharf, thanks, it's probably the best way to go.. Jun 25 11:41:19 hey people, i was wondering, is there any way i can use the Looppay system in my Galaxy S6 without using Samsung Pay? Jun 25 11:41:48 Or possibly emulate the PPSE present in my debit card? Jun 25 12:03:35 what property do I set in xml so that one object is drawn under another Jun 25 12:04:18 someone just one-starred me with "can't download i don't know why" Jun 25 12:07:02 arent you only able to rate after downloading an app? Jun 25 12:07:26 paulo_, link me the app Jun 25 12:08:17 I think you can rate after hitting the download button, but before it actually downloads - or if it fails to download Jun 25 12:09:17 also some people rate one star with "i'm trying, will rate later" Jun 25 12:09:23 & never changes it Jun 25 12:09:52 there are always this kind of people unfortunately Jun 25 12:10:08 paulo_, link me the game "D? Jun 25 12:10:28 1-star uninstall Jun 25 12:10:43 absof25: i don't usually link my app(s), so no, sorry. Jun 25 12:11:10 you can link it in pm, you already did it here few times by the way, we remember it's a card game app Jun 25 12:13:06 paulo_, why not? I wana give you 5 stars to neutralize that 1star retard Jun 25 12:43:12 If you have an object which only has 'title' and 'subTitle' variables, how should you guys name that object/class? Jun 25 12:44:44 depennds what is represents Jun 25 12:44:51 some forum thread? Jun 25 12:44:54 book title? Jun 25 12:45:39 something general. I have 2 ListViews in my app which has a list-item with a title & subtitle Jun 25 12:46:20 currenlty I use a HashMaps as data to fill the ListView but I want an object instead Jun 25 12:47:05 titlesObject Jun 25 12:48:29 call it Title Jun 25 12:48:39 and have "mainTitle" and "subTitle" fields Jun 25 12:48:48 afterall, the whole thing together is a Title no? Jun 25 12:49:08 Leeds, not bad but Mavrik, good one! Jun 25 12:49:20 thanks Jun 25 12:52:04 Do you think this class is a good idea? (MediaPlayer wrapper): https://gist.github.com/danielhawkes/1029568 Jun 25 12:52:59 oops, sorry, wrong room. Jun 25 13:28:47 Hey guys. I'm using Glide to load some images from device gallery. If the device is in portrait and the picture is in portrait everything works fine, but if I try to load a landscape image when in portrait the image does not load properly. If I change the device orientation to landscape the picture is loaded. Any advices? Jun 25 13:32:32 I'm trying to dismiss a dialogfragment while at the same time starting a new activity from within said dialogfragment. Jun 25 13:32:40 i can dismiss it at least. Jun 25 13:33:29 Syzygy: can't you make another class close the dialog and start the Activity you want? Jun 25 13:34:04 Birk_: What do you mean "the image does not load properly"? Jun 25 13:34:06 cant you just dismiss and startactivity? Jun 25 13:34:18 FrancescoV, well, technically it's closed from within shouldOverrideUrlLoading of a webview witihin the dialogfragment Jun 25 13:35:14 TacticalJoke: The image does not load. Nothing appears. But if I switch the device orientation it will appear. This happens with portrait images on landscape mode and with landscape images on portrait. Jun 25 13:36:05 Syzygy: http://stackoverflow.com/a/23786151/1723525 this can be a solution for you but I prefer a custom interface Jun 25 13:36:41 Syzygy: somthing like that: http://stackoverflow.com/a/14110409/1723525 Jun 25 13:36:44 alright, thanks Jun 25 13:36:52 I'll look at both Jun 25 13:41:56 TacticalJoke: The onResourceReady callback from Glide is returning Ok and the onLoadFailed is not being called, but the image does not appear. Just when the device orientation is the same as the picture orientation. Jun 25 13:49:58 I'm trying to add the 3 strips you have in gmail in the actionbar. All I get are the three dots like in whatsapp Jun 25 13:50:24 is this an icon difference or am I looking for the wrong options? Jun 25 13:50:49 Birk_: Maybe the images are loading but with the wrong orientation? Jun 25 13:51:43 Hi guys, has someone already used osmdroid maos offline ? Jun 25 13:51:50 TacticalJoke: maybe. testing more i saw that sometimes the images are shown correctly, but sometimes not. Strange. Jun 25 13:55:33 anybody experienced with MediaCodec API? trying to transcode an audio file, have something going but isn't doing much. Jun 25 13:57:34 what are the rules for applicationId? Jun 25 13:58:07 i have 2 of them, lets say com.thepoosh.test and com.thepoosh.prod Jun 25 13:58:18 but they cannot live side by side on the devices Jun 25 13:58:27 but com.thepoosh can Jun 25 14:00:19 http://pastebin.com/90QN1nEG no safety checks here, but is this how its supposed to be done? Jun 25 14:01:37 MediaExtractor -> Feed sample data into decoder -> Get decoded data -> Encode raw decoded data -> Extract encoded data from buffer -> Write data to file Jun 25 14:08:23 TacticalJoke, is rootView some universal name for something? Jun 25 14:08:49 what is the meaning of Sherlock really? Jun 25 14:09:03 cart_man: Not necessarily. Jun 25 14:09:06 I always see that in android tutorials and stuff Jun 25 14:09:23 Siamaster: You see "Sherlock"? Jun 25 14:09:26 Oh, "rootView". Jun 25 14:09:37 Siamaster, back in the past there were no support library to provide actionbar on android 2.x devices Jun 25 14:09:42 people had to use sherlock Jun 25 14:09:45 this isnt the case anymore Jun 25 14:09:53 ah it was a library? Jun 25 14:10:16 Siamaster, http://actionbarsherlock.com/ Jun 25 14:10:36 death to ActionBarSherlock Jun 25 14:10:42 I see, thanks! Jun 25 14:10:45 ^^ Jun 25 14:10:54 TacticalJoke, - > ListView listView = (ListView) rootView.findViewById( Jun 25 14:10:54 R.id.listview_forecast); Jun 25 14:11:07 there you have the creators opinion :p Jun 25 14:11:35 Someone on /r/androiddev linked to a site that still has an entire ActionBarSherlock section. Jun 25 14:11:40 (Today.) Jun 25 14:11:49 The official Android videos does not match up to well to the android studio I have... since the videos the (new Project)Fragment generated code is now different. Jun 25 14:11:51 the internet never forgets Jun 25 14:13:47 I can't find the link. Hmm. Jun 25 14:14:49 Hello guys! Jun 25 14:15:35 How do I encode a XML input to UTF-8 format? Jun 25 14:19:20 Hello, I have a leyout that I'll inflate into my fragment. But every time I'll have to inflate and set the text to three different TextViews. Is better way to do it ? instead of findViewById every time that I inflate the layout Jun 25 14:19:21 Jun 25 14:19:30 If I use a library like this https://github.com/daimajia/AndroidImageSlider, Must I have a section in my app where I tell people I'm using this lib? Jun 25 14:20:25 wviana are you worried about performance issues? Jun 25 14:20:34 or you just want cleaner code? Jun 25 14:20:55 are the texts variables? Jun 25 14:22:21 I did already use : reader = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8")); but didn't solve it. Jun 25 14:22:37 Soo what is an alternative for -> ListView listView = (ListView) rootView.findViewById(R.id.listview_forecast) //THE root.View PART specifically... I have found this -> ListView listView = (ListView) getView().findViewById(R.id.listview_forecast); Crashes however Jun 25 14:22:56 cart_man: It depends on the context. Jun 25 14:23:25 hey guys, which of the steps in the following link requires root? http://stackoverflow.com/a/18016637 Jun 25 14:24:14 Siamaster: more about cleaner bode. Jun 25 14:24:22 TacticalJoke, - > http://pastebin.com/sqrGCEU6 Jun 25 14:24:58 Siamaster: I'm thinking about create a method to handle everything that I need than return a View Jun 25 14:25:25 You can't call Fragment.getView until after Fragment.onCreateView. Jun 25 14:25:57 wviana sounds good, I wouldn't worry about performance either Jun 25 14:26:28 TacticalJoke,Which is done upon Return ? Jun 25 14:27:24 cart_man: The point is to return some view in onCreateView. Then, later, you can call getView to get this same view. Jun 25 14:27:53 app:showAsAction="ifRoom" doesn't seem to work. in the examples I see "yourapp", android studio suggests to use "app", what should the the actual first word? Jun 25 14:29:27 gavit: It's whatever you put at the top (e.g., `xmlns:custom="http://schemas.android.com/apk/res-auto"`). Jun 25 14:30:24 TacticalJoke, Ok I am mis understanding something here... When the MainActivity is done calling MainActivityFragment and it returned...only then I can call getView frin tge MainActivity > Jun 25 14:30:25 ? Jun 25 14:30:50 TacticalJoke: thanks. I still have a feeling it doesn't work though. how can I verify? Jun 25 14:31:01 Try "always" or "never". Jun 25 14:32:12 TacticalJoke, In thta case is there no way to bind the adapter onCreate? Because the tutorials show that its the way they do it accept they had //Get reference to the ListView, and attach this adpater to Jun 25 14:32:12 ListView listView = (ListView) getView().findViewById(R.id.listview_forecast); Jun 25 14:32:12 Log.i("XXX",weatherArray[0]); Jun 25 14:32:12 listView.setAdapter(mForeCastAdapter); Jun 25 14:32:14 ugh Jun 25 14:32:41 I menat.... they had ListView listView = (ListView) rootView.findViewById(R.id.listview_forecast); Jun 25 14:32:57 I'm using a library that is leaking some bitmaps, does anyone have suggestions on how to track down where the bitmaps are still referenced? Jun 25 14:33:13 The standard pattern is to inflate some layout in `getView` and then find the ListView child and set the adapter. Jun 25 14:35:02 mmarklar, AS 1.3 can do a heap dump and show it to you directly (icon next to the memory usage graph in "Android" window) Jun 25 14:35:18 Mavrik: nice, time to upgrade I guess :) Jun 25 14:35:20 ty Jun 25 14:35:22 mmarklar, if using anything else, do a heap dump (from DDMS or wherever), run "hprof-conv" on it and open it with Eclipse MAT Jun 25 14:35:32 Eclipse MAT has better display IMO but it's a bit more of a hassle Jun 25 14:35:45 ok was hoping to avoid installing eclipse Jun 25 14:35:51 yeah I did that a while ago Jun 25 14:35:53 thank you! Jun 25 14:35:59 mmarklar: just install Eclipse MAT w/o eclipse Jun 25 14:36:04 Eclipse MAT is not full eclipse Jun 25 14:36:09 thanks to god ;) Jun 25 14:36:12 well Jun 25 14:36:14 technically it is Jun 25 14:36:21 oh nice Jun 25 14:36:24 as much as any other version "java, cdt, etc" is :) Jun 25 14:36:24 technically we are monkeys Jun 25 14:36:37 s/getView/onCreateView/ Jun 25 14:36:47 but yeah, you can get Eclipse MAT distribution that doesn't have the Java cruft :) Jun 25 14:41:13 TacticalJoke: I tried always, no result. it doesn't show up in the action bar, only in the options menu :( Jun 25 14:41:16 TacticalJoke: https://gist.github.com/anonymous/312ec30de0254f1e5917 Jun 25 14:42:08 the first line of the error also intrigues me: item does not implement "SupportMenuItem" Jun 25 14:45:05 I'm guessing you're gonna need to subclass AppCompatActivity/ActionBarActivity to solve all these problems. Jun 25 14:45:39 You're subclassing android.app.Activity right now. Jun 25 14:46:29 TacticalJoke: it should be a ActionBarActivity? Jun 25 14:46:51 * gavit will see if that will solve it :) Jun 25 14:47:12 thanks or the hint, but may I ask how you 'figured' it out? Jun 25 14:47:23 In the latest AppCompat version, AppCompatActivity replaces ActionBarActivity (but the latter should work regardless). Jun 25 14:47:57 Because that v4/v7 stuff you're using (and also `whatever:showAsAction` and so on) requires AppCompatActivity/ActionBarActivity. Jun 25 14:48:35 TacticalJoke: I'm targeting sdk14+. is v4/v7 the 'correct way'? Jun 25 14:49:14 It is hard to build an app today without v4, v7. A lof of libs include them. Jun 25 14:49:19 I'm using minSdkVersion=15 and using AppCompat (and AppCompatActivity). Jun 25 14:49:23 I'm doing this for a material look. Jun 25 14:49:41 I have a minsdk 21, and I have to use them for a lot of libs. Jun 25 14:50:17 * gavit is gonna google the diff between AppCompatActivity/ActionBarActivity Jun 25 14:50:39 this is getting confusing for a 'beginner' in android programming :P Jun 25 14:50:43 * gavit misses java.swing :p Jun 25 14:50:55 Yes, it's confusing. Jun 25 14:51:02 It gets easier, though. :) Jun 25 14:51:06 although it has been a few years since I programmed in java :) Jun 25 14:51:09 A lot of it is just "new stuff has come along". Jun 25 14:51:13 gavit: ActionBarActivity is depreacted Jun 25 14:51:22 everything else is the same I think Jun 25 14:51:49 yoavst: even if you target sdk14? Jun 25 14:52:00 someone should update http://developer.android.com/guide/topics/ui/actionbar.html! Jun 25 14:52:06 gavit: it depend on the version of the appcompat library Jun 25 14:52:10 not on the SDK Jun 25 14:52:10 Yes, that's totally out of date. Jun 25 14:52:18 gavit: Even using ActionBar is kinda out of date now. Jun 25 14:52:22 Toolbar is arguably better. Jun 25 14:52:34 TacticalJoke: don't make me start crying now :P Jun 25 14:52:37 A Toolbar is just a normal view. It can be placed anywhere. Jun 25 14:52:41 http://www.google.com/design/spec/layout/structure.html#structure-app-bar Jun 25 14:53:05 TacticalJoke: I was thinking I'll go with official docs as to avoid this :P Jun 25 14:53:34 ActionBar still works. You don't have to switch. Jun 25 14:53:45 Few days ago I and vector drawables finally met. GOOGLE, WHY NO VectorDrawableCompat AS FINAL RELEASE?!? Jun 25 14:53:58 Toolbar is just a little less annoying. Jun 25 14:54:02 And more flexible. Jun 25 14:54:31 TacticalJoke: haha, all this time I was trying to make a Toolbar, but was looking at ActionBar examples :'( Jun 25 14:54:58 * gavit was trying to get 3 stripes in the actionbar instead of the three dots :p Jun 25 14:55:12 or at least wanted to know how to get there :P Jun 25 14:56:55 I think the best way to do all that may be to use NavigationView, as described here: . However, this new library is sad to be buggy, and I haven't used it yet, so I can't 100% recommend. Jun 25 14:57:05 I'm waiting for a while before trying it. Jun 25 14:57:25 said* Jun 25 14:58:31 I got a lot of reviews saying they cannot uninstall my app. Android should provide an easier way to uninstall device admin apps. Jun 25 14:58:57 TacticalJoke: I'll go with toolbar :) Jun 25 14:59:10 yoavst: what are you making? Jun 25 14:59:15 Oh, and why for god sake do you want to uninstall my app Jun 25 14:59:32 gavit: https://play.google.com/store/apps/details?id=com.yoavst.quickapps Jun 25 14:59:46 yoavst: no warning that I can't uninstall it after? :P Jun 25 14:59:50 gavit: I think you can fairly easily get the navigation drawer going with the icon with Toolbar. I haven't tried it (but I've read about it), so I can't say for certai. Jun 25 14:59:51 certain* Jun 25 15:00:01 (Even without using the above.) Jun 25 15:00:02 gavit: You can disable the device admin from my app settings Jun 25 15:00:17 TacticalJoke: It isn't that hard, it is a menu Jun 25 15:00:28 not even programatically stuff Jun 25 15:00:38 Yeah. Jun 25 15:00:53 Toolbar is better to use than ActionBar. It's what ActionBar should've been, I think. Jun 25 15:01:23 * gavit will stick with toolbar :P Jun 25 15:01:33 only started like my 3rd 'project' :P Jun 25 15:01:38 It's one of those "Okay, fine, ActionBar sucks; we'll give you something better after all these years" things. Jun 25 15:02:51 Has someone tested CodeGlance with a touch screen? Jun 25 15:03:11 touch screen works so well everywhere but not in AS :/ Jun 25 15:07:05 gavit: To be honest, for this stuff, a lot of the documentation is out of date and some of the people in here are probably the most available sources of knowledge. Jun 25 15:07:17 In some cases, SO is also a source. But that'll often be out of date too. Jun 25 15:07:37 In a few cases, /r/androiddev is an option (but from what I've seen there isn't a lot of great advice on there). Jun 25 15:08:30 By "this stuff" I mean "things relating to Toolbar, navigation drawers, support libs, and so on". Jun 25 15:08:33 qhat's "SO"? Jun 25 15:08:36 StackOverflow. Jun 25 15:08:40 aah, ok Jun 25 15:09:01 well, I'll be bugging you guys here a lot and search on SO :) Jun 25 15:09:51 This is pretty good Toolbar documentation: http://android-developers.blogspot.co.uk/2014/10/appcompat-v21-material-design-for-pre.html Jun 25 15:10:03 And general AppCompat documentation. Jun 25 15:10:27 Though it's mainly an overview. Jun 25 15:10:28 I am testing a old android source code example called SipDemo, It's works well with the targetSdkVersion 9 but if I change it for a higher version stop working and the demo doesn't connect to the VoIP Sip server. Maybe the oficial Android SIP API have changed, How I can check what have changed in the API? Jun 25 15:10:41 The example source code: https://android.googlesource.com/platform/development/+/master/samples/SipDemo/ Jun 25 15:10:55 the package that I am using es android.net.sip Jun 25 15:11:04 apparently I'm on v22 :) Jun 25 15:11:10 supported since android API level 9 Jun 25 15:12:46 Yeah, 22 is the latest major version. Jun 25 15:15:16 WHen in doubt use the "class with v4/v7? Jun 25 15:15:35 e.g. Toolbar Jun 25 15:16:07 Yes. Then you get backwards compatibility and (even if you don't need the former) consistent behaviour regardless of Android version. Jun 25 15:18:47 One could argue (quite convincingly, IMO) that, in cases where something exists in both v4/v7 and in the framework, it should've just been added to v4/v7 and not to the framework. Jun 25 15:19:19 Though it's probably a little controversial. Jun 25 15:19:35 * gavit now has to figure out why my fragments are on top of my toolbar Jun 25 15:24:58 odd, I don't have android.support.v7.app.AppCompatActivity. Guess I need to update my sdk Jun 25 15:29:51 Could someone help em input a remote XML file encoded using UTF-8 please? I did a couple changes at my code already as : https://gist.github.com/anonymous/671dc613f00cdb073550 Jun 25 15:52:39 hey guys Jun 25 15:53:04 I have a java class file that needs to be run (connects to Parse). How do I get it to run from another class? Jun 25 15:54:23 is it an activity class? Jun 25 15:54:52 it's an Application class Jun 25 15:54:58 I need to call it from my Main Activity Jun 25 15:56:08 the application class with the parse app info? Jun 25 15:56:18 yes Jun 25 15:56:28 it's called ParseApplication which extends Application Jun 25 15:56:49 it has an onCreate which initializes everything, and I need that to run when my app starts Jun 25 15:57:50 If you only have the parse info in there you don't need to call it main activity Jun 25 15:57:59 but in androidmanifest Jun 25 15:58:01 t Jun 25 15:58:16 Helsinkiii: you define your ParseApplication in Manifest Jun 25 15:58:46 in application tag, add android:name=".ParseApplication" Jun 25 16:04:28 well that worked Jun 25 16:04:32 thanks gentlemen Jun 25 16:04:50 so, is it just me or is Android a bit strange if you're unaccustomed to it? Jun 25 16:05:05 I know that's a vague question, but there are so many idiosyncracies with this Jun 25 16:06:57 Helsinkiii: You're not the first one I've heard say that, I think its just a matter of perspective + experience Jun 25 16:07:10 no stranger then other environments imo Jun 25 16:07:31 hmm, alright Jun 25 16:07:45 I dunno, I'm trying not to get demoralized. Red underlines every 5 seconds, it's nuts Jun 25 16:08:08 yeah I understand. It does take some time to learn Jun 25 16:08:09 Day 3 and I'm still doing my login page Jun 25 16:08:30 have you seen the login template in android studio? Jun 25 16:09:00 :l Jun 25 16:09:08 to put it in perspective my first app took me 4 months, now I think I'd be able to make it in a week or two Jun 25 16:09:18 really? that's encouraging Jun 25 16:09:22 how long ago did you start? Jun 25 16:09:29 back in the betas Jun 25 16:09:33 so 8 years? I dunno Jun 25 16:10:48 hey guys i have this issue holding me for a while now and i could use another set of eyes i'm running this query and some for loop, line 5 gives me the right IDs at 72, 73, 74 but once i iterate through those results at line 34 i get the same ID every time the for loop comes to that line in 76, 90, 108 so the shapes i'm drawing for these coord all begun one big connected in shape instead of 3 distincts one I suspect it has seomthing Jun 25 16:10:48 with the line 31 done method is async but not sure how to fix it http://pastebin.com/UbXrdfdA Jun 25 16:13:30 Helsinkiii: I think that might've sounded discouraging, I can't make that same app any faster then I could a year or so in fyi :) Jun 25 16:13:51 lol yeah I read that Jun 25 16:13:57 it's all good Jun 25 16:18:06 TacticalJoke, Soo where do I go from here.... I just cant seem to get it to even launch : / ...Im new to all --> http://pastebin.com/dxPNrrWW Jun 25 16:18:23 How do I avoid using rootView... etc etc Jun 25 16:18:30 I didnt quite get what you said the last time Jun 25 16:19:23 You can't call `getView` in `onCreateView`. Jun 25 16:20:06 Ok that I get... but where do I so that then? Jun 25 16:20:13 after it returned back to the main function Jun 25 16:20:17 do that ` Jun 25 16:20:19 View view = inflater.inflate(R.layout.fragment_main, container, false); ListView listView = (ListView) view.findViewById(R.id.listview_forecast); /* ... */ return view; Jun 25 16:20:40 cart_man: look at this: http://pastebin.com/DbNG2Dd9 Jun 25 16:20:50 its what TacticalJoke just said Jun 25 16:23:58 Could someone help em input a remote XML file encoded using UTF-8 please? I did a couple changes at my code already as : https://gist.github.com/anonymous/671dc613f00cdb073550 Jun 25 16:26:19 having never used espresso, can I use an espresso test to record an android app consistently? Like recording https://vid.me/ZG3J but not manually with my hands Jun 25 16:28:00 TacticalJoke, Thanks allot guys! Jun 25 16:28:03 mmarklar,^^ Jun 25 16:28:31 cart_man: np :) Jun 25 16:29:23 the OverFlowmenu, is that supposed to change based on my activity? Jun 25 16:33:39 shoerain: I've found this to be very valuable for automated ui testing https://github.com/xiaocong/uiautomator Jun 25 16:36:02 quinnjn: ooh looks pretty good. I was hoping I could use the tests I already wrote so I could record those, but this is better than nothing. Is this totally unrelated to monkeyrunnre? Jun 25 16:36:12 s/monkeyrunnre/monkeyrunner Jun 25 16:37:56 shoerain: it's similar than monkeyrunner. Much more blackbox for uiautomator doesn't care what app your in or what your activity is. Jun 25 16:38:44 how do i open an image i saved in MODE_PRIVATE? i need to use it after with setImageBitmap or something similar Jun 25 16:43:43 luist, just open it. Jun 25 16:44:08 BitmapFactory.decodeFile(photoPath, options); Jun 25 16:44:08 mmarklar,Ok soo where does MainActivity call MainActivityFragment though? Jun 25 16:44:14 shoerain: You could probably write a script to constantly restart it Jun 25 16:46:18 sigh I Dsiconnect the entire time Jun 25 16:49:09 mmarklar, sigh sorry I DC allot at home Jun 25 16:55:40 is possible to make something like this ? getString(Class.forName("R.string." + emplacamento.getTipo()) Jun 25 16:56:41 what on earth are you trying to do wviana Jun 25 16:59:16 missingno: get a string from resource, but the name of the string is from a Json that receive. It's kind a dynamic view creation. Jun 25 17:02:04 you'd have to do some sort of messy getField on R.string.class Jun 25 17:02:13 I recommend not using reflection Jun 25 17:03:07 Resources#getIdentifier can do that Jun 25 17:03:12 But yeah, generally a bad idea Jun 25 17:03:29 SimonVT: tell me more about it. ;) Jun 25 17:05:38 Google knows all. Jun 25 17:08:47 ;) Jun 25 17:09:20 There might be a better solution. It's hard to tell without more info, though. Jun 25 17:09:49 hey guys, i'm trying to get a unit testing setup going using Dagger2. one of my components requires an Application. is there a good way to supply it? Jun 25 17:10:05 would just new Application() work, or would I have to mock one using mockito? Jun 25 17:17:44 huh, snoop dog as CEO of twitter ? they must be really desperate Jun 25 17:19:07 Is it just speculation? Google News isn't showing anything substantial. Jun 25 17:20:07 g00s: What ? Jun 25 17:20:28 And did he relinquish his Snoop Lion title? Jun 25 17:21:31 not sure if its just publicity stunt or what http://techcrunch.com/2015/06/20/snoop-dogg-for-ceo-of-twitter/ Jun 25 17:21:37 I thought he was SnoopZilla now Jun 25 17:22:17 just posted a question regarding the MediaCodec API now, http://stackoverflow.com/questions/31056576/unable-to-transcode-audio-via-android-mediacodec-api Jun 25 17:23:50 Oh, gawd, Twitter comments are terrible. Jun 25 17:27:29 razzledazzle, http://developer.android.com/reference/android/media/MediaCodec.html#dequeueOutputBuffer(android.media.MediaCodec.BufferInfo, long) Jun 25 17:27:36 it returns -2 which is INFO_OUTPUT_FORMAT_CHANGED Jun 25 17:27:56 and a negative index on the array will produce your error Jun 25 17:28:19 the same page has an example showing you a test against INFO_OUTPUT_FORMAT_CHANGED Jun 25 17:28:50 just reading the doc, i'm not familiar with mediacodec Jun 25 17:29:49 4 SDK updates this month, lol Jun 25 17:30:24 adq: missed that one, thanks Jun 25 17:32:30 Levite: that's what happens when they're rolling out a new API. Jun 25 17:33:25 looks like I missed an important check Jun 25 17:34:49 meh, how come android didnt make a ListAdapter where you can display image + text. I'm assuming everyone wants a list with images Jun 25 17:36:41 gavit, huh Jun 25 17:36:43 gavit, that's trivial Jun 25 17:43:06 is it possible to multiply images with the fragment background? Jun 25 17:45:03 pfn: it is, but don't you think like every app maker makes a custom list with support for 1 text + 1 image? Jun 25 17:46:33 gavit: honestly, considering that's something that takes 5 minutes to implement on your own, I think the platform team has better things to do ;) Jun 25 17:48:46 There is no one-size-fits-all approach here. Even if two apps use an image and some text, the layout is probably going to be significantly different. Jun 25 17:49:29 and with bitmaps there is often lazy loading, and so how to handle that Jun 25 17:49:48 * gavit is gonna procrastinate by looking up if android studo can make stub functions for all the 'missing' functions I'm missing for my custommadeAdapter Jun 25 17:51:09 gavit: yep! Jun 25 17:51:20 If you need image downloading/caching/etc., gavit, there's Picasso and Glide. Jun 25 17:51:24 bankai_ http://i.imgur.com/T51U4M7.gifv Jun 25 17:51:27 alt+enter in the class body -> implement methods Jun 25 17:52:07 err, alt+insert Jun 25 17:52:26 JesusFreke: Just found it :) it's Option return for me btw (osx) Jun 25 17:53:21 JesusFreke: Hmm, it's Ctrl+O here. Jun 25 17:53:43 gavit: Yeah, that's the context-sensitive "let's do something about this error" noe. Jun 25 17:53:44 one* Jun 25 17:53:45 TacticalJoke: looks like that's a more direct route Jun 25 17:54:01 I like error-driven development a lot. Jun 25 17:54:11 TacticalJoke: alt+insert brings up the refactor dialog, which then has that as one of the options Jun 25 17:59:10 does popping a fragment from the back stack end up rerunning the fragments onStart() method? Jun 25 17:59:14 cause it seems to Jun 25 18:01:39 moogoo: yes, onStart() is called every time the Fragment becomes visible to the user Jun 25 18:02:21 even if I'm doing fragmentManage.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE); Jun 25 18:02:39 which should pop every fragment off the back stack Jun 25 18:04:04 custom list? Jun 25 18:04:05 I'm trying to reset the back stack without re-running every onStart() method in all the fragments that were once on it Jun 25 18:04:06 no one makes custom lists Jun 25 18:05:23 do you guys notice, on apps that have NavigationDrawer where slide out panel that goes under status bar - that the status bar flickers when closing the panel, just as its about closed ? Jun 25 18:05:58 There is no default constructor available for android.widget.ArrayAdapter -> http://developer.android.com/reference/android/widget/ArrayAdapter.html why is it even required by androidstudio :S Jun 25 18:06:26 i forget, how do I make a custom gradle task run before say assembleDebug or something of a particular build variant? Jun 25 18:06:38 gavit: Why do you need a nullary constructor? Jun 25 18:06:45 I guess you're subclassing. Jun 25 18:06:47 i tried tasks.assembleDevelopmentDebug.dependsOn but no luck Jun 25 18:07:09 You have to implement a constructor in the subclass and call through to one of the superclass's constructors. Jun 25 18:08:02 TacticalJoke: I'm subclassing yes, but why does it require a mySubCLass() consturctor Jun 25 18:08:18 Hey guys. I've implemented a custom ViewPager and an adapter for it and would like to share it on my git. But I'm kinda lost what is it supposed to be. A module or a library? Jun 25 18:09:29 TacticalJoke: even this example doesnt have a subclass with 0 arguments http://www.androidinterview.com/android-custom-listview-with-image-and-text-using-arrayadapter/ Jun 25 18:09:43 It's a Java rule: if you're subclassing a class that doesn't have a nullary constructor, you have to define a constructor and call one of the superclass constructors. Jun 25 18:10:14 gavit: may i respectfully recommend subclassing BaseAdapter instead of ArrayAdapter? that's the general rule of thumb. Jun 25 18:10:14 TacticalJoke: since beginnning of java? Jun 25 18:10:29 I would expect so, yeah. Jun 25 18:10:32 treelzebub: I'll do that. Jun 25 18:10:59 * gavit doesn't recall that rule. then again I stopped using java since 1.5 came out Jun 25 18:11:04 just picked it up again Jun 25 18:11:07 Constructors are not inherited, basically. If the superclass has a nullary constructor then you don't have to define one (as the compiler implicity defines one, AFAIR). Jun 25 18:11:54 http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.8.9 Jun 25 18:12:09 HAI Jun 25 18:12:33 treelzebub: baseAdapter makes more sense since I was using a Hashtable for my text + image resource. Jun 25 18:13:23 yeah, ArrayAdapter is generally only used for introducing ListAdapter to newbies. In any real application, you're gonna want to use BaseAdapter for your ListView. Jun 25 18:13:28 TacticalJoke: in that case don't all classes subclass Object which has a null constructor? Jun 25 18:13:43 They don't inherit that nullary constructor. Jun 25 18:13:47 Constructors aren't inherited in Java. Jun 25 18:14:20 TacticalJoke: sorry you're right Jun 25 18:14:33 but I have a constructor, just not a nullary one Jun 25 18:14:55 anyways, errors left as soon as I subclassed baseAdapter Jun 25 18:15:13 is there anyway to just clear the fragment backstack without popping each item on it Jun 25 18:16:20 gavit: Just curious -- which programming language/framework did you use most recently? Jun 25 18:16:50 Personally, I jumped from C#/.NET and it was a fairly easy ride (apart from a few annoying Android idiosyncrasies). Jun 25 18:17:59 that makes sense, since you were trying to feed a HashMap to an ArrayAdapter. Jun 25 18:18:36 how can i hook into a particular Gradle task like testDevelopmentDebug or something? seems like nothing works Jun 25 18:18:47 TacticalJoke: @uni I used java, then did c# for my bsc, then when I stopped with my uni I did lots of server hardware related sales, implementation of sold hardware and installation of required and related software, no programming for a long time, then I started playing with ruby for a while (ror) Jun 25 18:18:53 custom listview? wtf are people doing... Jun 25 18:19:04 TacticalJoke: and now I'm playiwth with android Jun 25 18:19:24 Generics is the last thing I remember of Java :) Jun 25 18:20:04 TacticalJoke: But I really don't understand what I did wrong just then to get a complaint about the constructor Jun 25 18:20:14 gavit: The golden rule for C# alumni: it's `"foo".equals("bar");` and not `"foo" == "bar"`. Jun 25 18:20:26 but the error is gone, so I'll leave it till I see it again :) Jun 25 18:20:27 gavit: Effective Java by Joshua Bloch is an excellent resource, and can get you brushed up on the fundamentals pretty quickly, if you need a refresher Jun 25 18:21:03 TacticalJoke: haha, ever programmed in php? :P you'll go crazy :) Jun 25 18:21:04 gavit, java hasn't changed much since it added generics Jun 25 18:21:09 not particularly for android in any case Jun 25 18:21:10 gavit: You have to define a constructor which calls a superclass constructor -- unless the compiler can define a nullar constructor (which calls the nullary superclass constructor). Jun 25 18:21:12 php: never again :P Jun 25 18:21:14 nullary* Jun 25 18:21:25 Is there a way to determine which activity is currently active on the screen? UIAutomatorViewer doesn't tell me the name of the acitivity. It gives me information about views. Jun 25 18:22:02 I've not used PHP. That "fractal of bad design" document was fun to read and made PHP sound like an absolute nightmare. Jun 25 18:22:23 TacticalJoke: I'm guessing this is because if I don't call super(some args) their assertions will fail? Jun 25 18:22:48 pfn: yeah, I noticed. Still wondering on how to add my unit tests etc though Jun 25 18:23:01 for what? Jun 25 18:23:05 * gavit is refreshing his java as I bump into problems Jun 25 18:23:18 pfn: well, I reember in the uni I made something like Calculator Jun 25 18:23:47 .wubdiw 5 Jun 25 18:23:49 anyone know why setInputType(InputType.TEXT_VARIATION_PASSWORD) doesn't cause the characters to be * Jun 25 18:24:40 so we did tests like testAdd(-299, -28, -327); we tested adding of neg + neg, neg + 0,neg + pos, 0+0, 0+neg, o+pos, pos+pos, pos+new, pos+0 Jun 25 18:24:49 I believe it was called unit testing Jun 25 18:25:09 gavit: The compiler tries to insert an implicit `super();` in a constructor. If the superclass doesn't have a nullary constructor, this will give rise to an error. Jun 25 18:25:21 lasserix: https://developer.android.com/reference/android/text/InputType.html Jun 25 18:25:21 We also did something with clover I believe to check coverage of your code with your tests Jun 25 18:25:31 It's the first example.. Jun 25 18:25:34 TacticalJoke: yes, I understand now :) Jun 25 18:25:41 Without the visible Jun 25 18:26:04 You always need a class, then you can apply variations Jun 25 18:26:10 SimonVT: et.setInputType(InputType.TYPE_TEXT_VARIATION_PASSWORD); Jun 25 18:26:25 i need to to TYPE_CLASS_TEXT | TYPE_TEXT_VARIATION_PASSWORD you mean? Jun 25 18:26:26 Unit testing an Android app is fairly easy. Jun 25 18:26:43 (Assuming you're doing it on the JVM and testing stuff that's easy to test.) Jun 25 18:26:50 ahh yeah Jun 25 18:26:50 thanks Jun 25 18:27:12 lasserix: http://stackoverflow.com/a/2588112/1048340 Jun 25 18:28:27 TacticalJoke: I meant in android Studio Jun 25 18:28:44 Yeah, it's easy in Android Studio. Jun 25 18:28:49 TacticalJoke: if I'm going back to terminal and doing javac blablabla it's easy Jun 25 18:28:59 but the 'setup' to make it integrate with studio Jun 25 18:29:30 the examples I saw were only with getActivity etc Jun 25 18:29:51 For simple unit tests, you can do this: http://tools.android.com/tech-docs/unit-testing-support Jun 25 18:29:52 * gavit recalls not even starting the 'app' ut just importing the models or smth Jun 25 18:30:04 But those tests can't really touch Android-specific code with mocking. Jun 25 18:30:12 without* Jun 25 18:30:47 TacticalJoke: I wanted to test my models anyways, not so much android stuff : Jun 25 18:31:09 * gavit hasnt ever really automated graphical unit testing Jun 25 18:31:15 Those are JVM tests. You can test Android-specific stuff with instrumentation tests (which run on Android devices). Jun 25 18:31:21 I saw silicium for ruor, but never touched it Jun 25 18:33:34 how come none of the tuts show you to go to File -> project structure -Dependancies -> add library -> pick junit -> select testCompile Jun 25 18:33:45 it's like they want you to manually edit config file Jun 25 18:33:59 hey guys, so right now in my app i have 2 separate views that both have camera buttons and save pictures to a gallery for the user to view. at the moment, my method for the gallery is the same for both views, how would i create entirely separate galleries under both of these views? Jun 25 18:35:03 gavit: Many dependencies are copy-pasted from the website, I guess. That dialog is handy, though (it'll find the latest version, I think). Jun 25 18:36:10 gavit, once you got used to it, manually editing is quicker. at least its for me Jun 25 18:36:40 gavit: AssertJ is good, BTW. You get assertions that look like `assertThat(someNumber).isBetween(1, 5);` rather than the equivalent JUnit/Hamcrest abomination. Jun 25 18:39:13 "I think that's quite readable": http://stackoverflow.com/a/12785975 Jun 25 18:40:10 Though, to be fair, there might be a better Hamcrest solution in 2015 (who knows). Jun 25 18:42:05 TacticalJoke: my android studio keeps saying it's experimental and that I need Android Gradle plugin 1.1.0. If I go in File->ProjectStructure-> Project, my Gradleversion is 2.2.1 and y Android Plugin version is 1.1.0. Jun 25 18:43:15 TacticalJoke: I have Assert.AssertTrue randomly in my code right now. I'll see what the best practise is later and check out AssertJ Jun 25 18:43:28 gavit, switch to gradle 2.4 with plugin 1.2.3 Jun 25 18:43:53 welcome in 2015 :p Jun 25 18:43:59 Also the rightclick on the class doesn't give me a GO (Step 6 of Setting up Studio) Jun 25 18:44:29 gavit, unit tests is a gradle plugin 1.2 feature and not available in 1.1.0 Jun 25 18:49:49 danijoo: haha, so it's avail in 1.2.3, but not in 2.4? Jun 25 18:50:28 that's the gradle plugin ver, not the gradle ver. Jun 25 18:50:29 gavit, gradle plugin 1.2 not gradle version Jun 25 18:51:04 gradle is maintained by gradle, inc-- not google or jetbrains :) Jun 25 18:51:42 you want gradle version 2.4 WITH gradle plugin 1.2.3 for latest features Jun 25 18:53:07 TacticalJoke: The quarter finally dropped. The example extended ArrayAdapter Jun 25 18:56:21 I'm still on Gradle 2.2.1. Is the beta using 2.4 by default? Jun 25 18:57:48 TacticalJoke, you dont want fast compile times? Jun 25 18:59:13 hey guys, so right now in my app i have 2 separate views that both have camera buttons and save pictures to a gallery for the user to view. at the moment, my method for the gallery is the same for both views, how would i create entirely separate galleries under both of these views? Jun 25 18:59:31 TacticalJoke: sorry, I'm on 2.2.1 too. Jun 25 18:59:50 im using a tab layout and viewpager to swap between the two views if that helps Jun 25 19:03:27 is it hard to switch gradle versions? Jun 25 19:03:34 it seemed to be a piece of cake for me Jun 25 19:06:39 its just replacing those number. Jun 25 19:06:44 with the newer one Jun 25 19:06:48 yup. change a number to another number -> sync. Jun 25 19:08:37 when i search "android receipt validation", I don't get any links from google. don't the have a process for this? Jun 25 19:08:38 how do you verify a receipt? Jun 25 19:08:48 Norrin what receipt? Jun 25 19:08:58 sms? Jun 25 19:09:08 in app product receipt Jun 25 19:09:31 digital goods Jun 25 19:09:31 in app billing Jun 25 19:12:24 Could someone help me with a UTF-8 encoding from a XML input please? Jun 25 19:18:06 has anyone put a service in a library? Jun 25 19:19:40 for in app billing, what key must the apk be signed with? Jun 25 19:21:28 stuff has been pretty quiet in com.android.tools; yay Jun 25 19:21:36 build tools pretty stable Jun 25 19:21:44 no new artifacts since beginning of may Jun 25 19:24:26 for in app billing, what key must the apk be signed with? Jun 25 19:25:45 What happend to myInteger.intValue()? ANdroid studio doesnt seem to want to accept that the function exists :S Jun 25 19:27:17 Afzal: yes Jun 25 19:27:27 Norrin, I dont think iap cares about your signing key Jun 25 19:27:47 Norrin: the same key you used when you first published the app to the play store. Jun 25 19:28:02 danijoo, everything here says the apk has to be signed http://stackoverflow.com/questions/11068686/this-version-of-the-application-is-not-configured-for-billing-through-google-pla Jun 25 19:28:17 surf2b1, first? you mean i can never change the key? Jun 25 19:28:36 or. do you mean, the same key as the latest apk upload? surf2b1 Jun 25 19:28:59 Norrin, for iab to work, it has to be uloaded to google play store Jun 25 19:29:03 you cant upload without signing Jun 25 19:29:07 Norrin: nope. Unless you want to upload it with a different package-name Jun 25 19:29:10 answer 3 on that page says it has to be a release key. what's a release key? Jun 25 19:29:22 but I dont think iap compares the signing once a valid key is uploaded because you can then test with a debug signed app Jun 25 19:29:25 your keystore Jun 25 19:29:27 fuck.... Jun 25 19:29:58 you just must have an apk with same versionCode and versionName uploaded Jun 25 19:30:00 surf2b1, my keystore? Jun 25 19:30:06 and use a valid key for the requests Jun 25 19:30:23 "Tony Trummer & Tushar Dalvi highlighted close to a 100 app’s that are still failing the most common app vulnerability lack of TLS/SSL verification." Jun 25 19:30:28 surf2b1, that's an answer to what question? my keystore is the release key? Jun 25 19:31:15 Norrin, your keystore is the store where your key is in. Jun 25 19:31:21 danijoo, "2. http://stackoverflow.com/questions/11068686/this-version-of-the-application-is-not-configured-for-billing-through-google-pla" Jun 25 19:31:21 thats why its called keystore Jun 25 19:31:29 oops wrong clipboard Jun 25 19:31:42 danijoo, "2. Test APK is signed with the same certificate(s) as the one uploaded to dev.console." Jun 25 19:32:00 Norrin, i can tell you from own experience that this is not the case Jun 25 19:32:02 danijoo, the question is, what is the release key? Jun 25 19:32:18 "release key" implies there's more then one key. Jun 25 19:32:27 theres also debug key Jun 25 19:32:37 or whatever other key you might have generated in your lifetime Jun 25 19:32:40 debug key or release key Jun 25 19:33:20 [12:30:09] and use a valid key for the requests Jun 25 19:33:21 what requests? Jun 25 19:33:30 Norrin, to iap Jun 25 19:33:42 iab* Jun 25 19:33:50 a valid api key Jun 25 19:34:06 iab only checks packagename, versionCode/Name and the apiKey Jun 25 19:34:07 i don't have any request to iab that i know of Jun 25 19:34:29 you asked about in app billing, didnt you? Jun 25 19:34:38 yes. what requests? Jun 25 19:34:46 to in app billing Jun 25 19:34:48 i'm not making any requests... Jun 25 19:35:01 that i know of... Jun 25 19:35:03 ... im out. Jun 25 19:35:15 the app talks to gps. gps talks to google servers Jun 25 19:35:20 i'm not talking to any google servers.... that i know of Jun 25 19:35:46 I haven't tested iab in awhile but I *think* I needed to test with my signed APK using the release key. danijoo is talking about the key you get in the developer console for your app or the IAP key you create for any item. Jun 25 19:36:49 surf2b1, when i do a debug build, I still get my own iab purchases delivered so i guess it doesnt matter Jun 25 19:36:58 im not sure about actual iab requests Jun 25 19:36:58 i kind of thought google didn't have any server to server validation. for what other reason would there be an api key? Jun 25 19:37:13 security Jun 25 19:37:19 that's the main reason why you need a key in fact Jun 25 19:37:32 maybe that is because you are on the testing list in your dev console Jun 25 19:37:42 surf2b1, could be true :0 Jun 25 19:37:52 i do recall hearing something about a license key. but what is the api for, if there's no server to server validation? Jun 25 19:38:08 for other kind of services (play games), i've added the debug key sha1 + packagename, so i'm not bothering anymore while testing Jun 25 19:38:19 s/other/another/ Jun 25 19:38:52 Norrin, you better read the documentation, answer is too long and you're not enough precise, you are confused with some terms too Jun 25 19:39:33 well it guess it isn't relevant for me, since i can't figure why i'd need a server api, and therefore a key for that api Jun 25 19:39:53 i'm not working on the validation piece anyway Jun 25 19:40:04 just can't figure why it was mentioned Jun 25 19:40:23 because in-app billing will communicate with google via your apps Jun 25 19:40:33 and they need to authenticate that properly Jun 25 19:40:39 communicates with google via gps Jun 25 19:40:43 you don't actually talk to google... Jun 25 19:40:48 gps has nothing to do with in-app billing Jun 25 19:40:57 it's for geolocation Jun 25 19:41:21 and don't start explaining to us how it works since you're the one having trouble to figure it out Jun 25 19:42:55 adq, here are your lovely docs: Jun 25 19:42:56 "Your application accesses the In-app Billing service using an API that is exposed by the Google Play app that is installed on the device. The Google Play app then conveys billing requests and responses between your application and the Google Play server. In practice, your application never directly communicates with the Google Play server. Instead, your application sends billing requests to the Google Play application over interprocess Jun 25 19:42:56 communication (IPC) and receives responses from the Google Play app. Your application does not manage any network connections between itself and the Google Play server." Jun 25 19:43:03 http://developer.android.com/google/play/billing/billing_overview.html Jun 25 19:43:38 i think he means google play services with gps adq ;) Jun 25 19:43:54 yes Jun 25 19:43:58 bingo Jun 25 19:44:16 Norrin, if you do a request to gps for IAP, you need to pass an api key to it that it then uses to validate with google server Jun 25 19:44:23 its not that hard :) Jun 25 19:44:34 s/IAP/IAB Jun 25 19:44:43 Norrin: the same key you used when you first published the app to the play store. <- still the correct answer when you will have published your app in the playstore, otherwise it's the same key you have referenced so they can identify "who" (your app) is making requests Jun 25 19:44:49 http://hanhuy-acra.appspot.com/public/com.hanhuy.android.keepshare/8473500f06857f2b35c9e4f8f395ed3825969982 Jun 25 19:44:52 even if your app doesn't communicate directly Jun 25 19:44:53 ugh, I can't kill this crash still Jun 25 19:45:02 (thx god, it does not communicate directly by the way) Jun 25 19:45:08 :/ why is onDataChanged being called twice. Why you do this Android Wear?!!?!: Jun 25 19:45:10 @!##%$^% Jun 25 19:45:14 danijoo, thanks. that's what i wanted to know. i didn't know what request you were talking about Jun 25 19:45:21 sounded like you were talking about some http server request Jun 25 19:45:27 hence my follow-up statements Jun 25 19:45:34 Norrin, you can do your own validation via http too Jun 25 19:45:39 i think google even suggests that Jun 25 19:45:57 surf2b1 how'd that go for you? Jun 25 19:45:59 pfn: cool crash report page Jun 25 19:46:11 quinnjn, yeah, wrote it out of boredom a while ago Jun 25 19:46:34 Afzal: fine. Just needed to add the service in my manifest for the main project. Jun 25 19:47:20 why must they add one dp to the status bar height for M Jun 25 19:47:29 surf2b1 probably because you didn't declare it in the Manifest for the library. Was it an IntentService or good ol' normal Service? How did you manage the lifecycle? Jun 25 19:48:36 danijoo, interesting. i'll try to remember to look into that Jun 25 19:48:41 normal Service. Are you having an issue adding a service to your library? Jun 25 19:50:04 surf2b1 no, I have one. It's a long-ish running service in my library. I was just wondering how others have done it Jun 25 19:51:44 hello everyone! Jun 25 19:53:28 what's up DreamCoder Jun 25 19:53:38 How does one do snackbar with undo action in lollipop? Jun 25 19:53:50 danijoo, I'll try testing with a debug key Jun 25 19:54:13 lasserix isnt that covered by the new design compat lib? Jun 25 19:55:50 ahh no icons Jun 25 19:56:03 Chainfire, yes it is Jun 25 20:14:28 Did they add support for svg files in the new sdk build tools? Jun 25 20:14:44 I thought I remember seeing it in a video, but maybe i am being delusional Jun 25 20:16:42 lasserix i thought so too, but i'm still on stable Jun 25 20:18:06 I know they said it would be coming, but if it's already in there is another question altogether Jun 25 20:19:43 when they announce stuff and its not ready, easy to forget. 6mos from now i'll be reviewing the i/o on whats new in tools Jun 25 20:21:17 heh Jun 25 20:26:23 What's best practice for parsing JSON in Android? Jun 25 20:26:34 hello, I am starting to get confused between where to put my code between an activity and it's fragment. I have a sub Activity that has a fragment. The fragment has several EditText fields. I want to capture when the user presses back, or the "up" button in the action bar. I put this logic in the Activity (should it go in the fragment, or can it even go there?). both the onBackPressed and onOptionsItemSelected (with android.R.id.h Jun 25 20:27:04 is there a way to have this method in the fragment and for the activity to call the fragment's method? Jun 25 20:28:01 or can I fetch the fragment's fields in the activity? if both of these ways are consider bad practice, then what is the better approach to this Jun 25 20:30:16 Wilkim, fetch the fields in fragment, but handle backpressed and up in activity Jun 25 20:31:50 i'm running a for loop but line 36 keeps giving me the same result 78, 82, 86 it seems the loop keep looking at same row http://pastebin.com/apMB53hU Jun 25 20:32:11 danijoo thank you! This is my first android application, can you provide any pointers or sites you can point me to on how to handle the events in the activity but have the activity call a method of the fragment? Jun 25 20:32:40 Wilkim, you can do findFragmentById(viewHolderId).callSomeMethod() Jun 25 20:32:49 thank you! Jun 25 20:32:57 findFragmentById() is a method of fragmentManager Jun 25 20:33:00 that's exactly what I needed Jun 25 20:34:07 danijoo sorry to keep asking, but I use (FragmentManager fragmentManager = activity.getSupportFragmentManager();) to get the fragment manager correct? Jun 25 20:34:20 yes Jun 25 20:34:25 thanks! Jun 25 20:34:29 again lol Jun 25 20:35:11 Hi, i am using this lib for my app, but i would like each of the tabs to have a custom layout. https://github.com/nightwalkerkg/MaterialViewPager Jun 25 20:35:57 Any quick guides how to do that. Jun 25 20:36:05 if it’s a viewpager, then shouldn’t all of the elements be fragments? Jun 25 20:36:21 ugh, I'm sorry, but if I am supporting API 16 and higher, do I import android.app.FragmentManager or android.support.v4.app.FragmentManager Jun 25 20:36:52 either one will work, but in general, you should use the support Fragments Jun 25 20:37:00 consistent behavior across all versions Jun 25 20:37:41 always use support fragments Jun 25 20:38:40 s73v3r thank you, just to help me further understand this, android.support.v4.* is for API 4 and higher, while android.app.* is what exactly? whatever the original implementation API was (and higher)? Jun 25 20:39:37 its whatever the version shipped with. For example, child fragments were introduced in 4.2, I think, so anything higher than that will have them, but anything lower will not. But support fragments will have them Jun 25 20:39:49 Wilkim, the number is the lowest number where you can use the support lib Jun 25 20:40:06 supp v4 can be used with api level 4 but not with 3 Jun 25 20:40:23 i gotcha Jun 25 20:41:41 hey guys… im renaming the APK on my gradle to include the version. When i tell Android Studio to RUN, It builds the APK with the new version in the name, but when it tries to run, it gives me I/O Error: OLDFILENAME (No such file or directory). any help?? This is my build.gradle: http://paste.ofcode.org/f2dLmttYWRk9cfz82dLCPC Jun 25 20:43:24 is there any drawbacks to using the support library, like a slight, or negligible performance hit/overhead? or perhaps missing some advanced features? Just trying to figure out at this point why the support library isn't just part of the initial library (sorry if I am not getting my point across clearly) Jun 25 20:44:31 nope Jun 25 20:44:54 hi Jun 25 20:44:56 the support library isn’t part of the initial library because if it was, they couldn’t update it and keep it compatible with previous versions Jun 25 20:45:02 luist, how did you tell it to change the name Jun 25 20:45:12 it’s entire existence is to backport features to older versions of Android Jun 25 20:45:28 danijoo: in the android.applicationVariants.all block? Jun 25 20:45:54 s73v3r ah I get it, okay that cleared up so much confusion I've had. I was honestly afraid to use the support library for the reasons I mentioned, I thought they were perhaps true Jun 25 20:46:01 thank you Jun 25 20:46:25 is there any other way of accessing a class in the base package without moving it or using reflection? Jun 25 20:46:33 even if there was a performance hit, it’s probably not noticable. Jun 25 20:46:58 if someone could just give me a hint or point me in the right direction, how do i make not a full blown activity but rather like a menu pop up on launch? Jun 25 20:47:28 last question, why would one person want to use a v4 support library over the v13 support library or even the v21 support library? Jun 25 20:47:39 they all have different things Jun 25 20:47:40 bynarie, you mean like an alert thats transparent over other stuff? That's actually a full activity with a transparent theme Jun 25 20:47:54 bynarie, so look for something like "transparent background alert activity" or something and you'll find some references Jun 25 20:47:57 gotcha, ok thank you! Jun 25 20:48:18 well, like a reboot menu .. would that be what ur referring to? Jun 25 20:48:23 bynarie, yup Jun 25 20:48:29 ok thanks Jun 25 20:48:30 bynarie, that's an activity w/ a transparent style Jun 25 20:48:34 ok Jun 25 20:48:44 so it's really a full blown activity after all Jun 25 20:49:03 yep i guess so. it just "appears" to not be Jun 25 20:49:34 but thank you dragorn Jun 25 20:50:15 Wilkim, the v4 isn't the version of the support lib Jun 25 20:50:21 could also been a fullscreen dialog fragment Jun 25 20:50:39 Wilkim, v4 is for v4+, v21 is for v21+ Jun 25 20:56:16 hi everyone Jun 25 20:57:16 is there anything special to make the alpha or beta test area of play store usable/work? Jun 25 20:58:53 Or is there any way to set up a private ply store clone? Jun 25 20:59:06 dragorn, got it too work.. thank you Jun 25 20:59:52 CrazyBonz, setting up alpha and beta should be trivial. create either a google group or a g+ community for it, associate it via the play store developer console page, and tell users to join the group and enroll in testing Jun 25 21:00:13 if you want to do beta testing, use something like HockeyApp or UberTesters. Far better, and supports iOS as well Jun 25 21:01:16 dragon, yes, I did that and got the opt-in message but no app shows available, but it is there Jun 25 21:03:35 I am using theme Theme.AppCompat.Light. How do I tell my drawerLayout to also be 'light'? Jun 25 21:06:08 it has exactly the same color :( Jun 25 21:18:16 pfn sorry for not replying sooner, I had to get some work done. Anyway thank you for the information, between you and the others I understand so much more than I did earlier today. Jun 25 21:18:40 anyone got an idea of when assets gets processed during the gradle build? Jun 25 21:20:09 Should a ViewHolder pattern, or other similar patterns go inside stay inside the Activity / Fragment class, or be in it's own file? I wasn't sure what the current practice was. Still new to Java and Android and I'm trying to implement all the best practices Jun 25 21:21:53 Does anyone know how I can start an activity by only knowing the package name and the action but not the name of the activity. http://developer.android.com/tools/help/shell.html#IntentSpec For example, action would be android.intent.action.MAIN and the package can be com.ebay.mobile. Jun 25 21:23:09 Wilkim: having it as a nested class is fine. one thing to keep in mind is that you should avoid making it static because then it can actually outlive the Activity/Fragment lifecycle and then leak your Activity/Fragment. Jun 25 21:26:21 Zythyr: you could give this a shot.. http://stackoverflow.com/questions/2780102/open-another-application-from-your-own-intent Jun 25 21:28:50 alexfu thank you, that I shall keep in mind! Jun 25 21:30:16 alexfu, thanks for the link, but I am trying to do this using only adb. I am really not sure how to do it Jun 25 21:31:48 alexfu, I tried doing this: adb shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -p com.ebay.mobile but it doens't work Jun 25 21:36:20 Zythyr: try this: adb shell monkey -p com.ebay.mobile -c android.intent.category.LAUNCHER 1 Jun 25 21:38:22 surb2b1, what is the 1 for at the end Jun 25 21:40:16 surf2b1, nvm i got it. It works thanks! Jun 25 21:40:19 Zythyr, its adb shell am start -a Jun 25 21:41:18 Do all androids apps lead to start of the main activity (launching the app) with the category LAUNCHER? Jun 25 21:41:33 yes Jun 25 21:41:41 but an app can have multiple launcher activities Jun 25 21:41:57 yes. in particular, your application will be in the stopped state immediately after installation Jun 25 21:42:16 danijoo, am start -a android.intent.action.MAIN com.ebay.mobile doens't work Jun 25 21:42:29 and things like BOOT_COMPLETE receiver or anything like that *won't* be triggered until your app is launched by the user (e.g. with a LAUNCHER intent) at least once Jun 25 21:42:38 let me check.. Jun 25 21:43:10 I am trying to launch multiple apps using adb by only doing the package name and not the exact activity name. Thats why I am trying to filter with only MAIN action or LAUNCHER category Jun 25 21:46:57 seems like you need the activityname when you dont have a deep link filter Jun 25 21:47:52 ah the monkey works too :) Jun 25 21:47:59 monkey -p -c android.intent.category.LAUNCHER 1 Jun 25 21:48:42 danijoo, thanks, monkey works Jun 25 21:52:19 Zythyr: Just run this: adb shell "for i in `pm list packages`; do monkey -p `echo $i | cut -d: -f2` -c android.intent.category.LAUNCHER 1; done" Jun 25 21:52:20 http://i.giphy.com/moiWSfviYKNgc.gif Jun 25 21:53:34 is it a bad idea to extend the root layout on a complex layout, and to create methods there to handle getting and setting data instead of using the view holder pattern? Jun 25 21:56:17 Hey, can anyone help me with java? Jun 25 21:57:10 I have a listener and i'm just trying to Intent a new activity based off of the listener Jun 25 21:59:54 surf2b1, what does that do? Jun 25 22:00:19 try it out Jun 25 22:01:03 Why Google keeps thinking I'm a robot? I'm just search for programmer things http://t.sql01.com/sc/5b1f3c88_1435269325.png Jun 25 22:03:04 Zythyr: it just loops through all installed apps and opens them Jun 25 22:03:53 surf2b1, I ran the script Jun 25 22:03:59 it gave me a list of all the packages Jun 25 22:03:59 haha Jun 25 22:04:08 oh.. so it didn't work for you Jun 25 22:04:14 fail Jun 25 22:04:19 lol Jun 25 22:04:28 were you trying to lunch all the apps on my phone? Jun 25 22:04:35 lol Jun 25 22:04:39 yeah, that's what it should have done Jun 25 22:04:54 lol it says "not found" Jun 25 22:05:59 Is it possible to loop through all the package and printout the the name of the activity that has MAIN action or LAUNCHER category Jun 25 22:06:29 icedp you get that when you search on google? Jun 25 22:06:49 Wilkim: yep Jun 25 22:07:04 icedp let me guess, your using Windows? Jun 25 22:07:40 nope, how is it connected? ) Jun 25 22:08:34 icedp: are you at work? Jun 25 22:09:21 icedp etheir you, or someone on the network you are on has a malware that is tripping that warning Jun 25 22:11:11 I'm home but must be network yes. Proxy helps Jun 25 22:12:19 Zythyr: with the PackageManager in an Android app it is very easy. From adb, I would need to look Jun 25 22:13:16 icedp, it can also be your computer if you are using Windows, or any other computer on the network. If it's a laptop you can bring it to a different network and see if the issue arises again Jun 25 22:13:58 okay no problem, i think for now ill just use the monkey method with LAUNCHER category Jun 25 22:14:51 Wilkim: how is the issue with Windows in that case? just wonder Jun 25 22:15:19 windows... rofl Jun 25 22:15:40 icedp, shared ipv4 maybe? Jun 25 22:16:40 Can someone help me running a script that uses both bash commands and python commands. I am trying to use UIAutomater which requires python, but also use adb monkey which requires bash. How do I write a python script that uses both. Jun 25 22:17:34 I've seen this issue several times in two separate jobs. The first time it was "cleared" after I upgraded the only two Window's machines in the office to OSX and Ubuntu. And at the other job it was solved by cleaning a highly infected Windows machine. Linux and OSX rarly get software that will cause this problem, not to say they can't, it's just far more rare in my experiance Jun 25 22:18:01 write a bash script which launches one, and then the other Jun 25 22:18:15 http://lmgtfy.com/?q=bash+command+python&l=1 Jun 25 22:18:55 danijoo thanks! Jun 25 22:19:00 s73v3r thanks Jun 25 22:19:12 Wilkim, icedp some providers in germany dont give you dedicated ipv4 anymore. you only get ipv6 and a huge amount of users share one ipv4 via NAT. this sometimes leads to this google DOS filter as well Jun 25 22:19:36 because for them it looks like a service spam from the same ipv4 Jun 25 22:19:41 Zythyr: or execute external commands from Python, should be easy Jun 25 22:20:03 danijoo, ah I had no idea, I live in the US and am quite unfamiliar with situations in other countries, never thought of that Jun 25 22:20:19 Wilkim, you will know that soon (tm). Jun 25 22:20:27 ipv4 will get rare :p Jun 25 22:20:44 lol, I actually disabled IPv6 on my ubuntu install Jun 25 22:21:02 theres no future in ipv4 Jun 25 22:21:22 for some reason when I do an apt-get upgrade it seems to have a 33% chance to get stuck on one IPv6 IP, and there was another issue too, but I forget what it was Jun 25 22:23:25 do you even have an ipv6? Jun 25 22:23:38 if you dont, you cant call to a v6 Jun 25 22:23:46 which might be the reason for stucking Jun 25 22:24:07 yea, I did, i had IPv6 and IPv4 at the same time Jun 25 22:24:29 i gtg, I think it was an ISP issue at the time, you've encouraged me to try it again Jun 25 22:24:45 I just wish IPv6 came to me as easy as IPv4 did lol Jun 25 22:25:00 theres no issue in v6 Jun 25 22:25:10 the only problem is that "the world" needs to switch Jun 25 22:25:19 indeed Jun 25 22:25:31 thank you everyone for helping me earlier! cya Jun 25 22:29:20 hi, anyone using Retrofit? Jun 25 22:29:39 I am Jun 25 22:29:46 looks like they got rid of the Call.java class as well as Retrofit.java? Jun 25 22:30:13 all the code I see only uses these 2 classes but I cannot even find them on the docs anymore Jun 25 22:30:22 Because they're not released. Jun 25 22:30:41 what do you mean? Jun 25 22:31:31 I get 'cannot' resolve symbol on AS for both Jun 25 22:31:53 plus they are not on the docs, which they should be even if the source was not public Jun 25 22:35:25 dont you use restadapter? Jun 25 22:36:48 this is actully my first time trying it out Jun 25 22:37:05 I see RestAdapter being used in the website examples, yes Jun 25 22:37:10 JFlash you should pull the stable version Jun 25 22:37:12 you should try the docs then ;) Jun 25 22:37:44 Afzal, well I just added to graddle whatever they tell me to add there Jun 25 22:37:55 1.9.2 or something Jun 25 22:38:06 thats fine Jun 25 22:38:45 danijoo, I just wanted to confirm what's happening that's all Jun 25 22:39:11 also a bit saddenned by the fact that all the online resources are pretty much deprecated now Jun 25 22:39:39 JakeWharton, btw the new architecture is much better imo. Jun 25 22:40:04 JFlash, which resources are you refering too? Jun 25 22:40:25 online tutorials and even their sample repo Jun 25 22:40:47 it should be the opposite Jun 25 22:40:56 It's the opposite Jun 25 22:41:08 ? Jun 25 22:41:10 Look at a release tag if you want samples of a released version. Jun 25 22:41:45 sorry, can you educate me on how to do that? Jun 25 22:41:52 JFlash, the Retrofit class is the new stuff. the stable (old) release uses RestAdapter Jun 25 22:42:14 I'm on a phone, someone else will. Jun 25 22:42:39 but I see tutorials back to mid 2014 using the other code Jun 25 22:42:47 JFlash, show one Jun 25 22:42:51 and the restadapter I can only find in the official page :P Jun 25 22:43:22 gimme a sec, I was researching this back at the office Jun 25 22:43:39 pics or it didnt happen :p Jun 25 22:45:51 you can't use a Handler to execute code on a worker thread can you? Jun 25 22:46:27 indeed I may be confused about this Jun 25 22:46:31 entropyeqzero, you can but why would you? Jun 25 22:46:50 but then , why I get 1.9.x with graddle and I don't get those classes? Jun 25 22:46:57 danijoo: suppose I want to execute just one method on the worker thread after run() is completed Jun 25 22:47:11 JFlash, they are new in 2.x Jun 25 22:47:20 danijoo: but I need the objects made by the run() method Jun 25 22:47:21 you are on stable (1.9.x) which uses RestAdapter Jun 25 22:47:26 so I cant use an executor Jun 25 22:47:39 entropyeqzero, async task? Jun 25 22:47:42 danijoo, cool but how to find it? I only see mentions to 1.9 or earlier whenever I go Jun 25 22:48:00 hm Jun 25 22:48:32 JFlash, as youve been told 5 times now, 2.x is not out yet Jun 25 22:48:40 new architecture of what danijoo? Jun 25 22:48:42 can I just throw additional code at an existing thread and use it's objects with asynctask? Jun 25 22:48:42 and if you are new to this, you shoudnt use it Jun 25 22:48:47 joined late in the convo i gues Jun 25 22:49:02 danijoo: never, used asynctask, gonna rtfm, brb Jun 25 22:49:20 Is this for retrofit? JFlash, danijoo Jun 25 22:49:26 yes Jun 25 22:49:39 JFlash what are you looking for? Jun 25 22:49:42 entropyeqzero, you can also just create a handler from a running thread and post to this Jun 25 22:50:16 danijoo: yes, but how would I invoke said handler from the UI thread? Jun 25 22:50:55 shadynastys, I was looking for Call.java and Retrofit.java because the sample code on their repo requires those Jun 25 22:50:56 just do it Jun 25 22:51:00 dont understand the question Jun 25 22:51:22 I see the commit for the change to Retrofit over Restadapter https://github.com/square/retrofit/commit/580d31ae906ac28f608427d4c4d2318a0e8b658a Jun 25 22:51:27 shadynastys, but then it looks like all I can download with gradle is 1.9.x , which doesnt have those 2classes Jun 25 22:51:27 JFlash, dont look at the repo Jun 25 22:51:28 wait, by running thread you mean worker thread? Jun 25 22:51:32 look at their site Jun 25 22:51:40 or look at the repo revisiion of 1.9 Jun 25 22:51:56 ok guys, thanks for clarifying! Jun 25 22:52:01 yes entropyeqzero Jun 25 22:52:13 I shall try it in a bit Jun 25 22:52:42 you can create a handler from any thread Jun 25 22:52:48 and then just use that one Jun 25 22:53:36 but then I wouldnt have any reference to that handler in the UI thread, right? So I would have to make it static? Jun 25 22:54:05 now you see why its an ugly solution :p Jun 25 22:54:34 hmm Jun 25 22:59:10 shadynastys, I'm new to Android dev. Do you recommend retrofit as a go-to lib for consuming REST services? Jun 25 23:03:41 My brand new laptop is going slower and lagging more than my old one from 2012(lagging as in 6 sec freeze when dragging dropping to resources etc). This one has core i5 and 8 gig ram windows 8, the last was core i7 and had 3 gig ram. does this make sense to anyone? Jun 25 23:03:57 JFlash, I like it because it is easy and clear to implement. I use it because I have experience with it. Jun 25 23:05:59 Retrofit is a farily cromulent library to use if you have a bunch of endpoints Jun 25 23:07:42 How so s73v3r? Jun 25 23:08:23 If I only have a handful of endpoints, sometimes I might prefer to just do it by hand. Otherwise I’d rather use Retrofit Jun 25 23:09:52 JFlash, retrofit is invaluable Jun 25 23:11:34 more like bestrofit Jun 25 23:13:31 ok, thanks for sharing your experiences with it Jun 25 23:13:49 JFlash, hold up Jun 25 23:14:03 I wonder if it can/should be used alongside Volley, btw Jun 25 23:14:21 JFlash, if you want to quickly learn retrofit, this is what i used Jun 25 23:14:22 https://www.youtube.com/watch?v=3WONuRSUHmw Jun 25 23:14:33 I've not used volley, so i can't speak to that Jun 25 23:14:33 I know that Volley has some UI sugar classes , which I like Jun 25 23:15:44 sigmabeta, sweet. I actually been hunting youtube for retrofit videos, but some reason I could not come across that one Jun 25 23:16:46 sigmabeta, I have a lot of youtube android dev links, but if you have some you especially like I'd be interested to know Jun 25 23:17:22 JFlash, well, there's a lot of them. what do you want to know about? Jun 25 23:17:35 sigmabeta, the advanced stuff :) Jun 25 23:17:47 well, advanced is a huge category Jun 25 23:17:48 the hard stuff, I mean Jun 25 23:18:02 ah, so you want Dagger. Jun 25 23:18:03 :D Jun 25 23:18:17 how does the manifest know which activity t start? is it with ? Jun 25 23:18:18 is it like eventbus? Jun 25 23:18:30 Dagger? not really Jun 25 23:19:22 gavit, activities you define with the tag show up in the launcher Jun 25 23:19:25 you can have more than one of them Jun 25 23:19:28 sigmabeta, I'm interested in stuff I'd be able to use in yr average android project, not specific things. stuff like advanced notifications or anything I could use to spice up my projects Jun 25 23:19:43 if you do, the one the user clicks is the one that is started Jun 25 23:19:46 maps and geolocation are a hot topic too Jun 25 23:20:00 JFlash, have you done other dev work? Jun 25 23:20:09 yes Jun 25 23:20:21 so i'm assuming your java is pretty good Jun 25 23:20:43 i mean, it's tough to say. android changes a lot all the time, and i think especially now is really going through a transitional period Jun 25 23:20:54 Is there a way I can kill all applications and background processes using adb? Jun 25 23:21:36 Is there a way I can kill all applications and background processes using adb? The kill-all method only kills background processes. But how to kill all the active apps? http://developer.android.com/tools/help/shell.html Jun 25 23:21:45 JFlash, broadly speaking, the libraries i hear the most about these days are Retrofit, Dagger, and RxJava Jun 25 23:22:03 I'm actually new to Java, but I can leverage stuff from other languages, so I'm hopeful I'll learn it sooner than later Jun 25 23:22:21 you also probably want to learn about the new support libraries for making Material Design easier Jun 25 23:22:36 okey Jun 25 23:22:55 yeah, been using those at work right now. but not without pain :) Jun 25 23:23:05 Dagger and RxJava require an investment Jun 25 23:23:12 i'd say retrofit is pretty user friendly though Jun 25 23:24:04 JFlash, if you are looking to bone up on what's happening with android dev, i'd strongly recommend the Fragmented Podcast Jun 25 23:24:15 hey , Dagger is a dependency injector Jun 25 23:24:23 i think it's www.fragmentedpodcast.com Jun 25 23:24:42 ah sorry, when I asked if dagger was like eventbus Jun 25 23:24:51 I actually meant to say Butterknife Jun 25 23:25:02 ButterKnife is boilerplate reduction only Jun 25 23:25:09 yeah, butterknife makes it so you don't have to do findViewById all the time Jun 25 23:25:27 I chose to use Butterknife due to broad adoption , should I also learn Dagger? Jun 25 23:25:33 dagger is not really the same category Jun 25 23:25:45 okey Jun 25 23:26:00 do you happen to have any sweet dagger learning resources to share? Jun 25 23:26:09 is there a reason why gson would convert a field named motionId to otionId in the json? Jun 25 23:26:21 and motionName to otionName Jun 25 23:26:32 i'd say the best resource is a bunch of talks given by some guy Jake Wharton Jun 25 23:26:46 https://www.parleys.com/tutorial/the-future-dependency-injection-dagger-2 Jun 25 23:26:49 yeah this Jake Wharton guy seems to know some of his stuff Jun 25 23:26:49 hi guys Jun 25 23:27:32 a method I want to call on an onClick takes as parameter a View . Am I supposed to be casting something to a view? I don't get what I need to do Jun 25 23:27:36 thank you Jun 25 23:27:53 Hi, how can I make an application take an image from the camera without creating a preview surface? Will that allow me to use the camera from outside the UI thread (assuming no other applications are using it)? Jun 25 23:27:57 the trouble is that Dagger just hit version 2, and has a somewhat different approach from version 1. most of the literature about Dagger hasn't been updated to reflect this Jun 25 23:28:07 it's... tricky. don't get frustrated, it will come to you Jun 25 23:28:14 Helsinkiii, maybe go back to Android 101 before anything else? Jun 25 23:28:28 thanks Jun 25 23:29:44 JFlash, I think your confusion with butterknife is because tehy both involve the word inject? Jun 25 23:30:40 sigmabeta, could be yes Jun 25 23:31:21 * JFlash *injects* himself under a rock out of pure shame Jun 25 23:35:24 Anyone use adobe omniture analytics? Jun 25 23:35:27 JFlash, Since clearly this topic is on Square open source libs you might as well check out Picasso too. Its for loading images. Jun 25 23:35:37 I am curious if I can track states without tracking activity lifecycle callbacks? Jun 25 23:36:08 lasserix like foreground backgroun? Jun 25 23:36:17 lasserix, define 'track' Jun 25 23:36:26 JFlash: have you used the omniture sdk? Jun 25 23:36:34 no Jun 25 23:36:39 Helsinkiii: the view in onCLick(View v) is the view that was clicked Jun 25 23:36:56 To answer my question you need to have used the sdk Jun 25 23:37:41 i am just wondering if the lifecycle tracking methods are prerequisites to the trackstate methods of the sdk, as in if i don't do the former will doing the later cause it to crash/not work Jun 25 23:46:10 Yeah, Picasso is quite good too, but I did not want to sound like too much of a square cheerleader :D Jun 25 23:46:24 lasserix are you talking about the collectlifecycle calls vs the trackState calls? Im looking up the porject i used omniture on. Jun 25 23:49:29 yeah Jun 25 23:49:42 do I need to do collectlifecycle to enable trackState or can I do trackState independently? Jun 25 23:49:58 I would never have thought to make a splash screen an activity Jun 25 23:50:14 I wonder if I'm too 'careful' with activities Jun 25 23:51:03 What did you make splash screen, then? Jun 25 23:51:48 s73v3r: just to see how it works Jun 25 23:52:11 no, i meant if you didn’t make it an activity, how did you do it? Jun 25 23:52:38 does anyone know why Logcat keeps auto-clearing itself? Jun 25 23:52:38 s73v3r: I was thinking of showing a fragment with a timer and then switch the fragment Jun 25 23:53:08 \o/ Jun 25 23:53:20 when I run the app on the AVD, i can see logcat filling up, and then it clears on its own Jun 25 23:55:18 It is possible to kill all recent apps and processes using ADB? I am pulling systrace report to measure performance. I want to have better control of testing by making sure there is no user apps and procsses running in the background while testing a specfic app or set of apps. Jun 25 23:55:29 Helsinkiii: logcat is a circular buffer. It doesn't clear itself, but it does overwrite itself. Jun 25 23:56:06 lasserix, I have never not used the collectlifecycle calls because that covers a lot of what people want to see. But I do believe you can use those seperatly. Core implementation should just be Config.setContext(this.getApplicationContext()); the lifecycle calls are using that core that was set in onCreate. So is trackState calls. Jun 25 23:56:58 Why do I need to set a context at all if i am tracking state? Jun 25 23:57:18 since trackingState is (string, map) ? Jun 26 00:00:13 JesusFreke, well, the dialog is actually totally cleared - nothing to scroll Jun 26 00:00:31 JesusFreke, any idea how to retrieve it? i'm getting an error but it vanishes and I can't know what happened Jun 26 00:00:38 Helsinkiii: "adb logcat" Jun 26 00:01:12 lasserix, I dont know. like i said i have never tried it this way. Just going off documentation and previous use. Try to track a state without calling the setContext. Jun 26 00:01:14 I generally don't care for the logcat views provided in eclipse/AS, I just run logcat in a terminal Jun 26 00:02:26 shadynastys: yeah thanks Jun 26 00:14:52 pfn did you buy n9 yet? http://www.pcworld.idg.com.au/review/sony/xperia-z4-tablet/578328/ Jun 26 00:16:05 saw this today also http://www.androidcentral.com/best-tablets Jun 26 00:17:24 really wonder how well that Dell Venue works with Windoes 8 @ $179 Jun 26 00:18:49 http://store.apple.com/us/buy-iphone/iphone6 Jun 26 00:20:05 hey ron_frown Jun 26 00:20:16 oi Jun 26 00:20:34 no, not yet Jun 26 00:20:50 ron_frown that little dell venue looks cool, a general purpose computer for $179 Jun 26 00:21:26 tacticaljoke liked his tesco hudl 2 Jun 26 00:21:38 I woudlnt want an adroid tablet Jun 26 00:21:42 er android "computer" Jun 26 00:21:56 oh venue Jun 26 00:21:59 the tablet Jun 26 00:22:12 ehhh Jun 26 00:26:53 ron_frown did you see the webassembly stuff from this week ? Jun 26 00:26:55 I dont really want a windows mobile or ios either Jun 26 00:27:01 I think I saw it last week Jun 26 00:27:03 but yes Jun 26 00:27:14 What is the different between tunctions and categories when pulling systrace report? How do I know the avalible functions? http://developer.android.com/tools/help/systrace.html Jun 26 00:27:51 It says here that an activity can be part of a screen. Jun 26 00:28:12 ron_frown somehow i think we're seeing something major beginning to unfold; i have a feeling this will play some inevitable part in android sometime in the future Jun 26 00:28:34 would 'view location on a map' be an activity and displayed in an imageView within an activity with details of the item? Jun 26 00:28:38 I think its all so up in the air as far as whats going to be supported and how Jun 26 00:28:55 if its html+js Jun 26 00:28:55 fuck it Jun 26 00:29:23 dont think it has anything to do with html + js Jun 26 00:29:35 well I'd be surprised if it didnt Jun 26 00:29:44 I know it was ORIGIANLLY rooted in asm.js Jun 26 00:29:53 more about running standardized bytecode across browsers Jun 26 00:29:55 but emscripten and stuff like that is a mess Jun 26 00:30:00 thats what I've been saying for ages Jun 26 00:30:15 you can twist js hoever you want Jun 26 00:30:16 http://pastebin.com/Y2f1tHKL worst bug ever for today, cannot reproduce Jun 26 00:30:16 its still shit Jun 26 00:30:33 so if it really ends up being pure bytecode and nothing more Jun 26 00:30:38 I'm excited for that Jun 26 00:30:45 too bad it didnt take off the first time a person had that idea Jun 26 00:30:49 or the second time Jun 26 00:31:00 shit ms had a DLR, so you could run whatever language you chose Jun 26 00:31:00 google has a design spec for material adaptive ui, http://www.google.com/design/spec/layout/adaptive-ui.html. Is this just utilizing the already existing layout folders with qualifications, or am i missing something else that is needed for this? Jun 26 00:31:17 does google even promot material ui anymore Jun 26 00:31:21 adq native code, or bug in skia ? Jun 26 00:31:36 bug in skia i guess, i'm just drawing few ridiculous thing in a canvas Jun 26 00:31:52 when i crawl google code issue i found many directions of course.. Jun 26 00:32:29 the fault @ is pretty high though: fault addr 0xffffff9c Jun 26 00:32:54 (it's on android wear by the way) Jun 26 00:35:16 let's shrug until it appears again :) Jun 26 00:35:46 good luck Jun 26 00:35:49 thats one thing with c++ shit Jun 26 00:36:03 get an error... sometimes its just good luck getting to the bottom of it Jun 26 00:38:02 adding apt plugin increases build times by a lot Jun 26 00:38:14 then don't add apt plugin :p Jun 26 00:41:31 Could someone help em input a remote XML file encoded using UTF-8 please? I did a couple changes at my code already as : https://gist.github.com/anonymous/671dc613f00cdb073550 Jun 26 00:41:36 Could someone help me with a UTF-8 encoding from a XML input please? Jun 26 00:43:27 shadynastys: did you use bloodhound to test it? Jun 26 00:46:03 lasserix, no but just looked it up and that looks like it would have been useful Jun 26 00:46:19 can't figure out how to configure what to make it work? Jun 26 00:46:33 am i supposed to change the ADBMobileConfig.json file and point it to the bloodhound thing or? Jun 26 00:46:43 pfn dagger requires it Jun 26 00:46:54 but I haven't used dagger really so I guess I can scrap it :D Jun 26 00:46:55 it doesn't Jun 26 00:47:13 the apt plugin just makes referencing generated code tolerable in an IDE Jun 26 00:47:28 it properly sets javac's processorpath and makes the IDE aware of the generated folder as a source root Jun 26 00:48:01 right, so to use Dagger efficiently, apt is needed Jun 26 00:48:59 lasserix, When we were testing all of our omniture tracking we would use mitm proxy to just look at the actual packets being sent. I think we had a script that filtered out just the omniture calls. I do not think this was available when I was using omiture. Jun 26 00:52:17 mitm proxy is like wireshark? Jun 26 00:53:13 lasserix one part of wireshark Jun 26 00:53:34 more like Charles. Jun 26 00:53:40 ahh well tmw going to head home now Jun 26 00:53:41 thanks Jun 26 00:53:52 yup Gl Jun 26 00:55:28 Afzal, can Wireshark do mitm? Jun 26 00:56:23 or would you have to set up the man in the middle connection and wireshork just picks up packets. Jun 26 00:57:03 Is there a 3D equivalent to the object class Point2D? I'm trying to store x,y,z coordinates in double precision Jun 26 01:01:12 So I have a media player service and main activity that binds to i. Would it be better to put the media player controls in a fragment and have the activity swap out fragments for content? or extend the main activity containing the fragment and inflate the content in the children activities? Jun 26 01:01:53 this has always made me reconsider using fragments at all Jun 26 01:09:16 I really enjoyed this article on advocating against fragments: https://corner.squareup.com/2014/10/advocating-against-android-fragments.html Jun 26 01:11:10 If its a persistent service that is playing music is it bad to have all these activities bind and unbind just for controls? Or better to bind to a single activity and swap content in fragments. Jun 26 01:15:00 DreamCoder, I have read that article. Very interesting. Also a reason why I have currently designed for multiple activities. I am mainly concerned about all the binding and unbinding to the service. Jun 26 01:19:04 ah, yes, I can see how that would be a concern. Do you need to bind to the service? Have you looking into using LocalBroadcast? Jun 26 01:19:28 well, when advocating against fragments, it's nice to have an alternative Jun 26 01:19:33 simply manipulating viewgroups is rather painful Jun 26 01:19:50 Howdy yall Jun 26 01:20:05 hello! Jun 26 01:20:09 anyone going to this? http://www.andevcon.com/santaclara Jun 26 01:20:18 or the boston conference? Jun 26 01:20:43 Tricknology: I tried to get that one approved through my employer...looks like it will be a lot of fun Jun 26 01:20:46 maybe next year :( Jun 26 01:20:58 Tricknology: What is the boston conference? Jun 26 01:21:31 Is that just the boston location for AnDevCon? Jun 26 01:21:53 yes, Boston location Jun 26 01:22:02 I am thinking I might also get my employer to approve it Jun 26 01:22:23 They sent 4 to a Redis conference so... I don't see the big deal in sending 1 Jun 26 01:24:15 WHere are you located DreamCoder? Jun 26 01:24:37 Tricknology: that would be really awesome for you. My company said 'maybe next year' ...lol. I'll be hitting them up again for sure. Jun 26 01:24:42 Denver, co Jun 26 01:24:49 Tricknology: You? Jun 26 01:25:02 Los Angeles, CA Jun 26 01:25:19 Tricknology: Nice... love SoCa Jun 26 01:25:31 Tricknology: hot as balls out there tho Jun 26 01:26:02 g00s I kinda dont get why they are making webassembly Jun 26 01:26:05 why not dncore Jun 26 01:26:05 DreamCoder, I guess the only reason I bind to the service in the first place is to check if the media player is playing an update a button. Jun 26 01:26:06 it's pretty damn hot already, like 90 today and yesterday. AC came on at 7AM today :/ Jun 26 01:26:14 its alredy there, already standardized, opensource Jun 26 01:26:16 and fast as fuck Jun 26 01:27:23 * g00s googled dncore, didnt pull anything up Jun 26 01:27:42 heh I like this article already: http://motherboard.vice.com/en_uk/read/is-webassembly-the-eventual-death-of-javascript Jun 26 01:27:46 Tricknology: yikes... yeah it's been heating up out here too...I think it was 85 here...and humid for CO...usually it's so dry. Jun 26 01:27:55 " It's not terribly pretty and, what's more, it limits client-side web applications (those executed within the browser) to being written in JavaScript, which isn't very much in the spirit of programming and, well, JavaScript is also kind of crappy." Jun 26 01:28:16 Yeah I forget that CO gets summertime weather similar to here Jun 26 01:28:47 also whenever I see CO I think Carbon monOxide, but that's a different story Jun 26 01:29:05 but at least you guys have water.. heh Jun 26 01:30:20 Tricknology: Carbon Monoxide..hrm. thats interesting. Yes, we do have plenty of water...getting a ton of rain and oddly...lots of hail this season. The last hail storm 3 weeks ago cost me over $5k in damage to my two vehicles...ouch! Love the article...in the middle of reading it. Jun 26 01:34:22 I love the idea of WebAssembly....it would be killer to have more than just JS Jun 26 01:36:02 hi, I am programming nfc application, I dont know how to change sector for addresses with 0x1XX any ideas? Thanks Jun 26 01:39:00 wait whar argyris? Jun 26 01:39:28 DreamCoder: not sure how Broadcasts would work here. I think I would need 2 LocalBroadcasts, One From Activity to Service to ask for state, And another from service to activity for the response? Like a callback? so funky but I could avoid all the binding and unbinding and replace with 2 localbroadcasts on every activity switch. Jun 26 01:39:47 argyris I have done work with NFC, what is it you are trying to do? Jun 26 01:40:13 update with 0xff to address 0x100 until 0x1e3 Jun 26 01:40:37 there is a byte operator for that Jun 26 01:41:13 shadynastys: It may not be the best approach for you. I guess it depends on what else your app is doing. You could just set a listener for state changes that would be received via local broadcasts, but it seems like this would be more work than just using fragment.s Jun 26 01:41:24 ^, &, and | Jun 26 01:41:33 I am using acr35 nfc though. not built in. Jun 26 01:41:40 https://docs.oracle.com/javase/tutorial/java/nutsandbolts/op3.html Jun 26 01:41:45 shadynastys: Especially if you need to be able to randomly ask for the status of playing media. Jun 26 01:41:46 I can access up to 0xff, but 0x100 I dnt know how Jun 26 01:41:54 it's byte operations Jun 26 01:42:13 haha Jun 26 01:42:20 thats a neat device Jun 26 01:42:22 but i have used up all the 8 bits in the 0x00 to 0xff addresses. Jun 26 01:42:36 isn't there an SDK for that? Jun 26 01:42:53 a* Jun 26 01:43:07 there is Jun 26 01:43:38 http://www.pasteall.org/pic/89823 Jun 26 01:43:56 you see the block number is only one byte Jun 26 01:44:42 DreamCoder: if i used fragments I would be able to bind once and unbind when the user leaves. Swap fragments for content. How expensive is binding... Jun 26 01:44:54 binding to the activity ofcourse Jun 26 01:45:03 I glanced at the docs included in teh SDK Jun 26 01:45:10 are you sending APDU? Jun 26 01:45:49 yes, sending apdu Jun 26 01:46:04 oh duh it says there. I never worked with mifare, and today, all the ADPU stuff is done in the SDK/API :/ Jun 26 01:46:18 shadynastys: I've never really noticed a big overhead difference between just activities and using activitys + fragments Jun 26 01:46:40 P2 is only the block number Jun 26 01:46:48 Le = Length expected Jun 26 01:46:56 which is the length of Data In Jun 26 01:47:09 you can put a bunch in there (multiples of 16 bytes) Jun 26 01:47:40 yep, I tried changing p1 to 01 hex thinking it might be for 0x01 p2 ... Jun 26 01:48:12 it fails to execute the instruction Jun 26 01:48:32 you need a byte array Jun 26 01:48:45 byte[] Jun 26 01:49:02 yes, i passed that in already Jun 26 01:49:14 i can update up to 0xff Jun 26 01:49:16 does it return anything in the buffer? Jun 26 01:49:25 ok Jun 26 01:49:38 block number 0xff? Jun 26 01:49:40 which is 0-255, but start from 256 which is 0x100 i cannot access Jun 26 01:50:01 yes, block number 0xff, it's a single byte, i Jun 26 01:50:06 try 0x0100 Jun 26 01:50:27 it returns 0x90 0x00 if it's a success Jun 26 01:50:35 yeah thats standard Jun 26 01:50:38 what are you getting? Jun 26 01:50:53 wait, let me try 0x0100 Jun 26 01:52:08 DreamCoder: I have always thought of fragments as a tool for handling fragmentation of screen sizes. Offering different layouts for different screen sizes using the same code. Thanks for helping with that. ill stick with activities for now. Ill check for performance issues just to make sure. Jun 26 01:53:03 nothing, i believe it overwrite the 00 01 00 00, Jun 26 01:53:20 shadynastys, isn't it? I mean it can do a lot but that is one of the things I use them for.. Jun 26 01:53:25 super complex views Jun 26 01:54:15 weird, argyris, I was thinking maybe you had to format in binary pairs Jun 26 01:54:22 01 00 Jun 26 01:54:41 I tthink I need this http://stackoverflow.com/questions/16957538/apdu-write-block-commands-on-mifare-classic Jun 26 01:54:58 maybe? I have no experience with MIFARE cards Jun 26 01:55:03 sorry to tell you this so late Jun 26 01:59:30 Tricknology, yes that and viewpagers is my two main uses for them. Jun 26 02:09:29 Tricknology, it's ok. Jun 26 02:42:54 I'm doing a countdown function in a Thread with: int n = 10; while (n>0) {wait(1000); printNumber(n); n --}. It counts down from 10 to 2, but then finishes. Any suggestions? Jun 26 02:45:57 what happens if n starts at 20? Jun 26 02:46:11 treeprogram: is this homework or something? Jun 26 02:46:28 surf2b1: in a matter of speaking Jun 26 02:46:32 I'm trying to learn android Jun 26 02:46:33 dev Jun 26 02:46:42 JFlash: let me try! Jun 26 02:49:38 JFlash: I started n at 20 and it counts down from 20 to 2. Doesn't display 2, 1, 0 Jun 26 02:49:43 I mean, 1, 0 Jun 26 02:51:19 it's not supposed to print 0 anyway, since it must be greater than 0 Jun 26 02:54:44 hey guys, anyone familiar with Activity Transitions? Jun 26 02:55:04 i have an ImageView i'm trying to share from Activity A to Activity B. Jun 26 02:55:36 in A the image is an item in a RecyclerView grid, in B it is full bleed. Jun 26 02:55:59 the animation plays, however rather that starting from the correct point on the screen, it starts from the top left corner. Jun 26 02:56:15 the ImageView is filled by Picasso on both sides. any ideas? Jun 26 02:58:27 JFlash: yes you're correct, but it should print 1.. Here's the pastebin: http://pastebin.com/xAfjx0Jr **** ENDING LOGGING AT Fri Jun 26 02:59:58 2015