**** BEGIN LOGGING AT Thu Apr 02 02:59:58 2015 Apr 02 03:00:07 g00s: ads on site project, maps at work, I think nothing else Apr 02 03:00:37 joe11iu: if you're still wanting to compile an AOSP app, you're not going to be able to use the sdk Apr 02 03:00:45 ok Apr 02 03:00:59 but it is not a stock aosp app Apr 02 03:00:59 joe11iu: your best bet is to download the full aosp source, and use the tools in AOSP to generate an intellij project Apr 02 03:01:03 i modified the aosp app Apr 02 03:01:12 right, but you'll still need to compile it in AOSP Apr 02 03:01:22 e.g. using the AOSP build system, not the sdk Apr 02 03:02:12 Generate the intellij project for AOSP, and that should let you edit the source for that app in IDEA/AS Apr 02 03:02:13 groxx isn't this kind like dll-hell ? lets say you need 7.0, so the user then upadates to that, but it breaks some other aoo Apr 02 03:02:17 s/aoo/app Apr 02 03:02:36 look at the tools/development/idegen project (iirc), for how to generate an intellij project Apr 02 03:07:31 what do i look there Apr 02 03:08:20 jesusfreke Apr 02 03:10:38 hi Apr 02 03:12:16 I'm building my first app with android, the hello world one, I just download the android sdk and runnign the gradlew wich comming inside, but when i run the assembleDebug task says that could not create de android plugin wich I see is because of the gradlew version Apr 02 03:12:32 I also run it with the gradle 2.3 (the latest) and could run it Apr 02 03:12:53 but I see that the most of the samles are running with the 1.12 (the one wich cames with the sdk) Apr 02 03:13:00 what I'm missing? Apr 02 03:14:00 ramirog89 i would use gradle 2.2.1 Apr 02 03:14:13 and gradle-plugin 1.1.+ which is 1.1.3 Apr 02 03:15:16 what happen also to me is that I found some examples in github wich are useful to me, and I try to run them but says that I need gradle 1.10 , is there any way to handle that? Apr 02 03:15:28 I need set the proper build.gradle and just that? Apr 02 03:15:39 or is something also about andriod plugins.. Apr 02 03:16:27 g00s: I'm just getting the 2.2.1 (why you recommend this one? is more standard?) Apr 02 03:16:48 yeah, don't know if 2.3 is officially supported. it might be Apr 02 03:16:55 ok Apr 02 03:17:10 and the plugin, is just for gradle also? or is for android? Apr 02 03:17:24 the gradle-plugin is for android Apr 02 03:17:51 err.. toast messages being displayed outside of the activity Apr 02 03:17:56 as in on the desktop.. Apr 02 03:20:13 what do you guys think of this http://arstechnica.com/gadgets/2015/04/googles-arc-opens-up-to-developers-runs-android-apps-on-most-desktop-oses/ Apr 02 03:20:13 what about when you get any code sample that needs older gradle versino, how can I match that? Apr 02 03:34:06 my apps live on the play store! https://play.google.com/store/apps/details?id=com.dylanredfield.agendaapp2 Apr 02 03:35:35 congrats :) Apr 02 03:37:31 It seems that an ImageView in my app cache the image without being told so. I load an image using my own asynchronous loader, and the server passes it the correct new image, but the image loaded is old. Apr 02 03:37:46 Is there any common mistake that could lead to that. Apr 02 03:38:07 I do not use Picasso or anything for this particular ImageView Apr 02 03:48:54 is this the best place to start: http://developer.android.com/training ? Apr 02 04:04:25 anyone familiar with "Native Client"? run android apps on any major OS? really? docs say it is only for C/C++ code but i thought most android apps are written in java for JVM so how do they use NaCl? Also, hasn't the "write once run anywhere" dream been tried and failed with Sun and Java? why will it work this time? Apr 02 04:09:19 Write One Run Anywhere has been a reality on the JVM since the late 90s Apr 02 04:10:15 CedricBeust: then what does NaCl give that's new? Apr 02 04:10:35 NaCLis a web browser technology, nothing to do with Java Apr 02 04:10:43 theseb: Android apps are not written for the jvm, they are written for the dalvik vm Apr 02 04:11:13 CedricBeust: so why is nacl "exciting" since embedding a JVM in browser allows WORA for browser as well? Apr 02 04:11:35 theseb: I suggest you find the right channel to ask these questions Apr 02 04:11:47 which is? Apr 02 04:11:51 No idea Apr 02 04:12:03 I just know this has nothing to do with Java nor Android Apr 02 04:12:49 He's been bouncing channel to channel asking the same copy/pasted question Apr 02 04:12:53 hmmm Apr 02 04:13:01 Apparently searching channel lists is easier than searching Google Apr 02 04:13:10 Neffi: since there is no #arc what would you suggest instead? Apr 02 04:13:11 theseb: you received a helpful link in ##c. check there Apr 02 04:13:24 note: don't discuss it there ;) Apr 02 04:29:42 does anyone know about any github Lock android feature library? Apr 02 04:30:01 erm Apr 02 04:30:04 what kind of features? Apr 02 04:30:14 java already has locks, android has more in base system Apr 02 04:31:13 I just want to study any library wich implement any type of lock, pattern, passcode, just to see how handle the events and that Apr 02 04:31:39 oh you mean a screen lock Apr 02 04:31:53 yea sory Apr 02 04:31:54 I mean that Apr 02 04:34:24 hi Apr 02 04:34:46 is asus broswer based on aosp browser Apr 02 04:34:48 ramirog89: apparently venmo code is open source? https://github.com/venmo/android-pin Apr 02 04:35:49 joe11iu stop Apr 02 04:36:03 no i was asking a question about the asus broswer Apr 02 04:36:07 joe11iu: "Chrome-based browser engine" Apr 02 04:36:29 settings look like aosp broswer settings to me Apr 02 04:36:34 yiati: I will have a look to it! Apr 02 04:36:36 thnx Apr 02 04:39:08 ok Apr 02 04:51:56 yiati: this android-pin was the first on have a build success =) Apr 02 04:54:49 yiati: but this is as I see just the pin I need to see how lock with this Apr 02 04:55:14 lock what Apr 02 04:55:35 the screen Apr 02 04:56:21 I thought this also has the feature to lock the screen or just that feature, I'll keep looking Apr 02 05:02:17 adding analytics makes app messy :( Apr 02 05:22:51 <_genuser_> geez youtube is really getting slow lately. Apr 02 05:23:00 <_genuser_> can't watch tutorials fast enough. Apr 02 05:31:56 I play them at 1.5x speed Apr 02 05:32:19 <_genuser_> well, they just take a longer time to load now. and comments take forever. sometimes you have to reload the page a few times. Apr 02 05:32:44 Ah yes, Youtube comments. Very important. Apr 02 05:33:02 <_genuser_> I like to see the comments to see if there's nothing useful in the videos. some videos will ramble on forever and reading the comemnts can help you just close them right away Apr 02 05:34:15 comments are usually the best part of the video :D Apr 02 05:34:29 <_genuser_> many times, true. Apr 02 05:34:47 <_genuser_> sometimes, they're also helpful in knowing the poster is just wasting your time. Apr 02 05:37:54 it's youtube. it's a waste of time! Apr 02 05:38:10 <_genuser_> many tutorials are exteremely helpful. Apr 02 05:56:28 Has anybody tried moving their Genymotion images to a different system? They should work after all they are simply VirtualBox images. Shouldn't they. Apr 02 06:04:21 donniezazen, that seems like a FAQ they'd have on their site, or community forum Apr 02 06:05:26 never been a fan of videos for coding but horses for courses Apr 02 06:06:13 hi, are there any helper classes for AccountManager? I would like to get the account for my app however it looks like I need to use a call back method instead of just blocking and waiting for the result Apr 02 06:06:35 donniezazen: what is Genymotion? Apr 02 06:06:49 a new Dance craze Apr 02 06:09:13 phix: an Android emulator https://www.genymotion.com/ Apr 02 06:09:32 phix: you can serially get your account, I don't know what you're talking about Apr 02 06:12:12 herriojr: I think phix is talking about getting access to an account via AccountManager. A notification shows in the statusbar and you can't do anything until the user grants permission. phix am I correct? Apr 02 06:14:00 If so, I would create an object lock and wait to "notify" until onActivityResult is called. No helper class I know of Apr 02 06:17:44 whatitis: Looking over their website I haven't been able to find any relevent information. Apr 02 06:33:46 meh, google hasn't updated their android analytics app since june 2014 Apr 02 06:39:41 there are worse ones than it Apr 02 06:49:58 is there a way to prevent android from killing my application? its a widget and i use the alarmmanager to update info on it, but in the logs it looks like android kills and restarts my application from time to time, therefor killing the alarms? Apr 02 06:51:03 How do I make rotate animation along Y axis in android 2.3.3 API 10 Apr 02 06:51:20 should i create a service to handle the alarms and start it via startForeground? Apr 02 06:56:22 capella ohoh https://news.ycombinator.com/item?id=9308439 Apr 02 06:58:42 tried ARC Welder?? Apr 02 06:58:45 pretty cool!! Apr 02 06:59:04 * g00s puts on the welding mask Apr 02 07:02:10 also, does android have any of google's collections libraries? like iterables or something like that in order to create a list that is in reverse order? Apr 02 07:02:13 Odaym did you ever have to write more than 20 bytes into a single BLE characteristic (long write) Apr 02 07:02:42 phix you can get guava yourself, but its big Apr 02 07:03:00 You can serially get your account from AccountManager? How? All of the examples I have seen are with call back methods that run in a different thread Apr 02 07:03:17 nope Apr 02 07:03:22 g00s: ok, so Android doesn't have a subset of those by default? Apr 02 07:03:29 phix probably because its IPC, you have no choice Apr 02 07:03:46 no - thankfully it does not Apr 02 07:04:06 <_genuser_> reverse list? Apr 02 07:04:13 g00s: ok but are there helper classes to handler waiting, locking and what not? Apr 02 07:04:45 _genuser_: yeah, I guess I could use java.util.Collections but that isn't as good as guava, that library is sexc Apr 02 07:04:59 g00s: or do I need to write that myself?? Apr 02 07:05:01 <_genuser_> phix: sorry, I was just tryhing to understand what a reverse list is. Apr 02 07:05:25 phix getAccountsByTypeAndFeatures takes a handler that you provide Apr 02 07:05:30 _genuser_: A list that returns the last item first, then the 2nd last item, and so on Apr 02 07:05:39 _genuser_: when you iterate it Apr 02 07:05:53 https://gist.github.com/fkspro/f182d00a889437d11601 Apr 02 07:05:57 <- worst java coder Apr 02 07:06:07 g00s: yes but it is in a different thread, or does it block?? Apr 02 07:06:08 i'm way too happy that i can just make blocking web requests now Apr 02 07:06:11 <_genuser_> phix: I see. I have typically always thought of a list as something where I can get whatever element I want. as opposed to queues, etc where you retrieve in acertain order Apr 02 07:06:36 phix of course it does not block. you can put it on whatever thread you want (as long as it has a looper) Apr 02 07:06:46 phix ... gotta deal with async on android, no getting around it Apr 02 07:06:49 just gotta wait for procedural style to become popular again Apr 02 07:07:03 haha speaking of... Apr 02 07:07:24 g00s: no that is fine, I will just just have to create a wrapper class that has a lock Object and do some wait()ing Apr 02 07:07:50 g00s: I just didn't want to reinvent the wheel if it already existed in Android Apr 02 07:08:03 myke wth is that :| Apr 02 07:08:28 myke: Lets Java! Apr 02 07:09:41 mmmm Apr 02 07:09:46 nice to have a comprehensive gitignore file Apr 02 07:09:53 I hate committing shit I dont understand Apr 02 07:10:36 the company I work at are getting me a new Mac today, been using my own since I started about 20 days ago Apr 02 07:10:42 Im moving up in the world guys, oh yea Apr 02 07:11:05 joke's on them! huhu I have no idea what Im doing Apr 02 07:11:13 <_genuser_> anybody want a job? Apr 02 07:11:22 you can't ask that here Apr 02 07:11:25 it's against the rules brah Apr 02 07:11:45 <_genuser_> oh, I was going to joke that I'm looking for an assistant to handle my boring stuff, lol. Apr 02 07:11:53 oh Apr 02 07:12:07 why what do you do usually Apr 02 07:12:07 <_genuser_> heh, does'nt pay much but you get to do my chores, lol. Apr 02 07:12:12 code? Apr 02 07:12:23 g00s: you like it?? Apr 02 07:12:28 <_genuser_> boring work meant, write checks, pay the bills, do my laundry etc. for work I code, yes Apr 02 07:12:53 g00s: now i can write tasks alongside my activities that go with those activities, keeping code/logic coupled in the source Apr 02 07:13:05 and i can just block on web requests (or whatever) Apr 02 07:13:18 lolwut Apr 02 07:13:31 lolwut * 10 Apr 02 07:13:47 coupled in the source Apr 02 07:14:02 damn it myke , i laughed so hard i inhaled a lentil Apr 02 07:14:03 a movie about two lovers who code Apr 02 07:14:06 they met at Google IO Apr 02 07:14:13 haha Apr 02 07:14:15 lel Apr 02 07:14:18 _genuser_: I was talking about iterating the list Apr 02 07:14:23 not random access Apr 02 07:15:44 if java had coroutines i'd just be yielding() in onCreate() until my web request came back Apr 02 07:17:05 <_genuser_> phix: understood. I just commented that I thought of lists that way. but of course, each dev has his own needs. Apr 02 07:17:29 <_genuser_> phix: for example I need a hashtable where I could retrieve in order of insertion. typically that's not a hashtable. but I found one data struct eventually. :) Apr 02 07:17:40 _genuser_: no, that is a TreeMap :) Apr 02 07:17:46 in Java world Apr 02 07:17:52 to keep some type of ordering Apr 02 07:18:37 <_genuser_> phix: I went with LinkedHashMap since it offered what I needed. :) Apr 02 07:18:53 same with List too (in Java), ArrayList gives you random access, LinkedList is typically serial, HashSets are serial but has a faster response for contains Apr 02 07:19:06 _genuser_: Shibby Apr 02 07:19:15 <_genuser_> shibby? Apr 02 07:20:52 any good ideas on how to debug if alarmmanager is firing or not? without having the device hook up to my dev box that is Apr 02 07:23:12 uuh.. is your activity going to be open? Apr 02 07:23:24 surely the cat is logging it Apr 02 07:23:27 make a dummy activity that changes background color Apr 02 07:23:30 but there is that ^^ Apr 02 07:23:38 but it requires hooking up your device to the box Apr 02 07:23:52 which shoul dbe as simple as a USB cord Apr 02 07:24:09 or you could.. play an alarm sound.. Apr 02 07:24:30 myke, problem with cat is that this happens at midnight, and when i wake the log has flushed Apr 02 07:24:35 make it vibrate.. call your mom.. Apr 02 07:24:40 make it text yourself Apr 02 07:24:43 or send an e-mail Apr 02 07:24:55 or just change bg color.. so when you come back it’s changed Apr 02 07:25:10 asperon: dunno what you're devving on but on linux you can pretty trivially logcat to a file Apr 02 07:25:19 set a pref Apr 02 07:25:33 log it to a file.. Apr 02 07:25:39 myke, the thing is that i dont want to have it hooked to my box, i just want to have the logs so that i can look at them in the morning Apr 02 07:25:50 asperon: run an emulator? Apr 02 07:26:02 so many suggestions Apr 02 07:26:17 i'm sad g00s doesn't like my code Apr 02 07:26:23 myke, this only ever happens if the device is sleeping, can you force the emulator to sleep? Apr 02 07:26:32 myke, that can be hard Apr 02 07:26:57 it's basically the same thing android does, but i cut out the handler middleman and fire off each task on a separate thread instead of a looper queue Apr 02 07:27:10 asperon, log it to a file on external storage or somwehre you can get to Apr 02 07:27:11 with some horrible type abuse thrown in for the lulz Apr 02 07:27:26 also cuz i suck at java and have no idea what i'm doing Apr 02 07:27:32 tricknology, and how would you do that? since you cant access the logs anymore since 4.1 Apr 02 07:27:42 to external storage Apr 02 07:27:49 there is a space which is common to all apps Apr 02 07:27:53 and you can push/pull from there Apr 02 07:28:02 tricknology, i am aware, but how would you access the system logs Apr 02 07:28:12 wait, if it's sleeping your widgets will get turned off won't they? Apr 02 07:28:26 you can design an activity to pull them and display them on your phone Apr 02 07:28:30 in a scrillview perhaps.. Apr 02 07:28:31 can't you ask for sticky alarms? Apr 02 07:28:36 whatever those are called in android Apr 02 07:28:48 Context.getExternalFilesDirs() Apr 02 07:28:56 will give you the directories you can work with Apr 02 07:28:57 it shouldn't matter that the widget is killed, you can ask for all events since that happened Apr 02 07:29:01 pretty sure Apr 02 07:29:57 this is what happens, at midnight an RTC alarm should fire, if the device is sleeping it will fire when it wakes. The problem is, it sometimes doesn't, from what i can tell from the logs the app is killed, or atleast it is restarted at some point. According to the docs this shouldn't affect the alarms, but it seems like it does, so i would like to se all the logs for alarmmanager to see what it does/doesn't do Apr 02 07:30:00 ah yes myke that feature is neat, but it only fires after wake right/ Apr 02 07:30:01 ? Apr 02 07:30:28 maybe your listener is not getting reset Apr 02 07:30:33 onresume Apr 02 07:30:45 also are you running a service? Apr 02 07:30:48 tricknology, its a service Apr 02 07:30:54 ah Apr 02 07:31:00 bound? Apr 02 07:31:11 http://stackoverflow.com/questions/15451347/android-design-background-long-running-service-or-alarmmanager Apr 02 07:31:38 tricknology, no, not that i know of, onBind returns null, could that be the problem? Apr 02 07:31:48 “Your users will probably kill you if you keep a Service alive continuously draining their phone's battery” sounds about right Apr 02 07:32:03 it could be combounding it if not causing it Apr 02 07:32:23 yes, but this service is started via the alarmmanager (or sometimes not), does an update and then dies Apr 02 07:32:44 so that shouldn't be the problem, i switch it over from a broadcast receiver to try to come to terms with this Apr 02 07:32:44 why not just set the alarm at midnight? Apr 02 07:32:52 or are you saying you don't get that alarm? Apr 02 07:33:05 ^ Apr 02 07:33:07 myke, thats what i am saying ;) Apr 02 07:33:26 are you using the _wakup alarm? Apr 02 07:33:33 _wakeup Apr 02 07:33:40 no Apr 02 07:33:49 that's the problem maybe Apr 02 07:34:10 but i don't want it to wake up, but it wont fire when the device wakes either Apr 02 07:34:14 http://developer.android.com/reference/android/app/AlarmManager.html#RTC_WAKEUP Apr 02 07:34:18 sometimes Apr 02 07:34:28 RTC_WAKEUP Apr 02 07:34:30 wait you don't want it to wake up but you want to run it at midnight? Apr 02 07:34:36 those are incompatible requirements Apr 02 07:34:43 he needs the sticky Apr 02 07:35:05 asperon: what does dumpsys show? and logcat? Apr 02 07:35:09 which is kind of pointless.. he could get time.. and then onresume ask if it has been past midnight.. Apr 02 07:35:24 myke, i want it to run at midnight, or at the earliest waking time after that Apr 02 07:35:26 do you want something to run on the alarm? or just tell you that midnight has passed… I’m confused about your end goal.. Apr 02 07:35:41 Hi guys.. I needed some guidance in how to make use of HTCDev source zip files. I wish to compile an AOSP for my device and I need to understand what goes where. Unlike Sony, HTC doesn't have very clear instructions on their website so I'm hoping that someone here may know a thing or two about it. The source zip has two tarballs in it. One is the "platform" file and the other is the kernel Apr 02 07:35:41 tarball. I'm very new to this and wish to understand how I can use these to build my first very own AOSP ROM.. Please help!! Apologies for my noobish questions. I know this isn't related to "App development" but I really need a reply.. Apr 02 07:35:48 asperon, so not run if it’s sleeping? Apr 02 07:35:50 appel1, i dont really know what logcat shows, since i am sleeping, but dumpsys shows that the alarm is set Apr 02 07:35:56 i think i'm too tired to understand the problem correctly, sorry Apr 02 07:36:04 tricknology, if it sleeping, run when it wakes Apr 02 07:36:35 buggerman, you want to take that to #android-root Apr 02 07:36:52 why not just set the alarm to a time where you are awake and coding so you can test it Apr 02 07:36:58 Thanks @asperon, I'll do just that.. :-) Apr 02 07:37:10 sendStickyBroadcast(Intent) Apr 02 07:37:10 asperon: yes, but does dumpsys alarm show you that the alarm was actually triggered? Apr 02 07:37:22 that broadcast will stick around after the event Apr 02 07:37:27 just in case your shit’s sleeping Apr 02 07:37:33 appel1, is that information in there? did know that, ill have a look Apr 02 07:37:37 and misses the broadcast Apr 02 07:37:39 asperon ^^^ Apr 02 07:38:13 whatitis, since it happens very random, i have never been able to provoke it while running on the dev box etc, it just happens roughly 10% of the time, always at night Apr 02 07:38:19 asperon: I think so, but maybe I remember wrong Apr 02 07:39:05 asperon: http://stackoverflow.com/questions/3490913/what-is-a-sticky-broadcast Apr 02 07:39:15 If you are listening for this broadcast in an Activity that was frozen (onPause), you could miss the actual event. This allows you to check the broadcast after it was fired (onResume). Apr 02 07:39:17 “” Apr 02 07:39:20 this is what you want Apr 02 07:40:31 how would a sticky broadcast help with starting a service? Apr 02 07:40:39 tricknology, its not a broadcast, it starts a service that in turn sends a broadcast to the widget Apr 02 07:41:17 yeees so that broadcast should be sent using sendStickyBroadcast(Intent) Apr 02 07:41:23 asperon ^ Apr 02 07:41:25 appel1, i really cant tell from the dumpsys if it has run, since it is a repeating and it looks like this: +5ms 0 wakes 2 alarms: *alarm*:se.catharsis.android.calendar/.UpdateEvent Apr 02 07:41:37 tricknology, which broadcast is that? Apr 02 07:41:49 it starts a service that in turn sends a broadcast to the widget Apr 02 07:41:56 asperon: doesn't 2 alarms mean that it has been triggered twice? Apr 02 07:42:05 “the \service that in turn sends a broadcast to the widget” Apr 02 07:42:06 appel1, probably, but since when Apr 02 07:42:20 asperon: device boot probably Apr 02 07:42:28 instead of sendBroadcast(intent) use sticky Apr 02 07:42:56 in onresume check to see that you haven’t already received the intent though Apr 02 07:43:23 removeStickyBroadcast(intent) Apr 02 07:44:03 How do I make rotate animation along Y axis in android 2.3.3 API 10? Apr 02 07:44:30 RotateAnimation Apr 02 07:44:33 since api 1 Apr 02 07:44:37 I updated Eclipse and now it won't see Genymotion in the device chooser. Looks like others have had this problem but the answer doesn't work for me :( http://stackoverflow.com/questions/26158118/genymotion-devices-not-working-in-eclipse-on-os-x-yosemite-solved Apr 02 07:44:47 tricknology, problem is, the service is never started, so how i send the broadcast to the widget wont really matter Apr 02 07:44:55 why is that? Apr 02 07:45:33 i dont know, that is what i am trying to find out Apr 02 07:45:53 you want to start a service when the alarm starts? Apr 02 07:46:04 pretty sure you need to start a service from an activity Apr 02 07:46:24 so you need to wake your device, start the service, and put it to sleep maybe? Apr 02 07:46:42 the alarmmanager can either start a service or send a broadcast, i am using the service one to make sure that i don't get killed if i take to long (this is a change from earlier just to make sure that this wasn't the problem) Apr 02 07:47:28 does it really need to run a service? Apr 02 07:47:44 i say send a stickybroadcast and receive and remove it onResume Apr 02 07:47:47 in your app Apr 02 07:47:49 no, it doesn't, it was just a way to remove one source of the problem Apr 02 07:48:50 AlarmManager>>stickyBroadcast(intent)>>onResume() { checkBroadcast(intent); removeStickyBrodcast(intent) } >> done Apr 02 07:49:24 sounds like you made it a bit more difficult Apr 02 07:49:31 what could cause on one device to keep screen on while my app works, while on the other devices it works? Apr 02 07:49:36 i clear flag keep_screen_on Apr 02 07:49:41 tricknology, ill have a go at that, thanks Apr 02 07:49:49 asperon no problem, good luck Apr 02 07:50:09 Ashiren. what works? screen off? Apr 02 07:50:19 yes Apr 02 07:50:24 on one device it keeps on Apr 02 07:50:41 check the display settings Apr 02 07:50:47 i did Apr 02 07:50:48 screen timeout Apr 02 07:50:53 and sleep Apr 02 07:51:01 also usb screen awake is off Apr 02 07:51:05 and maybe stay awake while pluged Apr 02 07:51:06 ah Apr 02 07:51:13 also it keeps on unplugged Apr 02 07:51:22 it seems just my app Apr 02 07:52:00 tricknology, can a pending intent be sticky? Apr 02 07:53:05 im not sure Apr 02 07:53:10 try it i guess Apr 02 07:53:16 Ashiren I don’t know :( Apr 02 07:53:18 since the alarmmanger uses pending intent Apr 02 07:53:27 :c Apr 02 07:53:31 doesn't look that way :| Apr 02 07:53:55 can you cast the pendingintent to intent? Apr 02 07:55:14 looks like PendingIntent does not extend Intent: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/app/PendingIntent.java Apr 02 07:55:35 wot Apr 02 07:55:35 unlikely Apr 02 07:55:44 they just implement parcelable Apr 02 07:56:15 but im confused as to why you need to to run at midnight? Apr 02 07:56:26 sticky will just wake up and see that the broadcast has been sent Apr 02 07:56:36 you could as well check if the time is after the target time Apr 02 07:57:32 tricknology, what i need is for the alarmmanager to do as i tell it, if i want to run at midnight or at the first wake after, i want to run at midnight or the first wake after ;) Apr 02 07:58:20 AlarmManager.RTC_WAKEUP Apr 02 07:58:29 since its a widget it really never "wake up and see that the broadcast has been sent" Apr 02 07:58:29 will wake your device up.. it will make sure it runs at midnight Apr 02 07:58:36 tricknology, but i dont want to wake it Apr 02 07:59:00 then I don;t see how you’re going to get the alarm unless you send a sticky broadcast before the alarm Apr 02 07:59:06 hmm, wtf it seems continous bluetooth le scan is causing device to keep screen on Apr 02 07:59:10 this device* Apr 02 07:59:25 BLE? Apr 02 07:59:32 eeyup Apr 02 07:59:45 yippie.. Apr 02 07:59:56 g00s has had a wonderful time with BLE Apr 02 08:00:03 tricknology, the whole point of the alarmmanager is to schedule broadcasts/starting of services no matter if your application is running or not, and this is what i want, at midnight, and at some other times during the day, i want android to run some of my code, which in turn updates the widget Apr 02 08:00:08 i haven’t gotten into it at all. still on the oldschool BT Apr 02 08:00:10 i have all wonderful time with ble Apr 02 08:00:27 try it Apr 02 08:00:37 no ble devices Apr 02 08:00:50 still you scan Apr 02 08:00:51 its just that it doesn't do so realiably and i just cant seem to get a handle on the problem, since its so random Apr 02 08:00:52 can Apr 02 08:01:30 if you start the broadcast and your application is paused what is going to recieve it? Apr 02 08:02:18 tricknology, when the alarmmanager fires, it should start the service that i have told it to start, and it will in turn send a broadcast to the widget, which runs in the home screen process and therefor is always there Apr 02 08:04:12 sorry man, I don’t know enough to help Apr 02 08:04:22 tricknology, no worries Apr 02 08:04:46 wish i could Apr 02 08:17:06 can anyone tell me how do I get my data downloaded via AsyncTask back into my main UI thread? Apr 02 08:17:41 I have read it on StackOverflow but the solution requires me to move everything inside onPostExecute() Apr 02 08:18:57 yeah Apr 02 08:19:02 no, solution requires you to move everything that must be on main thread in onPostExecute Apr 02 08:19:12 that's why it's there Apr 02 08:21:22 oowkay Apr 02 08:21:51 So i'll have to update everything inside onPostExecute.. I'll give it a shot Apr 02 08:22:01 Mavrik: Thanks Apr 02 08:33:20 I am using this to layout my view view.layout(0, 0, width, height); and draw it to canvas but text is cutted even when I set big enough height. It never wraps, any ideas? Apr 02 08:35:16 did you perhaps skip the measure phase? Apr 02 08:37:01 Mavrik: I am measuring Apr 02 08:38:49 Mavrik: this is my code http://pastebin.com/fj8DAN4f Apr 02 08:40:56 oh, introduce measure spec width fixed my problem Apr 02 08:40:57 int specWidth = View.MeasureSpec.makeMeasureSpec(width, View.MeasureSpec.EXACTLY); Apr 02 08:49:38 https://github.com/fkspro/android-tinyasync Apr 02 08:49:47 apologies in advance, esp to Jake Apr 02 08:54:33 Hi, I am using this plugin https://github.com/phonegap-build/PushPlugin the notification icon displayed on the top of the device is always white I have found a workaround to downgrade targetSdkVersion="20" instead of 21 : but How I can fix the icon and use Version 21 ? http://stackoverflow.com/questions/28387602/notification-bar-icon-t Apr 02 08:54:33 urns-white-in-android-5-lollipop thanks Apr 02 08:54:48 http://stackoverflow.com/questions/28387602/notification-bar-icon-turns-white-in-android-5-lollipop Apr 02 08:55:15 senayar, icons on top are always white on Android 5.0 Apr 02 08:55:41 and people will be pissed off if you'll fake that Apr 02 08:56:14 If I use SdkVersion="20" the icon is displayed well on my device with lolipop 5.0 Apr 02 08:56:41 so I am assuming they changed how the icon is grabbed Apr 02 08:56:58 no Apr 02 08:57:06 they explicitly changed how icon is displayed Apr 02 08:57:27 <_genuser_> I just realized, I don't really need to use try/catch in most of my code. Apr 02 08:58:01 I have also found this thread and tried this : http://stackoverflow.com/a/20620133/861206 but does not help Apr 02 08:58:11 senayar, and since 5.x they explicitly want you to have white icons in the app Apr 02 08:58:15 well thank you Mavrik I will wait the next release Apr 02 08:58:21 it's not a bug Apr 02 08:58:39 the only reason why target 20 works is for backward compatibility Apr 02 08:58:56 _genuser_, does that mean that your app will crash at error or that you write good code? :P Apr 02 08:58:56 but why... how user can identify the application notification Apr 02 08:59:11 get a distinct icon shape Apr 02 08:59:13 senayar, the same they do for any other app on 5.x Apr 02 09:00:52 <_genuser_> Mavrik: well, I put try/catches in _all objects_. but then caller has no way ot knowing what happened unless I throw it again. or save it. Apr 02 09:01:05 yeah that's terrible Apr 02 09:01:07 :) Apr 02 09:01:16 unless you return some kind of different failure state Apr 02 09:01:22 <_genuser_> Mavrik: so now, I've started moving my code to the point where helper utils, and function objects don't have _any_ try catches unless I need to react to an error. Apr 02 09:01:50 <_genuser_> Mavrik: and the caller (mostly activities) will have try/catches all over so it can display errors to users, or react to it. Apr 02 09:02:11 senayar http://developer.android.com/design/patterns/notifications.html "Don't Use color to distinguish your app from others. Notification icons should only be a white-on-transparent background image." Apr 02 09:02:14 <_genuser_> otherwise, I was starting to add onError events to my objects and thinking this is going backwards. Apr 02 09:02:20 yeah, hiding errors isn't really a good practice :) Apr 02 09:02:33 I just explicitly add "throws" statement to document possible error conditions Apr 02 09:02:38 when it makes sense Apr 02 09:02:59 thank memorion I am uploading some screen to show you the weirdness... Apr 02 09:03:07 <_genuser_> Mavrik: it used to come in handy with VB6 where the entire runtime would crash. I'd put "on error resume next" in _every_ function. Apr 02 09:11:15 What is the best way of showing dialogs? Apr 02 09:11:35 I mean, what is the best practise? Apr 02 09:11:59 SneakerXZ: new AlertDialog.Builder(context).setTitle().setMessage().show() Apr 02 09:12:11 *build().show() Apr 02 09:13:13 SneakerXZ: http://developer.android.com/guide/topics/ui/dialogs.html Apr 02 09:14:22 thepoosh: it mentions two ways, fragments and builder Apr 02 09:14:34 I have a scrollview with a vertical linearlayout which has a couple more inside. the first nested linear layout takes the whole screen (match_parent), same for the second nested linear layout. somehow they wont scroll, I can only see the first one. what could be the problem? Apr 02 09:15:04 thepoosh: the builder needs also DialogFragment? Apr 02 09:15:19 content takes the whole screensame here, whole screen Apr 02 09:15:28 Mattx: use pastebin Apr 02 09:15:44 SneakerXZ: just do one of them, both are fine Apr 02 09:15:54 gotta love BLE Apr 02 09:16:09 why on earth is keeps showing error 133 on characteristic read Apr 02 09:16:10 thepoosh: so it possible to have dialog without fragment? Apr 02 09:16:24 AlertDialog Apr 02 09:17:31 timeout is so looong.. well here : https://drive.google.com/drive/u/0/folders/0Bz7wIbQrFzdoflhJMkFDcE8xRUh6dG1fLW9uU3g5dWZrU3p4V0RnMEtJRVl2VnpQSFNRb1k for the icons difference between Android SDK20 & 21 Apr 02 09:18:30 just use the read thing in the square as the icon for lollipop Apr 02 09:18:33 So we need to make a white ugly icons :) Apr 02 09:18:56 you can set a custom background color Apr 02 09:19:10 https://gist.github.com/anonymous/d2968dbcbd75fb067fbb Apr 02 09:19:19 this is the layout ^ Apr 02 09:19:26 thepoosh: thanks Apr 02 09:19:30 I'm sorry, one sec. have to do some changes Apr 02 09:19:55 <_genuser_> drat, I have discovered facebook. Apr 02 09:20:26 here it is: https://gist.github.com/anonymous/17ba70ca7347b557f2d6 Apr 02 09:20:29 ok memorion, I will read the documentation and try to make one. Thank for the clarification Mavrik & memorion Apr 02 09:20:43 I can only see the layout with ID card1 Apr 02 09:20:53 card2 won't appear, I can't scroll for some reason Apr 02 09:20:56 senayar here are the guidlines for the icon itself http://developer.android.com/design/style/iconography.html#notification Apr 02 09:21:01 Hi! Apr 02 09:21:28 Does anyone tried to add widget without using the widgetapp picker ? I'd like to create a view with app widgets but only those I want (no picker) Apr 02 09:22:25 ektos, have a look at the launcher code, since it is the one that creates the widget view Apr 02 09:22:51 can anyone have a look at the layout? I can't find the error, already spend a couple of hours on this -.- Apr 02 09:22:55 spent * Apr 02 09:25:59 Mattx, if you put anything in linearlayout with match_parent it'll of course expand to fill the parent Apr 02 09:26:04 doesn't matter what else is there Apr 02 09:26:11 so use wrap_content Apr 02 09:27:08 I want card1 and card2 to match_parent, each one should be the size of the screen Apr 02 09:27:15 that's why I want them to scroll Apr 02 09:28:59 Mavrik, how would you do that? Apr 02 09:29:42 huh. Apr 02 09:30:00 asperon: I did but they're using a dialog picker with to get the intent data Apr 02 09:30:06 probably with a custom view Apr 02 09:30:35 asperon: I'd like to build that without allowing the user to pick the widget Apr 02 09:30:35 ektos, but you must be able to see how they retreive the widgets, just do the same and filter the list Apr 02 09:31:19 asperon: Ok I'll keep searching thanks anyway :) Apr 02 09:32:26 Mavrik, I didn't get why this wouldn't work Apr 02 09:32:50 card1 is the size of the screen, below it there is card2, why wouldn't it scroll? Apr 02 09:32:50 Mattx, why would it work Apr 02 09:32:57 Mattx, you're saying "match parent" Apr 02 09:33:00 parent is the scrollview Apr 02 09:33:06 the "screen" doesn't come into account anywhere Apr 02 09:33:07 ah, wait Apr 02 09:33:14 the paren't isn't the layout with id menu? Apr 02 09:34:12 I was expecting #menu to be the parent of #card1 and #card2 Apr 02 09:34:15 * Mattx is confused Apr 02 09:34:38 Mattx, ah, yes it is Apr 02 09:34:50 Mattx, still, where did you expect the "screen" to come into the play? Apr 02 09:35:00 you're telling the top "hey, be as big as your content requires it" Apr 02 09:35:06 and then the child "fill the full parent" Apr 02 09:35:12 and the sibling as well Apr 02 09:35:20 but #menu is twice as big as the scrollview Apr 02 09:35:28 that's why I assumed it should scroll Apr 02 09:36:19 Mattx, where do you set the twice as big? Apr 02 09:36:39 well, of course I'm wrong because it's not working, but I believed #menu is that big because it has #card1 and #card2 inside Apr 02 09:37:13 and each of them is the size of the.. whole thing Apr 02 09:37:18 :) Apr 02 09:37:27 Mavrik, can't you think of any workaround? Apr 02 09:39:06 inflate linearlayout into scrollview programmatically and set it's site to visible activity area Apr 02 09:39:42 that or manually set linearlayout/card sizes after layout to the visible activity area size Apr 02 09:39:54 the second one is easier but will require multiple layout passes Apr 02 09:41:24 ok, I'll try, thanks! Apr 02 09:53:12 This is a great post on how to deal with OutOfMemory Exceptions for bitmaps on Android http://stackoverflow.com/a/6779164/658718 Apr 02 09:53:30 I am still a bit unsure about the System.gc() call, I mean usually that should not be necessary, should it Apr 02 09:55:03 Morning all. I have a view containing weekly information to which I have added a SimpleOnGestureListener so that the user can swipe left or right to advance or go back a week. Apr 02 09:55:12 I'd like to add some sort of transition effect to make it more obvious to the user that the swipe is having an effect. I think a ViewPager might be what I need, but that seems to work with a fixed number of pages ( getCount() ), and my view does not have a fixed number. Apr 02 09:55:21 Can anyone point me in the right direction? :) Apr 02 09:58:35 Hi guys! Does anyone know the goldstandard of switching fragments during runtime? Apr 02 10:21:11 weird.... Android Studio cannot import android.content.SharedPreferences.... shows it in red... Apr 02 10:28:32 Is it possible to build a AppWidgetProviderInfo from an application package info Apr 02 10:28:32 weird... android studio cannot import android.content.SharedPreferences. no idea why. Apr 02 10:31:59 had to import by hand. Apr 02 10:40:18 I am using gradle for android build. gradle 2.3 and android plugin 1.0.0. the compilation fails not sure why it complains cannot find the constructor even though its present. Apr 02 10:44:14 can I compile without android studio ? Apr 02 10:44:23 I mean android sdk I have on system Apr 02 10:46:31 I think you should be able to do a gradle build from the command line Apr 02 10:46:46 gradle build Apr 02 10:46:51 gradle clean build Apr 02 10:46:53 for example Apr 02 10:58:00 amugofjava: I have been doing that Apr 02 10:58:09 but I am getting strange compile error Apr 02 10:59:01 I have class RestClient with two constructors and I use from another class the RestClient(Context) constructor and it complains...expected () and found one with Context. Apr 02 10:59:25 its unable to find the non-default constructor Apr 02 10:59:33 explicitly define one then? Apr 02 11:00:03 I tried ...I have defined both, one but it still cannot work...it just expects default constructor it seems Apr 02 11:00:16 or to say it just wants defautl constructor Apr 02 11:00:44 client class as if cannot use non-default constructor Apr 02 11:00:53 meaning parameterless Apr 02 11:02:06 reason: actual and formal argument lists differ in length Apr 02 11:02:14 alll errors show this as reason Apr 02 11:04:05 same code works with old version of gradle and android-plugin Apr 02 11:04:31 I tried to upgrade to latest gradle and android-plugin fixing all things mentioned on plugin site for migration Apr 02 11:04:32 гпп Apr 02 11:04:34 hmm* Apr 02 11:04:35 weird Apr 02 11:05:46 any idea how i can pass a custom list to intent ? Apr 02 11:05:54 serializable and parcelable gives me cast exception Apr 02 11:08:38 hello Apr 02 11:09:07 does any one know if ARC was available for general use only yesterday/day before when it was announced that it supports all OSes? Apr 02 11:09:13 or could one already do stuff with it before Apr 02 11:09:15 what's a "custom list"? Apr 02 11:09:36 is it a parametrized list? Apr 02 11:09:51 sci-fic, convert it to json, pass that, convert back Apr 02 11:09:56 your class has to be serializable or parcelable Apr 02 11:10:29 no need to do that conversion if the objects are easily serialized Apr 02 11:11:01 there is huge data, i dont want to serialize it Apr 02 11:11:43 im just creating this maybe this works public class ParcelableList extends ArrayList implements Parcelable Apr 02 11:12:16 why don't you keep it somewhere staticly instead Apr 02 11:12:49 if it is really large as you say Apr 02 11:37:13 I keep getting java.lang.cast errors which I can't figure out. It tells me that button cannot be cast to editText. It's declared as EditText, the element is an edit text. I wonder why it thinks it's a button. Apr 02 11:38:56 Tobbi_: it's saying that because you are trying to cast a button to an edittext. Apr 02 11:38:57 ~ show us Apr 02 11:39:09 oh, no bot in here. Show us your code. Apr 02 11:40:10 sonOfRa: Line 20, line 43 http://pastebin.com/2X4pkf0P Apr 02 11:40:31 Tobbi_, you're probably using the wrong id Apr 02 11:40:40 hmm, let me have a look. Apr 02 11:40:55 findViewById(R.id.textfield_value_field); is returning a button Apr 02 11:41:04 So something is wrong with your layout Apr 02 11:42:29 Hmm... Apr 02 11:42:30 Tobbi_: like 20 is not relevant at all. The error is that findViewById returns Button and you try to cast it to (EditText) Apr 02 11:42:57 Alright. Apr 02 11:43:03 So, it's gotta be my layout. Apr 02 11:43:08 I should probably redo it. Apr 02 11:43:20 Tobbi_, maybe maybe you've copy pasted your id to a button Apr 02 11:43:28 Tobbi_: just go to R.id.... and press go to declation Apr 02 11:43:37 Ah, yeah. Apr 02 11:44:34 icedp: That gives me its ID. Apr 02 11:51:11 icedp, iprime, sonOfRa: I fixed it by deleting R.java. After it recreated it, everything works again. Apr 02 12:11:08 I don't get it, you're supposed to call bitmap.recycle() if they are not used anymore, but when I return to an activity which then agains tries to draw the bitmaps I get tried to draw with recycled bitmao Apr 02 12:11:22 hard to imagine when to call bitmap.recycle then Apr 02 12:13:48 hm? Apr 02 12:13:53 make the reference to null Apr 02 12:14:28 recycle is recommended for <2.3 Apr 02 12:14:39 even <=2.3.3 Apr 02 12:15:13 Ashiren: my method drawableToBitmap() seems to return the same bitmap all the time Apr 02 12:15:25 different object id, but still I get isRecycled() true Apr 02 12:15:44 (which is expected if the width and height is the same as per documentation) Apr 02 12:16:06 as from yesterday com.android.support:appcompat-v7 I have been dealing with - here is some information if anyone interested. Can you please look at my comment and tell me whether or not are you observing same logcat W/E output? Thanks Apr 02 12:16:15 https://code.google.com/p/android/issues/detail?can=1&start=0&num=100&q=stopNestedScroll&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=91424 Apr 02 12:20:25 looks like implementing toolbar in a BaseActivity is the new way to get ActionBar on Android. You finish reading a 600 pages book on Android only to discover things have moved on. Apr 02 12:21:58 bolovanos: Those are not errors, that's just debug logging from the vm telling you that certain methods don't exist. Probably because you're running on an older api level. The methods aren't actually called unless they exist, so it's not an error Apr 02 12:29:26 SimonVT, forgot to mention - tested on API 19, KitKat 4.4.2. Not sayin those all are errors, they r warnings. What does those warnings mean "incorrectly overrides" , "unable to resolve virtual method"...? Apr 02 12:29:46 SimonVT, when it comes to errors ... "E/ViewRootImpl﹕ sendUserActionEvent() mView == null" Apr 02 12:30:14 I had that problem a few years back donniezazen - buy the time I had finished the book, a lot of things had changed and I had to start again :) Apr 02 12:31:31 "unable to resolve virtual method 12215: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V" Apr 02 12:31:45 onStopNestedScroll was not added until api21 Apr 02 12:32:16 Just logging telling you that it doesn't exist Apr 02 12:32:47 The method is not called unless it actually exists, so it's not an issue Apr 02 12:33:21 If you attempted to call it, your app would crash Apr 02 12:35:28 amugofjava: yeah and the books tend to be easy because they give you something to begin with. In the real world you are on your own. Apr 02 12:42:08 Some of them are good for reference donniezazen: but I've found online courses more helpful in getting my first app built and released :) Apr 02 12:42:15 My application has an acitivty with navigationdrawer and a database. My question is if it is ok to keep the database open as long as the activity is in the foreground? I mean the user will change Fragments but even if the db is not used, it will kept open. Apr 02 12:43:13 SimonVT, ok - it was an easy how to example with ambition to show ActionBarActivity implementation. what does it mean for me? Apr 02 12:43:16 do you often read/write from the db? if so it might be ok Apr 02 12:47:45 bolovanos: It means nothing for you, it's handled entirely by the support library Apr 02 12:51:29 SimonVT, thx for calming me down Apr 02 13:09:16 relativelayout clipchildren isnt working Apr 02 13:09:20 any ideas? Apr 02 13:11:40 be more precise Apr 02 13:12:08 i have a relativelayout with clipchildren and cliptopadding both set to false that seems to be clipping Apr 02 13:12:15 Anyone have any ideas on implementing an ExpandleListView, where each item is also Swipeable (in order to show some elements like delete). Apr 02 13:12:19 ive set every view i can find to the same settings and still getting clipping Apr 02 13:14:09 Ashiren: i have the view set with a rotation, and that’s pushing it out Apr 02 13:16:09 Is there a painless way to read colour of parts of the screen? I have an app with an overlay that ends up above another app - my overlay needs to move when parts of the app it is overlaying move. Apr 02 13:21:02 Hi all, i have a simple question about PID/UID, it is possible to extract calling uid from pid information? Apr 02 13:22:04 ahh Apr 02 13:22:07 i have a fragment Apr 02 13:22:13 and i think it’s injecting an extra framelayout Apr 02 13:40:29 Ashiren: i had to do this: http://stackoverflow.com/questions/22930626/clipchildren-is-not-working/22930854#comment47001266_22930854 Apr 02 13:40:30 :( Apr 02 13:40:53 it must be a support library bug, that the clipToChildren flag isn’t carried Apr 02 13:41:30 :((( Apr 02 13:42:19 just trying out the latest support library, but i was on 21.0.3 so im not hopefuly Apr 02 13:42:23 hopeful* Apr 02 13:47:07 Ashiren: AHA! it did fix it! wowza Apr 02 14:00:18 Can anyone please tell me how I can compile Android ART on Linux and test it on dex files? Apr 02 14:08:35 you don't, abhijangda_ Apr 02 14:11:34 @pfn, so how do i test ART, i've got the source code. Unfortunately the README isn't much of any help Apr 02 14:11:57 abhijangda_, on device or emulator Apr 02 14:12:18 yeah you don't really run art on a pc Apr 02 14:13:26 @dragorn: i have done changes in the ART source code, so how do u suggest to test those changes? Apr 02 14:14:21 abhijangda_, compile your own rom Apr 02 14:15:58 art runs on the device to recompile the dex bytecode into a local elf Apr 02 14:27:04 hi Apr 02 14:37:18 Hey all. For those of you who have worked with the NDK, back awhile ago there used to be a bunch of detailed documentation in text files. Now they've changed the docs up to be HTML but they are severely lacking some of the information available in the previous docs. Does anyone know what happened to the old documentation? Did they just remove it? Apr 02 14:37:58 can I set layout_height in style? Apr 02 14:39:26 hi,my listview first 4 items click listener works properly,when i click after these 4 items, listview.getChildAt(position) gives me null view Apr 02 14:39:34 what could be the problem? Apr 02 14:40:40 icedp, sure Apr 02 14:41:13 sci-fic, why do you even listview.getChildAt? Apr 02 14:46:59 i need to get viewholder Apr 02 14:53:39 iprime: doesn't seem to work "You must supply a layout_height attribute." Apr 02 14:55:46 do you have something like this in your style item: match_parent Apr 02 14:56:30 yeah sure, but still it catches a runtime error Apr 02 14:57:45 iprime: seems it not possible http://stackoverflow.com/questions/17080504/setting-layout-width-layout-height-using-a-style Apr 02 14:59:00 hmm Apr 02 14:59:03 that's strange Apr 02 14:59:08 because i successfully use it in some project Apr 02 14:59:55 e.g. here's my textview in the xml: Apr 02 15:01:01 stupid question. If I pushed an app version with more permissions, and then pushed an update with the same number of permissions prior to the update would the app auto-update still? Apr 02 15:01:02 well, that's strange. Apr 02 15:01:07 iprime: Apr 02 15:01:22 what are your min/target sdk? Apr 02 15:01:42 14 min 20 max Apr 02 15:01:57 iprime: 15/21 Apr 02 15:02:08 icedp, 17/21 here, wonder if that has to do with it Apr 02 15:02:11 brb Apr 02 15:07:02 Solarnum: what's the problem? you unintentionally included unneeded permission? Apr 02 15:10:21 What do you guys use for wireframing? I have been checking out various like Balsamiq, NinjaMock, Fluid, Draw.io. There doesn't seem to be good ones that support Android well. Apr 02 15:12:36 icedp: I had a beta version of my app and I pushed an update a month ago that included another permission for accounts. We ended the beta now and put out a new package so I'd like to point as many people as I can to that. Apr 02 15:15:54 Will someone who understands Framelayouts and fragments lend me a hand in figuring out some wierd behaviour? Apr 02 15:18:53 icedp: basically, I want to know if removing the permission that not everyone accepted will still require that people confirm the app update or if it will just do it automatically. Apr 02 15:19:07 iprime:i guess its a bug,and googled it and it is Apr 02 15:31:01 sci-fic, huh? child at is max number of visible views Apr 02 15:42:40 pfn:yes ive realized :D position-firstivisiblepos is worked Apr 02 15:46:11 For a new Android project that uses an API. What do I do when android-async-http 1.4.6 and 1.4.7 are still using deprecated packages from Apache? Is there a way I can use 1.5 or something? Apr 02 15:54:01 anyone use http://www.jsonschema2pojo.org/ often? Apr 02 15:54:04 is it reliable? Apr 02 15:54:09 I guess I'll just compile 1.5 myself. Apr 02 15:54:32 mrfu, why would you need to use that? Apr 02 15:56:36 because code generation saves time when it works reliably Apr 02 15:57:08 iprime: sry I didn't answer before. Apr 02 15:58:11 it looks like it will automatically line up the names for Gson as well which is a hassle by hand Apr 02 16:06:45 mrfu: why do you need to do it? in cases I fetch json from webservice I just use retrofit Apr 02 16:07:53 but you need a pojo to store that data in as well don't you? Apr 02 16:07:53 mrfu, i looked at it before. I think i generated a pretty giant but simple config json response that I was looking at Apr 02 16:08:05 seemed to work well. I.e. I haven't had any problems with it. Apr 02 16:08:28 but again, it was all primitive types. Unsure how it handles custom classes Apr 02 16:08:32 Does anyone know how to use https://github.com/loopj/android-async-http/tree/1.5 (1.5, not 1.4)? Apr 02 16:09:45 Fuck it, deprecated all the way. Apr 02 16:09:59 I'll change when they bother. Apr 02 16:11:24 donniezazen: I would like to here what other use for wireframing as well. I just stick with a pencil for now Apr 02 16:11:38 Muchoz: doesn't OkHttp have async requests in it? Apr 02 16:11:44 yes Apr 02 16:12:41 mrfu, guess I'll give OkHttp a try. Apr 02 16:26:23 Anyone know the hotkey for generating code like if/else, switch statements and such in Android studio? I can't find it in the hotkey list Apr 02 16:30:17 ugh, how do I debug non-main threads crap on android Apr 02 16:30:26 breakpoints always seem to trip the debugger, but then the thread doesn't pause Apr 02 16:34:49 no wonder I always go with printf debugging first Apr 02 16:35:02 hi Apr 02 16:44:15 in the Android Studio 1.2 prereleases, ctrl-tab no longer switches among tabs, instead switching among recently used files. anyone know of a way to switch among tabs, either by rebinding ctrl-tab or by using a different key combo? Apr 02 16:46:02 pfn: Never had any problems debugging non main threads, the debugger works fine with them Apr 02 16:46:28 half the time, the threads don't pause and just continue running even with the breakpoint set Apr 02 16:46:32 must be an intellij problem or something Apr 02 16:46:42 Do the breakpoints have the checkmark? Apr 02 16:47:26 damned if I know, I'm done debugging for now Apr 02 16:47:39 So i've noticed that my app's apk has been floating around on sketchy free download sites. How accurate is `PackageManager.getInstallerPackageName()` at tracking if it came from google play or amazon? Apr 02 16:48:21 I was thinking of showing ads to the apks that report null for getInstallerPackageName Apr 02 16:49:45 quinnjn: If your apk is on sketchy sites, pretty likely it’s being installed manually and not from a store Apr 02 16:50:16 I think that's his point.. Apr 02 16:50:30 jaana, yeah if I can't verify the purchase I was thinking of showing ads. Apr 02 16:50:31 ah Apr 02 16:50:41 and then compare against your phone home logs, got it Apr 02 16:50:59 Will probably fail if people restored from a backup Apr 02 16:51:16 Never used it tho Apr 02 16:51:51 SimonVT, ah yeah i'll have to check that Apr 02 16:53:16 just use the ILicenseService or whatever Apr 02 16:53:30 and the amazon app store has its own piracy protection crap Apr 02 16:53:33 iirc Apr 02 16:55:37 <_genuser_> is it odd to watch a complicated piece of software work fine over and over? Apr 02 16:56:40 _genuser_: I'll call it the inverse of "suspension of disbelief", where you forget that reality runs counter to what you're seeing for hours on end. Apr 02 16:57:14 application of disbelief? :) Apr 02 16:57:23 or suspension of belief, yeah :) Apr 02 16:57:31 I kinda like application of disbelief better Apr 02 16:58:13 feels like it could use a ™ and have a two-week intense training course in the Andes mountains, where you have to befriend a yak. Apr 02 16:58:16 I have a weird bug/glitch that I'm not able to recreate on emulator, only on my physical device. I'm using material design in my app and sometimes when hitting the back button from one activity back to the main activity the navigation bar and status bar glitch out, and the status bar is redrawn with navigation buttons (not clickable). Anyone ever encounter something like this before? Apr 02 16:58:33 I'll take a screenshot so you know what I'm talking about Apr 02 16:58:54 liuwenhao: lolwhat? Apr 02 16:59:29 I think it's an Android 5.0.1 problem, because I can't recreate it on emulator Apr 02 16:59:43 <_genuser_> groxx: oh suspension of disbelief. is that just "believing"? Apr 02 17:00:22 <_genuser_> groxx: I mean I wrote this complicated piece of spaghetti over couple of months. and then I ran it last nite and it pretty much works finally after debugging and fixing along the way. Apr 02 17:00:43 <_genuser_> and now it needs more additions. but it's just that sometimes it feels like wow, this really works.... Apr 02 17:01:58 spaghetti is code I have to maintain Apr 02 17:02:02 http://i.imgur.com/9t4GQrf.png the navigation buttons are redrawn in the status bar, and the navigation bar becomes transparent Apr 02 17:02:02 * pfn points fingers Apr 02 17:02:13 my app is pretty simple so i have no idea what the hell is happening Apr 02 17:02:35 liuwenhao, you're doing something weird to the phone decorwindow Apr 02 17:03:21 i'm using appcompat to draw color for toolbar and status bar but that's about it Apr 02 17:03:28 <_genuser_> pfn: all code is spaghetti in the end. it helps, if you wrote the spaghetti and commented it, at least. Apr 02 17:03:56 appcompat doesn't draw color for the status bar Apr 02 17:04:11 and it only happens when going back to previous activity, not when transitioning to new Apr 02 17:04:40 <_genuser_> lol, I"m sending friend request to random people on facebook. Apr 02 17:04:56 _genuser_: be sure to tell them about the FSM Apr 02 17:05:06 FSM loves spaghetti code Apr 02 17:05:09 <_genuser_> groxx: fsm? Apr 02 17:05:31 _genuser_: the one true religion of programmers: http://www.venganza.org/ Apr 02 17:06:00 <_genuser_> groxx: oh, I just figured it out, lol. it's been a while since I read slashdot, had kinda forgotten the fsm. Apr 02 17:06:07 pagans may follow Nyarlathotep (aka "the Crawling Chaos"), as it's also an accurate description of programming. Apr 02 17:06:35 <_genuser_> groxx: but mostly, I'm just slacking and adding random people on facebook, before I start the second part of this code/app Apr 02 17:09:37 can I send a notification before an intentservice get destroyed by using an event bus? I'm doing some work with an asynctask inside it, but it seems it's already destroyed when I finish with it Apr 02 17:09:58 <_genuser_> asynctask inside an intentservice? Apr 02 17:11:12 MyWay: intentservice is already on a background thread, and it's meant for synchronous things. just drop the asynctask part. Apr 02 17:11:35 http://i.imgur.com/rR34Odx.png i think i killed android Apr 02 17:11:48 MyWay: or if that's hard for some reason, use a normal Service, and use startService + stopSelf() when finished, so the service will stay alive until it's done. Apr 02 17:11:57 liuwenhao: lol Apr 02 17:12:09 <_genuser_> androidicide? Apr 02 17:12:24 liuwenhao: you don't happen to have adjustPan for the soft input mode, do you? Apr 02 17:12:37 I've had some pretty significant rendering bugs from that + rotation Apr 02 17:12:40 ah, so I don't need asynctask neither for Network calls. I don't wanted to use the normal Service, because I'm scared of not stopSelf somewhere, but probably it's best Apr 02 17:13:34 liuwenhao: though it's possible mine are from a GPU bug or something. in 5.0.x I occasionally had my screen split in half, and one half would be "rotated" down ~100dp (so the status and navbar would be at the top, contents shifted down, etc) Apr 02 17:13:59 I couldn't screenshot mine though Apr 02 17:14:46 MyWay: yep. intentservice is basically "doInBackground" already, just go ahead and do a non-async network call. Apr 02 17:15:07 no groxx,not using adjustPan. All I did was add a recyclerview/navigation drawer and now it acts like this Apr 02 17:15:31 groxx: but then can I use something like eventbus to callback on the intentservice, or maybe it's already destroyed? Apr 02 17:15:48 emulator works fine (api 22) but nexus 4 gets this glitch (api 21) Apr 02 17:17:19 MyWay: as long as you're still within onHandleIntent (or whatever it's called), the service will still be around. it only goes away when there are no more intents + onHandleIntent has finished. if you do something asynchronous, the callback will (generally) happen after onHandleIntent has finished, which is the actual problem here. Apr 02 17:18:45 so - even if it's not a good thing - if I used the asynctask with .get() it should work Apr 02 17:20:04 not sure what you mean Apr 02 17:21:06 woo http://istruecryptauditedyet.com/ Apr 02 17:23:06 Ashiren: cool, glad to see that's making progress :) Apr 02 17:23:24 groxx: I mean, if I use public final Result get () from asynctask it becomes synchronous, so the intentservice should not get destroyed Apr 02 17:23:57 <_genuser_> alright, apparently facebook surfing is a waste of time. back to coding. Apr 02 17:24:48 MyWay: ha, interesting, I never noticed that :) yeah, that will probably work Apr 02 17:27:16 MyWay: kinda interesting that it doesn't just implement Future... Apr 02 17:28:04 why? Apr 02 17:29:57 the whole point of intent service is that you do the work in onHandleIntent Apr 02 17:29:59 I'm trying to have a GridLayout with 5 columns, which has views 1/5 of the screen size. - I tried overwriting onMeasure for my custom view-class but the parent GridLayout doesn't seem to resize/layout accordingly. - Can someone provide me some basic pointers? Apr 02 17:30:04 not delegate off to another asynctask Apr 02 17:30:10 if you do that, you might as well not use intentservice Apr 02 17:31:08 yes, probably it's better to use the normal service in my case, but I didn't want to use stopSelf(), maybe I don't get it called every time and the service still run even if not needed Apr 02 17:31:39 so I thought I could use eventbus to post an event to the intentservice before it gets destroyed Apr 02 17:32:20 manage your resources properly Apr 02 17:40:02 So apparently the glitch I was talking about before is only an issue on Lollipop Nexus devices, had to disable the software view on my ad fragment and everything works normally now. I'm gonna miss this though http://i.imgur.com/NxDK62L.png Apr 02 17:40:28 drewsrem, what do you mean it won't resize the layouts? Apr 02 17:40:50 liuwenhao, I've noticed something like that too Apr 02 17:41:03 liuwenhao, is your app published yet? Apr 02 17:41:06 iprime, the view gets inflated to the GridLayout but the GridLayout doesn't resize according to the new size of the view Apr 02 17:41:15 No iprime, I still have a lot of work to do on it Apr 02 17:41:25 this is what solved my problem Apr 02 17:41:25 http://stackoverflow.com/questions/27224394/android-lollipop-activity-screen-corrupted Apr 02 17:41:34 drewsrem, isn't your gridlayout as wide as the screen? Apr 02 17:41:37 webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null) Apr 02 17:41:45 but in my case it was adView not webView Apr 02 17:41:54 yeah, makese sense to use a software layer Apr 02 17:42:07 maybe adview uses a webview internally Apr 02 17:42:10 I do 99% of my testing on emulator so I never noticed it before Apr 02 17:42:19 yeah it does Apr 02 17:42:24 iprime, the gridlayout is anchored to the bottom of the screen (or whatever terminology applies here), so when the child-view grows in size it grows below the screen Apr 02 17:42:26 interesting, i've first noticed it on an emulator (genymotion tho) Apr 02 17:42:38 it's fixed in API 22 I think Apr 02 17:42:50 if your emulator is Nexus 5 on Api 21 you probably would have the same issue Apr 02 17:42:51 drewsrem, that doesn't sound right, your gridview should have a fixed height, shoudln't resize Apr 02 17:43:18 iprime, gridlayout Apr 02 17:43:19 drewsrem, can you provide a couple of screenshots? Apr 02 17:43:38 iprime, gridlayout always has a fixed size? - then I'm doing it wrong probably, do you read about my initial requirement? Apr 02 17:43:41 oh gridlayout, sorry Apr 02 17:43:51 drewsrem, what are you trying to achieve actually? Apr 02 17:44:30 if it has to resize then why not let its height wrap the content rather than be anchored to anything Apr 02 17:44:46 iprime, I'm essentially trying to get a flattened viewgroup, which I can add square-views to, which are always 1/5th of the screen width and which "wrap line" when there's 5 in a row, so basically a 5x5 grid and the views added to resize accordingly Apr 02 17:44:57 liuwenhao, yes, exactly Apr 02 17:45:41 drewsrem, and this doesn't work if your gridlayout's height = wrap_conetnt? Apr 02 17:45:53 iprime, oh wow, it does, thanks a ton Apr 02 17:46:13 Is there a way to implement mediacontrolls for custom ui of media controller for mediaplayer? Apr 02 17:46:14 iprime, totally overlooked this Apr 02 17:46:15 sure, no prob Apr 02 17:46:19 iprime, <3 Apr 02 17:46:25 Hello, Is there a reason behind having access modifier of View references as default and not private? I have seen lot of people keeping it as default. Apr 02 17:46:46 lasserix, sure Apr 02 17:46:58 iprime: what's the class to implement ? Apr 02 17:47:10 advy, i almost always keem the private Apr 02 17:47:22 *specifically i am wondering will it automatically handle the scrubber so i dont have to implement the seek position stuff? Apr 02 17:47:47 advy you probably want them private since you don' Apr 02 17:47:59 t really want to touch the view outside of its class, but really depends on use case Apr 02 17:48:00 lasserix, uhm, i can't really recall, but a while ago I had to build controls for the mediaplayer, you can consult the android source for a starting point Apr 02 17:48:21 iprime: did it handle updating the progress of the video? or did you have to do that explicitly? Apr 02 17:48:27 altho i remember there were some internal things I coudln't control Apr 02 17:48:29 When you install an APK, are drawables from every dpi installed on the device? Or just the ones that match the screen density? Apr 02 17:48:38 lasserix, i had to do everything manually Apr 02 17:48:44 with a handler i think Apr 02 17:48:49 iprime: ahh so there's no real benefit okay Apr 02 17:48:50 thanks Apr 02 17:48:54 liuwenhao, all of them Apr 02 17:49:15 lasserix, yeah well, but so you have more control Apr 02 17:49:36 so if I want to keep my app small I should just have one version of the icon for every screen density? Apr 02 17:49:42 *theres no benefit in hooking it into the interface that layer is just redudent if you have to do everything yourself Apr 02 17:49:56 iprime, lasserix, thanks. I also keep it private was just wondering what can be the use case behind keeping it default Apr 02 17:49:58 liuwenhao, would icons really affect the size of the app much? Apr 02 17:50:08 liuwenhao: unless you are doing like a porn app with tons of images, your icon size is not really going to affect the size of your app in any meaningful way Apr 02 17:50:13 Not a lot, maybe 5-10mb Apr 02 17:50:21 5-10mb of icons? Apr 02 17:50:25 you making an icon browser!? Apr 02 17:50:28 advy, if you use injectors etc they have to either be default or public Apr 02 17:50:58 liuwenhao, woah, quite a bit, but still reasonably small media set... i suppose you're not talking about launcher icons? Apr 02 17:51:07 wait I was wrong, it will only increase 1mb or less. haha Apr 02 17:51:34 no just icons for categories and such. some of them are very high resolution Apr 02 17:52:18 oh, but do they need to be high res? Apr 02 17:52:38 and then you can always host them and load them from the internet Apr 02 17:52:40 cause high rez icons are the future Apr 02 17:52:57 vector is the future! ) Apr 02 17:53:51 I should probably test my app on a tablet to see if high res even makes that big of a difference Apr 02 17:53:59 I don't think it will Apr 02 17:54:07 well.. it probably will ) Apr 02 17:54:09 iprime, thanks Apr 02 17:54:36 advy, now such stuff is popular Apr 02 17:55:20 hello, how can i know which Build Tools I have? Apr 02 17:56:11 SDK manager Apr 02 17:56:25 and/or gradle buildToolsVersion Apr 02 17:56:48 ng Apr 02 17:57:37 you should probably be targetting api 22 and using buildtoolsversion 22.0.0 Apr 02 17:57:41 liuwenhao: give me a second, I'm upgrading Apr 02 17:58:24 22 is android 5.1, 21 is 5.0 Apr 02 18:01:44 liuwenhao: I have a project (not mine) which uses gradle to build and it's complaining that i cant fine Build Tools revision 22.0.0, as far as I know, I have build tools 22.0.1 installed Apr 02 18:02:30 oh Apr 02 18:02:34 you have to set the gradle to 22.0.1 Apr 02 18:02:40 or download 22.0.0 Apr 02 18:03:12 just change to android { Apr 02 18:03:12 compileSdkVersion 22 Apr 02 18:03:12 buildToolsVersion '22.0.1', you might need to clean/rebuild project? not sure Apr 02 18:04:09 oh, let me try Apr 02 18:06:17 Hi Guys, i am new to working with the Maps API. I added a key to the google play console project and enabled maps V2, but i get an authorization error when launching the app in studio Apr 02 18:07:16 here is a link to my manifest http://pastebin.com/wYcQZ7c0 Apr 02 18:10:09 gah, the free version of google analytics is so limiting Apr 02 18:10:22 groxx you there by any chance ? Apr 02 18:13:21 why o why can't you rename source folder Apr 02 18:13:28 *simply Apr 02 18:13:52 g00s: ya Apr 02 18:14:00 where did gradle gets the path for ndk? I'm getting errors when trying to execute: 'null/ndk-build' Apr 02 18:15:18 groxx google analytics has a limit of 20 custom dimensions (attributes). so lets say i want to collect stats on the model device my app connects to (external hardware). there are about 30 of these, more on the way. can you think of a way around this? my first thought would be each model is a dimension Apr 02 18:15:19 def ndkDir = plugins.getPlugin('com.android.library').sdkHandler.ndkFolder Apr 02 18:15:36 that seems to be failing... Any variable that I could export with the ndk path? Apr 02 18:17:25 g00s: I'd have to poke at it to figure out if this works (which I probably don't have time for), but I'd think of "model" as a dimension, with the device-model as a value Apr 02 18:17:48 that does make sense but, the metrics have to by quantifiable Apr 02 18:18:07 hm :| Apr 02 18:18:44 and same limit for metrics, so i couldn't have one for each model there also Apr 02 18:19:33 g00s can you have a one-to-one mapping between some dimensions Apr 02 18:19:58 oh nm Apr 02 18:20:07 hrm. since dimensions need an index, do they have to be globally the same? so you'd have to have say "dimension1: Nexus 4"? Apr 02 18:20:16 seems like a bad fit, might be something else that's better Apr 02 18:20:28 Hi. Does anyone here use MonoTouch/MonoDroid for dev? Any thoughts on your experience? Apr 02 18:21:44 g00s watch out that you don’t do it by model number Apr 02 18:21:49 or Qt too, I'd like to hear opinions on that as well Apr 02 18:22:01 g00s: so I'm guessing you want to track e.g. "device: [num_times_X, num_times_Y, etc]", and have stats for each kind of device? Apr 02 18:22:13 groxx yeah Apr 02 18:23:09 Could someone point me in the correct direction. I have made some enhancements to the Android tool chain (specifically ndk). I would like to commit these changes via git but I am not really sure of the protocol. Do I post a patch somewhere? Just commit my changes? Who would I ask to even know that I am developing in the correct branch? Apr 02 18:23:14 to make this tricky you can't delete dims / metrics Apr 02 18:23:30 so gotta get it right from the outgo. this is a crappy system Apr 02 18:24:08 guyz i am building a prayer time app which will notify user that its the prayer time what should i use alarm manager to fire notification or service or something else ? Apr 02 18:24:30 s9iper1: aren't there like 5000 apps like that already? Apr 02 18:24:49 nm, with that attitude, apps 1000-5000 would never have existed :P Apr 02 18:25:26 rangergord i am beginner so i am practicing Apr 02 18:25:38 use alarm manager Apr 02 18:25:44 no problem Apr 02 18:25:55 you probably want to use RTC_WAKE Apr 02 18:25:59 ok Apr 02 18:26:04 unless you want your user to sleep through it Apr 02 18:26:21 I think broadcast is fine, no need for a service Apr 02 18:26:39 ok thanks for the guide Apr 02 18:26:47 unless you don’t want to start your app.. depends on your end goal really Apr 02 18:27:22 *RTC_WAKEUP no prob Apr 02 18:27:27 g00s: custom variables sound promising, though I think you're stuck with 5. then you can do "model:device model name". not sure how that presents itself in the UI though Apr 02 18:27:48 ok tricknology Apr 02 18:28:26 g00s: and I still think device model is a thing that's provided as a dimension, so you shouldn't need to handle it yourself. but that's just from seeing other things / skimming the docs. we don't do much with GA, prefer to do "real" tracking ourself because we know exactly how it behaves then, and we can track anything. Apr 02 18:29:33 groxx ok let me look at the provided dimensions. what do you use for your custom analytics backend ? Apr 02 18:29:41 hand-built :| Apr 02 18:29:47 mysql + rails Apr 02 18:30:10 yeah it seems right away, almost anything would be more flexible Apr 02 18:30:45 "real" tracking? Apr 02 18:30:50 all the big names use omniture and shit... Apr 02 18:31:01 for this library (https://github.com/rahulrj/Swipe_RecyclerView), how would I want to go about installing it? No gradle compile or jar or anything... Apr 02 18:31:33 that seems to be true for everything analytics or A/B testing. trying to build a "works for everyone" system seems impossible, since you inherently bake in how you think of / present the numbers, and then something like "mobile" comes in and throws out your earlier concepts. Apr 02 18:31:50 How can I write an app in andoird that reads all the sensors and sends it over through the wired usb to another machine? preferably the camera data as well? Apr 02 18:32:11 NDK would be nice for that blib Apr 02 18:32:41 t0astt: clone the project, dump it into libs folder add it as a project Apr 02 18:33:04 blib “Typical good candidates for the NDK are CPU-intensive workloads such as game engines, signal processing, physics simulation, and so on. When examining whether or not you should develop in native code, think about your requirements and see if the Android framework APIs provide the functionality that you need.” Apr 02 18:33:11 https://developer.android.com/tools/sdk/ndk/index.html Apr 02 18:33:40 I'm still surprised jna isn't frequently suggested for android Apr 02 18:33:53 low impedance ffi is a huge win... Apr 02 18:33:54 If you don’t use NDK I would bet that your camera will be verrry slow Apr 02 18:34:27 well, ndk wouldn't affect speed there Apr 02 18:34:29 pfn: happen to know the tradeoffs? Apr 02 18:34:30 but sending it over usb is a problem Apr 02 18:34:41 groxx, there's some issue with stack and things like errno Apr 02 18:34:43 tricknology, do you have a suggestions where I might go to ask questions about submitting changes to the NDK toolchain? Apr 02 18:35:01 I have not used NDK myself slashnull :( Apr 02 18:35:05 I forget the exact details, but errno and stuff typically isn't going to be valid from jna-call to jna-call Apr 02 18:35:11 but that's pretty much the same with all ffi Apr 02 18:35:36 jna looks pretty neat Apr 02 18:36:03 errno seems like such a horrible concept anyway :( Apr 02 18:36:14 NDK would be good for doing things like life filtering of video, no/ Apr 02 18:36:15 ? Apr 02 18:36:20 live* Apr 02 18:36:51 tricknology: how much work it is to read that data and send it throught usb? The machine connected to the smartphone is a ubuntu box, how will that read the data? Apr 02 18:37:48 not much on the android side if you’re used to broadcast listeners.. never used USB Apr 02 18:37:48 lasserix: Ok, it's in my libs folder. Add it as a project... how do I do that part? Apr 02 18:38:10 not sure about how the Ubuntu box should receive it Apr 02 18:38:38 is there a method that is called on the fragment which is being pushed on to the view from backstack? Apr 02 18:38:46 camera is a moderate pain Apr 02 18:39:21 FragmentManager.OnBackStackChangedListener Shiekh Aman Apr 02 18:40:00 ShiekhAman ^ Apr 02 18:40:47 t0astt: http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-the-android-studio Apr 02 18:41:31 ohai, take 3 Apr 02 18:41:44 can y'all help with this android studio project setup Apr 02 18:41:57 I have two fragments in a fragment transaction. first A is loaded through transaction, then B. addToBackstack is enabled, and when user presses back button in B, the user comes back to A. Now, is there a way to know when control is back in A? Apr 02 18:42:15 tricknology, I am looking into onBackStackChangedListener now. thanks! Apr 02 18:42:19 have added more detail too Apr 02 18:42:26 boxmein, I can surely try :) Apr 02 18:42:34 I'm doing this course on coursera about android, which packages adt+eclipse projects to work on as labs, and one of those requires me to use a junit/robotium test project, which doesn't seem to find the actual app's initial activity Apr 02 18:43:03 boxmein, uhho, I don't know how to work with junit or robotium :-/ Apr 02 18:43:09 so I imported both the test project and the app project into AS, and when compiling the tests AS complains about missing the initial activity Apr 02 18:43:19 ShiekhAman look into FragmentManager.BackStackEntry Apr 02 18:43:21 SheikhAman: lol, it seems I'm kinda lost with that :D Apr 02 18:43:44 boxmein, It's been five years, and I am still lost about it. lol. Apr 02 18:44:01 but jokes apart, I really want to go deep into tests Apr 02 18:44:17 tests are nice Apr 02 18:44:19 tricknology, okay, looking into it, thanks! :) Apr 02 18:44:21 ....if they work Apr 02 18:44:53 but like, it's not that much about the test code Apr 02 18:44:56 because that was provided Apr 02 18:45:02 it's more about the project setup Apr 02 18:45:04 maybe FragmentBreadCrumbs Apr 02 18:45:23 which includes the app but doesn't find the main activity Apr 02 18:45:40 or if you want to use JakeWharton’s implementation: https://github.com/JakeWharton/HanselAndGretel Apr 02 18:46:04 oh man Apr 02 18:46:06 breadcrumbs Apr 02 18:46:17 no one ever used those things–even the platform ones Apr 02 18:47:15 lol Apr 02 18:49:11 ShiekhAman, if you want the one displayed before this then use: FragmentManager.BackStackEntry backEntry=getFragmentManager().getBackStackEntryAt(getActivity().getFragmentManager().getBackStackEntryCount()-1); Apr 02 18:49:33 lasserix: Thanks! I think it worked :D Apr 02 18:49:54 tricknology: do you know someone who has worked with sending data through usb? Apr 02 18:51:28 has anyone here send data using usb from a phone and received it in ubuntu? Apr 02 18:52:19 whoa. google will now show an answer from stackoverflow in the search! http://uppix.com/f-screenshot_006551d8fd70018a8ea.png Apr 02 18:52:28 lol, but BreadCrumbs look interesting. Sad I never saw in detail Apr 02 18:53:03 tricknology : it worked, as you said main.. sad you've quit, wanted to thank you! Apr 02 18:53:18 blib, that's interesting, but sadly I haven't done it yet Apr 02 18:54:00 MikeWallaceDev, lol, more prominent case for LetMeGoogleThatForYou suggestions ;P Apr 02 18:54:04 MikeWallaceDev: this happens with a lot of websites these days, even random ones Apr 02 18:54:13 I had to use breadcrumbs before. Oh man. I hated that style. Does HanselAndGretel allow for backstack manipulation based on clicking on the crumbs? Apr 02 18:54:27 First time that I see it boxmein Apr 02 18:54:53 actually, SheikhAman ............... Aman, is that you?? Apr 02 18:55:37 Actually, SheikhAman yesterday I was thinking that it would be funny if Google redirected itself to lmgtfy.. :D Apr 02 18:55:55 of course, they couldn't deal with the traffic... still would have been funny :D Apr 02 18:56:01 MikeWallaceDev, MIKE! Apr 02 18:56:09 MikeWallaceDev, Rise Software! Apr 02 18:56:16 :) Apr 02 18:56:19 :) Apr 02 18:56:20 How are you bud? Apr 02 18:56:26 I am doing good Apr 02 18:56:36 it's just that my tail is on fire :P Apr 02 18:57:05 MikeWallaceDev: google ought've made lmgtfy Apr 02 18:57:26 boxmein, hahaha true! Apr 02 18:57:37 SheikhAman, sit in water man :D Apr 02 18:57:40 but srs Apr 02 18:57:52 can i have help with unit tests and android studio Apr 02 18:57:56 MikeWallaceDev, hahaha.. aye aye! Apr 02 18:57:58 because not even the freaking course forums helps Apr 02 19:00:01 wireshark to the rescue! Apr 02 19:06:16 hey guys, anyone have experience with puttnig in a little user tutorial? Apr 02 19:06:57 like google does for first time use of the launcher Apr 02 19:08:54 satt there is alibrary Apr 02 19:09:07 https://github.com/amlcurran/ShowcaseView Apr 02 19:10:09 lasserix thanks, that looks good thanks. I figured there might be something built in, but you think this is the best way? Apr 02 19:10:34 satt: nothing built in Apr 02 19:11:00 satt if best is something successful apps use and you can save a lot of time instead of rolling your own yeah, it is Apr 02 19:11:54 lasserix perfect, thanks. Apr 02 19:12:55 How can I write an app in andoird that sends data from the androi device to a usb machine connected using USB wire? Apr 02 19:13:30 one more thing - I need to setup page indicators for my viewpagers. found this library, but maybe there's a better alternative? Apr 02 19:13:31 https://github.com/JakeWharton/ViewPagerIndicator Apr 02 19:15:00 satt, Go with the above library Apr 02 19:15:07 it just works nice Apr 02 19:15:34 SheikhAman cool thanks Apr 02 19:15:59 blib: what kind of machine are you sending info to/what kind of data? Apr 02 19:18:06 blib, there aren't really ways to do it Apr 02 19:18:15 This isn't exactly a android question, but I'm editing my default build.gradle file that Android Studio generated, and I'm wondering why it would be telling me 'commandLine()' isn't found? Apr 02 19:18:41 Does anyone know what that would be happening, or where would be a apropriate place to find a answer? Apr 02 19:18:42 usb on android only appears as mtp, ptp or mass storage Apr 02 19:19:12 blib, you can't add an arbitrary data transfer mode Apr 02 19:19:47 hello, is there any way to import this github repository as glade dependese? https://github.com/jd-alexander/Google-Directions-Android Apr 02 19:19:50 pfn blib: I think you can do serial data Apr 02 19:20:54 wviana: do you mean gradel dependency? Apr 02 19:21:35 satt: something like this https://gist.github.com/wviana/d34657344ea3bdb3ef8c Apr 02 19:21:55 satt: yes gradel dependency Apr 02 19:22:57 wviana looks like it's only offered as a library project, but you can just reference it? Apr 02 19:23:09 unless there's a fork somewhere/it's been put on a repo Apr 02 19:23:52 Whats up TacticalJoke Apr 02 19:24:29 wviana: clone the repo then follow instructions: http://stackoverflow.com/questions/16588064/how-do-i-add-a-library-project-to-the-android-studio Apr 02 19:27:46 satt, not really Apr 02 19:28:14 pfn blib - juts googled for this: https://github.com/mik3y/usb-serial-for-android Apr 02 19:28:27 satt, that's usb otg Apr 02 19:28:31 satt, and different Apr 02 19:28:42 you can't use usb otg with a pc Apr 02 19:29:09 and you can't usb otg android to android Apr 02 19:29:51 pfn - true, but I didn't think he said anything about connecting to another android or a pc, just a machine? Apr 02 19:30:07 satt, depends on what you mean by "machine", typically it means a pc Apr 02 19:30:49 but maybe that is what he's after (connecting to some arbitrary usb device) Apr 02 19:30:52 * pfn shrugs Apr 02 19:31:06 pfn agreed. i thought maybe he meant like an arduino or something Apr 02 19:31:42 anyways, couldn't he connect it to a serial port on his pc, like an rs232 Apr 02 19:32:34 usb-rs232 isn't a standard Apr 02 19:32:54 Hey, drose379. Apr 02 19:33:03 Whats up? Apr 02 19:33:50 pfn: yesterday you said rstp should work: which is true, but it has to be over udp not tcp Apr 02 19:33:58 not standard, but doable Apr 02 19:34:14 lasserix, I don't recall saying that Apr 02 19:34:23 satt, not standard and not available in android Apr 02 19:34:36 you can't talk arbitrary usb-device mode protocols on android Apr 02 19:34:48 pfn for video streaming Apr 02 19:35:01 pfn: iirc, you can talk to USB endpoints Apr 02 19:35:11 but you need to write "driver" yourself Apr 02 19:35:20 p_l, only for usb otg, sure Apr 02 19:35:38 I guess if you have a usb-rs232 dongle on pc Apr 02 19:36:08 android usb serial driver: https://github.com/mik3y/usb-serial-for-android Apr 02 19:36:26 satt, yeah, for usb otg/a serial device Apr 02 19:36:41 satt: that's for a case where you use the android device as usb *host* Apr 02 19:37:21 yup, but you can send data out over it...to a usb rs232 pc dongle...should work? Apr 02 19:37:39 i dunno, never tried it myself. where' blib at anyway, what do you want to do? Apr 02 19:37:53 also, given the lack of info from blib, I assume additional hardware/chips is not the case either Apr 02 19:42:45 does anyone host their app off the play store? is there a way I can roll incremental app updates...so the user doesn't have to download the whole app again to update? Apr 02 19:44:23 satt, yes, there's a way to do that Apr 02 19:44:36 search the same keyword, incremental update play store Apr 02 19:46:06 SheikhAman thanks - but I meant for apps not on the play store? Apr 02 19:46:58 pretty much no Apr 02 19:48:30 satt, they're called "Smart App Updates" http://www.androidpolice.com/2012/08/16/google-flips-the-switch-on-smart-app-updates-in-the-play-store-video/ Apr 02 19:50:17 SheikhAman: That’s for apps hosted on the Play Store. They’re asking for apps NOT on the Play Store Apr 02 19:50:39 Like if I have my own server and are offering the app for download from there Apr 02 19:50:39 satt, ahh, sorry.. I don't know then Apr 02 19:50:49 I haven't slept for two days, so can't comprehend much :p Apr 02 19:51:01 SheikhAman no worries, thanks anyways :) Apr 02 19:51:13 :) Apr 02 19:51:20 I don’t think there is, because if there was, I’d guess Amazon would be doing it Apr 02 19:52:34 s73v3r thanks Apr 02 19:54:33 satt: could you use a separate dex file that you download from your server Apr 02 19:58:19 satt - against play TOS to update your app outside of Play Apr 02 19:58:55 Solarnum: I'll look into that thanks Apr 02 19:59:07 g00s: my app isn't on the play store Apr 02 19:59:28 g00s but thanks for the heads up Apr 02 19:59:40 satt: Custom class loading can be kind of a pain in the dick but it definitely works. Apr 02 20:00:08 a timer in a service is not guaranteed to run in a timely fashion is that correct? the service can be stopped at any time etc? Apr 02 20:00:20 Solarnum: you've done it before? any guides or references you can link me to? Apr 02 20:00:42 Depends on what IntentFlags you use. Apr 02 20:01:06 The point of the Service vs the Activity is that the system will kill Activities when it wants but it tries to keep services running. Apr 02 20:01:32 Solarnum: found this, looks doable, thanks again! http://android-developers.blogspot.ca/2011/07/custom-class-loading-in-dalvik.html Apr 02 20:01:36 jophde: okay. by intents you mean intents used to start the service? Apr 02 20:01:38 satt: I have done it before. The information on it is far and inbetween. http://android-developers.blogspot.com/2011/07/custom-class-loading-in-dalvik.html Apr 02 20:02:16 @magellanic yep Apr 02 20:03:24 hello, is there a way from native code, to get a backtrace/stacktrace? I didn't find anything in the NDK Apr 02 20:03:27 any idea please? Apr 02 20:05:44 satt: Yup no problem. Just try and stay away from relying on reflection Apr 02 20:05:45 jophde: here they don't mention intent flags? would these flags be set in the intent that goes into startService()? https://developer.android.com/guide/components/services.html#StartingAService Apr 02 20:06:09 Oh yea, you are right. Apr 02 20:06:31 you need to return START_STICKY in Service#onStartCommand(Intent, int, int) Apr 02 20:06:38 http://developer.android.com/reference/android/app/Service.html Apr 02 20:08:25 jophde: ah, thanks, looking into it Apr 02 20:10:27 all: I have been working a Localization library and I would love to get some feedback on it. What do you like and hate about it? It's goal is to make localization as easy putting crash reporting into your app. https://www.colatris.com/ Apr 02 20:12:15 Is anyone aware of a means of adding multiple events to Google Calendar at once? Certainly not one at a time through intents, but could it be through a SyncAdapter? CalendarContract? The more I'm researching this, the more I feel it isn't possible. Apr 02 20:12:34 Ah, from my app, of course. Not just in general. Apr 02 20:13:00 Does Google Calendar have a mean of accepting a .ics from an Intent? I could try building that in app and pasing it out. Apr 02 20:13:47 ironmarx, there are apps which do ics to calendar, but nothing built in Apr 02 20:14:08 jophde: crash reporting is such a necessity I find Apr 02 20:14:42 Certainly plenty can import ics files from themselves, but not via intent. I'm also more or less only considering G Calendar Apr 02 20:18:14 ironmarx - you can add events programmatically, without using intents: http://developer.android.com/guide/topics/providers/calendar-provider.html Apr 02 20:25:45 if I have an application with both a desktop and mobile client is there a good method/library/pattern for syncing the data between both devices at runtime Apr 02 20:26:01 so if I make a change in one it will be able to update on the other Apr 02 20:26:11 Using a database? Apr 02 20:26:43 mrfu i would say firebase, but google got them Apr 02 20:27:11 if I save to my database is there a way to alert other devices of the change? Apr 02 20:27:47 it feels like this is a pub-sub or observer sort of problem Apr 02 20:28:16 firebase looks interesting Apr 02 20:28:54 why would you not suggest them now g00s? Apr 02 20:29:11 dont know what their status is Apr 02 20:29:21 looks like they are up Apr 02 20:35:42 pfn: satt: How fast can I do serial output using usb? Is there a way to do USB speeds output so that I can also push camera data out from the cell phone? Apr 02 20:36:14 satt: pfn: I am connecting it to a Raspberry pi using usb Apr 02 20:36:28 satt: pfn: And my rpi runs ubuntu where I need to read and process the data Apr 02 20:37:18 rs232 is limited in bandwidth Apr 02 20:37:30 and rpi doesn't do device mode usb does it Apr 02 20:37:32 so no, you can't do that Apr 02 20:37:38 blib serial is pretty slow yes. i think the max s like 115200 bit/s Apr 02 20:38:08 pfn: what do you mean by device mode usb? can't android simulate itself as webcam or something like that and send data through usb? Apr 02 20:38:16 no, android cannot Apr 02 20:38:44 if you have root, maybe Apr 02 20:38:48 k- with serial I can get most of the sensor information out, except the camera I think. Apr 02 20:39:03 blib I'd try doing it over your network Apr 02 20:39:19 satt: I don't want to use wifi. how do I use the network? Apr 02 20:39:42 why no wifi? you could maybe do it over bluetooth... Apr 02 20:39:45 g00s: unfortunately it looks like to use firebase I have to host my data with them Apr 02 20:39:47 groxx: regarding yesterday's CSS discussion: found this (very old) article http://android-developers.blogspot.com/2011/09/thinking-like-web-designer.html So @media queries is like resource qualifiers; "display:flex" is like LinearLayout. "flex-direction: row/column" is like layout_orientation. "flex: 1" is like layout_weight. "position: absolute" is like FrameLayout. I fill like Android knowledge has Apr 02 20:39:48 helped started much faster with CSS. =) Apr 02 20:40:05 but that at least gave me a new term to search for "real time database" that should help Apr 02 20:40:07 satt: how much bandwidth can I expect from wifi transmission? bluetooth? Apr 02 20:40:25 bluetooth is several mbps Apr 02 20:40:30 wifi can be 100mbps and higher Apr 02 20:40:33 blib, you looking to work with a specific standard? Apr 02 20:40:36 blib - depends on your wifi cards I guess, but you could probably get gigabit Apr 02 20:40:52 g00s, I got a s6e Apr 02 20:41:05 satt: I've a 802.11g usb hardware on my raspberry pi. So at least 10Mbps should be possible Apr 02 20:41:12 gdrc i got a headache :( Apr 02 20:41:20 icedp: :) yeah, some amount of UI knowledge transfers between systems Apr 02 20:41:27 i won then Apr 02 20:41:44 icedp: ah, sweet. flexbox is pretty well supported finally: http://caniuse.com/#search=flex Apr 02 20:41:53 blib, .. Bluetooth 1.2 = 1Mbit Bluetooth 4.0 = 24Mbit Apr 02 20:42:00 satt: "Sensor box for android" is an app on the playstore. I want its output to be sent to wifi, how much work is that? Apr 02 20:42:07 (Actual throughput is less... overhead and all that) Apr 02 20:42:13 Gryd3`Shop: Ideally I'd have liked to use wired usb. Apr 02 20:43:03 blib. 802.11 speeds/protocol here : http://en.wikipedia.org/wiki/IEEE_802.11 Apr 02 20:43:17 g = 54Mbit Apr 02 20:43:56 Gryd3`Shop: I think the rpi has usb 2.0 - so we might be able to get to 50Mbps, but 10Mbps is safer Apr 02 20:44:52 USB 2.0 has a link speed of 480 MBit though :p Apr 02 20:45:41 Gryd3`Shop: k - so how do I write that app, which ships out all data from "sensor box" to wifi - which is readable inside ubuntu ? Apr 02 20:46:18 blib, will you be pushing out this data to a listening device, or keeping the data until a device asks for it? Apr 02 20:47:38 Gryd3`Shop: The RPI will be listening all the time for this data Apr 02 20:47:44 rpi = raspberry pi Apr 02 20:48:47 I know, I got 2 of them ;) Apr 02 20:49:29 well. this is not so much Android dev as a generic linux dev so if we get barked at we should re-locate Apr 02 20:49:33 I'm trying to setup a swipe view with tabs... but looking at their docs, it says to create tabs with action bar, I need to enable "NAVIGATION_MODE_TABS" when I click that, it says it's deprecated... Apr 02 20:49:44 What am I supposed to do here? Apr 02 20:49:48 blib i'd say wifi is your best bet. the sensor box reports what, temp, orientation, compass, etc? shouldn't be much data, you could likely do it with bluetooth Apr 02 20:50:38 WiFi would probably be easier to work with and troubleshoot though.. and would allow for a longer range Apr 02 20:51:06 you are right though... data would be minimal unless the sensors are checked 100s of times a second Apr 02 20:51:46 blib, can you confirm what your 'sensor box' is? How does Android tie into it? Apr 02 20:51:53 the problem with wifi is that you lose your device connection when you switch around. There's lots of ways anyhow. You can do it with bt rfcomm Apr 02 20:52:11 gh0sted - just use it anyways Apr 02 20:52:21 you can also do btle, which is what a lot of sensors use b/c they're self-powered Apr 02 20:52:22 Ok, thanks satt. Apr 02 20:53:35 groxx: 7% of browsers unsupported. Almost like pre-ICS share ) Apr 02 20:53:36 blib what do you need to transmit ? Apr 02 20:54:07 i thought this was about sending pictures over usb, so i tuned out Apr 02 20:54:11 icedp: yeah. and IE6 will probably never totally die. but that's a big improvement over a couple years ago Apr 02 20:59:35 dragorn its nice out :) Apr 02 21:02:20 can someone tell me how I can set setFilterTouchesWhenObscured(true) on all the webviews in my app? I'm trying to override a method on com.webkit.WebView and failing miserably. total android noob here. Apr 02 21:02:28 g00s, yeah amazingly Apr 02 21:03:09 jophde: do you need translators? :) Apr 02 21:04:02 icedp: send me an email at josh@colatris.com Apr 02 21:04:59 proq: failing how? Apr 02 21:05:31 we all fail someday Apr 02 21:06:02 I have a syntax error with "public final class SecWebView extends WebView" -> "There is no default constructor available in android.webkit.WebView" Apr 02 21:06:25 also, I'm not sure what to call package Apr 02 21:06:41 right now it's com.foo.domain.secwebview Apr 02 21:07:19 proq: you're probably missing the standard View constructors, like "public SecWebView(Context context) { super(context; }" Apr 02 21:07:58 or you're trying to call "super()" inside one of your constructors. Views don't have a "new WhateverView()" constructor. Apr 02 21:09:21 groxx "Analytics need to be tested too, so use a different analytics id for your dev builds." do you know what they mean by analytics ID? do they mean a different tracker/property ? (UA-xxxxxxx-y) Apr 02 21:10:22 groxx: is there an example somewhere of a minimal class that overrides an android base class? Apr 02 21:12:01 Has anyone had success in here using RTSP to stream live video? Apr 02 21:14:04 proq sure Apr 02 21:14:51 is there really a point to dialog fragments? Apr 02 21:15:47 Anyone here using ViewPageIndicator? Apr 02 21:16:09 proq: http://pastebin.com/Bpjj5Gey Apr 02 21:16:15 dcorbin: sure Apr 02 21:16:28 shekibobo: they float Apr 02 21:17:07 proq: what IDE are you using? most java ones will have an "override constructors" style option somewhere, which will let you choose from all the superclass constructors. otherwise: read the source. it depends entirely on what you're overriding. Apr 02 21:17:11 My app is supposed to show an text entry field and a button when it starts but they don't appear. I just get a blank screen with the program title in the top bar, and the menu in the top right corner when I run it in the debugger. The main menu works. The XML layout is ok and I call setContentView in onCreate with the ID of the layout. Apr 02 21:17:12 why would I use one over a regular dialog? Apr 02 21:17:30 groxx: I'm using Android Studio Apr 02 21:17:47 shekibobo: backstack not sure Apr 02 21:18:43 lasserix: I'm having trouble with the gradle dependency. There's a lot of articles on the interntet related to this, but they (A) don't work for me, and (B) are not very recent. What's your dependency look like? Did you have to add a repsoitry? Apr 02 21:19:10 proq: stick your cursor somewhere outside the methods (but in the class), and press "cmd-N". pick the constructor option. for a view, I'd recommend overriding _all three_, because they're for different purposes. Apr 02 21:19:25 it's probably ctrl-N on windows, but I don't know for sure Apr 02 21:19:38 compile 'com.android.support:support-v4:21.0.3' Apr 02 21:19:49 put it before other libraries Apr 02 21:20:01 Not VIewPager. ViewPagerIndicator. Apr 02 21:20:12 compile 'com.viewpagerindicator:library:2.4.1@aar' Apr 02 21:21:10 with repo maven { url "http://dl.bintray.com/populov/maven" } Apr 02 21:21:23 lasserix, groxx: thanks! It builds now Apr 02 21:21:24 which is not the jakewharton one but i could get that to work Apr 02 21:22:42 lasserix: finally figured out my problem. I was adding the repository for it in the invdividual module build file, but I needed to add to the master build file. Apr 02 21:23:34 may the pager be with you Apr 02 21:28:17 Is there a name for this phenomom? I dig and dig and google all around unable to find the answer to my question. I ask the queestion (in IRC, a forum, etc), and ONLY then do find the answer elsewhere. Apr 02 21:29:44 rubber duck effect or something Apr 02 21:30:10 dcorbin yeah has something to so with the way gradle does configuration across all its subprojects Apr 02 21:30:28 i googled the error and thought i was pretty lucky to find the answer :| not intuitive Apr 02 21:31:16 Koan has been renamed to Anko: https://github.com/JetBrains/anko Apr 02 21:33:39 anyone tried 5.1 already? any major problems? Apr 02 21:35:04 Thorn - I'm on 5.1. no major issues other than the goddamn memory leak not being fixed on my nexus 5 Apr 02 21:35:22 which one of the 50 or so Apr 02 21:36:07 dcorbin: happens to me continually Apr 02 21:36:31 anybody ever build unofficial slimrom? im getting what i think is a slimrom-specific error message during lunch/mka Apr 02 21:36:50 phubarr wrong channel, see topic Apr 02 21:38:01 ahh shit, i clicked the wrong tab on my irc client, sorry. Apr 02 21:40:41 okay thanks, upgrading Apr 02 21:41:25 hmm... gradle appears to be flaky. with that webview code it gave an obscure error, then building again the error changed, then gradle just started crashing each time I built Apr 02 21:42:00 it's not Apr 02 21:42:24 Sorry, got disconnected Apr 02 21:42:45 how do I read all that sensor data and push it out of wifi? How much work it is to write that app? Apr 02 21:43:01 I will also need a receiving app on linux that can read that data from wifi Apr 02 21:43:04 hmm... restarted Android Studio and now I'm running Apr 02 21:47:07 blib what kind of sensor data , and how often Apr 02 21:47:17 also, is it individual feeds, or one feed Apr 02 21:47:29 for example time=x : sensor1, sensor2, sensor3, etc Apr 02 21:47:54 blib Let's pause and determine an infastructure for you first Apr 02 21:48:10 what do you guys use to create your web services? Apr 02 21:48:18 You have a sensor box running linux, and a server running linux? Apr 02 21:48:28 And you want an Android App to pull data from the server Apr 02 21:49:33 lol, wake up blib Apr 02 21:49:55 lol. did this before too :p Apr 02 21:50:16 blib has a Raspberry Pi which I am assuming is the sensor box Apr 02 21:50:32 are you sure the rpi isn't his irc box L( Apr 02 21:50:49 very well could be :p Apr 02 21:51:10 blib ... if you can hear me ... you could run mqtt mosquitto on linux server, and use mqtt clients for rpi and android Apr 02 21:51:29 off to other things ;) Apr 02 21:51:48 :| any idea why I wouldn't see blib's messages in here? I don't have them on an ignore... Apr 02 21:52:04 groxx we aren't seeing them either lol Apr 02 21:52:21 so I'm either not crazy, or the same kind of crazy. I can live with that :) Apr 02 21:52:26 groxx, blib seems to post for a couple minutes then disappear Apr 02 21:52:42 hehe Apr 02 21:53:15 although.. I think it's amusing that someone can pretend to have a convo with someone and groxx would go nuts trying to find out where the other half of the convo is ;) Apr 02 21:53:39 :P Apr 02 21:54:12 I've got my pager indicators working now, but I'm having some weird issues. Using https://github.com/JakeWharton/ViewPagerIndicator Apr 02 21:54:32 but my activity starts on the second page - and the indicator shows the first, until the page is changed Apr 02 21:54:57 similarly, on another activity it only shows one until the user changes the page. Apr 02 21:55:15 anyone have camera experience? I've got a fixed-size surfacetexture that it's using for the preview. the weird part is that the camera is stretching the preview output to fit the surface... but getTransform() returns the identity matrix D: a) wtf, and b) am I doing something wrong? I can undo its transformation and put the output where I want, but it Apr 02 21:55:15 seems backwards. Apr 02 21:55:17 any ideas? Apr 02 22:00:54 man, i would think that analytics being google's bread and butter - they would have an amazing web dashboard & admin console Apr 02 22:01:24 such stupid crap, if you make one property for production tracking, and then decide to make another for testing, you have to recreate the thing from scratch Apr 02 22:01:51 so if you have n custom metrics and dims you have to very carefully recreate those and keep the indexes in sync Apr 02 22:02:07 holy crap man this is beyond shit Apr 02 22:02:37 Hi. Is there a native implementation of websocket on Android? Apr 02 22:04:03 Yalion: probably not built in, except maybe in a webview? Apr 02 22:07:21 Yalion: https://github.com/koush/AndroidAsync looks at least somewhat alive. never tried it though. Apr 02 22:08:19 what do you mean by native? Apr 02 22:08:35 webview is the right answer for truly native Apr 02 22:09:04 I added web socket support to OkHttp recently if you want a library: https://github.com/square/okhttp/tree/master/okhttp-ws Apr 02 22:09:38 groxx thks. Apr 02 22:10:14 JakeWharton: I'm using your viewpagerindicator library (awesome, btw) - when I launch the activity, i'm setting mViewPager.setCurrentItem(1) but the indicator stil shows the first page, not the second. I set the current item before setting the view pager to the indicator. What am I doing wrong? Apr 02 22:10:53 JakeWharton thks, I'll take a look in the library. Apr 02 22:11:00 JakeWharton: I recently added AndroidAsync to our project for WebSocket, it’s working well. Do you have any thoughts how it compares to okhttp-ws? Apr 02 22:11:02 satt: you need to set the active page on the indicator Apr 02 22:11:11 jaana: no idea, never used AndroidAsync Apr 02 22:11:14 k Apr 02 22:11:23 satt: setting it on the indicator will call through to the real ViewPager Apr 02 22:11:38 JakeWharton - perfect, thanks! Apr 02 22:12:20 looks like they fixed "sync now" in settings->accounts in 5.1 Apr 02 22:13:11 anyone know what the deal is with 5.1 and tethering apps now? Apr 02 22:13:22 ahh perfect. got this working nicely now. JakeWharton - great work again, loving the lib Apr 02 22:13:31 looks like they broke all the native solutions as well - was it a kernel modification? Apr 02 22:20:10 anyone have experience using node for their webservices on android? Apr 02 22:24:32 if so did you find having a more event driven and reactive backend worth the trade-off of having two languages in your app? Apr 02 22:25:13 or project rather, not app Apr 02 22:31:58 ughhhh i fucked up cloning my git repo so now my project is completely fucked and i wanted to get work done on the plane :/ Apr 02 22:32:27 im using the inflight wifi to attempt to fix lol Apr 02 22:33:11 I’m guessing it’s not something that a simple delete and re-clone can fix Apr 02 22:33:43 No i think it will fix it Apr 02 22:33:49 but this intnernet is slowwwww Apr 02 22:34:05 I always thought the "Use a DVCS on a plane" thing was merely a thought experiment. :D Apr 02 22:34:08 not that i blame it, i mean were a thousand feet in the sky Apr 02 22:34:32 i was sooo excited to get work done too :( Apr 02 22:34:46 Can't you clone from GitHub now? Apr 02 22:34:54 i am Apr 02 22:35:02 but it's like 10 kb/s Apr 02 22:35:47 Tell the pilot to slow down or something. Apr 02 22:36:09 TacticalJoke: i tried banging on the cockpit to do that, but i just got tazed for some reason Apr 02 22:36:13 it was odd Apr 02 22:37:24 so i think im using git wrong... when i want to get updated files from my github what command should i be using? Apr 02 22:37:27 pull? Apr 02 22:37:29 clone? Apr 02 22:37:50 pull Apr 02 22:38:00 or fetch, but likely you just want pull Apr 02 22:38:07 On 10kbit from a plane? Download zip probably. Apr 02 22:38:27 (minimize roundtrip latency) Apr 02 22:38:27 thats what i did but it pulled files from another repo of mine even though i had the correct link! Apr 02 22:38:28 hey kjeldahl :) Apr 02 22:38:37 g00s: high5! Apr 02 22:38:43 I'm back! ;-) Apr 02 22:38:49 \o/ Apr 02 22:38:51 kjeldahl: yeah im dling the zip from github as we speak. im 10 minutes in and at 3mmb lol Apr 02 22:38:57 Isn't it "git clone"? He's wanting to clone a repository. Apr 02 22:39:09 Does anyone have a live rtsp streaming link i can test videoview with? Apr 02 22:39:35 Finally, my own projects again. :-) http://kjeldahl.net/2015/03/12/Leaving-Kahoot/ Apr 02 22:39:51 I would like to layout a view as follows - one child view is "fill_parent" in both directions, and the other child view is positioned on top of the view (z-wise) but "near" the bottom of the screen (and full widith) Apr 02 22:39:58 What's the best approach. Apr 02 22:40:02 It's funny how insane Git's UI is. Even expert Git pages have disclaimers such as "I believe 'git pull' does ...". Apr 02 22:40:34 if anyone could test my app i just realesed that would be awesome https://play.google.com/store/apps/details?id=com.dylanredfield.agendaapp2 Apr 02 22:40:45 kjeldahl oh wow, good luck on the next endeavor Apr 02 22:40:46 dcorbin: Relative layout for the parent, and the child can be parented to the bottom Apr 02 22:40:59 dcorbin: either framelayout or relative Apr 02 22:41:02 g00s: You? FU money yet? ;-) Apr 02 22:41:07 FU = FY Apr 02 22:41:10 uhm.. SQLite is throwing me an Exception, but my code is unable to catch it. I can see it in the log though. but I need to catch it! what's wrong o_O Apr 02 22:41:25 lasserix: how would you position the second child if you did a Framelayout? Apr 02 22:41:29 Oh wow, they updated the web Google Play. They managed to make it even worse than before. Apr 02 22:41:39 kjeldahl: fuck you money? i feel like thats from a movie or something Apr 02 22:41:39 with framelayout you put your bottom view with math_parent for layout_width/height , then with other view on top, use layout_gravity=bottom|center_horizontal and use layout_marginBottom to offset it as much as you'd like Apr 02 22:41:46 TacticalJoke: yeah it looks awful on web Apr 02 22:42:04 make sure to declare the on top view last Apr 02 22:42:25 Hello, I am not familiar with the Android ecosystem but am a Java dev, and I'd like to know: when will android support java.nio.file? Apr 02 22:42:26 DadFoundMy: Something to reach for! Apr 02 22:42:29 how would I make all webviews use the SecWebView class I was talking about earlier? it doesn't appear to be calling my SecWebView method automatically Apr 02 22:42:45 kjeldahl no .. not yet :( Apr 02 22:42:49 probably never Apr 02 22:43:10 I'm asking the question since JSR 203 has been there in Java since 2011, and Android still doesn't seem to support it... Apr 02 22:43:22 Yeah, only kidding. Apr 02 22:43:30 proq: class FooWebView extends SecWebView { ... } Apr 02 22:43:34 proq: "automatically" is likely to be hard / esoteric. but you can replace all tags with , and use `new SecWebView(context)` instead of `new WebView(context)` in code and that should do it. Apr 02 22:44:18 idletask eh, even if say 5.2 gets it ... what then, minSdk 22 ? Apr 02 22:44:27 g00s: Worked on anything interesting then? Apr 02 22:44:46 kjeldahl yeah i'm working on some BLE stuff Apr 02 22:44:51 bluetooth low energy Apr 02 22:44:59 i always pick the worst android apis to use Apr 02 22:45:06 that, or all the apis are the worst Apr 02 22:45:28 Ugh, the new Google Play reminds me of the Chrome Web Store. Just horrible. Apr 02 22:45:37 kjeldahl are you still working on scheme ? Apr 02 22:45:46 We don't need screen space or anything. Just shove everything into a tiny container in the middle. Apr 02 22:45:49 idletask: can you use mappedbytebuffer in java.nio? Apr 02 22:45:53 TacticalJoke new google play = web or app ? Apr 02 22:45:56 Web. Apr 02 22:46:01 g00s: well, as I said I'm completely unfamiliar with the ecosystem; I am just somewhat dumbfounded that this API is still not there even though "standard Java" has had it since 2011 Apr 02 22:46:05 this are wifi is so ahit Apr 02 22:46:09 lasserix: sure I can, why? Apr 02 22:46:20 idletask well, you realize this isn't standard java ;) Apr 02 22:46:24 lasserix: and I am _not_ talking about that Apr 02 22:46:52 since oyu can't use that, i was recomending if you can implement with that Apr 02 22:47:03 g00s: indeed; but this new API is so much better than File that there is no comparison, I am sure the core Android devs realize that as well Apr 02 22:47:07 g00s: Cool. Nope, I'm not doing a lot in scheme. Mostly web stuff last year (Coffeescript, now ES6). Not much Java either. A little Swift even. Apr 02 22:47:16 kjeldahl while you were gone some of us have been poking kotlin on android Apr 02 22:47:25 g00s: For my current projects I need _all_ platforms, which makes it a bit hard. Apr 02 22:47:35 jetbrains calls it the swift of android, maybe you will like it Apr 02 22:47:38 lasserix: again, that is not what I'm talking about; for instance, see this: https://github.com/fge/java7-fs-dropbox Apr 02 22:48:04 whats the best testing framework to with CI that supports integration testing? Apr 02 22:48:06 idletask: interesting project Apr 02 22:48:25 idletask: fwiw that's kinda what the documents content provider thing is intended to do (though it's only on newer OSes) Apr 02 22:48:26 lasserix: fully supporting JSR 203 in Android would mean Android devs can develop custom FileSystems Apr 02 22:48:33 Could be. OTOH, so might react-native when/if it comes around for Android. Time will show. Apr 02 22:49:01 react native seems super interesting. and seriously weird in a couple minor spots :) Apr 02 22:49:08 groxx: (and I have others as well) but the thing is here there is no notion of "document"; it's just plain file systems, and the attributes are yours to define to boot Apr 02 22:49:19 lasserix: worked great. Thanks. Apr 02 22:49:35 Yeah, with native access to widgets you may soon all be javascript programmers after all! ;-) Apr 02 22:49:41 I feel that Android is missing a lot by not having this API provided... Apr 02 22:49:49 eh, "access to native widgets" I meant. Apr 02 22:49:55 idletask dont hold your breath anytime soon for jsr203. Apr 02 22:50:05 Would it only be because if you fail to create a file for instance, you get a meaningful exception Apr 02 22:50:07 kjeldahl: atwood's law marches on. Apr 02 22:50:25 true dat Apr 02 22:50:27 g00s: well, that's a real shame, honestly; at least that's how I see it Apr 02 22:50:28 kjeldahl you like js ? Apr 02 22:50:54 i've been meaning to play around with it for a while, like d3.js etc Apr 02 22:51:10 It's closer to scheme than java, yes. But it's also waay too dynamic for a lot of stuff on mobile. Still. But things are moving fast. Apr 02 22:51:11 why js? Apr 02 22:51:18 "setWindowSurfaceColorBuffer: bad color buffer handle 0" shows up "a lot" in my IntelliJ console when I'm runnig my app. Can someone explain? Apr 02 22:51:27 js is a nightmare Apr 02 22:51:50 g00s: especially since I've heard about a lot of efforts for porting Java 8 lambdas to android or whatever -- without even considering a port of JSR 292 first, for instance Apr 02 22:51:55 kjeldahl: yeah, I'm hoping for more "use strict"; + asm.js style optimizations Apr 02 22:52:07 Don't get me wrong: I like low-level stuff, but if I need to target all platforms for "simpler stuff", native isn't step 1, rather step 5. (after everything is validated). Apr 02 22:52:31 idletask: fwiw lambda-backports have been a thing for a while Apr 02 22:52:54 aaha. SQLite will not throw an Exception on failed insert if you call .insert(). to have it throw an Exception, you have to call .insertOrThrow(). Apr 02 22:53:07 Lambdas without JSR 292 are just not worth the trouble; unless the Android VM has some characteristics that make JSR 292 pointless, I don't know Apr 02 22:53:17 And since Angular is getting the faith it deserves, new frameworks like React etc makes things a bit more like "native" GUI coding. Thank god. Apr 02 22:53:49 Which nicely brings me to another question showing my ignorance... Android does not use Dalvik anymore, right? So, what is the VM used now? Apr 02 22:54:27 http://en.wikipedia.org/wiki/Android_Runtime Apr 02 22:54:32 kjeldahl: not sure how to interpret "getting the faith it deserves" - does that mean you're pro or con angular? Apr 02 22:54:48 Angular sucks donkey balls. Apr 02 22:54:54 It supports AOTing (instead of JITting), I think. Apr 02 22:54:57 w00t, I've found another! Apr 02 22:55:14 every time I've poked at angular I just feel sick. react seems like a much better concept. Apr 02 22:55:22 Where 'AOT' = 'install time'. Apr 02 22:56:01 TacticalJoke: AOT doesn't prevent JIT, does it? Apr 02 22:56:04 That's not the same thing Apr 02 22:56:08 groxx: Exactly. Apr 02 22:56:43 idletask: http://source.android.com/devices/tech/dalvik/index.html the new stuff is ART Apr 02 22:56:44 As far as I know, the entire app is compiled at install time, leaving nothing to JIT. Apr 02 22:56:55 idletask: you could conceptually have both JIT and AOT - e.g. you might be able to do better optimizations at runtime, since you have more context Apr 02 22:57:00 but afaik, ART only does AOT Apr 02 22:57:28 dunno re ART + AOT + JIT. but I gather ART is changing quite frequently, so it may in time. Apr 02 22:58:49 JesusFreke: hmm, I fail to see the difference between AOT and an optimizing compiler... More accurately, I don't see how AOT would be compatible with a full fledged JIT; I mean, if I understand things correctly, AOT compiles to machine code, which means it may potentially lose information which could be of use to a JIT. Am I mistaken? Apr 02 22:59:05 idletask: the bytecode is still available Apr 02 22:59:14 JesusFreke: ah... Apr 02 22:59:43 and I believe it falls back to a normal interpreter on the bytecode, when debugging Apr 02 22:59:56 But doesn't that beef up the RSS? Apr 02 23:00:11 idletask even so, i dont think its even new - when we were working on gcc , it was possible to supply the compiler with runtime information to help it further optimize the code Apr 02 23:00:23 is there a decompiler that maps R back? Apr 02 23:00:34 idletask: only if it's touched :) Apr 02 23:00:38 so you would compile your app, it would produce some traces, and you would recompile with those traces Apr 02 23:01:11 g00s: OK, but then those are _some_ traces from _some_ runtime scenarii, right? ;) Apr 02 23:01:18 I'll probably get smacked for it, but here's a screenshot showing an older native Android app of mine I recently made cross platform, using React/ES6 and Android's GUI patterns. It's showing running as a SPA in Chrome, Safari and "native" (cordova) on iOS and Android. http://snag.gy/WMPuY.jpg Apr 02 23:01:31 JesusFreke: yeah, that makes sense Apr 02 23:01:47 seems like a rather small-ish step to go from "profile, recompile, relaunch" to "profile, recompile piece, replace piece while running". Apr 02 23:01:55 idletask: I haven't looked specifically at how this is implemented in art, but I would assume that the .oat file (the result of the AOT compilation, which contains the bytecode and compiled machine code) is mapped into memory. So as long as the bytecode section isn't read from, it shouldn't be paged into memory Apr 02 23:02:12 kjeldahl i noticed the emacs :) Apr 02 23:02:19 likely implies some fundamental changes, but I don't see why trace -> recompile whole project is possible while trace -> recompile piece & replace is not. Apr 02 23:02:37 JesusFreke: in 2015, if all of these was loaded at once, I'd seriously question the underlying kernel :p Apr 02 23:02:52 g00s: Emacs is the one global constant in my programming, possibly except Swift so far (where substantial handholding is still needed). Apr 02 23:03:16 And then there's also LLVM... Oh dear Apr 02 23:03:31 <-- ignorant Apr 02 23:03:39 there's also LLJVM Apr 02 23:03:56 (but still wanting the JSR 203 API in Android) Apr 02 23:04:03 hey, lets not forget about MVLL! http://minisinkvalleylittleleague.com/ Apr 02 23:05:02 all i wanted was to peacefully code on this plane and now im stuck waiting for a 7mb file to finish downloading and listening to a baby cry Apr 02 23:05:17 I guess this is what dialup must have felt like Apr 02 23:05:36 DadFoundMy: nah, dialup is preferable. then your modem plays music when you connect. Apr 02 23:05:42 DadFoundMy it could be worse, is your pilot trying to get into the cabin ? Apr 02 23:06:00 sit back, enjoy the flight Apr 02 23:06:32 DadFoundMy: think of the structure of the code you will write Apr 02 23:06:33 g00s: No this is an american flight where everyone is strip searched before getting on the plane, so we're safe Apr 02 23:07:06 icedp: i should pull a wozniak and write it on a napkin Apr 02 23:07:26 my biggest fear is that the internet will go out with like .2mb left :/ Apr 02 23:07:59 DadFoundMy: that will do but do you have a beard? Apr 02 23:08:16 i wish Apr 02 23:09:26 OK, well, thank you for the talk, and I do hope to see JSR 203 in Android soon.. The day it is, I might consider having a go at it :p Apr 02 23:09:26 It's amazingly high-tech to be doing all this on a plane. Even to be on a plane is high-tech. Apr 02 23:09:45 That guy is in for a long wait. :D Apr 02 23:10:21 TacticalJoke still no release notes for as 1.2 beta 0 Apr 02 23:10:32 lazy bums Apr 02 23:11:08 I see some now (posted eight minutes ago). Apr 02 23:11:09 TacticalJoke: true, i wonder how that even get wifi on these things. a long wire from the wifi fairy? Apr 02 23:11:10 I dunno. in-air wifi has never struck me as very impressive, since satellite phones have been a thing for quite a while. handle faster satellite handoffs and bigger timing differences, and it seems like that's that. Apr 02 23:11:11 http://tools.android.com/recent Apr 02 23:11:29 groxx: so it's not a long wire? Apr 02 23:11:51 TacticalJoke "distraction free mode" oh does this disable irc ? Apr 02 23:12:00 groxx: Yeah, but the fact that some guy we don't know is communicating to us from a plane (while downloading a Git repository). That's amazing to me. :D Apr 02 23:12:05 DadFoundMy: I've tried to convince some CalTrain conductors that my "drag a fiber optic cable behind the train" idea was good, but no takers :( I imagine the same would be true for airlines. Apr 02 23:12:09 I hope that mode doesn't hide the Windows task bar. :[ Apr 02 23:12:12 The other mode does. Apr 02 23:12:15 my download is currently at 9.1mb maybe there was an error :/ Apr 02 23:12:19 And that makes it too annoying to use. Apr 02 23:12:26 Nappy time my end, laters. Apr 02 23:12:32 DadFoundMy: Mistakes on a Plane. Apr 02 23:12:48 see ya kjeldahl Apr 02 23:13:00 groxx: it's a geat idea until that cable snaps and the fiber kills everyone Apr 02 23:13:13 * DadFoundMy slowclap TacticalJoke Apr 02 23:13:38 Where are you flying to, anyway? Apr 02 23:13:56 Calorado Apr 02 23:13:59 groxx another possibility for LiFi Apr 02 23:13:59 family vacation Apr 02 23:14:11 also college visits Apr 02 23:14:16 I should say "Whither are you flying?". Apr 02 23:14:34 s/are you/art thou/ Apr 02 23:14:37 :D Apr 02 23:14:51 TacticalJoke, which company are you flying with ? Apr 02 23:15:04 saapas: you're flying also? what? Apr 02 23:15:19 s/saapas/TacticalJoke Apr 02 23:15:29 look i can vi too! Apr 02 23:15:53 As far as I know, I'm not currently flying. Apr 02 23:16:08 Though I guess it depends on how we're defining stuff. Apr 02 23:16:15 I'm flying too, ganja air Apr 02 23:16:17 well, we all know what SFW Samuel L Jackson says about things on planes. https://www.youtube.com/watch?v=z4t6zNZ-b0A Apr 02 23:16:18 as in being on an airplane. Apr 02 23:16:20 lol shmooz Apr 02 23:16:30 airplane wifi works well Apr 02 23:16:47 lol groxx Apr 02 23:16:48 myke: what mystical airline do you fly? Apr 02 23:16:59 "Monday to Friday" is pretty creative. Apr 02 23:17:06 groxx: i feel like it would be selfish to open that on this wifi Apr 02 23:17:06 best TV dub ever Apr 02 23:17:09 Im curious as I know only two airlines that provide wifi; norwegian and finnair. Apr 02 23:17:19 DadFoundMy: lol, true. though it's only 23 seconds, might be acceptable :) Apr 02 23:17:29 #yolo #FuckEveryonesBandwith Apr 02 23:17:55 * groxx waits for the gogo "no youtube for you!" page Apr 02 23:18:21 im going to try once my git is done cloning just it case it fucks anything up Apr 02 23:18:35 im at 12mb, but i didnt think it was this large Apr 02 23:18:39 Any band featuring Meatloaf has high bandwidth. Apr 02 23:18:55 TacticalJoke: your on a dadjoke roll today Apr 02 23:19:04 AYY DOWNLOAD DONE Apr 02 23:19:31 anyone know some good apps to decompile? Apr 02 23:19:45 I wonder how many use obfuscation. Apr 02 23:19:51 I've not tried to decompile many Android apps. Apr 02 23:20:03 lasserix: I pretty much just use apk2gold Apr 02 23:20:16 lasserix: theres a good webstite for it Apr 02 23:20:22 lasserix: if you decompile opengarden you will find a bunch of apis that are not used in the app itself Apr 02 23:20:26 groxx: err i mean apps to decompile for checking out their code Apr 02 23:20:27 i think it might just be decompileandroid.com or something Apr 02 23:20:37 lasserix: decompile my app! Apr 02 23:20:43 lasserix: well, you could decompile my app Apr 02 23:20:51 but then I would point out that it's open source and laugh at you Apr 02 23:20:57 which makes you question what information they're using/storing Apr 02 23:21:02 JesusFreke: oh shit me too... Apr 02 23:21:04 I use this: https://play.google.com/store/apps/details?id=com.njlabs.showjava Apr 02 23:21:43 I'll have to install that... Apr 02 23:24:29 wooo can finally work on my project with 48% battery! Apr 02 23:25:50 i wonder if looks kinda odd with my irssi winow, vim window, and dark theme AS on this plane. someone stupid might get alarmed! Apr 02 23:27:41 DadFoundMy, you should open jpg of the NSA Logo or something similar Apr 02 23:27:57 then quietly laugh to yourself Apr 02 23:28:18 and/or just suffix every message with the NSA smiley ˙ ͜ʟ˙ Apr 02 23:28:48 heh a long time ago i had a metal briefcase wize a biohazard sticker on it Apr 02 23:28:57 s/wize/with Apr 02 23:29:03 dont think i would try that now Apr 02 23:29:21 Gryd3: I would look so cool! Apr 02 23:31:06 my project still had <<<<<<< hehe. paranoid people are fun to mess with... but doing so on a plain could be bad Apr 02 23:31:27 DadFoundMy: Conflict markers? Apr 02 23:31:40 TacticalJoke: i guess so. I should learn git Apr 02 23:31:40 Conflict markers are so early-2000s. Apr 02 23:32:04 And perhaps earlier Apr 02 23:32:38 DadFoundMy: Which files contain those? Apr 02 23:32:50 when i do git status im not getting any conflicts :/ Apr 02 23:32:53 Because I'm gonna guess conflict markers don't embody valid Java. :D Apr 02 23:33:09 TacticalJoke: idk its showing on my AS tab Apr 02 23:33:21 Yeah, you can have conflict markers without an active conflict (if, for example, you've incorrectly 'resolved' a conflict). Apr 02 23:33:33 DadFoundMy: probably means you committed the conflict markers? git status only shows them until it has been committed, it doesn't read all the files looking for markers. Apr 02 23:33:47 groxx: ugh how do i fix it? Apr 02 23:33:59 usually the delete key Apr 02 23:34:12 ...whats the key? Apr 02 23:34:17 <___Nam> hello, I have lg g3 phone (updated to 5.0 android) and I can not get it to work with my external sd card. I have some logs with errors http://pastie.org/10070777 Apr 02 23:34:38 The idea behind conflict markers is that you manually edit the file to resolve the conflict. The fact that yours are checked in suggests that you didn't edit the file to resolve the conflict. Apr 02 23:34:45 But of course you can do that now. Apr 02 23:34:52 DadFoundMy: build the project, find the compile errors, they should at least include the files with conflict markers. then you have to go in and resolve it by hand, because they couldn't be resolved automatically. Apr 02 23:35:20 DadFoundMy: it'll include both sets of code it couldn't figure out how to merge, you need to pick / modify the one(s) that are correct Apr 02 23:35:23 <___Nam> it looks like a permission problem, but the device is not enabling GUI buttons for external SD card... Apr 02 23:35:44 lol checking in conflict markers Apr 02 23:35:49 thats awesome Apr 02 23:35:54 If you use a merge tool, though, you should never encounter conflict markers. Apr 02 23:35:54 groxx: it build correctly.... Apr 02 23:36:24 maybe android studio is just saying theres a marker in the header but theres not? Apr 02 23:36:29 I haven't found a non-completely-hateful merge tool yet. Apr 02 23:36:43 groxx have you tried araxis merge ? Apr 02 23:36:53 I used to like KDiff3, but then I found that it has really weird merge logic. Apr 02 23:36:55 see i didn teven try to merge, i just tried to pull from my repo! Apr 02 23:36:58 p4merge is decent Apr 02 23:37:00 I use DiffMerge now. Apr 02 23:37:08 yeha i use p4merge too Apr 02 23:37:47 g00s: haven't used any that I've had to pay for, no. I may have to do so eventually, though usually I just `vim ` and fix it. Apr 02 23:38:17 if I really need it, I usually toss stuff in FileMerge. Apr 02 23:38:36 i have to say as much as i hated clearcase, its merging algorithm must have been from the gods Apr 02 23:38:52 <___Nam> any ideas, why the sd card is not detected? Apr 02 23:39:19 ___Nam: Is that a question for #android? Apr 02 23:39:39 ___Nam: two questions: 1) where are you trying to put the file? 2) if it's not an internal folder, do you have the write-external permission? Apr 02 23:40:04 <___Nam> http://pastie.org/10070777#19 logs Apr 02 23:40:27 Oh, guess not. Apr 02 23:40:43 i think we should change this channel to a darcula theme appriation channel Apr 02 23:40:45 ___Nam: is "/storage/external_SD/Failas" the full path? and are you sure /storage/external_SD exists? Apr 02 23:41:17 From what I read, scratch files still can't execute Java code. :\ Apr 02 23:41:25 They seem to have a very limited set of use cases. Apr 02 23:41:40 yeah, I really don't know what scratch files are for :| Apr 02 23:41:57 groxx are there any consequences to initializing GoogleAnalytics singleton at some arbitrary time, like lets say i lazy initialize it in Analytics.getTracker(Context). Apr 02 23:41:58 <___Nam> the problem is that my phone is not detecting the sd card, and the card is working Apr 02 23:42:16 g00s: not that I'm aware of, though that doesn't mean much :) Apr 02 23:42:21 <___Nam> /storage/external_SD exits Apr 02 23:43:48 <___Nam> the buttons of sdcard in settings are disabled too :/ Apr 02 23:44:41 ___Nam: the "move to sd card" button for an app? or some other setting? Apr 02 23:44:59 Is JVM unit testing working in 1.2 Beta? Apr 02 23:45:28 <___Nam> nope, the button for formatting SD card Apr 02 23:46:40 <___Nam> the logs http://pastie.org/10070777 Apr 02 23:47:39 ___Nam: might mean that the SD card isn't working / isn't mounted. if that's the case, nothing can read/write it Apr 02 23:48:30 <___Nam> is there a way to mount the card manually? Apr 02 23:48:53 ___Nam: dunno. depends on the device. probably remove it and stick it back in and see if it works after that. Apr 02 23:48:58 <___Nam> it looks like crd is not detected Apr 02 23:49:14 <___Nam> *sd card Apr 02 23:54:04 <___Nam> but the card is working with usb adapter on pc Apr 02 23:55:32 oh no if my laptop battery counter is correct im going to have to go 30 minutes without my laptop! Apr 02 23:55:36 what will i do???? Apr 02 23:55:53 also do the emulator take up a lot of battery? Apr 02 23:56:03 <___Nam> any ideas? Apr 02 23:56:55 Yes, the emulator will. Apr 02 23:57:06 CPU cycles = battery drain. Apr 02 23:57:12 ___Nam: im actually getting a similar issue with my phone, but it is saying that the card is blank and needs to my formatted Apr 02 23:57:20 DadFoundMy, harness the emulator's battery, it's always at 50 %. Apr 02 23:57:44 saapas: /r/shittyaskandroid-dev Apr 02 23:57:57 ___Nam: do you mean you have the card in the phone, the phone is plugged into your computer, and your computer can read the card? Apr 02 23:58:58 I'm having issues with an IllegalArgumentException when I'm trying to query with an AsyncTask. Apr 02 23:58:59 JetBrains's Kotlin repository has 21,439 commits. Damn. Apr 02 23:59:22 Where might there be an illegal character in this guy: Apr 02 23:59:28 http://query.yahooapis.com/v1/public/yql?q=select item.condition.text from weather.forecast where woeid in (select woeid from geo.places(1) where text="Portland") Apr 02 23:59:30 TacticalJoke: is there anyone to see how many the linux kernel has? Apr 02 23:59:34 Is it the spaces? Apr 02 23:59:56 I guess this is official: https://github.com/torvalds/linux Apr 03 00:00:02 tcmzeal: dunno. what's the stack trace? Apr 03 00:00:03 507,115. Apr 03 00:00:18 TacticalJoke: jesus i cant even imagine a project that big Apr 03 00:00:22 Though that's just since they started using Git, of course. Apr 03 00:00:24 TacticalJoke: not sure commits tell you all that much, unless there's a strict "one commit, one feature" policy Apr 03 00:00:37 TacticalJoke: when did they start using git? Apr 03 00:00:45 groxx: http://pastebin.com/5Tfec9vi Apr 03 00:00:45 In 2005, I think. Apr 03 00:00:55 if you have commit-happy submitters, and you just merge their branches, a small feature could be worth tens or hundreds Apr 03 00:00:59 wow i cant even imagine the scale of a project that big Apr 03 00:01:12 <___Nam> groxx, nope, the phone mount sd card button is disabled.. Apr 03 00:01:40 tcmzeal: yeah, probably the spaces. that's not a valid URL. Apr 03 00:02:09 Hmm, but the yahoo api requires the spaces to make it happy. Do I replace them all with %20 or? Apr 03 00:02:09 tcmzeal: don't build URL params yourself, use something that'll do it for you Apr 03 00:02:40 tcmzeal: yeah, %20, plus the equals and parenthesis and quotes all need to be escaped. Apr 03 00:02:46 don't do it by hand Apr 03 00:02:57 what network-request-library are you using? Apr 03 00:03:42 It's just a subclass of AsyncTask, not a library. Apr 03 00:04:16 Unless I'm dumb and don't know what a library is... but yeah. Apr 03 00:04:42 tcmzeal: but something is performing the network request. HttpUrlConnection? Apr 03 00:05:11 How can I tell? Apr 03 00:05:36 It'll be in your code. :) Apr 03 00:05:41 Whichever code does the HTTP request. Apr 03 00:05:51 tcmzeal: er. how are you causing that error? it'll be somewhere near there. Apr 03 00:06:09 is it from a yahoo library or something? Apr 03 00:06:17 DefaultHttpClient, I think. Apr 03 00:07:41 mind pastebinning the code? Apr 03 00:09:27 groxx: Sure, here ye go: http://pastebin.com/FY86f2Un Apr 03 00:09:52 tcmzeal: where's the .execute("some string") call? Apr 03 00:10:51 groxx: http://pastebin.com/JuuEqNGA Apr 03 00:11:20 Top class will probably be more interesting. Bottom one is just a view that glues the tap to the .execute(). Apr 03 00:12:43 tcmzeal: you probably want to do something like this for your query string: http://pastebin.com/xyK746xG Apr 03 00:13:21 Alright, giving that a roll now. Apr 03 00:13:32 there might be minor errors :| just wrote it out, haven't run it Apr 03 00:13:49 but take a look at http://developer.android.com/reference/android/net/Uri.Builder.html for building urls in the future :) Apr 03 00:14:09 Strange. The app keeps running instead of crashing and burning, so that's a plus, buuut Apr 03 00:14:10 java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=null, host=null, path=http://query.yahooapis.com/v1/public/yql Apr 03 00:14:35 alas. I was hoping it would just handle pasting in a big string :( Apr 03 00:14:54 try Uri.parse("http://etc").buildUpon().appendQueryParameter("q", etc) Apr 03 00:15:17 tcmzeal: shouldn't it be scheme=http, host = query.yahooapis.com, path =/v1/public/yql ? Apr 03 00:15:57 it should, if it parsed the value passed in as the path. I mislead them, hoping it would be that simple :) Apr 03 00:17:43 I think that worked, because now I have a JSON error that I recognize instead of something weird :) Apr 03 00:17:49 Thanks very much! Apr 03 00:17:58 good luck :) Apr 03 00:19:16 tcmzeal: Note that "response += s;" in WeatherGrabber.doInBackground will concatenate the lines (without line separators). Is that really what you want? Apr 03 00:19:20 I don't understand, why does gms require the metadata tag to be set in xml? Apr 03 00:19:27 the play services lib already knows what version it is... Apr 03 00:20:00 TacticalJoke: Don't believe it makes a difference when I construct the JSON object with it. Apr 03 00:20:03 pfn: I suspect it's because the gms process uses it to send correctly-formatted data to your process, for the version your app expects Apr 03 00:20:19 groxx, yeah, that's about the only thing I can guess Apr 03 00:20:32 pfn: if e.g. it broadcasts something. like for GCM notifications. Apr 03 00:20:41 Are you using a JSON library? Apr 03 00:21:20 pfn: fwiw though that's just a suspicion :) I don't know the details there, never bothered to dive in and find out. and even then there are so many versions, who knows if it's true between X and Y and going forward toward ZZZ Apr 03 00:21:21 JSONObject is the library, I think? Apr 03 00:21:45 a kinda annoying one, but yeah, JSONObject works Apr 03 00:21:47 groxx, that's about the only real answer that makes sense Apr 03 00:22:07 Ah, okay. In that case, AFAIK, you do need a string. Apr 03 00:22:15 back to action /menu item icons not honoring selector states... Apr 03 00:22:16 pfn: well, it also pushes you to configure everything through an XML file, which seems stupid when it's WAY more verbose and convoluted than doing it in code. Apr 03 00:22:32 But you should use StringBuilder there. Trying to append a java.lang.String creates a new one each time. It's not efficient. Apr 03 00:22:35 groxx, well, manifest metadata is available outside of the application Apr 03 00:22:37 not sure applying logic to gms actually results in any useful results Apr 03 00:22:46 String = immutable string; StringBuilder = mutable string. Apr 03 00:22:53 groxx, unlike code... Apr 03 00:23:20 Trying to mutate a String just creates a whole new one. Apr 03 00:47:50 stringbuilder still has to concatenate strings internally Apr 03 00:47:59 not sure it's any win unless you're making a lot of strings Apr 03 00:51:14 myke: StringBuilder uses a char[] under the hood IIRC, and it manages it efficiently. Apr 03 00:51:30 Hello, I am new to android development. I am trying to query my website but the examples on the dev pages seem not to work with android studio. It complains about needing to insert a million try/catch Apr 03 00:51:31 Saying "someString += someOtherString;" in a loop is very inefficient and is a beginner mistake. Apr 03 00:52:36 so my app has 7 ratings but no installs according to google :/ Apr 03 00:53:59 adding the zillion try/catches causes the program to crash when I test it Apr 03 00:54:06 DadFoundMy: total/current? Apr 03 00:54:33 icedp: yeah it says 0/1 even though i know atleast a few people who have downloaded it Apr 03 00:54:37 must just take time to update Apr 03 00:54:55 it's just odd that the number of reviews updates but not the installs Apr 03 00:54:57 DadFoundMy: there is date the last time it was updated Apr 03 00:55:02 DadFoundMy: usually 1-4 days Apr 03 00:55:36 oh yeah it was updated yesterday Apr 03 00:56:21 i posted my app on reddit and it got 20 something upvotes, i wonder how many installs that got me Apr 03 00:56:31 could be even zero Apr 03 00:56:32 depends Apr 03 00:57:47 icedp: i think it has to be atleaast 2 because i got 2 more ratings than i had Apr 03 00:57:47 unless those were from search results which i doubt Apr 03 00:57:48 well my battery is about to die on my laptop :/ Apr 03 00:57:48 gg Apr 03 00:58:22 i wonder how long it can run with 0% battery Apr 03 00:58:48 so I've got a crash report, but it's doesn't contain a line number. Is it because an app is not debugable in Google Play? Apr 03 00:58:48 Famous last words. Apr 03 00:59:13 Why does android studio require a billion try/catch when eclipse hardly ever complained Apr 03 00:59:18 Like this: java.lang.NullPointerException \ at com.package.name.o.myFunction(Unknown Source) Apr 03 01:02:18 I had a look, and StringBuilder.append(String) is actually particularly efficient, making use of String.getChars as well as doing (obvious) stuff such as trying hard to minimize reallocations. Apr 03 01:04:59 It'd be interesting to do a test. (I did one once and found +=ing Strings to be billions of times slower than using StringBuilder.append, but I can't remember the parameters. I'm guessing it was a large number of iterations.) Apr 03 01:05:09 billions?? Apr 03 01:05:26 ok, if your app emits, say, 100 strings, what's the real world total additional time vs builder? Apr 03 01:05:52 i'm skeptical most apps are really doing that much string concat, that the builder would make a material difference in run time Apr 03 01:06:21 sure if you're constructing a million strings by appending a char at a time to make a 5000-char string each cycle Apr 03 01:06:38 if you're just gluing together a few lines of output here and there... Apr 03 01:07:44 myke: But why would you use += with String for even that? Apr 03 01:07:48 It's just misusing a class. Apr 03 01:08:01 String is immutable. Why pretend it's not? Apr 03 01:08:16 The += thing is just sugar. Apr 03 01:08:29 I'll use + for multiline string literals Apr 03 01:08:45 JesusFreke: That's fine, of course (that boils down to StringBuilder code anyway). Apr 03 01:08:50 myke: eh, you might be surprised. not only is it allocating and copying a lot of data if you're doing it in a loop, it's producing a bunch of garbage objects that have to be collected later. Apr 03 01:09:49 groxx: fair enough, maybe i'll do a test later Apr 03 01:10:14 i do += to get web results, but just a few lines of output every time the user makes a request...i have a hard time believing it has any impact, even if builder is much more efficient Apr 03 01:10:36 saving 10ms on an event that happens every 3-4 seconds just doesn't matter Apr 03 01:10:38 dunno that I'd claim billions (maybe in a synthetic test, since it may cause a bunch of GC), but e.g. parsing a web response that way can be visibly faster Apr 03 01:11:12 fair enough, if you get k's of response Apr 03 01:11:25 yeah, it does take many Ks :) Apr 03 01:11:35 a K or less, yolo. Apr 03 01:11:50 thing is...in php, javascript, etc, this *never* comes up, yet those languages must be slower than java string concat Apr 03 01:12:06 fairly often they have mutable strings Apr 03 01:12:07 TacticalJoke: not even that, it's just a single string constant Apr 03 01:12:07 We don't know how our code is going to evolve in the future, though. You could end up accidentally using that code to process some heavy strings. Apr 03 01:12:10 which makes me think the actual real-world impact is usually negigible Apr 03 01:12:18 It just seems like a mistake to pretend that String is mutable. Apr 03 01:13:21 e.g. https://gist.github.com/JesusFreke/858ef717e91c8979d89c Apr 03 01:13:33 myke: also, since quite a few scripting languages assume you'll be doing a lot with strings, they do things like "concat X and Y, get X with a pointer to Y" Apr 03 01:13:39 Yeah, the compiler can concatenate that at compile time. :) Apr 03 01:13:53 (ignore the fact that the top is actually smali code. It's just an arbitrary, long string, that I happened to have in some test code ;)) Apr 03 01:14:29 my tests don't have smali code in them :'( /me is uncool Apr 03 01:14:35 I must rewrite our tests Apr 03 01:14:38 * groxx is done Apr 03 01:14:53 well, it's a test for my smali plugin for idea :p Apr 03 01:15:05 using smali code is pretty much required ;) Apr 03 01:15:08 mutable strings are "fast" Apr 03 01:15:14 TacticalJoke: i'm not sure anyone is confused about strings being immutable, are they? Apr 03 01:16:21 beginners, yeah, I'd say so. I see += for enormous web responses sometimes (hundreds of Ks through megabytes) Apr 03 01:17:01 sure, if you're pulling images or whatever into a string like that, yer doen it wrong Apr 03 01:17:35 people doen it wrong every day D: Apr 03 01:17:49 Is += even easier to read? To me, it just looks wrong and it makes me think "What's going on?". Apr 03 01:17:50 though that's typically quick to fix Apr 03 01:17:58 The equivalent code with StringBuilder is obvious. Apr 03 01:18:09 The intent is clear: we want a mutable string. Apr 03 01:18:34 Using String and += is confusing: an immutable string that is being appended... huh? Apr 03 01:18:39 At least to me. :) Apr 03 01:18:47 well, let's play devil's advocate, if line += chunk; works, why should the coder care if line is being appened to or being recreated? Apr 03 01:18:51 well, also "I heard strings are slow and I want to do `"a" + var + "b"` " Apr 03 01:19:27 myke: Efficiency and idiomatic Java. Apr 03 01:19:51 after all we have builder pattern where object().method1(foo).method2(bar).method3(baz).doIt() may recreate a new object in any of the 3 methods Apr 03 01:19:54 and no one seems to fret about that Apr 03 01:20:18 I do D: Apr 03 01:20:23 myke: This is a whole pattern. You're basically advocating a slow way of doing things when the non-slow way if perfectly fine. Apr 03 01:20:29 TacticalJoke: goodness, i'm the wrong person to talk to about idiomatic java Apr 03 01:20:29 And in fact the non-slow way is *expected*. Apr 03 01:20:55 now idiotic java, on the other hand. I'm an expert! Apr 03 01:20:58 :F Apr 03 01:20:59 :D * Apr 03 01:21:00 maybe that's the problem, i exactly don't come from java culture, i come from dynamic languages where line += chunk; is idiomatic Apr 03 01:21:01 lol Apr 03 01:21:04 and hey it works in java, so... Apr 03 01:21:16 it works reasonably well Apr 03 01:21:48 myke: Basically, java.lang.String is not intended to be used in this way. This is why StringBuilder even exists. Apr 03 01:22:17 TacticalJoke: but yet you *can*... Apr 03 01:22:54 pfn and groxx have both made good points Apr 03 01:23:06 And I didn't? :p Apr 03 01:23:18 you don't admit that += is ever legitimate Apr 03 01:23:28 here's a contrived example Apr 03 01:23:47 It's not legitimate in a loop. It's simply poor code. Apr 03 01:23:56 I have a really lame question. My application is crashing(not responding) but I can't seem to find out where I can read about the error from the IDE. Any tips? Apr 03 01:24:01 java isn't sufficiently safe to prevent you from doing bad ideas, "because you can" isn't much of an argument :) Apr 03 01:24:04 It's legitimate in a single statement (since that'll just compile down to a StringBuilder call anyway). Apr 03 01:24:27 fprophet: do you know where the logcat output is in the IDE? Apr 03 01:24:51 yes, I think so Apr 03 01:25:01 TacticalJoke: i counter that stringbuilder can't possibly be cleaner and simpler than result += line; Apr 03 01:25:23 and if you know the total output will be small - which it often is - you're just adding complexity for essentially zero benefit Apr 03 01:25:34 fprophet: check there. if it's crashing at start-up, you may need to turn off the filter for your app, because app-launch-errors are sometimes reported by the system (your app never started, so it can't do the logging) Apr 03 01:26:08 TacticalJoke: do you also fundamentally abhor spinlocks? Apr 03 01:26:10 fprophet: ah, wait. you also said "not responding". did you get the not responding dialog, and did you hit "OK" to kill the app? Apr 03 01:26:34 I get the not responding dialog Apr 03 01:26:47 java just sucks Apr 03 01:26:48 I found the error junk in logcat Apr 03 01:27:01 + overloading on string was the worst idea ever Apr 03 01:27:18 java does suck, but android Apr 03 01:27:22 fprophet: if you hit OK, it usually logs something to tell you to check in /data/anr/traces.txt . `adb pull /data/anr/traces.txt` will get the file, which shows the latest not-responding crash(es) Apr 03 01:27:25 it's the only reason i use java Apr 03 01:27:28 i like te way kotlin does operator overloading Apr 03 01:27:41 java isn't the only game in town for android Apr 03 01:27:43 Yeah, it's brilliant, g00s. Apr 03 01:27:49 A lot of Kotlin features are just right. Apr 03 01:27:59 btw i refined my thing from last night, tear me up: https://github.com/fkspro/android-tinyasync Apr 03 01:28:02 bbiab Apr 03 01:28:21 Another one is the ability for extension functions to effectively make arbitrary types implement Iterable. Apr 03 01:29:26 myke: To be honest, if I were considering a library and the author used += on strings in loops I'd just look elsewhere. It screams "Doesn't understand Java". Apr 03 01:29:47 there's xamarin and a whole bunch of jvm languages Apr 03 01:32:21 <- doesn't understand java, hammers on java until it works like he wants, wishes it were actually python Apr 03 01:32:44 i've considered making a reflection core object to solve all my problems, slowly Apr 03 01:32:55 lolwut Apr 03 01:33:31 You need to be adaptable. Apr 03 01:33:57 i am! i'm getting java to work at all, instead of punting and doing phonegap or whatever Apr 03 01:34:09 or cordova haha Apr 03 01:34:23 we already all agreed java is mostly crap Apr 03 01:35:50 you could just jump to kotlin Apr 03 01:36:29 * pfn only does java for professional work when the client will not accept an alternative Apr 03 01:36:54 does kotlin change the fundamental problems? does it offer duck typing for example? Apr 03 01:37:17 duck typing is fundamentally a problem Apr 03 01:37:22 lol Apr 03 01:37:27 so is g00s typing ;) Apr 03 01:37:32 * lewellyn could not resist that one. Apr 03 01:37:34 saie no python coder ever Apr 03 01:37:37 said Apr 03 01:38:07 interfaces are just duck typing for ppl who can't let go of static types :) Apr 03 01:38:14 I write a ton of python too, duck typing is bad Apr 03 01:38:19 g00s: so you've done production apps with kotlin? Apr 03 01:38:30 lewellyn no i haven't Apr 03 01:38:37 The Kotlin web demo is not working right now. :\ Apr 03 01:38:47 i have yet to meet anyone who has, which doesn't speak well of it. Apr 03 01:38:58 lewellyn: It's not 1.0 yet. Apr 03 01:38:59 heh, we're all like "you first" Apr 03 01:39:08 They're changing stuff all the time. Apr 03 01:39:10 sounds like square is rapidly got a be on kotlin Apr 03 01:39:15 gonna Apr 03 01:39:24 TacticalJoke: yes. but considering that they have a stream of testimonials, surely i'd encounter *someone* who's done it. Apr 03 01:39:30 after they can use dagger i guess pfn Apr 03 01:39:58 lewellyn my app is mostly done; i'm not rewriting it in kotlin Apr 03 01:40:01 and butterknife Apr 03 01:40:05 my next app will be sift or c# haha Apr 03 01:40:07 g00s: i don't blame you. Apr 03 01:40:12 hah. c# Apr 03 01:40:16 *swift Apr 03 01:40:17 You'd love C#, g00s. :) Apr 03 01:40:20 g00s.NET Apr 03 01:40:20 :D Apr 03 01:40:21 Linq is so nice. Apr 03 01:40:29 += (as everybody knows) is just a shortcut for creating an object and assigning reference to it.. so it seems quite logical to me on what it's doing providing knowing how Java peculiarity Apr 03 01:40:51 ageeed Apr 03 01:42:11 g00s: you should register g00s.net :D Apr 03 01:42:21 heh Apr 03 01:42:36 "i don't drink the kool-aid, i make it!" Apr 03 01:42:47 so, any helper classes or libraries for AccountManager? Apr 03 01:43:07 Not sure what you mean, icedp. += isn't about creating objects and assigning references. Apr 03 01:43:37 Unless you mean in the very specific case of Java strings. Apr 03 01:43:58 TacticalJoke: if we weren't meant to ever += strings...then why does java support it? Apr 03 01:44:11 phix: no clue. let me know if you find any! Apr 03 01:44:13 TacticalJoke: hmm yes I mean String, not talking about primitive types Apr 03 01:44:17 someVar += someOtherVarOfSameType is a short cut for someVar = someVar + someOtherVarOfSameType Apr 03 01:44:27 why is concat() a method of String? Apr 03 01:44:41 because that's what + means Apr 03 01:44:53 * lewellyn wanders to get work done rather than making obvious snarky comments Apr 03 01:44:56 myke: because pythonistas occasionally try to write java code Apr 03 01:45:29 It's fine for stuff like this: string name = "Steven"; if (hasLastName) { name += " Smith"; } Apr 03 01:45:48 But it's not fine for stuff like this: String text = ""; for (int i = 0; i < 100; i++) { text += "whatever"; } Apr 03 01:45:50 funny that was exazctly the example i was gonna post earlier Apr 03 01:45:50 groxx: or scala'ists :) Apr 03 01:46:05 what about for i < 3 ? Apr 03 01:47:00 groxx: Scala you can use any unicode character (minus the reversed ones) for method names :) Apr 03 01:47:16 I ♡ questions too, myke Apr 03 01:47:43 do people say "javonic" ? Apr 03 01:47:46 phix: aww, no reverse character? Apr 03 01:48:09 http://stackoverflow.com/a/11942386/1056386 So in a loop we should use StringBuilder yes. But if we use just s1 + s2 + s3 + s4 in one line compiler optimizes it to StringBuilder anyway Apr 03 01:48:18 I think they say "Professional Java Application Developer Impl" Apr 03 01:48:18 myke: I don't think it's sensible to use += more than once. Apr 03 01:48:40 ok fair enough Apr 03 01:48:44 myke: People have all sorts of names for people that code in java, most of them are not nice Apr 03 01:48:53 i'll even redo my code to use stringbuilder Apr 03 01:49:21 Hey guys, do any of you know of an up-to-date site that shows the market share of various screen sizes/densities? Apr 03 01:49:29 groxx: I think they say "Programmers who are not qualified enough to write in assembler or binary" :) Apr 03 01:49:39 TacticalJoke: because += create new StringBuilder each time Apr 03 01:49:49 phix: python ppl say "pythonic" to refer to idiomatic python code, was wondering if "javonic" was a thing Apr 03 01:50:18 myke: It can be a thing! You should use that Apr 03 01:50:31 liuwenhao: android dashboard? Apr 03 01:50:48 liuwenhao: http://developer.android.com/about/dashboards/index.html Apr 03 01:50:50 thank you Apr 03 01:50:51 ok so AccountManager, any helper classes for it? Apr 03 01:50:57 exactly what I was looking for Apr 03 01:51:12 Or do I need to write my own? Apr 03 01:51:18 phix dont need helper classes, just do it Apr 03 01:52:08 g00s: well you kind of do though, to handle the cases where getting the auth token fails or other simular situations Apr 03 01:52:17 lewellyn: I hope Kotlin takes off when it hits 1.0. It deserves to, IMO. Apr 03 01:52:29 I suppose my question is, is there helper classes for token authentication Apr 03 01:52:40 as I know AccountManager supports others Apr 03 01:52:54 (other authentication types) Apr 03 01:52:58 Also hope the Android people commit to it. :D But no idea whether that'll happen. Apr 03 01:53:35 s/people/tools team/ Apr 03 01:54:55 does kotlin have auto? Apr 03 01:55:04 i rwally miss auto in java Apr 03 01:55:09 As in type inference? Apr 03 01:55:12 yes Apr 03 01:55:14 Yeah. Apr 03 01:55:33 you already have strong typing, so what's the problem? Apr 03 01:56:27 heh, I do fake auto in IDEA. I just type something like blah = new Blah();, and then alt enter over the blah and have it add the declaration for me. Apr 03 01:58:15 auto? type inference? yes, kotlin does Apr 03 01:58:20 Kotlin is nice and concise. Code often looks like this: val builder = StringBuilder() // note the type inference and the lack of 'new' Apr 03 01:58:49 "pony" - and then expands into exactly what you were thinking. Apr 03 01:58:51 Compared with "StringBuilder builder = new StringBuilder();". Apr 03 01:59:27 Wait, that'd be this -- final StringBuilder builder = new StringBuilder(); Apr 03 01:59:28 its good that they are working on eclipse plugin for kotlin Apr 03 01:59:32 FINAL! Apr 03 01:59:36 since 50% java devs use eclipse ;) Apr 03 01:59:40 I hate that keyword. It takes over the code. Apr 03 01:59:57 it does have a certain... finality to it. Apr 03 02:00:06 eclipse.... yuck Apr 03 02:00:23 I really wish I had switched to Android Studio sooner. It's so nice Apr 03 02:00:30 not on old slow hw Apr 03 02:00:32 I still prefer Eclipse in some ways. Apr 03 02:00:54 Problems view :| Apr 03 02:01:11 the only thing about AS I don't like is that xml designer is pretty useless Apr 03 02:01:15 only thing i really disliked about eclipse, was the theming. some stuff couldn't be. so you would have a dark editor with white panels Apr 03 02:01:19 i use emacs + eclipse, works for me Apr 03 02:01:27 IntelliJ: 99 problems but Eclipse ain't one. Apr 03 02:01:33 g00s: well, that's the same with IDEA Apr 03 02:01:49 g00s: Oh, they fixed that finally. Apr 03 02:01:50 JesusFreke but darcula seems to touch the whole UI Apr 03 02:01:50 JesusFreke: that sounds like an awesome auto-expansion. probably at least 20% cooler than any I've got. Apr 03 02:01:56 TacticalJoke orly Apr 03 02:01:58 Well, they have *a* dark theme. Apr 03 02:02:02 But you can't really customise much. Apr 03 02:02:03 :O Apr 03 02:02:03 the editor can be arbitrarily themed, but a lot of the panels and stuff can't be (other than like normal vs. darkula) Apr 03 02:02:06 And it looks really, really bad. Apr 03 02:02:15 It's the ugliest theme ever. :D Apr 03 02:02:17 I switched to wombat theme for AS, I like it a lot more than darcula Apr 03 02:02:24 At least on Windows. Apr 03 02:02:29 is there a vampiric-wombat theme perhaps? Apr 03 02:02:42 The icons don't cohere. Apr 03 02:02:50 I use darkula plus a dark solarized theme for the editor Apr 03 02:03:12 e.g. https://raw.githubusercontent.com/wiki/JesusFreke/smali/smalidea.png Apr 03 02:03:12 I just use white Apr 03 02:03:18 http://www.ideacolorthemes.org/themes/ there is some really great stuff on here Apr 03 02:03:20 darcula doesn't theme properly on windows or something Apr 03 02:03:54 not to mention, everything else on my monitor is white anyway Apr 03 02:03:54 I use a light theme with a Darcula editor theme. Apr 03 02:03:57 except for my terminal windows Apr 03 02:04:06 It doesn't hurt my eyes when I Alt+Tab. Apr 03 02:04:31 Hey everyone! I have a question I was hoping to get help with. Just finished a project that uses third-party libs and I want to commit it to github as a public repo.. what's the general procedure for something like this? Do people commit the lib or exclude it and it is expected that others will get the lib themselves? Thanks! Apr 03 02:04:33 This is Eclipse with the dark theme: http://blog.vogella.com/wp-content/uploads/2014/03/darktheme.png Apr 03 02:04:40 Note how bad the icons look (they looked even worse for me). Apr 03 02:04:44 Hillatio, use a build system that gets the lib for you Apr 03 02:04:44 TacticalJoke: oh god, my eyes Apr 03 02:04:56 whoa, that theme looks horrible Apr 03 02:04:56 * pfn really needs to get a 2nd monitor some day Apr 03 02:05:01 :D Apr 03 02:05:26 i can't even read the tab text on my monitor Apr 03 02:05:32 without getting close to my screen Apr 03 02:05:41 TacticalJoke wow that looks ... terrible Apr 03 02:05:48 java UIs lol Apr 03 02:05:49 lol Apr 03 02:06:00 It's like someone just randomly added "backgroundColor=#000000". Apr 03 02:06:05 Or some variation. Apr 03 02:06:28 It looks like a UI I might write Apr 03 02:06:32 In fact, it looks *way* worse on Windows because of the title bars. Apr 03 02:06:48 At least his title bars are dark. Apr 03 02:07:19 Hillatio: Can't you just commit it and credit the 3rd party libs that you used? Apr 03 02:07:27 still doesnt look as bad as idle :) Apr 03 02:07:41 Ugh, Python IDEs. Apr 03 02:07:45 lol Apr 03 02:07:47 I think I used Idle. Apr 03 02:08:17 It made me feel like I had travelled back in time. Apr 03 02:08:59 well its tcl right ? Apr 03 02:09:10 Tk Apr 03 02:10:05 Speaking of which: ftp://ftp.sunet.se/pub/lang/tcl/alcatel/code/tkcron-2.12.README Apr 03 02:10:12 One of my early open source successes :) Apr 03 02:11:09 "ftp://" -- there's something I've not seen in a while. :) Apr 03 02:11:10 Funny to read code I wrote 20 years ago Apr 03 02:11:49 i'm not going to look at my android code 20 years from now Apr 03 02:11:55 liuwenhao: Yeah that's actually what I'm not sure of. I mean, def for libs that are commercial I could not never commit publically, but I'm not sure if its "wrong" to commit a lib that is also on github Apr 03 02:11:57 thats for sure ;) Apr 03 02:12:00 You never know Apr 03 02:12:26 we had this thing called the lolcycle Apr 03 02:12:29 and lolcat Apr 03 02:12:30 pfn: Interesting idea; might look into that Apr 03 02:12:37 i hope i never come across that awful tcl/expect script i wrote 20 years ago Apr 03 02:12:40 Hillatio: Do they have a Maven artifact that you could depend on via Gradle? Apr 03 02:12:44 Hey guys, do you know if it is possible to edit the default build.gradle in Android Studio so that I can run a console command before it? Apr 03 02:12:46 Hillatio, you know gradle does... Apr 03 02:12:57 I'm sort of having troubles, I've done alot of research but it is always unknown Apr 03 02:13:13 I don't know what a maven artifact is tbh haha.. new to android dev in general. I'll look into this stuff now :) Apr 03 02:13:16 ryanw_se, to do what Apr 03 02:13:19 like when I am applying the android plugin to my script all of a sudden "commandLine()" is unknown o.o Apr 03 02:13:27 I want to run a NPM command, for my web based app Apr 03 02:13:36 before I actually build the android project Apr 03 02:13:49 Hillatio: What library is it? Apr 03 02:13:50 you can run a command as part of the run profile Apr 03 02:13:51 If you can say. Apr 03 02:14:02 Can an AsyncTask have a constructor? Apr 03 02:14:05 Jsoup Apr 03 02:14:07 fprophet, yes Apr 03 02:14:31 ryanw_se: it's possible but I ended up adding external tool in Run Configuration / before launch Apr 03 02:14:33 You can just get it via Gradle. Apr 03 02:14:38 This is what I have, https://gist.github.com/ryanw-ny/05f19248deadd6369ecf Apr 03 02:14:50 The problem is icedp multiple people contribute to the project so it would be easier Apr 03 02:15:01 if I could somehow attach it in the actual build script Apr 03 02:15:02 oh sweet, so I wouldn't manually place anything in the libs dir? Apr 03 02:15:09 Yeah. Apr 03 02:15:09 Hillatio, yes Apr 03 02:15:36 compile 'org.jsoup:jsoup:1.8.1' Apr 03 02:15:40 In build.gradle. Apr 03 02:15:46 (Or whichever version.) Apr 03 02:15:58 Thats the point behind why I am not setting it in the run profile :/ Apr 03 02:16:13 And remove it from /libs. Apr 03 02:16:14 * pfn shrugs Apr 03 02:16:17 * pfn still doesn't use gradle Apr 03 02:16:19 I've seen several solutions, and tried them but none of them have really worked successfully Apr 03 02:16:59 pfn: how's maven treating you? Apr 03 02:17:09 CedricBeust have you used google analytics ? Apr 03 02:17:11 JakeWharton, it's pretty garbage, I use that shit daily, too Apr 03 02:17:24 haven't tried the re-located maven-android-plugin yet though Apr 03 02:17:25 g00s: Not in a long time Apr 03 02:17:26 maybe that one is better Apr 03 02:17:30 pfn: I don't know how you do it :) Apr 03 02:17:48 well, my client wants to use maven still... Apr 03 02:17:50 * pfn shrugs Apr 03 02:18:00 The jcenter site doesn't seem to give the Gradle one-liner. Apr 03 02:18:06 Weird. Apr 03 02:18:18 thats weird, i would think client would typically go with 'default option' which is gradle Apr 03 02:18:39 well, when this project started, gradle wasn't mature enough Apr 03 02:19:34 Hillatio: Note that you can search for these dependencies via Project Structure (or whatever it's called; my brain isn't working and I don't have Android Studio open). Apr 03 02:19:46 i have to ask a dumb question, but when you do Play alpha / beta - is this a Debug or Release build ? Apr 03 02:20:25 i'm guessing release ? Apr 03 02:21:19 g00s: yep Apr 03 02:21:32 g00s: you can move it then to prod at once Apr 03 02:21:54 ok , just gotta know for GA dry run Apr 03 02:22:20 actually pre release for tester's Apr 03 02:22:53 everything on play is non-debug Apr 03 02:23:11 This (in Kotlin) is so nice: throw IndexOutOfBoundsException("Last index ($lastIndex) is less than first index ($firstIndex)") Apr 03 02:23:21 Seems like a tiny thing, but not having to use String.format makes it so much more readable. Apr 03 02:24:36 I guess the + operator is usable in Java here, but even that isn't quite as nice. Apr 03 02:24:48 i wonder if you are working on a gapp inside google, and ask if you can use kotlin what happens hehe Apr 03 02:26:35 if any of the gapps used kotlin, that would be interesting to know Apr 03 02:26:41 Yeah Apr 03 02:26:56 maybe dianne h visits you for attitude adjustment Apr 03 02:27:38 I'm not sure how I feel about using "=" for function bodies. Seems too one-line-y to me. (Though I've used only C# and Java in the past few years.) Apr 03 02:30:41 Hmm, using a newline looks fine, though. Apr 03 02:32:42 ok so my application is using the Holo.Light theme however my preference activity / fragment is black :\ Apr 03 02:32:47 am I missing something here? Apr 03 02:33:59 pfn do any of your apps use GA ? Apr 03 02:34:14 also, I set a default value for a PreferenceList however when I run it nothing is selected by default :\ Apr 03 02:34:56 phix did you forget PreferenceManager.setDefaultValues(this, R.xml.preferences, false); Apr 03 02:36:39 g00s: Where do I set that? Apr 03 02:36:52 usually in your home activity onCreate Apr 03 02:37:00 i think Apr 03 02:37:12 g00s, nope, they use other analytics packages Apr 03 02:37:27 ok I found one error I did, my Activity extended PreferenceActivity instead of Activity (I am using a PreferenceFragment) Apr 03 02:41:26 g00s: thnx, I am loading defaults now in my main activity Apr 03 02:41:51 g00s: The theme is still wrong though, it is black background white text instead of the other way around Apr 03 02:42:27 i'm not very good with android theming issues, good luck Apr 03 02:44:17 g00s: cheers! Apr 03 02:52:02 oh great, I can't name my projects preferences file the same as the preferences file used in a library I depend on Apr 03 02:54:57 guys, can someone tell me where android stores the sqlite database which stores gps history? I could swear I read somewhere that it does this... Apr 03 02:57:15 i doubt android saves any gps history (beside last known location), especially in sqlite Apr 03 02:57:40 g00s: I swear I read it about a year ago, but perhaps I'm wrong Apr 03 02:59:51 g00s: ok I found out my issue, I was applying a holo fullscreen theme to the acitivity **** ENDING LOGGING AT Fri Apr 03 02:59:59 2015