**** BEGIN LOGGING AT Mon Sep 26 02:59:58 2016 Sep 26 03:00:12 shmooz: You definitely should learn a revision-control system, though. Sep 26 03:00:46 They make software development a thousand times easier (and funner). Sep 26 03:01:49 TacticalJoke: Pretty sure there was a movie recently released where the premise is a dare app Sep 26 03:02:02 orbyt_: Neat. Sep 26 03:02:25 http://www.imdb.com/title/tt3531824/ Sep 26 03:08:45 lol who doesn't use version control these days Sep 26 03:09:04 version shmersion Sep 26 03:09:47 I don't need no stinkin version control Sep 26 03:09:54 You do, shmooz. :E Sep 26 03:10:12 I'm gonna nag you about this until the day I die. Sep 26 03:12:20 Maybe in the future there'll be automatic version control that reads our minds to delineate versions. Sep 26 03:19:02 Maybe we should create an #android-dev bot. One of its functions could be to annoy shmooz about not using version control. Sep 26 03:19:46 It could also be used to insult people, like in ##java. Sep 26 03:20:08 shmooz yeah pick up git or hg, if you're interviewing, ank they find out you don't use VC - imho that automatic grounds for "well get back to you" :D Sep 26 03:23:18 alias git='cp -rv . `date +%Y%m%d`' Sep 26 03:24:34 i think its rm -r not cp -r :D Sep 26 03:59:43 form validation is the most tedious thing Sep 26 04:21:41 bankai_ https://www.thedodo.com/man-builds-special-kayak-for-his-dogs-1435475908.html Sep 26 04:21:52 borrow the plans for your labs :) Sep 26 04:23:09 alex_PP yeah :( Sep 26 04:23:36 i couldn't think of anything worse! Sep 26 04:25:52 When you accidentally close Android Studio... Sep 26 04:27:49 bankai_ why, not trustworthy? :P Sep 26 04:28:16 I have rather desperate hopes they'll fix the new misbegotten layout editor Sep 26 04:28:20 of course not trustworthy, they'd last maybe four seconds Sep 26 04:28:33 Like, who thought it was a good idea to remove the ability to copy+paste in tehre Sep 26 04:28:56 i still haven't tried it Sep 26 04:28:59 * g00s lazy Sep 26 04:29:44 Well, they made the renderer more accurate... but a whole host of functionality fell off in the process, and it does this weird freezing thing when you try to change some of hte properties Sep 26 04:29:57 Dagmar: Are you using ConstraintLayout? Sep 26 04:30:03 I go change the XML directly a hell of a lot more often Sep 26 04:30:20 TacticalJoke: That's an N thing, right? Sep 26 04:31:11 ...or is that the project name for what slipped into 2.2 probably a bit before it's time Sep 26 04:31:16 It's in `com.android.support.constraint:constraint-layout:1.0.0-alpha8`. Sep 26 04:31:40 sounds like it has a ways to go Sep 26 04:32:02 Nah, I don't use those views yet Sep 26 04:32:21 At the moment I've got a screen so packed full of buttons i'm having to specify most of it by dip Sep 26 04:33:15 i have my trackpad sensitivity at 10. now what Sep 26 04:33:20 need 11 ! Sep 26 04:33:53 i used GridLayout for buttons & forms Sep 26 04:34:45 Yeah, both having tons of individual buttons and using the Design view for something other than ConstraintLayout are red flags for me. Sep 26 04:35:06 WEll, I've got a box with 18 buttons on the left and another on the right, and considering that ConstraintLayout didn't exist when I started on this, I don't much care Sep 26 04:35:26 THe buttons also double as indicators, by design. Sep 26 04:36:54 Doesn't really change the fact that the layout editor lost a lot of functionality from 2.1->2.2 Sep 26 04:37:53 Sure the blueprint view is cute, but the number of times I've had it refuse to put focus on a value when I hit DEL and *poof* there goes the view widget... SMH Sep 26 04:38:25 I'm not refactoring the UI to use ConstraintLayout while the editor still actively pisses me off Sep 26 04:39:49 Dagmar: I didn't mean to suggest using ConstraintLayout. I've never even used it. Sep 26 04:42:42 Dagmar: What I mean is that, AFAIK, top Android devs don't use the Design view (this might change when ConstraintLayout is fully released). Sep 26 04:43:02 I think top Android devs probably rarely (or never) add 18+ buttons to a layout. Sep 26 04:43:19 My conclusion is "There might be a better solution". Sep 26 04:44:02 I don't mean it like "You mustn't be a top Android dev". I mean it in a "What would Jesus do" kinda way. Sep 26 04:56:24 how to run thread in a onitemclickListener Sep 26 05:02:33 iron_host, what're you trying to do? Sep 26 05:02:52 if you really want a new thread (you don't) just call new Thread() Sep 26 05:23:38 how can i place live log view in android application Sep 26 05:24:44 Is it possible to have a persistent soft keyboard in a view displayed always ? Sep 26 05:41:12 Anyone using ConstraintLayout in production app yet? I've been testing it out again recently and it seems pretty stable. I have a new project coming up soon and was thinking of using it as the "default" ViewGroup for the app Sep 26 05:41:50 Are there any remaining big performance problems ? I haven't seen much about it online Sep 26 05:44:39 liuwenhao, I'd be interested in hearing how you get along with it if no one else any any opinions Sep 26 05:47:25 I have been playing with it in a side project app, none of my layouts are very complex (although I hear ConstraintLayout is great when you want to get rid of very complex nested layouts). Last time I used it was alpha1 and it was completely broken, alpha8 is actually kind of nice to work with Sep 26 05:48:31 Biggest problem I have is that you are basically forced to use Android Studio's design mode since it generates a huge amount of XML which is pretty annoying Sep 26 05:50:22 I can see it saving a lot of time if I had to do a very complex layout from scratch vs. using a RelativeLayout Sep 26 05:52:18 I usually write a layout for complex stuff Sep 26 05:52:22 easier than that? Sep 26 05:52:23 I hope it ends up good. In the meantime, I'll stick with basic FrameLayouts/LinearLayouts and custom ViewGroups. Sep 26 05:52:38 suppose that depends on the exact layout you're working on Sep 26 05:59:52 Good morning, guys! Sep 26 06:13:29 hey guys, any idea why my toolbar is covering over a portion of my recyclerview? https://gist.github.com/JelloRanger/c09aa97c685e3ad7b750a2fdd25648cd Sep 26 06:26:10 I enabled jack in my module and used JavaVersion.VERSION_1_8 as sourceCompatibility and targetCompatibility but Android Studio still can't compile a lamba. What am I doing wrong? Sep 26 06:26:38 What Android version are you targetting? Sep 26 06:26:47 @Arancio Sep 26 06:27:54 liuwenhao: minSdkVersion 16 targetSdkVersion 24 Sep 26 06:29:02 Do you have compileSdkVersion set? (I don't know if that would make a difference) Sep 26 06:29:24 what's the error, Arancio? Sep 26 06:31:53 alex_PP: for one, Android Studio is not able to find MathOperation anywhere Sep 26 06:32:23 Arancio: Don't know what you're doing "incorrectly" but I set my build.gradle on a fresh project up to look like this: http://pastebin.com/9UAZKngS Sep 26 06:32:51 Sorry, Guys. I'm an idiot Sep 26 06:32:55 Where do you see that error? If it is an IDE bug, I'd just restart AS. If gradle is the thing throwing a fit, something else is wrong Sep 26 06:33:02 Oh neat. What went wrong? Sep 26 06:33:28 I expected MathOperation to be a standard Java class/interface while it was just an interface from a tutorial I was trying to follow Sep 26 06:33:43 You guys can call me moron from now on. Sep 26 06:33:58 Thanks for your attention Sep 26 06:35:13 These guys are rewriting a Reddit bot in JavaScript. It used to be in Python. https://redd.it/53wq5c Sep 26 06:36:03 Node.js, ew Sep 26 06:36:24 they'll be rewriting it in Go soon Sep 26 06:36:38 Just keep it in Python, python is perfect for bots Sep 26 06:37:00 but GO is hip Sep 26 06:44:23 hello , so i made a program to get a certain number of prime numbers( first 100, or first 1000, etc.) . but as the numbers approach 10000 or 25000 , the program takes upto 1 minute for 10,000 . and around 3-4 minutes for 25,000. this is not good. how can i optimise my code further ? code-->https://gist.github.com/codeboy101/a1e334774fd226d36c6ac7d68db33b7f Sep 26 06:45:08 superKiller: you made me smile. Thanks! Sep 26 06:45:44 superKiller: Just for info, is this a JVM question or an Android question? Sep 26 06:46:36 http://introcs.cs.princeton.edu/java/14array/PrimeSieve.java.html Sep 26 06:46:58 superKiller: http://stackoverflow.com/questions/453793/which-is-the-fastest-algorithm-to-find-prime-numbers Sep 26 06:47:36 superKiller: and that's not an Android question. But if you have other jokes like that please post them in this channel for a laugh Sep 26 06:49:46 anyone using admob mediation? do you need to setup a loadAd method for each network you're working with or admob does all that load&serve magic for you? Sep 26 06:50:21 Reminder that your current company will outsource your job to this guy in the next 5 years http://i.imgur.com/XaFeRai.png Sep 26 06:52:01 sorry got disconnected Sep 26 06:52:22 superKiller: we answered to your question while you were disconnected Sep 26 06:52:46 oh im sorry can you paste that answer again please ? Sep 26 06:53:05 superKiller: Why are you building a list? That's gonna be massively slow. Sep 26 06:53:07 use a sieve Sep 26 06:53:52 superKiller: you made me smile. Thanks! Sep 26 06:53:56 superKiller: http://stackoverflow.com/questions/453793/which-is-the-fastest-algorithm-to-find-prime-numbers Sep 26 06:54:01 superKiller: and that's not an Android question. But if you have other jokes like that please post them in this channel for a laugh Sep 26 06:54:12 liuwenhao: FWIW, I was able to find him just by googling "buddies who jus". :D Sep 26 06:54:38 Arancio: joke ? Sep 26 06:54:52 TacticalJoke: what do you suggest doing then ? Sep 26 06:55:48 have your app email you when someone requests a list of prime numbers, then hand calculate how many they need and email it back to them Sep 26 06:56:10 superKiller: In that code, you could print to `stdout` without creating a list. Sep 26 07:01:33 Ultimately, though, I would google this, as suggested by the other two. Sep 26 07:01:44 superKiller: some googling got me this http://stackoverflow.com/questions/9625663/calculating-and-printing-the-nth-prime-number Sep 26 07:01:53 don't build your list before you display Sep 26 07:01:58 build your list as needed Sep 26 07:03:09 alex_PP: yeah im trying to implement this --> https://en.wikipedia.org/wiki/Sieve_of_Atkin Sep 26 07:05:34 ok Sep 26 07:06:04 but you can still do this asynchronously Sep 26 07:06:51 display list, start a thread to do the computation, on every new prime update the list Sep 26 07:08:27 Why create a list? Sep 26 07:09:43 isn't that how we're ouputting? Sep 26 07:09:55 He's just printing to `stdout`. Sep 26 07:10:12 oh yeah Sep 26 07:10:21 is this a euler puzzle? Sep 26 07:10:52 thought we were doing android Sep 26 07:10:53 silly me Sep 26 07:33:25 just print out the even prime numbers and youre half way done Sep 26 07:33:40 leave the odd ones to others Sep 26 07:51:52 using android studio, I'm changing the code in one of the classes, it builds and run on the phone, yet the don't seem to be being applied. Sep 26 07:54:06 turn off instant run or completely rerun your project Sep 26 07:55:04 yes after every run I close the app on my phone. Sep 26 07:57:09 nug700: That's not relevant here. He's talking about Instant Run. Sep 26 07:57:34 Instant Run seems buggy, and it causes the problem you're reporting. Sep 26 07:57:42 ah Sep 26 08:00:51 disabled it in setting, and restarted android studio. The change in that class is still not being applied, however. Sep 26 08:01:36 Build > Rebuild Project. Sep 26 08:03:58 what is the change Sep 26 08:04:53 a Log.i call Sep 26 08:05:16 right above one I added a while ago, that is being called. Sep 26 08:05:47 and no problems or filters in your logcat Sep 26 08:06:19 the rebuild didn't apply it. Sep 26 08:07:06 what is the log exactly. perhaps something silly Sep 26 08:07:53 well the exact call is "Log.i(LogTag, "LOADED: " + data.ToJsonStr());", but I'll replace it with something more simple just to be sure. Sep 26 08:08:22 and LogTag isnt empty? Sep 26 08:08:40 it's not empty. Sep 26 08:08:48 ok :v Sep 26 08:08:59 set to the package name. Sep 26 08:09:53 Try `throw new Error("It worked.");`. If that works, try `Log.i("Test", "Test");`. If that doesn't work, it's probably LogCat filters. Sep 26 08:11:50 the function in question: https://gist.github.com/nug700/fb014b8c515235f9f6f72949dd9bc7ac Sep 26 08:12:36 the very first Log.i shows, and data.Title one shows, but not TEST123 or LOADED Sep 26 08:13:04 the logtag is net.designjournals Sep 26 08:13:28 nug700: Try what I said above. Cuts straight to the chase. Sep 26 08:15:02 what's the function attribute that ignores the Sep 26 08:15:11 "unreachabe code" error Sep 26 08:15:23 unreachable* Sep 26 08:15:49 Easiest way is probably to comment out everything underneath. Sep 26 08:17:07 Ctrl + / does that, BTW. Sep 26 08:19:24 yea change isn't taking effect Sep 26 08:19:53 Is the app closing and restarting when you run from Android Studio? Sep 26 08:20:18 I close the app on my phone, then start the app. Sep 26 08:20:29 You don't have to close the app manually. Sep 26 08:20:42 Just hit Run in Android Studio. Sep 26 08:21:52 Who knows what's going on. Maybe you have the emulator running in the background, and it's deploying to the emulator rather than your phone. Sep 26 08:21:56 Could be a million things. Sep 26 08:22:23 well changes on other Activity classes are taking effect. Sep 26 08:22:40 just that specific file isn't updating. Sep 26 08:26:12 Is `SetItems` really being called? Perhaps you could keep throwing errors further up the call stack until you hit one. Also, make sure Instant Run really is disabled. Sep 26 08:26:54 Ctrl+Shift+A > "instant run" > Enter Sep 26 08:28:09 oh.... the first point. It isn't being called. I forgot I had another overload of SetItems Sep 26 08:28:55 Also note that you're using C#-style naming. Methods and fields should be in camelCase. Sep 26 08:29:08 Hi, Sep 26 08:29:23 TacticalJoke: says who? Sep 26 08:29:34 that's just *one* coding style Sep 26 08:29:40 doesn't mean everyone needs to follow it Sep 26 08:30:03 If you don't use camelCase for public methods, for example, then everyone who uses your code will dislike you. Sep 26 08:30:12 It's a well established Java convention. Sep 26 08:30:40 eeyup Sep 26 08:30:41 It's *the* Java coding style. There's no other. Sep 26 08:30:57 I can use whatever coding convention I want Sep 26 08:30:58 do jars in libs resolve in android manifest? Sep 26 08:30:58 well java language itself wont forbid it Sep 26 08:31:02 It's my project, not Oracles Sep 26 08:31:27 and i will use this instead of self in python because i like it Sep 26 08:31:54 I'm the only person on this project. 90% of the coding I do is in C#. trying to break my normal convention and use java convention would annoy me way to much. Sep 26 08:33:17 nug700: Android forces you to break the C# convention, like it or not. Sep 26 08:33:37 Well, not in your code. Sep 26 08:33:46 I mean when you're calling Android code. Sep 26 08:33:57 It's up to you though. Just being pedantic. Sep 26 08:36:47 yea.. just where I put the capatal is pratically a reflex. if I was on a project with more developers I would make the effort to follow the conventions. Sep 26 08:37:28 Before Android, I was mainly a C#/.NET developer. It did feel weird at first. Sep 26 08:37:36 Having to use String.equals was also weird. Sep 26 08:38:42 what got me was the diffence with the enums and not being able to use primitive types with List<> Sep 26 08:38:51 lol Sep 26 08:39:30 Enums are one place where Java is actually better than C#. Sep 26 08:39:38 Though C# wins practically everywhere. Sep 26 08:40:12 Kotlin is a Java replacement which is quite C#-like. Better than C# in a few ways (e.g., the handling of nullity). Sep 26 08:40:46 Kotlin runs on JVM? Sep 26 08:40:49 Yeah. Sep 26 08:40:54 It can be used for Android too. Sep 26 08:41:18 interesting, guessing setting it up with android studio is a bitch though. Sep 26 08:41:24 In Kotlin, the equality situation is nice: `==` is value equality and `===` is reference equality. Sep 26 08:41:51 Really easy, in fact. It's created by JetBrains, the creators of IntelliJ (which Android Studio more or less is). Sep 26 08:42:06 Though if you're new to Java and Android it might be easier to stick with Java; not sure. Sep 26 08:42:27 and I don't feel like redoing the whole thing, lol Sep 26 08:43:50 Java is the official language for Android dev, so it's always gonna be simplest to use. Sep 26 08:44:01 Kotlin is really interesting, though. I actually feel like it's a better C#. Sep 26 08:44:16 Not just a better Java. Kinda apples and oranges, but it definitely improves upon C#. Sep 26 08:44:54 yea, I did try the monodevelop android stuff. was a pain. Sep 26 08:45:16 as all the documentation is for java Sep 26 08:45:50 or have you tried xamarin Sep 26 08:45:52 Yeah, and the framework source is Java, too. Sep 26 08:46:02 Ashiren: yea, that's what I meant Sep 26 08:46:16 oh Sep 26 08:46:17 The upcoming compiler for Android (Jack) is both written in Java and a Java compiler. Sep 26 08:46:37 java compiler written in java? Sep 26 08:46:42 They're gonna ditch javac and roll their own, for faster builds and maybe other stuff. Sep 26 08:46:46 what was first compiler ever written in Sep 26 08:47:51 https://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29 Sep 26 08:48:03 I think javac was first written in C, and then Java. Sep 26 08:48:12 Maybe that's why it's called javac. :D Sep 26 08:48:14 mhm Sep 26 08:58:51 There a way to get the opened activity? Sep 26 08:59:43 the one that's being viewed. Sep 26 09:09:03 Jack is upcoming? I'm using it now... Sep 26 09:12:14 javac = java compiler like cc = C compiler Sep 26 09:17:33 For some unknown reasons using Stream#map requires API 24 Sep 26 09:17:42 When running the SDK manager (aka android) to upgrade the package "Android SDK Tools", the SDK manager is emptying the folder android-sdk-linux/tools where itself is located. Have anyone else experienced this issue? Sep 26 09:18:04 Fuck Android Sep 26 09:19:36 well streams are from java 8, and java 8 starts within api24 Sep 26 09:32:03 Arancio: having a bad week, are we? Sep 26 09:32:32 Ashiren: I don't understand what the java language version and the java library version have anything to do with the Android API version. I'm not trying to pass a stream to an Android API method (the compiler would prevent me to do that anyway). Sep 26 09:36:04 Is there a method in RxJava to collect an Observable into a List. I'm not talking about toList() which does Observable -> Observable> Sep 26 09:36:23 That was a question? Sorry Sep 26 09:37:30 I'm looking for the inverse of Observable.from() Sep 26 09:42:28 Arancio: well if the Android version doesn't have Java 8 installed, then how could it use those methods? Sep 26 09:42:43 and classes, etc Sep 26 09:43:41 Java 8 could be installed as part of the process of installing your app as we do on desktop computers Sep 26 09:46:20 The answer is observable.toList().toBlocking().single(); Sep 26 09:46:52 the part I was missing is toBlocking() Sep 26 09:47:14 java is an essential part of the the Android firmware. on desktop computers it is an extension. so it makes sense they would update it with the rest of the firmware. Sep 26 09:49:47 nug700: I guess my problem is that with API 24 they mean "Runtime 24" (VM + class library, with its API), which is what you said. They should not misusing the word API. Sep 26 09:52:45 but thats what has been since the beginning ~ Sep 26 09:52:50 they probably do that because they all update together, with the most relevant (to the app developers) changes being to the actual API Sep 26 09:52:54 nug700: Android is a flavor of Linux + the vm + the libraries. There is no reason why a version of that flavor of Linux could not run multiple versions of the vm, running multiple versions of the libraries (with API xx, API yy, etc.). They just didn't do it Sep 26 09:53:35 Anyway thanks for clarifying this concept to me Sep 26 09:55:19 ey. Sep 26 09:55:22 night night o/ Sep 26 09:55:26 night Sep 26 10:03:11 Im getting a "no hit" on my analytics Sep 26 10:03:21 does anyone know how to track this down? Sep 26 10:18:53 Is there anything in particular I need to do to disable my app from Android TV or Wear? or is that done by default? Sep 26 10:19:32 you need to do if you want your app on tv or wear Sep 26 10:19:53 Ashiren: I don't want it on TV or wear, so I don't have to do anything to block those devices? Sep 26 10:20:31 eeyup Sep 26 10:20:40 cool :) Sep 26 10:20:42 for wear it would need something like uses-feature wear Sep 26 10:21:18 for tv dunno, but doubt app would work out of the box Sep 26 10:21:37 OK, that's good Sep 26 10:22:40 another thing - if I want to keep the screen on only for a certain action, I presume I can just call: getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); Sep 26 10:22:49 what would be the opposite of that - to allow the screen to turn off? Sep 26 10:23:41 oh, removeFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON) Sep 26 10:24:08 hmm, removeFlags isn't a method on getWindow() Sep 26 10:24:20 clearFlags Sep 26 10:24:27 aaah Sep 26 10:24:50 that's cool :) Sep 26 10:26:02 try wakelock if you can Sep 26 10:26:06 sdousley, https://developer.android.com/training/scheduling/wakelock.html#screen Sep 26 10:26:37 wakelock for screen is deprecated Sep 26 10:26:57 partial wakelocks are for cpu only Sep 26 10:27:19 oops indeed Sep 26 10:27:20 * adq runs Sep 26 10:28:14 adq: that's where I read about getWindow()... Sep 26 10:28:24 yeah, my bad, totally confused Sep 26 10:29:28 oh, did that page used to have info on how to do it with a WakeLock like the CPU then, rather than getWindow().addFlags() Sep 26 10:32:39 nope, this page on the contrary does, sdousley: https://developer.android.com/reference/android/os/PowerManager.html Sep 26 10:34:45 hello sirs. im doing an app with a company on the style of "DYI" (do it yourself) and to publish it on my name I have to give them 4 things: keystore file url, password, alias name and password. the alias name is the name of my app, but the other 3 fields I don't have a clue on how to get it. I've Android Studio but it's designed to create apps, not to get this things only. am I making Sep 26 10:34:45 sense? any help would be welcome. Sep 26 10:38:44 you need keystore Sep 26 10:39:22 Build -> Generate signed APK, there will be button for creating new keystore Sep 26 10:39:42 you're talking on the android studio, right? Sep 26 10:39:42 keystore requires password, then it can contain several aliases, each protected by its own password Sep 26 10:40:11 each alias contains key which you (or the company?) use to sign a release version of apk Sep 26 10:40:12 adq: fair enough, I'll stick with the getWindow() that's working perfectly :D Sep 26 10:40:12 ruicruz, https://developer.android.com/distribute/googleplay/start.html & https://developer.android.com/studio/publish/index.html Sep 26 10:40:14 yes Sep 26 10:43:33 adq, first link is done, i've (the company) a dev account. the second link points to "build *my* app" but i've done it with appnotch, witch is a do it yourself, and at the end then only ask me for this 4 values I talk earlier. my question is if I can generate them from android studio, since I do not have the app (the "code") because i was not the one who created it. Sep 26 10:44:03 that was a question... -> ? Sep 26 10:44:04 :p Sep 26 10:45:00 ruicruz, check the sub articles of the first link, like the last one "sign your app", but basically Ashiren explained to you already Sep 26 10:45:31 they want the keystore and the credentials associated to the key of your app so they can resign it, it seems Sep 26 10:45:50 are they modifying your apps or something? Sep 26 10:46:45 you can generate from AS by the way, when you do "generate signed apk" Sep 26 10:47:28 ah, got it adq. found out just now that Ashiren is talking after creating a project. :) i think im in the right path Sep 26 10:47:40 they are not modifying it, they're literaly "creating it" Sep 26 10:47:48 uh ok Sep 26 10:48:20 ok, will go from here and see if I have any more questions. but to the both of you, a big thank you! :) Sep 26 11:05:19 how to print print string value and the update string value in the textview Sep 26 11:36:53 effin admob mediation Sep 26 11:53:00 Hi, does people know why android studio default install pull qt5.5 ? Sep 26 11:53:14 tools/lib64/qt/lib/libQt5*.so (on linux x86_64) Sep 26 12:03:51 Hi all, I need some help with a very basic problem, that after a lot of search I still can't resolve. Any help would be appreciated Sep 26 12:04:11 I'm importing some custom libs in my project and some of them use SLF4J Sep 26 12:04:33 custom libs are java jar libs Sep 26 12:04:53 when I deploy and run my app on a phone I get the following exception Sep 26 12:04:54 java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory Sep 26 12:05:10 I have deliberately not packaged any dependencies in my custom lib jars Sep 26 12:05:30 and have added the slf4j and logback dependencies in my build.gradle Sep 26 12:05:57 but I just can't understand why the apk doesn't include the slf4j and logback jars Sep 26 12:09:18 ayor: are you using gradle? or just standard building? Sep 26 12:10:23 sdousley, for my java libs, i'm using maven for android i'm using gradle Sep 26 12:11:47 sdousley, in intellij, I do see that logback and slf4j have been imported corrected (external libs) Sep 26 12:12:03 and I also double checked that the LoggerFactory class is there Sep 26 12:12:34 but for some reason when I deploy the apk on my phone, the packaging seems to not include the jars Sep 26 12:13:28 I managed to get it working only once, and I can't remember what task I ran in gradle, and I have tried running the lifecycle tasks Sep 26 12:13:42 both from the root build.gradle and from the build.gradle in the app module Sep 26 12:14:02 my app, which I have in IntelliJ, builds fine, and includes the libs that are defined in build.gradle. Sep 26 12:14:04 assembleDebug and assemble, build clean etc .. Sep 26 12:14:09 that pulls stuff in from Maven repo's Sep 26 12:14:48 yes, so my other custom libs that are deployed in my local repo are correctly imported, the problem is with this slf4j and I just can't get it to work Sep 26 12:14:54 lost soo much time on this Sep 26 12:18:40 sdousley, have you created and android application configuration and selecting your main class, and device to deploy? Sep 26 12:19:01 sdousley, or are you using a gradle task manually to install? Sep 26 12:19:30 sdousley, deleted my .gradle dir hoping it was a cache problem but that didn't help either Sep 26 12:26:26 hi Sep 26 12:26:57 Is it bad practice to do things which affect the view/routing outside Activities? - http://stackoverflow.com/q/39702070 Sep 26 12:30:00 AlecTaylor: if you want to remove that kind of code from that class maybe you could inject a callback so that that class is unaware of what will happen in that condition. Sep 26 12:30:25 I dont' see anything wrong with what he's doing Sep 26 12:31:01 Arancio: I know I CAN do it, I want to know if I SHOULD do it Sep 26 12:31:03 It might be confusing to whatever might get the super() call, but I can think of no other likely sideeffect Sep 26 12:31:08 er can't think of Sep 26 12:31:18 @#!$@# too much morning not enough caffiene Sep 26 12:32:09 Arancio: Or if I should explicitly push all `setText` and `startActivity` style invocations to the class that extends from Activity Sep 26 12:34:28 I don't think that's would be the correct reason to relocate that functionality Sep 26 12:35:07 AlecTaylor: what that class do? Sep 26 12:35:45 AlecTaylor: what does that class do? Does it make sense for it to know about a setting text in a view or about an Activity? Sep 26 12:35:47 Arancio: So I might have a LoginActivity.class which extends AppCompatActivity and handles stuff Sep 26 12:36:12 That's what I'm trying to figure out, common design principles for doing this Sep 26 12:37:19 AlecTaylor: if I make a networking class I expect it to do networking on every computer computer supporting the networking stack that I'm using. Nothing else. It should be usable for a command line utility or from a Windows application (provided it has the right libraries). I would remove the UI code from it for those reasons Sep 26 12:37:20 I suspect it would make more sense to have the code in it's own method, and just call _that_. I'm not sure why you'd be _wanting_ to call startActivity in a class but passing arguments to it via Intent Sep 26 12:38:17 That piece you could call from the onCreate of the Activity to catch the intents Sep 26 12:38:41 er... other way around. Catch the intents in onCreate and pass them to the function as args Sep 26 12:38:52 ayor: I just use Shift-F10 in IntelliJ and it builds/deploys to my phone plugged in via cable. Sep 26 12:39:27 ayor: maybe if you could pastebin your app level build.gradle Sep 26 12:42:04 Dagmar, Arancio: Yeah that's what I suspected. So in my 401 catcher I should just return that tuple? Sep 26 12:42:21 Heck you can pass it over as a bundle if you like Sep 26 12:42:21 PS: Can one of you add that as an answer so I can accept? Sep 26 12:42:38 Dagmar: Of course I can, the question is SHOULD I, not CAN I Sep 26 12:43:12 There's not a lot of sense in calling startActivity from within the same Activity, since the arguments you can pass it are fixed and everything else involves some overhead Sep 26 12:43:32 AlecTaylor: either your method returns an error condition, if it can. If it's an internal method it should invoke a callback. (I don't have a SO account) Sep 26 12:43:53 You can certainly call thingWotDoesSomethingWithTheResponse() from both startActivity and anything else in the package Sep 26 12:45:26 I'm still trying to work out precisely why startActivity might be called unless the activity is actually starting Sep 26 12:46:39 Ugh. I *really* need to ingest this freakin' caffeine. Scratch what I just said. The verbiage of the question was throwing me Sep 26 12:48:16 Things i said which _weren't_ insane... startActivity is pretty much normally _how_ you pass intents to an Activity, and it doesn't matter WTF you call it from Sep 26 12:48:42 There's simpler ways to do it if you're trying to have the Activity call _itself_ tho Sep 26 12:49:37 I call context.startActivity from classes which don't extend anything. There's no issue with it Sep 26 12:50:21 Yeah well this is the first time I've called startActivity from outside the Activity class Sep 26 12:50:43 Dagmar - And my suspicion is that I'm not meant to call it outside the Activity class, because it breaks some design principle Sep 26 12:50:43 ...of course they're starting _other_ Activities, not anything inside the same package at all. There's broadcast receivers and so on for _that_ kind of thing Sep 26 12:51:03 AlecTaylor: How? startActivity is literally how you launch new activities Sep 26 12:51:39 Dagmar: But should I be returning an Intent from this utility function, and actually call startActivity from the Activity class? Sep 26 12:51:41 hi, so I'm using AndroidStudio, I create a new android project, then Add Module > Android Library, they're both separate, I add a class to my library, how do I use it in my app? Sep 26 12:51:53 Dagmar: Or is it okay to call it from the utility function? Sep 26 12:52:02 Like a button that the user pushes to launch another application... Doesn't need to be in a class that extends anythinhg... it just needs a launch intent attached and off you go Sep 26 12:52:58 It's okay to call it from anywhere, including a Service, or some random class common to your package as far as I know Sep 26 12:53:18 it's not defined Sep 26 12:53:24 Dagmar: So it's not breaking the 'Google book of design' principle? Sep 26 12:53:28 and I can't import a package? Sep 26 12:53:36 (or whatever) Sep 26 12:53:44 I mean Sep 26 12:53:55 Considering that the Google docs are where I learned how to launch things with intents and the example was doing it in a "plain" class? I think it's pretty fine Sep 26 12:54:15 My main app is com.name.mainApp, while when I added the new module of the android library, it created the package com.name.myLib Sep 26 12:55:21 I'm simply following a tutorial step by step but I can't call my method from the library class Sep 26 12:55:23 https://xinyustudio.wordpress.com/2015/12/31/step-by-step-guide-for-developing-android-plugin-for-unity3d-i/ Sep 26 12:56:28 "In the Helper class add a function DoSthInAndroid()" this one I can't call from the main app Sep 26 12:56:47 Didja make it public? Sep 26 12:56:54 Yeah Sep 26 12:56:57 Probably a dumb question Sep 26 12:57:01 Here's my layout Sep 26 12:57:30 http://puu.sh/roohK/6f621d412f.png Sep 26 12:59:11 sdousley, yes, that's how I do it too. I'll send over the build.gradle link in a bit, trying something brb Sep 26 12:59:42 ranbox2d: in your main app gradle Sep 26 13:00:21 do you have compile project(':the_created_module') Sep 26 13:01:32 ranbox2d: That _should_ be working as far as I can tell Sep 26 13:01:39 I don't think so Ashiren Sep 26 13:02:00 then likely your main app doesnt see the module Sep 26 13:02:08 Only thing I can think of that would break it is if the other jar wasn't landing in the apk Sep 26 13:02:20 it should be under dependeencies {, under compile fileTree(...) Sep 26 13:02:56 compile 'com.name.mylib' Sep 26 13:03:02 add this line to dependencies? Sep 26 13:03:42 It wasn't in there already? Sep 26 13:03:57 no? Sep 26 13:04:00 Should it be? Sep 26 13:04:19 I just right clicked my main app and added the android library module Sep 26 13:04:38 add compile project(':gallery') Sep 26 13:04:43 replace gallery with name of your module Sep 26 13:05:14 sync gradle and see the magic Sep 26 13:06:30 wow, thanks! Sep 26 13:06:31 How can I check if a string variable is blank? I'm trying if(var.equals("")) but getting exception "Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)'" Sep 26 13:06:50 I think you just saved me from falling in a very deep hole of frustration later on Sep 26 13:08:28 sdousely: On a null object reference? Sep 26 13:08:35 sdousley, here you go http://pastebin.com/qtPeYU7t Sep 26 13:09:14 sdousley: if (var == null Sep 26 13:09:31 sdousley: if (var == null || var.isEmpty()) Sep 26 13:09:33 cant get dis admob mediation to show ads, any one stumbled onto this behavior? error code 3. Sep 26 13:10:01 Ashiren: ah ok, I don't know why I did the .equals("") that works elsewhere on a string, maybe I'll change them all Sep 26 13:10:21 raoul11: Are you using Android Studio's template for AdMob? ...because it doesn't really do what it's supposed to do Sep 26 13:10:29 nope Sep 26 13:10:35 did firebase instructions Sep 26 13:10:39 sdousley, a good practice is always to use "".equals(var) paradigm, that way you avoid NPE Sep 26 13:10:53 Ashiren: hmm, that still doesn't help. Sep 26 13:11:25 sdousley, "".equals(var) works Sep 26 13:11:28 ayor: I'm not so sure on your issue looking at that. Sep 26 13:11:33 if i do addTestDevice am getting error 0 /: Sep 26 13:11:35 I'm just testing "".equals() :) Sep 26 13:12:04 sdousley, not sure i'm following you here, you're testing the equals method of the String class? Sep 26 13:13:06 ayor: the problem I have is that I have a value, which I need to get programatically Sep 26 13:13:10 but I only want to do it once Sep 26 13:13:31 so I initiate it as a class property: private String var = ""; Sep 26 13:13:39 so I want to update it only if it's "" Sep 26 13:14:04 now, the first few times it may still be blank, but eventually it will contain a value, which I want to store Sep 26 13:14:27 it may become null Sep 26 13:14:32 your "".equals(var) stopped the exception, but it's still not dropping in there Sep 26 13:14:35 and you cant do null.equals(...) Sep 26 13:14:56 ah yeah, it is getting null, cos I see "null" in the outout Sep 26 13:14:57 so I could do Sep 26 13:15:00 sdousley, in that case you should be fine with if("".equals(var)) { var = "set some value"; } Sep 26 13:15:00 Well... you *could* but it would be silly Sep 26 13:15:06 if("".equals(var) || var == null) Sep 26 13:15:33 if you showed me your code, I could suggest a better alternative Sep 26 13:16:09 what you wrote would work Sep 26 13:16:15 TextUtils#isEmpty checks both null and empty string Sep 26 13:16:20 ok, the if("".equals(var) || var == null) works :) Sep 26 13:16:50 SimonVT: oh, ok, so if(var.isEmpty()) would cover that? Sep 26 13:17:12 No, TextUtils#isEmpty Sep 26 13:17:15 sdousley, the question is do you want to bring a lib dependency just for that method? Sep 26 13:17:30 ayor: not really if possible. Sep 26 13:17:44 I guess I'll just stuck with the "".equals(var) || var == null Sep 26 13:17:58 What lib dependency? Sep 26 13:18:00 since that seems to work fine Sep 26 13:18:30 sdousley: afaik you need to check for null first Sep 26 13:18:51 ...or not at all in that case Sep 26 13:19:24 I really expected to see my test code give me the finger. apparently equals() checks for that Sep 26 13:19:58 SimonVT: ok, so it'd be if(TextUtils.isEmpty(var)) { Sep 26 13:20:15 that works perfectly :) Sep 26 13:20:17 Yep Sep 26 13:20:23 what does "IllegalStateException: Expected BEGIN_OBJECT but was NUMBER at line 1 column 3 path $ Sep 26 13:20:24 " Sep 26 13:20:24 plus, it's one thing in the if() which (where possible) I always prefer Sep 26 13:20:48 am getting it as the msg in onFailure for a retrofit response Sep 26 13:21:16 The json doesn't match your model Sep 26 13:21:20 oh Sep 26 13:21:27 Or rather, the other way around Sep 26 13:22:25 gonna ditch this shitty mediation Sep 26 13:24:08 it's always a pleasure with AS: http://imgur.com/a/RdfUS Sep 26 13:26:17 Another week in the wonderful world of Android development has begun Sep 26 13:27:50 SimonVT, this is my model and output http://hastebin.com/xanumidamu.cpp Sep 26 13:28:09 obviously with getters/setters Sep 26 13:28:17 but left them out cos thats obvious Sep 26 13:30:26 oh wait, Sep 26 13:31:42 hm Sep 26 13:32:19 SimonVT, ahh yes TextUtils, is part of Android, that's good, yes no extra lib Sep 26 13:32:45 Maybe the issue is your ints that are really strings in the xml? Sep 26 13:33:06 has anyone had a problem where they tried to deploy an apk on a device and got a no class def found error? Sep 26 13:33:12 Might need a typeadapter for that Sep 26 13:33:27 i'm getting this for SLF4J and I just can't see what the problem is Sep 26 13:35:00 oh, no i fixed thsat just then that was my hmm but the issue is still happening. the last int (group_author_id) is now a string Sep 26 13:35:02 s/xml/json/ Sep 26 13:35:10 needs to be a string cos the id has letters Sep 26 13:36:15 Did you see in the last Android Studio, in the preview you can choose the Pixel C as device? Sep 26 13:39:05 ayor: First make sure it's actually included in the apk, then take a look at logcat when you launch your app. If it's being evicted for some reason (e.g. using classes/language features not available on Android) it should log it Sep 26 13:40:26 hi Sep 26 13:40:35 how i can add a ripple effect in tab layout? Sep 26 13:40:39 t0th_-_: hi! Sep 26 13:41:10 t0th_-_: https://developer.android.com/reference/android/graphics/drawable/RippleDrawable.html Sep 26 13:41:26 t0th_-_: http://guides.codepath.com/android/ripple-animation Sep 26 13:46:01 SimonVT, that's the problem, it's not adding the slf4j jar Sep 26 13:47:01 lol super dumb question.. what is the first param in FragmentTransaction beginTransaction? ft.add(_____, frag); Sep 26 13:51:29 thornekey: int Sep 26 13:51:37 the container's id Sep 26 13:53:26 oh right Sep 26 13:55:47 Ashiren, i tried that but the fragment doesnt add/show :( http://hastebin.com/ecosokaquv.java Sep 26 13:57:49 hey again Sep 26 13:58:05 i want to minify my project using Proguard Sep 26 13:58:18 but i use a external library and it complain about some missing class Sep 26 13:58:34 i want to use "-dontwarn" option for proguard, where to put it? Sep 26 14:03:47 DelphiWorld: I have no idea Sep 26 14:04:02 Arancio: no problem ;-) Sep 26 14:05:18 DelphiWorld: What application are you working on? Sep 26 14:05:29 Arancio: Live TV Sep 26 14:06:14 DelphiWorld: TV for blind people Sep 26 14:06:15 ? Sep 26 14:09:50 Arancio: yes, do you forbid me from watching documentarys? Sep 26 14:11:12 DelphiWorld: isn't radio more useful? Sep 26 14:11:23 Arancio: yeah, but subject mather too Sep 26 14:11:36 nicely narated documentary is also awesome Sep 26 14:11:36 DelphiWorld: it just seems a bit hard to develop a beautiful UI when one can't see it Sep 26 14:13:11 justJanne: it's a command line TV for blind people Sep 26 14:13:34 >list channels Sep 26 14:13:35 justJanne, develope for both sighted & blind people, dont rely on images only. add captions to buttons and so on Sep 26 14:13:42 my fragment wont show :( Sep 26 14:13:51 i am blind, but my app isn't destined to blind only Sep 26 14:13:54 >set volume 50 Sep 26 14:14:35 Arancio: you think blind people use only command line? :-P Sep 26 14:14:50 DelphiWorld: I was being idiot Sep 26 14:15:12 take a look at TalkBack Sep 26 14:15:27 DelphiWorld: I sometimes even remember to set accessibility strings Sep 26 14:15:39 also there's an awesome screen reader (Chine+) Sep 26 14:15:48 haha Sep 26 14:16:03 DelphiWorld: when Android Studio complains about the lack of them them Sep 26 14:16:16 cool Sep 26 14:16:27 it gives warnings now Sep 26 14:16:33 cool Sep 26 14:16:44 google also i think ofer a accessibility guidance Sep 26 14:17:26 any playstore publishing guide? Sep 26 14:19:12 Thankfully I'm usually doing stuff blind people would have zero interest in, so I tell it to ignore the lack of content descriptions pretty readily Sep 26 14:21:11 Dagmar: what's the content ? Sep 26 14:21:33 is anyone able to use the latest android plugin for gradle? com.android.tools.build:gradle:2.1.3 Sep 26 14:22:54 I have updated to the latest android plugin and updated gradle/wrapper/gradle-wrapper.properties to use the latest gradle version Sep 26 14:23:49 but it complains about all type of incompatibilities Sep 26 14:26:12 Error:Cause: org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection Sep 26 14:26:13 no idea, but i can tell you the latest is 2.2.0, not 2.1.3 Sep 26 14:26:22 Same here. Sep 26 14:26:41 I can say that AS complains *egregiously* every single time Gradle is upgraded Sep 26 14:27:02 adq, thanks didn't realize that, let me check with that version Sep 26 14:27:16 Not actually having the latest gradle may well be the reason it's carping so much Sep 26 14:27:21 and inside gradle-wrapper.properties, it's distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-all.zip Sep 26 14:27:33 adq, yes that what I have set it to Sep 26 14:27:39 maybe you are mixing up the gradle plugin for android and gradle itself Sep 26 14:27:46 and in intellij gradle setting I have set it to use the default wrapper Sep 26 14:27:52 (which is not really your fault, due to how ambiguous they are presenting both of them) Sep 26 14:28:18 adq, no actually I'm not mixing it up, I just thought it was the latest, I should have gone on the website to double check Sep 26 14:28:27 I've got 2.14.1-all.zip for distributionUrl in there. AS picked it and it seems to work Sep 26 14:29:01 Dagmar, thanks, will revert to that one if it doesn't work, that's what was suggested as a hint in intellij that 2.14.1 was the minimum version Sep 26 14:29:42 I try my best to touch gradle as little as possible considering that it's been one of those things that sort of emits smoke and sparks when AS updates itself Sep 26 14:30:34 At least once I've had to spend a half hour just trying to get something into a state where it compiles again because I hadn't pulled it up in so long and apparently gradle doesn't gracefully upgrade it's toys between some of the versions Sep 26 14:32:56 Dagmar: no answer? Sep 26 14:38:39 sigh .... Could not find method org.slf4j.LoggerFactory.getLogger, referenced from method .... Sep 26 14:39:00 ayor: i upgraded to the gradle suggested (2.2.0 Sep 26 14:39:09 that adq corrected Sep 26 14:39:11 although I have a dependency set on logback and slf4j (in build.gradle) the jars are not added to the apk Sep 26 14:39:12 work here Sep 26 14:39:40 DeadRinga, I'm using 2.1.0, with 2.2 it's complaining on a major minor 52 version for me, I tried java 8 and 7 but to no avail Sep 26 14:39:53 DelphiWorld, I'm using 2.1.0, with 2.2 it's complaining on a major minor 52 version for me, I tried java 8 and 7 but to no avail Sep 26 14:40:06 i'm waiting for build to finish Sep 26 14:40:08 for now its going ;) Sep 26 14:40:25 DelphiWorld, then you should be fine, it complained from the get-go for me Sep 26 14:40:48 why doesnt this display my fragment? http://hastebin.com/ecosokaquv.java Sep 26 14:41:45 You don't commit Sep 26 14:42:04 derp Sep 26 14:42:29 hey there. i'm tring to generate a .keystore file but I end up with a .jks file. is there any diference in both? I did read that there is and also that there is not in stackoverflow, so... not sure what is the right anwser. Sep 26 14:42:59 Java Keystore Sep 26 14:43:30 It's perfectly reasonable for a keystore to have a jks extension Sep 26 14:43:56 ruicruz, jks means java key store Sep 26 14:44:02 Frankly you can name it whatever you like Sep 26 14:45:19 i use .key Sep 26 14:45:26 ok, got it Dagmar and ayor Sep 26 14:45:56 Arancio: do you have a tablet? Sep 26 14:46:16 DelphiWorld: sorry, no Sep 26 14:53:17 built my own minimediation instead of admob with a pretty simple json files. is there anywhere i can host it (in the rare case it will get hit a lot)? Sep 26 14:53:30 like a firebase service Sep 26 14:54:53 http://www.androidpolice.com/2016/09/26/exclusive-google-is-planning-a-pixel-3-laptop-running-the-andromeda-os-for-release-in-q3-2017/ Sep 26 14:55:13 "merging Chrome features into Android, not vice versa" Sep 26 14:55:30 raoul11: dont use amazon Sep 26 14:55:54 not planning to (: Sep 26 14:56:00 good Sep 26 14:56:08 amazon isn't easy in term of cost Sep 26 15:10:03 Why Andromeda OS? Isn't Android perfect? Sep 26 15:11:48 How many OS does Google have? Four? Sep 26 15:12:16 Android, Chrome, Andromeda and that other LGBT OS thing Sep 26 15:15:11 * DelphiWorld slap Arancio with a Dual CPU 10 inch tablet Sep 26 15:15:11 :P Sep 26 15:15:45 Only two cores? Sep 26 15:16:00 My smartphone is more powerful Sep 26 15:16:31 I must admit that 10 inches hurt more though Sep 26 15:18:01 didnt say two cores, Arancio but two CPU Sep 26 15:18:04 :P Sep 26 15:20:27 What's the reason for slapping me with your tabled for rich people? Sep 26 15:21:16 haha Sep 26 15:21:23 Guys, DelphiWorld has a two CPU 10 inch tablet! Applause, please! Sep 26 15:21:49 * DelphiWorld have a 5inch wiko phone and a 7Inch huawei mediapad tablet Sep 26 15:23:57 ok, you have 3 mobile devices. Not to mention 3 screen that you can't see. You could have purchased screen-less devices and save money, by the way Sep 26 15:24:17 that's, extreme Sep 26 15:24:55 crippled dev work? not if I don't have to Sep 26 15:25:29 Seriously, would a screen-less smartphone be good for a blind person? Sep 26 15:26:13 no, accessibility code still needs touchevents Sep 26 15:26:16 Arancio: there's a new glasses for blind people Sep 26 15:26:23 i keep getting a nasty black screen each time the app is started newly Sep 26 15:26:30 * DelphiWorld give 5Stars to capella-5x Sep 26 15:26:36 any idea for possible causes? Sep 26 15:27:06 * capella-5x did a year of a11y work ☺️ Sep 26 15:27:23 some of it useful 😉 Sep 26 15:27:31 yeah but without screen a device would cost less and consume much less Sep 26 15:28:34 are you that price sensitive atm arancio? that's some penny pinching Sep 26 15:28:49 Is it normal that a state list drawable does not honor the selected state? Sep 26 15:29:03 for your code, yes Sep 26 15:29:08 for example i dont mind to pay a iPhone7 because VoiceOver ofer hell load of functionality Sep 26 15:29:11 heh, snark Sep 26 15:29:19 -.- Sep 26 15:29:27 😙 Sep 26 15:29:35 but i mind paying for a big android phone cause TalkBack is still new and dont ofer much Sep 26 15:30:01 thought talk back was the standard iirc Sep 26 15:32:00 capella-5x: there really was a bug in my code, actually. Thanks Sep 26 15:32:26 Idiosyncratic: hi, idio! Sep 26 15:32:30 oh, 😊 knew you'd find it Sep 26 15:32:31 capella-5x: TalkBack was the first screen reader for android Sep 26 15:32:35 Arancio: hey Sep 26 15:32:51 Idiosyncratic: how are you, idio! Sep 26 15:33:20 Arancio: fine, I guess :D Sep 26 15:33:22 delphiworld right Sep 26 15:33:24 We missed you, idio! Sep 26 15:33:25 Idiosyncratic: Interdata In & out Sep 26 15:33:46 capella-5x: now there's another great one called "Chine+" Sep 26 15:33:57 Does anyone know what is the chat for Windows Universal development? Sep 26 15:34:00 but in term of Text to speech, Go away google! Sep 26 15:34:08 Arancio: after a whole day? Man, I must be something :P Sep 26 15:34:15 til! Lost track after I moved out of that code Sep 26 15:34:32 kelio: ##csharp ? Did they kick you out? Sep 26 15:34:49 Haha Sep 26 15:35:02 raoul11: hi hi Sep 26 15:35:07 just got back from droidcon Sep 26 15:35:08 Idiosyncratic: You actually are idio! Sep 26 15:35:25 <_genuser_> hello epople Sep 26 15:35:31 hi hi Sep 26 15:35:47 kelio: they usually talk about everything remotely connected with C# in that channel Sep 26 15:35:56 kelio: I was not joking Sep 26 15:36:09 push push thepoosh ! Sep 26 15:36:24 kelio: I assume you'll use C# to make your application Sep 26 15:36:24 I thought there was a more specific chat to UWP Sep 26 15:36:27 DelphiWorld: you have nothing to say with your ancient language nick Sep 26 15:36:30 Yes I will. Sep 26 15:36:38 so go there Sep 26 15:36:40 But my question is mainly related to Windows Phone 10 API. Sep 26 15:36:48 wut Sep 26 15:36:50 Ask there anyway Sep 26 15:37:01 haha thepoosh... do you think your RTL language will save you? Sep 26 15:37:16 haha Sep 26 15:37:24 thepoosh: expect a rocket now Sep 26 15:37:25 at least you're not AdaWorld Sep 26 15:37:31 or PascalWorld Sep 26 15:37:42 i am Jerusalem world Sep 26 15:37:47 YEAH!!! Sep 26 15:37:54 actually in jlm as we speak Sep 26 15:38:05 my only dream is to visit it Sep 26 15:38:24 well, you're invited Sep 26 15:38:47 yes; but who will open me the border? my nationality is refused... ;) Sep 26 15:39:36 DelphiWorld: what nationality are you? Sep 26 15:39:57 Idiosyncratic: some country that maybe everyone hate Sep 26 15:40:04 thepoosh Sep 26 15:40:07 how was it Sep 26 15:40:13 DelphiWorld: mine? Romania?! Sep 26 15:40:32 Idiosyncratic: if i was romanian, i will danse Sep 26 15:40:39 romania is the leader in Voice over IP Sep 26 15:40:43 raoul11: half was good, other have was god aseful Sep 26 15:40:46 aweful Sep 26 15:40:52 lol Sep 26 15:40:57 do tell Sep 26 15:41:20 DelphiWorld: really now, what's your nationality? I'm curious Sep 26 15:41:33 there was a very interesting talk about doze mode, and a super bad talk about asyn Sep 26 15:41:34 Idiosyncratic: algerian Sep 26 15:41:36 *async Sep 26 15:41:44 DelphiWorld: cool Sep 26 15:41:48 by people who had no idea what they were talking about Sep 26 15:42:03 DelphiWorld: would love to visit North Africa Sep 26 15:42:07 ran did his bit on firebase? Sep 26 15:42:21 nah, ran spoke about recyclerview Sep 26 15:42:24 was kinda meh Sep 26 15:42:26 whaaat Sep 26 15:42:36 thats a bit weird Sep 26 15:42:39 DelphiWorld: North Africa is best Africa Sep 26 15:42:42 mostly because I already knew everything and he was not really into talking today Sep 26 15:42:58 there was a guy talking about DI Sep 26 15:43:04 i wasted all day with admob mediation Sep 26 15:43:18 DelphiWorld: by the way, I set all content description strings to R.string.default_content_description which is set to "Delphi sucks" Sep 26 15:43:20 gaveup and wrote a minimediaiton model of my own Sep 26 15:43:21 it was interesting material which was delivered by the most boring person alive Sep 26 15:43:43 how many people were there? Sep 26 15:43:47 hey Idiosyncratic you're welcome at any time Sep 26 15:44:19 hmmm Sep 26 15:44:25 about 350 Sep 26 15:44:35 thats a bit low isnt it? Sep 26 15:44:54 last big mobile TA conf i been to in ta was about 1500 Sep 26 15:46:02 DelphiWorld: yeah Sep 26 15:46:07 i see Sep 26 15:49:27 is proguard alone enough to protect against reverce enginiring? Sep 26 15:49:49 no Sep 26 15:50:03 what else so Sep 26 15:50:16 nothing will protect you 100% Sep 26 15:50:29 i didnt say 100% Sep 26 15:50:53 you are 100% someone will not read your code only if they are blind Sep 26 15:50:59 100% sure Sep 26 15:51:08 Arancio: i am not joking. Sep 26 15:51:26 name all your classes, methods, variables whatever as randomshit Sep 26 15:52:03 raoul11, that's what proguard does ;) Sep 26 15:52:05 raoul11: if i transform a JSON to a java object, will someone be able to get it content? Sep 26 15:52:13 thebishop in addition Sep 26 15:52:31 DelphiWorld, if you want a good scare, try opening your APK in Jadx Sep 26 15:52:37 DelphiWorld: ProGuard is quite good Sep 26 15:52:50 DelphiWorld: unless you are paranoid it should be enough Sep 26 15:52:51 thebishop that sounds useful Sep 26 15:52:54 thebishop: ok, will see if its accessible Sep 26 15:53:07 DelphiWorld, https://github.com/skylot/jadx Sep 26 15:53:08 Arancio: i just want my content to be protected Sep 26 15:53:09 whats in that json DelphiWorld /: Sep 26 15:53:43 raoul11, link to tv streams. and i dont want anyone to get the link and put it in vlc or another client Sep 26 15:53:54 DelphiWorld: "protected" "enough to protect" it's all relative. http://stackoverflow.com/a/2537588 Sep 26 15:55:32 DelphiWorld: you made the same discussion another time. "Is ProGuard enough?" "Nothing is 100% safe" "I know, I want to be to if it's good enough" "Good enough for who and what?" Sep 26 15:55:46 lol Sep 26 15:56:18 DelphiWorld, jadx can read your hardcoded strings too, but apparently not string resources. so put them in resources if you don't want to be reverse engineered Sep 26 15:56:38 ok, will study this case Sep 26 16:50:57 How can I stop onCreate() from being called on screen rotation? can I just write "android:configChanges="keyboardHidden|orientation" in the manifest? Sep 26 16:51:26 there are other things that change config than just screen rotation. Sep 26 16:51:40 your best bet is to actually handle configuration change properly Sep 26 16:52:01 s73v3r: I only want to stop the screen from reloading on screen rotation, though Sep 26 16:52:14 and that’s not a good idea Sep 26 16:52:19 s73v3r: I see Sep 26 16:52:24 So, what do you suggest? Sep 26 16:52:32 handling config change properly Sep 26 16:52:41 s73v3r: How though? I'm new to this Sep 26 16:52:45 as Google says you should Sep 26 16:52:50 thanks Sep 26 16:52:55 why you want to prevent onCreate() Sep 26 16:53:04 is it of variables or state? Sep 26 16:53:18 Ashiren: because my form resets when the screen rotates Sep 26 16:53:22 amazoniantoad: http://code.hootsuite.com/orientation-changes-on-android/ Sep 26 16:53:28 s73v3r: thanks Sep 26 16:53:38 you should be saving the state of your form on rotation Sep 26 16:53:52 s73v3r: thanks so much! Sep 26 16:55:34 Can a android app use mysql database or can it connect to mysql database and work with it? Sep 26 16:55:51 iamawesome: build an API. I don't think it can Sep 26 16:55:51 Can it insert into database? Sep 26 16:55:52 through web services, it can use any db Sep 26 16:56:04 iamawesome: do what s73v3r says Sep 26 16:56:13 I just built an API though Sep 26 16:56:14 you’re not gonna run mysql on the phone Sep 26 16:56:35 Oh wait. He's wanting to run it on his phone? Sep 26 16:56:42 i don’t think so Sep 26 16:56:48 s73v3r: mysql will be run on a server Sep 26 16:57:11 set up a web service that does the communication to the db, and have your app talk to that Sep 26 16:57:14 iamawesome: do what s73v3r says, or make an API using php or whatever Sep 26 16:57:46 json all the things Sep 26 16:58:12 There is facebook app where people enter their username and password and can login, Don't these user information go to a database? Sep 26 16:58:29 Don't they check these information from a database ? Sep 26 16:58:31 through a web service Sep 26 16:58:45 and i bet later they use some kind of token Sep 26 16:58:46 actually, that’s talking to Facebook’s servers, through web services Sep 26 16:59:00 s73v3r: Ok Sep 26 16:59:07 leaving a DB open to the internet is always a bad idea Sep 26 16:59:40 s73v3r: What do you mean by open to internet. The database server should be running all the time. Sep 26 16:59:57 yes, but you shouldn’t be able to connect directly to the DB from the internet Sep 26 16:59:59 Database server must run all the time. Sep 26 17:00:07 yes Sep 26 17:00:21 but not open to the internet. There should be another server between the two Sep 26 17:06:38 can you set a position of [0] for your recyclerView to keep the top card in CACHE ( top of the list at all times ) Sep 26 17:07:24 man some people on stackoverflow are just thankless :/ Sep 26 17:11:02 Good day i want to ask how to make a script end on first error and on finish and make a log file. Sep 26 17:11:37 huh Sep 26 17:12:20 hi guys , I'm stuck on a logic problem i guess i have an app with two buttons to swap them back and forth but when i run the app and reach the end of the pics array i get index out of bounds exception exactly on the line 44 as the console message is , here's a snippet https://gist.github.com/anonymous/1bcfde4e5ceee47d652123a772c9173e Sep 26 17:13:05 So don't access past the end of the array Sep 26 17:13:57 MeMoc, looks like you're off-by-one - length is the # of elements, but it's indexed by 0 Sep 26 17:14:26 so your first else can go to array.length, which is one past the last slot. Sep 26 17:14:39 MeMoc: Indexes start at zero, not 1, so if .length is 5, you have elements 0, 1, 2, 3, 4... doing array[array.length] will fail every time. Sep 26 17:14:51 (unless i woke up on the stupid side of the bed this morning and am reading it wrong) Sep 26 17:14:56 MeMoc: Change line 5 from == to < Sep 26 17:15:06 Dagmar, yep, that's what i was thinking Sep 26 17:15:08 er... > Sep 26 17:15:29 you could also just be cute with modulo Sep 26 17:15:30 @#$@ now i'm certain my caffiene has worn off Sep 26 17:15:39 index = (index + 1) % array.length; Sep 26 17:15:42 Getting into bluetooth, I understand theres the "classic" Bluetooth api and the Bluetooth Low Energy api. If my minSDK is 19+, do I need to interact with the classic api at all? Sep 26 17:16:01 orbyt_, the question is more, are you talking to btle or rfcomm/spp Sep 26 17:16:09 i did guys i swear and still give me and error okay i will do it again i will use > Sep 26 17:16:16 bluetooth and le are 2 different things Sep 26 17:16:18 orbyt_: Are you planning on talking to "classic" bluetooth devices? Sep 26 17:16:47 MeMoc: Dude, if line 5's if statement is true, then line 7 will blow up in your face Sep 26 17:17:02 Ill be talking to ble devices Sep 26 17:17:15 MeMoc: No wait lemme get that @!#$@ caffiene Sep 26 17:17:31 orbyt_, then you need the ble api Sep 26 17:17:54 is the BLE api a subset of the classic bluetooth api or is it completely seperate Sep 26 17:18:03 orbyt_, ble isn't really bluetooth in much the same way that javascript isn't really related to java; it's much more marketing than anything else Sep 26 17:18:13 oh really Sep 26 17:18:16 orbyt_, so the API will be fairly different Sep 26 17:18:40 alright, thanks Sep 26 17:18:42 it's bluetooth in the low level Sep 26 17:18:47 yeah BLE isn't, at the phy level, all that related to bluetooth at all. But it got pulled in under the same name and rolled into the same HW so now it's kind of the same Sep 26 17:18:48 very low level Sep 26 17:20:43 bitkiller :D Sep 26 17:21:25 bitkiller, eh. at the radio layer it's really not that similar - different pairing, very different hopping behavior, different channel width Sep 26 17:21:40 different hop rates, different frequency modulation :P Sep 26 17:22:21 MeMoc: Without caffiene my brain might as well be used to hold apple butter. What you're doing with the if statements is crazy Sep 26 17:22:37 BLE is way simpler and fairly less wonky at the radio/handshake layer. It's pretty stupid at the encryption handshake layer. Sep 26 17:23:11 MeMoc: This -> "default_Pic.setImageResource(pics_array[index]);" ending both the true and false block should always be considerd a sign you've done something wrong, because it will happen no matter what and should be outside the if-then statement entirely Sep 26 17:23:53 MeMoc, your whole if/else could be simplified to index = (index + 1) % pics_array.length; Sep 26 17:24:29 g00s, actually feels like fall today up here Sep 26 17:24:49 MeMoc: With that in mind, if array.length is 5 and index is 4, guess what happens when line 5's condition is false. You're incrememnting the index _anyway_ and then accessing the array Sep 26 17:25:00 dragorn yeha, nice! yeah my dog is liking this much better. might even turn him around. are the leaves turning color yet ? Sep 26 17:25:05 MeMoc: you need to increment the index _first_ and then test Sep 26 17:25:27 g00s, not much, we've had almost no rain in months. They're more just falling off now rather than giving us anything nice to look at. Sep 26 17:25:32 orbyt_, in my experience, BLE is slower Sep 26 17:25:53 no wonder Sep 26 17:26:01 that is in specification Sep 26 17:26:01 bitkiller, yup, for several reasons. The fundamental radio link is much slower, and the access methods are transactional not streaming Sep 26 17:26:39 BLE focuses on short transactions and minimal battery use rather than streaming - it's never going to do audio streaming, for instance (at least not in any sane sort of way) Sep 26 17:27:00 on the other hand it sets up links a whole lot better than traditional BT which wouldn't handle short transactions intelligently Sep 26 17:27:39 dragorn, thanks for the explanation Sep 26 17:27:47 g00s: hi Sep 26 17:28:08 hey thepoosh Sep 26 17:28:15 what's news? Sep 26 17:28:22 Wonder how long before we start seeing Bluetooth 5 Sep 26 17:28:34 bitkiller, BLE was some nokia thing that got absorbed into the bluetooth standard after it had been developed. they're not 100% unrelated, but they're pretty divergent. it's really only meant to do sensors/tags/wearables sort of things, which it does OK Sep 26 17:28:41 spec are done, i guess just hw & adoption Sep 26 17:28:45 bitkiller, bluetooth is no gem really, so I'm happy to see something else :P Sep 26 17:28:45 Looking at Wikipedia I'm wondering just how smoked out some engineers were to let the mention of range slide Sep 26 17:29:04 I've yet to see a bluetooth device go more than about 30 feet, and this thing's talking about >100m for Bluetooth LE Sep 26 17:29:14 rf is a weird beast Sep 26 17:29:41 thepoosh no news ... mayve oct 4 :) Sep 26 17:29:51 wut? Sep 26 17:29:55 you should be able to hit 100 feet - in open air. nothing in between, no meat sacks of nice 2.4ghz-absorbing water, nothing intruding into the fresnel zones Sep 26 17:30:03 Oh that I understand but it smacks of saying that 802.11 has a range of 10 miles because of the equipment ClearWire uses Sep 26 17:30:28 heh. yeah wifi wont' do 10 miles for other reasons too. :) Sep 26 17:30:34 (well, not w/out tweaking it a lot) Sep 26 17:31:22 Sprint's "4g" around here was the result of buying up ClearWire's towers, which were WiMAX Sep 26 17:31:22 around 10-15 miles is when the RTT for a data+ack to start hitting the spec limits and then nobody is very happy Sep 26 17:32:30 yep; wimax is another weirdo radio protocol that never got much love Sep 26 17:32:30 Good day i want to ask how to make a script end on first error and on finish and make a log file. Sep 26 17:33:20 Peter1029: This channel is for Android App Development. I’m afraid your question is out of scope here Sep 26 17:33:24 i have project using spp to print to bt printer and another one using ble to talk to a sensor aggregator Sep 26 17:34:30 bitkiller, nice; some day I'll get around to re-spinning one of my boards as btle; it's just a packet translator so transactional probably makes a little more sense Sep 26 17:35:45 dragorn, my ble project should be spp or something else; the aggregator may have accumulated to much data to send to the app Sep 26 17:36:03 dragorn, but, it was client's idea Sep 26 17:38:57 hi ! Sep 26 17:39:05 trying to play with AccessibilityService Sep 26 17:39:37 I can read some text in some app within the services, but I would like to change some text in other apps throught this Sep 26 17:39:38 looked for google oct 4 and got here https://madeby.google.com/ Sep 26 17:39:42 is it possible ? Sep 26 17:39:48 it’s not Sep 26 17:40:05 ok, so I need to draw an overlay in order to do that maybe ? Sep 26 17:40:12 (but I agree, it's a dirty hack) Sep 26 17:41:46 g00s: do you know the video of Colt MacAnlis about threading (the long one, not the annoying one) Sep 26 17:42:07 thepoosh hm, don't think so. i don't watch many videos Sep 26 17:42:24 Hey Sep 26 17:42:30 well, some of the are real good Sep 26 17:42:39 like the one about hidden java costs Sep 26 17:42:43 and that one Sep 26 17:43:10 https://www.youtube.com/watch?v=ey3sY4VExBs Sep 26 17:43:16 thepoosh i'm reading this atm https://overflow.buffer.com/2016/09/26/android-rethinking-package-structure/ Sep 26 17:43:31 everything in one package. Sep 26 17:44:07 looks interesting Sep 26 17:44:12 s73v3r: how do you mean? Sep 26 17:44:59 i don’t. I’m being a butt Sep 26 17:45:18 hmm dynamic resource ids? Sep 26 17:45:54 if I have a list view and in getView() I do view = findViewById(R.id.some_id) and then I do view.setId(someotherid) Will this affect that views ability to be recycled properly? Sep 26 17:46:11 yes Sep 26 17:46:53 hey everyone, my android phones power button no longer works but the phone functions, but unfortunately can't boot it.. is there anyway to boot to from ads etc? Sep 26 17:47:08 adb* Sep 26 17:47:28 try #android or #android-root Sep 26 17:47:48 thanks Sep 26 17:48:29 g00s: I hate the stackoverflow android app Sep 26 17:48:36 actually only use the web for this Sep 26 17:52:49 Then on wich channel should i ask? Sep 26 17:54:47 Peter1029: Something related to sysadmin or server administration Sep 26 17:56:02 Thanks i will try to find one. Sep 26 18:08:24 Hi. Anyone else experiencing the Android emulator occasionally hangs the system? I think it's because it suddenly eats all the host system's memory. I've tried disabling nearly all features such as -gpu off -nohax and even running 32bit images, but sooner or later it will still freeze and force me to reboot. Sep 26 18:09:04 It's impossible to find any docs on this topic because everything links to ancient "why the android emulator is so slow" which is not related to what I'm describing. Sep 26 18:09:04 I'm using Genymotion instead of the HAXM thing, but it never does what you describe Sep 26 18:09:16 I'm back! Sep 26 18:09:34 Dagmar: Was that supposed to be helpful? =) Sep 26 18:09:53 Any emulator that runs amok and gobbles all the RAM should probably be shot Sep 26 18:10:15 Let's just say it was a subtle hint that you might be better served using Genymotion, even on Intel Sep 26 18:10:37 add more ram? Sep 26 18:10:41 No, it should be fixed. Also, I'm not sure if its gobbling the RAM; I never had the chance to find out before it was too lage. Sep 26 18:11:07 Any non-n00n care to give a non-lulz answer? Sep 26 18:11:14 Any non-n00b care to give a non-lulz answer? Sep 26 18:11:22 "I think it's because it suddenly eats all the host system's memory" Sep 26 18:11:31 say more things Sep 26 18:12:09 Zta: How much RAM do you have, and how much did you configure the image to use? Sep 26 18:13:55 Zta: Perhaps you shouldn't be so quick to judge Sep 26 18:14:40 Today if you have less than 32GB of RAM you are nobody Sep 26 18:15:02 i has only 16GB :c Sep 26 18:15:32 16Gb in my desktop... vmhost sitting next to me has 32Gb and will probably see 64Gb in the spring "just cuz" Sep 26 18:15:56 Just because you are rich? Sep 26 18:16:05 I have 16GB. Emulator configuration from within Android Studio: RAM=1536MB, heap=384MB, internal storage=800MB. However I don't see how too little RAM in the emulator configuration would make the emulator behave like I describe; instead I'd expect it to just hit its limit and e.g. crash or throw OOM exception. Sep 26 18:16:08 No, because I'll eventually use the space Sep 26 18:16:29 Past a certain point it's just cheaper to start doing VMs and disk arrays Sep 26 18:16:48 Also, FAR EASIER TO MOVE AROUND Sep 26 18:17:02 I used to have nine mid-towers in my study Sep 26 18:17:25 Now I have two, both which have handles on the top. Sep 26 18:17:28 And now? You don't have them anymore? Sep 26 18:17:36 Dagmar: Can you please take this to #android-look-how-long-my-e-penis-is Sep 26 18:17:47 Hey. I would like to retrieve some data from a public API once every 30 minutes, also when the application is closed. What is the best approach? Service with AlarmManager? Sep 26 18:18:01 Zta: You could go to #entitled-bints you know. Sep 26 18:18:13 Dagmar: I'm sorry. You look like a bum now Sep 26 18:18:43 A vmhost with 6 cores and 32Gb of RAM doesn't even cost $800 most places. Sep 26 18:18:47 Heya guys. Do you also accept n00b app related questions here or is it purely for developers? Sep 26 18:18:48 I hope you'll manage to have 9 mid-towers again Sep 26 18:19:09 Arancio: Hell no. Sep 26 18:19:11 NwS: we don't accept people who use the word "n00b" Sep 26 18:19:28 I've got no experience whatsoever so :P Sep 26 18:19:29 NwS: and yes, this is a development only channel Sep 26 18:19:29 Also, a great big heaping pile of hell no to replacing all those fans Sep 26 18:19:53 Dentych: you can set up a server that will poll the public API on your schedule, and then push out updates to devices. That’d be the ideal way, cause then you’re not clobbering their API Sep 26 18:20:35 Zta: Idk, I'm on the latest emulator with default settings and it's working great Sep 26 18:21:39 NwS: you can ask newbie questions about development. No problem. For user questions about Android apps go to #android Sep 26 18:22:59 Arancio, I'm trying to gather some info regarding an app creation and until now I haven't found any appropriate place to ask a few questions. Sep 26 18:23:04 and for root/rom question, #android-root Sep 26 18:23:17 well then, this place seems appriopate Sep 26 18:23:31 so long as you’ve done some reading on developer.android.com Sep 26 18:23:42 NwS: "app creation" is "application development". You can ask. Sep 26 18:25:26 thenewboston. Sep 26 18:26:27 s73v3r, I can see that's the ideal solution yeah, but this is a one-user application (for learning purposes), so there will not be a server instance. only the app communicating directly with the API Sep 26 18:27:02 in that case, you want to look at the JobScheduler Sep 26 18:27:30 s73v3r, and that will still run, even though the application closes? Sep 26 18:27:31 NwS: so what's your question? Sep 26 18:27:40 you’ll have to research it Sep 26 18:28:07 s73v3r, the first line in the docs says "This is an API for scheduling various types of jobs against the framework that will be executed in your application's own process.". In my head "in your application's own process" means that if the app closes, so does the job? Sep 26 18:28:41 Dentych: Note that it's a getSystemService call Sep 26 18:29:06 Personally I think you were on the right track with AlarmManager Sep 26 18:29:42 google prefers you to use JobScheduler, because it allows them to delay jobs to better preserve battery Sep 26 18:30:07 there is neat library for that https://github.com/firebase/firebase-jobdispatcher-android Sep 26 18:30:09 Dentych you'll have to look up to 200+ rules for doze mode too Sep 26 18:30:11 previously gcm something something Sep 26 18:30:11 JobScheduler is probably a more efficient fit since you can tie it to the network actually being available Sep 26 18:30:39 Dentych and see https://medium.com/google-developers/scheduling-jobs-like-a-pro-with-jobscheduler-286ef8510129 Sep 26 18:30:41 Ah, but so does AlarmManager now, s73v3r, since API 19 according to the docs Sep 26 18:31:01 Google is pushing JobScheduler, so that’s the better one to use Sep 26 18:31:07 Arancio, my main question is if it is possible to interact with various social networks from within an application. For example like a FB status, retweet, like a youtube video, like an IG picture/video. So basically create an application that will show as a feed various social media accounts Sep 26 18:31:11 + recently you dont know really how AlarmManager would behave with doze mode and what not nowadays Sep 26 18:31:12 If that makes any sense. Sep 26 18:31:19 s73v3r, sure. I'll give it a shot :) Sep 26 18:31:36 Ashiren its too damn complicated :( Sep 26 18:31:36 yiati: I haven't updated the last week or so, but other than that everything is pretty new here too. And everything runs fast and decent here too. Until at some point where I can't get in touch with my machine other than moving the mouse around =) Sep 26 18:31:47 Thanks for the tips, s73v3r, g00s & Dagmar. I'll play around with it! :) Sep 26 18:31:50 Ashiren: Or if they might decide to raise the minimum interval... again Sep 26 18:31:57 NwS: Most major social networks have libraries created for Android that will do stuff like that for you. Many of them also have web APIs that will allow you to get that stuff too Sep 26 18:32:19 oh man, you know your dog is getting old when he sneezes and falls over Sep 26 18:32:29 NwS: most of these services are available through web APIs. You can interact with them with Android too, yes. Sep 26 18:33:47 poor dog Sep 26 18:34:36 get a cat [solved] Sep 26 18:34:49 even cats get old Sep 26 18:35:18 no hairballs :) Sep 26 18:35:53 sad was the day when the cat of my childhood fell from the roof Sep 26 18:35:54 Ty for the answers s73v3r and Arancio Sep 26 18:36:10 it was in his last days Sep 26 18:36:30 nice video, g00s ! It's very easy to understand Sep 26 18:37:02 oh Sep 26 18:37:24 did it use his other 8 lives already? Sep 26 18:38:12 "fell"? Sep 26 18:38:20 Ashiren: as you see some old cat is so stupid to sneeze on the roof Sep 26 18:38:28 would you believe that when my grandfather (the cat's owner) died, the cat stayed all time next to the coffin, and eat almost nothing in the following to weeks? Sep 26 18:38:46 ^ two weeks Sep 26 18:39:26 should we believe it? Sep 26 18:39:33 can we trust you? Sep 26 18:40:49 Cats! They're good eatin' ™ Sep 26 18:41:44 and after too weeks? Did he start to stuff food in his belly again as if nothing happened? Sep 26 18:42:02 Some cats starve themselves to death when their owner dies. Sep 26 18:42:19 That can didn't sincerely love your grandfather Sep 26 18:42:25 He was just pretending Sep 26 18:42:50 Dagmar: ...and for the love of all that's good in life: It's "GB" not "Gb". Sep 26 18:48:44 yo when will canary become canary again Sep 26 18:49:01 capella-5x: all the nice characters that you use are unreadable on my client Sep 26 18:49:35 Arancio: (Cats! They're good eatin' [tm]) Sep 26 18:52:13 Dogs, cats, canaries... Sep 26 18:54:32 bitkiller often cats eat their humans :) Sep 26 18:54:47 probably waiting for somebody to open the coffin up so it could get a bite Sep 26 18:56:05 You can eat crows, they're fat and make up into stew Sep 26 18:56:20 er, arancio ;) Sep 26 18:56:58 but, I swerve now heavily off topic Sep 26 18:57:10 guys question Sep 26 18:57:22 if i have a rss feed is there a easy way to query it & send it through push? Sep 26 18:58:13 doable? yes. easy? eh. you'd need a client on the phone to receive the push, and then a server also interfacing w/ the push framework that would query the rss and generate the push Sep 26 18:58:22 g00s, seriously or joking? Sep 26 18:58:28 seriously Sep 26 18:58:48 if you die with a cat and nobody find out, nobody might find you at all ;) Sep 26 18:59:03 except for some teeth maybe :D Sep 26 18:59:05 dragorn: lol i know it's doable ;) but i'm talking about the server side, i want to get it in nearly realt tie. what's the best way? Sep 26 18:59:18 my wife said dogs may do it also Sep 26 18:59:32 bitkiller: wives do it also Sep 26 18:59:39 not mine Sep 26 18:59:49 you'll never know Sep 26 19:00:14 pictures a cat with a grin full of human teeth standing over a corpse Sep 26 19:00:15 i'm gonna know Sep 26 19:00:42 you'll be dead Sep 26 19:00:49 DelphiWorld, rss isn't really meant for realtime. Anyone running a rss server is unlikely to appreciate you hammering on it constantly (assuming they notice, I suppose). As far as how easy is it to do server side, depends. Pick a language you're comfortable with and either learn how to parse rss or find a library, and find a library that talks to google push. In theory gluing those two together is fairly simple if you're good in Sep 26 19:00:49 whatever language you pick. It's a very broad question. Sep 26 19:01:06 no, i'm not going to be dead Sep 26 19:01:15 yeah Sep 26 19:01:17 so, step one, pick your language and server it's going to run on; then find libraries for rss and gcm Sep 26 19:01:20 pick Delphi Sep 26 19:01:38 ok fuck delphi Sep 26 19:01:57 pick a language that replaces { } with begin and end Sep 26 19:02:12 all you're doing is fetching rss, parsing it, and rebundling it as a series of gcm messages; alternately, you do all the logic on your android app and all you query is if the rss has changed and generate a push, and the android side pulls the rss and parses it Sep 26 19:02:42 BeginEnd: that's the right attitude! Sep 26 19:02:43 dragorn: no, i better do it server side Sep 26 19:03:00 <{json}> Arancio: ok ? Sep 26 19:03:09 of course, everyone involved will hate you. The server people because now you’re getting your server or a billion devices to hammer them, and the users, cause you keep draining their battery Sep 26 19:03:36 <{json}> s73v3r: the rss feed is mine ;) Sep 26 19:03:49 {json}: RSS is dead Sep 26 19:03:51 I'd argue don't even query the rss feed then Sep 26 19:03:59 just make whatever generates the rss also publish a push Sep 26 19:04:00 if the RSS feed is yours, why bother with it? You know when it’s updated Sep 26 19:04:21 <{json}> using a crazy framework that dont support push Sep 26 19:04:42 otherwise if you have to do that, can you run them both on the same server? You should be able to set up inotify to wake you up when the rss gets changed Sep 26 19:04:52 so rewrite it so it does Sep 26 19:06:12 <{json}> dragorn should be a person full of idea's. Sep 26 19:06:59 well, it's pretty simple - either your server has to do a poll loop of whatever frequency you decide & hit your webserver, or you watch the filesystem for when the rss file gets changed Sep 26 19:07:12 <{json}> yes... Sep 26 19:07:32 if your push server can share the fs w/ the webserver, you can use inotify to wake up your push code and generate an update w/out having to do a constant polling loop Sep 26 19:08:16 <{json}> dragorn: yes this is a good idea Sep 26 19:14:40 this seems really over-engineered https://overflow.buffer.com/2016/09/26/android-rethinking-package-structure/ Sep 26 19:15:04 at the bottom, they mentioned https://medium.com/@cesarmcferreira/package-by-features-not-layers-2d076df1964d Sep 26 19:15:12 which (the 2nd one) seems sufficient for most Sep 26 19:31:55 g00s: I would argue that manager, and service in the data layer can just be in the top layer (depending on their breadth) Sep 26 19:32:25 this looks like a package for each class :/ Sep 26 19:34:53 I have this icons that represent drag handles, you can see them in this image: http://s4.postimg.org/n5qentkl9/Capture.png They are the dotted squares at the right of each row. They work ok in the emulator but when I run the application in the real device they don't work. Only very rarely I'm able to activate the drag mechanism tapping on them. Do you have any idea of what could be the problem? Sep 26 19:37:37 these icons Sep 26 19:39:51 Help me? Sep 26 19:40:51 sorry, never worked with dragging :/ Sep 26 19:45:18 hello @ all :-) Sep 26 20:12:49 hello you android-dev873 ;) Sep 26 20:13:56 arancio, obviously your fingers are fat and the touch/pointer events aren't being delivered Sep 26 20:14:18 lol Sep 26 20:14:34 physical device testing beats emulators any day Sep 26 20:15:09 speaking of device testing, on release version my logcat cant filter by package name Sep 26 20:15:19 it replaces package name with ? Sep 26 20:15:38 I have a crappy n7 with a battery bulge you can use if you play with your life is ok Sep 26 20:15:48 any workaround? mayb appending some tag to my app's entire logs? Sep 26 20:20:23 anyone know how to address the gradle daemon has a different conext path for the jdk? driving me crazy Sep 26 20:21:19 2 systems, no problems on laptop, desktop gives error makes no sense, copied over all files, ~/.gradle, ~/.AndroidStudio-2.2, etc even nuked and tried from sracth every time the 1 system has issues the other not, and it builds fine from cli just not within android studio project sync fails with context path error Sep 26 20:22:38 http://dpaste.com/1XR0616 Sep 26 20:23:33 also not sure why the error shows the path incorrectly it keeps tagging on jre -> javaHome=/opt/oracle-jdk-bin-1.8.0.92/jre, that is WRONG even when I hard code/set external jdk to /opt/oracle-jdk-bin-1.8.0.92/jre the error message never changes, doesn't even seem to make that setting/change anywhere Sep 26 20:28:09 Hm, I have some trouble with RecyclerView not setting the correct height for its items. The item layout contains an ImageView whose content is set by Glide, ie. it is loaded delayed and on-demand. I think this may be what's causing the trouble. Anyone familiar with this type of problem? What to do? Sep 26 20:38:03 even hard coded -> http://dpaste.com/3R5HPHQ' Sep 26 20:38:06 http://dpaste.com/3R5HPHQ Sep 26 20:38:14 it keeps adding /jre for some reason not sure why Sep 26 21:04:08 wltjr: check echo $JAVA_HOME and ~/.gradle/gradle.properties Sep 26 21:04:32 Zta: checked, its a symlink, and I have no ~/.gradle/gradle.properties Sep 26 21:05:05 perhaps ./gradlew --debug can shed some light on this? Sep 26 21:05:31 Zta: worth a shot, just frustrating since I have tried copying files from working system, nuking and recreating on broken etc nothing has any effect Sep 26 21:06:01 I understand, but I can't give a straight answer. Sep 26 21:06:14 Zta: but from cli it works, its within android-studio/intellij that it does not. Even when I change from use internal to external and I set a path. I cannot see where it records that path in what file Sep 26 21:06:17 Are you running "./gradlew"? Sep 26 21:06:23 Ah. Sep 26 21:06:37 Zta: sure, and yes via cli ./gradlew works fine, haven't tried just gradle but should work as the wrapper does Sep 26 21:07:10 Zta: everything is fine on my laptop, short of stuff being red, another problem, but I can build it, generate apk, etc both cli and in IDE, desktop IDE is borked CLI works fine Sep 26 21:07:37 project gradle syncs fine on laptop, fails every time on desktop with context bs Sep 26 21:07:38 I assume you've looked everywhere in Android Studio's Settings > Build, Exe, Depl > Gradle Sep 26 21:08:00 Zta: unless its storing it outside my user dir and the project .idea, I have no clue Sep 26 21:08:30 [x] Use default gradle wrapper (recommended) vs [x] Use local gradle dist Sep 26 21:08:31 Zta: I assume when I set a path, it records that to a file, I thought like gradle.properties or something in the project directory, maybe even the ide generated local.properties that has path to android sdk Sep 26 21:08:37 Zta: let me check that Sep 26 21:08:48 Zta: all that should be default, and/or when I copied files same as laptop Sep 26 21:09:29 Right.. Sep 26 21:10:28 makes no sense, and is making me really hate intellij and gradle Sep 26 21:10:47 Make a backup of ~/.gradle and remove any old versions in ~/.gradle/wrapper/dists/ Sep 26 21:10:48 really dislike how intellij handles its jdk stuff, netbeans is way better Sep 26 21:10:59 Zta: backup, I straight up rm -fR :) Sep 26 21:11:16 Zta: I have nuked the stuff a few times, and let it generate from scratch, and copied over from working laptop Sep 26 21:11:54 Zta: it really bothers me that I can modify the project, set a path, and never see where that path is recorded in the project files, .idea directory, nothing in my ~/ dir no where its magical Sep 26 21:12:12 I still miss stuff in Eclipse too; Android Studio has horrible auto-complete with drop-down menus I have to Escape out of every few seconds. I also think the gradle integration is flaky. Reminds me of VIM + Makefile Sep 26 21:12:13 also I am sure related, in the IDE under external libraries everything is missing Sep 26 21:12:45 Zta: android studio must have messed up idea, it used to be the best java IDE, people still bought licenses despite eclipse and netbeans, but seems no longer Sep 26 21:13:13 anything that bundles a JDK in the IDE is NO good Sep 26 21:13:20 heh Sep 26 21:13:26 anyone going to droidcon? Sep 26 21:13:30 part of the entire point behind a JAVA IDE is you are going to work with more than one JDK Sep 26 21:13:40 wltjr: maybe look into why they bundled the JDK before you make statements like that Sep 26 21:14:03 s73v3r: like the version of the jdk, that is not current and has reported security issues and fixed bugs? :) Sep 26 21:14:13 and they bundled the JRE, not JDK Sep 26 21:14:19 keep in mind this works fine on my laptop and did on my desktop Sep 26 21:14:23 huge difference Sep 26 21:14:25 s73v3r: nope its a false Sep 26 21:14:31 no, it’s not Sep 26 21:14:34 s73v3r: its a JDK in a directory called JRE Sep 26 21:14:43 no Sep 26 21:14:46 s73v3r: go look, IDE's need javac, jre does not have javac Sep 26 21:15:07 s73v3r: I can give you a directory listing, its a JDK in a jre directory 100%, there is jre subdir Sep 26 21:15:33 s73v3r: I do java packaging, I am quite familiar, and if you try to replace the bundled JDK with a JRE it will complain that you pointed it to a JRE not a JDK Sep 26 21:15:46 even the startup script looks for JDK not JRE, java IDE's need JDKs not JREs Sep 26 21:16:14 they need both Sep 26 21:16:19 s73v3r: the answer is they do it because on windows that is how most stuff is distributied and it gets brought over to UNix that way Sep 26 21:16:21 you’re running on Java, of course you need a JRE Sep 26 21:16:24 s73v3r: every jdk has a JRE Sep 26 21:16:40 s73v3r: but you cannot build anything with a JRE, it has no javac, or tools.jar Sep 26 21:16:40 the JDK and JRE are separate items Sep 26 21:16:44 just rt.jar Sep 26 21:17:00 s73v3r: no, every JDK contains a JRE, but you do not need a JDK for a JRE, once built Sep 26 21:17:03 nobody said anything about building with a JRE Sep 26 21:17:13 only been around java since 1.3... 16+ years Sep 26 21:17:46 s73v3r: the point is, when I point it to a JDK, the IDE tags on a /jre path to the end, because that is how it is in the project directory, but seems to only be that way on my desktop Sep 26 21:17:55 s73v3r: http://dpaste.com/3R5HPHQ Sep 26 21:18:09 I did not add that /jre, the IDE did, and it causes it to fail because the path/context is different Sep 26 21:18:12 I think it would still make sense for Android Studio to look for a JRE instead of a JDK during startup. And then you could configure the JDK pr. project. Sep 26 21:18:41 Zta: yes, technically it should just need a JRE, since any JDK it is running under is not automatically present for things to use, another stupid thing Sep 26 21:19:07 ...other than that, I'm not interested in participating in this discussion =) Sep 26 21:19:09 Zta: I ran into that before, thus replacing the build in jre directory with a symlink to a system installed one, or in Gentoo's case a symlink to the current-vm which may change Sep 26 21:19:24 Zta: You can. Right click on the module, and go to “Open Module Settings" Sep 26 21:19:36 there’s a big ol text box asking you for the JDK location you want to use Sep 26 21:19:41 Zta: its pointless, other than finding out the issue, where the /jre directory is getting tagged on to my hard coded path and/or where that hard coded path gets recorded to what file Sep 26 21:19:43 I'm more interested in fixing my stupid RecyclerView's item views.. Sep 26 21:20:03 s73v3r: but you cannot just type in a path and hit save, it wants to detect the jdk and closes when it does Sep 26 21:20:15 s73v3r: I would like to see where that path gets stored/recorded to disk Sep 26 21:20:19 yes, it wants to make sure you’re pointing it at a JDK Sep 26 21:20:25 seems it should end up in some .properties file for the project Sep 26 21:20:35 s73v3r: http://dpaste.com/3R5HPHQ Sep 26 21:20:45 it is pointed at a jdk, but it adds /jre onto that path and causes gradle to fail Sep 26 21:20:49 wltjr: Perhaps find ~/ -type f -exec grep -H "/jre" '{}' \; Sep 26 21:21:00 Zta: did it, I been grepping like crazy Sep 26 21:21:14 =) Sep 26 21:21:18 Zta: I even manually looked at the files nano * in case my grep was off, and tried -i case insensitive Sep 26 21:21:38 now I did put in JAVA_HOME or something in my ~/.gradle/gradle.properties, and that made the cli fail :P Sep 26 21:21:47 when I deleted that file, cli builds fine again Sep 26 21:22:06 One last hack perhaps: cd $JAVA_HOME ; ln -s .. jre Sep 26 21:22:39 perhap that could trick it into using the contents of $JAVA_HOME instead of $JAVA_HOME/jre Sep 26 21:22:51 Zta: I was trying that.... damn thing added a path on to my hack... Sep 26 21:23:18 you're thinking like me ... this is getting creepty Sep 26 21:23:21 -t Sep 26 21:23:42 Zta: about to remove and re-install studio, which makes little sense but last thing Sep 26 21:23:45 well keep the t, you might need it where you're going Sep 26 21:23:56 I was messing with the gentoo ebuild, so maybe it screwed up something there, but it just copies over 99% of the files Sep 26 21:26:12 maybe it is a wrapper issue, despite it working at cli, just nuked it all, did a fresh checkout from git, and one thing I have not tried is hitting cancel when it says use external gradle wrapper Sep 26 21:27:56 nope same thing... Sep 26 21:28:24 now to nuke it all and remove android studio, start entirely from scratch... I will nuke my sdk dir just for fun Sep 26 21:28:35 Isn't this legal in a RecyclerView? Instead of directly inflating the ViewHolder's layout, I'm constructing a custom view (that I also use elsewhere) http://pastebin.com/PVUJQ4jE Sep 26 21:30:25 Why wouldn't it be? Sep 26 21:30:29 If I have a bound service where I want a "getPastWeather" method, that will query the database for the last 5 days of weather information - should I just go to the database in that method call and return a List? Or should I do some fancy stuff with LocalBroadcast ? Sep 26 21:30:41 That AvatarView basically wraps an ImageView that I use GLIDE to set an url into. Sep 26 21:31:51 Thorbear: I'm getting a RecyclerView populated by items with a bad height. Specifically the ImageView (in AvatarView) has a height of 0; only the nameTextView mentioned in my snippet is shown. Sep 26 21:33:00 anyone know where to find a good tutorial on Leave Behinds with Android RecyclerView? The Googles are not working for me toda Sep 26 21:33:02 thankls Sep 26 21:33:56 i mean, this is a good tease: https://material.google.com/components/lists-controls.html#lists-controls-types-of-list-controls Sep 26 21:34:01 but i need to know how to do it :-D Sep 26 21:35:38 Zta: that sounds a bit strange, but I don't think it has anything to do with the way you inflate the view in the shown snippet. I'd look closer at the code that sets the url (and the code that is triggered by setting url). I have no experience with GLIDE though. Sep 26 21:35:50 small question (and i want only a url not a complete answer;-) ): where can i find more infos about FAB? maybe a tutorial or something? Maybe anyone have an idea? please? Sep 26 21:35:57 xximjasonxx: You could just have that view behind the item and then translate the top view as needed Sep 26 21:36:34 Thorbear: Thanks =). I'll leave the inflate code for now then. I'm already looking into GLIDE. Sep 26 21:36:37 android-dev873: https://github.com/codepath/android_guides/wiki/Floating-Action-Buttons Sep 26 21:36:37 orbyt_: yeah that is what i read Sep 26 21:36:48 wasnt sure if there was something standard i could use or if i had to build it Sep 26 21:36:56 http://stackoverflow.com/questions/34747458/partial-and-full-swipe-for-recyclerview-using-touchhelpercallback#comment61272119_34747458 Sep 26 21:37:25 I dont think theres anything standard Sep 26 21:38:16 thank u a lot orbyt_ i will read this :-) Sep 26 21:47:21 is there a replacement for Android Support Library, sdk tool seems to report them as obsolete, but seems that android.support.v4.content.res.ResourcesCompat should be used for getDrawable, or ConextCompat Sep 26 21:47:58 lets try this, aside from first and last visible on the layout manager, does the recyclerview have any indication what cells are currently visible on the screen Sep 26 21:48:30 you can determine if a view is visible Sep 26 21:50:13 xximjasonxx: i don't believe so, other than checking if an index is within the first and last, i'm not aware of anything Sep 26 21:50:56 you may be able to do something by keeping track of the views that are created and then recycled, but that may get tricky Sep 26 22:10:42 word on the street is that the S7 has weird ui bugs, as per usual with Samsung Sep 26 22:10:57 anyone want to mention one? Sep 26 22:15:08 My finance hasn't noticed any Sep 26 22:35:18 When I start a JobService and it doesn't match the required settings (for example idle true or wlan true) will the service wait until it is true or will it simply not start? Sep 26 22:38:41 I'm having an issue where the S7 edge does not show indeterminate ProgressBars Sep 26 22:39:16 God I hate "Alice and Bob" examples Sep 26 22:40:38 then that Charlie character shows up Sep 26 22:41:32 wait for Eve, and Mallory.. Sep 26 22:42:20 so what would you suggest otherwise? Sep 26 22:42:26 and three ways are cool but I have different rules Sep 26 22:48:46 beyond stupid now -> http://dpaste.com/08PXSEP Sep 26 22:49:08 is new tech implanting quantum tele-portation (sub-ootucal bandwidth) over existing optical at kilometer distances cool g00s? Sep 26 22:49:10 but that proves something is adding on /jre to the path and causing it all to fail. has to be some file with some setting remaining, removed everything Sep 26 22:49:30 sounds confusing Sep 26 22:54:31 ah, only example is parity bits but that should scale Sep 26 23:03:05 arancio ping Sep 26 23:26:14 so when using the DayNight theme, theres a -night qualifier and a -notnight qualifier, and yet in this article -notnight is not used: https://medium.com/@chrisbanes/appcompat-v23-2-daynight-d10f90c83e94#.ykeonkzb0 Sep 26 23:26:33 so which are we suppose to do? Sep 26 23:26:51 do you need a -notnight qualifier for day time styles? Sep 27 00:16:14 I have an AlertDialog with 2 EditText views (using DialogFragment). I show the keyboard but the dialog doesn't resize (move up). Does anyone know how I can force the dialog to resize? Sep 27 00:35:56 Guys, serious question. Those of you who actually write test for your apps, what aspects of your app are usually subjects for testing? I finally decided to at least try to be a good developer and start writing tests but for the last week I only stare at my code and ask myself "do I really need to test this? maybe that? or that?". I mean, most of the stuff in Android apps (maybe only me apps?) seem so trivial that I don't even Sep 27 00:35:56 see the reason to test them. Ok, I can write some Espresso tests to check whether all the text labels show right messages in respond to some actions (like I didn't test it manually while I was writing that stuff)... Sep 27 00:36:58 At the same time I understand that I most certainly just don't understand what aspects of my apps are really crucial one in sense of reliability Sep 27 00:38:11 So, I have an overwhelming feeling to create tests for every error-prone point of my apps, but when I look at the code I'm just stuck thinking "Ok, WHAT TO TEST?" Sep 27 00:39:44 I really hope that not all test writes have gone to see Trump-Clinton debates :) Sep 27 01:07:23 are you testing just java, or android related? Sep 27 01:08:09 surf2b1, have you tried setting in manifest for adjust pan or size etc? Sep 27 01:24:54 hi all, anyone knows why the monitors on Android Studio are enabled but show nothing? Sep 27 01:25:40 my app is running on my device, adb on android studio is enabled and I can see the logcat output normally, but the memory monitor show no data Sep 27 01:26:03 any suggestions? Sep 27 01:28:41 does the android studio logcat monitor have a max cap? Sep 27 01:28:49 for characters in a line Sep 27 01:29:57 yes it does Sep 27 01:30:25 1024 bytes if I remember correctly Sep 27 01:31:46 ugh Sep 27 01:43:10 ugh what Sep 27 01:43:35 if talkin by line, why would you ever need 1kb of data **** ENDING LOGGING AT Tue Sep 27 02:59:59 2016