**** BEGIN LOGGING AT Tue Oct 07 03:00:00 2014 Oct 07 03:00:10 Definitely! Oct 07 03:00:17 Nivag What are you trying to do? Oct 07 03:00:30 Nivag C++ is for the real coders :D Oct 07 03:01:23 i think i wrote 10 lines of working c++ per day Oct 07 03:01:27 That is real. Bjarne actually gave a good talk on that Oct 07 03:01:30 g00s cool. Oct 07 03:01:38 g00s I never did it professionelly Oct 07 03:01:48 Bjarne was a DANE! Oct 07 03:01:49 inbetween was the hundred line template instantiation error messages from gcc Oct 07 03:01:49 why don't we just use punch cards Oct 07 03:01:58 CPH_DK: I have 5 responses, each with 4 fields (1 text & 3 radio buttons) - I want the responses centred and spaced appropriately. Oct 07 03:02:03 JacobTabak Can I punch them? Oct 07 03:02:12 g00s, any advice on improving it? Oct 07 03:02:15 im going to punch something if my travis build doesnt work soon Oct 07 03:02:23 Nivag It is not really my thing, I dont really do guis. Oct 07 03:02:26 tricknology improving what the logging thing ? Oct 07 03:02:38 Nivag are you not setting the layoutParams when they are actually null ? Oct 07 03:02:39 yes Oct 07 03:02:42 Nivag I do 2d games Oct 07 03:03:04 I have a good idea for fast pixel perfect sprite collision detection Oct 07 03:03:11 tricknology not really; i'd just use standard logger or log4j2 / slf4j Oct 07 03:03:13 I once got offered a C++ contract on the basis of reading Bjarne's book & extensive experience in other languages, went into Java instead. Oct 07 03:03:33 bjarne is a smart mother fer Oct 07 03:03:35 Java is cheating, it is like "i cant do c++" :D Oct 07 03:03:40 g00s All danes are :D Oct 07 03:03:44 * JacobTabak yawns Oct 07 03:03:47 whenever i read bjarne stuff, i thought i was learning from the master Oct 07 03:03:50 I stasrted programming using punched cards on a mighty Mainframe! Oct 07 03:03:55 unlike gosling, seemed like a dipshit Oct 07 03:04:01 g00s You have guess where Iam from?:D Oct 07 03:04:01 Pshaw. C++'s silly trying-to-be-a-superset-of-C with its STL training-wheels is reason enough not to use C++. Oct 07 03:04:09 my goal is to map applications Oct 07 03:04:22 ...eventually Oct 07 03:04:27 ScottishPig I only started using the STL recentæy Oct 07 03:04:29 well, one goal of c++ was to be compat with C to some degree, that required lots of sacrifices Oct 07 03:04:30 recently Oct 07 03:04:37 g00s I Oct 07 03:04:46 if youknow the histort of this shit, it was those kinds of compromises that was needed for adoption Oct 07 03:04:52 not like he had a marketing dept Oct 07 03:05:02 g00s as soon as you use polymorphism in C++ a lot of overhead in generated Oct 07 03:05:17 the trend in c++ is generic programming Oct 07 03:05:26 like the virtual function table and so on Oct 07 03:05:35 STL was the pioneer Oct 07 03:05:45 g00s You mean procedural? Oct 07 03:05:54 no, generic vs OO Oct 07 03:06:03 g00s We call that prodecual :) Oct 07 03:06:12 no classes Oct 07 03:06:36 I would have a hard time going back to normal C. Oct 07 03:06:56 no procedural means ... procedures / structural programming Oct 07 03:07:07 g00s Ok? Oct 07 03:07:16 g00s I thought it meant non-oop Oct 07 03:07:22 generic programming, is using templates for composition rather than polymorphism Oct 07 03:07:30 ah, now I get it. Oct 07 03:07:37 generic programming !- procedural Oct 07 03:07:40 != Oct 07 03:07:43 templates are mostly compile time, right? Oct 07 03:07:50 I got it :) Oct 07 03:07:51 afaik, always Oct 07 03:07:58 I thought so too. Oct 07 03:08:10 but some of the STL is runtime Oct 07 03:08:22 c++ templates are compile time Oct 07 03:08:38 hmm....what about container classes? Oct 07 03:08:40 these days, i'd be more interested in rust Oct 07 03:09:09 what is most c like server side script? Oct 07 03:09:10 asp? Oct 07 03:09:13 the Oct 07 03:09:27 the guy who wrote "modern c++" is a big fan of D Oct 07 03:09:55 Brarne? Oct 07 03:09:55 Bjarne Oct 07 03:10:23 Andrei Alexandrescu Oct 07 03:10:37 Ah, I like Russians Oct 07 03:10:58 Like their nomenclatura B, C D :) Oct 07 03:11:07 CPH_DK: I'd say php is most C like server side web lang Oct 07 03:11:23 shmooz I am not too keen on php :( Oct 07 03:11:57 a big fan Oct 07 03:12:01 I want to be able to feed my site documents formatted the way you format docu when you edit wiki pages Oct 07 03:12:07 as in one of the two main guys behind D Oct 07 03:12:16 yuizy Cool :) Oct 07 03:12:30 StingRay_: layoutParams is not null Oct 07 03:12:32 I have never attempted to write my own interpreter/compiler Oct 07 03:12:48 yuizy: then would you agree with my statement ? Oct 07 03:12:48 and he's romanian, not russian Oct 07 03:12:51 :) Oct 07 03:13:14 I have, very specialized, distinctly not general purpose! Oct 07 03:13:19 u wot Oct 07 03:13:23 yuizy I should place that document converter serverside? Oct 07 03:13:24 i didnt say i was the guy Oct 07 03:13:29 ?? Oct 07 03:13:34 how can you misunderstand that Oct 07 03:13:37 :D Oct 07 03:14:00 Never underestimate Human Stupidity!!! Oct 07 03:14:01 yuizy I cant save anything on the server with a user side script, can I? Oct 07 03:14:12 Nivag wELL put.... Oct 07 03:14:41 A group of more than 10 people is always stupid on average. Oct 07 03:15:13 off topic: reality tv and social media are retarding our youth Oct 07 03:15:32 Update "did my hair" Oct 07 03:15:33 like Oct 07 03:15:38 1000 likes Oct 07 03:16:13 Do any countries have programming on the curiculum in primarty school? Oct 07 03:16:21 -t Oct 07 03:16:47 doubt it Oct 07 03:16:57 yes Oct 07 03:17:01 Nivag the view is matched to the parent dest in the transaction…so not sure they would do anything anyways Oct 07 03:17:10 we had a basic programming class in middle school Oct 07 03:17:20 by that time i already knew how to code.... Oct 07 03:17:34 i learned to code what I was only a baby Oct 07 03:17:46 And that is how it should be.. Oct 07 03:18:11 yeah but could you do SYS 4 bytecode programming on a Pet 32 Oct 07 03:18:24 Agamemnus I did too....I started with line numbered basic on my C64 :D Oct 07 03:18:45 I did a lot of C 64 too :) with SpriteMaster Oct 07 03:18:46 Agamemnus Kids who are not nerds should just be thrown out :D Oct 07 03:18:47 qbasic here Oct 07 03:18:58 like Sparta did? Oct 07 03:19:11 Agamemnus Excacly :D Oct 07 03:19:20 :o Oct 07 03:19:28 Agamemnus I got beat up in prim school because I could already read Oct 07 03:19:55 So that beating was very validating :D Oct 07 03:20:17 shmoon I never made anything serious on C64 Oct 07 03:20:33 shmoon The commercial games were NOT made with basic Oct 07 03:20:48 ._? Oct 07 03:20:50 CPH_DK remember Compute! Gazette ? Oct 07 03:20:58 I made a few games for fun, never good enough to sell Oct 07 03:21:08 the c64 games were all ML Oct 07 03:21:14 made a clone of Exploding Fist, Kung Fu Master Oct 07 03:21:26 CPH_DK: i was apparently given Fs because the teacher thought I was cheating in 1st grade.. because i knew phonetics and colors... Oct 07 03:21:27 shmoon My "modern" games are like Super NES with 32 bit color:D Oct 07 03:21:50 zinx Primary school is not place for non-morons :D Oct 07 03:21:53 no Oct 07 03:22:12 Impossible Mission was probably the best C64 game Oct 07 03:22:18 Anyone wanna hear my idea for pixel perfect sprite collision detection ? Oct 07 03:22:32 CPH_DK: been done Oct 07 03:22:47 zinx I know, but I got a good idea for optimizing it Oct 07 03:22:53 but Spy vs Spy, Beach Head, Blue Max, GhostBusters were pretty good too Oct 07 03:22:54 Thank you guys for your help! Jacob especially with the earlier stuff until he annoyed :P Oct 07 03:22:57 Thanks again Oct 07 03:23:01 CPH_DK: been optimized to heck and back too :) Oct 07 03:23:17 Now I'll be off figuring out db stuff on my own (that should be relatively straightforward) Oct 07 03:23:21 Have a good night Oct 07 03:23:32 CPH_DK do you remember the books "Exceptional C++" ? basically as i remember, all the ways you could fuck yourself up with exceptions Oct 07 03:23:38 zinx: you should write an online tutorial Oct 07 03:23:55 shmooz i had spy vs spy desert island edition Oct 07 03:24:04 shmooz: why? because there aren't enough already? >_< Oct 07 03:24:08 oops I meant CPH_DK should write a tutorial on collision detection Oct 07 03:24:35 g00s: yeah loved that game, with all the traps and the music was awesome too Oct 07 03:24:42 oh it was the island caper Oct 07 03:25:28 also had lode runner Oct 07 03:25:37 you put bombs in drawers and buckets of acid over doors and hope to trip up the other spy Oct 07 03:26:02 yeah Load Runner was pretty good, and Tapper, Raid Over Moscow Oct 07 03:26:24 http://www.youtube.com/watch?v=T0n6kCogb1Y Oct 07 03:26:42 oh yeah, you had to put the rocket together Oct 07 03:27:09 g00s: I never tried that sequel Oct 07 03:27:29 zinx Ok, but hear me out. When two sprites have been found within range of each other in stead of checking wether sprite1 pixel 1 sprite2 pixel 1 overlap, then use a "bitmap", generated from each of the sprite's image data. Say you have a 16 x 16 sprite, then you need a 16 16 bit ints, like int bitmap[16]. Then you use >> and << to move the bits in the right place on the x axis and Oct 07 03:27:29 bitmap[y] to allign the bitmap on the y axis, and then perform an and operation on the two bitmaps Oct 07 03:27:51 shmooz I suck at collision detection :D Oct 07 03:28:09 shmooz I nomstly use proximity areas :( Oct 07 03:28:23 well 16 and operations Oct 07 03:29:14 CPH_DK: there are faster ways. Oct 07 03:29:16 well I saw the word perfect and thought you are pro Oct 07 03:29:23 zinx Ok, but it could work. Oct 07 03:29:34 g00s: Archon was another great C64 game, like chess but with wizards with powers Oct 07 03:29:53 shmooz Danes dont get sarcasm Oct 07 03:30:06 zinx What is a faster way? Oct 07 03:30:45 we have like a viking patron saint, who is said to wake if demark needs to be defended :D Oct 07 03:30:52 CPH_DK: off the top of my head, you can use subtraction to check 4 rows at a time, up to 127 wide sprites, more for smaller Oct 07 03:31:43 zinx is that faster than 4 and ops? Oct 07 03:32:18 CPH_DK: w/ 32-bit ints anyway.. and you can organize it in a tree form for roughly O(log4(N)), where N is the largest of the shortest dimensions Oct 07 03:33:17 CPH_DK: most likely, yes Oct 07 03:34:18 CPH_DK: since you're talking shift, or, and per line whereas i'd be doing two subs, and, and a bit search per 4 lines Oct 07 03:34:25 CPH_DK: those are all one-clock instructions Oct 07 03:34:53 zinx I must admit that I not that far into the bit ops Oct 07 03:35:28 admittedly shift and or can be combined on some architectures (i.e., ARM) Oct 07 03:37:35 zinx Ok, how about making it even simpler make each bitmap by creating an array of 32 bit ints where there you dont use array[y] to access the y axis, but say you need 64*64 pixels, you have DWORD array[64*64/32] and then address the "pixels" in the bitmap with a method PutBit(x,y) for when you a making your bitmap. Oct 07 03:37:48 zinx Then how to make the and'ing very smart? Oct 07 03:39:18 zinx in my 64*64 sprite half of line 1 would be in array[0] and the other half in array [1] Oct 07 03:39:30 zinx You think of something clever? Oct 07 03:39:35 CPH_DK: i assumed as much Oct 07 03:39:44 zinx Sorry:) Oct 07 03:39:59 CPH_DK: all you'd have to do is shift both words then mask the appropriate bits off Oct 07 03:40:25 zinx Why the mask? Oct 07 03:40:47 CPH_DK: because you don't want to shift each line individually, i assume Oct 07 03:40:48 zinx Do the shifted bits appear at bit +) Oct 07 03:40:58 bit 0 Oct 07 03:41:30 zinx Ok, this is sort of new for me, you dont mind? Oct 07 03:41:41 CPH_DK: if you pack multiple lines in to one int, shifting it left by 6 bits is only going to shift in zeros for one line Oct 07 03:41:43 how do you shift several 32 bit ints? Oct 07 03:42:10 how do i pack multiple line into one 32 bit ? Oct 07 03:42:36 when your sprite is, say, 16 pixels wide, you can get two lines per int.. Oct 07 03:43:03 zinx AH, but it is will never be, not on android, 64x64 is almost the minimum visible on full hd Oct 07 03:44:32 think i'd go my suggestion in that case :P Oct 07 03:45:29 zinx Does java have fixed length variables like that? Oct 07 03:47:14 if ((0b0aaaaaaa0bbbbbbb0ccccccc0ddddddd - 0b0AAAAAAA0BBBBBBB0CCCCCCC0DDDDDDD) & 0b10000000100000001000000010000000) != 0) then collision, essentially, per 4 lines... Oct 07 03:47:56 CPH_DK: java's int is defined to be a 32-bit signed integer Oct 07 03:48:10 fwiw Oct 07 03:48:20 if you are doing this in java, optimizing this part is a waste of time Oct 07 03:49:04 zinx But using a bitmask and the and'ing is still faster than using ints or booleans, right? Oct 07 03:49:35 shrug, depends on the specific java implementation Oct 07 03:50:19 i'd just do the simple thing - store first & last pixel location on a line, compare those Oct 07 03:50:22 zinx Ok, I will implement the bitmask code. Will you take a look on it when I am done? Oct 07 03:50:28 Maybe somebody here can help me Oct 07 03:50:44 Is there anyway to disable an app from my app without root? Oct 07 03:51:19 you can write "uninstall that app" in your startup screen :) That is intuitive :( Oct 07 03:51:28 and interactive Oct 07 03:51:33 Eh. Oct 07 03:51:38 sorry Oct 07 03:51:40 Its a system app I need to disable Oct 07 03:51:58 gmillz Can it be done using the device? Oct 07 03:52:03 yo Oct 07 03:52:07 i have a question Oct 07 03:52:09 if anyone knows Oct 07 03:52:23 what happens if you have an identically named file in your patch file zip Oct 07 03:52:32 identical to main expansion file Oct 07 03:52:35 Let me describe. On m8 htc has a app that handles the screen off gestures. I wrote a replacement for that app that works from /data and can disable with root. Oct 07 03:52:38 Agamemnus: 17 Oct 07 03:52:50 But I would have a wider market if I could do it without root Oct 07 03:52:52 Darklust: is that from Age of Empires? Oct 07 03:53:07 Wololo Oct 07 03:53:07 if it is, i haven't played it in... ages Oct 07 03:53:14 gmillz http://stackoverflow.com/questions/19203682/how-to-disable-other-apps-android Oct 07 03:53:20 gmillz Havent read it, but looks right Oct 07 03:54:34 you haven't read it but you're providing it as a solution? Oct 07 03:55:04 bankai_au I am trying, I am new Oct 07 03:55:11 I have skimmed it Oct 07 03:55:23 of course Oct 07 03:57:24 What IDES do you guys USE? I use IntetlliJ, which is very good I think. Has a few bugs tho. Oct 07 03:57:32 IDEs Oct 07 03:59:58 I always end up with at least 200 Google Chrome tabs open. Sucks when you have 4GB of RAM. :/ Oct 07 04:00:21 TacticalJoke :D Oct 07 04:00:23 TacticalJoke I do that too, in particular when looking up coding stuff Oct 07 04:00:46 I look forward to martrix tech for APIs Oct 07 04:00:57 OneTab is great for this. Oct 07 04:00:59 I plug in the brain and then you know the API. Oct 07 04:01:02 Though I have like 500 tabs in OneTab right now. Oct 07 04:01:33 Me only 40 Oct 07 04:01:34 Yeah, computer-to-brain stuff sounds cool. Oct 07 04:01:50 TacticalJoke or apis yes :D Oct 07 04:01:54 for Oct 07 04:02:00 APIs are dicks :) Oct 07 04:02:26 TacticalJoke Is it a good idea to xml document your java code? Oct 07 04:02:39 You mean Javadoc? Oct 07 04:02:44 yes? Oct 07 04:02:55 I feel kinda uncomfortable about the "dick" comment, BTW. Not sure what happened there. Oct 07 04:02:59 I mean just writing the comments at all Oct 07 04:03:11 sorry, I will never say that again. Oct 07 04:03:14 I'm not a fan of it. I try to minimize its use, personally. Oct 07 04:03:21 sorry, Oct 07 04:03:35 I am not a native english speaker Oct 07 04:03:41 IMO, comments (including doc comments) are clutter. They get in the way of the code. Oct 07 04:03:50 Though obviously they're sometimes worthwhile. Oct 07 04:03:58 It's okay. Lol. Just didn't get that comment. Oct 07 04:04:16 Yes, ideally code should self explanatory, when it is not I comment Oct 07 04:04:20 be Oct 07 04:04:22 Right. Oct 07 04:04:40 I like Bob Martin's (I think) quote, about comments being apologies for not expressing oneself well enough. Oct 07 04:04:45 Actually, maybe someone else said that. Oct 07 04:04:47 But some javadoc comments about each class and methods could be heplful Oct 07 04:04:58 Yeah, complex APIs benefit from it. Oct 07 04:05:08 Though why does the documentation have to be *in* the code? Oct 07 04:05:10 It's right in the way. Oct 07 04:05:15 I think it'd be better to have it in separate files. Oct 07 04:05:36 TacticalJoke you just write the javadoc xml in another file? Oct 07 04:05:45 i think javadoc is a huge failure for large systems like Android Oct 07 04:05:47 I've never tried, but I kinda like the idea. Oct 07 04:06:02 g00s: What do you think would be better? Just curious. Oct 07 04:06:08 TacticalJoke It must be possible, you write @class "class name" Oct 07 04:06:29 TacticalJoke i don't know; but yeah, i think it should be outside the code too Oct 07 04:06:42 I will try that, 2 sec. Oct 07 04:06:44 IDEs these days can show it inline Oct 07 04:06:53 Good point, g00s. Oct 07 04:07:04 God, I used to hate reading most people's C# code. Oct 07 04:07:28 when you have a class like a android's View, how the fuck are you going to have examples and keep that thing under 100K lines Oct 07 04:07:28 is there a plugin that using my xml to generate javadoc in realtime so I can see the comments in the IDE when clicking on an object? Oct 07 04:07:38 so they don't have examples, solved Oct 07 04:07:40 the suck Oct 07 04:07:42 Even "experts" had code full of this (I kid you not): ///Return the foo.///the foo.public void getFoo() { } Oct 07 04:07:49 Or however the stuff went. Oct 07 04:08:00 Right, examples in source code is kinda crazy. Oct 07 04:08:24 I used to debate "experts" who claimed that the above was a good idea. Oct 07 04:08:27 I will look intot to javadoc xml in seperate filew Oct 07 04:08:40 Their reasoning was "It shows that the documentation has been completed, not ignored". Oct 07 04:09:19 also, i think its harder to evolve the 2 separately ... Oct 07 04:09:20 Of course, the lack of pointless comments can also be a 'completed' state. Oct 07 04:10:01 Yeah, it's easier for them to get out of sync when they're separate. That seems to be most people's argument for having documentation in the source code. Oct 07 04:10:09 i think javadoc works OK (in its default way) for typical projects and small frameworks / libraries Oct 07 04:10:18 but not for a whole OS Oct 07 04:10:23 Ya. Oct 07 04:10:43 Android's documentation sucks so bad, and I'm sure the requirement for it to be in source code is a factor. Oct 07 04:10:47 TacticalJoke You can do that with a separata javadoc file Oct 07 04:10:57 android doco isn't that bad, there's much worse out there Oct 07 04:11:01 Cool. Googling. Oct 07 04:11:10 TacticalJoke http://maven.apache.org/plugins/maven-javadoc-plugin/examples/javadoc-resources.html Oct 07 04:11:19 Thanks. Oct 07 04:11:41 bankai_au: There are also worse presenters than Bill O'Reilly. :D Oct 07 04:11:57 How can make your IDE generate javadoc every time you add/edit some and then add it to your IDEs standard documentation? Oct 07 04:12:14 i don't know who Bill O'Reilly is, but i'll accept it as he's really bad at whatever he does Oct 07 04:12:17 TacticalJoke this is epic http://digg.com/video/colbert-bill-oreilly-feud-a-long-time-coming Oct 07 04:12:27 Digg still exists. ;o Oct 07 04:12:37 bankai_au: count yourself lucky Oct 07 04:12:53 yeah Oct 07 04:12:54 g00s: Not available in my location. Oct 07 04:13:04 WAT Oct 07 04:13:08 I'm in England. Oct 07 04:13:13 is your location #android-dev? Oct 07 04:13:14 Says something about giving up my silly accent and moving to America. Oct 07 04:14:08 I can never watch Colbert clips outside of YouTube. Oct 07 04:14:29 not being able to watch him at all would be better Oct 07 04:15:05 bankai_au i hear you guys are putting up a fight Oct 07 04:15:13 for what ? Oct 07 04:15:15 TacticalJoke I am in Commie-Mark Oct 07 04:15:26 TacticalJoke Did you get any the wiser from my link? Oct 07 04:15:33 Somewhat wiser. Oct 07 04:15:53 I'm not sure whether to try it. Hmm. My Javadoc is so tiny already. Oct 07 04:16:31 It's basically all "Here's how this voodoo works". Oct 07 04:16:43 TacticalJoke Does you IDEs compile javadoc automatically and makes it available for the IDE? Oct 07 04:16:47 The problem domain (not my code) is voodoo, of course. Oct 07 04:16:57 Yes, CPH_DK. Oct 07 04:17:03 IntelliJ does that, right? Oct 07 04:17:08 TacticalJoke Do you think there is just ONE programmer anywhere who believes in astrology:D? Oct 07 04:17:11 bankai_au ASIO spying on the internet Oct 07 04:17:20 For sure. Humans are amazingly irrational. Oct 07 04:17:24 TacticalJoke Cant get it to do it, what plugin are you using? Oct 07 04:17:38 TacticalJoke Programmers must be the most rational of all :) Oct 07 04:17:38 g00s: there's a fight about it? i haven't heard, just that it's pissing people off Oct 07 04:17:39 in theory Oct 07 04:17:58 TacticalJoke I have to manually compile it Oct 07 04:18:03 I'm embarrassed to admit this, but I'm on Eclipse (for now). It just works. Oct 07 04:18:21 TacticalJoke I will try the eclipse plugin then Oct 07 04:18:33 I think IntelliJ is better than Eclipse, really. Oct 07 04:18:43 I'm on Eclipse because I started there and I'm waiting for Android Studio. Oct 07 04:19:41 It's a damn long wait. :\ Oct 07 04:19:43 AS arrived and you missed it Oct 07 04:19:48 beta is good enough Oct 07 04:19:56 it'll be beta for another three years Oct 07 04:19:58 I need that unit-test-on-the-JVM thing. ;| Oct 07 04:20:06 Once they implement that, I'm moving. Oct 07 04:20:11 TacticalJoke THen try INtelliJ, I am pretty happy, it is more fancy than Visual C++ Oct 07 04:20:18 Yeah, I've considered it. Oct 07 04:20:27 I hate changing IDEs unless I'm *certain*, though. Oct 07 04:20:28 TacticalJoke And VSC++ is pretty fancy Oct 07 04:20:31 CPH_DK: IJ and AS are essentially the same thing Oct 07 04:20:31 TacticalJoke oh you only have 4G memory ? Oct 07 04:20:34 I'll be certain once AS hits. Oct 07 04:20:37 Ya. Oct 07 04:20:40 Does AS need more? Oct 07 04:20:42 TacticalJoke yeah stay with eclipse Oct 07 04:20:55 AS + gradle need way more Oct 07 04:20:57 TacticalJoke It is pretty cool, and I am VERY picky with IDEs. Oct 07 04:21:00 Is 8GB enough? Oct 07 04:21:02 I'm googling... Oct 07 04:21:03 yeah Oct 07 04:21:08 8G is fine Oct 07 04:21:17 Yeah, I'm picky with IDEs. Oct 07 04:21:25 MS IDEs are great. I used to do C# stuff. Oct 07 04:21:47 TacticalJoke I used CodeBLocks with GCC for some time Oct 07 04:22:03 They recommend only 2GB of RAM. Oct 07 04:22:07 But that doesn't mean much, of course. Oct 07 04:22:30 I used to love Borland's IDEs. Oct 07 04:22:41 TacticalJoke Screenshot of my setup: http://i.imgur.com/ivCmayS.jpg Oct 07 04:22:49 TacticalJoke I used Borland too, even the Dos ones Oct 07 04:22:57 Especially when they stopped using MDI stuff. Oct 07 04:23:11 never used that? Oct 07 04:23:27 woah what font is that? Oct 07 04:23:36 JakeWharton IN the screenshot? Oct 07 04:23:46 courier new, I think Oct 07 04:23:47 Nice. I use mIRC too, BTW. :D Oct 07 04:23:51 the text rendering looks all messed up Oct 07 04:23:52 cool Oct 07 04:23:57 You have a resizable taskbar. Zomg. Oct 07 04:24:17 I like the font, VS C++ version something uses it Oct 07 04:24:35 TacticalJoke You dont? Oct 07 04:24:43 Mine's fixed. Oct 07 04:24:53 THAT is BARBARISM! Oct 07 04:24:54 :D Oct 07 04:25:01 it's not so bad when you zoom in to full screen Oct 07 04:25:03 I never need to resize. Oct 07 04:25:04 and SO 1991 Oct 07 04:25:21 HexChat FTW! Oct 07 04:25:37 The advantage of HexChat is that you don't have to keep editing the Registry. :D Oct 07 04:25:49 TacticalJoke Someone might a copy of the super max ultra version. Wanna try? Oct 07 04:26:19 TacticalJoke There is also a community edition, but I bought the pro version Oct 07 04:26:36 Wanna try what? Oct 07 04:27:09 TacticalJoke http://i.imgur.com/ivCmayS.jpg Oct 07 04:27:18 TacticalJoke Prof version, 30 day trial Oct 07 04:27:26 intellij Oct 07 04:27:30 intelli Oct 07 04:27:31 j Oct 07 04:27:45 Oh, gawd, I hate when I accidentally run the emulator. Oct 07 04:27:48 See you in an hour. Oct 07 04:27:50 wrong link Oct 07 04:27:54 (Especially when I have 200 tabs open.) Oct 07 04:27:56 TacticalJoke http://www.jetbrains.com/idea/download/download_thanks.jsp Oct 07 04:28:05 I use y phone for testing Oct 07 04:28:07 my Oct 07 04:28:23 seems like you use it for typing too :S Oct 07 04:28:52 bankai_au hahah:D Oct 07 04:28:57 i needed that Oct 07 04:29:01 deserved it Oct 07 04:29:11 CPH_DK: 30 days isn't very long. I need several years. Oct 07 04:29:32 Kids think 30 days is long. They're so out of touch. Oct 07 04:31:44 i don't even remember the last time I used a pro feature Oct 07 04:36:23 Yeah, AS is free and will remain free, CPH_DK. Oct 07 04:36:50 They want to make life easy for app programmers so that they get apps. Oct 07 04:39:32 TacticalJoke That is very clever Oct 07 04:39:36 maybe too clever Oct 07 04:40:06 It is the perfect way to guarantee that google devices will have to largest app lib forever Oct 07 04:40:13 the Oct 07 04:41:47 TacticalJoke Will you have a few secs to look at my bitmask stuff a bit later? Oct 07 04:44:03 I doubt it. Sorry. I also probably don't know much about whatever it is you're doing. Oct 07 04:44:35 how do you typedef in java? Oct 07 04:45:31 make a class Oct 07 04:46:09 I cant typedef anything else? Oct 07 04:46:11 http://lmgtfy.com/?q=typedef+in+java&l=1 Oct 07 04:46:26 Why do you want to typedef? Oct 07 04:46:37 Lovely link....very condesentiong.:D Oct 07 04:46:39 -o Oct 07 04:49:13 CPH_DK i find responding like that is effective at limiting pointless questions Oct 07 04:49:30 if you realize you can just type your question into google with fewer words, and the first result answers it... Oct 07 04:50:00 JacobTabak Makes sense. Oct 07 04:50:05 sorry Oct 07 04:50:11 but google is not alive! Oct 07 04:50:25 we need real live people that we can annoy Oct 07 04:50:26 I am not good at smalltalk, whicch was really what I was trying :D Oct 07 04:50:36 shmoon well put Oct 07 04:50:54 * shmooz kicks shmoon in the n Oct 07 04:50:55 can i annoy you Oct 07 04:50:58 complaining about travis Oct 07 04:51:03 and building a library project in another IDE Oct 07 04:51:08 JacobTabak I will take that to heart :) Oct 07 04:51:09 and having to build the jar manually and copy it over Oct 07 04:51:15 and not being able to debug it Oct 07 04:51:19 I am also actually doing stuff. Oct 07 04:51:26 I hate debugging java Oct 07 04:51:28 so slow Oct 07 04:51:53 are you doing it on an emulator or a device Oct 07 04:52:11 JacobTabak Device and I am used to C++ Oct 07 04:52:21 well it's not java that's slow Oct 07 04:52:24 you should know that Oct 07 04:52:34 I know how it works Oct 07 04:52:47 compiled to an intermediate lanuage "bytecode" Oct 07 04:52:59 yea - thats not whats slow Oct 07 04:53:06 which is why everyone should switch to javascript Oct 07 04:53:26 dexing, merging resources, building apk, transferring apk to device, installing apk on device, launching application Oct 07 04:53:28 this is whats slow Oct 07 04:53:32 not compilation or bytecode Oct 07 04:53:46 JacobTabak I would say it is because the JIT does not fully complile the bytecode to machine code and much of the program is interpreted? Oct 07 04:54:08 CPH_DK: No way. Oct 07 04:54:12 Ok? Oct 07 04:54:12 its what i said just now Oct 07 04:54:22 The JITter is probably really fast. Oct 07 04:54:24 nothing to do with language... language is <1 % of the slowness Oct 07 04:54:27 JacobTabak Ah,nyes. Oct 07 04:54:36 emulators have quicker deploy/install time Oct 07 04:54:39 JacobTabak No, not language, it COULD be fully complied Oct 07 04:54:42 CPH_DK: It's installing your app and stuff, as he said. Oct 07 04:54:49 Every single time. Oct 07 04:54:51 but slower performance once app is running Oct 07 04:54:57 TacticalJoke I know, that is the slow startup Oct 07 04:55:12 JacobTabak That is what I meant with the JIT, runtime. Oct 07 04:55:21 CPH_DK: I used to write C# code that ran on Windows. C# is rather similar to Java, and it was blazingly fast. Oct 07 04:55:31 My bottlenecks were almost always IO and network stuff. Oct 07 04:55:41 TacticalJoke Did you ever compare it to C++ fully compiled code? Oct 07 04:56:04 I didn't actually measure, but I'm sure it could keep up in many cases. Oct 07 04:56:08 TacticalJoke WHEN the app is running then a lot of stuff seems slower to me Oct 07 04:56:15 Some people have measured, and C# will even beat C++ in some cases. Oct 07 04:56:25 TacticalJoke I higher leverl stuff, I am sure Oct 07 04:56:27 in Oct 07 04:56:30 Though we can expect C++ to come out ahead in general. Oct 07 04:56:39 if done right Oct 07 04:56:41 (But not necessarily by much. Depends on what's going on.) Oct 07 04:56:45 so if familiar with c#, use it Oct 07 04:57:04 TacticalJoke I dont even think that C++ is harder than java, on the contrary, because Java lacks many features from C++ Oct 07 04:57:22 IMO, C++'s many features make it very complicated. Oct 07 04:57:24 I prefer C++ Oct 07 04:57:30 TacticalJoke I like it. Oct 07 04:57:31 hey is this #android-dev ? Oct 07 04:57:33 I love Java's simplicity. Oct 07 04:57:39 TacticalJoke Too simple imo. Oct 07 04:57:46 What does it miss that you need? Oct 07 04:57:56 TacticalJoke BUT admittedly nifty in some areas Oct 07 04:58:01 CPH_DK: Programming is hard. Too hard. Humans *cannot* do it. Oct 07 04:58:01 TacticalJoke Pointers. Oct 07 04:58:09 That's why we need simple tools. Oct 07 04:58:20 TacticalJoke Yes, numeric machine code is not fun Oct 07 04:58:31 i'd like first class functions ! Oct 07 04:58:37 CPH_DK: What do you need pointers for? Java more or less chas those (references). Oct 07 04:58:40 has* Oct 07 04:58:46 been using retrolambda recently, liking java a lot more now Oct 07 04:58:46 g00s: Why? Oct 07 04:58:49 TacticalJoke syntax? Oct 07 04:59:03 TacticalJoke I used pointer arithmitic a lot. Oct 07 04:59:20 In high-level programming? Oct 07 04:59:30 TacticalJoke In c++ I would do &something to reference it Oct 07 04:59:33 I can't remember the last time I ever wanted pointer arithmetic. Oct 07 04:59:40 TacticalJoke NO, NOT SO much in high level stuff Oct 07 04:59:41 I guess in games and stuff. Oct 07 04:59:55 TacticalJoke When writting the low level stuff Oct 07 05:00:02 TacticalJoke Using multimedia apis Oct 07 05:00:08 rendering Oct 07 05:00:37 i often did this: int* lpbuffer = &lpBufDest[x+y*width] Oct 07 05:00:51 For example to get the adress of a pixel Oct 07 05:01:08 that's so readable Oct 07 05:01:12 g00s: I misread. Sorry. Oct 07 05:01:15 I'd love first-class functions too. Oct 07 05:01:40 (I thought you meant stuff like being able to say "foo()" rather than "SomeContainer.foo()" at first.) Oct 07 05:02:33 I wonder whether we'll get Java 8 language features anytime soon. Oct 07 05:02:46 keep holding your breath for it :) Oct 07 05:02:53 JacobTabak maybe bad example, but it is very usable Oct 07 05:02:56 google is fucking up the java ecosystem Oct 07 05:03:05 JacobTabak And sometimes you HAVE to use it for some APIs Oct 07 05:03:40 TacticalJoke we have lambdas already Oct 07 05:03:46 well , not oracle's stuff - but they are making lots of headaches for library devs who are asked to support android too Oct 07 05:03:52 JacobTabak: Usable in Android? Oct 07 05:03:54 yep Oct 07 05:03:56 retrolambda Oct 07 05:04:47 Interesting. Oct 07 05:04:53 lambdas are like #9 on the good shit from Java 8 list Oct 07 05:04:56 for exmaple in DirectSound you ask for an audio buffer, func(DWOD** lplpbuffer), so the parameter is a pointer to a pointer, so the pointer you give as param will be filled with the new audio buffer Oct 07 05:04:59 in c++ Oct 07 05:05:05 DWORD Oct 07 05:05:05 What's #1? Oct 07 05:05:14 CPH_DK: God, I hated that stuff. Oct 07 05:05:17 method references Oct 07 05:05:19 maybe Oct 07 05:05:21 TacticalJoke Why? Oct 07 05:05:28 It's brain-numbing. Oct 07 05:05:37 I would like function pointers Oct 07 05:05:47 so, method references? Oct 07 05:05:47 yea i had to turn off all the java 8 hints Oct 07 05:05:52 because i got sad Oct 07 05:05:54 every time i couldnt' use them Oct 07 05:05:56 in AS Oct 07 05:06:04 JakeWharton I a new to Java. What is the syntax? Oct 07 05:06:04 don't forget to free after malloc, sanitize, and check for over/underflows ;) Oct 07 05:06:19 CPH_DK: String::valueOf Oct 07 05:06:22 shmoon that is c, not c++ Oct 07 05:06:38 JakeWharton Static data access, not a function pointer Oct 07 05:06:47 not to me at least :D Oct 07 05:06:53 Yeah, manual memory allocation is about as fun and motivating as punching a wall. Oct 07 05:07:10 couple method references with the ridiculous type inference and you can do crazy things Oct 07 05:07:11 TacticalJoke Ok, well I like it. I write my own memory management Oct 07 05:07:29 How to you define a reference in Java? Oct 07 05:07:34 I'm somewhat partial to C#'s "var". Not sure, though. Oct 07 05:07:48 TacticalJoke is that "pass by refereence" "var"? Oct 07 05:07:54 This kinda thing: var list = new ArrayList(); Oct 07 05:07:59 TacticalJoke: that's like the diamond operator, it could be done fairly easily Oct 07 05:08:01 yeah method references look nice :( wish i had them oh well! Oct 07 05:08:02 Not that one, CPH_DK. Oct 07 05:08:07 Yeah. Oct 07 05:08:09 TacticalJoke I use that all the time Oct 07 05:08:16 CPH_DK: You use what? Oct 07 05:08:22 it's actually the opposite of the diamond operator Oct 07 05:08:27 TacticalJoke the arraylist code Oct 07 05:08:29 Hah. Oct 07 05:08:45 One cool thing about 'var' is that it really puts pressure on you to use good variable naming. Oct 07 05:08:54 Maybe I will get used to Java....It is not that I dont like it...I am just missing some stuff Oct 07 05:09:13 TacticalJoke var is pass variable by reference? Oct 07 05:09:17 I did not get that Oct 07 05:09:24 No, CPH_DK. Oct 07 05:09:29 what then? Oct 07 05:09:42 I'm talking about a C# feature that's syntactic sugar. Oct 07 05:09:46 the keyword var is used for that in Pascal Oct 07 05:10:00 In C#, you can say stuff like "var accountNumber = 5;" rather than "int accountNumber = 5;". Oct 07 05:10:15 you write fund(var a), and then all vars passed as param are passed by reference Oct 07 05:10:29 TacticalJoke You mean untyped? Oct 07 05:10:35 it's inferred Oct 07 05:10:37 It's typed. The compiler figures it out. Oct 07 05:10:43 ok, cool. Oct 07 05:10:52 That is nifty Oct 07 05:10:56 5 is an int, 5L is a long, etc. Oct 07 05:11:01 C# also has untyped stuff, but that's weird. Oct 07 05:11:14 " " a string...neat Oct 07 05:11:33 Wait, 'dynamic' isn't actually untyped. Oct 07 05:11:49 I might be getting old but I prefer C++, HOWEVER Java does have some neat stuff that C+ does not have Oct 07 05:12:08 CPH_DK: How old are you? Oct 07 05:12:18 JavaScript is also sort of untyped...it is prob inferred also Oct 07 05:12:21 TacticalJoke 33 Oct 07 05:12:33 I hope that's not old. I'll be there in three years. ;o Oct 07 05:12:42 CPH_DK: My diagnosis is that you're just new to Java. Oct 07 05:12:50 TacticalJoke I think so too Oct 07 05:12:53 After six months, you'll lose this desire for C++. Oct 07 05:12:56 Javascript has types. It just has crazy coercion rules. Oct 07 05:13:01 TacticalJoke I can do the same stuff in Java, so it is not a problem Oct 07 05:13:19 TacticalJoke: never had that desire :P Oct 07 05:13:24 :D Oct 07 05:13:32 I hate C++. I'm the most rabid C++ hater. Oct 07 05:13:39 I dont hate it Oct 07 05:13:45 I love that quote: "C++: an octopus made by nailing extra legs onto a dog." Oct 07 05:13:49 use right tools for your job Oct 07 05:13:51 TacticalJoke I have found out something cool, why any game fits the device screen no matter what native resolution it has Oct 07 05:13:53 True. Oct 07 05:14:19 I am gonna use a 64 bit macro assembler for everything Oct 07 05:14:26 haha Oct 07 05:14:32 CPH_DK: people do C/C++ in android NDK where java won't do, or do as well Oct 07 05:14:48 I wonder whether programming in assembler has, on its own, caused somebody to become mentally unwell. Oct 07 05:14:51 shmoon I could write my rendering stuff in C++? Oct 07 05:14:52 I bet it has. Oct 07 05:14:55 so you can still do your C++ if you can find a reason Oct 07 05:15:13 Though it's hard to define "on its own", I guess. Oct 07 05:15:16 CPH_DK: you can do anything in C++ Oct 07 05:15:18 shmooz You have any link about how one does than? Oct 07 05:15:32 The NDK is said to be hard to use, though. Oct 07 05:15:36 shmoon I know, but the point was to use the normal Android API most of the time Oct 07 05:15:38 I keep hearing complaints about it. Oct 07 05:15:47 the reason why c++ lost a lot of its shine is because it ceded terrirtory to other higher level languages that were more productive, but in may ways didn't retain its place as a system level language because its hard to do FFI with Oct 07 05:16:10 Java may be more productive, and that is fast getting more important than speed Oct 07 05:16:15 unless you consider SWIG or some crap like that Oct 07 05:16:16 all I wish is great integration with NDK and JNI in intellij ! Oct 07 05:16:20 I would probably like C++ if it had started as a clean, new language. I hate how much baggage it has. Oct 07 05:16:23 generating classes and stuff Oct 07 05:16:24 CPH_DK: no , I'd need to google it Oct 07 05:16:33 debugging stuff etc. Oct 07 05:16:38 TacticalJoke I liked doing assembly, but yes it can sort of make you see opcodes Oct 07 05:16:59 TacticalJoke Going from a high level language to assembly is very alien Oct 07 05:17:00 that would be great Oct 07 05:17:08 TacticalJoke most of C++'s baggage is from c's declaration syntax, which was horrid :) Oct 07 05:17:23 well i won't say most, but a lot Oct 07 05:17:23 Java has inherited most of that Oct 07 05:17:38 there always is scala ;) Oct 07 05:17:42 You know, this is very minor, but I hate snake_casing, and C++'s library uses that all over. It makes code a complete mess when you're doing stuff_like_this and StuffLikeThis. Oct 07 05:17:59 TacticalJoke I never used that. Oct 07 05:18:21 TacticalJoke I dont even know what it is :) Oct 07 05:18:28 God, I remember using C++ with MFC. Horrible. Oct 07 05:18:32 TacticalJoke is it like the cast operators? Oct 07 05:18:38 It was actually nicer to use C and the Windows API. Oct 07 05:18:44 TacticalJoke I wrote a MFC clone once, VERY messy Oct 07 05:18:44 how do you yeah MFC = Most Fucked up Classes Oct 07 05:18:49 CPH_DK: Stuff like that, yeah. Oct 07 05:18:51 But not just that. Oct 07 05:18:53 just do inline ASM to optimize hardware interaction and rendering within C/C++ Oct 07 05:19:05 TacticalJoke Win32 api IS pure c Oct 07 05:19:08 no c00 Oct 07 05:19:09 c++ Oct 07 05:19:32 so ... emacs or vi ? Oct 07 05:19:32 TacticalJoke the basic windows api, of course there a lot of high level stuff in c++ Oct 07 05:19:40 MFC as an abstraction layer over Win32 was like putting tin foil over dog doo-doo. But the foil was full of holes. You're better off using gloves. Oct 07 05:19:46 no, the API for drawing windows for example Oct 07 05:20:15 TacticalJoke You should see my MFC clone, it was very messy, but I used it for my wind32 projects Oct 07 05:20:25 You made a clone of MFC? Oct 07 05:20:29 TacticalJoke Yes. Oct 07 05:20:37 Borland's VCL was a very nice abstraction layer over Win32. Oct 07 05:20:46 TacticalJoke A win32 Framework/Wrapper Class lib Oct 07 05:20:54 How comprehensive is it? Oct 07 05:21:18 TacticalJoke Not very, but it supports windowing (windows, buttons and so on), multithreading and so on Oct 07 05:21:37 If you had known about VCL, I'm guessing you might've saved yourself some time. :D Oct 07 05:21:49 TacticalJoke I did it for fun, to learn Oct 07 05:21:52 I see. Oct 07 05:22:01 TacticalJoke I fo weird stuff :) Oct 07 05:22:04 do Oct 07 05:22:10 Programming for Windows 10 (and Windows 8, I guess) looks a lot nicer. Oct 07 05:22:14 Especially with C#. Oct 07 05:22:17 I do, too, CPH_DK. Oct 07 05:22:24 TacticalJoke It is cool to do that :) Oct 07 05:22:26 I remember writing an HTTP server for fun. I learned so much from that. Oct 07 05:22:31 Just with basic sockets. Oct 07 05:22:38 TacticalJoke I have done loads of stuff like that Oct 07 05:22:54 TacticalJoke I have written at least 10 2d games engiens Oct 07 05:22:56 engines Oct 07 05:23:03 Reinventing the wheel is sometimes the only way to find the motivation to become an expert in a domain. Oct 07 05:23:20 TacticalJoke Yes, because YOU did not invent it, so there is a lot to learn Oct 07 05:23:27 Exactly. Oct 07 05:23:45 TacticalJoke atm I am working on pixel perfect sprite collision detection Oct 07 05:23:45 It's humanity reinventing the wheel, but it's this person inventing the wheel for the first time. Oct 07 05:24:04 That sounds pretty cool. Oct 07 05:24:09 I've not done much graphics stuff, personally. Oct 07 05:24:24 Most of my stuff has been network-related. Oct 07 05:24:34 TacticalJoke i use a bit mask so that I can compare 16 pixel at once with an and op Oct 07 05:24:37 Stuff like IRC clients, servers, etc. Oct 07 05:25:02 TacticalJoke I hardly ever get my projects finished. Oct 07 05:25:09 Yeah, it can be hard. Oct 07 05:25:15 Releasing can be a great motivator. Oct 07 05:25:17 I loose interest and move on Oct 07 05:25:26 It's easy to be a perfectionist and defer releasing forever. Oct 07 05:25:29 TacticalJoke One of my old project is a drum synthesizer Oct 07 05:25:40 lol Oct 07 05:25:51 digital synthesis is not that easy Oct 07 05:25:56 CPH_DK: you should make Asteroids again with that collision detection, or Moon Lander/Gravity Oct 07 05:26:01 I can kinda recognise that. Inventing everything and then getting bored, and inventing something else. Oct 07 05:26:18 TacticalJoke I just need to master digital filters. Oct 07 05:26:24 to make the drumsynth Oct 07 05:26:40 TacticalJoke pixel perfect collison detection is a vast of computing power omstly Oct 07 05:26:41 mostly Oct 07 05:27:10 I can imagine. Oct 07 05:27:24 shmooz Those are good ideas, would like it if you had some ideas on how to beef up tetris? Oct 07 05:27:40 CPH_DK: I do Oct 07 05:27:48 TacticalJoke Mostly just using intersecting rectangles is good enough Oct 07 05:27:49 you reminded me 'tetris the movie' now Oct 07 05:28:04 CPH_DK: use tilting the phone to make the blocks fall into place as a feature Oct 07 05:28:33 I have to go AFK for a bit. Nice chatting with y'all. :) Oct 07 05:29:04 CPH_DK: two player tetris where people send each other the blocks they clear Oct 07 05:29:42 shmoon That could work Oct 07 05:30:08 shmoon or sudden up down motion = fast down Oct 07 05:30:21 to dunk it ? Oct 07 05:30:26 shmooz Two play is a good idea Oct 07 05:30:40 shmooz something like that, yes Oct 07 05:30:42 you tilt it left and right to move the block, and shake it up and down to dunk it Oct 07 05:30:55 yes Oct 07 05:30:56 good Oct 07 05:31:42 and then tilt it around x axis to rotate, forward tilt for rotate in on direction and so on Oct 07 05:32:11 if it doesn't make it get complicated Oct 07 05:32:12 shmooz You mean tilt around z? Oct 07 05:32:21 to move Oct 07 05:33:21 yes maybe upto 45 degree going from portrait towards landscape rotate motion Oct 07 05:34:18 as long as you're tilting right, the block moves right Oct 07 05:34:40 Yes, you said that :) But I have to code it :D Oct 07 05:35:04 I wonder how hard the accellerometers are to program Oct 07 05:38:04 but if you're a pro at tetris it would be annoying to use Oct 07 05:38:37 to have the block go past the slot because your tilt lasted too long Oct 07 05:40:42 tapping buttons gets you there more accurately Oct 07 05:41:28 or just dragging the block with your thumb to the position Oct 07 05:41:51 maybe you want to use tilt to rotate and use thumb to drag the block to position Oct 07 05:50:33 Hi all, I'd like to display results from an AutoCompleteTextView detached from the triggering field, say in another layout or similar? Oct 07 05:51:06 I am getting NULLPointer inside super.getView(position, convertView, parent) - any ideas? Oct 07 05:51:11 this is in a custom ArrayAdaptor Oct 07 05:53:45 sylon do you know what a null pointer is ? Oct 07 05:54:56 StingRay_: yes but i dont understand ArrayAdaptor and what its doing inside that's causing it Oct 07 05:55:09 what is null ? Oct 07 05:56:50 StingRay_: unsure, its something inside the base class method Oct 07 05:56:51 convertview is null Oct 07 05:56:53 sylon Oct 07 05:57:02 convertView isn't null - but maybe i am passing wrong type in? Oct 07 05:57:17 how do you know it's not null? Oct 07 05:57:26 sylon: You ALWAYS do a null check on converView before you inflate the layout, are you doing this? Oct 07 05:57:27 it's null. Oct 07 05:57:33 cause i have a breakpoint where it crashes inside the catch Oct 07 05:57:37 and its not null Oct 07 05:58:04 you shouldn't have a try/catch in there in the first place Oct 07 05:58:27 sylon pastebin your code Oct 07 05:58:31 i only added it to debug it Oct 07 05:58:33 and see what's null Oct 07 05:58:56 sylon tells you the line though right ? Oct 07 05:59:07 yea the line is view = super.getView(position, convertView, parent); Oct 07 05:59:13 that's the first line of my getView Oct 07 05:59:32 sylon better way to debug is to just put a breakpoint on the line that's crashing Oct 07 05:59:34 .... Oct 07 05:59:37 * Darklust headdesks Oct 07 05:59:39 convertview is null ya dummie Oct 07 05:59:41 as we're telling you Oct 07 05:59:55 all you Darklust Oct 07 05:59:58 * JacobTabak flees Oct 07 06:00:09 umm ok Oct 07 06:00:14 http://i.imgur.com/Ctr6kIX.png Oct 07 06:00:19 not according to this Oct 07 06:00:23 Welp, why are you assigning super.getView()? Oct 07 06:00:44 Check if convertView == null and inflate your layout into your view Oct 07 06:00:58 If convertView isn't null, use convertView cast as your view Oct 07 06:01:41 what is your base class Oct 07 06:01:59 ArrayAdapter Oct 07 06:02:10 whats the stack trace? Oct 07 06:04:23 I am getting a Connection refused error when using HttpClient on my moto 360 to try and connect to a HTTP server I have running on my LAN Oct 07 06:04:33 poutine you can't use httpclient Oct 07 06:04:35 is there any special consideration I need to know about doing these types of requests? Oct 07 06:04:35 from a watch Oct 07 06:04:54 http://developer.android.com/training/wearables/data-layer/index.html Oct 07 06:05:34 you need to send a message to the phone and have the phone make the network request Oct 07 06:06:04 that's a pain the butt, I thought this was my last step :( Oct 07 06:07:25 I'm not much of a Unixy person. Can anyone guess what the following file permissions mean? Oct 07 06:07:26 FileUtils.S_IRUSR|FileUtils.S_IWUSR|FileUtils.S_IRGRP|FileUtils.S_IWGRP Oct 07 06:07:39 User read/write and group read/write, I guess. Oct 07 06:08:30 is there an input stream decorator that allows you to rewind the bytes you've read or something? Oct 07 06:08:47 so you can re-read them - obviously they'd be in memory Oct 07 06:12:18 i guess something like TeeInputStream Oct 07 06:13:21 I don't understand why ContextImpl.openFileOutput is setting file permissions. Oct 07 06:18:51 Some of Android's code is just bizarre. Oct 07 06:32:52 If I open a FileOutputStream manually, I get a file in my app's directory with permissions -rw-------. If I use ContextImpl.openFileOutput, I get -rw-rw----. Does this matter? Oct 07 06:32:57 Again, I'm not a Unix-head. Oct 07 06:40:31 TacticalJoke you should not think about ContextImpl, just Context Oct 07 06:44:23 TacticalJoke have you observed how the permissions change when you change the mode parameter to openFileOutput? Oct 07 06:44:35 I've looked at the code (but not tried it). Oct 07 06:44:41 did you read the documentation Oct 07 06:44:41 I think I know what's happening: that code is just generic. Oct 07 06:44:49 mode Operating mode. Use 0 or MODE_PRIVATE for the default operation, MODE_APPEND to append to an existing file, MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE to control permissions. Oct 07 06:44:58 It needs to set file permission in case people are asking for MODE_WORLD_READABLE or whatever. Oct 07 06:44:59 Yeah. Oct 07 06:45:02 permissions* Oct 07 06:46:27 It seems that "new FileOutputStream(context.getFilesDir(), whatever)" is basically the same as "context.openFileOutput(whatever, Context.MODE_PRIVATE)". Oct 07 06:46:47 hence the ' Use 0 or MODE_PRIVATE for the default operation ' Oct 07 06:47:07 Under the hood, the latter sets -rw-rw---- (whereas the former sets -rw------), but that doesn't seem to matter. Oct 07 06:47:15 Right. lol Oct 07 06:47:28 TacticalJoke the best mode to test my bitmask collision detection would be to draw the bitmask on top of the sprites? Oct 07 06:47:43 way Oct 07 06:47:44 I have no idea. lol Oct 07 06:47:47 ok:) Oct 07 06:47:54 I am gonna do that :) Oct 07 06:48:15 TacticalJoke What are you coding atm? Oct 07 06:48:24 A Reddit client and a lame thing. Oct 07 06:48:29 The lame thing is so boring. Oct 07 06:48:34 It's like my Android "Hello, world!". Oct 07 06:48:35 TacticalJoke are you using retrofit? Oct 07 06:48:50 Nah. Oct 07 06:48:56 ah Oct 07 06:49:01 Would that be useful for a Reddit client? Oct 07 06:49:02 retrofit is pure win Oct 07 06:49:04 was going to suggest you check this out Oct 07 06:49:04 https://github.com/jacobtabak/droidcon Oct 07 06:49:14 i put together a sample reddit client for my droidcon presentation Oct 07 06:49:25 I'm in your Githubz now. ;o Oct 07 06:49:26 Oh, cool. Oct 07 06:49:45 JacobTabak Shift right is *2 or is it left?:) Oct 07 06:49:47 i need a gif in there Oct 07 06:49:56 CPH_DK you are on a different planet than me Oct 07 06:50:06 JacobTabak bvit shits Oct 07 06:50:07 bit Oct 07 06:50:11 shifts Oct 07 06:50:15 CPH_DK my job is to write as little code as possible and rely on libraries to do this stuff for me Oct 07 06:50:22 what, my if (!prefixUrl.equals("") && suffixUrl.equals("")) isnt working. why does this happens Oct 07 06:50:23 JacobTabak Ok, thanks Oct 07 06:50:36 I love writing code. Oct 07 06:50:37 oh Oct 07 06:50:41 lots of it Oct 07 06:50:45 i said noffin Oct 07 06:50:50 cliffreich use TextUtils.isEmpty() Oct 07 06:50:56 it checks for null and empty string Oct 07 06:51:11 JacobTabak Can you check for undefined in java? Oct 07 06:51:15 "isEmpty" is so much nicer. Oct 07 06:51:28 CPH_DK, people like you scare me Oct 07 06:51:29 I used to be a fan of str.length == 0, though. Oct 07 06:51:30 u trollin CPH_DK ? Oct 07 06:51:35 kevel1 Sorry? Oct 07 06:51:42 JacobTabak No, really, new to java Oct 07 06:51:47 c++ guy Oct 07 06:51:48 Nothing worse than going through a project of someone's that has written a billion lines of code Oct 07 06:52:04 which have libraries already written to solve the problems Oct 07 06:52:05 kevel1 I hate reading other people's code Oct 07 06:52:11 CPH_DK java is very verbose, you need to do stuff like myString != null && myString.size() > 0 Oct 07 06:52:20 so theres convenience methods like TextUtils.isEmpty() Oct 07 06:52:26 kevel1 But I very much enjoiy writing code Oct 07 06:52:28 What about "!myString.isEmpty()". Oct 07 06:52:35 CPH_DK, u can still write code Oct 07 06:52:35 JacobTabak But what about primitive types? Oct 07 06:52:37 TacticalJoke you can't call methods on null references Oct 07 06:52:46 kevel1? Oct 07 06:52:48 CPH_DK, its good practice to use libraries though Oct 07 06:52:49 primitive types cant be null, they have default values Oct 07 06:52:56 Yeah, but that'd short-circuit. :D Oct 07 06:53:07 kevel1 I use libs for stuff that is too complicated to do from scratch Oct 07 06:53:09 they all default to 0 basically CPH_DK Oct 07 06:53:21 CPH_DK, in a working environment its not about how much code u can write, its about how quickly you can get something out with minimal bugs Oct 07 06:53:30 JacobTabak Ok, so ints etc are initialized to 0 Oct 07 06:53:35 yes Oct 07 06:53:35 Hello everybody, i would like to know if someone have a snippet for sendmms ? Oct 07 06:53:43 to send mms* Oct 07 06:53:51 kevel1 I get that, I am not a pro, I code for ufun. Oct 07 06:54:05 JacobTabak That is neat, c++ is not. Oct 07 06:54:16 yep you get random garbage memory Oct 07 06:54:30 JacobTabak But doesn't that potentially waste execution time, having to fill 0 into memory locations?` Oct 07 06:54:38 CPH_DK high level language Oct 07 06:54:52 JacobTabak But does it not? Oct 07 06:54:56 I don't think it wastes much time. Oct 07 06:55:02 Not much maybe Oct 07 06:55:03 CPH_DK the answer is "i don't care" Oct 07 06:55:07 i'm not a game dev :) Oct 07 06:55:08 JacobTabak:) Oct 07 06:55:11 I think a lot of stuff is zeroed-out at once. Oct 07 06:55:29 CPH_DK it's probably not done during execution Oct 07 06:55:35 JacobTabak I cant really call myself a game dev, I have written the same couple of game many times :) Oct 07 06:55:44 JacobTabak ping Oct 07 06:55:50 hello sanjeevsharmaeng Oct 07 06:55:51 JacobTabak Ah, like an initialization table Oct 07 06:55:59 CPH_DK: Especially today (with our faster CPUs and stuff), performance bottlenecks are often IO/network stuff. Oct 07 06:56:03 CPH_DK i don't know, i'm an idiot when it comes to these things Oct 07 06:56:13 Stuff like zeroing-out memory is so tiny. Oct 07 06:56:19 TacticalJoke Yes, but I still like to write good gode, it just looks better Oct 07 06:56:31 I think good code is correct, readable code. Oct 07 06:56:40 Written for dumb humans (not smart computers) to understand. Oct 07 06:56:43 TacticalJoke Yes, and initialization can be done at the start of runtime Oct 07 06:56:47 i agree with the sociopath Oct 07 06:56:56 I actually have high empathy, I think. Oct 07 06:57:04 so you're really just a masochist Oct 07 06:57:11 an empathetic masochist Oct 07 06:57:21 Why do you say that? Oct 07 06:57:27 Well, I do weird stuff I really dont need to do just because it is cooloer, like using matrix transformations for rotate in tettris Oct 07 06:57:31 JacobTabak Did you remember I seeked some help on RotateAPI using needle last week and you provided some pointer Oct 07 06:57:49 yes i remember Oct 07 06:57:49 JacobTabak: Did I seem weird the other night? Oct 07 06:57:50 JacobTabak here is the image http://imgur.com/share/i/Mkg5viU Oct 07 06:57:58 I just type a lot, I guess. Oct 07 06:58:02 Sorry if I was annoying. Oct 07 06:58:06 TacticalJoke I know that :) Oct 07 06:58:10 i do too Oct 07 06:58:12 lol Oct 07 06:58:20 You're like a more-verbose me, CPH_DK. Oct 07 06:58:22 TacticalJoke You were not, (someone else is):D Oct 07 06:58:29 CPH_DK --verbosity=100 Oct 07 06:58:35 TacticalJoke Matrices are cool, Oct 07 06:58:38 so I use them Oct 07 06:59:17 JacobTabak: I'm really curious of why you felt I was a sociopath. Oct 07 06:59:23 TacticalJoke And it was not a waste without the matrix stuff I would have to have made 3 versions of each piece Oct 07 06:59:24 CPH_DK, initializing int to 0 is so minimal that it's not worth worrying about. Just defined them where and when you need them and don't go crazy Oct 07 06:59:30 should apply with most variables Oct 07 06:59:47 kevel1 Yes, and it can be done before the app runs. Oct 07 06:59:47 if i could theorize i'd imagine the zeroing gets done during GC Oct 07 07:00:16 JacobTabak For RPM gauge I have caluclated the formula and easily startdegree and end degree and it works and formula use by me is startDegree + input * (endDegree-endInput)/(maxInput-minInput) Oct 07 07:00:17 which image types support rotation via metadata? jpeg, tiff? what else Oct 07 07:00:18 JacobTabak Why not at T = 0 at runtime? Oct 07 07:00:34 sanjeevsharmaeng sounds correct, good work Oct 07 07:00:43 JacobTabak I know a good rotation algorithm that works for 2-3 dimensions Oct 07 07:00:51 don't talk to me about rotation algorithms Oct 07 07:00:55 this is sanjeevsharmaeng's project Oct 07 07:00:56 Ok. Oct 07 07:01:01 i just helped him w/ it before Oct 07 07:01:04 I feel weird typing "File directory". Oct 07 07:01:07 Though it's semantically correct. Oct 07 07:01:11 JacobTabak ok, you are into 3d graphics? Oct 07 07:01:12 i'm sure he'd like to talk about it with you though :) Oct 07 07:01:15 CPH_DK no Oct 07 07:01:16 CPH_DK, u don't need to defined T = 0 Oct 07 07:01:30 CPH_DK, defining int t; is enough Oct 07 07:01:33 kevel1 Just an idea Oct 07 07:01:37 JacobTabak Thanks and but I couldn't get correct startdegree for PSI(tyre) and Engine Temp gauge and can you look into it Oct 07 07:01:38 int is a primitive and will always have a value Oct 07 07:01:43 ke Oct 07 07:01:52 kevel1 No, I meant at TIME = 0. Oct 07 07:01:57 i can't right now but there are a lot of ppl here Oct 07 07:02:00 who can help Oct 07 07:02:08 with what? Oct 07 07:02:34 rotation? Oct 07 07:03:31 JacobTabak How did you caluclated the startdegree for KM/H gauge which was -90 degree Oct 07 07:03:47 i just looked at it Oct 07 07:03:53 and could tell it was 1/4th of the circle Oct 07 07:03:59 use a protractor Oct 07 07:04:48 JacobTabak can you little looked into http://imgur.com/share/i/Mkg5viU PSI Tyre and other gauge also Oct 07 07:05:13 no Oct 07 07:05:13 JacobTabak So there is no formula correct ? Oct 07 07:05:18 i cant help you right now Oct 07 07:05:23 im trying to do something -.- Oct 07 07:05:25 stop pinging me Oct 07 07:05:45 ok at whch time you will be free any idead Oct 07 07:05:50 idea ? Oct 07 07:06:34 TacticalJoke What were you doing atm ? Oct 07 07:06:41 someone help this guy come on Oct 07 07:06:58 Making my code a work of art. Oct 07 07:07:03 I love when my code is so neat and simple. Oct 07 07:07:09 Every class does exactly one "thing". Oct 07 07:07:11 Every method, too. Oct 07 07:07:14 Code is alwyys simple....:) Oct 07 07:07:26 CPH_DK: You haven't seen the stuff I've seen. *blank stare* Oct 07 07:07:30 I dislike having to write protected for each mameber Oct 07 07:07:39 Why are you using 'protected'? Oct 07 07:07:40 TacticalJoke I know, have seen weird stuff too Oct 07 07:07:44 Subclassing is 9'0s. Oct 07 07:07:46 '90s* Oct 07 07:08:01 TacticalJoke Encapsulation Oct 07 07:08:49 I mean "Why not 'private'?". Oct 07 07:09:01 I shudder every time I type "protected". Oct 07 07:09:12 It often means I'm using inheritance where I should be using composition. Oct 07 07:09:31 TacticalJoke In c++ if I use private I cant access that member from other classes. Oct 07 07:09:48 Right. You're doing inheritance. Oct 07 07:09:52 Was just quizzing your brain about that. Oct 07 07:09:53 A lot Oct 07 07:10:11 I use polymorphism a lot, maybe too much Oct 07 07:11:56 Hey everyone! Oct 07 07:12:12 Has anyone had an issue with a shared library not loading because it's referencing the rand() function? Oct 07 07:12:13 CPH_DK: http://stackoverflow.com/questions/49002/prefer-composition-over-inheritance Oct 07 07:12:23 (even though it's marked static __inline__ :/ ) Oct 07 07:12:45 TacticalJoke :) I dont even know what that is :) Oct 07 07:13:08 TacticalJoke Composition Oct 07 07:13:20 Inheritance is "public void Foo extends Bar" and composition is "public void Foo { private Bar bar;". Oct 07 07:13:37 Subtyping versus ownership. Oct 07 07:13:50 anyone have the issue with rand(), or static inline functions in general? Oct 07 07:13:54 The latter is often way more flexible. Oct 07 07:13:56 And simple. Oct 07 07:14:16 TacticalJoke Is it done with template (generic code)? Oct 07 07:15:04 Nope. It's done with "private Bar bar;". Oct 07 07:15:34 TacticalJoke I have to look into that. Oct 07 07:17:58 TacticalJoke I keep getting these crashes with no debug info, is there a way to enable extended debug info or something? Oct 07 07:20:43 You're getting uncaught exceptions? Oct 07 07:20:49 You should be able to see stuff in Logcat. Oct 07 07:23:05 TacticalJoke No, it just trows me off, not exceptions Oct 07 07:23:07 no Oct 07 07:29:52 hi guys, can i use the drag and drop api with the viewpager? Oct 07 07:30:25 can't seem to get it to start the drag via setOnLongClickListener Oct 07 07:36:36 asperon I om only doing graphics, not GUI, so I cant help, anything graphics related? Oct 07 07:56:20 CPH_DK: What does Logcat show? Oct 07 07:57:37 I cant find it. Oct 07 07:57:39 logcat Oct 07 07:57:47 I have an event log Oct 07 07:58:56 http://www.jetbrains.com/idea/webhelp/debugging-with-logcat.html Oct 07 07:59:01 I found it Oct 07 08:00:33 TacticalJoke Thanks, now I get exceptions :) Oct 07 08:01:13 K. :) Oct 07 08:01:15 is there a way to force focus away from a component? Oct 07 08:01:32 in swing you have transferFocus() where you don't need to be aware of what other components are on the view Oct 07 08:03:56 parent? Oct 07 08:04:08 getOarent? fofus on that? Oct 07 08:04:09 if one Oct 07 08:04:34 asfdd: getCurrentFocus().clearFocus(); Oct 07 08:05:18 http://developer.android.com/reference/android/view/View.html#clearFocus() Oct 07 08:07:47 Do you guys use static imports much? Oct 07 08:07:50 To improve readability Oct 07 08:07:51 . Oct 07 08:08:08 TacticalJoke New to javs say: What?:) Oct 07 08:08:11 java Oct 07 08:08:15 like #include in C++ Oct 07 08:08:16 ? Oct 07 08:08:41 my issue is i have an EditText, no context what it is added to (ok i can call getParent), i check isFocused() if it is it should loose it Oct 07 08:08:59 hmm i'll try clear focus =) Oct 07 08:09:03 can't belive i missed that one Oct 07 08:09:16 Let's say that you want to use Math.round. You can say "Math.round(whatever);" or you can say "static import Math.round;" and then just "round(whatever);". Oct 07 08:09:19 Maybe that's not the best example. Oct 07 08:09:33 I use a surfaceview with no parent, works fine Oct 07 08:09:49 static import java.lang.Math.round; Oct 07 08:09:50 Rather. Oct 07 08:09:50 i never use static imports Oct 07 08:10:03 static import with staticly used libraries like mockito etc to cut down on the verbosity Oct 07 08:10:14 asfdd: Even for JUnit stuff (if you use it)? Oct 07 08:10:14 TacticalJoke To make classes "local"? Oct 07 08:10:33 dont think ive used static imports anywhere else than testing Oct 07 08:10:33 that Eclipse + SDK thing has worked splendidly Oct 07 08:10:34 CPH_DK: Just to introduce stuff into the namespace to reduce verbosity. Oct 07 08:10:37 you should see Eclipse Luna Oct 07 08:10:39 epic shit Oct 07 08:10:43 Sicp: Told you so. :p Oct 07 08:10:52 yea saw your name thought I'd mention it Oct 07 08:11:00 Haha. Glad it's working. Oct 07 08:11:08 i don't use junit much, when i use it i just do whatever the ide does default Oct 07 08:11:14 TacticalJoke Yes, that could be useful, but now I dont feel like I use it, and I like my namespace being logical Oct 07 08:11:15 Android Studio will be better, one day. (Perhaps today; that's up for debate.) Oct 07 08:11:18 pro stuff Oct 07 08:11:19 i have never used junit for android though so i don't know if that is something special Oct 07 08:11:24 TacticalJoke I write relatively small classes Oct 07 08:11:45 Same here, CPH_DK. Oct 07 08:12:26 TacticalJoke I am getting a lot of exceptions, and I dont think that I have caused them. Oct 07 08:13:17 CPH_DK: Okay, in the room is easier. Oct 07 08:15:13 CPH_DK: This is the key part: java.lang.IllegalArgumentException: n <= 0: -1 Oct 07 08:15:39 I know, but the call is to MyActiviy OnCreate Oct 07 08:15:46 I am not calling anything with -1 Oct 07 08:15:50 Where is the IEA coming from? Oct 07 08:16:18 IAE* Oct 07 08:16:28 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) Oct 07 08:16:28 at dalvik.system.NativeStart.main(Native Method) Oct 07 08:16:28 Caused by: java.lang.IllegalArgumentException: n <= 0: -1 Oct 07 08:16:41 it is the mainthread Oct 07 08:16:50 I am not writing stuff to that Oct 07 08:16:57 Can you pastebin the exception stack trace? Oct 07 08:17:04 That Zygote stuff is irrelevant. Oct 07 08:17:15 If you could pastebin the whole thing. Oct 07 08:17:40 The whole what? Oct 07 08:17:50 I am not sure where stack trace is....2 sec. Oct 07 08:18:26 It might show in red; not sure. Oct 07 08:19:16 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081) Oct 07 08:19:17 at dalvik.system.NativeStart.main(Native Method) Oct 07 08:19:17 Caused by: java.lang.IllegalArgumentException: n <= 0: -1 Oct 07 08:19:23 That is what I get. Oct 07 08:19:27 So nice guess ;) Oct 07 08:20:13 There has to be more. Oct 07 08:20:20 I am gonna restart everything. The error came without me doing anything Oct 07 08:20:21 There should be a trace of the methods. Oct 07 08:20:28 I have started it twice.... Oct 07 08:20:32 I will look at it Oct 07 08:20:37 Can you show a screenshot? lol Oct 07 08:20:44 With logcat as big as possible. Oct 07 08:22:47 Someone knows something about Dagger (dependency injection framework)? Oct 07 08:26:39 Click66, JakeWharton does, he wrote it Oct 07 08:31:58 TacticalJoke I have alot of debugging stuff for you now :) Oct 07 08:32:14 TacticalJoke BUT most of it has nothing to do with my program, not my code anyway Oct 07 08:32:17 Something has happened Oct 07 08:32:43 TacticalJoke http://pastebin.com/WXgk4HRv Oct 07 08:38:11 Piece.java:48 Oct 07 08:38:21 Random.nextInt Oct 07 08:38:27 n <= 0 Oct 07 08:43:47 TacticalJoke But I haven't changed that code for a very long time...I am gonna check tho Oct 07 08:44:14 You are passing a negative integer to that method. Oct 07 08:44:30 IllegalArgumentExceptions are programming mistakes. Oct 07 08:50:08 How about that IAE in the thread class? Oct 07 08:51:20 TacticalJoke Sorry, there is not passed -1 to nextInt Oct 07 08:51:27 It is only called with a constant-1 Oct 07 08:51:32 ie 32-1 Oct 07 08:51:53 I can correct it to nextInt(31) and see if the exception goes away Oct 07 08:53:27 I'll bet money that this is a bug in your code. Oct 07 08:53:35 $50. Oct 07 08:53:53 Or whichever code is calling Random.nextInt(int). Oct 07 08:56:23 CPH_DK: Do I win or lose? Oct 07 08:57:05 TacticalJoke Loose, ssory :) Oct 07 08:57:12 TacticalJoke Look at this: Activity {com.example.SurfaceViewTest/com.example.SurfaceViewTest.MyActivity} did not call through to super.onCreate() Oct 07 08:57:20 TacticalJoke That is odd, right? Oct 07 08:57:46 TacticalJoke and it DOES call through to super.onCreate()) Oct 07 08:58:04 TacticalJoke Doesn't it sound like a non-user error by now? Oct 07 08:59:32 can you trigger zxing from chrome/browser in general? Oct 07 08:59:46 to e.g. scan an ean code for searching purposes Oct 07 09:00:04 The thing is that this issue just popped up. No code was changed Oct 07 09:00:14 CPH_DK: I've lost the thing now (I had to close my browser). Oct 07 09:00:20 Is it not calling because of the exception? Oct 07 09:00:42 CPH_DK: There has to be a bug in your code. Oct 07 09:00:54 Are you certain that you're not calling Random.nextInt with -1? Oct 07 09:02:22 I need to sleep. Oct 07 09:02:24 Have fun. Oct 07 09:03:16 Ok :) Oct 07 09:07:27 ravilov, i miss you and your flaming Oct 07 09:07:30 where are u? Oct 07 09:33:24 haha SimonVt you were right again, object animator was the way to do what i was trying to do! Oct 07 09:43:22 all these new animation classes are great and al Oct 07 09:43:42 but I hardly ever get to use them because they're too new Oct 07 09:55:47 My pending intent PendingIntent.getActivity(mActivity, 0, openIntent, 0); does not relaunch the activity when it's backgrounded Oct 07 09:55:49 shouldn't it do that Oct 07 09:58:05 Using Facebook API for Login can I have multiple Facebook accounts on the same device? Oct 07 09:58:18 I get "only one facebook account is supported" Toast message when I try to add another one in the system Oct 07 10:05:57 Hi everyone, I'd like to root my device but without using other firmware, I'd like to root the stock firmware of my Android, is that possible? Oct 07 10:07:37 Megaf what device do you have? Oct 07 10:09:29 I have to devices that I'd like to root a XT315 and a XT890, both Motorolas Oct 07 10:09:37 s/to/two Oct 07 10:09:39 #android-root, kids ... Oct 07 10:10:15 I'm asking here because I supose I will have to use debug mode or somthing like that, and maybe the SDK Oct 07 10:12:09 Megaf try googling around a little bit Oct 07 10:12:32 theres almost no information about the XT315 on the internet Oct 07 10:12:33 also bankai_au is right, join #android-root the topic fits better there Oct 07 10:12:42 ok.. Oct 07 10:28:24 Does anyone know if I can use Twitter4j with multiple Twitter accounts? Oct 07 10:28:50 I want to let the user change his current account within my app which is a Twitter Login to another Twitter account Oct 07 10:29:15 you control all the authentication stuff, so yes Oct 07 10:35:24 Hello, I have activity with loader. Every time activity restarts (minimizing app), my loader restarts as well. I don't call for it to restart. The same happens with every other loader in my app. Oct 07 10:45:52 what kind of loader? Oct 07 10:52:09 Mavrik: That's what I thought Oct 07 11:06:22 Hi all. I need to catch soft keyboard visibility changements. Any suggestions for this? Oct 07 11:13:38 Can I authenticate (single sign on) a user in my app via the Twitter account stored in the system's AccountManager ? If the user has already added a Twitter account to the system or logged in the Twitter app I want to request an OAuth token from that account without the user being prompted for password, only for authorization, is this possible? i.e. to authorize my app (give permission to my app) to access something from the user's Oct 07 11:13:38 account. Oct 07 11:14:06 This claims it cannot be done: https://stackoverflow.com/questions/19027623/android-twitter4j-authentication-via-installed-twitter-app-not-browser/19832978#19832978 any updates to it? Oct 07 11:16:52 So I guess the only option is to ask the user for username and password again Oct 07 11:17:06 To authenticate and authorize my app Oct 07 11:18:05 instead of using the system Twitter account(s) Oct 07 11:23:46 Hi, I'm trying to understand the android 4.1- Webview JavaScript Bridge bug. All the examples assume that a method called getClass() is available for their reflection attack, now I don't get why it isn't possible to overwrite that function, maybe not in the Java Environment (although I don't get why there isn't an empty object without all those tassles) but definitely in the javascript environment. Now what happens if I overwri Oct 07 11:25:01 that's punishment for using js Oct 07 11:25:41 Actually that's punishment for using java, cause JS is just exposing the bullshit... Oct 07 11:26:18 On the other hand JS may hold the tools to plug the hole. Oct 07 11:27:33 Justus_, I think the methods need to be annotated with @android.webkit.JavascriptInterface to be abused like that Oct 07 11:28:08 Guys I just begun with android dev. Is it possible to create google maps inside a Drawer Navigation Activity ? Oct 07 11:28:23 VnM: In Android 4.2+ you are correct, in 4.1 and below the function call to addJavaScriptInterface (http://developer.android.com/reference/android/webkit/WebView.html#addJavascriptInterface%28java.lang.Object,%20java.lang.String%29) exposes everything, including inherited functions Oct 07 11:28:58 VnM: Which leads to getClass() exposing static Class and that exposing forName() thus allowing js to get references to everything Oct 07 11:32:14 Justus_: that was a joke, dont take that seriously ;) Oct 07 11:32:42 can you run java code with it ? Oct 07 11:33:05 Hi, what is the best way to test the geofence api? Does mock lcoations work? Oct 07 11:34:18 gordon_: My irony detector is a bit dented currently, so sorry ;) Oct 07 11:34:42 gordon_: Yes, you can, see https://labs.mwrinfosecurity.com/blog/2014/06/12/putting-javascript-bridges-into-android-context/ for examples Oct 07 11:38:16 interesting Oct 07 11:38:24 dont know if I have some 4.1 around Oct 07 11:41:06 Guys is there any example where someones draws a google maps inside a Drawer Navigiation activity ? Oct 07 11:43:26 whats a good start for layouting? I look for creating a two column landscape layout especially Oct 07 11:49:27 DarsVaeda: meaning ? Oct 07 11:49:33 what do you want to do ? Oct 07 11:49:41 just a design Oct 07 11:49:42 ? Oct 07 11:49:54 no like in a real app :) Oct 07 11:49:56 damn sorry for enters, I should stop or someone gonna be mad Oct 07 11:50:19 I don't get all this relative, table and so on layout things Oct 07 11:50:23 well, android studio's designer is pretty good Oct 07 11:50:34 ah, so you want tutorial ;) Oct 07 11:50:42 I use ADT on eclipse Oct 07 11:50:49 not being that helpful Oct 07 11:51:00 editor *is* your problem ;) Oct 07 11:51:08 and why do you use eclipse ? Oct 07 11:51:25 studio is still beta or so Oct 07 11:51:29 https://developer.android.com/training/basics/firstapp/building-ui.html Oct 07 11:51:36 Because it is still the recommended IDE on the official dev pages Oct 07 11:51:52 * DarsVaeda nods Oct 07 11:52:01 and this is cool: https://developer.android.com/guide/topics/ui/declaring-layout.html Oct 07 11:52:25 I read these still don't get it ^^ Oct 07 11:52:45 I register a broadcast receiver with my activity, when the activity gets backgrounded it still receives broadcasts great. Problem, when the activity gets destroyed in the background I get broadcast receiver leaked Oct 07 11:52:54 how can I deal with this situation? Oct 07 11:53:34 all tutorials I read so far are more a programmers view, although I'm a programmer now I need to design and I fail already at two columns next to each other -.- Oct 07 11:54:03 Hello, I have activity with loader. Every time activity restarts (minimizing app), my loader restarts as well. I don't call for it to restart. The same happens with every other loader in my app. Oct 07 11:54:28 right, I need to put the broadcast receiver into the AndroidManifest Oct 07 11:57:29 DarsVaeda, um Oct 07 11:57:33 Well there's several ways to accomplish what you want DarsVaeda, there is a lot of information out there on layouts for Android, for starters if you want to force your app into landscape mode add android:screenOrientation="landscape" within your activity tags in your AndroidManifest file Oct 07 11:57:41 DarsVaeda, LinearLayout with vertical split?! Oct 07 11:58:13 And vegetablesalad19 where do you init your loaders? Oct 07 11:58:55 hello Oct 07 11:59:12 Mavrik, probably? Oct 07 12:00:50 while updating an app, I got a request for additional permissions (including checking phone calls and runnings apps), and since the app doesn't really need to have access to that I contacted the developer and they said they are now using a third party library to collect usage stats about the app Oct 07 12:02:21 they also said that they don't check for phone calls and running apps, so I was wondering how permissions are actually determined: is it enough to have a specific API call somewhere in the code -- even if it's never actually executed -- to have the app requesting additional permissions? Oct 07 12:05:23 Taggnostr, the permissions are manually specified, an app could have all possible permissions required and not actually use any of them Oct 07 12:06:15 VnM, but I guess there is something that ensures that if an app uses some permission, then it will show up in the list of require permissions, right? Oct 07 12:07:10 Well if an app needs a permission it needs to specify it otherwise the code won't work, so yes, it will show up in the list Oct 07 12:08:41 what I'm trying to figure out is: if they say they are not checking phone calls and running apps, could it be that they are telling the truth but there is e.g. there is an unused API call that requires the additional permission even if it's never executed? Oct 07 12:09:03 or can they just remove the permission request in that case, and nothing will happen? Oct 07 12:10:20 Mavrik, horizontal split did the job Oct 07 12:10:30 now I wonder where I would have found this information Oct 07 12:11:27 I mean in the docu obviously but I would never have seen the relation between the code and the actual output Oct 07 12:14:18 Well they could remove it if it isn't used, but if it is somehow used it would crash the application, some permission are kind of global.. Oct 07 12:14:39 hi guys, i am trying to implement the golden grail, a listview with drag and drop sorting as well as drag and drop add/removal, can anybody point me in the right direction? Oct 07 12:16:03 VnM, so I could ask them to remove it if they are not really using it, and if it crashes it means that either they or the third-party lib is using it somewhere, right? Oct 07 12:16:43 Like the READ_PHONE_STATE permission they could just be using that to send details like your device brand/model for their statistics Oct 07 12:17:08 One simple get method to retrieve the details, but without the permission it would break Oct 07 12:18:45 Yeah you could, but I would personally not worry about it too much Oct 07 12:20:01 They'll most likely have a good reason they have put the permission in there, is the app being developed for you and if so did you request them to add the statistics tracking? Oct 07 12:20:05 the new required permissions are "Device & app history" and "Device ID & call information" Oct 07 12:22:36 so it could be that they only care about "activity on the device" and "device id", but the permissions for those also include things like running apps, browsing history, bookmarks, active calls? Oct 07 12:22:52 That is right Oct 07 12:23:24 what is the device ID exactly? the model of the phone? Oct 07 12:24:01 or a specific id for my phone? Oct 07 12:25:20 I believe in this case it's specific ID, can be used to track what you like Oct 07 12:25:31 Here's a post with a decent answer about permissions http://stackoverflow.com/questions/24807249/what-android-permission-causes-device-app-history Oct 07 12:26:06 And another one going a little into detail about specific permissions and the why and what http://www.androidcentral.com/look-application-permissions Oct 07 12:26:27 thanks! Oct 07 12:43:29 Hi. Is it possible to detect soft keyboard show / hide with android:windowSoftInputMode="adjustPan" Oct 07 12:48:36 FrancescoV, I don't think that line in the manifest has anything to do with whether you can detect the keyboard or not, that line is just to determine what happens to the layout when the keyboard does show up Oct 07 12:49:42 VnM, I know but with adjustResize, I can detect show / hide. But need to find out if it's possible with adjustPan Oct 07 12:50:08 Should be, why don't you just try, only need to change one word Oct 07 12:50:52 VnM, I know it should but it's not working with adjustPan. I'm using this to detect show / hide. https://gist.github.com/felHR85/6070f643d25f5a0b3674 Oct 07 12:53:03 Hm can't you just define an InputMethodManager and use the isAcceptingText() to see if it's up or not? Oct 07 12:54:47 I need to do some animations when it becomes visible or invisible so I need some kind of a listener or callback Oct 07 12:56:41 Is this a possible solution? Click --> open. When clicking back button, it's closed. capturing the "Done", it's also closed. Not clear but wonder if this could work Oct 07 12:57:13 FrancescoV, maybe the first in combination with the second answer on this thread will help http://stackoverflow.com/questions/2150078/how-to-check-visibility-of-software-keyboard-in-android Oct 07 12:58:45 How can I associate an instance of any class to my BroadcastReceiver, I want to deactivate something in my model Oct 07 13:08:23 VnM, all my questions about permissions have been answered now, thanks again Oct 07 13:08:40 You're welcome! Oct 07 13:08:57 Hello, I'm trying to develop a Android Wear application but I don't have a wear device, the emulator works and I can connect my phone to it with adb, but then the phone is inaccesible from Android Studio. On the other hand when it's connected to Studio adb outside Studio can't see it so I can't connect to emulator. How can I have my phone connected to the Studio and a wear emulator at the same time? Oct 07 13:10:30 I mean, I have to do "adb -d forward tcp:5601 tcp:5601" for the emulator connection but I can't use adb when Studio is using it. Oct 07 13:13:22 Nohus: you might be using two different adb installs Oct 07 13:13:57 can you use adb from the terminal in Android studio? Oct 07 13:14:10 VnM, working now and used something like this: http://stackoverflow.com/a/18992807/1723525 Oct 07 13:15:22 Thanks for your help! Oct 07 13:15:33 Ankhwatcher: It sees no devices connected, even though the Studio displays my phone and works. You may be right that the Studio is using another adb install, looking into it. Oct 07 13:24:40 Ankhwatcher: yes you can use adb from the terminal in AS. That terminal functions the same as your system terminal. Oct 07 13:25:15 So you will need adb on your path. Oct 07 13:28:37 Ankhwatcher: Well, I removed the other adb install, but it seems that Studio doesn't have one, only a library file named "adb", so how can I use the same one? Oct 07 13:30:19 Hello. Many people enjoying experimenting with the L Preview? Oct 07 13:30:55 I have a weird problem with SU. Oct 07 13:31:58 I'm using SuperSU version 2.02, and verified the file permissions Oct 07 13:32:26 Apps like root checker, and using su from shell work successfully at giving root Oct 07 13:32:56 But apps like Titanium Backup and ES File Explorer say they can't get root. How could this be? Oct 07 13:34:54 I checked the permssions on the SU command, and they're correct Oct 07 13:39:04 Anyone else having a similar problem getting SU to work on the L preview on a Nexus 5? Oct 07 13:45:47 Ankhwatcher: You were right, it now works. Thank you. Oct 07 13:47:26 Any trouble obtaining root on L preview? Oct 07 13:54:08 see topic, CyberstormFox Oct 07 13:55:15 Well, I'm not looking on how to hack root, but troubleshoot the working of the su command, working inconsistently. Oct 07 13:55:39 But, good point. I'll try that Oct 07 14:09:06 doesn't matter, this isn't the place Oct 07 14:17:52 lol.. morgan.freenode.net Oct 07 14:17:58 morning Oct 07 14:22:18 Nohus: glad to help Oct 07 14:22:30 Verifier rejected class... Oct 07 14:22:51 unable to resolve exception class SQLiteDatabaseLockedException Oct 07 14:23:11 how would I check that this method exists in API 8? Oct 07 14:23:30 aah.. API 11 Oct 07 14:23:37 by reading docks ;) Oct 07 14:23:42 -k Oct 07 14:23:50 anyone know why a flashable zip would work with one version of a recovery and not another? Oct 07 14:24:06 Akkord93: wrong channel Oct 07 14:24:44 which channel? Oct 07 14:24:45 root? Oct 07 14:24:47 yes Oct 07 14:24:50 kk Oct 07 14:38:45 is it time to abandon gingerbread support? Oct 07 14:40:53 I would if I were working on my own app, if you got a client you probably won't as it's still 11% Oct 07 14:41:49 looking at that statistics page.. wtf happened to Honeycomb? Oct 07 14:42:15 honeycomb was only on like 3 devices Oct 07 14:42:19 ooh ok Oct 07 14:42:33 Went under 0.1% Oct 07 14:42:55 well I am using a method tha tonly works in version >= 3.0 Oct 07 14:43:06 tricknology: yes abandon gingerbread. Oct 07 14:43:25 roger that Oct 07 15:00:00 hey guys, trying to convert from textview array to string array, can someone tell me why this doesn't work? http://pastebin.com/8jp1cKfZ Oct 07 15:04:00 Shiven, it’s doing exactly what you’re telling ti to Oct 07 15:04:10 need more code Oct 07 15:04:19 an error maybe? Oct 07 15:04:23 it wont run that part of the code specifically Oct 07 15:04:38 nullpointer exception Oct 07 15:04:46 on what? Oct 07 15:04:55 can you update it with a paste of the lgcat error? Oct 07 15:04:56 i'm not sure how to copy the error off eclipse Oct 07 15:05:05 click one of the rows Oct 07 15:05:22 shift, click another row farther below Oct 07 15:05:28 command+c Oct 07 15:05:32 or ctrl+c Oct 07 15:06:19 http://pastebin.com/buRQ5xef Oct 07 15:06:27 at… com.you.program.. Oct 07 15:06:32 was not aware you could copy and paste from there lol Oct 07 15:06:46 com.tristramchapman.major_project.MainActivity.processReset(MainActivity.java:328) Oct 07 15:07:00 neither was I at one time lol Oct 07 15:07:10 line 328 Oct 07 15:07:15 thats this line: Voltage[i] = name[i].getText().toString(); Oct 07 15:07:21 one of those is null Oct 07 15:07:25 voltage or name Oct 07 15:07:31 and probably the others Oct 07 15:07:43 thats.... irritating Oct 07 15:07:47 it works in my test project, but not in my main Oct 07 15:07:54 well.. Oct 07 15:08:13 where are you initializing voltage? Oct 07 15:08:33 String[] Voltage = new String[numElements] Oct 07 15:08:38 you might be missign that Oct 07 15:09:00 and one for current and power as well Oct 07 15:09:18 hm Oct 07 15:09:34 i definately don't have that line Oct 07 15:09:41 which leads me to conclude you're probably spot on haha Oct 07 15:09:44 I can’t tell for sure w/o more code btu that’s ONE source for NPE Oct 07 15:10:01 yeah the problem is that array is not initialized Oct 07 15:10:15 so you try at add to it and it’s liek “what array”? Oct 07 15:10:30 the pointer to that array is null because you didn’t initialize it Oct 07 15:10:40 keep in mind that you can’t jsut grow arrays either Oct 07 15:11:01 if you init with 4 elements and try to put 5 in you’ll have a bad time Oct 07 15:11:06 yeah, I'm exceptionally weak with java, this is a final project for a semester course in 'android development' whcih consisted of a single lesson on java Oct 07 15:11:16 so i'm literally cobbling together anything i can find Oct 07 15:11:42 it’s ok. for what you’re doing.. if you have a lot of elements especially, I’d look into an ArrayList<> Oct 07 15:11:52 probably ArrayList if you’re doing calculations Oct 07 15:12:19 i had array list originally with a java program i wrote to handle the XML input i was doing and calculate from that Oct 07 15:12:25 Shiven, I think that’s how most people start out with Android Oct 07 15:12:30 it didn't translate over to Android unfortuantely so i had to find another way Oct 07 15:12:50 ArrayList is supported in Android Oct 07 15:13:05 yeah but the xml process i was using wasn't Oct 07 15:13:15 ah i see Oct 07 15:13:15 so i had to find another way, and being a uni student... i'm running late -_- Oct 07 15:13:21 gotcha Oct 07 15:13:34 well there ya go Oct 07 15:15:32 http://pastebin.com/D3UYvddZ Oct 07 15:15:58 does somebody know a good solution for this problem? http://stackoverflow.com/questions/7018267/generating-a-layoutparams-based-on-the-type-of-parent Oct 07 15:16:33 use RelativeLayout.LayoutParams Oct 07 15:17:10 Cheers, tricknology, i'm still getting the nullpointer but i'll find it :) Oct 07 15:17:45 Shiven, then it’s your name array that is null Oct 07 15:17:46 <_DB> hey guys Oct 07 15:17:51 <_DB> if I want to build amobile app via html5 and javascript Oct 07 15:17:52 try using debug Oct 07 15:17:56 <_DB> should I use cordova or something else? Oct 07 15:18:02 <_DB> also if I use the geolocation tag will that use the deviced gps systems? Oct 07 15:18:10 <_DB> devices** Oct 07 15:18:14 set breakpoints and follow your code Oct 07 15:18:22 fixed it Oct 07 15:18:26 needed the declarations in the function Oct 07 15:18:29 cheers for hte help :) Oct 07 15:18:33 native or die Oct 07 15:18:36 Hiven, np :) Oct 07 15:18:42 Shiven* Oct 07 15:18:45 does anyone use travis to run emulator tests? Oct 07 15:20:00 no, what is the benefit? Oct 07 15:20:08 CI, obviously Oct 07 15:20:11 tricknology: RelativeLayout will also work when parent is LinearLayout? Oct 07 15:20:34 pfn tell me that you've done this :D Oct 07 15:20:43 no Oct 07 15:20:46 q_q Oct 07 15:20:48 shouldn't be hard Oct 07 15:20:49 but no Oct 07 15:21:03 well it just hangs for like 15 minutes on 'connectedAndroidTest' Oct 07 15:21:41 java.lang.NullPointerException at com.google.dexmaker.mockito.DexmakerMockMaker.getInvocationHandlerAdapter(DexmakerMockMaker.java:83) Oct 07 15:21:43 probably slow ass emulator Oct 07 15:21:54 then either gives me this random error which ive never seen locally Oct 07 15:21:57 or just times out Oct 07 15:22:07 since travis doesn't have the benefit of haxm Oct 07 15:22:28 :\ Oct 07 15:22:39 but it must be functional Oct 07 15:23:53 FrancesscoV can you add a dummy view to the viewgroup and call getParent() and determine from there? Oct 07 15:27:30 JacobTabak, probably better off figuring out how to make robolectric run Oct 07 15:27:43 pfn it crossed my mind Oct 07 15:27:47 thanks for the suggestion Oct 07 15:29:27 Vgroup.addView(dummy); View v = (View) dummy.getParent(); LayoutParams params = v.getLayoutParams(); Oct 07 15:29:38 FrancesscoV Oct 07 15:41:00 Am I doing something wrong in http://pastebin.com/2CjP4sGW to cause the first two items to end up in the overflow? Oct 07 15:43:31 Why are you using app:showAsAction in the last menu item? Oct 07 15:44:32 jgorak if you don't want them in overflow set showAsAction = always and an icon Oct 07 15:44:38 er you don't need an icon Oct 07 15:46:03 he has that for the first item, and if room for the second Oct 07 15:46:48 (and I'm using it in the last one because that was just the stock code the ide provided) Oct 07 15:48:25 what api version? Oct 07 15:48:58 Ooh, sorry, I asked too soon. Just found my answer. Oct 07 15:49:14 app:showAsAction, not android:showAsAction Oct 07 15:51:27 Double "ooh", that's what you were pointing out to me and I just read it as "android:" :-X Thanks pieces029 Oct 07 15:51:43 Np Oct 07 15:52:29 Second day playing with android dev and obviously burning myself out from doing this too long. Break time :) Oct 07 15:59:25 can anyone tell me whats going on here? http://pastebin.com/eqgjERJb Oct 07 15:59:36 i suspect its because the string ins't in the right format for the double Oct 07 16:16:28 Shiven left :/ Oct 07 16:16:40 parsing float to double Oct 07 16:27:31 hello there Oct 07 16:28:27 I have a problem with the Intellij IDE, when I create a new project (Android Gradle) I would like to avoid Idea to create fuckton of folder and subfolder Oct 07 16:29:06 this is android, there is a fuckton of stipd crap in every corner Oct 07 16:29:34 well, it's more like I wish the src file to be at the root of the project folder Oct 07 16:29:47 instead it is stuck in project/Project/main/java/src Oct 07 16:30:59 i would advise you leave the defaults; the build system can be tuned though Oct 07 16:31:03 Is there any reason why when I try to make a Wear Emulator screenshot in Android Studio the screenshot comes out as just black square? Oct 07 16:33:15 Same in Android Device Mnitor. Oct 07 16:33:40 nameless`: that's the way java works, not just android Oct 07 16:38:07 Also, "screencap" in adb shell outputs "@@" instead of the screenshot. Oct 07 16:39:48 Hi Oct 07 16:41:12 oh oh Oct 07 16:42:38 lol Oct 07 16:42:39 fun http://systemdotrun.blogspot.co.uk/2014/10/android-app-architecture-lifecycle.html Oct 07 16:43:01 yeah, so i guess i'm not the only one who starts each project thinking ... how can i do async differently on android Oct 07 16:43:21 like in a way thats not a pita wrt component lifecycle Oct 07 16:43:50 ^this Oct 07 16:48:33 nah I wonder that too esp. on device rotation Oct 07 16:50:53 the package file is not valid Oct 07 16:52:03 ouch. ide internal error; editor already disposed. i thought they fixed that Oct 07 16:54:46 g00s, your error or mine? Oct 07 16:57:46 can anyone explain to me Oct 07 16:57:50 why i cant seem to delete an sms Oct 07 16:57:50 http://pastebin.com/7i5Ev08k Oct 07 16:57:56 the cursor count is 1 Oct 07 16:58:03 the id is set Oct 07 16:58:07 but rows deleted is 0 Oct 07 16:58:29 tricknology i'm sorry? package name ? Oct 07 17:00:01 yeah never seen it before - when downloading from play store Oct 07 17:00:13 https://support.mapmyfitness.com/hc/en-us/articles/200117904-Google-Play-Store-Package-file-is-invalid-error-when-trying-to-download-the-app- says clear google cache Oct 07 17:00:18 err play store cache Oct 07 17:00:27 I want to know why that heppens though Oct 07 17:02:56 Good morning. Is tehre a way to create an SHA512 hash from a string in Android? Oct 07 17:04:36 guys? Oct 07 17:05:07 Tobbi: presumably by using the standard Java API to do so Oct 07 17:05:18 yes Oct 07 17:05:30 should be able to get a hash Oct 07 17:05:38 zinx: Okay, is that included or do I need to include a library into my project? Oct 07 17:06:00 Tobbi: it's included, being part of standard java Oct 07 17:06:08 Thanks! Oct 07 17:06:29 http://stackoverflow.com/questions/5980658/how-to-sha1-hash-a-string-in-android Oct 07 17:09:47 Hey guys, I'm making my first app, and I'm doing a Navigation Drawer. I'm trying to add an about page underneath the settings page in the top right corner dropdown menu. Oct 07 17:09:57 Can someone point me in the right direction please? Oct 07 17:10:37 * g00s struggled with nav drawer too Oct 07 17:10:55 easy to use and stuff things in there; managing the fragments, transitions, IA ... yuck Oct 07 17:12:04 g00s, I'm developing it with a friend, and he's struggeling to understand nav drawers too. Oct 07 17:12:14 Is there a good guide on how to use them? Oct 07 17:12:38 beside what is on d.android.com ... Oct 07 17:12:49 * tricknology wishes he had a friend to dev with :( Oct 07 17:13:18 sure, 'a friend' Oct 07 17:13:22 all my real laife android dev friends are cranky Oct 07 17:13:47 i think its because they are in companies, and their asses are on the line for real when things don't work Oct 07 17:13:52 and dont work is common :) Oct 07 17:13:59 Im trying to open up a sample project in Eclipse. After importing I'm getting an error "Program" ndk-build" and not found in path" Oct 07 17:14:00 g00s, I didn't even know about d.android.com, haha. Oct 07 17:14:02 Thanks. Oct 07 17:14:06 is there something I need to know about performing button clicks on a view pager? Oct 07 17:14:59 try and know everything Oct 07 17:15:26 viewpager will interfere Oct 07 17:15:57 tricknology no they dont ? Oct 07 17:15:58 override ViewGroup.onInterceptTouchEvent(MotionEvent ev); Oct 07 17:15:59 how do I prevent interference? Oct 07 17:16:08 and call super.onInterceptTouchEvent(ev) Oct 07 17:16:50 Eowyn27 are you minding Z-order? Oct 07 17:17:36 StingRay_ all your thumbable problems solved ! http://www.androidpolice.com/2014/10/06/worried-about-how-big-the-nexus-6-will-be-no-problemjust-get-this-giant-thumb-extension-from-japan/ Oct 07 17:17:39 oh wow, it's like time has not passed, I left yesterday with Eowyn27 asking almost the same thing and JacobTabak answering almost the same way Oct 07 17:17:48 lol Oct 07 17:17:52 yep. Oct 07 17:17:56 some kind of time warp in here? Oct 07 17:18:07 so far I'm having issues with click listeners and viewpagers Oct 07 17:18:11 I " Oct 07 17:18:15 I keep falling into it as well Oct 07 17:18:19 * StingRay_ thinks JacobTabak and Eowyn27 are attempting to confuse him Oct 07 17:18:28 * g00s just watched live , die, repeat Oct 07 17:18:32 I "fixed" it by bringing the buttons to the front Oct 07 17:18:33 you never answer my questions Eowyn27 Oct 07 17:19:11 ^ probably related to JacobTabak’s comment Oct 07 17:19:23 I would maybe i missed that part because I didn't get that part Oct 07 17:19:24 yesterday Oct 07 17:19:38 n one told me to override OnInterceptTouchEvent Oct 07 17:19:42 no Oct 07 17:19:44 http://stackoverflow.com/questions/7481183/how-to-android-z-order Oct 07 17:19:50 Eowyn27 Oct 07 17:20:23 bringToFront() will affect the z-order Oct 07 17:20:28 dont use bringtofront Oct 07 17:20:35 just put ur things in the right order in your layout Oct 07 17:20:44 * StingRay_ faints Oct 07 17:21:02 I did Oct 07 17:21:14 I will double check but I'm sure my layout is fine Oct 07 17:21:46 once in MATLAB I was sure I had all my semicolons in the right place Oct 07 17:21:54 I was never sure after that Oct 07 17:21:55 Guys is there any working example with Google Maps inside a Drawer Navigation Activity ? Oct 07 17:22:35 have you tried Google, cnap? Oct 07 17:22:59 yes but I cannot find that suits my needs tricknology or most of them are stackoverflow posts which do not work Oct 07 17:22:59 I know that’s a cheap answer but sometimes.. Oct 07 17:23:07 its fine Oct 07 17:23:18 I spend lots of time searching, but I am very new to Android Oct 07 17:23:21 so I am so lost Oct 07 17:23:55 https://gist.github.com/joshdholtz/4522551 Oct 07 17:23:56 check this Oct 07 17:24:40 take tha tmap fragment and put it into your drawer Oct 07 17:25:34 using replace() Oct 07 17:26:05 ok so basically I can try intergrating this inside a default produced project with Drawer activity Oct 07 17:26:17 try and see :) Oct 07 17:26:28 I would try building little tests firest Oct 07 17:26:41 add little bits.. so that if it breaks you’re not looking at all of it for a suspect Oct 07 17:27:09 * tricknology should follow his own advice Oct 07 17:27:30 ok thank you tricknology i will try this way Oct 07 17:28:03 np cnap.. check this too for extra: https://github.com/thecodepath/android_guides/wiki/Fragment-Navigation-Drawer Oct 07 17:28:45 oh yeah I found this page too, not sure why I didnt try this way full Oct 07 17:28:55 What is wrong with the ordering?? Oct 07 17:28:56 maybe I just skipped out coz I was trying lots of stuff simultaneously Oct 07 17:28:58 thx again :D Oct 07 17:29:53 it happens, np Oct 07 17:30:25 Eowyn27, hard to tell from this angle Oct 07 17:31:04 tricknology dont be lazy! crystal ball it ! Oct 07 17:32:07 * StingRay_ is shocked that he's impressed at an android game, bombsquad… it's pretty :) Oct 07 17:32:13 I forgot it laying next to my dragon Oct 07 17:33:15 16 minutes left to dl Oct 07 17:33:15 haha Oct 07 17:33:21 oh Sprint.. Oct 07 17:34:04 so if my app has 170k installs, is that good or bad Oct 07 17:34:10 The interesting is I resized my viewpager lol Oct 07 17:34:15 and I see I have two views Oct 07 17:34:17 on top of each othjer Oct 07 17:34:19 That’s good Oct 07 17:34:22 Sculptor that's bad Oct 07 17:34:25 Sculptor that depends Oct 07 17:34:28 HAH Oct 07 17:34:33 it took me 15mins to write it Oct 07 17:34:42 did you come here to brag? Oct 07 17:34:46 will poeple stop giving opinion as absolute with no context ! Oct 07 17:34:49 nah Oct 07 17:34:50 :) Oct 07 17:35:06 and will other people stop asking pointless questions :) pweeeeze Oct 07 17:35:26 i hate the one star rating guys Oct 07 17:35:29 i prefer pointless questions to people talking about how Java is easy and C is for real coders Oct 07 17:35:32 why are they so stupid Oct 07 17:35:42 they won't read anything Oct 07 17:35:54 lol Oct 07 17:36:09 You can reply Oct 07 17:36:53 Sculptor I have some amazing email conversations with users that almost make me want to somehow leave the human species Oct 07 17:36:59 i do that Oct 07 17:37:15 hi all im searching for a Ident if the powercable is connected and the android divice is charging Oct 07 17:37:22 Anyone looking for a job in a Bitcoin Business? If so, fell free to PM me, we have many vacancies to fill. Oct 07 17:37:38 tricknology: by just changing the Manifest to support google maps I am getting an error: http://prntscr.com/4ty32z Oct 07 17:37:51 I think that I have included google play services successfully Oct 07 17:38:03 you need google play services Oct 07 17:38:07 not sure Oct 07 17:38:12 cnap: you need to be online for the first connect Oct 07 17:38:18 u using android studio? I haven’t used it Oct 07 17:38:22 CheckDavid should not advertise in here … against the rules Oct 07 17:38:24 yeah I am using studio Oct 07 17:38:31 im using it 2 Oct 07 17:38:42 And_prog_desaste: what do you mean? I am compiling with Android studio from this pc that I am talking to you now Oct 07 17:38:46 so I guess it has internet access Oct 07 17:39:03 cnap: did you debug on a device Oct 07 17:39:13 no I am using emulator for now Oct 07 17:39:16 but this is build error Oct 07 17:39:38 in eclipse i have to import the play services project Oct 07 17:39:43 or add the jar to the build path Oct 07 17:40:00 and add the dependency to the project if I imported Oct 07 17:40:25 i just added the dependency i think Oct 07 17:40:42 eeh Oct 07 17:40:52 cnap: under application Oct 07 17:40:53 not the correct way i guess “ could not resolve dependency “ Oct 07 17:40:54 android:value="@integer/google_play_services_version" /> Oct 07 17:41:51 android:name="com.google.android.maps.v2.API_KEY" Oct 07 17:41:55 android:value="XXXXXXXX"/> Oct 07 17:42:00 ok added this, now says cannot resolve @integer/google_play_services_version Oct 07 17:42:09 I have that 2nd meta-data Oct 07 17:42:48 in my build.gradle file there is "compile 'com.jdroidframework:google-play-services:0.5.0'" Oct 07 17:43:12 however I saw other people talking about compile 'com.google.android.gms:play-services:5.2.08' Oct 07 17:43:19 aren't they the same thing? Oct 07 17:44:09 did you include the property pagacke Oct 07 17:44:18 oh I replaced my compile line with the other one and seems to work Oct 07 17:44:25 from Dependencies? Oct 07 17:44:41 in android studio Oct 07 17:44:54 properties depencies google play service Oct 07 17:45:14 All I did is File > Project structure > app > Dependencies Oct 07 17:45:30 yes Oct 07 17:45:34 and from there i added this com.jdroidframework:google-play-services:0.5.0 Oct 07 17:45:47 but now I replaced this from build.gradle file with com.google.android.gms:play-services:5.2.08 Oct 07 17:45:54 and seems to work in addition with ur meta-data suggestions Oct 07 17:46:07 ok Oct 07 17:46:12 thank you And_prog_desaste Oct 07 17:46:45 Hey guys.. I was wondering if there is any way to change the e-mail account that an app is registered to.. Oct 07 17:47:07 The last guy registered the app to an e-mail that is less than desireable at this point. Oct 07 17:47:08 NP John deere runs on that meta Oct 07 17:47:33 So someone on my issue maybe Oct 07 17:47:45 tricknology: you can move apps between developer accounts, if that's what you're asking Oct 07 17:47:49 how t detect if power cable is connected and battery is charging Oct 07 17:47:54 yep that’s waht I’m asking Oct 07 17:48:01 thanks JesusFreke Oct 07 17:48:07 I don't know the details of how to go about it, but I know it's possible :) Oct 07 17:48:13 thank god Oct 07 17:48:20 https://support.google.com/googleplay/android-developer/checklist/3294213?hl=en Oct 07 17:48:23 I'm positive that I'm pretty sure it's possible :) Oct 07 17:48:27 probably. Oct 07 17:48:36 I was reading abotu how if you lose your keystore you’re pretty much f'd Oct 07 17:48:42 yep Oct 07 17:49:01 figured app transfer was pretty ridgid too but that wouldn’t make sense Oct 07 17:51:56 tricknology also http://phandroid.com/2012/06/21/getting-acquired-how-to-transfer-ownership-of-your-android-app-or-game/ Oct 07 17:52:20 got it BY Oct 07 17:52:25 http://developer.android.com/training/monitoring-device-state/battery-monitoring.html Oct 07 17:52:25 so first, set up the new account, make it a developer account, pay another $25, wait a little Oct 07 17:54:25 tricknology: can you escalate on what you meant by using replace() ? Because I tried to include all this code inside my fragment class Oct 07 17:54:33 and it builds fine, but in runtime throws lots of errors Oct 07 17:54:46 This is the main error " java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.s0me0n3.ytgooglemapstut/com.example.s0me0n3.ytgooglemapstut.MyActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.maps.UiSettings com.google.android.gms.maps.GoogleMap.getUiSettings()' on a null object reference" Oct 07 18:02:28 Is d.android.com out of date? It's telling me to open a fragment_main.xml file in /res/layout, but the only .xml in there is AndroidManifest.xml. Oct 07 18:02:55 erm... Oct 07 18:03:11 AndroidManifest.xml is not a layout Oct 07 18:03:15 and should not be in there Oct 07 18:03:25 Err, it's acivity_main.xml. Sorry... Oct 07 18:03:32 Too many tabs open in eclips. Oct 07 18:03:39 eclipes* Oct 07 18:04:32 Hi, not sure if this is the right place to ask this. I am booting my android tablet without battery connected and for some reason the wireless switch is grayed and I cannot turn it on. Any idea why? I wonder if this is something in the kernel checking if the battery is plugged in, and if not it disables wireless Oct 07 18:04:37 Here's the webpage in question: https://developer.android.com/training/basics/firstapp/building-ui.html#LinearLayout Oct 07 18:04:39 dont know how the wizzard works, maybe you didn't choose correct option Smrtz Oct 07 18:04:52 StingRay_, Maybe. Thanks. Oct 07 18:05:02 but end of the day it's jsut an xml file used for layout …create it if you want :) Oct 07 18:05:32 i just added a service to my project in AS, using New -> Service, and it totally butchered my projects; AndroidManifest.xml. Truly bizarro shit, like adding media permissions, etc Oct 07 18:06:00 g00s I didn't even know you could do that Oct 07 18:06:16 what stuff did it add specifically ? maybe it just formatted ? Oct 07 18:06:19 i wish these guys would stop being so clever Oct 07 18:06:28 this is the exact same shit that happened in the ADT Oct 07 18:06:36 I am trying to make a layout, where there are two tablerows at the top, two at the center and one at the bottom of the screen, but I can't get them aligned, does anybody have an idea? Oct 07 18:06:48 or should I use something other than a tablelayout? Oct 07 18:07:30 StingRay_, I can't create it since I don't know what goes in it. Oct 07 18:07:59 Sosung no1 should be able to or should answer that… no idea what you are wanting other than the brief tech overview you gave… but I would just use linearLayouts most of the time…. but guessing cause I'm not you with your idea ;) Oct 07 18:08:26 Smrtz you can read what an xml layout is… then you can ;) Oct 07 18:09:15 StingRay_, Linear doesn't work with what I'm trying to achieve ;) Oct 07 18:09:36 Sosung I seriously doubt that from your desc.. but could be wrong Oct 07 18:09:59 I just need 3 views at the top, 3 at the bottom, and 2 at the bottom Oct 07 18:10:12 I'm not that good with LinearLayout, so that could be it too ;) Oct 07 18:10:29 not sure you can be good Oct 07 18:10:33 they are just ViewGroups Oct 07 18:10:40 you either understand them or not :) Oct 07 18:10:53 I don't ;) Oct 07 18:11:08 StingRay_, but I'll read up on them, it's been a while since I programmed Oct 07 18:11:42 StingRay_, if they are what I think they are, it should be possible, thanks :) Oct 07 18:11:46 Sosung tip though, most programmer lack ability to interpret text to visual unless very simple… sometimes better to draw a little pic in paint etc Oct 07 18:11:54 and say I want this Oct 07 18:12:10 I drew the layout on a piece of paper Oct 07 18:12:42 haha…cool, take a pic, then pastbin it :) Oct 07 18:12:51 alright :) Oct 07 18:15:22 StingRay_, how do you pastebin a picture? ;) Oct 07 18:15:39 http://imgur.com/ Oct 07 18:15:46 may pic paste sites Oct 07 18:15:50 many* Oct 07 18:17:57 http://imgur.com/93aTy6c Oct 07 18:18:05 I'm not that good at drawing Oct 07 18:18:15 left is portrait, right is landscape Oct 07 18:18:43 Hi Guys Oct 07 18:19:20 hi Oct 07 18:23:34 I have an app that a user can create usernames in. I don't the user name edit text to accept anything but english characters. Is there any editText property to force an english keyboard? even on like a chinese phone? Oct 07 18:24:18 eghdk textwatcher Oct 07 18:24:32 ? Oct 07 18:24:41 Is that a class? Oct 07 18:25:18 or inputfilter Oct 07 18:25:57 http://stackoverflow.com/a/12656159/713775 Oct 07 18:26:26 hmm, got disconnected for no reason Oct 07 18:26:36 eghdk in answer to your question, I dont think so … :) Oct 07 18:28:17 Hmmm... so what happens if I have a Russian user, and they don't have a US keyboard. Is there one built into their android phone? Or do I tell the user that "These characters are not valid. Please use an english keyboard"? Oct 07 18:28:42 eghdk yeah the last probably… but thats not great Oct 07 18:29:16 Erm. This sucks. Oct 07 18:29:23 I'm not 100% sure on this, but it kinda makes sense Oct 07 18:29:47 eghdk hate to say it… but you forcing characters that a user may not understand sux Oct 07 18:29:48 :) Oct 07 18:30:32 So you think just letting my users create a new account with their own character set should be allowed? Oct 07 18:30:50 eghdk I think their own language use is a MUST in any app dev Oct 07 18:31:02 or just dont make it available in that region Oct 07 18:32:17 I would not want to type a my nick name into a box and then it say, "sorry all the characters you have used are not valid, please use characters that you do not understand" :) Oct 07 18:33:04 Not sure if my backend can handle those kinds of characters. Oct 07 18:33:16 I honestly don't get character encoding or languages or anything at all. Oct 07 18:33:29 ascii or utf or anything else just confuses me. Oct 07 18:33:59 if utf, remember to force normalization Oct 07 18:37:53 is anybody familiar with the google drive API? Oct 07 18:38:17 is it possible to update a list in my app through a spreadsheet on Drive, to be more precise Oct 07 18:46:17 what can I build ahead of time to run "connectedCheck" as quickly as possible? I tried 'assembleDebug' but it still seems to run more tasks Oct 07 18:46:52 is there a way to use PreferenceActivity in modern mode, but not have *ALL* the initial things as headers? forcing everything to be at least one hierarchy deep is kinda lame Oct 07 18:47:46 JacobTabak make a task that connectedCheck depends on ? Oct 07 18:47:59 if custom build logic Oct 07 18:48:06 shouldn't be anything custom Oct 07 18:48:11 i just want to buidl ahead of time and run it as quickly as possible Oct 07 18:48:17 i'm trying to build and boot up the emulator at the same time Oct 07 18:48:29 so i dont want to have to rebuild anything once the first build is complete, ijust wanna run Oct 07 18:49:37 its like buidling some release stuff hmm Oct 07 18:50:17 is there a task dependency chart? Oct 07 18:51:38 gradle tasks --all i think Oct 07 18:52:03 thank you!! Oct 07 18:53:44 I guess i should just use connectedAndroidTest rather than connectedCheck Oct 07 18:54:10 ohI think i know Oct 07 18:54:38 nah that doesnt matter Oct 07 18:54:39 app:connectedAndroidTest - Installs and runs the tests for Build 'debug' on connected devices. [app:assembleDebug, app:assembleDebugTest] Oct 07 18:54:51 I wonder if those can be run parallel? Oct 07 18:59:59 i don't understand the difference between assembleDebugTest and assembleDebug Oct 07 19:00:17 i would have imagined that assembleDebugTest would depend on assembleDebug Oct 07 19:00:24 but androidTest depends on both of them Oct 07 19:04:55 JacobTabak those two tasks are all that’s needed. what do you have lint type tasks? Oct 07 19:05:11 i was confused because they have some common dependencies Oct 07 19:05:20 i thought one would depend on the other Oct 07 19:05:26 but they both depend on other things Oct 07 19:05:34 assembleDebugTest assembles the test sources, assembleDebug assembles the main sources Oct 07 19:05:45 but the debug sources depend on the main sources Oct 07 19:05:51 and not the other way around Oct 07 19:05:51 you mean test Oct 07 19:05:54 yes Oct 07 19:05:58 exactly Oct 07 19:06:03 test sources depend on the main sources Oct 07 19:06:30 I guess it would depend on how the source sets are configured Oct 07 19:06:30 was just confused why I need to specifically run both assembleDebugTest and assembleDebug separately Oct 07 19:07:41 do you know what this means? app:deviceCheck - Runs all device checks using Device Providers and Test Servers. Oct 07 19:07:59 robolectric uses a custom task, right? Oct 07 19:08:07 (i don't have it set up yet) Oct 07 19:12:17 cnap, one of those objects is null Oct 07 19:13:51 the one you are calling getUiSettings() on Oct 07 19:14:33 JacobTabak deviceCheck is and anchor task I believe Oct 07 19:15:10 meaning you use it so that build script lingo doesn’t have to chage but you can make it depend on all your device checks Oct 07 19:15:22 and those can change Oct 07 19:15:30 i see Oct 07 19:15:32 thanks Oct 07 19:16:16 what I was saying earlier, those two tasks can be run in parallel if the test task just uses the source from the main sourceset and not the complied class files Oct 07 19:16:32 but you’d be compiling the main source twice, which makes little sense Oct 07 19:16:54 I think if i just run 'gradle assembleDebug assembleDebugTest' it will optimize it as muhc as possible Oct 07 19:16:54 so yeah you’re right it’s confusing why assembleDebugTest does not depend on assembleDebug Oct 07 19:17:01 (I thought it did btw) Oct 07 19:17:13 what do you mean “optimize” it Oct 07 19:17:22 gradle ain’t that smart Oct 07 19:17:26 i mean Oct 07 19:17:32 if you run gradlew assembleDebug then assembleDebugTest Oct 07 19:17:39 it checks if the debug caches are up to date Oct 07 19:17:42 when you run debugTest Oct 07 19:17:50 i think if you run them at teh same time, it will skip that check, and know they're up to date Oct 07 19:17:55 so it is the way I thought it was Oct 07 19:18:02 this is just in theory Oct 07 19:18:03 assembleDebugTest depends on assembleDebug Oct 07 19:18:12 no.. Oct 07 19:18:26 if you run assembleDebugTest, and then assembleDebug, assembleDebug still has new work to do Oct 07 19:18:35 oh Oct 07 19:18:47 testing that and writing down times Oct 07 19:19:04 what you’re saying is that assembleDebug doesn’t recompile if source doesn’t change, which is true Oct 07 19:19:15 yea but it seems to take quite some time to verify that Oct 07 19:19:27 Hi, people.) Oct 07 19:19:30 each task is responsible for determining if it actually needs to do work Oct 07 19:19:55 but i'm suggesting that rather than doing io, if the tasks are run simultaneously, the cache state will be in memory Oct 07 19:20:02 rather than if they're run serially Oct 07 19:20:12 I don’t think there’s a cache state Oct 07 19:20:19 unless the android plugin add it Oct 07 19:20:22 JacobTabak Can I ask you a Q? Oct 07 19:20:35 you should always ask yoru questions to everyone in the chat Oct 07 19:20:48 ok. Oct 07 19:21:00 CPH_DK just ask the question. if someone can answer it and they want to then they will Oct 07 19:21:06 JacobTabak But you are like the GURU :D Oct 07 19:21:32 Ok, How do I get intelliJ to display to unhandled exceptions on crash? Oct 07 19:21:32 what a noob. lol Oct 07 19:21:38 logcat. Oct 07 19:21:52 JacobTabak I know, but that only works half of the time Oct 07 19:22:09 CPH_DK: so what’s the real question Oct 07 19:22:36 dcow Why is logcat so unpredictable. Oct 07 19:22:37 CPH_DK theres a button to restart logging, you can also type use adb logcat, and try clearing your logcat process filters Oct 07 19:22:49 ok. will try that Oct 07 19:22:49 CPH_DK it's not logcat, its the ide integration Oct 07 19:22:57 CPH_DK it’s not unpredictable. but intellij sucks at caching sometimes Oct 07 19:22:57 Yes, I thought so Oct 07 19:23:01 it links to the source and lets you click on exceptions and link you to the source file Oct 07 19:23:16 JacobTabak Yes, that never worked for me Oct 07 19:23:17 at all Oct 07 19:23:20 and sometimes it gets out of sync with ADB Oct 07 19:23:22 i use android studio Oct 07 19:23:24 dunno :P Oct 07 19:23:31 and you have to manually restart adb Oct 07 19:23:38 dcow So it is NOT me :D Oct 07 19:23:45 intellij has the same logcat code that android studio has Oct 07 19:23:55 man, i'm almost giving up on android development... the store is cluttered with aweful apps that gets lots of downloads and yet my 2 'decent' apps had only like 8 downloads combined... they said google play would gimme a chance, an opportunity... what a lie :(... google play insists in displaying awful apps from some ridiculous indian or iranian developer while my apps are on the last page, even searching for the full name (unique). Oct 07 19:23:59 it's ridiculous Oct 07 19:24:07 oh Oct 07 19:24:09 JacobTabak the AS team is contributing mostly to core IntelliJ. The “android studio” part is just branding Oct 07 19:24:09 your app is decent Oct 07 19:24:13 bad move Oct 07 19:24:17 and some key shortcut changes Oct 07 19:24:24 dcow In gcc and vsc++ it just worked. Oct 07 19:24:25 Nine_9 are you saying you want a peer review Oct 07 19:24:37 Nine_9 lnik ? Oct 07 19:24:43 JacobTabak: what is a 'peer review'? Oct 07 19:25:02 Anyway I have gotten very far, I only need to implement touch handlers Oct 07 19:25:05 CPH_DK yes. the android tooling is young Oct 07 19:25:17 you either have to deal with it or come back later Oct 07 19:25:18 dcow Good to know :) Oct 07 19:25:22 or write your own tooling Oct 07 19:25:23 sucks Oct 07 19:25:34 but this was the same story for apple 10 years ago Oct 07 19:25:34 dcow I am gonna give it another go Oct 07 19:26:09 dcow Wanna see my game? Oct 07 19:26:21 StingRay_: http://youtu.be/EHczSoem_g8 Oct 07 19:26:30 for some reason google play won't show the video Oct 07 19:26:31 dcow Just a pic Oct 07 19:26:47 CPH_DK you’re free to post it Oct 07 19:26:59 dcow Ok, 2 sec. Oct 07 19:27:14 Nine_9 hey I actually like the look of that Oct 07 19:27:20 Nine_9 looks good.. but is there any motivation to play for moer than 5 seconds or is it just one road? Oct 07 19:27:29 well there are a few things I would change but… overall I like it Oct 07 19:27:38 StingRay_: thank you :) Oct 07 19:27:48 Tetris clone: http://i.imgur.com/0UslH6R.png Oct 07 19:28:02 very rudimentary Oct 07 19:28:06 CPH_DK: What happened with your InvalidArgumentException? :) Oct 07 19:28:08 * StingRay_ is a Console Games Artist/Design/TD of 17 years or so… so yeah… I dont give complements easy Oct 07 19:28:12 Nine_9, you're not going to get magical 1000000 downloads without any marketing Oct 07 19:28:15 TacticalJoke You were right :) Oct 07 19:28:18 haha Oct 07 19:28:20 people don't go randomly click on the store to find games Oct 07 19:28:25 You owe me some multiple of $50 now. Oct 07 19:28:29 Just kidding. Oct 07 19:28:32 dcow: 213 sec for assembleDebugTest, then assembleDebug. 165 sec for assembleDeb Oct 07 19:28:34 fak Oct 07 19:28:36 wasn't done Oct 07 19:28:38 CPH_DK tetris?! Oct 07 19:28:44 TacticalJoke But the call was very obscure Oct 07 19:28:44 d Oct 07 19:28:52 How so? Oct 07 19:28:53 Nine_9 I would alter a few things though, and have optional additions of some Oct 07 19:28:56 i don't go to the store for anything :D Oct 07 19:28:59 JacobTabak wow that’s really long… what are you building? Oct 07 19:29:01 dcow So far, but it will have add a lot of of stuff Oct 07 19:29:06 its after a clean dcow Oct 07 19:29:10 because thats how CI is Oct 07 19:29:14 CPH_DK good luck! Oct 07 19:29:21 dcow Thanks Oct 07 19:29:21 oh, that is more reasonable Oct 07 19:29:31 dcow what im saying is running 'gradlew assembleDebugTest' is 48 seconds faster than 'gradlew assembleDebug' then 'gradlew assembleDebugTest' Oct 07 19:29:34 StingRay_: i'd love to hear Oct 07 19:29:35 so theres huge optimization running them at the same time Oct 07 19:29:41 errr fkadskfj Oct 07 19:29:46 do you know what i mean? im saying it wrong Oct 07 19:30:00 I know what you mean Oct 07 19:30:01 TacticalJoke The call did not show up when is searched for "random" Oct 07 19:30:11 i Oct 07 19:30:14 JacobTabak i’m trying to figure out why Oct 07 19:30:19 Nine_9 ok, be aware that obviously working so long in console games, I'm quite critical of things :) Oct 07 19:30:20 because i said the wrong numbers Oct 07 19:30:41 Nine_9 will PM you rather than spam channel as this is only specific to you Oct 07 19:30:45 its either 101+72 or 165 Oct 07 19:30:52 so 8 seconds faster Oct 07 19:31:05 either way its a big diff Oct 07 19:31:18 8 seconds. it’s noticable Oct 07 19:31:33 Someone said, that people were mean in here, I have yet to experience any of that Oct 07 19:31:52 it may just be that certain files are already open at that level Oct 07 19:32:33 CPH_DK people don’t like to be asked to debug other peoples apps for them. this channel is supposed to be more for discussion about android dev, not code reviews Oct 07 19:32:59 dcow It is only very fleatingly, I am almost there ny now. Oct 07 19:33:20 so people often put on the edge when you come in yelling, “it’s broketh!! help! fix it! paste code plz0r” Oct 07 19:33:52 dcow Did I act like that? Also I always ask politely if anyone has the time Oct 07 19:33:55 no Oct 07 19:34:04 i just telling you why some people think it’s mean Oct 07 19:34:22 dcow I get that, newbies: "can you write my app for me" Oct 07 19:35:09 dcow In the topic "2d game engine" I can helpt a lot- Oct 07 19:35:39 CPH_DK you’re doing fine doin’t worry Oct 07 19:35:47 usually the only time we are mean, is if somebody comes "halp, i can't r00t my phonz!" , "this isn't the channel, try android-root", "but i did, nobody answered i need help here!" kinda thing Oct 07 19:35:49 dcow Thanks :) Oct 07 19:35:54 if you sit in here long enough you’ll see what I mean Oct 07 19:36:01 dcow I get it. Oct 07 19:36:24 dcow I intend to provide input in my niche Oct 07 19:36:39 StingRay_, and I are mean because we're grumpy old coders. Oct 07 19:36:54 has anyone messed with gradle flavors? Any insights on how to override sharedUserId via a flavor? Oct 07 19:36:57 Get off my ROM!!! Oct 07 19:37:08 I miss aseembly :( Oct 07 19:37:12 assembly Oct 07 19:37:42 MikeWallaceDev_ fk u … I'm not old and not a coder!!! Oct 07 19:37:43 :) Oct 07 19:37:54 C++ coders are never old. Oct 07 19:37:59 "There can be only one" Oct 07 19:38:05 :D Oct 07 19:38:10 heh Oct 07 19:38:18 Only people over 35 are old... Oct 07 19:38:29 Ooops, did I say that out loud? Oct 07 19:38:31 i go around decapiating other coders to get their energy Oct 07 19:38:47 MikeWallaceDev_: I don't like you. Oct 07 19:38:49 heh Oct 07 19:38:54 Idont like anyone. Oct 07 19:38:55 :D Oct 07 19:39:09 hahaha dragorn , how old are you? Oct 07 19:39:12 CPH_DK: sshh. that's the secret. it's like the hulk. "my secret is, I always hate people." Oct 07 19:39:27 MikeWallaceDev_: older than 35 you might guess :P Oct 07 19:39:28 thank God we're not people Oct 07 19:39:38 dragorn I learned STL by taking the head of a cs student Oct 07 19:39:42 I'm 47... Oct 07 19:39:46 Im 33 Oct 07 19:39:52 CPH_DK no more c++ task ! Oct 07 19:39:55 *talk Oct 07 19:40:00 man, bunch of old farts in here today! hahaha Oct 07 19:40:08 C++ FTW!! Oct 07 19:40:10 i'm pissed off that I can do 99% of what I need to do with gradle and then it still all fails. Oct 07 19:40:35 i'm pissed that google completely half assed BLE Oct 07 19:40:59 I am pissed that Java is castrated Oct 07 19:40:59 g00s: * completely halfassed BLE Oct 07 19:41:37 dragorn, sharedUserId is just a manifest value, make multiple manifests... Oct 07 19:41:47 i can't believe i'm parsing broadcast AD structures to get 128 bit UUIDs for filtering Oct 07 19:42:01 MikeWallaceDev_: you'd think Oct 07 19:42:09 MikeWallaceDev_: it's not something that is merged cleanly however Oct 07 19:42:29 dragorn do you have any info on whats going on with google / android / ble ? seems the team is very slow at fixing things Oct 07 19:42:59 MikeWallaceDev_: I've tried removing it from the testing flavor manifest and leaving it in main (always on). I've tried removing it from main and testing and putting it in the production flavor (results in always off) Oct 07 19:43:16 MikeWallaceDev_: Can you think of any other permutations? It appears it's just straight up not a merged value Oct 07 19:43:17 oh. Oct 07 19:43:22 dragorn the plugin is open source ! Oct 07 19:43:23 * g00s runs Oct 07 19:43:27 g00s: i'm at that point Oct 07 19:43:37 g00s: except then I have to get the engineers to install a new plugin Oct 07 19:43:42 g00s: and that's just not going to happen Oct 07 19:44:21 * MikeWallaceDev_ is thinking Oct 07 19:44:33 It is normal that I pay tech support to install openoffice:)? Oct 07 19:44:52 for android ? Oct 07 19:44:55 MikeWallaceDev_: I've looked at the manifestmerger docs for using the tool:... namespace to alter attributes, but it only impacts child nodes Oct 07 19:45:17 g00s bad joke, osrry Oct 07 19:45:20 sorry Oct 07 19:45:32 MikeWallaceDev: and since the ns is defined in and so is sharedUserId, i can't get all clever with the attribute stripping options since it's not a child node Oct 07 19:46:02 I wonder if i remove the manifest from main if I can define it for testing and prod flavors and bypass that merge entirely Oct 07 19:46:13 I am going to write my own GUI class lib for android instead of learning some silly API Oct 07 19:47:05 that's the first thing that I thought dragorn , but I'm guessing that it will still merge, but with nothing... Oct 07 19:47:13 MikeWallaceDev: lets see Oct 07 19:47:16 and still forget to merge the id Oct 07 19:47:57 You know... I've never actually seen anyone use sharedUserId... May I ask what you are using it? Oct 07 19:48:31 I know the basic working of the Windows API, so I am gonna write a simple version of that Oct 07 19:49:17 CPH_DK: You're gonna do what? Oct 07 19:49:29 yeah, my jaw dropped too Oct 07 19:49:31 MikeWallaceDev: system apps Oct 07 19:49:33 TacticalJoke sinple version, only tyhe GUI stuff Oct 07 19:49:46 And only the parts I need Oct 07 19:49:46 CPH_DK: You're gonna write a GUI wrapper around Android? Seriously? Oct 07 19:49:47 ah, ok Oct 07 19:49:55 TacticalJoke It is not that hard Oct 07 19:50:03 MikeWallaceDev: but I need to make a non-overlapping flavor not signed with the package keys so that I can send testing versions to our language reviewers Oct 07 19:50:17 If that's possible, it'll be enormously difficult. Oct 07 19:50:18 TacticalJoke Even easier as Java has handlers Oct 07 19:50:29 And I don't see why anyone would do that. Oct 07 19:50:33 TacticalJoke I wrote one for win32 Oct 07 19:50:36 MikeWallaceDev: and I need to do it just often enough that if I can do it all with gradle flavors switching build models, it'll make my life a lot simpler Oct 07 19:50:50 Android's UI system is way different from Win32's. Oct 07 19:50:55 I hear ya dragorn Oct 07 19:51:25 CPH_DK: Do you even know about stuff like activities being killed on screen rotation? Oct 07 19:51:30 humm, how do i block my app to retain any activity from onCreate? im checking for some requirements, users will download something but if they back to the app then it'll be blank (saved state) Oct 07 19:51:38 TacticalJoke What I wanna do, is write a simple gui lib using the graphics lib. Oct 07 19:51:51 im not sure that my savedInstanceState=null; works at all Oct 07 19:51:51 TacticalJoke I am gonna know Oct 07 19:51:59 CPH_DK: You simply need to learn Android. Oct 07 19:52:02 What you're talking about is insane. Oct 07 19:52:09 TacticalJoke I will show you. Oct 07 19:52:16 that’s the spirit Oct 07 19:52:26 I'm just giving you a reality check. :D Oct 07 19:52:29 It will not be very impressive, but it will be enough Oct 07 19:52:31 Android's GUI stuff isn't so bad, anyway. Oct 07 19:52:37 ...now Oct 07 19:52:50 MikeWallaceDev: ha, can't spoof it w/ nothing in main/ Oct 07 19:52:51 TacticalJoke In a game it is not a good idea to use standard gui stuff Oct 07 19:53:03 anyone? Oct 07 19:53:03 Oh, gaming. I thought you meant widgets and stuff. Oct 07 19:53:05 when are they going to let us have the holdandswipelefttoremove() Oct 07 19:53:14 dragorn, yeah, I had a feeling... But you proved it. Oct 07 19:53:20 TacticalJoke No, button, text fields and so on for a game gui Oct 07 19:53:37 cliffreich, I really didn't understand what you want to do... Oct 07 19:53:59 TacticalJoke Each window object can be parent to any number of controls, and each of those controls are also windows Oct 07 19:54:32 TacticalJoke It is almost identical in principle to my win32 lib¨ Oct 07 19:54:57 TacticalJoke I will send you the basic code at some point Oct 07 19:55:07 CPH_DK: "Define 'window'." -- Android Oct 07 19:55:12 MkeiWallaceDev well let me explain again: my app will check that Google Play is updated and will show a a dialog if isn't, users will update, but if they try to open the app again it will be blank, because it saved the state before the update Oct 07 19:55:20 MikeWallaceDev Oct 07 19:55:43 clear your data Oct 07 19:56:03 TacticalJoke A class containing a draw method Oct 07 19:56:17 TacticalJoke and a a list of of children Oct 07 19:56:40 the base class anyway Oct 07 19:57:54 TacticalJoke A button control is derived from the window class and draws different stuff in the different states like "pressed_down" Oct 07 19:57:55 CPH_DK: I too came to Android from Win32. This place is way different. There are some similarities here and there, but that's about it. Oct 07 19:58:06 I control my home automation system via the voice recognition built into an android wear app I built, but I'd like to be able to do the voice commands from the "ok google" prompt rather than navigate to my app, and then do the voice recognition, is this possible? Oct 07 19:58:12 TacticalJoke In this particular instant Java is better suited Oct 07 19:58:17 cliffreight, your app’s cache resides in /data/data/APP_PACKAGE/ Oct 07 19:58:24 cliffreich* Oct 07 19:58:54 cliffreich, it IS blank, or you want it to be blank? Oct 07 19:58:55 TacticalJoke No more empty stuff :) I will show you a simple demo one day :) Oct 07 19:59:19 CPH_DK: They're views, not windows, in Android: Even so, isn't there something Oct 07 19:59:20 Oops. Oct 07 19:59:23 http://developer.android.com/reference/android/view/View.html Oct 07 19:59:25 Ctrl+V fail. Oct 07 19:59:56 so Oct 07 19:59:59 I have an emulator Oct 07 20:00:06 *gets popcorn* Oct 07 20:00:11 emulator-5554 Oct 07 20:00:15 I can't get rid of it Oct 07 20:00:21 TacticalJoke I am talking about wrting it from scratch Oct 07 20:00:22 * MikeWallaceDev waits for emulator to load Oct 07 20:00:23 every time I restart my computer it pops back up Oct 07 20:00:25 adb kill-server? Oct 07 20:00:28 ahaha Oct 07 20:01:25 CPH_DK: Writing what? Android's GUI system? Oct 07 20:01:29 it isn't enough Oct 07 20:01:44 TacticalJoke No, a wholy new gui system Oct 07 20:02:13 im glad i made an little script for autologin and join android-dev because this damn thing disconnect every time Oct 07 20:02:36 no answers... i guess i have to move my code from oncreate Oct 07 20:02:54 cliffreich, it IS blank, or you want it to be blank? Oct 07 20:03:20 i dont want it to be blank, i want it to start again Oct 07 20:03:26 TacticalJoke I will have tro write a simple gui lib for my game Oct 07 20:03:33 no savedstate, just everything again... destroy the state Oct 07 20:03:49 MikeWallace you have an intel CPU? Oct 07 20:04:21 that came out of the blue... AMD Oct 07 20:04:38 TacticalJoke Prob just buttons Oct 07 20:04:51 I haven't done anything graphical on Android. Oct 07 20:04:58 you said waiting for emulator to load… ouch, no HAXM for you :( Oct 07 20:04:58 I wrote an android wear/mobile app combo that allows me to shuttle off voice recognition output to a restful API I have. I have to push a button in the app on my android wear to start voice recognition. Is there any way I could trigger my stuff from the "OK Google" prompt rather than having to go into my app, an intent filter maybe? Oct 07 20:05:07 I just feel like you should learn stuff before trying to write a wrapper. Oct 07 20:05:28 TacticalJoke I know stuff, just not the api Oct 07 20:05:41 Yeah, "stuff" = "the API". :D Oct 07 20:05:42 TacticalJoke I knew nothing about the API before starting my game Oct 07 20:05:57 TacticalJoke I know the language farily well by now Oct 07 20:05:57 What is the current status of your game? Oct 07 20:06:19 TacticalJoke it is animated now, I only need to implement touch event handlers Oct 07 20:06:19 TacticalJoke, I think you meant == Oct 07 20:06:36 No, that is a comparison Oct 07 20:06:40 == Oct 07 20:06:53 it was a joke tricknology :) Oct 07 20:06:55 His sentence was an assignment Oct 07 20:07:15 it is not assignment, he did not assigned API to be the stuff, he's saying they're the same thing Oct 07 20:07:21 assigned=assign Oct 07 20:07:40 therefore an equality statement would be > any assignment Oct 07 20:07:50 Yeah I got it, but I didn’t want you to suffer unnecessarily on the off chance you didn’t know Oct 07 20:07:53 :P Oct 07 20:08:10 one "=" is tha assignment operator Oct 07 20:08:15 peroid :D Oct 07 20:08:17 peroid Oct 07 20:08:42 assertThat(stuff).isEqualTo(theApi); Oct 07 20:08:48 Can you evaluate assignments in Java? Oct 07 20:08:55 no Oct 07 20:08:58 sad Oct 07 20:09:08 so no if (a = b) ? Oct 07 20:09:11 I did consider using ==, but I preferred assignment there. :D Oct 07 20:09:26 TacticalJoke You shine brigth, friend :) Oct 07 20:09:31 seriously Oct 07 20:09:47 you are in the top 2-3 Oct 07 20:10:04 Of what? Oct 07 20:10:21 TacticalJoke Really wanna know :)? Oct 07 20:10:26 TacticalJoke In front ofveryone? Oct 07 20:10:46 TacticalJoke Well, you and jacob seem to be the most skilled Oct 07 20:10:54 I'm an Android n00b. Oct 07 20:11:04 I am a smashed up C64 Oct 07 20:11:19 so where can I ask questions about compiling Android besides Android-root? I asked, nobody is there... :-/ Oct 07 20:11:23 TacticalJoke Do you get into "code trance" and just write like mad? Oct 07 20:11:44 can i just use finish(); Oct 07 20:12:15 cliffreich_, finish() will destroy your Activity, is that what you want? Oct 07 20:12:15 I use boolean b = AmI great (); Oct 07 20:12:23 CPH_DK: I spend so much time reading. Oct 07 20:12:30 I feel weird when I'm actually typing code. Oct 07 20:12:36 TacticalJoke I just write, and write, VERY quicly Oct 07 20:12:37 yeah i think so, so everything will start again Oct 07 20:12:40 It feels like something is wrong. Oct 07 20:12:50 TacticalJoke Wrong in an awesome way, like running Oct 07 20:12:53 and dependencies will be ready Oct 07 20:13:07 TacticalJoke I think about an algorithm and then the implementation is VERY qucik Oct 07 20:13:10 no blank states Oct 07 20:13:27 cliffreich_, I'm not sure how you see this as starting again? Oct 07 20:13:35 No inline function in Java either? Oct 07 20:15:11 How can I explicitly made garbahge collection delete an object? Oct 07 20:15:20 The bytecode compiler and the JIT (or AOT) compilers worry about inlining. Oct 07 20:15:38 TacticalJoke So like having a nurse for coding :D? Oct 07 20:15:47 The garbage collector should not be messed with. Oct 07 20:16:13 It's kinda like coding without a vicious dog in the room. Oct 07 20:16:15 It needs a spaking! Oct 07 20:16:32 CPH_DK: If you need "native" performance, I guess you need to use the NDK. Oct 07 20:18:09 TacticalJoke Does it like spanking? Oct 07 20:20:40 You ask the strangest questions sometimes. Oct 07 20:21:22 Can someoen explain to me or point me in the direction of the right doc who we need to use context.registerListener() outside of an activity? Oct 07 20:21:43 registerListener is defined in teh Activity class? Oct 07 20:21:58 TacticalJoke I am werid, sorry :( Oct 07 20:22:17 tricknology in a service ? i Oct 07 20:22:32 tricknology whenever you need it really Oct 07 20:22:37 if you have access to context Oct 07 20:23:18 It's okay. lol Oct 07 20:23:30 We're all weird. It's just a question of how much we reveal. Oct 07 20:23:59 n onot in a service, StingRay_ Oct 07 20:24:10 this keyboard sucks btw. sorry Oct 07 20:24:14 TacticalJoke Intelligent people are odd Oct 07 20:25:06 sorry i meant registerReceiver() Oct 07 20:25:38 hi guys Oct 07 20:25:42 I know what you really meant …and answer is still the same :) although your question is making less sense Oct 07 20:26:05 when compiling an android app against android 4.4 does it mean that it's backward compatible with 4.2? Oct 07 20:26:08 I think I was just analyzing the whole thing incorrectly Oct 07 20:26:10 tricknology so… no you dont "need" to Oct 07 20:26:59 anyone know how to set up AS so that editor tabs, when they can't fit on one line, go to multi-line setup (instead of showing an overflow menu) Oct 07 20:27:56 i thought it would be in IDE / Appearance but ... Oct 07 20:28:26 let me put it this way.. to get registerReceiver, I have to extend Activity.. because registerReceiver() is a method of Context which is provided by Activity.. if I have a class which has a BroadcastReceiver. Extending Activity in that class will give me that method but I have a feelign it will not give me the results I am looking for Oct 07 20:28:36 I’ve always passed context Oct 07 20:28:58 so If I compiled my app on kitkat and it worked on ics should it work on jelly bean? Oct 07 20:29:02 So where can I learn about waht’s going on behind the scenes that will cause my crappy code to break? Oct 07 20:29:32 theoretically, if you set minsdk to JB Oct 07 20:30:10 ah found it Oct 07 20:30:48 so it’s a theoretical and a “where can I learn abotu this” wuestion Oct 07 20:31:21 this keyboard.. some kind of fourier transform I swear. Oct 07 20:33:58 tricknology still unsure what you are asking, though still not fully awake…but this is wrong "to get registerReceiver, I have to extend Activity" Oct 07 20:34:17 yes I know it is. Oct 07 20:34:57 tricknology: well, android *is* open source :) Oct 07 20:34:58 and BroadcastReceiver has it's own context Oct 07 20:34:58 CPH_DK: Maybe everyone is but intelligent people notice. Oct 07 20:35:03 you can dig into the actual framework code Oct 07 20:35:04 doing that will mute the compiler errors but at runtime I won’t get the expected result. The correct way is context.registerReceiver(foo).. but why? Oct 07 20:35:08 tricknology: that's a nice nickname you have. i likes. Oct 07 20:35:25 I’ve always been missing something with context that I haven’t understood Oct 07 20:35:28 thx sq :) Oct 07 20:36:12 I just know how to make it work and I know how to make it fail. Oct 07 20:36:16 tricknology: when an Android component (activity, service, broadcast receiver) is active, it has a context associated with it Oct 07 20:36:31 in the case of an activity or service, the activity or service class itself acts as a context Oct 07 20:36:49 in the case of a broadcast receiver, a context is passed when the receiver is called by the system Oct 07 20:37:01 And then there's in the global application context Oct 07 20:37:25 Those are the contexts you can use to register a broadcast receiver Oct 07 20:37:43 so I won’t break it when I assign the receiver to a different context (or dummy class that extends Activity) but the broadcasts won’t be received? Oct 07 20:37:54 or will that activity not have a context.. therefore NPE? Oct 07 20:37:55 you don't assign a receiver to a context Oct 07 20:38:04 not what I meant, sorry.. Oct 07 20:38:28 acthually.. hmm. I forget if a broadcast receiver's lifetime is tied to the component that registers it. sec Oct 07 20:38:28 Is there any way to trigger an intent from the "OK Google" screen with android wear? Oct 07 20:38:39 a custom intent Oct 07 20:38:46 context.registerReceiver() vs registerReceiver() in a class that extends Activity and does not have an onCreate() method. Oct 07 20:39:22 ok, yeah. the receiver is tied to the context that registers it. Oct 07 20:39:43 oook Oct 07 20:40:12 but a dummy class that just extends Activity. does that have a context or does it not because it hasn’t gone through onCreate() Oct 07 20:40:51 Yeah. An activity is really just a ContextWrapper. It's not a context in and of itself Oct 07 20:40:59 I guess I could answer this myself with a test but I like weird questions I guess Oct 07 20:41:06 oook nice Oct 07 20:41:10 thanksn for clearing that up Oct 07 20:41:15 And ContextWrapper implements the context interface by wrapping another context Oct 07 20:41:37 gotcha Oct 07 20:41:38 so in the case you describe, there is no other context associated with the "fake" activity, so it will likely just NPE Oct 07 20:42:32 ok, thanks for the info JesusFreke. Is there somewhere I can read about this or did you accumulate this? Oct 07 20:42:42 accumulate :) Oct 07 20:42:54 reading the source, reading the docs, etc. Oct 07 20:43:14 heh nice. small bites? Oct 07 20:43:22 err bytes.. Oct 07 20:44:37 no idea.. it just sorta happens/happened :) Oct 07 20:45:26 I never went out and thought "Hey! I'm going to learn about how activities and contexts work today.". Just picked it all up as I went along. Oct 07 20:46:12 I dont like the name Oct 07 20:47:02 :( Oct 07 20:47:21 Is there a method in an activity for when it is shown? Oct 07 20:47:37 AKK9 onResume() ? Oct 07 20:47:40 not onCreate, but even when a user pressed back from another activity Oct 07 20:47:42 oh Oct 07 20:47:46 thanks Oct 07 20:47:49 AKK9 look at the lifeCycles Oct 07 20:49:13 StingRay_, thanks, so Paused could be a dialog with transparent window? Oct 07 20:49:21 and stopped is when it's fully not visible? Oct 07 20:49:38 nevermind, im reading this Oct 07 20:49:53 thansk Oct 07 21:02:05 man this is one kind of boilerplate i wish i could get rid of; all these damn getters and setters. Oct 07 21:03:49 TacticalJoke wouldnt it look cool if I used the alpha channel to fade out the full lines in tetris? Oct 07 21:14:41 haha @g00s Oct 07 21:14:53 public all the things Oct 07 21:16:56 anybody used wear support library with travis? Oct 07 21:17:28 is it bad to have public data members? Oct 07 21:17:58 using sets and gets is a waste of execution time imo Oct 07 21:20:38 CPH_DK: Using accessors and mutators is good. Brb. Oct 07 21:21:18 TacticalJoke I know, but it wastes execution time Oct 07 21:21:23 CPH_DK I never understood why exactly one would want getters and setters except for readability Oct 07 21:21:45 and I got yelled at in programming class for not using them Oct 07 21:21:51 tricknology: It avoids forcing clients to recompile. Oct 07 21:22:01 tricknology I agree Oct 07 21:22:05 It keeps an API stable when implementation details change. Oct 07 21:22:13 Yes, that is true Oct 07 21:22:34 But not if you only susbtitute SIMPLE set/gets it cant hurt Oct 07 21:22:39 ah makes sense Oct 07 21:22:58 If I ever write a stable API I have gone too far:) Oct 07 21:22:58 CPH_DK: I'd guess that the JITter optimizes simple gets/sets. Oct 07 21:22:59 i tend to use Builders with public finals if possible Oct 07 21:23:08 TacticalJoke Makoing them inline prob Oct 07 21:23:09 but generally you want immutable objects Oct 07 21:23:12 Yes. Oct 07 21:23:17 My guess, anyway. Oct 07 21:23:25 Yeah, g00s. Mutability is evil. Oct 07 21:23:31 TacticalJoke You guess the same as me, taht must be good :) Oct 07 21:23:43 TacticalJoke Mutability = ? Oct 07 21:23:56 Objects with setters. Oct 07 21:24:35 Immutable objects such as String keep things simple. Oct 07 21:24:53 TacticalJoke You mean non-polymorphist? Oct 07 21:25:20 CPH_DK: java.lang.String is immutable. You can't change an instance. Oct 07 21:25:31 This helps avoid countless subtle bugs in its use. Oct 07 21:25:32 TacticalJoke Ah, Oct 07 21:25:52 TacticalJoke You can add members to an object instance Oct 07 21:25:59 Since we're passing references around, it's nice to make stuff immutable. Oct 07 21:26:06 (Passing by value, of course.) Oct 07 21:26:15 I want to make a transition animation from one activity to another but i want it to look like the activity expands from one of the views in my listview Oct 07 21:26:17 how can I do this> Oct 07 21:26:18 ? Oct 07 21:26:26 point me in the right direction? Oct 07 21:26:27 TacticalJoke Add members to an object instance? Oct 07 21:26:38 CPH_DK: How do you mean? Oct 07 21:26:49 AKK9 I could do that using my own gui stuff Oct 07 21:26:51 List? Oct 07 21:27:07 CPH_DK, what do you mean> Oct 07 21:27:08 ? Oct 07 21:27:20 TacticalJoke In javascripts you can add members to an instance of an objects Oct 07 21:27:26 AKK9: https://developer.android.com/preview/material/animations.html Oct 07 21:27:29 AKK9 I would write my own gui components Oct 07 21:27:36 AKK9 and then morph between them Oct 07 21:27:50 AKK9 using crossfade and gradual reszising Oct 07 21:27:59 AKK9 overridePendingTransition Oct 07 21:28:08 see, he knows Oct 07 21:28:40 StingRay_ Can you overiden the draw method(s) in android built-in gui controls? Oct 07 21:28:40 Hello Oct 07 21:28:44 n Oct 07 21:29:08 built-in gui ? you mean…erm…. a view ? Oct 07 21:29:10 :) Oct 07 21:29:14 overridePendingTransition()? Oct 07 21:29:21 thanks Oct 07 21:29:35 tricknology No, overide the methods that do the drawing Oct 07 21:29:42 How do I view the app UI Interface in Eclipse? Why I click the AndroidManifest.xml I get xml code, not the UI where you click and drag elements. How would I open that? thanks! Oct 07 21:29:43 overridePendingTraisiton, I get this, but I mean I want it to look like the activity transitions from where the user taps Oct 07 21:29:52 so that could be in vaiours parts of the screen Oct 07 21:29:52 CPH_DK you mean onDraw ? Oct 07 21:30:08 AKK9 thats design and implementation Oct 07 21:30:09 eeh not sure. If I want to override somethign I usually hack the source and import my own build. Oct 07 21:30:13 StingRay_ possibly, I mean taking like a button control and then having it draw something different Oct 07 21:30:19 Does anyone know how to modify the Samsung Galaxy s5's default keyboards emojii pages? They have most recent and sections, but if I would like to add more or rearrange. Oct 07 21:30:29 if I can’t otherwise override a hard to reach method Oct 07 21:30:29 CPH_DK yeah…onDraw() Oct 07 21:30:38 tricknology I have a werid ways of doing stuff Oct 07 21:30:47 StingRay_ That is waht I would do Oct 07 21:31:28 StingRay_ For example if I had to use a builtin control in a game engine I would override the draw method and use my own drawing stuff Oct 07 21:31:43 CPH_DK and how is that different in android ? Oct 07 21:31:57 StingRay_ Is might not be, I would not know :) Oct 07 21:32:01 you have visible components housed in Views …. view have onDraw Oct 07 21:32:05 StingRay_ I started on adroid 2 weeks ago :) Oct 07 21:32:13 drawables have onDraw Oct 07 21:32:28 StingRay_ Yes, so does win32 controls Oct 07 21:32:35 Those are just in C Oct 07 21:32:53 so overiding it a bit more complicated Oct 07 21:32:56 is Oct 07 21:33:17 StingRay_ I wrote a simple gui wrapper class for win32 api Oct 07 21:33:21 lib Oct 07 21:33:28 CPH_DK ok... Oct 07 21:33:45 StingRay_ It seems like Android gui stuff is a lot easier Oct 07 21:33:51 I don't "get" people who use 'final' all the time. Oct 07 21:34:01 It's verbose. Oct 07 21:34:02 TacticalJoke I use it for constants Oct 07 21:34:08 Yeah, for constants. Oct 07 21:34:10 I'm not a programmer so yeah… I know it …kinda so must be easy Oct 07 21:34:13 TacticalJoke And only taht Oct 07 21:34:16 Some people use it as much as possible. Oct 07 21:34:25 TacticalJoke Why?` Oct 07 21:34:32 Some even configure their IDE to auto-add it where legal. Oct 07 21:34:42 TacticalJoke People are stupid. Oct 07 21:34:45 Because it ensures that there is only one assignment. Oct 07 21:34:54 The idea is fine, but it makes code hard to read, IMO. Oct 07 21:35:00 TacticalJoke Where is that useful besides with constants? Oct 07 21:35:17 genymotion 2.3.0 is out Oct 07 21:35:20 final int magicNumber = 5; magicNumber = 6; // <-- compiler error Oct 07 21:35:21 i can't seem to get dagger code generation running for my robolectric test module. i gave up on this a few days ago but want to give it another shot, if anyone is familiar with troubleshooting this issue Oct 07 21:35:29 i'd appreciate it Oct 07 21:35:32 TacticalJoke I am gonna make a list of of tags of abbreviations for "static" and "public" Oct 07 21:35:50 A list of what? Oct 07 21:36:10 TacticalJoke For using as memeber qaulifiers Oct 07 21:36:13 use Oct 07 21:36:39 Or maybe some temple, I hate writing qualifiers for each member Oct 07 21:36:44 template Oct 07 21:37:17 TacticalJoke I miss pointers, so I could write a fake pointer class Oct 07 21:37:40 TacticalJoke Is there operator overloading in java? Oct 07 21:37:46 Nope. Oct 07 21:37:53 WHat?! Oct 07 21:38:01 I'm glad there isn't. Oct 07 21:38:06 99% of the time, anyway. Oct 07 21:38:13 TacticalJoke How does the string addition operator work then=? Oct 07 21:38:22 Java tries to be (and generally succeeds in being) simple. Oct 07 21:38:28 too simple Oct 07 21:38:34 CPH_DK: That's a compiler trick. Oct 07 21:38:35 I think. Oct 07 21:38:38 TacticalJoke The string class uses operator overloading Oct 07 21:38:47 may be built in Oct 07 21:38:58 String message = "Hi " + "there."; // This probably uses StringBuilder under the hood. Oct 07 21:38:59 That is really crappy :( Oct 07 21:39:27 What do you want operator overloading for? As far as I can think, that's useful only with certain mathematical stuff. Oct 07 21:39:30 TacticalJoke but then the stringbuild class should have overriden + operatos Oct 07 21:39:40 Perhaps [ and ] would be handy for list/array stuff. Oct 07 21:39:41 TacticalJoke example, yes Oct 07 21:39:47 TacticalJoke also that Oct 07 21:39:54 TacticalJoke i can do without, but it is nifty Oct 07 21:40:02 Yeah, it's handy in those cases. Oct 07 21:40:06 I can't think of any other cases. Hmm. Oct 07 21:40:16 TacticalJoke I am very fluent in C++ so I miss those thigns Oct 07 21:40:28 I hated the iostream << and >> thing. Oct 07 21:40:29 So bad. Oct 07 21:40:29 I will adapt I am sure Oct 07 21:40:38 TacticalJoke Yes, that was really silly Oct 07 21:40:47 TacticalJoke It was confusing Oct 07 21:40:51 "Yeah, I wanna left-shift cout 'Hello world' times." Oct 07 21:41:02 you guys should join #programming Oct 07 21:41:05 TacticalJoke it should only be used to improve readability Oct 07 21:41:08 True.dat. Oct 07 21:41:16 Exactly, CPH_DK. Oct 07 21:41:25 TacticalJoke Like vector = vector*matrix Oct 07 21:41:32 whatitis: this went on for hours yesterday too -_-# Oct 07 21:41:49 yea I know haha Oct 07 21:41:52 Yes, intealligent debate is horrible i see that Oct 07 21:41:55 :D Oct 07 21:42:18 TacticalJoke You are gonna have to dump down :D Oct 07 21:42:33 We both type too much for this channel, I guess. Oct 07 21:42:40 TacticalJoke Maybe, Oct 07 21:42:48 * StingRay_ thinks that TacticalJoke and CPH_DK should…erm…. get a "room/channel" ;) Oct 07 21:42:51 TacticalJoke I talk too much in general Oct 07 21:42:51 I'm actually trying not to type much lately. It's difficult. Oct 07 21:43:00 its off topic, people with android questions get lost Oct 07 21:43:02 * CPH_DK would love that Oct 07 21:43:05 and stop spamming this channel Oct 07 21:43:20 Where should I begin my search to edit the files in a Samsung Galaxy S5's stock keyboard? Oct 07 21:43:23 ok, if you are that bugged, I will cease Oct 07 21:43:42 But general programming is very useful in this area Oct 07 21:43:42 I'm in ##programming, FWIW. Oct 07 21:43:50 aretecode: might wanna try a different channel for that kinda thing Oct 07 21:44:00 TacticalJoke I am gun shy about going to those channels Oct 07 21:44:14 bankai_au, any suggestions? I will try #android-root for starters Oct 07 21:44:16 I would suggest ##java, but the admins are literally Hitler. Oct 07 21:44:21 Ok, but some day someone wants to now how to do somthing that really required undstanding of that stuff Oct 07 21:44:31 TacticalJoke, not cool. Oct 07 21:44:35 TacticalJoke Yes, I know, in c++ there is a lot of moda-bullying Oct 07 21:44:49 aretecode: ? Oct 07 21:45:26 aretecode Have you ever studied algorithm design? Oct 07 21:45:45 CPH_DK, yes, why? Oct 07 21:45:54 CPH_DK: can you just stop for ten minutes , please Oct 07 21:45:56 aretecode I think that is very on topic? Oct 07 21:46:04 bankai_au Sorry, Oct 07 21:46:08 gonna go to the chop Oct 07 21:46:09 marginBottom doesn't work on ICS? Oct 07 21:46:14 It is not on topic. You can PM if you need. Think about it from other peoples perspective. Oct 07 21:46:36 aretecode Ok, I dont want to annoy people. Oct 07 21:46:45 you are Oct 07 21:46:57 StingRay_ and know I am wiser Oct 07 21:47:04 well not annoy, just nullify this channel Oct 07 21:47:12 StingRay_ I will stop then Oct 07 21:47:19 StingRay_ Thanks for telling me Oct 07 21:48:09 TacticalJoke Can you do gui stuff in android api without doing xml? Oct 07 21:48:27 Yeah, but I guess you'd need to use pure code, and that's not a good idea. Oct 07 21:48:41 Better to separate presentation from logic. Oct 07 21:48:48 TacticalJoke I prefer that, I would use xml to mark out the position of stuff and then code the rest Oct 07 21:48:54 * StingRay_ always ditches xml when poss Oct 07 21:49:03 StingRay_: What do you use? Just code? Oct 07 21:49:03 StingRay_ I dont like it eitther Oct 07 21:49:06 TacticalJoke, "Pure code"? Often it is required when things are dynamic. Oct 07 21:49:25 Sure, when things are dynamic (because then it becomes "logic"). Oct 07 21:49:40 faster too Oct 07 21:49:43 TacticalJoke Can you draw like a template in some program and then use that for initial positioning? Oct 07 21:49:48 StingRay_: What is faster? Oct 07 21:49:48 Thus the answer is "yes, yes you can." Oct 07 21:50:04 eliminating parsing is faster Oct 07 21:50:08 Like changing the state of controls Oct 07 21:50:10 CPH_DK: No idea. I'm still new(ish) to Android. Oct 07 21:50:31 TacticalJoke Me too, but im getting there, only beeng two weeks and I have already made a game Oct 07 21:50:32 CPH_DK, it is built into the SDK in Studio & Eclipse Android SDK. Oct 07 21:50:34 StingRay_: It's a bad idea to just use code. Oct 07 21:50:41 aretecode ok, coo. Oct 07 21:50:43 l Oct 07 21:50:45 TacticalJoke nope…making statements like that is Oct 07 21:50:56 TacticalJoke, for being "newish" to android saying something is "bad" or "good" is a bad idea. Oct 07 21:51:00 I could easily write a gui using olny Oct 07 21:51:01 StingRay_: The system is designed so that you can separate code and presentation. Oct 07 21:51:02 code Oct 07 21:51:05 This is a good thing. Oct 07 21:51:10 TacticalJoke did not say it wasn't Oct 07 21:51:19 how do I edit my app icon? Oct 07 21:51:22 said u should not make statements like you just did :) Oct 07 21:51:27 it's flat wrong! Oct 07 21:51:28 :) Oct 07 21:51:28 aretecode: I'm new(ish) to Android, but I've been programming in various environments for over 15 years. I'm pretty experienced in general. Oct 07 21:51:32 through Eclipse Oct 07 21:51:32 I know a bad idea when I see one. Oct 07 21:51:40 Mallot1 In windows it is under resources :) Oct 07 21:51:58 prob here as well Oct 07 21:52:01 This is one concept that I've encountered many, many times. Even in web design (HTML versus CSS). Oct 07 21:52:01 CPH_DK you can Oct 07 21:52:15 And of course Javascript versus everything else. Oct 07 21:52:17 TacticalJoke, so you know what you said was a bad idea :3 Oct 07 21:52:18 JavaScript* Oct 07 21:52:22 create your layouts in CML and insert views as you please Oct 07 21:52:29 btu ti’s nto really.. dynamic Oct 07 21:52:30 tricknology can what? Oct 07 21:52:36 XML* Oct 07 21:52:59 tricknology You could use xml to position your controls and then use code for changing control states and so on? Oct 07 21:53:10 of course Oct 07 21:53:17 tricknology That is the same in win32 Oct 07 21:53:20 is there a way to auto complete EditText, such as a user enters data into one field and another field fills? Oct 07 21:53:33 tricknology can I link binary files into my resources? Oct 07 21:53:41 I think so Oct 07 21:53:45 CPH_DK:Thanks :) Is there a way to change all of them like you do when you create a new application? I'm looking for the App Icon Manager that you use when you first create the app Oct 07 21:53:47 tricknology It must be possible Oct 07 21:54:07 Mallot1 I dont know the specifics Oct 07 21:54:13 well usualyl you put whaever UI stuff you need in /res/ Oct 07 21:54:14 Mallot1 all of what? Oct 07 21:54:23 getResource() Oct 07 21:54:34 All the app icon sizes Oct 07 21:54:35 whatever you do with it is up to you Oct 07 21:54:39 tricknology I want to include all data files in resources so they end up in the apk Oct 07 21:54:42 you xml files are in /res/layout Oct 07 21:54:48 sure Oct 07 21:54:52 put them in res/raw/ Oct 07 21:54:52 Mallot1 you can do it dynamically Oct 07 21:55:04 like when you setup the icon at the beginning and then all the different sizes of your app are generated Oct 07 21:55:05 tricknology I am gonna look into that Oct 07 21:55:24 definitely do, just make sure you reference them with a dynamic path Oct 07 21:55:27 Mallot1 You can copy and scale the original icon Oct 07 21:55:33 <— had a bad few days with that once Oct 07 21:56:11 Mallot1: http://romannurik.github.io/AndroidAssetStudio/icons-launcher.html Oct 07 21:56:29 tricknology I tink I am gonna try to add the data files to a res file generated by my app Oct 07 21:56:47 tricknology That must be possible Oct 07 21:57:17 tricknology define a "dynamic path" for me Oct 07 21:57:21 tricknology Dont you think that it is a bit silly to have external data files when the data is that small? Oct 07 21:57:46 CPH_DK, fail to plan & you plan to fail. Oct 07 21:57:53 aretecode well put Oct 07 21:58:02 I had a hell of a time with a FOTRAN project once Oct 07 21:58:09 and in Java by using a static path Oct 07 21:58:10 aretecode in windows linking data into the exe is pretty easy Oct 07 21:58:21 thanks Oct 07 21:58:26 because the path on my computer was not the same as on the server Oct 07 21:58:34 in Android getResource() is fine Oct 07 21:58:49 tricknology Dynamic path = having variables make up the string? Oct 07 21:59:05 let me see if i can pull up the SO link.. Oct 07 21:59:36 how easy is it to publish apps on Play? Oct 07 21:59:56 It's easy Oct 07 22:00:00 A thousand ways to mess up. Oct 07 22:00:09 And a million dead apps. Oct 07 22:00:13 haha Oct 07 22:00:33 Agamemnus Can I publish an app with a name so obscure that the link is almost private? Oct 07 22:00:52 http://stackoverflow.com/questions/9716460/having-trouble-locating-connecting-to-a-database-using-relative-path Oct 07 22:00:55 there we go Oct 07 22:01:05 CPH_DK, then you might as well share the .apk. Oct 07 22:01:06 Yes. Oct 07 22:01:10 True that. Oct 07 22:01:17 aretecode That was what i meant Oct 07 22:01:43 aretecode It is because I want to be able to share the app with friends who does not have 3rd party apps enabled Oct 07 22:01:54 do Oct 07 22:01:57 It won't be invisible Oct 07 22:02:04 I know, but almost Oct 07 22:02:10 hard to find Oct 07 22:02:12 You can keep it in beta mode Oct 07 22:02:13 Forever Oct 07 22:02:16 If you want. Oct 07 22:02:24 Agamemnus Ok, and then provide updates? Oct 07 22:02:27 But they'll need to join a beta group Oct 07 22:02:34 CPH_DK, I suppose it is almost private. Oct 07 22:02:37 and you'll need to add it Oct 07 22:02:38 etc Oct 07 22:03:15 Agamemnus It does not need to be truly private, just not too easy to find, first when the game is more finished am I going to really publish it Oct 07 22:03:34 Agamemnus If people dl a crap game I will get bad reviews and so on Oct 07 22:03:34 sure Oct 07 22:03:48 yeah but usually they're invisible if you don't advertise, anyway Oct 07 22:03:51 I am going to add a lot of silly rule :) Oct 07 22:03:57 s Oct 07 22:04:10 and spacy effect Oct 07 22:04:10 s Oct 07 22:04:47 Agamemnus you think that using the alpha blending stuff to fade out block would look good? Oct 07 22:04:53 blocks Oct 07 22:05:01 CPH_DK seriously ? Oct 07 22:05:08 StingRay_ It is about java Oct 07 22:05:11 >.> try it and see Oct 07 22:05:16 aretecode ok Oct 07 22:05:31 Keep it private :# Oct 07 22:05:40 aretecode what? Oct 07 22:05:40 maybe Oct 07 22:05:43 what game is it Oct 07 22:05:51 Agamemnus a tetris clone Oct 07 22:05:53 ah Oct 07 22:05:55 yeah sure Oct 07 22:05:57 real fast effect Oct 07 22:06:00 that would work Oct 07 22:06:02 http://i.imgur.com/0UslH6R.png Oct 07 22:06:03 like .5 s Oct 07 22:06:16 YEs, I think so too Oct 07 22:06:53 Agamemnus The pic is a very rough draft Oct 07 22:06:59 A bigger bevel & emboss might look good too... Oct 07 22:07:08 i think he jokes Oct 07 22:07:15 Agamemnus I would think so Oct 07 22:07:19 are you using java, or Cordova/Javascript? Oct 07 22:07:22 The elipsis is there to provoke thought. Oct 07 22:07:23 Agamemnus Java Oct 07 22:07:31 oh Oct 07 22:07:38 that's not an ellipsis Oct 07 22:07:42 Agamemnus I am porting from C++ Oct 07 22:08:01 that's just 3 dots in a row Oct 07 22:08:05 :P Oct 07 22:08:14 Agamemnus?:) Oct 07 22:08:35 Agamemnus, prove it. Oct 07 22:08:56 there is a special character for ellipsis Oct 07 22:09:03 Agamemnus I am currently coding a simple gui class lib specifically for 2d games Oct 07 22:09:50 Agamemnus Does it look just approx okay? Oct 07 22:10:02 looks fine Oct 07 22:10:08 Agamemnus Thanks. Oct 07 22:10:16 Agamemnus Tha android API is very easy Oct 07 22:10:22 whihch is good Oct 07 22:11:34 CPH_DK, that's the tagline! "give it a try, it is very easy" Oct 07 22:11:51 aretecode Well easier than most C++ APis Oct 07 22:12:02 aretecode My last project was Direct3d Oct 07 22:12:06 that is complicated Oct 07 22:13:15 Even DirectDraw is sort of rough Oct 07 22:13:52 That's your Tetris clone? Oct 07 22:14:04 TacticalJoke Atm. Not finished Oct 07 22:14:10 TacticalJoke Lame i know Oct 07 22:14:16 Damn, your status bar is busy. lol Oct 07 22:14:27 It looks great. I'd like to try it when it's done. Oct 07 22:14:31 TacticalJoke I am gonna use dynamic score boards Oct 07 22:14:42 TacticalJoke That only appears at certain times Oct 07 22:14:46 s/status/notification/ Oct 07 22:14:52 appear Oct 07 22:15:06 s/bar/area/ (doh) Oct 07 22:15:09 TacticalJoke The score board is shown when full lines are removed Oct 07 22:15:18 TacticalJoke And then faded out Oct 07 22:16:01 yo Oct 07 22:16:04 I just got an idea Oct 07 22:16:07 don't steal it, K? Oct 07 22:16:14 TacticalJoke I have also made a font engine, the standard one uses vector graphics, that is way too slow Oct 07 22:16:21 Agamemnus ok Oct 07 22:16:26 tetris Oct 07 22:16:29 with animals Oct 07 22:16:32 Why is the score board shown when a line is removed? Oct 07 22:16:37 Oh, you mean the current score? Oct 07 22:16:54 although really it's a match-3 Oct 07 22:16:57 TacticalJoke There is a delay when the line remove effect is played, then I display the "control panel" Oct 07 22:17:02 tetris is like some crazy version of a match-3 Oct 07 22:17:05 or vice versa Oct 07 22:17:13 Agamemnus I am gonna have explosive blocks Oct 07 22:17:34 How are you drawing the blocks and stuff? Oct 07 22:17:38 Are you using a game engine right now? Oct 07 22:17:41 TacticalJoke Wanna see the code? Oct 07 22:17:46 TacticalJoke No, all my code Oct 07 22:17:47 Sure. :) Oct 07 22:17:55 The blocks are a great colour, BTW. Oct 07 22:18:01 Really Tetris-y. Oct 07 22:18:07 TacticalJoke ok, but there is 3500 lines Oct 07 22:18:09 are Oct 07 22:18:19 Did you draw those sprites (or whatever the word is)? Oct 07 22:18:24 TacticalJoke All graphcis are generated from algorithms Oct 07 22:18:26 For the blocks. Oct 07 22:18:38 TacticalJoke No, I wrote an algorithm for that Oct 07 22:18:45 Even the shadowing? Oct 07 22:18:49 yes Oct 07 22:18:58 TacticalJoke The method takes a color Oct 07 22:19:05 Damn, that's pretty impressing OR I know nothing about game programming OR both. Oct 07 22:19:12 impressive* Oct 07 22:19:31 TacticalJoke i am pasting to code for generating the blocks. 2 sec. Oct 07 22:19:35 i made bevel code as well Oct 07 22:19:48 I should get into graphics. It looks so... pleasing. Oct 07 22:19:50 it is s oftware Oct 07 22:19:57 but no opengl filter yet Oct 07 22:20:02 i want to have packages com.sj.gamedroid.sensors.accelerometer and com.sj.gamedroid.sensors.tiltsensor but every time I move one of them it makes the package sensors.accelerometer or sensor.tiltsensor instead of nesting them Oct 07 22:20:06 how do i fix that+ Oct 07 22:20:09 I just kinda assumed it was pre-drawn stuff. Interesting. Oct 07 22:20:35 TacticalJoke http://pastebin.com/xrHDt7Tu Oct 07 22:20:43 TacticalJoke No, everything is done by algorithms Oct 07 22:20:57 TacticalJoke Even the font engine Oct 07 22:21:14 TacticalJoke The font engine captures letters from the built in font engine Oct 07 22:21:39 Is "setBrightness" setting the opacity? Oct 07 22:21:53 TacticalJoke No, it is for adjusting brightness Oct 07 22:21:57 making a color lighter Oct 07 22:21:59 Oh. Oct 07 22:22:22 TacticalJoke You just multiply r g a b by the same factor Oct 07 22:22:30 That's really neat. Oct 07 22:22:39 TacticalJoke That way I can draw those block in any collor Oct 07 22:23:12 TacticalJoke If I just made that up now it was impressive, but I have beeing coding 2d games for many years Oct 07 22:23:15 troned: What do you mean when you mention moving a package? And which IDE? Oct 07 22:23:38 Nice. I'd love to do 2D-game programming. Oct 07 22:23:47 TacticalJoke but thanks anyway, getting so high complimennts for you, a very good coder, is nice Oct 07 22:23:50 Android studio Oct 07 22:24:02 TacticalJoke, if I copy paste the package into the other package it doesnt nest Oct 07 22:24:06 I'm not a good Android programmer, though. lol Oct 07 22:24:09 TacticalJoke I am writing a complete 2d game engine Oct 07 22:24:10 but creates sensors.accelerometer Oct 07 22:24:16 instead Oct 07 22:24:27 TacticalJoke I only started Android 2 weeks ago Oct 07 22:24:27 so i cant copy the next package into sensors Oct 07 22:24:46 troned: Hmm. Never tried. Sorry. Oct 07 22:25:13 CPH_DK: Can you show any of the engine code? Oct 07 22:25:15 TacticalJoke The best advice is, think about what you want and then divide the idea into simpler and simple sub-problems, that way you can do anything Oct 07 22:25:16 If it's not top-secret. :) Oct 07 22:25:22 True. Oct 07 22:25:24 TacticalJoke It is big, what part? Oct 07 22:25:34 eclipse says that eeeee says my app is already installed when I try to run my app on my tablet. And then the app doesn't open. I searched my android for the .apk but no luck, t5he app can be uninstalled though. What's wrong? Oct 07 22:25:38 Stuff like "putPixelRGB". Oct 07 22:26:00 TacticalJoke I use thest technique of using a lot of functions in one algoritgm to separate stuff Oct 07 22:26:07 TacticalJoke That is very short Oct 07 22:26:23 when multiplying brightness just remember that sRGB is non-linear, so multiplying by a number that goes from 0 to 1 will not lead to a linear increase in factual brightness (or even perceived brightness) Oct 07 22:26:34 TacticalJoke It just writes to an array and uses some bitwise operations Oct 07 22:26:40 (usually it doesn't matter, but when you start doing slightly more complex math with your colors, it can bite you) Oct 07 22:26:43 How are you actually drawing to the screen? Oct 07 22:26:45 Just wondeirng. Oct 07 22:26:51 wondering* Oct 07 22:26:58 Amadiro I know, but it works well with a factor Oct 07 22:27:05 TacticalJoke With a surfaceview Oct 07 22:27:41 Okay. Oct 07 22:28:13 TacticalJoke Here is the code for the BlockMap class: http://pastebin.com/NxpnHV17 Oct 07 22:28:19 will event.values.clone() create garbage? I guess so... Oct 07 22:28:21 TacticalJoke That is the one drawing the blokcs Oct 07 22:28:23 also, are you blitting each pixel to the screen manually...? Oct 07 22:28:33 Amadiro Of course not Oct 07 22:28:42 good, I was worried for a second Oct 07 22:28:49 that'd drain your battery really fast Oct 07 22:28:58 Amadiro I first draw stuff then save it as a bitmap and then draw that Oct 07 22:29:12 Amadiro That is i draw stuff before the inner loop Oct 07 22:29:36 yeah, that's a fine thing to do Oct 07 22:29:53 although you don't want to do it for too many things, since it still counteracts compression (so increases your vram usage) Oct 07 22:30:00 Amadiro Wanna see my Frame class that I use to draw Frames? Oct 07 22:30:05 sure Oct 07 22:30:20 Amadiro vram is not an issue in a 2d engine really Oct 07 22:30:32 Nice. I love algorithmic stuff. Oct 07 22:30:38 I wouldn't say that -- it entirely depends on how much art you have Oct 07 22:30:51 loads of 2D engines do compression to lower vram usage Oct 07 22:30:54 Amadiro If I dont do scrolling Oct 07 22:31:10 Amadiro scrolling can be hard on vram Oct 07 22:31:40 My project lost the android framework (using intellij) how do I fix this? Oct 07 22:31:42 Amadiro but you can use like one 4x1 screens and then redraw the tilemap Oct 07 22:31:58 lasserix The SDK? Oct 07 22:32:02 4x1 screens? Oct 07 22:32:03 Amadiro http://pastebin.com/Rmt5aTJT Oct 07 22:32:04 i am not sure Oct 07 22:32:21 Amadiro for scrolling Oct 07 22:32:27 i added .idea/ to my gitignore i am not sure if it is related Oct 07 22:32:28 not sure what you mean Oct 07 22:32:44 Amadiro The Frame class is the base class for anything using bitmaps like sprites and stuff Oct 07 22:32:46 but you can scroll an (semi)-infinite level okay if you use GLES and stream in the textures Oct 07 22:32:59 Amadiro GLEs? Oct 07 22:33:03 opengl es Oct 07 22:33:32 Amadiro yES, but if it is has to look like normal 2d hi res you need a very high res texture Oct 07 22:33:48 Amadiro And then you need the same amount of vram (without compression) Oct 07 22:34:15 yeah, but you can make it work okay. Even on the nintendo DS (which is significantly weaker than basically any android target) Oct 07 22:34:40 Amadiro A better solution is to have 4x1 screens and then when you reach the end you redraw the tilemap (which can be much bigger than 4x1) Oct 07 22:34:55 still not sure what you mean by 4x1 Oct 07 22:35:04 Amadiro 1x1 is having just one static screen Oct 07 22:35:21 Amadiro 2x1 is having 2 screens to scroll over in the x direction Oct 07 22:35:30 Amadiro in sequence Oct 07 22:35:33 oh... well, that is way more than you need Oct 07 22:35:44 you can tile the screen up into a bunch of tiles so that you only have, say, 20% overlap in each direction Oct 07 22:35:47 Amadiro no, it is the minimum Oct 07 22:36:03 Amadiro Yes, but then you have to redraw the tilemap constantly Oct 07 22:36:14 Amadiro And then the background is not scrolling Oct 07 22:36:22 not sure what you mean Oct 07 22:36:32 you would move the tiles, which makes the background scroll Oct 07 22:36:36 Amadiro Ok, another day then Oct 07 22:37:03 and you can generate new tiles on any side of the screen, load in their texture and generate UV coords and then go nuts Oct 07 22:37:26 so you can also mostly decouple the sizes of your tiles from the size of your textures Oct 07 22:38:20 Amadiro UV chords just uses different parts of the texture, it is a good way to scroll, yes, maybe the most optimized, BUT it does NOT give you infinite scroll range, it might be bigger than 4x1 and still run well, but there are limits Oct 07 22:38:43 I don't mean you should scroll the UV coords here, btw Oct 07 22:39:08 Amadiro What then? Oct 07 22:39:09 In this method I'm scrolling the tile geometry around and generate new tiles/drop old tiles as the screen is moving about Oct 07 22:39:30 overall it uses a VBO of fixed size for the tile geometry, you just overwrite it with new geometry and new UV coords Oct 07 22:39:31 Amadiro Yes, redraw the tilemap Oct 07 22:39:48 But why change the UV coords if not to scroll? Oct 07 22:40:09 CPH_DK, the screen is re-drawn every single frame, yeah, which creates the illusion of scrolling Oct 07 22:40:27 the uv coords it simplified put a rectanle of the texture you are applying to your polygon Oct 07 22:40:45 Amadiro Have you ever implemented it?` Oct 07 22:40:58 CPH_DK, yes, I have Oct 07 22:41:08 the basic idea is that you can think you look down onto a pavement that is made from tiles Oct 07 22:41:12 Amadiro Ok, I am not saying you are wrong, but you are leaving out some details Oct 07 22:41:13 and as you move around, looking down Oct 07 22:41:23 you build the tiles in the direction you are going Oct 07 22:41:30 and you deconstruct them where you are moving away from Oct 07 22:41:35 Amadiro yes, drawtilemap(x,y) and then change x and y Oct 07 22:41:42 and clip Oct 07 22:41:59 yes, except the geometry and the texture for the tiles that are not on screen is not loaded yet Oct 07 22:42:00 I have used that technique Oct 07 22:42:19 so you can create a "guard strip" of pre-loaded tiles and textures around the screen, but it doesn't need to be more than e.g. 20% of the screensize Oct 07 22:42:28 (unless you allow for very fast and sudden movements) Oct 07 22:42:34 Amadiro That is a not good, lpading texture duging then rendering loop is to be aoivded if possible Oct 07 22:42:56 CPH_DK, well, yes, I'm talking about a technique here for the situation where you can't avoid it because the level is infinite (or very large) Oct 07 22:43:04 If anyone very familiar with APT / provided could help me figure out this issue I'd really appreciate it. I can't get this simple test project to work when the APT plugin is applied. https://github.com/jacobtabak/Robolectric-Dagger-Skeleton Oct 07 22:43:16 if you just want to keep the entire level preloaded, that's also fine with this technique (in that case, it just doesn't add anything) Oct 07 22:43:24 Amadiro Ok, that makes sense, but my way it to combine scrolling the screenbuff and redrawing the tiles Oct 07 22:45:48 Amadiro for exmaple having 3x1 screens, drawing the first 3 screnns of the tilemap and the scroll in the x direction, when you reach the last screen then you redraw screen 3 od the tilemap on screen 1 and tilemap 4 and 5 on screen 2 and 3 and change back to scrollx = 0; Oct 07 22:45:51 CPH_DK is going to be an Android guru after this week Oct 07 22:46:03 tricknology Am I that bad?:( Oct 07 22:46:12 lol no no not at all Oct 07 22:46:17 tricknology :Ok :) Oct 07 22:46:23 your questions are high level and entertaining Oct 07 22:46:33 tricknology I have been doing 2d games for MANY years Oct 07 22:46:38 it seems like it Oct 07 22:46:38 CPH_DK: have you implemented your collision detection on android ? Oct 07 22:46:44 CPH_DK, that is basically very similar to the technique I was talking about, except with my technique, you don't really need to ever reset scrollx and scrolly, you can just keep infinitely scrolling in any direction Oct 07 22:46:53 shmoon part of it Oct 07 22:47:03 and it won't waste 3 screenbuffer-sized vram pieces Oct 07 22:47:07 Amadiro And that requires a lot of varm Oct 07 22:47:15 no no, it requires less vram. Oct 07 22:47:15 Amadiro How would it not? Oct 07 22:47:28 because you only have f.ex. 20% overdraw Oct 07 22:47:33 Amadiro You only redraw the tilemap? Oct 07 22:47:41 CPH_DK, let me draw a picture... Oct 07 22:47:52 oooh ASCII art? Oct 07 22:47:59 Amadiro Ok, I think I have read about something similar, I just think my implem is simpler Oct 07 22:48:15 yes, yours is simpler Oct 07 22:48:31 Amadiro In mine you can have a background pic, or you can even add more layers of scrolling Oct 07 22:48:43 yeah, you can also do that with the tiles technique Oct 07 22:49:08 Amadiro But you need to redraw the entire tilemap every frame? Oct 07 22:49:29 does anyone have a gitignore for an intellij / gradle project? Oct 07 22:49:46 CPH_DK, not sure what you mean, when you render with GLES, you generally always redraw the entire screen Oct 07 22:49:50 nothing more and nothing less Oct 07 22:49:52 tricknology I found an app that could convert any bitmap into ANSI :) Oct 07 22:50:02 * tricknology thinks he will DL IntelliJ tonight Oct 07 22:50:04 Amadiro Not the screen, the tilemap Oct 07 22:50:27 Amadiro In moderns 2d apps the screen is always redrawn, it is simpler Oct 07 22:50:41 I almost wrote one taht did colors and everything in ASCII Oct 07 22:50:45 but stuff came up Oct 07 22:51:17 Amadiro In older engines the sprites are drawn (first the area under it is saved) and then they are deleted again by drawing the saved background¨ Oct 07 22:51:50 Amadiro To miniize the amount of pixel data being copied in the innnerloop Oct 07 22:51:54 tghat seems like a hack Oct 07 22:52:08 tricknology All older games were written like that Oct 07 22:52:20 I feel like in android you would call removeFromView(object) Oct 07 22:52:40 err. Oct 07 22:52:41 tricknology too slow, you need to write custom code for rendering Oct 07 22:52:49 removeView() Oct 07 22:53:12 tricknology I use a derivative of a SurfaceView class for drawing Oct 07 22:53:42 dang, I think I lost my pen Oct 07 22:53:54 tricknology That is a 2d version of an OpenGL something Oct 07 22:53:59 tricknology: If you're goin to download IntelliJ, you might as well download Android Studio, right? Oct 07 22:54:13 MikeClassic Atm IntellliJ is better. Oct 07 22:54:17 is it? Oct 07 22:54:18 AS is not done Oct 07 22:54:22 true Oct 07 22:54:24 it is beta Oct 07 22:54:30 tis beta Oct 07 22:54:37 MikeClassic I use intelliJ, full version, very nice Oct 07 22:54:39 but aren't IntelliJ features stable? Oct 07 22:54:43 hmm ok Oct 07 22:54:48 Pretty stbale Oct 07 22:54:53 the IntelliJ part of AS that is Oct 07 22:54:54 I’m not trying to figure out a new IDE until it’s release Oct 07 22:55:07 MikeClassic I am used to the newst VS C++ and that is very fancy Oct 07 22:55:13 coem up on a bug and spend hours only to find out it’s a bug Oct 07 22:55:18 updates every damn day Oct 07 22:55:23 fair enough Oct 07 22:55:27 I tried for abotu 30 mins before I went back to Eclipse Oct 07 22:55:28 MikeClassic I would use INtellij until AS is done Oct 07 22:55:31 that's why I'm still using.. ugh.. eclipse w/ Android SDK Oct 07 22:55:58 I am pleased with INtelliJ is has loads more features than MS VS C++ and that IDE is very advanced Oct 07 22:56:20 It has plugins, so you can add extremelly many cool features Oct 07 22:56:44 MikeClassic Wanna see screenshot of my setup? Oct 07 22:56:46 a Oct 07 22:56:56 yeah Oct 07 22:57:00 ok, 2 sec Oct 07 22:57:24 MikeClassic http://i.imgur.com/ivCmayS.jpg Oct 07 22:57:31 MikeClassic It looks very cool imo Oct 07 22:57:53 I use PHPStorm so that looks very familiar Oct 07 22:58:05 nice Oct 07 22:58:15 MikeClassic You can customize it endlessly Oct 07 22:58:16 this is IntelliJ developping with Android? Oct 07 22:58:28 MikeClassic Yes, that pic is andoird Oct 07 22:58:30 android Oct 07 22:58:35 MikeClassic. android studio is great. worth leaving eclipse for. Oct 07 22:58:46 AS is based on intellij Oct 07 22:58:55 whatitis Does AS work now? Oct 07 22:58:57 definitely? what if I already have an existing projecti n Eclipse though? Oct 07 22:59:14 MikeClassic You will have to reimport your files I think Oct 07 22:59:15 just import it Oct 07 22:59:23 it will do almost all of the magic Oct 07 22:59:23 Maybe there is a converted plugin Oct 07 22:59:23 mikeclassic, if you are just a hobbyist yes Oct 07 22:59:25 is it a difficult/tricky/messed up process? Oct 07 22:59:29 no Oct 07 22:59:32 it used to be Oct 07 22:59:36 now it's much easier Oct 07 22:59:42 whatitis: If I'm just a hobbyist, yes to what? Oct 07 22:59:43 All the config data is in the files Oct 07 22:59:46 oh good Oct 07 22:59:46 cph_dk, has it not worked? Oct 07 22:59:48 you guys are convincing me Oct 07 22:59:52 i literally changed my IDE today Oct 07 22:59:55 should I go to IntelliJ itself or straight to AS? Oct 07 22:59:55 whatitis I mean it had been in beta for some time Oct 07 22:59:58 from eclipse to AS Oct 07 22:59:58 CPH_DK, https://dl.dropboxusercontent.com/u/21559589/tiles.png Oct 07 23:00:09 last time i tried was in january Oct 07 23:00:15 CPH_DK, the big red box is the visible viewport, the smaller red boxes are tiles that are moved around as you scroll Oct 07 23:00:18 but the import procedure was too hard Oct 07 23:00:28 now it was just a few clicks Oct 07 23:00:30 and then, depending on in which direction you are scrolling, new tiles are created so that you don't scroll "off" the tiles Oct 07 23:00:35 and my project has grown a lot since Oct 07 23:01:19 ok so I'll go from Eclipse straight to AS Oct 07 23:01:29 thanks, I always heard the process was a bitch Oct 07 23:01:34 but I guess time has passed and they've improved on things Oct 07 23:01:43 Amadiro I think you are leaving out something Oct 07 23:01:57 CPH_DK, what's that? Oct 07 23:02:11 Amadiro Hmm, you are drawing in 3d space? Oct 07 23:02:18 doesn't matter Oct 07 23:02:24 works either way Oct 07 23:02:37 in 3D the math to figure out which tiles are visible or invisible becomes a lot harder though Oct 07 23:02:42 Amadiro It does, because drawing to 2d screen buffer coordinate space it limited, in 3d space it is not Oct 07 23:03:00 uh, no? GLES doesn't make a difference there Oct 07 23:03:12 Amadiro It might not, but there is Oct 07 23:03:14 GLES isn't even aware whether you draw 2D or not... it just processes your matrices Oct 07 23:03:24 for the GPU, it's all the same Oct 07 23:03:24 Amadiro 3d apis have openended coord space Oct 07 23:03:38 Amadiro Well, real 2d does not use many matrices Oct 07 23:03:56 Amadiro it is just memoery adresses Oct 07 23:04:20 there aren't really any "2D APIs" anymore, everything just happens through GLES these days :) Oct 07 23:04:24 Amadiro In your model you need some algorithm to calculate the posittion of tiles?` Oct 07 23:04:26 the homescreen of your phone is drawn through it Oct 07 23:04:29 Amadiro I know Oct 07 23:04:32 every game, whether 2D or 3D Oct 07 23:04:32 etc Oct 07 23:04:49 Amadiro It is a texture on rectangular polygon Oct 07 23:04:50 http://stackoverflow.com/questions/26246691/daggerrobolectricgradleapt-source-not-generated-for-test-module Oct 07 23:04:52 no, you don't need to calculate the position of the tiles Oct 07 23:04:59 CPH_DK, what is? Oct 07 23:05:01 Amadiro I am not getting it fule Oct 07 23:05:18 Amadiro The 2d screen on anrroid Oct 07 23:05:29 i see a number picker on the first screenshot in http://developer.android.com/guide/topics/ui/settings.html . how is this number picker called? when i google for "number picker preferences", i only get some custom implementations Oct 07 23:05:29 Amadiro If you use a TextureView at least Oct 07 23:05:53 Amadiro I think that also Surfaceview is a polygon Oct 07 23:06:06 Amadiro it has to be. OpenGL does not do normal 2d graphics Oct 07 23:06:20 well, it doesn't really matter, you can use polygons or squares for it, but the math is the easiest for squares Oct 07 23:06:31 CPH_DK, OpenGL is agnostic on dimensionality Oct 07 23:06:42 you can render 3D, 2D, 1D or even 4D graphics with it, if you really want Oct 07 23:06:47 Amadiro`Ok? Direct3D is hardwired to 3d Oct 07 23:06:58 no, Direct3D is the same too Oct 07 23:07:12 Amadiro You can only do 2d grapphics in Direct3d by using polygons Oct 07 23:07:16 all they do is take matrices and vectors in, and then they spit 2D pixels into a framebuffer Oct 07 23:07:37 Amadiro yes, then it is a simplefied "3d" where one coord is ignopred Oct 07 23:07:39 well, Direct3D doesn't support polygons anymore in recent versions... only triangles. Same for OpenGL Oct 07 23:07:49 Amadiro I call triangles polygons Oct 07 23:07:52 CPH_DK, nah, the coordinate is simply not there in the first place Oct 07 23:08:03 when you upload geometry data to the GPU, you can specify how it's laid out Oct 07 23:08:03 Amadiro That is my point :) 2d Oct 07 23:08:11 for instance 3 floats for 3D, 2 floats for 2D, etc Oct 07 23:08:14 Amadiro I wrote a 2d engine in direct3d Oct 07 23:08:25 Amadiro I know that stuff, vertex format Oct 07 23:08:49 so either way, GL/D3D doesn't know about whether you are drawing in 2D or 3D or any mixture of the two, really Oct 07 23:08:57 Amadiro But as I recall it I needed a projection matrix to position it correctly Oct 07 23:09:20 Amadiro Let us call it vector graphisc, that is what I mean, really Oct 07 23:09:27 well, a *projection* matrix is only needed when you want to have a *projective* view onto the scene Oct 07 23:09:46 so for a 2D application, you would not use a *projection* matrix but for instance an orthogonal matrix Oct 07 23:09:49 or just no matrix at all Oct 07 23:10:13 Amadiro My vertices onyl had 2 coords and then I constructed rectangles with 2 triangles and applied textures to those Oct 07 23:10:45 Amadiro That is the thing, I did use some kind of transformation to get it displayed "like 2d" Oct 07 23:11:20 Amadiro I never got very deeply into it, but I get the basics Oct 07 23:11:48 yes, that transformation is usually an orthogonal projection Oct 07 23:11:49 Amadiro Maybe it was a function where i set the camera transformation, maybe Oct 07 23:11:55 but if you want, you don't need to have any kind of transformation Oct 07 23:11:59 Yes, that sounds familiar Oct 07 23:11:59 but it is generally useful to have one Oct 07 23:12:15 Amadiro It bugs me abit that I dont get all the math Oct 07 23:12:24 Amadiro I get linear algebra of course. Oct 07 23:12:41 But I would not know how to conrstuct a matrices that positions the camera Oct 07 23:12:41 well, MIT OCW offers free video courses on linear algebra Oct 07 23:12:44 that's a nice place to start Oct 07 23:12:53 Amadiro I know linear algebar Oct 07 23:13:05 your chitchat is drowning out my question Oct 07 23:13:06 * JacobTabak rages Oct 07 23:13:24 JacobTabak sorry, go on Oct 07 23:13:36 its all here http://stackoverflow.com/questions/26246691/daggerrobolectricgradleapt-source-not-generated-for-test-module Oct 07 23:13:47 Amadiro but woyld you know ho to, from scratch to construct the matrix than transforms the vertices to position the camera? Oct 07 23:13:48 i will just keep pasting it every few min, go about your business Oct 07 23:13:49 its possible to force to recreate a main activity A from activity B IF the user push a button? Oct 07 23:13:52 CPH_DK, you really should join ##programming & #gamedev Oct 07 23:14:11 CPH_DK yeah you are off on one Oct 07 23:14:20 I am not foing on alone Oct 07 23:14:21 makes me want to use the ignore all button (quit) Oct 07 23:14:40 CPH_DK, the next thing would then probably be to learn about projective spaces: http://en.wikipedia.org/wiki/Projective_space Oct 07 23:14:41 Amadiro Stop saying COOL stuff"!!:D Oct 07 23:14:47 cliffreich yes Oct 07 23:14:48 Amadiro Cool. Oct 07 23:14:56 Amadiro Are you well into it? Oct 07 23:14:57 that'll explain why the matrix you are using is 4x4 for 3D rather than the normal 3x3 Oct 07 23:15:09 Amadiro COol, will look into that Oct 07 23:15:11 I've done 3D and 2D graphics for quite a few years, yeah Oct 07 23:15:21 Amadiro Cool, then you are my go to gyu :) Oct 07 23:15:27 JacobTabak how? do i need to wipe the main activity state and then "backstack()" or something? Oct 07 23:15:29 search for launch mode Oct 07 23:15:30 http://developer.android.com/guide/topics/manifest/activity-element.html Oct 07 23:15:42 ok Oct 07 23:15:42 ty Oct 07 23:15:43 cliffreich You could store the code in an extern method Oct 07 23:15:54 cliffreich Start new thread and the call that method Oct 07 23:15:59 CPH_DK what are you talking about Oct 07 23:16:12 JacobTabak Just read the q literally Oct 07 23:16:20 do you know what an activity is Oct 07 23:16:37 also there is no such thing as an external method in java Oct 07 23:16:37 JacobTabak it is the main thread Oct 07 23:17:05 JacobTabak I mean having the code in another class /methods Oct 07 23:17:26 your answer did absolutely nothing to help him solve his problem Oct 07 23:17:39 JacobTabak My soludtuon is very workable Oct 07 23:17:41 solutuon Oct 07 23:17:43 slution Oct 07 23:17:45 ffs Oct 07 23:17:48 you have literally no idea what you're talking about though Oct 07 23:17:56 in the context of java/android Oct 07 23:18:02 JacobTabak Ok, so it is not the main thread? Oct 07 23:18:07 CPH_DK nohttp://developer.android.com/guide/components/activities.html Oct 07 23:18:36 activities have nothing to do with threading other than that their UIs are created and modified on the main thread Oct 07 23:18:44 JacobTabak Thanks, so the MAIN thread is the main thread, sort of Oct 07 23:18:47 no. Oct 07 23:18:50 Ok. Oct 07 23:18:53 It sounds like it Oct 07 23:18:54 you can also have many activities within an application Oct 07 23:19:06 hence his application about restarting an existing one Oct 07 23:19:11 s/application/question Oct 07 23:19:19 JacobTabak Ok, but an activity contains a "runnable"? Oct 07 23:19:21 Hey JacobTabak what is forcing you to use apt? Oct 07 23:19:28 Afzal AndroidAnnotations Oct 07 23:19:38 I'm migrating off of it, but it will be a while Oct 07 23:19:44 I would like to have tests *before* the migration rather than after Oct 07 23:19:53 JacobTabak I cant be right eery time. I helped someone before, :) Oct 07 23:19:55 CPH_DK an activity is a java class. any java calss can contain a runnable Oct 07 23:20:27 JacobTabak I know, but an activity is "like" a thread with no "threading"? Oct 07 23:20:28 do you know about the 4 main contexts of an application CPH_DK Oct 07 23:20:36 JacobTabak please stop…as far as I can see the main aim for CPH_DK is to get lines in the chat :) You are feeding him Oct 07 23:20:42 an activity is exactly what that doc says it is Oct 07 23:20:43 read it Oct 07 23:20:49 StingRay_ I am tryying to learn Oct 07 23:20:53 READ Oct 07 23:20:55 no you are not Oct 07 23:20:58 or you would read docs Oct 07 23:21:00 JacobTabak Sorry, I am trying to take shortcuts Oct 07 23:21:07 you are attempting to take up this chat entirely Oct 07 23:21:13 StingRay_ did you see my question earlier Oct 07 23:21:19 ok. I will start counting lines. Oct 07 23:21:21 reading back you are 60% of the content Oct 07 23:21:21 ah, can't help you there. Sorry Oct 07 23:21:21 Sorry Oct 07 23:21:27 thx for looking Afzal Oct 07 23:21:28 90% irrelevant to the channel too Oct 07 23:21:29 StingRay_True, Sorry Oct 07 23:21:33 dont care Oct 07 23:21:38 http://stackoverflow.com/questions/26246691/daggerrobolectricgradleapt-source-not-generated-for-test-module @StingRay_ Oct 07 23:21:40 I have hit the point of ignore all Oct 07 23:21:43 see ? Oct 07 23:21:43 I do, I dont want to ruin it for people Oct 07 23:21:44 just throwing it out there Oct 07 23:21:53 gah he left Oct 07 23:22:06 I doo talk too much. ¨ Oct 07 23:22:07 Sorry Oct 07 23:22:11 JacobTabak, maybe this will help https://github.com/nenick/android-gradle-template/ Oct 07 23:22:20 JacobTabak I will save you link. Thanks Oct 07 23:22:29 no APT? Afzal Oct 07 23:22:31 but that's just a really confusing build.gradle in that example link Oct 07 23:22:40 oh wait it does have it Oct 07 23:22:43 it's in the 2nd level dir Oct 07 23:23:12 i think the issue with that is he's not using dagger in his project Oct 07 23:23:20 its just a dep for some other lib Oct 07 23:25:50 JacobTabak Thanks, that activiy concept makes sense for tablets and phones, Oct 07 23:26:39 JacobTabak So you can have like several "dialog boxes" of sorts with code and switch betwween them? Oct 07 23:30:22 JacobTabak humm i think im too noob... but then i have to declare main activity as "singleTask", and start main activity A from activity B using the regular intent mode to create activities? Oct 07 23:31:00 or was singletop Oct 07 23:31:09 cliffreich_ Are it data memnbers hidden? Oct 07 23:31:13 its Oct 07 23:32:31 damn disconnected again Oct 07 23:32:41 i couldnt read anything for the last 30 secs Oct 07 23:32:56 I know almost nothing about high level stuff, Oct 07 23:34:26 and dc again Oct 07 23:35:05 The main activvity is still just derived from an Activity class, right? Oct 07 23:36:10 Is it possible to create aonther instance of the derivate of Acitivy and transfer control to that instance? Oct 07 23:36:20 i understand what you meant, you can do anything on method B and then when you want to return you can send something likee an EventBus message to main activity then itll know its time to recreate Oct 07 23:36:35 using methods to reload content Oct 07 23:36:35 No, i got that, this is a new odea Oct 07 23:36:36 idea Oct 07 23:37:07 cliffreich You can copy your data members yourself and built in stuff with sets and gets Oct 07 23:37:20 Just an ideas, might not work Oct 07 23:37:41 yes that too Oct 07 23:37:57 _DK = Department of Krazy Oct 07 23:38:18 cliffreich_ You can start the new instance via an Intent Oct 07 23:38:50 Intent intent = new Intent(this, SignInActivity.class); Oct 07 23:38:50 startActivity(intent); Oct 07 23:38:56 might work Oct 07 23:39:03 genymotion can't run L can it? Oct 07 23:39:55 cliffreich_ I am not making it up. You could try it until the expert gets back Oct 07 23:40:37 with lauchmode in theory id just have to use regular intent call and then the main activity as singletask then the onNewIntent would call it without start a new instance. but im not sure if itll recover its state, i dont want that, i want a single instance but recreate at will Oct 07 23:40:40 cliffreich, what are you doing? is b always started from a? does anything in b affect a? why new a from b? why not finish b togo back a. what is the context of your question? Oct 07 23:41:14 not always... A start B, but then something can happen on B and then id need to recreate A from there Oct 07 23:41:41 why recreate? why not start for result? Oct 07 23:41:42 cliffreich_ Cant you "inherit" those properties somehow? in win32 you can inherit stuff from the main thread Oct 07 23:42:05 cph this isnt c++ or win32 Oct 07 23:42:19 whatitis it is, I am jsut trying to "apply" it :) Oct 07 23:42:26 quit Oct 07 23:43:14 whatitis i thought about that, i wanted to create methods for "reload data" Oct 07 23:43:31 * cliffreich_ feels lazy Oct 07 23:43:31 i mean Oct 07 23:43:32 i didnt want to create methods to reload data Oct 07 23:43:35 from activity A Oct 07 23:43:45 YonCAN actually inherit some properties Oct 07 23:44:12 cliffreich. if a always starts b& wants a result be it new or not, just startActivityForResult from a for b Oct 08 00:09:27 should .idea/libraries be added to a gitignore file? Oct 08 00:17:40 .idea *.iml target Oct 08 00:20:11 where does intellij keep the gradle caches? same place android studio does? Oct 08 00:20:23 thanks Oct 08 00:20:40 gradle cache is in ~/.gradle/caches Oct 08 00:22:07 i have a custom view that notifies its parent if the close button is clicked.. the parent runs a TranslateAnimation to close… what’s the proper way to dispose of the end animation listeners fires? currently i use removeView(myView), then myView = null, but i get a NPE Oct 08 00:22:25 *dispose when the.. Oct 08 00:22:58 "what’s the proper way to dispose of the end animation listeners fires? " --> drunk? Oct 08 00:23:23 no i corrected myself Oct 08 00:23:46 i wish, though Oct 08 00:24:10 i dont understand what happens there - if i do something with gradle from the command line, it fetches stuff for its cache - but when i load AS it seems to do it again Oct 08 00:24:18 i wonder if it has a separate cache Oct 08 00:24:43 yeah Oct 08 00:24:45 thats what i mean Oct 08 00:24:55 like ill just push a new snapshot to my local repo Oct 08 00:25:03 then invalidate/delete .gradle/cache but still have old snapshot Oct 08 00:35:09 so i have this lib thats generatign some code Oct 08 00:35:27 and its going into build/intermediates/classes/debug/ Oct 08 00:35:33 any way to get android studio to pick that up? Oct 08 00:35:37 it builds and runs fine. Oct 08 00:35:54 (the directory is purposefully hidden from the project explorer) Oct 08 00:37:08 I suppose I could make a task to copy them Oct 08 00:38:44 there's a gradle property that lets you specify your src directory. Take a look at that Oct 08 00:39:11 i tried it, but it's hidden from the IDE completely :\ Oct 08 00:39:15 java.srcDirs = ['src/main/java', 'build/intermediates/classes/debug/'] Oct 08 00:39:30 i'll remove that extra slash.. Oct 08 00:39:50 no dice Oct 08 00:40:39 MikeWallaceDev: I solved it, btw Oct 08 00:40:56 MikeWallaceDev Oct 08 00:41:00 erm :) Oct 08 00:41:04 was trying to search :) Oct 08 00:41:15 i've got the following code to get letter width from a certain textview. https://bpaste.net/show/cb1e33b2ee2d Oct 08 00:41:32 JesusFreke: about what I solved? removing shareduserid from a flavor in gradle Oct 08 00:41:40 it works fine on api version 8 to the latest, but on android l it returs a bigger value Oct 08 00:41:45 dragorn: ahh, ok Oct 08 00:41:54 any idea? Oct 08 00:42:29 JesusFreke: turns out it can't be done through manifestmerge so i ended up hooking all variants, checking the flavor name, hooking the processManifest function in the variant, and doing a string replace to remove it Oct 08 00:42:32 JesusFreke: sure is ugly Oct 08 00:42:38 if i measure width of a letter on the same textview, but if it's actually displayerd, the value is correct Oct 08 00:42:46 heh, yeah Oct 08 00:42:57 but if it works.. :D Oct 08 00:48:31 JacobTabak look at variant.addJavaSourceFoldersToModel(sourceFolder1, sourceFolders2,...) Oct 08 00:48:57 JesusFreke: works enough for now Oct 08 00:48:58 g00s i don't think that will help because i can build/run no problem Oct 08 00:49:02 its just an IDE issue Oct 08 00:49:08 not picking up the generated symbols Oct 08 00:49:14 JacobTabak yeah, thats for the IDE Oct 08 00:49:14 do you disagree? Oct 08 00:49:17 ok, thank you sir Oct 08 00:49:40 its amazing how badly this crap is documented at this point in the game, its been almost 2 years Oct 08 00:50:05 its weird because the dir is actually hidden Oct 08 00:50:09 from the project explorer Oct 08 00:50:16 yes Oct 08 00:51:25 JacobTabak Can I ask a language specific Q? Oct 08 00:51:32 omg dont ping me just ask in the chat Oct 08 00:51:52 JacobTabak Ok:) Can you implement somthing similar to the singletong class in Java? Oct 08 00:51:56 -g Oct 08 00:51:57 ignored Oct 08 00:52:01 ok Oct 08 00:52:14 CPH_DK start goofling an stop asking easily googleable questions Oct 08 00:52:23 i just cant believe he pings me the second after i ask him not to Oct 08 00:52:33 g00s Ok, I willl ememeber Oct 08 00:52:34 r Oct 08 00:52:35 'google java singleton' is that so hard Oct 08 00:52:57 people's time is valuable Oct 08 00:53:18 Sorry, only Android specific Qs. Oct 08 00:53:20 lots of people here generous with their time - ask good questions Oct 08 00:53:36 like, not stuff in the docs, FAQs, java questions, etc Oct 08 00:53:43 g00s Ok. Oct 08 00:53:58 there is also #java (but don't tell them you are using android) :D Oct 08 00:54:09 CPH_DK say my name Oct 08 00:54:19 g00s I do see my q was stupid looking at the code Oct 08 00:54:25 CPH_DK say JacobTabak Oct 08 00:55:08 * JacobTabak shrugs Oct 08 00:55:17 JacobTabak: try holding a gun to his head Oct 08 00:55:18 I am not THAT slow Oct 08 00:55:22 :) Oct 08 00:55:46 i tried to just mute it from pinging Oct 08 00:56:57 JacobTabak If it will help? or is it sarcasm? Oct 08 00:57:13 yay it worked Oct 08 00:57:28 g00s have you used this before? Oct 08 01:03:51 JakeWharton if you have a moment sometime, I've been pasting this for a few hours without much luck. I saw you posted an answer to a similar question on stackoverflow, so thought you might have an idea what's going on. http://stackoverflow.com/questions/26246691/daggerrobolectricgradleapt-source-not-generated-for-test-module Oct 08 01:04:21 is the module adapter generated? Oct 08 01:04:32 for the test configuration Oct 08 01:04:39 not when I use APT Oct 08 01:05:06 i set up a few branches to easily switch between the different cases- some work and some dont, and i've stripped out everything that's not relevant Oct 08 01:05:07 the folder is just empty or doesn't exist? Oct 08 01:05:25 the $$ file doesn't exist, i'll check again now Oct 08 01:05:29 just for the test module Oct 08 01:06:25 there's no generated files in build/generated/source/apt/test/, Oct 08 01:06:32 http://cl.ly/image/0T2a1G363S2b Oct 08 01:06:39 run with --debug Oct 08 01:06:45 what's the output of the java compile command Oct 08 01:06:47 for test sources Oct 08 01:07:17 lot of output here, may take a sec Oct 08 01:08:11 not implying you'd have time, but if you do git@github.com:jacobtabak/Robolectric-Dagger-Skeleton.git Oct 08 01:08:12 its in master Oct 08 01:08:19 (as i'm sifting through this output) Oct 08 01:08:29 i'm on mobile Oct 08 01:08:38 k sec Oct 08 01:14:45 I'm looking to have an app built to output a few RSS feeds, use facbeook authentication, accept photo uploads to a web server, accept form input to a web server...how difficult is that? I'm being quoted $100/mth for an android & apple app, and just trying to figure out if that's worth it...seems a bit much. Oct 08 01:27:36 JacobTabak yeah i've used it Oct 08 01:27:54 here's the output, i'm really trying to find something useful in it http://pastebin.com/h8zq09cG Oct 08 01:28:18 g00s no luck :\ Oct 08 01:29:45 JacobTabak are your dingleberries causing these problems ? Oct 08 01:30:12 JakeWharton here's the line to build test classes @JakeWharton http://pastebin.com/iQZB3q3r Oct 08 01:30:16 er sorry double Oct 08 01:30:26 g00s yes, in the process of removing a big dingleberry known as androidannotations Oct 08 01:30:42 yeah, sounds like one Oct 08 01:31:28 doesn't look like the processor stuff is being configured Oct 08 01:31:41 it works fine for debug sources tho, just not test Oct 08 01:31:45 what do i need to configure? Oct 08 01:32:21 the plugin is probably broken Oct 08 01:32:41 hm, but I need to use 1.4 because it supports androidTestApt Oct 08 01:32:47 should i try to find a different version? Oct 08 01:32:55 that was the first version to support it Oct 08 01:33:00 i requested that feature Oct 08 01:33:02 i saw that Oct 08 01:33:04 but i've also tested it Oct 08 01:33:59 i poked hugo on g+ as well Oct 08 01:34:05 i feel so helpless Oct 08 01:34:24 i can get this to work using 'provided' rather than apt, but then AS doesn't pick up my generated sources Oct 08 01:34:24 just copy the implementation of the plugin to unblock you Oct 08 01:34:27 it's like 4 lines Oct 08 01:35:10 it iterates over variants, finds the compile task, collects the androidTestApt dependencies, and sets the processor path Oct 08 01:35:19 and calls add generated source root Oct 08 01:35:22 5 lines Oct 08 01:35:35 i tried this just a minute ago as well Oct 08 01:35:50 but AS actually blocks that directory from showing up Oct 08 01:36:00 maybe time for intellij Oct 08 01:45:26 Hi, I'm backing up my phone prior to shipping it off for warranty. I've used rsync to back up /sdcard, but I have a bunch of notes in the now-defunct Catch Notes. I'm pretty sure I exported a dump of them back in August, before Catch shut down, but the data's in there, I'm thinking it's probably in an sqlite database file somedwhere. Oct 08 01:47:45 puff wrong channel Oct 08 01:48:12 StingRay_: Which channel? Oct 08 01:48:21 Whoops, this is #android-dev. Oct 08 01:48:46 Sorry. Oct 08 01:49:08 Hello :D Oct 08 01:51:29 I'm looking to have an app built to output a few RSS feeds, use facbeook authentication, accept photo uploads to a web server, accept form input to a web server...how difficult is that? I'm being quoted $100/mth for an android & apple app, and just trying to figure out if that's worth it...seems a bit much. Oct 08 01:52:41 webgeek what is the upfront fee Oct 08 01:52:43 for development Oct 08 01:52:57 do you mean one hundred a month? Oct 08 01:53:31 I would charge you 10K$ for something like that Oct 08 01:53:54 yea flat rate Oct 08 01:53:57 time can't be replaced, its worth a lot. Oct 08 01:53:57 sounds about right Oct 08 01:54:44 $100/month is too much because you're gonna get crap Oct 08 01:54:51 I can't image it would take more than a week or two to write so part of the fee structure is to maintain it? Oct 08 01:54:52 :) Oct 08 01:55:23 It comes with a CMS to let me swap in & out graphics, headers, etc. Oh, and also advertisements will be part of it too. Oct 08 01:55:49 lol Oct 08 01:55:54 you're in for some quality Oct 08 01:56:36 it almost sounds like you are renting something already built for a general case Oct 08 01:56:54 oh yeah Oct 08 01:56:56 fo sho Oct 08 01:58:10 webgeek: Depends on how clean the RSS feeds are. Oct 08 01:59:13 I guess the issue comes down to estimating your potential revenue in relation to the monthly cost. If the app is going to generate 500$ a month then its a great deal. Oct 08 01:59:35 or 500K$, even better. Oct 08 01:59:45 The effect of naming is amazing. I renamed a single field in my class and my class is now way easier to understand. Oct 08 02:00:11 Lucid programming ;) Oct 08 02:00:20 Yeah. :) Oct 08 02:00:23 webgeek: Sorry, to clarify, most of what you mention is straightforward (not *easy* necessarily, but it doens't involve getting everybody to adopt a new standard, etc) but $100/month is clearly not a realistic amount for custom app development. Oct 08 02:00:25 webgeek: It may be somebody has an app already that they're white labeling (e.g. letting you put your own logo and etc on it) and leasing to you for $100/month. Oct 08 02:00:46 ^ Oct 08 02:01:28 JakeWharton it generates the sources for 'gradle clean assembleDebugTest' but not 'gradle clean test'. my limited understanding is that 'test' is a custom task provided by robolectric and might not be recognized by android-apt. going to see if i can fix it, thanks for the suggestion Oct 08 02:01:32 webgeek: The only part that is not necessarily obvious is the RSS part, because that can be easy or hard, depending on how forgiving you want the app to be. Podcasts, for example, use RSS but there are zillions of errors in podcast RSS feeds, because fo the sloppy tools for creating them. Oct 08 02:02:17 JacobTabak: yeah that plugin is mostly crap. Not surprising Oct 08 02:02:27 The robolectric one, that is Oct 08 02:02:41 JakeWharton but interestingly, it works with 'provided' Oct 08 02:03:05 without a separate task for testing, but i'm not familiar with this stuff, so we'll see how far i get Oct 08 02:03:28 the RSS feeds I am providing, so I can make them however. I do believe he is whitelabeling, just the way he's talking. Sounds like me tlaking web design when I use Wordpress for a CMS. Oct 08 02:04:31 Is there a compat library for material design available? Oct 08 02:05:06 lasserix_ what is it that you are after ? Oct 08 02:05:50 lasserix_: no Oct 08 02:06:02 It's a shame that Java uses 'public' and 'private'. Code would be way more readable with something like 'public' and 'hidden'. The Ps are too similar at times. Oct 08 02:06:03 dunno but just reading material design spec and they say new theme, etc so i was just wondering Oct 08 02:06:12 cause honestly people should stop thinking material design is a function or a library …. it's a concept like art deco Oct 08 02:06:18 webgeek: Sounds about right. If it solves your problem, why not? Oct 08 02:06:29 StingRay_: yeah I know, but seems like there is new touch interactions etc etc Oct 08 02:06:42 Though 'hidden' would sound weird. Oct 08 02:06:54 The cardview is only for L? Oct 08 02:06:55 lasserix_ I have them now, and in all honesty thinking of taking them out Oct 08 02:07:45 looking at the new "Play Newsstand" app has made me thing google have fk'd up a bit Oct 08 02:08:20 think* Oct 08 02:08:26 hey all, how come I get 'null; Oct 08 02:08:36 everytime (sorry for return) http://pastie.org/9630018 Oct 08 02:09:13 Anyone use the rippleView library? Oct 08 02:09:46 lasserix_ I currently use …erm… a drawable that does the same thing Oct 08 02:10:43 ahh yeah does it work no problems? Oct 08 02:10:53 maybe your app does not have permission to write files or something. Oct 08 02:11:17 well, you have to pause/delay whatever was the action till the visual is done…but yeah…i suppose Oct 08 02:11:18 SASDOE: Why are you using both apply() and commit()? Oct 08 02:11:41 I wondered about that too Oct 08 02:11:49 I removed the commit() since I realised it was useless Oct 08 02:12:03 apply and commit do the same thing (but in different ways). Oct 08 02:12:31 "Unlike commit(), which writes its preferences out to persistent storage synchronously, apply() commits its changes to the in-memory SharedPreferences immediately but starts an asynchronous commit to disk and you won't be notified of any failures." Oct 08 02:12:55 TacticalJoke: Cool, thanks Oct 08 02:13:42 SASDOE also you have the value key reversed …. that may have something to do with it Oct 08 02:13:54 putString(key,value) Oct 08 02:14:19 Hey guys, I've been thinking about the viewpager problem I've been having and I have no idea why it's acting the way it does. I know it's something about Z-ordering and the positioning of the viewpager but I've tried different layout positions in my xml file but none of them work as intended. Can you guys take a look at my layout page one more time and let me know... what I am doing wrong Oct 08 02:14:19 and why? Oct 08 02:14:25 Aha. Indeed it must. Added read/write permissions to no avail. I'll try that Oct 08 02:15:33 Still nope. Oct 08 02:16:28 Carbonflux new book http://www.amazon.com/gp/product/B00NB1MT9U/ref=kinw_myk_ro_title Oct 08 02:16:46 Not an issue that file.toString is null, just tried with a hardcoded string Oct 08 02:16:48 oh maybe that should be http://www.amazon.com/gp/product/B00NB1MT9U Oct 08 02:17:04 SASDOE pase again Oct 08 02:17:08 paste* Oct 08 02:19:21 Ok got it. Thanks guys. Oct 08 02:19:43 very interesting, I like the idea of talking about how government should be a benefit to society, its another level of evolution really, away from the idea of government as control. Oct 08 02:19:51 did you read it g00s? Oct 08 02:20:03 thanks :) Oct 08 02:20:15 Carbonflux just picked it up. i think it came out a few days ago :) Oct 08 02:20:57 new book? Oct 08 02:20:58 at 500+ pages, it will take me a few weeks to get through Oct 08 02:21:01 Smoebody here wrote that? Oct 08 02:21:24 puff no, just mentioning it to Carbonflux Oct 08 02:22:11 Carbonflux have you seen this by any chance ? http://www.amazon.com/Why-Nations-Fail-Origins-Prosperity-ebook/dp/B0058Z4NR8 Oct 08 02:22:25 or read it :) Oct 08 02:24:21 Can you do an activity transition to an activity outside of your app? Oct 08 02:25:18 lasserix_ sometimes you are red, sometimes blue (the way your nick hashes, color wise) now you have _ Oct 08 02:25:40 heh not sure about the color but my laptop is on somewhere Oct 08 02:26:12 Here's my layout file: http://pastebin.com/6r2qxgWt Oct 08 02:26:26 why is my viewpager interfereing with my onclick events? Oct 08 02:26:50 g00s, that one rings a bell, I could have swore I saw them on BookTV/CSPAN at some point but I can't find the video link, looks interesting :) Oct 08 02:26:55 and how can I fix it ? Oct 08 02:29:49 lasserix_: yes Oct 08 02:29:56 besides not being the way I would do that kind of layout…looks fine… Eowyn27 … I have no idea what you are doing with that layout though or the flow and result…so imposs to say Oct 08 02:31:09 I think there has to be a general reason why a viewpager would interfere with on click listeners? Oct 08 02:31:24 Maybe I've done a noob mistake but I should know about it Oct 08 02:31:25 nope Oct 08 02:31:31 Eowyn27: will need code Oct 08 02:31:32 Carbonflux good books are coming out faster than i can read them :( Oct 08 02:31:34 no problems at all Oct 08 02:31:53 lasserix: what do you mean? Oct 08 02:31:58 Do you want to see my adapter or activity? Oct 08 02:32:00 Eowyn27 I use viewpager for my settings and have many many many views with attached listeners Oct 08 02:32:12 probably both Oct 08 02:32:22 ok I will put that up too thanks Oct 08 02:32:27 and all those views under the viewpager should probably be made into a compound view Oct 08 02:32:47 what do you mean by compound view? Oct 08 02:33:26 lasserix_ look at the layout again…take not of rules Oct 08 02:33:36 would need a re-design Oct 08 02:33:46 note* Oct 08 02:33:52 * StingRay_ goes for coffee :) Oct 08 02:37:58 Eowyn27 why does your root view have clickable=true ? Oct 08 02:38:43 grasping at straws Oct 08 02:39:31 Here's my class Oct 08 02:39:32 http://pastebin.com/4tA5tS5u Oct 08 02:39:37 with adapter and activity Oct 08 02:39:45 no , no ... gah Oct 08 02:40:50 I set it to clickable=true because so that the images would be clickable Oct 08 02:40:59 no, no? Oct 08 02:41:30 why isn't clickable=tre on the imageView then ? Oct 08 02:41:51 Eowyn27 you should really take some steps back from this Oct 08 02:42:09 yeah, time to head over to d.android.com and start reading :) Oct 08 02:42:11 and go back to some basics on the d.android.com site... Oct 08 02:42:13 lol Oct 08 02:42:19 okay actually Oct 08 02:42:27 let's say I remove all the clickable elements Oct 08 02:42:34 from the buttons and the relativelayout Oct 08 02:42:51 i'm not entertaining hypotheticals from no understanding Oct 08 02:43:02 Eowyn27 doesnt change the fact that you are attempting something beyond your skill and understanding Oct 08 02:43:18 Are you not entertaining?! Oct 08 02:43:29 Eowyn27 I found when I was learning and starting that it was best to start small Oct 08 02:43:38 it still looks like you are attempting to write an app Oct 08 02:44:20 g00s: sometimes people tend to do that for overlay Oct 08 02:44:23 I know however I have read the docs Oct 08 02:44:24 that app is not gonna be too good at all if you dont understand this stuff Oct 08 02:44:27 for this section Oct 08 02:44:32 like adding some padding to image when clicking Oct 08 02:44:35 and it didn't add to my understanding Oct 08 02:44:45 so please if you have time to explain I'm all ears Oct 08 02:44:57 Eowyn27 not what I mean… I mean when you can handle a listView…cool Oct 08 02:45:05 then do a listView with clickable sub items Oct 08 02:45:09 then do a viewPager Oct 08 02:45:14 done... Oct 08 02:45:18 thats what I mean Oct 08 02:45:22 I did do a listeview with clickable items Oct 08 02:45:27 ok show that Oct 08 02:45:29 I'm on part 5 Oct 08 02:45:32 of the sunshine app Oct 08 02:45:36 for the udacity course Oct 08 02:46:03 they used intents to a detail activity Oct 08 02:46:19 I am trying to understand Oct 08 02:46:25 I know it doesn't seem that way Oct 08 02:46:48 My memory isn't the best and I do have to rewatch the udacity videos like a million times to go over some concepts Oct 08 02:47:00 but I'm trying to work out some examples Oct 08 02:47:04 along the way Oct 08 02:47:11 and I am curious about this particular issue Oct 08 02:47:20 I just think you maybe punching about your weight and missing the importance of what people are saying in here Oct 08 02:47:45 <--- 6 years instructor (ok not in programming, but have an understanding of learning and teaching concepts) Oct 08 02:47:47 I bought big nerd ranch android programming book and I read their section on viewpager Oct 08 02:47:58 very brief Oct 08 02:48:08 I have not seen good examples on what I want to achieve with viewpager Oct 08 02:48:40 Ok Oct 08 02:49:09 can someone tell me Oct 08 02:49:16 how to java Oct 08 02:49:17 :/ Oct 08 02:49:25 Does not compute. Oct 08 02:49:29 i can ! Oct 08 02:49:32 i am trying to do something really simple Oct 08 02:49:35 * StingRay_ faints Oct 08 02:49:38 please don't flame me Oct 08 02:50:01 I'm trying to fix an awful APK expansion Cordova plugin Oct 08 02:50:22 One thing that it has is Oct 08 02:50:40 It gets data from the AndroidManifest.xml file Oct 08 02:50:55 Sorry, is that an Android thing? Oct 08 02:50:58 I'm not even sure Oct 08 02:51:03 It might be a Cordova thing Oct 08 02:51:10 * JacobTabak sighs Oct 08 02:51:15 * StingRay_ faints even lower Oct 08 02:51:22 so it gets data from androidmanifest.xml Oct 08 02:51:30 it also gets data from another xml file Oct 08 02:51:41 and the two pieces of data need to match or else it crashes etc Oct 08 02:51:51 I need it to only get data from AndroidManifest.xml Oct 08 02:52:00 Or the other one actually Oct 08 02:52:03 Yes, the other one. Oct 08 02:52:07 That's easier. Oct 08 02:52:07 God, I keep forgetting to write "private" when declaring fields in java. Oct 08 02:52:09 Java* Oct 08 02:52:10 What is that. Oct 08 02:52:27 Does an .R file have any special significance? Oct 08 02:52:36 For example, I have import com.flyingsoft.safari.jigsaw.free.R; Oct 08 02:52:40 And then is that the Intent? Oct 08 02:52:41 no not at all Oct 08 02:52:44 just boilerplate Oct 08 02:52:55 i kid, yes it is very important, it's your resource mapping Oct 08 02:53:26 So I have a file in res/values called xapkreader.xml Oct 08 02:53:40 I want my data taken from there Oct 08 02:54:10 That's somehow taken care of... Oct 08 02:54:25 Long story short, Oct 08 02:54:48 uhh one sec Oct 08 02:54:49 lost Oct 08 02:55:16 ok forget getIntent Oct 08 02:55:50 To get the XML data, I have this in the plugin: Oct 08 02:55:52 int mainVersionId = cordova.getActivity().getResources().getIdentifier("main_version", "integer", cordova.getActivity().getPackageName()); Oct 08 02:55:55 mainVersion = cordova.getActivity().getResources().getInteger(mainVersionId); Oct 08 02:56:41 I guess I have to pass cordova somehow Oct 08 02:57:35 Way too many files open... Oct 08 02:58:27 Uh... Ok. I'll let you guys know when I have a question :P **** ENDING LOGGING AT Wed Oct 08 03:00:00 2014