**** BEGIN LOGGING AT Sun Aug 03 03:00:00 2014 Aug 03 03:00:08 there are bits of it I totally understand Aug 03 03:00:12 a lot I dont Aug 03 03:00:51 the whole ui context vs non ui, or the fact that you have to pass that around Aug 03 03:01:42 one of my specific gripes are just the order of callbacks can be deterministic but undefined by documentation, so it makes you do all sorts of stupid shit with defensive programming, maintaining state, etc Aug 03 03:01:52 and this all blows upe terrifically with concurrency, etc Aug 03 03:01:56 yeah Aug 03 03:02:18 well the whole network callback asynchocity is shit, but thats java for you Aug 03 03:02:47 and its still better than blocking calls Aug 03 03:02:58 there are nice tools to handle async now Aug 03 03:03:13 but still, this all has to happen in the context of a android component lifecycle Aug 03 03:03:18 but I cant tell you how many of our engineers I had to explain chained callbacks vs subsequent calls and parallel network requests Aug 03 03:03:29 g00s: what async shit new in android? Aug 03 03:03:42 nothing new in android specifically, but i use rxjava a lot Aug 03 03:03:50 NICE Aug 03 03:04:03 wow Aug 03 03:04:04 thats nust Aug 03 03:04:10 and nuts that neflix built and contributed it Aug 03 03:04:21 lots of people contribute to it nowadays Aug 03 03:04:36 the idea came from MS, eric meijer, etc Aug 03 03:04:39 yaeh Aug 03 03:04:46 I've been fucking with rx since REAL early days Aug 03 03:05:38 now i'm fucking around with a daylight saving time bug, ugh Aug 03 03:05:44 fucking Calendar Aug 03 03:05:47 fuck java and date.* Aug 03 03:05:53 java fucked it up Aug 03 03:06:00 jsr310 almost works on android ... but not totally Aug 03 03:06:03 calendar tried to fix and fucked it u Aug 03 03:06:09 i think it needs a SPI to be ported over Aug 03 03:06:17 jota time tried to fix it and its BETTER but not great Aug 03 03:06:23 honestly play with times in .net Aug 03 03:06:27 that will spoil your ass Aug 03 03:06:56 well, MS is lucky they have nice vertical control of their stack Aug 03 03:06:59 so is Apple Aug 03 03:07:21 we have, hmm java 6 date / time Aug 03 03:08:07 java 8 has a new Date system Aug 03 03:08:21 java 9 is going to have a new unified type system :| Aug 03 03:08:46 (primitives vs objects) Aug 03 03:08:48 I can understand why people use java Aug 03 03:08:55 the whole multiple platform argument Aug 03 03:09:01 but honestly it does that shit badly Aug 03 03:09:03 the JVM is very nice Aug 03 03:09:08 has java 8 been released yet? there's some jdk or something but no everyday-user jre Aug 03 03:09:10 I dont know Aug 03 03:09:16 I'm really not impressed with java Aug 03 03:09:28 its like lets implememt this feature thee other few langs support Aug 03 03:09:36 and totally fuck it up beyond recognition Aug 03 03:10:04 ron_frown i can suffer with java, it depends on the problem. with Android, the APIs were designed with Java in mind - i'm not convinced any other language makes the APIs easier to deal with, so I'm ok with java here Aug 03 03:10:29 if the problem lends itself more to funtional programming style, i would prefer scala or clujure Aug 03 03:10:36 for EE, scala or clojure Aug 03 03:10:37 well I am kinda over android Aug 03 03:11:15 I'm not sure I can see where they are trying to take it, but the direction I see... kinda bends the concept of opensource Aug 03 03:11:34 I dont have a better solution on how to solve "fragmentation problem" than they try to with play services Aug 03 03:11:45 ron_frown well yeah, since you do a lot of work in porting android to other HW, you have a different perspective than a regular dev like myself Aug 03 03:11:58 yeah Aug 03 03:12:08 i'm not dealing with binary kernel blobs, etc :) Aug 03 03:12:37 my os is going to basically be... completely wide open... as free of a license as I can give and not have someone pick it up and sell it as competition Aug 03 03:12:45 ron_frown but android has so much market share in the EU they are looking at ant monopoly stuff now Aug 03 03:13:05 ron_frown yeah, that SOUNDS nice, but ... Aug 03 03:13:08 I just want somethign better for MY needs Aug 03 03:13:17 and even if it doesnt get huge adoption Aug 03 03:13:23 its going to make my life easier Aug 03 03:13:44 i think ubuntu had to make lots of "ethical" (in Open Source) tradeoffs to have a working system Aug 03 03:13:50 I need some "actual development help". GraphView's gridlines appear to be an overlay on top of the screen that does not scroll with the graph. So when you zoom and scroll the graph, you end up with gridlines marked "0.3159". I want them to be fixed in place like "0.5, 1, 1.5) Aug 03 03:13:56 g00s: like what Aug 03 03:14:23 ron_frown well i think the whole binary blob thing was blessed OK with ubuntu, and so from there it became established Aug 03 03:14:30 for kernel drivers Aug 03 03:14:34 nvidia, etc Aug 03 03:14:38 well I'm not opposed to that Aug 03 03:14:50 those guys arent willing to open source their drivers yet Aug 03 03:14:56 jimbo1qaz GraphView ? Aug 03 03:14:59 what are youg oing to do Aug 03 03:15:12 well, thats kinda the problem Aug 03 03:15:20 sacrifice ideals to get stuff working Aug 03 03:15:36 thats corporate business for you Aug 03 03:15:44 I believe in open opensource Aug 03 03:15:55 not the kinda shit you see with android Aug 03 03:15:59 g00s yes Aug 03 03:16:12 jimbo1qaz what are you talking about Aug 03 03:16:14 it's not an android component Aug 03 03:16:20 I'll ask the dev Aug 03 03:16:46 I beleive in progress, not trying to build a channel to push my pay services etc Aug 03 03:16:51 push ads Aug 03 03:17:19 I dont know it'd gain a ton of end user adoption Aug 03 03:17:29 but if I can achieve what I am shooting to Aug 03 03:17:34 hm, thats their business model (ads). luckily, there are other competitors with a different slant - but they aren't much more open (MS / Apple) Aug 03 03:17:42 yeah Aug 03 03:17:44 i guess FirefoxOS is totally open Aug 03 03:17:46 I think honestly MS has a LOT Aug 03 03:17:50 LOT going for them Aug 03 03:17:51 not sure what sgoing on with ubuntu touch Aug 03 03:17:57 cept their ui is just complete shit Aug 03 03:18:00 and everything is closed Aug 03 03:18:10 firefox isnt impressive to me Aug 03 03:18:16 its html based so its slow and unresponsive Aug 03 03:18:19 AND Aug 03 03:18:26 they tend to target slow devices Aug 03 03:18:36 ron_frown did you say you're writing an OS? Aug 03 03:18:36 so its like a double negative whammy Aug 03 03:18:41 dotDeb: yessir Aug 03 03:18:45 or maam as it may be Aug 03 03:18:55 ron_frown as an android replacement? Aug 03 03:18:57 sir Aug 03 03:19:38 g00s is firefox os totally open like replicant is totally open? Aug 03 03:19:39 ubuntu seems nice but dev apps on linux only, and they got all nazi about their display server / Aug 03 03:19:48 dotDeb: yes Aug 03 03:20:00 not necessarily trying to take over any of googles marketshare or antyhign Aug 03 03:20:08 ron_frown really? not even any binary blobs? Aug 03 03:20:10 I run my own embedded hardware running android Aug 03 03:20:28 no theres no getting around that Aug 03 03:21:01 soc's typically have one of maybe 5 major gfx chipset vendors Aug 03 03:21:06 and as far as I know Aug 03 03:21:13 ron_frown no getting around binary blobs? Aug 03 03:21:14 none of these actually distribute source to their drivers Aug 03 03:21:20 more so Aug 03 03:21:28 drm is a huge concern Aug 03 03:21:32 cause afaik replicant doesn't have proprietary blobs Aug 03 03:21:49 https://en.wikipedia.org/wiki/Replicant_%28operating_system%29 Aug 03 03:21:49 I'd be very very surprised if it didnt Aug 03 03:21:59 it's FSF supported so I don't think it does Aug 03 03:22:13 and if it didnt, I'd be surprised if the gfx performance was worth as hit Aug 03 03:22:14 shit Aug 03 03:22:37 uh yea 3d graphics is not operational on it Aug 03 03:22:38 its based on cm Aug 03 03:22:56 besides thats really not the problem with android Aug 03 03:23:04 kernel/linux land shit is actually really rather solid Aug 03 03:23:05 "with Wi-Fi and Bluetooth requiring proprietary firmware in order to work" Aug 03 03:23:11 the bionic shit and apis is what I want to gut Aug 03 03:23:28 just like ubuntu does Aug 03 03:23:35 bionic shit? Aug 03 03:23:48 the java services/ui/composition/etc Aug 03 03:23:52 apps Aug 03 03:24:05 so my os will by nature run on really anything that android runs on Aug 03 03:24:18 ah Aug 03 03:24:25 what will you call it Aug 03 03:24:30 no idea yet =) Aug 03 03:24:30 How are you supposed to get video data from the camera as a stream rather than saving to a file? Aug 03 03:24:49 ron_frown and it will be android based and run on all phones that currently run android? Aug 03 03:25:02 ron_frown my phone is not supported by CM so this is very interesting to me Aug 03 03:25:14 only in the sense its got androids contribs to the kernel Aug 03 03:25:19 and will use same kernel drivers Aug 03 03:25:27 ril/wifi/etc Aug 03 03:25:31 ah Aug 03 03:25:41 so literally if there is a rom for x, there could be my rom for x Aug 03 03:25:44 i think there will be 3 looming challenges for android (1) we can't stay on java 6 forever (2) the more privacy becomes an issue, the more google looks unfavorable (like for example, health apps - major privacy concerns) (3) to the degree product stickiness requires desktop in addition to cloud, Android loses attractiveness Aug 03 03:26:02 g00s: I think the java version is going to matter a hell of a lot less when art is the default runtime Aug 03 03:26:10 once everything is art Aug 03 03:26:16 they can say dev in whtever you want Aug 03 03:26:17 java 8 Aug 03 03:26:28 how? there is noe java 8 classpath Aug 03 03:26:30 its just goint to get compiled to an intermediate format Aug 03 03:26:46 and art compiles to platform Aug 03 03:26:52 they aren't going to build up harmony to java 8 levels Aug 03 03:27:20 good point Aug 03 03:27:46 i have always thought, fuck - if google wants to use their own vm, ok - use art or whatever, but license the fucking classpath from oracle if possible Aug 03 03:29:07 fuck the classpath Aug 03 03:29:13 dumb idea in the first place Aug 03 03:29:46 you need the runtime libraries :| Aug 03 03:29:56 ugh I wish cyanogenmod had better compatibility Aug 03 03:30:01 I have an uncommon phone Aug 03 03:30:04 hard to hack Aug 03 03:30:08 OK, if you go with a completely new language, thats targets art, and has all its own libraries that is cool Aug 03 03:30:33 like if kotlin didn't have any dependencies on any java version classpath Aug 03 03:30:55 but while we're using java, many of us are using plain old java libraries Aug 03 03:30:55 I just think java has had ages to make waves and make vast improvements in performance and language features Aug 03 03:30:58 and they just havent done it Aug 03 03:31:07 oracle imo makes big ass bloated slow products Aug 03 03:31:13 so it gives me little hope for the future Aug 03 03:31:54 actually, gosling thought oracle was doing a good job with maintaining java Aug 03 03:31:58 is there any way to change something in strings.xml using java Aug 03 03:32:01 i think Sun was fucking it up Aug 03 03:32:22 dotDeb that stuff is compiled, and immutable Aug 03 03:32:26 I'm trying to make the name of the activity change Aug 03 03:32:28 g00s dang Aug 03 03:32:31 :/ Aug 03 03:32:51 sun was kind of a hack too Aug 03 03:32:54 but oracle Aug 03 03:33:01 oracle is all kinds of greed Aug 03 03:33:47 its a big corporation Aug 03 03:33:53 like many other big corporations Aug 03 03:33:59 its a pathogen Aug 03 03:34:15 I dont know Aug 03 03:34:59 Sun was pretty cool Aug 03 03:35:04 ron_frown OT, check this out http://thedailyshow.cc.com/videos/ehvwjx/inversion-of-the-money-snatchers Aug 03 03:35:15 at least from my point of view... Aug 03 03:35:25 I think sun did some stuff that was ahead of their time Aug 03 03:35:29 suns marketing prevented innovation in the java ecosystem Aug 03 03:36:01 they wanted too much backward compatibility Aug 03 03:36:10 just writing java is torture to me Aug 03 03:36:14 honestly I'd rather write c++ Aug 03 03:36:19 just look at how Sun did Generics Aug 03 03:36:36 that was so half assed ... but to meet a deadline or something Aug 03 03:36:49 but this goes all the way back to Java 1 Aug 03 03:36:59 Bill Joy, closures (even back then!) Aug 03 03:37:26 and then - philisophically - a language gets to a point where it reinforces itself Aug 03 03:37:30 in bood and bad ways Aug 03 03:37:34 *good Aug 03 03:37:43 after that, it is what it is Aug 03 03:38:23 like when Josh Bloch says, you don't want Gramma having a belly piercing Aug 03 03:39:27 what's the name for the user input with a scrolling list of options Aug 03 03:39:31 like a date selector Aug 03 03:39:34 but not dates Aug 03 03:39:48 nvm Aug 03 03:39:50 it's picker Aug 03 03:39:53 should have googled first Aug 03 03:39:57 Spinner ? Aug 03 03:40:52 I was on the Solaris side of Sun - we didn't deal with Java much... Aug 03 03:40:55 ahhh yes that's what it is Aug 03 03:40:56 thanks Aug 03 03:44:51 c++ is torture, but honestly I look at writing apps for ios and apps for android... and objective-c is less forgiving but its still hell of a lot better java Aug 03 03:44:56 and building shit in android in general Aug 03 03:45:03 lots and lots of jumping through hoops in java Aug 03 03:45:25 ]i hope swift gets message passing Aug 03 03:45:28 ron_frown what kinds of problems are you referring to? Aug 03 03:45:48 context bullshit, dialogs, fragment manager etc Aug 03 03:46:34 why the fuck cant it be a regular ass control toolkit like everyone else builds Aug 03 03:47:51 haha Aug 03 03:48:07 I like what you can do with fragments fragment manager Aug 03 03:48:18 but this is basically a composite user control in any other framework Aug 03 03:48:21 * dotDeb is using fragments as we speak Aug 03 03:48:33 cept android freaks with multi level fragments Aug 03 03:48:35 =) Aug 03 03:48:54 also g00s I don't think a spinner is exactly what I'm looking for Aug 03 03:49:02 g00s it's like a date or time picker but not for dates Aug 03 03:49:08 if you know what I mean Aug 03 03:50:41 i think there is only a number and dat epicker Aug 03 03:51:09 g00s dang ok ill use a spinner Aug 03 03:55:07 theres really just not a lot I like about java / the jvm Aug 03 03:55:15 its like oracle vs mssql Aug 03 03:55:26 oracle may be used everywhere and be an industry standard or whatever Aug 03 03:55:40 but in the end mssql just does a way better job Aug 03 03:55:51 it doesnt rape the shit out of your machine to deliver the same perofrmance Aug 03 03:56:15 art KINDA SORTA fixes that Aug 03 03:56:20 we'll see Aug 03 03:58:00 my feeling is that there's a general understanding that postgres is a better database than mysql, without the oracle overhead Aug 03 03:59:01 my opinion on postgres Aug 03 03:59:14 postgres is a better database than most... both opensource and commercial Aug 03 03:59:23 and the only reason it isnt massive massive adoption Aug 03 03:59:30 its tools blow wang Aug 03 03:59:47 and people dont see the immediate difference between something like it and mysql Aug 03 04:01:11 i guess people are using it for NoSQL now Aug 03 04:01:16 yep Aug 03 04:01:39 I mean really it has nonstandard functions that make things hard as far as portability goes Aug 03 04:01:44 but really bitchin features Aug 03 04:01:49 pretty nice db; its been a while since i used it; the difference between mysql and pgsgl seems to be getting smaller. but i still like pgsql Aug 03 04:01:52 oh I want this column to be string[] Aug 03 04:01:53 bam Aug 03 04:02:06 big issues back in the day was replication sucked Aug 03 04:02:09 I got tags on my blog post and can easily query it without a linking table or something Aug 03 04:02:15 g00s: true Aug 03 04:02:21 but thats the same of every rdbms I've seen Aug 03 04:02:33 its hard to scale a hard schema Aug 03 04:04:12 Anyone know good resources for learning SQLite to make an app similar to this: https://play.google.com/store/apps/details?id=com.Choonoid.Grades&hl=en I have tried looking but there's a lot of stuff out there and I want to learn it properly Aug 03 04:05:17 armangh thats a vague question Aug 03 04:06:19 gotta fix this dam DST bug Aug 03 04:52:38 can android studio download dependencies on its own? or should i have to manually download them? Aug 03 04:55:40 wow, this has a pulse oxymeter http://www.gizmag.com/freewavz-wireless-headphone/33177/ Aug 03 04:56:21 music, o2Sat, heart rate - wow Aug 03 04:57:25 too bad core body temp is impossible, thats an important one too Aug 03 04:58:02 well unless you want to swallow a small electronic pill ;) Aug 03 05:01:52 bhagi I am using it and I don't remember manually downloading dependencies so I think it's in the script Aug 03 05:02:23 yes, got that dotDeb, i was using the wrong artifactId, that was causing the issue... Aug 03 05:58:20 hmmm Aug 03 05:58:32 what do I do if my spinner choices are not pre-determined? Aug 03 05:59:07 er... you load them at runtime? Aug 03 05:59:44 leeds no they need to change based on user input Aug 03 05:59:55 right, and? Aug 03 06:00:12 oh you mean runtime of the activity Aug 03 06:00:23 right Aug 03 06:00:24 yea Aug 03 06:00:27 nvm Aug 03 07:28:34 Is overlaying say a menu by inflating standard android sdk widgets on a surfaceview bad practice? (this is for a game) should everything but custom drawn and rendered by the surface view? Aug 03 07:37:32 Hello, new dev to Android. Wondering if there is anybody around that can help me get OpenCV and Boost to compile to my project. Aug 03 07:37:40 I've been tring all day with no luck Aug 03 07:40:17 None of the instructions I've come across seem to work. I am on MacOS 10.9.2 Aug 03 07:41:21 I've tried using Boost-for-Android project to build boost but no luck. the build process ends with 29 errors when I build against NDK 8e and 161 errors when I target NDK 10 Aug 03 07:43:05 what is boost, android-valder? Aug 03 07:43:54 Boost is a STL replacement library for C++ Aug 03 07:44:22 I have some code written for a different platform but am now trying to get it to run on Android Aug 03 07:44:42 its also a development prototype for the next generations of the C++ standard. Aug 03 07:44:53 right.. Aug 03 07:45:00 so its kind of a moving target sometimes ;) Aug 03 07:45:24 yea.. i'm trying to get it to compile and add it's libs to my project so I can just run my program. Aug 03 07:45:47 I don't remember it being this difficult. (It's been about 4 years since I touched this stuff) Aug 03 07:46:04 you can just build the pieces you need as well. Aug 03 07:46:22 I found a project on GitHub Boost-for-Android that is supposed to compile Boost 1.53.0 for me Aug 03 07:46:36 if you google around for boost build params you can sometimes shorten the time it takes Aug 03 07:46:48 ah Aug 03 07:47:02 the time isn't an issue, the problem is the errors that are happening.. I can't figure out how to solve them Aug 03 07:47:22 I admit I have only used it in regular linux dev, not android. Aug 03 07:48:02 hm, looking at the back scroll it seems like a dependency issue. Aug 03 07:48:31 hm Aug 03 07:48:36 my spinner font is white Aug 03 07:48:42 for seemingly no reason Aug 03 07:49:08 cstddef: No such file or directory is the error I am getting when run vs ndk r10 Aug 03 07:49:09 boost my depend on conflicting versions of stuff and also there could an issue with existing versions of boost, if you are building on the mac it might be finding the wrong headers and stuff Aug 03 07:49:20 may* Aug 03 07:50:09 what may be my issue is not knwing how to specify where to find cstddef Aug 03 07:50:21 the build script is lookin gin the wrong place. Aug 03 07:50:43 is it a cmake thing or shell script? Aug 03 07:51:23 shell script that runs a bunch of stuff Aug 03 07:51:42 :/ Aug 03 07:51:50 would you mind taking a look? Boost-for-Android is the name of the github projec Aug 03 07:51:57 If it was me I guess I would make a copy and alter it Aug 03 07:53:23 that's the issue, I'm not sure how to edit it, looking through the script, I cna't find where it is pulling in the vars. Seems like it may be using cmake which i am not too familiar with Aug 03 07:53:45 did you see this... Aug 03 07:53:46 http://stackoverflow.com/questions/13287978/building-boost-for-android Aug 03 07:54:15 the answer at the bottom might lead in the right direction Aug 03 07:56:31 ya, cmake uses two files, CMakeLists.txt, which is normally the formal way to alter it and CMakeCache.txt which is generated from that to be build specific, which you can also alter if the process gets confused because sometimes it does because cmake in turn depends of locate scripts which differ depending on all kinds of linux version issues Aug 03 07:56:37 its really kind of a pita heh Aug 03 07:57:54 thanks.. Isaw that post and thought I did add the paths.. proabaly added them incorrectly Aug 03 07:59:22 I can only speak in general terms because I don't have any osx experience. Aug 03 07:59:58 my advice is to take it slow and try to decode the errors Aug 03 08:00:58 ha.. thanks. I've been taking it really slow. It took me all day to finally get on IRC Aug 03 08:01:08 heh Aug 03 08:01:52 I often miss things personally because I have a tendency to go to fast :) Aug 03 08:04:33 so it may be the same here.. :) Aug 03 08:04:51 if this works, I then have to move on to protobufs Aug 03 08:04:52 :( Aug 03 08:07:03 does your project require native code or are you doing a port? Aug 03 08:10:45 Hi guys, I want a address autocomplete for my offline app, is there any option? I just need it for a city Aug 03 08:11:56 i'm doing a prototype using code developed for our cloud api written in c++ Aug 03 08:12:39 I could have rewritten it in Java, but I need to release the prototype by Monday. so I don't have the time Aug 03 08:13:12 ya, who knows what bugs you might introduce Aug 03 08:13:19 I was hoping to get the cross-compiling to take a LOT less time since there are some libs we use in our cloud that are not available on Android Aug 03 08:14:34 is there a cleaner way of using left joines in queryBuilder.setTables? Aug 03 08:15:03 hmm for some reason toasts are not working on my emulator device O_o Aug 03 08:15:32 hi all. im building an SDK which uses the support v4 lib. Aug 03 08:15:47 i'd like to not include the lib with my JAR, but "pick up" the host v4 lib Aug 03 08:15:54 how dangerous is that? Aug 03 08:43:49 what's the keyboard shortcut for auto-implementing interface methods? Aug 03 08:43:53 in android studio Aug 03 08:44:19 pellis: you should use android studio/grade generate aar file Aug 03 08:44:34 lets you merge manifest, includes resources, etc Aug 03 08:44:56 lasserix: im building an SDK which other developers may include in their apps Aug 03 08:45:01 yeah Aug 03 08:45:12 instead of a jar, generate a aar Aug 03 08:45:20 why? Aug 03 08:45:36 aar = jar + android resources Aug 03 08:45:46 easier to merge things Aug 03 08:45:53 hmm. i see Aug 03 08:46:03 how would that resolve the dependency problem? Aug 03 08:46:04 http://tools.android.com/tech-docs/new-build-system/aar-format Aug 03 08:47:19 pellis, well for that problem usually the person using it just deletes one Aug 03 08:47:22 manually Aug 03 08:47:39 You should publish it to maven central, then you can define dependencies in the pom Aug 03 08:47:46 ^^ Aug 03 08:47:54 but.. if the host using my sdk uses v4.rev-4 and i'm using v4.rev-20 - isn't there a mismatch? Aug 03 08:48:13 Proper build systems will pick up the right version, everyone else will have to manually move jars around as always Aug 03 08:48:16 Hey guys. I am trying to connect to multiple Wifi networks one after the another programatically using the Android API. Does anyone know how to do that? Aug 03 08:49:17 Here's what I have tried: http://stackoverflow.com/questions/25075343/how-do-i-connect-to-multiple-wifi-networks-one-after-the-another-programatically Aug 03 08:52:47 hey, im kind of new to android and all. i see that there's a lot of different architectures for the native sdk. does that mean that if i want to ship something with native code, i need to generate binaries for every single archs? Aug 03 08:57:32 lasserix: Command/Control N Aug 03 08:57:40 hmm Aug 03 08:57:45 crtl i also seemed to work Aug 03 08:57:48 will try next time thanks Aug 03 08:57:54 np Aug 03 09:07:48 another app-related question Aug 03 09:07:59 im building an app that requires network and a few services Aug 03 09:08:11 the network can be down, the services can be down, configuration wrong, etc. Aug 03 09:08:23 to manage all this state changes - i'm considering implementing a statemachine Aug 03 09:08:33 (instead of littering code around activities) Aug 03 09:08:49 is that what people usually do to promote good quality code? Aug 03 09:09:21 littering code around activities is always bad? Aug 03 09:09:30 statemachine is probably good idea Aug 03 09:09:34 but you can use other techniques Aug 03 09:09:39 yea but i'm wondering what more experienced android devs do Aug 03 09:09:43 An event bus, for example Aug 03 09:09:54 http://smc.sourceforge.net/SmcManual.htm Aug 03 09:09:57 oh Aug 03 09:09:57 yup.. im thinking the statemachine will work with eventbus Aug 03 09:10:02 And get notified when the service starts, then again when it stops Aug 03 09:10:03 yeah those are easier to use with android Aug 03 09:10:30 autrilla: i guess an eventbus is most of the work under a statemachine? Aug 03 09:10:59 a state machine will define what events are 'legal' and what transitions are 'legal' Aug 03 09:11:10 and the bus will be the event bus inside the statemachine Aug 03 09:11:13 * autrilla has never heard of it Aug 03 09:11:18 But I'd do it with an event bus Aug 03 09:11:46 autrilla: well, for example - there's no point to go out to network when user turned down Wifi, right? Aug 03 09:12:01 (or any kind of data network) Aug 03 09:12:25 so even if app components get a "data:refresh" event on the event hub - they should ignore it Aug 03 09:12:40 the app is really in a state - in a "data offline" state. Aug 03 09:12:48 so all components should behave a bit different Aug 03 09:12:49 pellis event bus will let your statemachine propogate freely Aug 03 09:13:08 you still have to implement the state machine though, Aug 03 09:13:17 lasserix: yes, that's what i'm saying - it isn't a replacement - it is part of the impl. Aug 03 09:13:41 but again my question is - will that be an overengineering? is it what android devs actually do? Aug 03 09:13:42 someone wiser than i recomended http://smc.sourceforge.net/SmcManual.htm and http://www.complang.org/ragel/ Aug 03 09:13:51 depends on how complicated your sdk is Aug 03 09:14:07 really depends, i'd say, on your ability to implement one Aug 03 09:14:31 lasserix: well i guess its a good question. i'm used to building systems that work for years (my other experience as backend engineer). i guess with apps - one shouldn't invest to much effort because they have a short lifespan? Aug 03 09:15:02 perhaps, but if you make a decent enough one you can reuse it or publish it Aug 03 09:15:03 im wondering if android devs just "spit out" apps and move on to the next one Aug 03 09:15:11 i know this is very true in the game industry Aug 03 09:15:24 it probably depends on the dev/app Aug 03 09:15:30 what's this app if you can talk about it? Aug 03 09:16:12 im guessing the facebook android app devs dont move on to other apps very often :D Aug 03 09:16:17 lasserix: the SDK i can't talk about but the app - is just another weather app i'm building in order to make a good basis of an app to build other apps from. just like you said - 'reuse'. Aug 03 09:16:51 then yeah, why not? a little of hard work now will make your life far easier than having to deal with the same problems down the line Aug 03 09:17:21 and you can get mad noterity and code karma by releasing it like jack wharton or simon vt ;p Aug 03 09:17:33 yea. i'll try it out. worst case i'll hit a wall and then understand why i haven't seen any google result for 'android statemachine' :) Aug 03 09:17:50 actually... http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/com/android/internal/util/StateMachine.java Aug 03 09:18:05 yea iv'e seen that.. but its android internal Aug 03 09:18:26 i haven't seen any library that offers some kind of streamlined state machine for android here http://android-arsenal.com/free Aug 03 09:19:10 i guess Java has a ton of state machine implementations. but still strange how there's no blog post promoting it as a good Android app building block Aug 03 09:22:35 wow thanks Aug 03 09:22:39 never saw that before Aug 03 09:26:34 oh pellis : http://datasymphony.com.au/open-source/easyflow/ Aug 03 09:27:27 lasserix: thanks, i'll check it out Aug 03 09:28:31 and then there's http://www.javacodegeeks.com/2012/05/why-developers-never-use-state-machines.html Aug 03 09:28:32 ;p Aug 03 09:30:46 I use a state machine every time I do a regex match I guess. Aug 03 09:36:26 hi. what was the last nightly before the M9 branch ? Aug 03 09:36:59 maybe they could be used more often, though I do think that I only use them for parsing jobs. State is the context for parser that determines what the appropriate expressions I'm looking for. Aug 03 09:38:05 anyone knows of a reliable cmake toolchain for android ndk? Aug 03 09:38:29 (a bit cross chat but i figured i would have more chances here) Aug 03 09:40:13 I always thought someone clued up and smart enough to dabble with ndk would know how to locate such things ;) I'm always a little in awe of ndk mavens.... Aug 03 09:40:35 Chainfire_: you about? Aug 03 09:40:44 about what Aug 03 09:40:54 I'm personally disappointed that people are trying to replace the relatively simple and straightforward but entirely sufficient ndk-build stuff with something else Aug 03 09:41:40 well sometime you have a complex build system which might not be so easy to get going with ndk-build Aug 03 09:41:47 the nice thing about Android is that you shouldn't really need any flexibility in the build system. Aug 03 09:42:03 and android is not necessarily the only platform that it's aimed at Aug 03 09:42:06 if you have a complex build system, throw it away. If it generates a config.h, then steal the one it generates and then remove all of it Aug 03 09:42:33 i dont agree Aug 03 09:42:57 if you want a quality release process, it's somewhat necessary Aug 03 09:43:33 i dont see how using multiple build system for different platform can be a good thing Aug 03 09:44:00 I missed a part of the convo, but I certainly hope your not advocating using the standard make system with Android NDK ? Aug 03 09:44:17 im trying to get away from it... Aug 03 09:44:27 or should i say... i already have a build system, and i would like to use it instead Aug 03 09:44:35 im getting close... Aug 03 09:44:49 I'm advocating for the least possible number of layers typically. Aug 03 09:45:07 And I dislike code generators, and I count Makefile generators as code generators. Aug 03 09:45:38 a single config header is not the end of the world... Aug 03 09:45:57 there's a lot worst Aug 03 09:46:06 but something else is i have a lot of data to build Aug 03 09:46:14 so i will pipeline that stuff in Aug 03 09:46:16 Is it possible to connect to multiple Wifi hotspots one after the other programatically in android? Aug 03 09:47:10 sure Aug 03 09:47:22 i don't see why not Aug 03 09:53:33 Weird, I'm calling bus.post(new DragEvent()); and @Subscribe public void onHandleLongClickListener(DragEvent event) doesn't get called Aug 03 09:54:06 With the class registered on the bus Aug 03 09:56:03 a duh moment. whats the xml resource name equivalent for setImageResource!? Aug 03 09:56:31 src? Aug 03 09:56:42 I'm using Otto, by the way. Aug 03 09:57:08 bingo. Why didnt I guess that? ;) Thanks Aug 03 09:58:49 JakeWharton, what are the possible reasons for Otto not to dispatch event calls? Aug 03 10:16:27 Is there a faster way to set layoutparams (if i am just going for widht/height) when creating views in code than creating new layout params? Aug 03 10:18:11 <_abc_> Any good answers wrt why qemu has bluetooth support since 2008 but the qemu used by android sdk does not support it in 2014? Oracle/Sun J2ME emulator supports Bluetooth and has done so for years. Aug 03 10:18:17 <_abc_> Is it political? Aug 03 10:19:32 It doesnt seem possible to set an animation-list as the drawable for src or background on an ImageView in xml. Or AS is not autocompleting the drawable resource. Nope, wont compile either. Would there be a practical reason behind that? Aug 03 10:26:16 I'm thinking about releasing my project as open source. I need a place to publish it. Been looking at github and sourceforge. Got any recommendations? If so, why? Aug 03 10:26:37 Sourceforge seem to offer a forum which github doesn't.... Aug 03 10:26:48 ack. scratch that. Aug 03 10:27:01 github is certainly the trendy place... sourceforge has been pretty much eclipsed... google code *was* the place, at one point, but it's pretty clear that Google want to EOL it Aug 03 10:27:02 * jesperj scratches rgr Aug 03 10:28:20 thanks... Aug 03 10:28:32 Leeds: besides being trendy, why would you choose github over sourceforge? Having for example the project forum at the same place as the code seems convenient Aug 03 10:28:39 rgr: You're welcome :) Aug 03 10:28:52 do you actually have a need for a forum? Aug 03 10:29:18 github just seems to do things right. the repo equiv of Intellij... easy to use, clean, functional. And, err , free... Aug 03 10:29:24 Leeds: Unless I direct users to ask questions via a mailing list I guess so. Or do you suggest something else for users to ask questions? Aug 03 10:29:34 do you hvae users? Aug 03 10:29:56 rgr, "free". As long as it's open source.. Aug 03 10:29:57 more to the point, do you have users who are likely to need/want to talk to each other? Aug 03 10:29:58 Leeds: The point with any app is to have users using the app, so I hope so eventually. Aug 03 10:29:59 user interaction should be no where near the code..... Aug 03 10:30:17 autrilla: I dont care enough about open source. I use it, i contribute to it but it isnt a religion. Aug 03 10:30:35 rgr, I mean github is free for open source projects Aug 03 10:31:13 jesperj: you're talking about users of an app, or is this a library which would be used by other developers? Aug 03 10:31:35 Guys you're forgetting about Bitbucket. Aug 03 10:31:39 :) Aug 03 10:31:48 I will need a way for users to ask questions like "how do I do this or this" or "I would like feature X". It's my first app and I know I must have bugs / missed things, so I expect a lot of feedback from eventual users, and i welcome it. Aug 03 10:31:56 Mavrik: ITYM launchpad Aug 03 10:32:01 @lasserix and @Chainfire - I tried to do the same but I don't know why its not working Aug 03 10:32:03 Just not by email if I can avoid it. a forum or something like stackoverflow would be better. Aug 03 10:32:17 jesperj: just let them email you... put a feedback form in the app if necessary Aug 03 10:32:18 Leeds, well, we don't want to torture people now :) Aug 03 10:32:29 BitBucket is actually pretty neat, last UI revamp actually made it useful Aug 03 10:32:41 and the fact that you don't have to pay 50$/month to have a team private repo is also nice Aug 03 10:32:50 jesperj: unless you already have thousands of users and an active community of some sort, you're way overthinking this Aug 03 10:32:52 I cant have my email inbox overflowed with questions though or I'll go nuts. I need something I can go to when I feel "up to it" and answer what I can Aug 03 10:33:14 Leeds: I'm talking about users of an app, it is not a library that other devs will use Aug 03 10:33:16 learn to filter your email Aug 03 10:33:21 I initially add the networks to my Wifi list using "WifiManager.addNetwork()" and "WifiManager.enableNetwork()" Aug 03 10:33:31 Mavrik: worse part of bitbucket is while browsing source, you switch repo and it goes to the dead link page where this is now way to easily go anywhere, it's a deadend! wtf is this design principle at work? Aug 03 10:33:34 rgr: got any suggestions for places for "user interaction"? Aug 03 10:33:35 jesperj: then as rgr said, keep the users and the code apart Aug 03 10:33:38 *switch branch Aug 03 10:33:51 lasserix, yeah, those bugs are annoying Aug 03 10:34:00 jesperj: again, seriously, unless you have thousands of users, you really don't need any more than an email address or a feedback form Aug 03 10:34:01 also, why no search? Aug 03 10:34:02 lasserix, or that until like 3 weeks ago you couldn't switch to a tag :D Aug 03 10:34:17 ohh yeah Aug 03 10:34:27 You can also use GitLab Aug 03 10:34:30 * autrilla whistles Aug 03 10:34:44 autrilla, right. Aug 03 10:34:48 Until you have to set that up Aug 03 10:34:58 and see it has more dependencies than piece of java enterprise software :P Aug 03 10:35:11 I switched to Gogs for my personal use because GitLab was just too much of a hassle to setup on my NAS Aug 03 10:35:15 jesperj: the ideal solution for your conditions, is, include a PO box users can write a letter too! Aug 03 10:35:24 I had to do it, and it wasn't great Aug 03 10:35:43 lasserix: That doesn't sound like a very serious suggestion. Aug 03 10:35:45 for personal hosting Gogs is pretty ok Aug 03 10:36:01 I'm pretty much the only one who commits at work, so.. Aug 03 10:36:03 I then scan fow Wifis and listen using broadcast receiver Aug 03 10:36:48 jesperj: i am dead serious. if you are: "I cant have my email inbox overflowed with questions though or I'll go nuts. I need something I can go to when I feel "up to it" and answer what I can" this is percisely the point of a mail box these days (besides shipping physical junk) Aug 03 10:37:06 you may get one or two every couple of months ;p Aug 03 10:37:15 Later I (try to) connect to them but i am not able to Aug 03 10:38:25 Any ideas what to do? Aug 03 10:39:13 Interesting stuff. The event gets dispatched if the subscribed method is on the same class. Aug 03 10:41:28 i guess so. it should be dispatched, right? Aug 03 10:42:10 Yes. It doesn't get dispatched to my ListView Aug 03 10:42:24 Sorry my connection got messed up. Aug 03 10:42:48 So it seems so far most people recommend github. Aug 03 10:44:01 @autrilla - So you mean to say I shouldn't be using 2 receivers in the same class? Aug 03 10:44:32 PerveeSage, I don't think you're talking about what I'm talking about Aug 03 10:45:23 ha ha. Sorry for the confusion. My bad. Aug 03 10:46:09 <_abc_> lasserix: Google want to eol google code? Aug 03 10:46:12 <_abc_> Leeds: ^ Aug 03 10:46:23 <_abc_> Is this a known fact or a rumor? Aug 03 10:47:16 <_abc_> PerveeSage: You implemented the method twice? 2 @Overrides? Aug 03 10:47:40 <_abc_> Also, what's the closest analogy in Java/ant to C/CPP #ifdef controlled code section selection at compile time? Aug 03 10:48:24 in a single fragment can i have non-listview and a listview? for example i want the top third of the screen to be a header that has information and the bottom two-thirds a list Aug 03 10:48:42 _abc_: they've been steadily removing features over the past couple of years Aug 03 10:49:16 _abc_ : Ya, because I wanted to listen to two different receivers Aug 03 10:51:17 Is something wrong with that? Aug 03 10:53:41 <_abc_> 2 different receivers which send events of different type? I hope? Such that each method is uniquely identified by an arity-typeset pair? Aug 03 10:53:53 Now I wonder how the DevBytes ListView dragging works with this code: Aug 03 10:53:53 https://gist.github.com/autrilla/5f56d099c0965c13998e . They don't mDownY or mDownX! Aug 03 10:54:08 Or they do Aug 03 10:54:43 Oh, they do. IDEA doesn't show usages for the variable though :/ Aug 03 10:55:39 aaearon: sure Aug 03 10:56:38 2 different receivers which _listen_ to event of different type Aug 03 10:57:34 I don't want to send any event. I just want to listen on network/wifi connectivity Aug 03 10:57:46 just differentiate which type it is in the single reciever Aug 03 10:58:13 how do I do that? Aug 03 10:58:58 http://stackoverflow.com/questions/10733121/broadcastreceiver-when-wifi-or-3g-network-state-changed Aug 03 10:59:12 Ah, i see why it doesn't work. The ListView does not call onTouchEvent when I press the drag handle of the children Aug 03 10:59:12 trigger a task to be performed on each change, keep a list? Aug 03 10:59:50 hi, so, have q for that - webview.loadUrl() and here I have javascvript which I want to use some vars from android app menu, how to send var values from app menu in javascript in webview? Aug 03 11:00:17 Shouldn't it be called anyway? The drag handle is inside the ListView children, which are inside the ListView... Aug 03 11:00:53 PerveeSage: did you try using google at all? http://stackoverflow.com/questions/5936191/get-list-of-available-wifi-spots Aug 03 11:01:10 WifiManager --> getScanResults Aug 03 11:01:24 which you can know to do when connectivity changes from the previous link i sent Aug 03 11:02:39 here's some more: http://www.grokkingandroid.com/android-getting-notified-of-connectivity-changes/ Aug 03 11:04:15 Ok. Thanks! :) I'll try to listen to different actions using the same onReceive() method Aug 03 11:04:35 t Aug 03 11:06:42 lasserix. so right now i have the listview going and working on the header. i have my layout ready for my header. i guess im just confused on how to show the header. do i inflate the layout in onCreate before i set my list adapter? Aug 03 11:07:01 onTouchEvent gets called if I touch the TextView inside the children, but doesn't if I touch the ImageView... Weird. Aug 03 11:08:56 is there anybody around familiar with compiling the NDK for android? I'm having trouble compiling Boost at the moment Aug 03 11:13:29 anyone here familiar with sensors and remapping their values to world coordinates? for the life of me I can't seem to remap the accelerometer values into world coordinates. Googled a lot, none of the answers I find seem to work Aug 03 11:14:58 Chainfire, world coordinates? Aug 03 11:15:24 aaearon: in your fragment's xml file, put the header at the top and the listview below it, like in a linear layout or something. Aug 03 11:16:07 SensorEvent.values[] 0, 1 and 2 give you x, y and z Aug 03 11:16:53 autrilla those values need to be transformed so one of the vectors is always (for example) up, regardless of device orientation Aug 03 11:17:37 http://stackoverflow.com/questions/5464847/transforming-accelerometers-data-from-devices-coordinates-to-real-world-coordi Aug 03 11:17:40 ^^chainfire Aug 03 11:17:42 Chainfire, I don't think there's a way to do it. Something comes to mind though Aug 03 11:17:56 Calibrate the position of the device when the app starts, assume it's facing up Aug 03 11:18:06 tho what follows "just do the following" is something else Aug 03 11:18:15 lasserix I've read and tried this post, still something is going wrong Aug 03 11:18:32 yeah no surprise that's one hell of a matrix mutliplication Aug 03 11:18:50 you'd think this would be something people do regularly, heh Aug 03 11:18:59 "I've tested your snippet and all I get is a quite noisy random signal in return. –" Aug 03 11:19:34 If you can get the orientation of the phone relative to the world, getting the accelerometer's vectors relative to the world is trivial Aug 03 11:20:20 can you figure out the transformation of the world to sensor data? Aug 03 11:21:20 I've been playing with getRotationMatrix, remapCoordinateSystem and getOrientation, that seems to somewhat work Aug 03 11:21:39 I think I need to further figure out what exactly is going wrong, I'm doing a bunch of steps that I really don't understand all too well Aug 03 11:22:22 make sure your order of operations of the matrix multiplication is correct Aug 03 11:22:26 AB != BA Aug 03 11:26:21 hi, i have a listview which i add more data to in chunks. Aug 03 11:26:41 how do I update the listview? Aug 03 11:26:48 Calling parent.onTouchEvent(event); from an onTouchListener sort of fixes it, but of course it just sends touching events, it doesn't send an event for when you stop touching Aug 03 11:27:06 Listview drag reordering is really a difficult topic. I wonder why not so many people do it. Aug 03 11:27:08 right now im just creating the adapter for the entire list again and then doing setAdapter Aug 03 11:27:42 is that correct? Aug 03 11:28:04 i dont need to reorder, just loading in my new data and putting in on the end of the listview Aug 03 11:28:49 Why do people assume I'm talking to them? This is my personal monologue! (feel free to join and help) Aug 03 11:29:16 oh im sorry Aug 03 11:29:46 akk9: you just notifiyDataSetChanged() on your adapter when you update your data Aug 03 11:29:48 AKK9, notifyDataSetChanged Aug 03 11:29:48 (i wish i could help) Aug 03 11:29:54 canvs2321 was faster Aug 03 11:30:18 Even after using a single receiver, my register for handling SUPPLICANT_STATE_CHANGED_ACTION doesn't get called. I also tried changing it to NETWORK_STATE_CHANGED_ACTION but it didn't help Aug 03 11:30:25 any idea? Aug 03 11:31:28 canvs2321, autrilla. thank you Aug 03 11:32:12 weird question Aug 03 11:32:35 I see in MAT that many of the char[] objects in memory are strings used in queries to my DB Aug 03 11:32:52 is it possible that those stay in memory for some reason I'm not aware of? Aug 03 11:33:19 thepoosh, maybe there is no need for GC Aug 03 11:33:34 I forced GC before the dump Aug 03 11:33:38 that's why it's weird Aug 03 11:34:02 I found that those strings almost caused an OOM exception on the low end devices here Aug 03 11:34:30 thepoosh, you can force GC and the collector will do what it wants Aug 03 11:34:38 hmmmm Aug 03 11:34:39 yes Aug 03 11:34:48 You just force another GC pass Aug 03 11:34:51 but still, we have a crappy ZTE that crashed on OOM Aug 03 11:34:53 after this Aug 03 11:35:13 it has around 15KB of heap Aug 03 11:35:17 thepoosh, how are you declaring those strings? Aug 03 11:35:21 hmmmm Aug 03 11:35:28 using GreenDao Aug 03 11:35:37 and/or Volley image loading Aug 03 11:35:39 Uh-oh Aug 03 11:35:45 oh crap Aug 03 11:35:47 O.o Aug 03 11:35:49 why uh oh? Aug 03 11:35:57 guys Aug 03 11:35:57 thepoosh, strings will practically never go make you OOM Aug 03 11:36:04 hmmm Aug 03 11:36:09 thepoosh, especially when you're loading 1000x larger images beside them :P Aug 03 11:36:13 Because GreenDAO might be doing something wrong Aug 03 11:36:13 they didn't push us over the limit Aug 03 11:36:17 thepoosh, are you sure you're not getting OOM due to heap fragmentation? Aug 03 11:36:21 but they did the difference Aug 03 11:36:31 Mavrik: please explain Aug 03 11:36:35 look, you'd have to load a book-worth of strings Aug 03 11:36:41 or. several book worth of strings Aug 03 11:36:46 to even scratch couple of MB. Aug 03 11:36:56 well, yeah Aug 03 11:36:59 we are heavy Aug 03 11:37:03 very heavy Aug 03 11:37:08 streaming video and audio Aug 03 11:37:11 thepoosh, your heap gets fragmented. You try to load an image. You don't have a single continius memory slot free in the size of the image. You get OOM. Aug 03 11:37:12 showing thumbnails Aug 03 11:37:14 and crap Aug 03 11:37:26 then don't look at strings for memory pressure conditions :D Aug 03 11:37:44 well, since someone has the resources file in memory Aug 03 11:37:49 I am already angry Aug 03 11:37:54 They don't get GC'd because there is no need for them to get GC'd Aug 03 11:39:05 http://pbrd.co/WUfM2E Aug 03 11:39:11 onTouchEvents should be pushed upwards, right? Aug 03 11:39:12 issue number 1 is Resources Aug 03 11:39:12 thepoosh, also note, that heap dump won't show memory allocated by native malloc Aug 03 11:39:18 true Aug 03 11:39:24 thepoosh, and especially on Android 2.3 Aug 03 11:39:32 you won't even SEE all image allocations in heap dumps Aug 03 11:39:37 second suspect is the ImageCacheManager Aug 03 11:40:13 issue 4 is Bitmaps Aug 03 11:40:18 I am not happy Aug 03 11:49:20 package com.iosharp.android.app; Aug 03 11:49:21 import java.util.ArrayList; Aug 03 11:49:21 import android.os.Bundle; Aug 03 11:49:21 import android.support.v4.app.ListFragment; Aug 03 11:49:21 import android.view.LayoutInflater; Aug 03 11:49:22 import android.view.View; Aug 03 11:49:23 import android.view.ViewGroup; Aug 03 11:49:24 import android.widget.ArrayAdapter; Aug 03 11:49:26 import android.widget.ListView; Aug 03 11:49:27 import android.widget.TextView; Aug 03 11:49:28 public class ChannelDetailFragment extends ListFragment { Aug 03 11:49:29 public static final String EXTRA_CHANNEL_ID = "com.iosharp.android.app.tv.channel_id"; Aug 03 11:49:30 Aug 03 11:49:31 oh oh Aug 03 11:49:31 private ArrayList mProgrammes; Aug 03 11:49:32 Aug 03 11:49:34 private Channel mChannel; Aug 03 11:49:35 private TextView mProgrammeTitle; Aug 03 11:49:37 private TextView mProgrammeDate; Aug 03 11:49:38 private TextView mProgrammeCategory; Aug 03 11:49:39 Aug 03 11:49:40 public void onCreate(Bundle savedInstanceState) { Aug 03 11:49:41 super.onCreate(savedInstanceState); Aug 03 11:49:42 setHasOptionsMenu(true); Aug 03 11:49:43 int channelId = getActivity().getIntent().getIntExtra(EXTRA_CHANNEL_ID, Aug 03 11:49:44 1); Aug 03 11:49:45 mChannel = ChannelStore.get(getActivity()).getChannel(channelId); Aug 03 11:49:47 mProgrammes = mChannel.getProgrammes(); Aug 03 11:49:48 Aug 03 11:49:49 ChannelDetailAdapter adapter = new ChannelDetailAdapter(mProgrammes); Aug 03 11:49:50 setListAdapter(adapter); Aug 03 11:49:51 } Aug 03 11:49:52 Aug 03 11:49:53 aaearon: you know not to paste code here : use pastebin. Aug 03 11:49:53 public class ChannelDetailAdapter extends ArrayAdapter { Aug 03 11:49:54 public ChannelDetailAdapter(ArrayList programmes) { Aug 03 11:49:54 oh my god Aug 03 11:49:55 super(getActivity(), 0, programmes); Aug 03 11:49:57 } Aug 03 11:49:58 Aug 03 11:49:59 @Override Aug 03 11:50:00 public View getView(int position, View convertView, ViewGroup parent) { Aug 03 11:50:01 if (convertView == null) { Aug 03 11:50:02 convertView = getActivity().getLayoutInflater().inflate( Aug 03 11:50:03 R.layout.list_item_programme, null); Aug 03 11:50:04 } Aug 03 11:50:06 Programme p = getItem(position); Aug 03 11:50:06 Aug 03 11:50:08 mProgrammeTitle = (TextView) convertView.findViewById(R.id.programme_title); Aug 03 11:50:10 mProgrammeTitle.setText(p.getTitle()); Aug 03 11:50:11 Aug 03 11:50:12 mProgrammeDate = (TextView) convertView.findViewById(R.id.programme_start_stop_time); Aug 03 11:50:13 mProgrammeDate.setText(p.getStartDate().toString() + " - " + p.getEndDate().toString()); Aug 03 11:50:14 Aug 03 11:50:15 mProgrammeCategory = (TextView) convertView.findViewById(R.id.programme_category); Aug 03 11:50:16 mProgrammeCategory.setText(p.getCategory()); Aug 03 11:50:18 shut Aug 03 11:50:39 apologies Aug 03 11:50:50 so sorry!! Aug 03 11:51:05 i had the code, not the pastebin url on my clipboard :( Aug 03 11:51:14 heh Guessed so ;) Aug 03 11:51:19 we've all done it ... Aug 03 11:51:52 then its the mad scramble to close the window/stop the paste :( Aug 03 11:52:04 wow... Aug 03 11:52:32 wow - that sucks Aug 03 11:53:03 channel needs a kick-bot :) Aug 03 11:53:27 is it still going? i can disconnect from freenode Aug 03 11:54:48 it's done :) Aug 03 11:56:12 The channel still needs a bot :P Aug 03 11:56:31 aaearon: Get a proper client (weechat), that asks you before pasting more than one line to a channel. Aug 03 12:01:11 how can i set HTTP Authentication header in RoboSpice ? Aug 03 12:02:06 why use robospice? Aug 03 12:03:57 actually i was testing different networking libraries Aug 03 12:04:26 use okhttp Aug 03 12:04:34 just wanted to check how they feel, so that i can pick one Aug 03 12:05:17 lasserix now that I've figurd out how to do it, I've also figured out this isn't what I wanted. lol Aug 03 12:05:22 does okhttp provides any default way that I can get notified of download progress? even if i more to completely different activity? Aug 03 12:05:40 here is my fragment with a listview http://pastebin.com/36vfDC7P. im looking to add a fixed header at the top that will have textviews populated by the object mChannel. i have my header layout but am not grasping where i need to addheaderview in my code Aug 03 12:07:43 gdrc, robospice provides service based downloading, so you can easily bind from different activities and get the download status. Does OkHttp provides that by default? Aug 03 12:08:15 aaearon, addheaderview has to be before you set the adapter Aug 03 12:08:24 it also has to be inflated :) Aug 03 12:09:14 bhagi: I do not know Aug 03 12:09:32 no it doesn't Aug 03 12:10:08 mavrik do i need to override another method in my custom adapter then? Aug 03 12:10:30 gdrc, also i could use okhttp with robospice as a transport layer (hope layer name is correct) Aug 03 12:13:53 ListView reordering is too difficult for me. Aug 03 12:13:55 * autrilla rage quits Aug 03 12:18:20 I don't even remember why I was making a shopping list app. Out of Milk is deve Aug 03 12:18:24 decent enough* Aug 03 12:29:04 http://i.imgur.com/2JjdLw3.jpg anyone, my friend have troubles, he did this nand backup etc, and root thing, htne he lost all cintact information on his android, is it possible to recover the contact info: now he has this picture on his phone: http://i.imgur.com/2JjdLw3.jpg what does it mean? Aug 03 12:45:16 I'm havinga real hard time cmpiling boost for androind. anybody out here that can provide some assistance? Aug 03 12:48:27 after rooting and changing the account.db file the contacts gone tell me how i can restore the stuff back? Aug 03 12:49:58 does the account.db file containing the contacts informations? Aug 03 12:53:35 Alina-malina: you probably wont get help after screwing up your phone with root here. Try the forums for your phone. Aug 03 12:54:48 oh Aug 03 12:54:56 rgr, it is not me it is friend of mine actually:) Aug 03 12:55:11 rgr, that accout.db file? is that possible to access coantact information on that file? Aug 03 12:58:52 Alina-malina: you probably wont get help after screwing up your phone with root here. Try the forums for your phone. Aug 03 13:00:04 rgr, are you bot? Aug 03 13:00:44 * flan3002 facepalms. Aug 03 13:00:58 *beep* Aug 03 13:01:51 He said that because he felt you didn't read what he wrote or chose not to do what he said. Therefore he repeated it, for greater emphasis. Aug 03 13:02:12 (At least that's why I repeat what I already wrote) Aug 03 13:02:34 *beep* *beep* Aug 03 13:03:13 * flan3002 slided the remote-control back in his pocket. Aug 03 13:03:17 *slides Aug 03 13:06:30 * Raziel slides Aug 03 13:06:33 just slidin. Aug 03 13:16:31 Is there a limit, or a safe maximum number of threads you should run in your app? Aug 03 13:16:50 No Aug 03 13:17:03 for example i create a list view and then a method creates loads of threads to get image for each item in the list view Aug 03 13:17:14 Is that okay then? Aug 03 13:17:23 am I doing that right? or should I get the images one by one? Aug 03 13:17:55 lazy loading Aug 03 13:18:13 my first approach was that. but i dont like how it looks :( Aug 03 13:19:20 and it uses more battery Aug 03 13:20:01 cause i found that i would scroll down, read some things, and then my H+ woudl go back to 3G. but then i would scroll down a bti more and it woudl jump back to H. Aug 03 13:20:22 and it keeps doing that. Aug 03 13:20:26 so i dunno Aug 03 13:20:37 AKK9: It's not going to be any faster, downloading images is not CPU-bound, but IO-bound. Aug 03 13:21:15 but if I load the images at once, when the user scrolls down they appear instantly. Aug 03 13:21:25 because by the time that do that the images are already downloaded Aug 03 13:21:58 AKK9: Well... You might have a point there. From where are you downloading them? Aug 03 13:22:01 and it means the phone doesn't have to go to high speed connection again to download more images Aug 03 13:22:13 very small images lik 100 x 100 pixels Aug 03 13:24:07 I would do is using one (up to four, depending on if the servers can deliver data faster than I can download) background thread that queries the list on which images are most needed, then downloads these. It doesn't have to stop, of course, when all visible images are loaded... Pretty much the same effect as yours, but cheaper, no? Aug 03 13:24:54 Ah yes thats a good one Aug 03 13:24:56 how many images are you grabbing? Aug 03 13:25:04 20 Aug 03 13:25:29 20 threads won't be a problem, 2000 might be... Aug 03 13:25:37 200000 will be. Aug 03 13:25:45 20 thumbnails? grab them all in one go Aug 03 13:26:52 Yup, that's going to be faster and cheaper, if it's really only 20 100x100. ^^ Aug 03 13:27:26 yeah. okay then. so threads aren't a big deal? i just assumed threads are resource expensive things Aug 03 13:27:43 is it realistic for an app to have 2000 threads? Aug 03 13:28:16 AKK9: No, you should avoid it. Aug 03 13:28:25 flan3002: thats not quite true. Since each image depends on the server its coming from : so you might well gain significant speed and efficiently improvements doing them in parallel. Aug 03 13:29:01 the images are coming from a major news site Aug 03 13:29:06 rgr: Exactly, which is why I restricted it to the case where "the servers can deliver data faster than I can download". Aug 03 13:29:30 so far they are able to delivery 100 x 100 pixel images very quickly Aug 03 13:31:00 When the images download how should I update my list view so that any items that are currently visible are updated? Aug 03 13:31:01 which you dont know at design time. So do them in parallel. Aug 03 13:31:21 But probably not one per image... Aug 03 13:31:26 Right now i call notifyDataSetChanged() every time an image is downloaded so it appears in the list view. Aug 03 13:31:29 But it lags a lot. Aug 03 13:32:04 AKK9: Right, that's not needed. Retain handles (refs) to the views and exchange them directly... Aug 03 13:32:51 The views dont exist at the time I call getImages (which gets all the images) Aug 03 13:33:22 Well, then maybe restructure it? Aug 03 13:33:48 Don't ask me how though, I'd have to attempt it in order to see if it works out flawlessly... Aug 03 13:33:53 But if I want to get the View from the adapter don't I have to wait for the user to scroll to it? Aug 03 13:33:58 So it makes the view? Aug 03 13:34:00 in the adapteR? Aug 03 13:34:19 And then that just makes it lazy load again. Aug 03 13:36:24 The ASyncTask knows the newsItem position in the array of newsItems. So is there a way I can check to see if my newsItem is currently visible in the ListView? Aug 03 13:36:31 Then I can just update the ones that are? Aug 03 13:36:35 Maybe? Aug 03 13:39:05 AKK9: Do the images have some sort of ID? (Of course they do) Aug 03 13:39:47 An ID in what sense? Aug 03 13:40:31 The ImageDownload ASyncTask knows which item the image refers to. If thats what you mean. Cause it knows the newsItem id. Aug 03 13:41:19 So when an image is downloaded the ASyncTask will do newsItemArray[position].setImage(downloadedBitmap); Aug 03 13:41:37 and I guess 'position' is the ID. Aug 03 13:41:46 In getView, any View calculates/knows what image it needs. It then asks something in your app to give it that image. If it is cached, it gives it immediately, if not, it gets called back once it's available and displays the image if it's still needed. Aug 03 13:41:47 cause it matches it against the newsItem Aug 03 13:42:35 And in case you don't know how to cache the images: http://developer.android.com/training/displaying-bitmaps/cache-bitmap.html Aug 03 13:44:34 Yeah so my newsItem objects have a Bitmap thumbnail. So getView does imageView.setImageBitmap(newsItem[position].getImage); Aug 03 13:44:50 So i think position is the id you mean? Aug 03 13:45:22 I use the array position as an id Aug 03 13:45:49 because my data is an array of newsItems. Aug 03 13:46:35 Uhm... Probably the images have some sort of ID in the URL... Give us a link to one of those images? Aug 03 13:46:45 Oh yeah it does Aug 03 13:46:58 I'd use that one. :) Aug 03 13:46:59 But i don't those ids anywhere else in my app Aug 03 13:48:03 Still not sure how to update the views though Aug 03 13:48:36 I'll figure it out, thansk for the link Aug 03 13:48:43 Does android cache images automkatically? Aug 03 13:48:47 I'm sure you will. :) Aug 03 13:48:56 When i rotate my screen it keeps the images int eh right places. Aug 03 13:48:57 * flan3002 blinks. Aug 03 13:49:06 That's something different... Aug 03 13:49:48 btw that question is unrelated to my issues above Aug 03 13:50:15 I was curious. Cause I implmented parcelable to my object, so I could save state for screen roations. Aug 03 13:50:30 I only saved the Strings and ints in the parcel. Aug 03 13:50:39 But somehow I remmebers my images. Aug 03 13:51:11 Think. What happens when you rotate the screen? Does it reload the ListView? Aug 03 13:51:32 Yeah Aug 03 13:51:59 Destorys the fragment, creates it and then recreates it from the saved bundle? Aug 03 13:52:18 But the budnle doesn't contain any bitmaps. Aug 03 13:52:30 But where does it get the bitmaps? Aug 03 13:53:16 bitmaps are downloaded, saved in my newsItem object, listview loads them from the newsItem object Aug 03 13:53:42 Bundle contains the newsItem object. But I was confused by bitmaps so I only parcelled the Strings and ints. Aug 03 13:53:54 But somehow the listview loads back with images. Aug 03 13:54:03 Yeah, so why should the newsItem array be cleared? Aug 03 13:54:22 As long as you don't do that yourself, of course... Aug 03 13:54:39 because doesn't it destory the fragment and everything inside? Aug 03 13:54:55 Where do you 'store' the newsItem array? Aug 03 13:55:05 in the adapter Aug 03 13:55:21 and the adapter is stored in the fragment Aug 03 13:56:34 I don't know how your code is laid out. You should debug and set a breakpoint to see if it reloads the images and the values in your newsItem object. Aug 03 13:57:39 I used Log.d to see if the adapter object in the feed = null after screen rotation and its true Aug 03 13:57:48 ill check the newsItem objects and see if the images are in there. Aug 03 13:59:55 the images are still in the objects wtf Aug 03 14:00:06 it works great haha but I dont know why Aug 03 14:00:48 The more code you give, the higher the probability that someone can explain why. Currently: low. Aug 03 14:01:25 woudl you mind having a look if i put the code somewhere? Aug 03 14:02:02 Yah, might take some time though, my connection is slow... Aug 03 14:07:54 too slow for a few bytes of html in a pastebin.... I doubt that.... Aug 03 14:08:06 >:( Aug 03 14:08:11 rgr: Loading google results takes half a minute... Aug 03 14:08:25 ):< Aug 03 14:09:08 rgr: Throttled mobile data connection => 40 kbit/s. Aug 03 14:09:14 RGB Aug 03 14:09:34 (#,#,#); Aug 03 14:10:00 rgr: So, no. ix.io will load fast, p/hastebin/gist takes longer, especially if he'd use one gist per file. Aug 03 14:10:44 a bit late to be asking this but ... when I minimise my app, does Android automatically kill or interrupt any secondary threads I might have created? It hadnt been doing earlier but seems to be doing now ... of course it could be a momumental blunder on my part after trimming down all my onXXX handlers. Aug 03 14:14:13 byte0x00: Are you... trying to talk to use? o.O Aug 03 14:14:33 *us Aug 03 14:14:38 what, color? Aug 03 14:15:02 Kind of random of me. Aug 03 14:15:13 Yeah... Aug 03 14:15:59 My mind all over bro. Aug 03 14:18:04 Connects android phone via wire; Aug 03 14:18:57 flan3002, ive put the code on pastebin Aug 03 14:19:07 http://pastebin.com/uFE1KCCd - NewsItemCustomAdapter.java Aug 03 14:19:12 http://pastebin.com/dJqMsjMA - FeedFragment.java Aug 03 14:19:16 http://pastebin.com/0EAXTN1B - NewsItem.java Aug 03 14:20:12 The fragment creates the newsItems and the adapter. and passes the array of news items to the adapter. Aug 03 14:20:14 Smoke break guys, Aug 03 14:20:24 return break; Aug 03 14:20:26 I assumed all of it gets destroyed when the fragment is destoryed Aug 03 14:21:42 http://sscce.org/ Aug 03 14:23:47 I see your point but how do you remove stuff if you don't know what the problem is? Aug 03 14:24:03 What if I removed the problem part of the code? Aug 03 14:24:32 AKK9: Remove stuff as long as the problem still exists. If it vanishes, you know where to search. ^^ Aug 03 14:24:39 Not needed here though... I think. Aug 03 14:25:42 AKK9, if you removed the problematic part, the code would work, and you'd know where the problem is... Aug 03 14:26:13 but it's not really a problem. I just don't understand why my images are persitent between screen rotations. Aug 03 14:26:29 I have done nothing to cache the images or store them myself. Aug 03 14:26:33 So there is no code to remove. Aug 03 14:26:39 It just happens. Aug 03 14:26:43 AKK9, are your images on a fragment? Aug 03 14:26:47 Yeah Aug 03 14:26:51 AKK9: Why do you have two ArrayList? Both named differently... Aug 03 14:27:02 Do you call setRetainInstanceState(true)? Aug 03 14:27:20 No Aug 03 14:27:35 Hm Aug 03 14:27:38 Also, use Picasso Aug 03 14:27:51 flan3002, because I'm a bad person. Also I'm not sure. Aug 03 14:28:14 AKK9: I'd say that the instance variables are not reset, so the Lists of items are still there when it recreates the views and therefore don't need reloading. Aug 03 14:28:40 But how woudl the insance variabled be saved? Aug 03 14:28:47 AKK9: its a common straightforward approach. Nothing to fear except for one thing : sometimes the cutting of code can inadvertently introduce new bugs or remove the catalyst for the one you're looking for. http://www.codelord.net/2012/04/10/using-binary-search-for-debugging/ Aug 03 14:29:12 (another reason too for regular git commit) Aug 03 14:30:18 Object A inside Object B, and Object B has String name. If Object A is destroyed what happens to B and B.name? Aug 03 14:30:19 AKK9: They aren't saved. They are simply not deleted. Aug 03 14:31:01 AKK9, the reference to it is destroyed and it will probably get garbage collected Aug 03 14:31:27 Well, if A is deleted, that is. Aug 03 14:31:49 So it's the same thing right? I have a Bitmap in a NewsItem, in an Adapter, in a Fragment. and the Fragment is destroyed. Aug 03 14:31:59 so it all because garbage right? Aug 03 14:32:03 becomes* Aug 03 14:33:16 AKK9: Well, if I'm not confusing anything, 'destroy' doesn't mean 'garbage-collect' here, but 'conceptually destroy it', by calling onDestroy. Aug 03 14:33:23 Yeah Aug 03 14:33:44 And the views are destroyes, just not the instance variables. Aug 03 14:35:11 ##Oh Aug 03 14:35:24 So the fragment is the same, but it just recreated the views. Aug 03 14:35:33 Let me see... Aug 03 14:35:49 I might be talking total garbage... Aug 03 14:36:14 I think fragments are persisted Aug 03 14:37:00 I think (don't forget the salt) the objects are the same, and only the views are destroyed. Aug 03 14:45:03 hmm I can't figure this one out. Aug 03 14:45:18 I checked feedUrl in the fragment and it's null Aug 03 14:45:28 As soon as the fragemtn is creaed after rotation Aug 03 14:45:43 So i don't think the fragment persists Aug 03 14:46:20 im back bro's Aug 03 15:02:15 thank God for that. Aug 03 15:06:51 best approach to finding out what is killing/invalidating a secondary thread in Android? Aug 03 15:16:08 ok then Aug 03 15:16:30 is there a way to list messages (programming a little chat app) without having to save them in an array of some sort Aug 03 15:16:30 so they will be listed one by one Aug 03 15:16:40 More context. Aug 03 15:17:54 ok ive got a scroll viwe and inside atm a textView to display messages and i was wondering if there was a way without having to set the text in some sort of a temporary buffer array Aug 03 15:18:04 *view Aug 03 15:18:49 ulli909: Well, first: What's wrong with an array? Second: How do you store the messages (in memory and persistent)? Aug 03 15:18:59 in memory Aug 03 15:19:21 and i was just wondering , doesnt really matter Aug 03 15:19:24 * autrilla sighs Aug 03 15:19:39 would be easier :D Aug 03 15:19:46 ulli909: Sure, possible. Do you have a class for your your messages? Aug 03 15:19:51 will add a log later on Aug 03 15:20:09 not really flan3002 Aug 03 15:20:16 Well, how then? Aug 03 15:22:10 ive just started programming but ill write one now with the array i guess Aug 03 15:22:24 Wait. Aug 03 15:22:31 How do you store the message currently? Aug 03 15:23:19 in an array Aug 03 15:23:39 Well, then you already got one... Use that? Aug 03 15:23:47 ahhh Aug 03 15:23:59 No need to copy it around... Aug 03 15:24:10 ive just started programming ive got nothing Aug 03 15:24:11 atm Aug 03 15:24:49 So this is purely theoretical right now? Aug 03 15:24:59 yes pretty much Aug 03 15:25:17 Shall it have persistent storage? Aug 03 15:25:19 * autrilla sighs again Aug 03 15:25:25 What's wrong autrilla? Aug 03 15:25:39 flan3002, ill add that later on Aug 03 15:25:45 flan3002, people asking abstract questions Aug 03 15:25:51 no need for it atm Aug 03 15:25:57 * flan3002 shrugs. Aug 03 15:26:19 Instead of explaining the real problem they have Aug 03 15:26:39 ulli909: Well, come back when you have an actual question... ^^ Aug 03 15:27:52 my question was is there a better way to display the messages where i could add them one by one and i dont have to set the text from a buffer array again and again Aug 03 15:28:11 because sometimes they dont understand how to explain the problem they have. If most people really understood the problem they had they could google an answer. Its why these channels exist : to encourage people to explain their problem. patience. Aug 03 15:28:49 ulli909: There can be no better way when there's nothing to compare to. Aug 03 15:29:32 ok then ill write an add method in the messsage handler Aug 03 15:29:37 thanks anyway Aug 03 15:29:40 I'm trying to figure out the best way to represent something like this on a ListView http://i.gyazo.com/1289da06816bbeaf7021ae4236d239b7.png . I have ShoppingLists, which have Categories ("Beer, wine & spirits"), which have Products (Hoegaarden White). Would you have bidirectional relationships for each entity? I mean, each ShoppingList should have a List of Categories, and each Category a ShoppingList, or would you make it just one-way? Aug 03 15:30:09 ulli909: Ideally, you would either use a Database, or if you don't feel like doing so, a file-backed Store of messages, which you can retrieve and add messages from and to. Aug 03 15:30:53 Also, what would you give the Adapter? A Hashmap>? Aug 03 15:33:19 wait i should rather use a list Aug 03 15:33:47 can I use protobufs in Android? Aug 03 15:39:25 shvelo: Depends. Aug 03 15:52:12 depends on what?? Yes you can. https://developers.google.com/protocol-buffers/docs/javatutorial?csw=1 Aug 03 15:52:51 Nowt there that cant be used in an android app afaik. Aug 03 15:52:58 rgr: Depends on his experience and willingness to do so. If googling was to much, protobufs may be too much as well. -.- Aug 03 15:53:06 oh for goodness sake. Aug 03 15:53:25 hi! Aug 03 15:53:25 He uses emacs anyway Aug 03 15:55:09 in my app, i am extending a dialogfragment. To build its view, i need to call some methods of the activity. From what i understand, the DialogFragment.onCreateView() method can be called before the onCreate() method of the activity has finished Aug 03 15:55:56 where should i create the dialogfragment view' Aug 03 15:57:01 i have read the docs:it seems that the onActivityCreated() method is the right place, because this method i called after the onCreate() method, but i am not sure i am doing thigs in the right way Aug 03 16:07:24 i have a service that is supposed to be connected to a certain ip and monitor a set of events that's set by user. when the service is restarted by the system, how am i supposed to know the set of events i'm supposed to monitor? should i store them in activity in opPause() and then read them in service's onCreate()? Aug 03 16:15:35 I have a class which implements Parcelable. I put breakpoints in the Parcel methods, and they are never used. But it still works perfectly. Aug 03 16:16:22 I even emptied the methods so they look like this: Aug 03 16:16:22 public void writeToParcel(Parcel parcel, int i) {} Aug 03 16:16:45 so no data is saved in this method Aug 03 16:17:01 But it still works when I parcel and un parcel the object. Aug 03 16:18:14 They aren't necessarily parceled if passed within the same process Aug 03 16:20:51 I use putParcelableArrayList, to put my array of objects. Then the fragment does onDestroyView and then onCreateView. Aug 03 16:21:16 So you're saying that it doesn't actually get parceled when I do this? Aug 03 16:24:31 The bundle is just backed by a Map iirc. Unless it's passed to another process, or the OS (e.g. when saving state), it's not parceled Aug 03 16:25:46 The only time I use it is onSaveInstanceState Aug 03 16:26:16 hey, im kind of new to android and all. i see that there's a lot of different architectures for the native sdk. does that mean that if i want to ship something with native code, i need to generate binaries for every single archs? Aug 03 16:26:24 Go to dev settings and tell it not to keep background processes, then put it in savedInstanceState.. That should parcel it Aug 03 16:26:41 DrBenway: Yup. Aug 03 16:26:56 DrBenway: You'll always want ARM, sometimes x86 and rarely MIPS. Aug 03 16:28:00 I doesn't work, I think it's cause im using a fragment. Aug 03 16:28:31 SimonVT, so if I pass a Bundle from my one Activity to another, within my own app, will it Parcel? Aug 03 16:28:49 Or from a Fragment within my app to another Activity within my App? Aug 03 16:28:52 I don't believe so Aug 03 16:28:59 Try it Aug 03 16:29:17 It's unnecessary to parcel and unparcel if it's within the same process Aug 03 16:29:23 Will do. Man I've been serching for answers around this all day Aug 03 16:29:26 Thank you Aug 03 16:32:20 and im guessing some of those devices are 64 bits and other 32? Aug 03 16:34:27 I don't think we have any phones with 64-bit CPUs yet, they're coming though... Aug 03 16:34:50 But 32-bit code should work fine... Aug 03 16:35:25 The iPhone :P Aug 03 16:35:56 By 'we' I meant 'the Android ecosystem'. ^^ Aug 03 16:36:33 I'm trying to figure out the best way to represent something like this on a ListView http://i.gyazo.com/1289da06816bbeaf7021ae4236d239b7.png . I have ShoppingLists, which have Categories ("Beer, wine & spirits"), which have Products (Hoegaarden White). Would you have bidirectional relationships for each entity? I mean, each ShoppingList should have a List of Categories, and each Category a ShoppingList, or would you make it just one-way? Aug 03 16:36:33 What would you give the adapter, a HashMap>? Is there a better channel to ask this in? Aug 03 16:50:31 autrilla: you could pass that HashMap> to adapters constructor, but you need to alter the structure a bit, i guess, to make it feasible to pick items in getView Aug 03 16:52:42 what I'm thinking is make that Map to ArrayList of "Item" object. Item class contains two fields, one boolean (whether category or product) and another holding the actual object. Aug 03 16:53:29 now from the getView, you can pick the Item, decide whether its Category or Product and render it accordingly Aug 03 16:59:59 bhagi, I could just have a dummy superclass for that matter Aug 03 17:00:24 A class called Item, and Category and Product extend it Aug 03 17:00:43 I'd have to do some weird sorting anyway.. Aug 03 17:01:39 Hi,Can someone help me with gradle. I am getting an error saying the manifests cannot be merged because of incomaptible element. I am importing a library which provides an exported service. My manifest: http://paste.ubuntu.com/7943913/ Library manifest: http://paste.ubuntu.com/7943897/ . And here is the error I am getting : http://paste.ubuntu.com/7944104/ Aug 03 17:01:43 but, that Category is an Item analogy wont be useful outside of that ListView right? Aug 03 17:02:07 The Categories are useful outside of that ListView too. Aug 03 17:02:14 Items would not be useful outside of it. Aug 03 17:03:15 yes, so thats why, you could keep those classes as it and create Item inner class inside the adapter, create the List there itself Aug 03 17:03:56 So maybe just give the Adapter a ShoppingList, as that is what it's going to house Aug 03 17:04:23 Does anybody here have experience in building Boost for Android? Aug 03 17:04:47 r3s: the error is saying clearly what is the issue. Aug 03 17:04:55 I've been having a hell of a time compiling that Aug 03 17:05:08 bhagi, I tried changing the exported to true, but it still gives the error Aug 03 17:05:29 r3s: what is the new error that you are getting? Aug 03 17:06:14 autrilla: yes, that will do i guess. Either way you have to create the list of Items if you are following my approach Aug 03 17:06:56 bhagi, i think the new error is about the intent filter. Here is a paste : http://paste.ubuntu.com/7944151/ Aug 03 17:09:08 r3s: one UploadService has intent in one manifest, its missing in another Aug 03 17:09:41 Why am not using ORM? Aug 03 17:10:27 have you used any previously Aug 03 17:10:30 ? Aug 03 17:10:59 Yes Aug 03 17:11:03 Hibernate and Eclipselink Aug 03 17:11:16 There must have been a reason why I am not using it Aug 03 17:11:24 for why* Aug 03 17:11:31 you are talking about server side code? or android code? Aug 03 17:11:45 Android code Aug 03 17:12:11 but both doesnt support android AFAIK Aug 03 17:12:13 bhagi, let me try adding it Aug 03 17:12:25 bhagi, ormlite and greendao seem popular :/ Aug 03 17:13:19 autrilla: yes, you've any experience with ORM on Android? what about their performance? Aug 03 17:13:30 Nope Aug 03 17:15:30 a> what serverside server you would recommend so the android app connects to it and retrieve data and serve to user inside app? Aug 03 17:15:53 That depends on the language you want to write your server on Aug 03 17:15:57 If Java, wildfly Aug 03 17:17:30 no something like php or python Aug 03 17:17:38 it will be just a restfull server right? Aug 03 17:19:52 hey there. I'm new to Android development, and I'm having a little problem starting with the official tutorial. Is this the place to ask suck questions? Aug 03 17:20:10 such* sorry, but yeah, they are quite sucky Aug 03 17:20:30 usually it is, but we eat people that don't do basic research on google ;) Aug 03 17:20:56 We do Aug 03 17:21:10 I know, I would too. I've been searching and does not look like it is documented. Aug 03 17:22:14 ~ask Aug 03 17:22:25 And a bot would reply: Don't just ask to ask, ask! Aug 03 17:22:32 Don't ask to ask, just ask!* Aug 03 17:23:27 The thing is, I'm trying the tutorial on LinearLayout, the part about the weight parameter ( http://developer.android.com/training/basics/firstapp/building-ui.html#Weight ). It is supossed to fill all the available space in the screen when you set it to 1, right? Aug 03 17:23:50 autrilla, what you think? php of python? what i should use then? Aug 03 17:23:55 horizontally available, in this case Aug 03 17:24:00 I'd use python, but meh Aug 03 17:24:03 I am a PHP hater Aug 03 17:24:30 Alina-malina, it depends on what you're doing Aug 03 17:24:34 autrilla, ok python, but is it enough just to serve data, make sessions for each user and server the stiff? Aug 03 17:24:48 If you're comfortable with Java, the step to PHP is smaller Aug 03 17:24:49 Tobias|, serve images and texts when user tap buttons and links in the app Aug 03 17:24:53 What do you think... Aug 03 17:25:12 Well, it doesn't in my device. It just adapts to the hint message. Aug 03 17:25:23 No, they build a programming language that is not capable to serve data and make session Aug 03 17:25:33 s/build/built Aug 03 17:25:36 what you mean? Aug 03 17:25:39 eudes, weight is used to autosize multiple elements inside the LInearLayout Aug 03 17:25:48 Alina-malina, of course python can do that Aug 03 17:25:53 Any decent language can do that Aug 03 17:25:53 eudes, can you pastebin your layout code and explain what you want to achieve? :) Aug 03 17:25:55 Java can do that Aug 03 17:26:09 yes i know, but anyways, i though tthere is already prewritten solution for that, like for java Aug 03 17:26:13 but anyways Aug 03 17:26:19 Django, maybe? Aug 03 17:26:21 what if it is game? Aug 03 17:26:22 Node.js? Aug 03 17:26:24 hmm Aug 03 17:26:25 node.js is nice Aug 03 17:26:26 yes Aug 03 17:26:29 i like it too Aug 03 17:26:33 I haven't used any of those. Aug 03 17:26:40 I will have to, soon. Aug 03 17:26:44 hmm nice Aug 03 17:26:48 take me in your team Aug 03 17:26:56 Alina-malina, php can do that... autrilla is just trolling php Aug 03 17:27:04 PHP deserves to be trolled. Aug 03 17:27:21 Mavrik, it's all in the link ( http://developer.android.com/training/basics/firstapp/building-ui.html#Weight ). I haven't even modified the thing. It's the last example there Aug 03 17:27:21 maybe dephi? it is my primary language Aug 03 17:27:22 And trying to spread it is like spreading the plague, don't do it :P Aug 03 17:27:36 if you troll it... at least act like you know what you're talking about Aug 03 17:27:37 Qoute from Javabot: php is the solution of choice for relaying mysql errors to web users. For more info, please read http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ Aug 03 17:27:43 * autrilla would LOVE to have the javabot here Aug 03 17:27:46 eudes, ok, first, make sure that the linearlayout ITSELF is as big as you want it to be Aug 03 17:27:58 autrilla, when you last time used php? Aug 03 17:28:00 autrilla lol... that post is just shit. Aug 03 17:28:03 eudes, then, if you have a single item inside the linear layout, just use match_parent as width, you don't need the weight Aug 03 17:28:05 lots of stuff changed after it Aug 03 17:28:12 Woah! We've got some speedreaders over here Aug 03 17:28:20 eudes, then, if you have multiple items inside the linearlayout, make sure they ALL have weight if you want to use it Aug 03 17:28:24 Alina-malina, 3 months? Aug 03 17:28:27 I try not to use it Aug 03 17:28:27 and php is not why mysql errors get relayed to users, its shitty tutorials Aug 03 17:28:35 PHP is appropriate for writing web applications with Aug 03 17:28:37 Bittarman, read the damn blog post Aug 03 17:28:40 eudes, turning on "show borders of views" in developer settings on your devices helps alot at this kind of debugging :) Aug 03 17:28:46 Tobias|, there are much better alternatives Aug 03 17:28:49 autrilla, I have you dumb shit. Aug 03 17:28:49 The stateless execution of pages is wonderful Aug 03 17:28:56 i just want my app to be served with right language:) php, python it doesnt matter for you i can do both Aug 03 17:29:04 which is why I know its full of crap. Aug 03 17:29:07 Alina-malina, use the one you like ffs :) Aug 03 17:29:10 hehe Aug 03 17:29:14 ok then:) Aug 03 17:29:18 Bittarman, well you said MySQL. Aug 03 17:29:20 You're fired. Aug 03 17:29:22 Alina-malina, use what works for you. Aug 03 17:29:23 "I have you dumb shit." now, that's some perfect english Aug 03 17:29:26 autrilla, sure, let's use spring/django/express/some bloaty framework, becuase we don't value our time and like overengineering things :p Aug 03 17:29:34 mysql is a network-attached spreadsheet used by pr0n sites and other dodgy entities across the Internet. You can learn more about it at http://www.mysql.com - free download of the open-source version, including JDBC drivers. Also: http://grimoire.ca/mysql/choose-something-else Aug 03 17:29:36 :) Aug 03 17:29:43 Tobias|, use dropwizard, for example Aug 03 17:29:44 lol Aug 03 17:29:44 Or GWT Aug 03 17:29:50 you lot are funny. Aug 03 17:29:51 Tobias|, more bloat <3 Aug 03 17:29:55 I had to use GWT at my last job Aug 03 17:29:58 It wasn't so pleasant :P Aug 03 17:29:59 Mavrik, alright. But if I want some of these element to adjust to their content and the rest to fill, wouldn't assigning them weight break that? Aug 03 17:30:10 eudes, yes Aug 03 17:30:18 let the flame war begin....! Aug 03 17:30:30 eudes, for those cases when you have to mix and match, RelativeLayout is the better choice Aug 03 17:30:30 Just sayin', I'd use python. It's a language that seems nice and I haven't used it yet. Aug 03 17:30:50 eudes, LinearLayout is good for either statically sized views or when you have to size them according to some ratio Aug 03 17:30:56 python has plenty of rough edges too :p Aug 03 17:31:07 like.... all of python 3 Aug 03 17:31:11 Mhm, Python has shitty tooling. Aug 03 17:31:16 Use python 2 then Aug 03 17:31:21 But awesome frameworks tho (Django <3) Aug 03 17:31:48 For y'all hardcore coders, you can do it in ASM too. Aug 03 17:31:59 Now that would be fun Aug 03 17:32:02 What makes you think we didn't? :P Aug 03 17:32:04 Mavrik, lovely, thanks a lot. I just assumed that the example would work as advertised :/. I'll keep going into the tutorial. Aug 03 17:32:15 ARM ASM tho, not x86 Aug 03 17:32:29 Alina-malina, at the end of the day, flip a coin to decide on PHP/python, because agonizing over it like this channel is is just going to waste you more time than it saves Aug 03 17:32:38 Tobias|, but we want to flame :( Aug 03 17:32:57 Alright, time to change the topic: vim or emacs? Aug 03 17:33:08 Hello Aug 03 17:33:10 Tobias|, it is already the end of the day Aug 03 17:33:11 pico masterrace Aug 03 17:33:16 autrilla, only a moron uses either for Java :P Aug 03 17:33:25 so #fail Aug 03 17:33:27 Mavrik, meh, I just want some flaming :P Aug 03 17:33:41 I'd say eclipse or intellij, but the answer is clear Aug 03 17:34:06 Let the vim/emacs trolls debate, we'll steal their jobs while they evangelize their magical text editors :p Aug 03 17:34:10 Yeah, kicking Eclipse is like kicking a sick person. Not fair. Aug 03 17:34:42 Hello, what is the "Public Key" of my app? Aug 03 17:34:44 Mavrik, wtf are you talking about? Aug 03 17:34:45 I wonder what kind of punishment there'll be for getting a bot in here. Aug 03 17:34:47 how can I see it? Aug 03 17:35:05 Oh, criptography. Fun stuff too. Aug 03 17:35:19 Bantalon, it's the public key of public/private key pair you used to sign it. Aug 03 17:35:29 Bantalon, google Aug 03 17:35:29 * kjeldahl has quit (Ping timeout: 252 seconds) Aug 03 17:35:30 Ah Aug 03 17:35:32 Bantalon, it's stored in the keystore which you created while signing your app. Aug 03 17:35:32 c/p fail Aug 03 17:35:38 Google android get apk public key Aug 03 17:35:48 autrilla, hmm, aren't bots against Freenode rules? Aug 03 17:35:56 Mavrik, nope Aug 03 17:36:10 Alina-malina, ? Aug 03 17:36:12 I doubt it. ##Java has one, most channel have one Aug 03 17:36:23 Mavrik: ah alright, thanks Aug 03 17:36:31 Volly / OkHttp / RoboSpice for non REST based servers? Aug 03 17:36:45 OkHttp Aug 03 17:36:55 You've got Jake Wharton here :) Aug 03 17:37:03 right. Aug 03 17:37:16 Mavrik: I'm trying to setup my app for chartboost but it's asking me for my public key Aug 03 17:37:20 good thing you answered before even knowning what's he loading Aug 03 17:37:22 nearly all tech channels I've used have one. Should have one. Good for repeat questions and one shot answers. the best by far is in #emacs! Aug 03 17:37:24 I'm not finding much on Google Aug 03 17:37:31 even though he listed a HTTP lib, image loading lib and a everything lib :D Aug 03 17:37:33 Mavrik, non-REST :/ Aug 03 17:37:40 Not sure how to go about getting it? Is there some specific program where I can look into my keystore and fetch it? Aug 03 17:37:47 Bantalon, yes, the keytool Aug 03 17:37:53 bhagi: you can use retrofit for non restful APIs as well Aug 03 17:37:54 damn this mac :( Aug 03 17:37:55 Bantalon, it's certanly not asking for your public key Aug 03 17:37:59 hmm Aug 03 17:38:06 yeah but it is Aug 03 17:38:06 Bantalon, so I suggest you read Chartboost documentation where that is documented. Aug 03 17:38:07 what if i wanted to get the notifications of the download progress from multiple activities? OkHttp supports or needs to write some code? Aug 03 17:38:09 there is a field saying "Public Key" Aug 03 17:38:15 and then it says Aug 03 17:38:30 "The Public Key is used to validate your Android in-app purchases for Post Install Analytics" Aug 03 17:38:35 f2prateek: non REST also??? could you please point me at any site or documentation? Aug 03 17:38:50 retrofit is seriously seriously awesome Aug 03 17:38:54 bhagi, what are you loading? Aug 03 17:39:12 i'm loading JSON, images, POSTing json/xml Aug 03 17:39:20 downloading large documents also Aug 03 17:39:45 I'd use OkHttp, but Mavrik probablt knows better. Aug 03 17:40:25 three very different use cases :) Aug 03 17:40:35 and no single lib coveres all of them. Aug 03 17:40:44 Use all the libs! Aug 03 17:41:04 Mavrik: my requirement is simple, i just want multiple activities to be notified of when i start downloading a large document from an activity Aug 03 17:41:21 that didnt come out right i guess Aug 03 17:42:03 i want to track the download progress of downloads started from previous activities Aug 03 17:42:49 Anyone who has worked with Chartboost who can chime in? Aug 03 17:43:05 How can I get a hold of my public key to add it to Chartboost? Or is it OK to just skip that part? Aug 03 17:43:22 What's downloading the file? bhagi Aug 03 17:43:32 someone please answer the question on #android, some guy needs help there Aug 03 17:43:36 .... why did ORMLite have to use it's own personal set of annotations? Aug 03 17:43:45 Couldn't they comply with the JPA? Aug 03 17:44:00 With GSon, i need to parse a string like {“user”: {“id”:1, ….}} to User class Aug 03 17:44:04 how can I do that? Aug 03 17:44:18 f2prateek: you are asking activity/service? Aug 03 17:44:23 Gandalf84, have you read the docs? Aug 03 17:44:26 Yup Aug 03 17:44:34 Hey, I used Nandroid Online to make a backup and it gave me this directory: http://i.imgur.com/z3ITG8J.png ... but the Boostamp CWM Recovery wants a different directly, seen here: http://i.imgur.com/yvJhlL4.png ... any ideas? Aug 03 17:44:52 autrilla, yes but the only example is when then json strings contains the keys and value Aug 03 17:44:58 f2prateek: activity Aug 03 17:45:18 Gandalf84, http://stackoverflow.com/questions/6096940/how-do-i-write-a-custom-json-deserializer-for-gson Aug 03 17:45:35 Just bunch of other errors bhagi. I'll try to read and see if i can get it sorted out tomorrow. Thanks for your help Aug 03 17:45:40 autrilla, JPA? :P Aug 03 17:45:59 Mavrik, instead of using @Entity, they feel like it's better to use @DatabaseTable Aug 03 17:46:05 JPA is Java EE spec not covered in Java standard lib Aug 03 17:46:21 so that's probably the reason, I doubt the author of ORMLite ever came close to that EE cesspool :) Aug 03 17:46:26 You can only have one activity at a time, so the old one won't be available when the new one comes on Aug 03 17:46:35 It isn't implemented on Java EE either Aug 03 17:46:40 It's all abstract :P Aug 03 17:47:26 f2prateek: yes, one activity starts the download, user can stay there or he can navigate to another activity. So once he comes back, i need to show the progress Aug 03 17:48:33 Gandalf84: if the valueo of "user" in JSON is having same structure as your POJO, then you can first do jsonObject.get("user") and feed that to GSON, you'll get your model populated Aug 03 17:48:50 But if he goes to another activity the old one is inactive and shouldn't be downloading anything. You need a service Aug 03 17:49:05 bhagi: i’m going to have a look into it, thank u Aug 03 17:49:53 f2prateek: the user initiates a large document download from that activity, so download should not terminate once he navigates to another activity. Aug 03 17:50:22 i saw RoboSpice having this feature, it uses Services, so you can just bind to track the download status Aug 03 17:50:29 any thoughts on this? Aug 03 17:50:45 Right so the service downloads the file not the activity Aug 03 17:51:08 yes, its like activity asks service to start the download Aug 03 17:51:21 bhagi, that's how it's supposed to be solved :) Aug 03 17:51:26 Anyway you can use a local broadcast manager to update the progress from the service and o the activity Aug 03 17:51:28 guys Aug 03 17:51:31 need help: Aug 03 17:51:32 Hey, I used Nandroid Online to make a backup and it gave me this directory: http://i.imgur.com/z3ITG8J.png ... but the Boostamp CWM Recovery wants a different directly, seen here: http://i.imgur.com/yvJhlL4.png ... any ideas? Aug 03 17:51:38 Or an event bus/ otto Aug 03 17:52:00 i'm new to Otto have to check that Aug 03 17:54:54 Basic structure is that you have one component (your activity in this case) subscribe to an event (progress) which is updated by another component (service) Aug 03 17:55:46 LocalBroadcastReceiver, Otto and EventBus all do the same Aug 03 17:56:10 Mavrik, do you use any kind of ORM lib for Android? Aug 03 17:56:44 You'll also need some sort of sticky event for the download is finished, so components created after the service downloads a file know that the file was downloaded fully Aug 03 17:56:44 hello, I just upgraded to Android Studio 0.8.2. It used to be that when I ctrl clicked on a class name, it would take me to the source of that class, but now, whenever I do that for an Android class, it takes me to the source but only has functionSignature(){ /* compiled code */ } - Anyone know how I can get the full source code back? Aug 03 17:56:46 Hmm, I've used ORMLib and GreenDao Aug 03 17:56:57 and the SimpleContentProvider lib Aug 03 17:57:03 but I haven't really been happy with either of them Aug 03 17:57:37 I don't like the ORM android has but I don't like SQL either :( Aug 03 17:57:41 f2prateek: i'll have a backing db to save the meta info of the documents. I can keep downloadStatus column there to indicate the status Aug 03 17:58:00 autrilla, SimpleContentProvider worked the best for me for now Aug 03 17:58:07 but it abstracts some stuff away too much Aug 03 17:59:05 if android service's onUnbind() returns false, it's never called again. why's that? Aug 03 17:59:28 did i miss something in the docs.. Aug 03 18:00:18 RuntimeExceptionDao is probably the worst name you could give to a class. Aug 03 18:03:06 Hi, is every app running in its own sandbox within dalvik? Aug 03 18:03:48 depends what you mean by Sandbox... but for most common definition, yes. Aug 03 18:03:56 (unless you pin them in the same process) Aug 03 18:05:19 Mavrik: does activities run on seperate process by default? Aug 03 18:05:39 bhagi, your whole app runs inside a single process and single VM by default Aug 03 18:05:53 that's why you can share / see / use objects between your app components Aug 03 18:05:59 Hmmm... does anyone know where to find the SDK Manager in android studio 0.8.x ? I know this is a dumb question, but I cant find it and my google fu is not good enough Aug 03 18:06:39 re38, Tools -> Android -> SDK Manager? Aug 03 18:06:44 Mavrik: then why can't i just pass any arbity object through intents? why should those be parcealables? Aug 03 18:07:03 bhagi, because Intents are cross-app communication bus Aug 03 18:07:04 Mavrik: Hmmm... I dont have an Android sub menu in tools Aug 03 18:07:09 bhagi, (and in-app of course) Aug 03 18:07:28 bhagi, that's why usually for internal app communication people use other libraries like EventBus or Otto Aug 03 18:07:45 which use Singleton objects as message holders Aug 03 18:08:13 but they say singletons are bad design choice? Aug 03 18:08:25 People say bunch of dumb stuff :) Aug 03 18:08:34 ha ha ha Aug 03 18:08:52 bhagi, the "Singletons are bad" comes mostly from desktop / server programming where they indeed cause a code smell Aug 03 18:09:18 but in mobile apps which are short-lived they often can be very useful, especially when they represent hardware or shared resources Aug 03 18:09:20 And because if you don't say it, people start using singletons everywhere Aug 03 18:09:29 (even tho, not all people agree with me on that) :) Aug 03 18:09:31 yep Aug 03 18:09:49 bhagi, note that singletons can easily make your app burn more memory as it should if you don't know what you're doing :) Aug 03 18:10:06 Using a singleton for your EventBus is totally fine Aug 03 18:10:14 Using singletons for everything is not Aug 03 18:10:24 yep Aug 03 18:10:31 ok got it Aug 03 18:10:38 but leaking Activity reference in a sticky event in EventBus is bad tho ČD Aug 03 18:10:59 could be solved with WeakReference right? Aug 03 18:11:09 Is it fine for DAOs to be singletons? Aug 03 18:11:22 EntityManagerFactories are singletons :P Aug 03 18:11:30 most of the time* Aug 03 18:11:46 bhagi, yeaaa... but WeakReferences sometimes act funny, it's usually way easier to just structure app in a way you never pass around activities or other such objects Aug 03 18:11:59 autrilla, considering the fact that SQLite databases really don't like concurrent access Aug 03 18:12:15 I always thought having a single entry point for each .db file which can be concurrently managed makes sense Aug 03 18:12:51 Factories...! reminds of this fantastic post http://discuss.joelonsoftware.com/default.asp?joel.3.219431.12& Aug 03 18:13:27 Meh, I love the JPA Aug 03 18:13:56 I've just met it with Java EE 5 when it was a horrible horrible mess... even tho people tell me the EE7 version is rather neat Aug 03 18:14:50 Has Android Studio 0.8.4 no wizard for adding maven repositories? (I want to add ormlite) Aug 03 18:15:14 Rayne, add it to your dependencies Aug 03 18:15:17 You don't need a wizard Aug 03 18:15:26 Mavrik, I've only used it on EE7 Aug 03 18:16:41 autrilla, the repository? I don't want to update dependencies manually if it is possible to automate it. Aug 03 18:17:16 compile 'com.j256.ormlite:ormlite-android:+' Aug 03 18:17:40 just wondering '+' please means latest right? Aug 03 18:18:11 it should. Aug 03 18:19:46 Holy cow, Gradle documentation is having 65 chapters...! Aug 03 18:20:20 Wow, thanks autrilla Aug 03 18:20:25 Gradle documentation is awful Aug 03 18:20:45 and I really really want to kick the person who thought of an idea to use a procedural programming language to write declarative build code Aug 03 18:20:45 Is it normal that the "Maven Projects" view doesn't show the (now loaded) libraries? Aug 03 18:21:01 bhagi, yes Aug 03 18:21:08 Rayne, Maven projects view will show stuff when you have a maven project with pom.xml imported Aug 03 18:21:19 Rayne, since you obviously have a Gradle project, you need to look at the Gradle view Č= Aug 03 18:21:21 :) Aug 03 18:21:21 compile 'com.j256.ormlite:ormlite-android:4.+' would give you the latest 4.x Aug 03 18:21:53 yeah, migrate to gradle anyway. You can still use maven resources- Aug 03 18:22:15 Yes, and deal with all the shit Gradle brings :P Aug 03 18:22:36 Like age long compilation and error messages rivaling C++ errors in length :P Aug 03 18:22:48 More flaming! Aug 03 18:23:30 Mavrik, thank you for the answer. I found only "Gradle Tasks". Aug 03 18:23:34 Mavrik: have you seen buck by facebook? Aug 03 18:24:22 I've seen it but I haven't had the chance to test it out yet. Aug 03 18:24:49 My testing kinda stopped when I've seen it has issues with IDEA Aug 03 18:26:42 But I'd love to hear experiences :) Aug 03 18:30:02 http://i.imgur.com/wlpN3gI.png i cant restore it gives the following error Aug 03 18:34:48 Mavrik, Hmm.. don't all apps run in the same VM (= Davlik), but each app has their own process within Dalvik. Or did you mean each app has an own Davlik VM? Aug 03 18:35:19 Each app has own dalvik vm. Aug 03 18:35:29 When you start an app you get your own fork of process with your own Dalvik. Aug 03 18:36:58 Wow Aug 03 18:37:20 That's a pretty good design, which increases security a lot Aug 03 18:37:41 Mhm, basically you have Zygote process which keeps a running Dalvik VM with Android base classes loaded Aug 03 18:38:03 and when an app shold start, Zygote forks itself and loads the app classes, resources and stuff Aug 03 18:38:25 What about ART? Aug 03 18:39:25 Good to know, thanks Aug 03 18:39:29 autrilla, ART acts the same Aug 03 18:41:22 Hello, I'm trying to use robolectric with android studio. Does anyone know of any up to date guide? I have version 0.8.0 Aug 03 18:41:45 autrilla, ART still uses a runtime / VM, it just works differently Aug 03 18:41:50 Zygote is still there Aug 03 18:42:04 I thought ART compiled the bytecode Aug 03 18:44:23 It can (doesn't always) and that doesn't remove the need for runtime :) Aug 03 18:45:02 native processes can still be sandboxed Aug 03 18:48:33 When getting WiFi scan results using WifiManager & .getScanResults() does this just return the last scan results which could have been 10min ago or does it actually do a scan and then return the fresh results ? Aug 03 18:49:32 I have a simple onClickListener on a button to trigger that event. And for some reason I always get same result as the first time I called it. Even tho I move into a room that has very low signal. Aug 03 18:49:59 neredsenvy, hmm, isn't doc clear enough: Aug 03 18:50:00 Return the results of the latest access point scan. Aug 03 18:50:02 ? Aug 03 18:50:10 Returns: the list of access points found in the most recent scan. Aug 03 18:52:25 -.- Aug 03 18:53:36 note that there's also "startScan" method listed lower on the page. Aug 03 19:03:31 My app shows a DialogFragment. When I run my app in the emulator, if I click my DialogFragment's OK button twice, it fires the OK event-handler twice. Aug 03 19:03:39 Is this a bug in the emulator? I can't reproduce this on my phone. Aug 03 19:08:25 TacticalJoke, could be some lag/delay issue with the emulator Aug 03 19:09:06 something akin of double form submits on web pages, and the notorious note "please click the submit button ONLY ONCE" Aug 03 19:09:11 try disabling the button as soon as you receive onClick Aug 03 19:13:23 Do you think this could happen on a phone? (If there is lag, say.) Aug 03 19:13:27 hi guy's, i'm making a chat client in android for acces to the chat of a game. The chat part work well (xmpp client based). But now i'm watching for the UI container of the chat, what could be the best choice ? A ListView with Textview's inside (for the word wrap) ? Or something like a memo ? or something else ? Aug 03 19:14:45 TacticalJoke, it's possible Aug 03 19:15:09 Okay. I wonder why this happens. I thought the message queue would block something like this. Aug 03 19:15:22 that's why it is generally suggested the onclick handlers be short and quick, possibly delegating tasks to background threads or something Aug 03 19:16:33 It feels like a bug to me. Aug 03 19:16:51 Android itself should recognise that OK has been clicked once (and now further clicks shouldn't register). Aug 03 19:16:52 Did exist a component like a memo who accept Html ? Aug 03 19:17:04 Because this OK is the DialogFragment's positive-button thing. Aug 03 19:17:22 TacticalJoke, if you say so... seems pretty fine to me, but either way, be it a bug or not, you still have to handle it, don't you? Aug 03 19:17:30 does anybody know where I can go tto get some help with compiling Boost for Android? Aug 03 19:17:53 True. In this case, it's not the end of the world if it happens, but I'm wondering if I might have to worry about this in the future, with another app. Aug 03 19:18:20 it is best to take care of it one way or another Aug 03 19:18:29 This would never happen in Windows. Aug 03 19:18:40 Hmm. Aug 03 19:18:40 ok, go work with windows then Aug 03 19:18:42 :p Aug 03 19:19:10 I'm just trying to understand why it happens in Android. Aug 03 19:19:23 Does Android run "OK"-click handlers in background threads or something? Aug 03 19:20:04 when the UI is event-driven and threaded, it's almost impossible to tell Aug 03 19:20:22 onclick should be run in the same thread as the UI initially, but eh, who knows Aug 03 19:20:36 Yeah. Aug 03 19:20:36 does it really matter? best invest your energy in dealing with it Aug 03 19:20:53 I think understanding what is going on under the hood is generally important. Aug 03 19:21:04 My assumptions about Android entailed that this situation was impossible. Aug 03 19:21:10 So my assumptions need updating. :/ Aug 03 19:21:15 or Aug 03 19:21:23 you could give up on trying to assume anything at all Aug 03 19:21:33 like, drop your windows baggage :p Aug 03 19:21:44 I assumed that there'd be a message loop in the UI thread meaning that this situation was impossible. Like this: OK is clicked --> event handler is run --> dialog is hidden --> any further OK clicks aren't possible. Aug 03 19:22:06 But this seems to be happening: OK is clicked --> event handler is run --> dialog is hidden --> OK is clicked --> ... Aug 03 19:22:14 Yeah, I'm trying to. :D Aug 03 19:25:50 Hmm. According to SO, button-click events are queued up. Aug 03 19:25:56 So you can't just disable the button in the event handler. Aug 03 19:26:05 http://stackoverflow.com/questions/5608720/android-preventing-double-click-on-a-button Aug 03 19:27:08 I don't see why you couldn't just disable the button Aug 03 19:27:26 notice I said you should disable it *as soon* as you enter onclick Aug 03 19:27:31 According to SO: "This doesn't solve the double click issue because Android can still queue up clicks before the onClickListener has a chance to fire." Aug 03 19:27:32 which is not what these people do Aug 03 19:27:43 hmm Aug 03 19:28:28 if you're *really* so concerned about this, you could try clearing the event queue of any subsequent clicks as soon as you get onclick Aug 03 19:28:54 (not all clicks in general, just ones regarding this button) Aug 03 19:29:04 I don't know how possible is this but you can give it a shot Aug 03 19:31:06 Do you think this is a bug in Android or intended behaviour? Aug 03 19:32:33 hello all Aug 03 19:34:00 I'm creating a list of objects, im using ASyncTask to fetch each one. How can I make the UI thread wait for them ALL to finish? Aug 03 19:34:11 Should I make another ASyncTask to run in the background and wait for it all to finish and then call the next method? Aug 03 19:34:20 I don't want to block the UI thread as I want the progress spinning thing to be smooth. Aug 03 19:34:46 AKK9, make a single AsyncTask to fetch all of them Aug 03 19:35:16 is it possible to overlay any window on top of an existing (open) application? Basically like a service that can be turned on/off from notification window. Aug 03 19:35:41 Mavrik, what if I want to get more than one thing at a time to speed things up? Aug 03 19:35:42 Someone reported it as a bug: http://code.google.com/p/android/issues/detail?id=20073 Aug 03 19:35:45 No response, though. Aug 03 19:35:50 From Google, that is. Aug 03 19:36:00 man, you're sure putting a lot of effort into this Aug 03 19:36:06 AKK9, then AsyncTask probably isn't the best way to model that. Aug 03 19:36:16 I would just fix it in my code in whatever way seems most appropriate and move on Aug 03 19:36:21 Use executors with futures and wait on them. Or RxJava. Or somethin. Aug 03 19:36:46 ravilov: How can someone fix a problem when they don't understand it? Aug 03 19:37:45 TacticalJoke, deciding how to classify it (but or feature or whatever) hardly helps in understanding the technical details behind it Aug 03 19:38:18 If this is a feature, I can expect it elsewhere in Android (and prepare for it). If it's a bug, I won't expect it elsewhere. Aug 03 19:38:44 to me it's just a "behavior", intended or not Aug 03 19:38:53 Mavrik, thanks. I'm just starting out so I'll use a single one for now. Aug 03 19:38:54 If I encounter something I don't understand while programming, I try to become an expert on it. This helps me become an expert in the domain in general. Aug 03 19:39:04 appreciate the suggestions Aug 03 19:39:06 I guess if I encounter it somewhere I automatically preprare mentally to expect it elsewhere too Aug 03 19:40:27 anybody available to help with a problem I'm having with compiling Boost and NDK? Aug 03 19:42:04 android-dev968, whats the problem? Aug 03 19:42:32 havent tried compiling boost but just went through porting my codebase to compile with the ndk Aug 03 20:06:41 Anyone know anything about android image formats? http://developer.android.com/reference/android/graphics/ImageFormat.html#YV12 It says the stride is ALIGN(width, 16), but what is ALIGN? Does it mean the lowest multiple of 16 than is >= width? Aug 03 20:10:39 vozz, it means that it's always multiple of 16 pixels Aug 03 20:13:09 Mavrik: does it round upwards or downwars? Aug 03 20:13:33 uh, wierd question Aug 03 20:13:39 it never loses your pixels, so upwards Aug 03 20:13:43 that's how memory alignment works :) Aug 03 20:13:57 yeah but I guess that was vozz' question :P Aug 03 20:14:11 hmm Aug 03 20:14:12 (part of) Aug 03 20:14:27 yes indeed, I somehow lost that part of the question while parsing the doc :P Aug 03 20:21:41 ah, thanks a lot Aug 03 20:45:42 If I implement Google Play Game Services in my app, can my app still be a an Application application type or is it necessarily forced into Game application type? Aug 03 20:47:19 hi all Aug 03 21:08:53 lasserix are you talking about alt-enter? Aug 03 21:16:37 If learning about Android what is the recommended setup; things like JDK versions, etc? Aug 03 21:17:24 I can't seem to find any information on the Google Android SDK pages Aug 03 21:18:18 http://developer.android.com/sdk/index.html Aug 03 21:18:43 It says JDK 6? Aug 03 21:19:01 Can it be 7 or 8? Aug 03 21:19:42 8 - no, 7 - depends, 6 - yes Aug 03 21:20:57 JDK 8 works as well. Aug 03 21:21:04 32 or 64bit? Aug 03 21:21:11 both. Aug 03 21:21:23 Looks like there are issues with the 64bit JDk? Aug 03 21:22:04 where does it look like it? Aug 03 21:23:02 Ah no there is a 64bit bundle, my bad Aug 03 21:33:09 anyone know a good source for freely licensed icons? need one for a play/pause button Aug 03 21:33:58 mikechelen: http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html Aug 03 21:34:44 bankai_au: ah i was hoping to find something like the built in drawables Aug 03 21:34:55 so i dont have to actually make an image Aug 03 21:35:27 is downloading a zip file too much work ? Aug 03 21:36:14 bankai_au: you have to upload an image to generate the zip file... Aug 03 21:36:24 look a bit harder Aug 03 21:36:51 click "clipart" Aug 03 21:37:36 oh ok, they dont have the particular icon i need though Aug 03 21:38:05 what i meant was a combination play & pause icon Aug 03 21:38:36 ok, in my activity, onButtonPressed(), I want to launch an asynctask to download html content then display it in a dialog Aug 03 21:45:32 is onTrimMemory a good place to save service state? Aug 03 21:51:46 heya, anyone know what is happening here? no option for an android project (after upgrading to android studio 0.8.2 ) http://s15.postimg.org/72sl835zu/Untitled.jpg Aug 03 22:00:25 not to self: don't upgrade to 0.8.2 Aug 03 22:02:23 ha. yeah :/ Aug 03 22:03:04 does anyone have any experience with nexus 5 and android L - i'm having issues flashing my radio. can anyone help? Aug 03 22:03:59 flashing your radio? Aug 03 22:04:55 yeah Aug 03 22:05:08 fastboot flash radio radio-hammerhead-m8974a-2.0.50.2.08.img Aug 03 22:08:35 https://www.dropbox.com/s/rxcyokngb2u6a04/radioflash.png Aug 03 22:08:55 zzxx: it just freezes at this point Aug 03 22:14:26 topic .... Aug 03 22:17:28 KrunchyAl: did you try android-root? Aug 03 22:17:36 whats that? Aug 03 22:17:40 #android-root Aug 03 22:17:46 ah Aug 03 22:17:53 well i'm trying to go back to stock now Aug 03 22:17:56 this channel is more devoted to app developers Aug 03 22:17:58 best of luck Aug 03 22:22:41 i am looking at a project that exposes some controls on the lockscreen, any tips about how i can find the code that does this? Aug 03 22:29:59 any recommendations for in depth coverage of how canvas and paint operations stack/scale etc? The docs are pretty much only API level. Aug 03 23:50:16 i am having a weird behavior in ListFragment Aug 03 23:50:31 I have a method implementing onitemlongclicklistener that opens up a dialog Aug 03 23:50:40 when an item is held from listview Aug 03 23:50:51 s/held/longclicked/ Aug 03 23:50:59 but it also triggers the onclick event Aug 03 23:51:23 is this normal behavior? Aug 03 23:53:20 it triggers onClick because you are returning false on your onLongClick Aug 03 23:53:42 return true, indicating that you processed the clicked by yourself and don't want any further processing Aug 03 23:53:47 ahh Aug 03 23:53:56 you da man, man! Aug 03 23:53:58 thanks :) Aug 03 23:54:00 np Aug 03 23:54:23 there needs to be a bot here keeping points so that I could typ "kidoki +1" and you would get that point :P Aug 03 23:58:07 Can anybody tell me why this is failing during compilation? Aug 03 23:58:09 #include #include #include #include using namespace std; using namespace cv; struct AudioScores { std::vector audio_level; vector vad_scores; }; Aug 03 23:59:01 I get errors about unknown namespace "cv" and vector not being a type Aug 03 23:59:01 Error:(10, 17) error: 'cv' is not a namespace-name Error:(10, 19) error: expected namespace-name before ';' token Error:(15, 8) error: 'vector' in namespace 'std' does not name a template type Error:(16, 3) error: 'vector' does not name a type Aug 03 23:59:25 btw, i'm doing this from within Android studio Aug 04 00:06:29 how do I specify to use c++11 in gradle ndk builds? Aug 04 00:07:21 I think you specify something in either Application.mk or Android.mk Aug 04 00:13:39 @barbs: I thought the point of gradle was to not use hte Application.mk files directly anymore Aug 04 00:13:48 or Android.mk Aug 04 00:15:11 I thought it would still need those, but then again I haven't done any native development using gradle, so I could be wrong... Aug 04 00:16:53 @barbs, it does, just that using gradle you don't have to manually alter the files anymore, the gradle build system auto generates the files for you Aug 04 00:17:23 I'm just trying to figure out what the language is to supply the cppflag for -std=c++11 to the script. I can add cFlags Aug 04 00:17:28 but that's it. Aug 04 00:17:32 I see Aug 04 00:17:53 I'm getting an error during my build that sort of points to my compiler not using c++11 Aug 04 00:22:56 ideas anybody? Aug 04 00:26:00 hmm, i need someone's opinion Aug 04 00:26:31 I have class that hold info for my database and interfaces for each tables' columns Aug 04 00:26:45 and I have class for each table implementing those columns and base columns Aug 04 00:26:58 if I want to delete a record that has sub records associated with it Aug 04 00:27:10 lets say, post has likes, and if I delete a post I should delete all likes associated Aug 04 00:27:27 do I construct the uri string for likes in the class for Likes or Posts? Aug 04 00:27:32 I think both will just do fine Aug 04 00:27:38 but wondeirng what other's thinl Aug 04 00:27:40 think* Aug 04 00:28:01 what does the uri string refer to? Aug 04 00:28:53 uri string would be something like CONTENT_URI + ("likes/message_id") Aug 04 00:29:13 message_id = post_id Aug 04 00:31:33 any thoughts? Aug 04 00:32:50 I generally avoid manipulating the database directly and just use an ORM :) Aug 04 00:34:39 hi g00s! Aug 04 00:34:49 ORM? Aug 04 00:34:51 hello ;) Aug 04 00:34:57 how goes it Aug 04 00:35:26 a fine day of running in the mud Aug 04 00:35:37 detachYo: e.g. http://greendao-orm.com/ Aug 04 00:35:38 playing fetch with pooch Aug 04 00:35:40 or ORMlite Aug 04 00:35:42 very nice Aug 04 00:35:52 thanks barbs Aug 04 00:36:00 g00s, running in the mud does not sound fun Aug 04 00:36:02 :) Aug 04 00:36:16 it is until you have to wash up :D Aug 04 00:36:25 (and don't slip) Aug 04 00:37:21 never slip Aug 04 00:37:38 barbs: Looks promising. I prefer writing my stuff because I have more control over. Aug 04 00:37:48 Not saying the way I do it is the best, or every should. Aug 04 00:38:35 detachYo: that's fair enough. The good thing about greenDAO is that it handles most things pretty well, but you can get a handle to the raw database if you need/want to drop down to that :) Aug 04 00:39:27 hm, sounds like a thoughtful thing to do, giving option in case you want to. I'll give it a try in my next project Aug 04 00:40:20 cool :) Aug 04 00:45:35 Hi guys. General question about fragments and the acvitivy lifecycle. In my app I add a main fragment at onCreate. What would be the correct way of closing the fragment in OnPause? Having a var ref to it and set that null? Detacht it? Aug 04 00:46:27 Why do you want to close the fragment on pause, if it is the only one? Aug 04 00:46:54 fragments follow the lifecycle of activities, so you don't have to do anything to "close it" Aug 04 00:47:53 detachYo: I read that since onPause could eventually be killed, I should do all cleaning up in there, instead of onStop and onDestroy Aug 04 00:48:17 ch260: so for fragments, I don't need to clean anything? Aug 04 00:49:04 ThomQ: depends what you mean by cleanup Aug 04 00:49:58 well, how I thought I should do it, is cleanup all the fragments, services etc, so that they won't take up too much mem and cpu Aug 04 00:50:32 each Activity has a FragmentManager that manages Fragments of THAT activity Aug 04 00:50:51 when Activity is killed, then its Fragments are killed with it Aug 04 00:52:06 as for Services, you should unbind all the BOUND services Aug 04 00:53:51 okok, thanks. Aug 04 00:54:21 yeah having some problems returning to the app when its been killed / being paused for a couple of hours Aug 04 00:57:42 naturally sorted link list... is it possible without too much hassle? Aug 04 00:57:50 (list full of ints) Aug 04 00:57:52 when I do getContentResolver.delete, but there are no records, will I get an exception? Aug 04 00:58:07 another question, kind of in the same area. For my app to restore the instance like the user left it, I'd need a couple of common vars wich I store as shared preferences. I also got an arraylist filled with a custom class which I'd need to keep. What would be the best way to store it to be used again after the app has been killed? Aug 04 01:01:32 jaspertheghost you could use a skiplist Aug 04 01:01:53 huh? Aug 04 01:02:07 i didnt say anything Aug 04 01:02:14 oh, Jesperhead sorry Aug 04 01:02:25 hehe Aug 04 01:02:41 im sorry, its a list of strings that need to be sorted as ints Aug 04 01:02:56 would skiplist still be applicable? Aug 04 01:03:09 ie. string representation of ints Aug 04 01:03:11 strings ... sorted as ints ? Aug 04 01:03:23 sorry, doesn't compute :) Aug 04 01:03:44 lol. the list is ["1", "2",...] etc Aug 04 01:03:52 only, its not sorted. Aug 04 01:04:05 why would you store them as strings ? Aug 04 01:04:15 store them as ints, convert to strings when necessary Aug 04 01:04:17 ["10,11,12... ... "19", "2"] Aug 04 01:04:21 im pulling from a server Aug 04 01:04:25 json obj Aug 04 01:04:41 dunno then Aug 04 01:04:46 ;_; Aug 04 01:12:51 ThomQ: one of the ways it to have your custom object implement Parcelable interface Aug 04 01:33:59 Jesperhead: can't you convert back to int ? Aug 04 01:38:13 Integer.parseInt(string.getText().toString()); Aug 04 01:41:26 hi Aug 04 01:42:00 anyone else having problem after recent updates of sdk/gradle to link maven dependencies? strugling with NoClassDefFoundError Aug 04 01:42:18 looks like it's related to https://code.google.com/p/android/issues/detail?id=74266 https://code.google.com/p/android/issues/detail?id=73939 and https://code.google.com/p/android/issues/detail?id=73450 Aug 04 01:42:59 I've tried to re-build apps that worked for a long time and on rebuild i'm getting the error, changing Gradle version (or wrapper), sdk target, buildToolsVersion, compileSdkVersion and/or JDK/JRE version didn't help Aug 04 01:44:57 and tried to downgrade android gradle plugin as well, going down to 0.11.0, didn't help Aug 04 01:46:04 any solid lib which can take picture from camera or gallery in better way? Aug 04 01:52:01 man this vape flavor is so good Aug 04 01:52:21 vanilla waffle cake Aug 04 02:03:29 does anybody know what the solution to this issue is ? ( #include // http://code.google.com/p/android/issues/detail?id=39983 ) According to the link, the issue was resolved years ago. However, I'm still getting this error when trying to compile some Boost::thread apparently Aug 04 02:15:55 is the IMEI number unique to a phone? Aug 04 02:24:30 DammitJim, it should be Aug 04 02:24:43 vs ICCID which is specific to a SIM card, right? Aug 04 02:59:04 alright folks, tonight lets get set up for push notifications eh? **** ENDING LOGGING AT Mon Aug 04 02:59:59 2014