**** BEGIN LOGGING AT Thu Jul 31 03:00:01 2014 Jul 31 03:00:19 your classes have to exist somewhere in memory, right? Jul 31 03:00:56 of course (as instantiated objects) Jul 31 03:00:59 as it happens, they exist within a part of memory designated for the activity, since the activity is the one using them Jul 31 03:01:18 when the activity is gone, then so is any memory it's been using Jul 31 03:01:31 memory = RAM Jul 31 03:02:00 yes yes. but do you mean s/activity/app ? Jul 31 03:02:26 no I don't Jul 31 03:02:35 an app can contain many activities Jul 31 03:04:04 I guess the reason you're having trouble understanding this is because you don't understand what an activity actually is Jul 31 03:05:21 Well admittedly my understanding of them is somewhat shallow Jul 31 03:05:26 an activity gets started (at which point it is loaded into memory and initialized), it gets used (interacted with in some way), then it finishes (it gets cleared from memory) Jul 31 03:05:38 this is the normal or usual lifecycle Jul 31 03:05:39 yeah yeah Jul 31 03:05:49 but the lifecycle can be diverted in many ways Jul 31 03:05:55 for example by rotation Jul 31 03:05:55 <_Nicco_> anyone here develop in Ubuntu and would be willing to give me a link on a guide to change the PATH environment variable? Jul 31 03:06:24 _Nicco_, I do, but this is entirely off-topic and the wrong channel as it is not android-specific at all Jul 31 03:06:49 yes. I do understand these parts (not trying to sound snide, but its coming across that way i think. sorry\) Jul 31 03:07:01 also highly dependent on your own system/setup/profile Jul 31 03:07:21 <_Nicco_> ravilov, sorry about that Jul 31 03:07:25 it's not really ... it'a s shell specific setting that is the same as every implementation of that shell Jul 31 03:08:14 which is ... probably bash ... and probably ~/.bashrc or ~/.bash_profile and probably export PATH=$PATH:/path/to/stuff Jul 31 03:08:24 exactly - "probably" Jul 31 03:10:01 and you probably shouldn't be using ubuntu if you don't know this stuff *ducks* Jul 31 03:11:02 bankai_au: we were all noobs at one point (sorry but I hate the "if youre not smart enough to use it, you shouldnt be using it" argument - how is one to learn and improve) :P Jul 31 03:11:38 i realize you probably said that with a little tounge in cheek though Jul 31 03:12:14 _Nicco_, essentially, something along the line of: echo 'export PATH="$PATH:/dir/to/add"' >> ~/.profile Jul 31 03:13:05 <_Nicco_> Yea I hopped on the Ubuntu channel and asked. I should be alright now. Jul 31 03:13:26 <_Nicco_> zzxx, thanks I do stuff that I know I don't know how to do just to learn how to do it Jul 31 03:14:21 no problem. I think bankai_au was just kidding around anyway :) Jul 31 03:14:46 you never know with that bankai_au fella ... Jul 31 03:15:21 that's true... he's from the internet. the iternet is only monsters and trolls. probably best to steer clear Jul 31 03:19:29 not only monsters and trolls, but fucking Jaegers too ! http://i.imgur.com/IKwtU6U.gif Jul 31 03:21:30 I woudl understand that reference if I had seen pacific rim Jul 31 03:27:11 capella elequent JS 2e is done, maybe i will read that Jul 31 03:31:06 why spend time reading about coding, when you can -be- coding ? Jul 31 03:32:13 I guess some people enjoy abstract theory more than practical doing Jul 31 03:32:28 why is it an either / or ? Jul 31 03:32:35 the best devs i know read *a lot * Jul 31 03:32:41 like, SICP Jul 31 03:32:56 <_Nicco_> Gotta read to learn right? Jul 31 03:33:35 reading code also counts as reading Jul 31 03:34:18 if you are a java dev, you had better have read JCIP, Effective Java 2e, at least Jul 31 03:34:27 * ravilov has hardly read any *actual* books or articles or any such text Jul 31 03:36:17 * capella hasn't either ... I read a lot, but not programming theory ... my brain is full Jul 31 03:36:33 android is a different story; i'm sure plenty learned just by looking at d.android.com + ApiDemos, etc Jul 31 03:36:40 * capella reads a frack-load of code Jul 31 03:36:54 but if i am going to start in a new field like machine learning, i'm not going to piece together shit from the interwebs Jul 31 03:37:01 And I don't read d.android.com unless I have to Jul 31 03:37:04 * _Nicco_ needs to read to learn anything. He just bought a book on android dev and has a book on the Java Virtual Machine Jul 31 03:37:44 <_Nicco_> g00s, is android not java? Jul 31 03:37:58 Only thing more poorly described than d.android.com, is >and< documentation provided by Microsoft Jul 31 03:37:58 _Nicco_ technically, it isn't :) but lets pretend Jul 31 03:38:01 g00s, that is your own way, I hope you're not saying that is the *only* way Jul 31 03:38:04 *any Jul 31 03:38:12 I for one actually *like* piecing stuff together Jul 31 03:38:56 ravilov, indeed, I haven't found a good spec Jul 31 03:39:00 * ravilov has had learning books in the past but realized they are useless for me Jul 31 03:39:31 ravilov, I know what it is and what it does, but I need to write an interface for it... Jul 31 03:39:45 Guess I'll just dig through aapt code Jul 31 03:40:06 pfn, yeah I wish I could find that page, it was a decent one IIRC Jul 31 03:40:12 I just found a bug in the Swift compiler that reminded me of Scala Jul 31 03:40:26 it was something about dealing with android resources in general Jul 31 03:40:26 capella, msdn is good docs... Jul 31 03:40:45 oh dear lord no Jul 31 03:41:12 msdn is good only in its own world, otherwise it could be seriously misleading Jul 31 03:41:42 ravilov, it's obliquely mentioned in theme and custom view guides Jul 31 03:42:04 Nilium, and? Jul 31 03:42:35 Just a weird bug with the type inference/protocol conformance stuff. Jul 31 03:43:27 Swift apparently decided not to check something's superclass for protocol conformance and just went "nope this doesn't conform" until I found a way to force it to recognize the type. It's pretty weird. Jul 31 03:59:43 "Samsung Galaxy Alpha will reportedly be unveiled this Monday, August 4th" Jul 31 03:59:53 these idiots, have to stop announcing shit at random times Jul 31 04:00:14 or you could stop paying attention to their announcements :p Jul 31 04:00:26 he just likes to bitch Jul 31 04:00:43 I noticed Jul 31 04:01:08 samsung's mobile profits are down, its no wonder. this is part of the problem, they are terrible with marketing Jul 31 04:01:31 and here i was thinking it's coz they produce shit phones Jul 31 04:01:39 well that too Jul 31 04:03:14 ravilov what have i bitched about ? Jul 31 04:03:44 i guess i'll ask bankai_au also, since he brought it up Jul 31 04:03:48 * capella likes his GS3 Jul 31 04:04:04 * capella with cm11 Jul 31 04:04:09 g00s: let's start with gradle and AS ;) Jul 31 04:04:20 bankai_au yeah like months ago ? Jul 31 04:04:34 well yes, it has been a while Jul 31 04:04:49 http://nsainsbury.svbtle.com/java-developers Jul 31 04:07:15 heh - I've seen that one before ... Jul 31 04:07:58 i think the complexity of android beccomes apparent, when you try to teach someone Jul 31 04:07:59 I think it's kind of valid Jul 31 04:08:24 oh well, just create this project in AS using the template, oh yeah let me explain what these 300 files do Jul 31 04:08:40 a lot of people are good at overengineering things Jul 31 04:08:53 I have a really simple tech test that I give potential hires to do before they come in for an interview Jul 31 04:09:01 it's kind of amazing what some people come up with Jul 31 04:12:48 wabz do you do iOS dev? if so, do you think its any simpler though ? Jul 31 04:13:00 i haven't been at it for a while Jul 31 04:13:00 yeah I think it is Jul 31 04:13:08 the code part anyway :p Jul 31 04:13:19 but then again, there's a lot more to android Jul 31 04:14:24 I think iOS development has fewer concepts in general Jul 31 04:14:53 there are some big api surface areas like core data Jul 31 04:15:41 core data has a bit of plumbing to it, but is pretty easy to use Jul 31 04:15:45 Hey, this code its ok??? Jul 31 04:15:47 Final String emo1 = (data.getExtras().getString(Extra.EMOTICON) + "dsasd"); Jul 31 04:16:26 oh ffs not again .... Jul 31 04:16:51 I think apart from the capital f it will compile Jul 31 04:16:59 as to whether it's ok?????? Jul 31 04:18:53 bankai_au::: Go to sleep man Jul 31 04:19:02 Final String emo1 = (data.getExtras().getString(Extra.EMOTICON) + "dsasd"); Jul 31 04:19:12 it's like 2:30 in the afternoon Jul 31 04:21:46 check your clock wabz ... you're 10 minutes fast Jul 31 04:22:20 wabz when was that blog written? i always find tbray amusing Jul 31 04:22:38 not sure but I assumed fairly recently Jul 31 04:22:53 ZZZZZZZZZZZZZZZZzzzzzzzzzzzzzzzzzzzzzzzz Jul 31 04:22:55 Frikis... Jul 31 04:25:06 frikissee wabbit? Jul 31 04:25:36 holy crap i surprised a skunk today, i ran like hell Jul 31 04:25:50 Leeds::: Can you help me cute man? Jul 31 04:25:59 if i had gotten skunked, i think you can still smell it over irc Jul 31 04:26:03 Messiii: not a fscking chance Jul 31 04:26:08 I surprised a rattlesnake once ... I froze in my tracks Jul 31 04:26:16 Ok nerd Jul 31 04:26:46 capella i jumped over a few diamondbacks running the trail, nothing like a last minute "oh shiiiiIIIIIIIIITTT!" Jul 31 04:26:57 heh - yep Jul 31 04:27:28 today i lost the trail and apparently wound up in skunk HQ Jul 31 04:27:54 I've been in code like that Jul 31 04:27:59 haha Jul 31 04:28:10 yes, code smells :) Jul 31 04:28:45 .c Jul 31 04:28:50 .d Jul 31 04:28:58 .... and so this is where the original dev apparantly loses all pretense of solving the issue ... Jul 31 04:32:51 i have a textview inside a fragment. I need to update id when the main activity finishes an async task. But this can be before or after the view is created. Any pointers with this? :D Jul 31 04:34:44 create an interface, implement this interface in your fragment. from your activity find all activate fragments that implement this interface, call method... Jul 31 04:35:25 awesome guys http://www.androidpolice.com/2014/07/30/source-code-released-for-google-io-2014-app-demonstrates-best-practices-and-design-goals-for-android-developers/ Jul 31 04:37:34 haha, holy shit http://www.androidpolice.com/2014/07/29/instagram-android-app-susceptible-to-session-hijacking-due-to-unencrypted-http-transfers Jul 31 04:37:50 wabz this is a perfect example ! Jul 31 04:38:03 now, SSL is a bitch to get right, JSSE, etc Jul 31 04:38:31 a superior intellect would create a stupid-proof API for the platform Jul 31 04:38:49 so these kinds of things would not happen. actually, it was described in research papers at android-ssl.org Jul 31 04:39:00 just the android app ? Jul 31 04:39:45 i think so ... Jul 31 04:39:55 man, if facebook can fuck this up, everybody can ;) Jul 31 04:40:14 all it takes is a dev to leave a debug setting on, maybe that was it and everything is in the clear with no cert verification Jul 31 04:41:00 now to study the iosched code ;) Jul 31 04:43:19 I must say Jul 31 04:43:22 android studio is sweet Jul 31 04:44:11 wonder how much google pay for AS. Think jetbrains get much/anything ? Jul 31 04:45:14 I'd guess they pay in engineering time Jul 31 04:50:38 Ok lammers out? Jul 31 04:50:42 Anybody help me? Jul 31 04:50:47 With a very small line Jul 31 04:52:03 I send 400USD for answer e Jul 31 04:52:44 Messiii are you a nigerian prince ? Jul 31 04:52:48 send money now, get answer later when stackoverflow has answered Jul 31 04:52:57 Whaaaaat Jul 31 04:53:07 No, im from argentina Jul 31 04:53:09 And you Jul 31 04:53:10 ? Jul 31 04:53:10 Anyone know where I can find specific documentation on how to tie listview items to actions? Jul 31 04:53:34 dotDeb check out ApiDemos Jul 31 04:53:39 dotDeb: something more complicated than a simple click, you mean? Jul 31 04:53:50 leeds no, just a click Jul 31 04:54:34 * dotDeb is still learning android development by making an app Jul 31 04:54:50 leeds the listview is based on an array that is based on user-entered information Jul 31 04:55:02 Necesito ayuda Jul 31 05:10:13 .c Jul 31 05:11:46 : / still confused by listview Jul 31 05:14:17 dotDeb: http://developer.android.com/guide/topics/ui/binding.html#HandlingUserSelections Jul 31 05:14:40 leeds :D Jul 31 05:14:42 thanks! Jul 31 05:15:32 you're welcome Jul 31 05:24:52 leeds still a bit confused Jul 31 05:25:06 leeds I copied verbatim and the toasts aren't showing up when i tap the listview items Jul 31 05:25:32 :S Jul 31 05:26:38 surprised Apple didn't make Objective-D XD Jul 31 05:31:26 dotDeb, it's never a good idea to copy stuff verbatim Jul 31 05:31:31 ravilov Jul 31 05:31:32 ik Jul 31 05:31:50 especially since my setup is completely different Jul 31 05:32:12 the arrayadapter is based on an array that is based on user-defined data Jul 31 05:32:14 which complicates things Jul 31 05:32:53 dotDeb forget about arrayadapter, extend baseAdapter ;) Jul 31 05:33:21 I don't really understand why would that make things any more (or any less) complicated Jul 31 05:33:29 g00s por que Jul 31 05:33:37 just general advice Jul 31 05:33:56 learn how adapters work Jul 31 05:34:02 ravilov well some of the examples I've found are static list items, which is different Jul 31 05:34:07 not necessarily more complicated Jul 31 05:34:09 g00s ik Jul 31 05:34:11 g00s i need to Jul 31 05:34:33 dotDeb, so what? forget user input and make your app deal with static lists first Jul 31 05:34:37 then add user input later Jul 31 05:34:44 ^ Jul 31 05:34:45 good idea Jul 31 05:35:01 user input is essential to the app's functionality, but still good idea Jul 31 05:36:26 you don't seriously expect you can be this inexperienced but still manage to include all key aspects of an app on the first go, do you? Jul 31 05:37:23 ravilov nope, I'm just trying to learn by doing Jul 31 05:37:34 that is perfectly fine Jul 31 05:37:37 that is how I learn too Jul 31 05:37:39 :D Jul 31 05:37:53 but don't do it all at once, that is counterproductive if anything Jul 31 05:38:18 if you want to get better at managing listviews/spinners, then focus on that and forget all other aspects of your imaginary app Jul 31 05:38:22 ravilov ah, so you mean like as you run into stumbling blocks, learn enough so that there's no block? Jul 31 05:38:25 right Jul 31 05:38:48 or else get ready for a world of frustration Jul 31 05:38:53 yep Jul 31 05:38:58 and still making little to no progress Jul 31 05:39:25 pretty much what's happening right now Jul 31 05:39:39 a lot of things I understood no problem Jul 31 05:39:42 listview has confused things Jul 31 05:40:02 ok, so isolate it and deal with that ONLY Jul 31 05:40:18 that's just common sense to me really :p Jul 31 05:40:47 yea Jul 31 05:40:58 I'm just getting too enthusiastic about having a nice final product Jul 31 05:42:13 dotDeb there is an old I/O video 'world of listview' http://www.youtube.com/watch?v=wDBM6wVEO70 Jul 31 05:43:25 g00s thanks Jul 31 05:48:04 is reading the training on developer.android.com the best way to go about learning android development in general? Jul 31 05:48:52 dotDeb its one way, but importantly study /well written/ android code Jul 31 05:49:03 g00s ah that's a good idea Jul 31 05:49:15 because there is a LOT of content on that site Jul 31 05:50:28 i wouldn't get to hung up on the design guidelines; as thats definitiely going to change :) Jul 31 05:51:49 dotDeb also, any book you buy now on Android will be out of date soon - after L is released Jul 31 05:52:17 i suppose commonsware being a subscription might be up to date for you without spending more money afterwards Jul 31 05:52:24 g00s that's not all that's there Jul 31 05:52:40 g00s user info, location, performance, security, monetization, engagement Jul 31 05:52:42 0.0 Jul 31 05:53:06 content sharing, connectivity etc etc etc Jul 31 06:01:42 Leeds done any work to the typhoon warning app? material design, etc ? Jul 31 06:03:58 none whatsoever Jul 31 06:25:48 Hello, this line is correct? Jul 31 06:25:49 Final String emo1 = (data.getExtras().getString(Extra.EMOTICON) + mEdit.getText().toString()); Jul 31 06:27:34 Hello. I don't have an external storage. where could I save an image file in my code where it can be accessible from a file viewer? Jul 31 06:33:57 Can anybody explain me when to use cursor and when to use arrayadapters? Jul 31 06:41:18 Zzzzz Jul 31 06:50:58 sulaiman: you always have external storage - but sometimes it's internal Jul 31 06:51:47 Messiii: does the line compile? Why not to try it? Jul 31 06:52:32 i don't think content providers will ever make sense to me Jul 31 06:59:16 What is the most secure way for my application to store information that is sensitive like passwords Jul 31 07:01:07 encrypted with a password from the user that is never stored Jul 31 07:01:54 do I override a table's query method if i'll only want that table to be left joined to parent (foreign key) Jul 31 07:01:56 but to be honest, it really depends on what you're protecting against Jul 31 07:01:57 ? Jul 31 07:02:24 on a non-rooted device, you can safely write it out to your app's directory in /data/data Jul 31 07:02:30 Ok Jul 31 07:02:40 even without encryption Jul 31 07:04:09 JesusFreke::: Jul 31 07:04:29 and if you're worried about rooted devices, well, it's just an arms race at that point :) Jul 31 07:05:13 an app with root access could intercept the password, or grab the encryption key from ram, etc. Jul 31 07:05:14 Not sure if you know this but if someone takes an open source Linux or Android binary and creates a front end gui for it does the entire app have to be open source Jul 31 07:05:40 depends on the license Jul 31 07:05:45 bsd/apache, nope. Jul 31 07:05:52 Jesus have you ever used truecrypt Jul 31 07:05:55 gpl, probably. Jul 31 07:06:06 Probably have to check Jul 31 07:06:12 nope, I haven't Jul 31 07:06:28 But do you know what it is? Jul 31 07:06:37 No i have a problemSSS Jul 31 07:06:53 I can speak spanish? Jul 31 07:06:59 devslash: real answer is for a lawyer... but in general, I'd say calling a public interface doesn't bind two programs together Jul 31 07:07:03 somewhat :) Jul 31 07:08:02 Because I'm thinking of making a truecrypt gui to mount and unmount truecrypt binaries on Android Jul 31 07:08:25 Adding android to the supported devices Jul 31 07:08:27 that sounds like you wouldn't need to make the gui open-source Jul 31 07:08:32 No Jul 31 07:08:34 I spent a week trying to send text to my EditText, but I have succeeded, now when sending the text, delete all, I haveriguado I need to use getText () toString ().;... Jul 31 07:08:47 I would probably sell it for a small fee Jul 31 07:09:53 Hi, if I use a module that doesn't come with python's builtin modules I have to install the module/libraries on my system. I guess in Java I don't need to do that? Because once I compiled the program Java compiles all necessary modules already into the program and then it can be run on any system that got java installed? So no user of my java application has to install the modules himself Jul 31 07:09:53 on his system? Jul 31 07:11:06 looks like it's actually got a pretty restrictive license... https://github.com/warewolf/truecrypt/blob/master/License.txt Jul 31 07:11:33 jush::: ? Jul 31 07:11:36 See it Jul 31 07:11:54 Input.setText(data.getExtras().getString(Extra.EMOTICON) + getText().toString()); Jul 31 07:11:56 ? Jul 31 07:12:52 Yes Jul 31 07:13:05 Section 2 part 1 Jul 31 07:13:42 what a crappy license... Jul 31 07:14:59 Messiii: not sure I understand, do you get the new text in your Input view or not? Jul 31 07:15:01 According to part 3 I think it's ok Jul 31 07:15:25 It says you can for commercial or non commercial use Jul 31 07:17:00 I found a simple content provider on github, do you think this is a good code to look at for learning purposes? https://github.com/jocelynk/ExerciseApp/blob/master/src/com/jocelyn/exerciseapp/provider/ExerciseAppProvider.java Jul 31 07:18:00 jush::: I need get text to the edittext and after put the string Jul 31 07:18:15 Hello -> :) -> result = Hello :) Jul 31 07:20:33 I don't see what's wrong with your code Jul 31 07:20:40 it looks ok to me Jul 31 07:23:07 Messiii what are you trying to do exactly? Jul 31 07:23:26 I can speak spanish? Jul 31 07:23:53 not if you want to be understood :) Jul 31 07:23:55 You can, but most of us won't understand, I suppose. Jul 31 07:24:27 anyways, make sure you create a new string object for your edittext value, to make sure there is no wackyiness changing the value globally Jul 31 07:24:45 just so you guys know, Messiii - under at least a couple of nicks - has been asking incomprehensible and/or inane questions here for a few months now Jul 31 07:25:08 Do we all get equity in his app? Jul 31 07:25:09 :P Jul 31 07:25:22 Ok Jul 31 07:25:25 Ok, I want to send a string to my EditText, if it works Jul 31 07:25:43 Intent.putExtra(Extra.EMOTICON, emo1); Jul 31 07:25:50 I can give partial credit to language - but he also seems to lack basic understandings of the tech Jul 31 07:25:55 mh. googling this should be faster then logging into irc.. Jul 31 07:26:00 Input.setText(data.getExtras().getString(Extra.EMOTICON)); Jul 31 07:26:05 Work fine Jul 31 07:26:12 ok Jul 31 07:26:15 then what? Jul 31 07:26:38 But when i sent the emo1, delete all text in my edittext Jul 31 07:26:48 Put the string emo1 and delete all text Jul 31 07:27:06 I need, get text toe edittext and put before the string emo1 Jul 31 07:27:13 Do you mean? Jul 31 07:28:19 now I know what you mean Leeds... Jul 31 07:29:10 i understand the language Jul 31 07:29:12 but not your question Jul 31 07:29:13 sorry Jul 31 07:29:18 you gotta be more descriptive Jul 31 07:29:57 Leeds::: You should go to your sleep and stop bothering, I'm not talking to you Jul 31 07:30:16 it's true, I do like a mid-afternoon nap - I can't deny it Jul 31 07:30:40 Ok is easy Jul 31 07:30:43 haha same here :) Jul 31 07:30:55 I would like to hit the bed Jul 31 07:30:57 1am Jul 31 07:31:00 I need gettext to edittext and before put a string Jul 31 07:31:00 but its 9 a.m ihere :) Jul 31 07:31:01 12:30 Jul 31 07:31:04 not that it's late Jul 31 07:31:22 No puedo expresarme en ingles Jul 31 07:31:47 Messiii I get it, so do String oldText = new String(getText().toString()); String newText = oldText + ":)"; then editText.setText(newText); Jul 31 07:32:09 my eyes Jul 31 07:32:14 they burn Jul 31 07:32:30 why in the world would you wrap that in a new String()? :p Jul 31 07:33:11 because it looks like the value is being accessed from somewhere else and changed, therefore changing oldText value. Jul 31 07:33:24 Strings are immutable Jul 31 07:33:25 i thought that creating a new object will make sure that object is not affected unless you explicitly change Jul 31 07:33:29 they can't be changed Jul 31 07:33:33 what is actually the point of that ctor Jul 31 07:33:38 when is it ever right to use it Jul 31 07:33:42 or just go et.setText(et.getText().toString() + ":)" ) Jul 31 07:33:44 well, there ya go Messiii, Jul 31 07:34:30 detachYo::: Nice Jul 31 07:34:45 danijoo::: Thank Jul 31 07:38:25 i am a little rusty, does anyone know if sqlite lets you do "delete from table1, table2, table3 where table1.id = 1123;" Jul 31 07:41:31 to answer my question: no it doesn't. Jul 31 07:55:30 detachYo, what would be the result of that query (if it were valid)? Jul 31 07:56:09 asfdd, you pretty much never use "new String(...)", but you use the String ctor indirectly all the time Jul 31 07:56:22 String foo = ""; <-- you just used the ctor Jul 31 07:57:10 i was wondering why it exists it doesn't seem to do anything usefull Jul 31 07:57:46 it exists so that people who don't have a clue about anything can use it Jul 31 07:57:47 :p Jul 31 07:58:12 =) Jul 31 08:15:00 My app is sparking interest Jul 31 08:15:29 i.e "can you make a Windows program please" Jul 31 08:15:30 :l Jul 31 08:18:13 hah Jul 31 08:19:29 i'd have to learn an actually good programming language, fuck that Jul 31 08:22:09 java works on windows and has the same syntax and apis as android Jul 31 08:22:26 you would of course have to you a different window toolkit but swing or java fx works Jul 31 08:22:36 you/use Jul 31 08:22:53 asfdd: the android apis are for android, not for general java Jul 31 08:23:07 yes ofcourse Jul 31 08:23:09 asfdd: I've done that in the past, but using Java to make a desktop application is just stupid Jul 31 08:23:19 but most stuff you use isn't android apis are they? Jul 31 08:23:40 asfdd: all the java API are also java implemented Jul 31 08:23:52 sorry, they are implemented for android Jul 31 08:24:02 so they don't use the same base Jul 31 08:24:05 arraylist is the same on java and android Jul 31 08:24:06 i'd rather learn a new programming language to make my app faster, better looking and more compatible with different machines than use java Jul 31 08:24:10 what isn't of the common libs? Jul 31 08:24:30 iffa it all depends what you are going to do Jul 31 08:24:34 asfdd: they look the same in terms of functionallity, but different implementations Jul 31 08:24:43 the contracts are the same Jul 31 08:24:57 thus they shuld do the same no? Jul 31 08:25:56 i have at least not found any common api between android and java that doesn't owrk the same, i am sure there might be some but i haven't come across them Jul 31 08:26:41 also iffa basically if you can make it on android swing or javafx is plenty strong to do it on desktop Jul 31 08:26:57 but of course if you are planning on making a big desktop app i agree java is probably not the way to go =) Jul 31 08:27:12 i want the looks and the performance of a native program thank you Jul 31 08:27:13 :) Jul 31 08:27:17 I saw that android's ZipFile had an unexpected 32768 file limit Jul 31 08:27:23 I reported it and it was fixed at some point in 4.2 Jul 31 08:27:25 performance isn't really an issue Jul 31 08:27:27 looks could be Jul 31 08:27:39 that sort of small issues in the standard library are likely all around. Jul 31 08:28:00 hard to hit though. It's not like Android started from scratch, the classpath replacement project was already old when they based Android on it Jul 31 08:28:40 C# looks really similar to java Jul 31 08:30:59 when I do throw new SQLException(); Jul 31 08:31:05 how can I actually log the exception to see? Jul 31 08:31:22 detachYo: a common usage is Log.e(TAG, "some message", exception) Jul 31 08:31:35 this, of course, just writes it into the log only a developer might be reading Jul 31 08:32:12 it would be inside the SQLException()? Jul 31 08:32:49 no Jul 31 08:33:16 why are you planning to throw your own SQL Exception? Jul 31 08:33:36 I just want to see what it is Jul 31 08:33:41 debugging purposes Jul 31 08:34:47 ok, so you apparently don't know how exception catching works to not understand my suggestion Jul 31 08:35:04 alankila, most likely Jul 31 08:35:08 :) Jul 31 08:35:25 the place that may throw an exception is wrapped in a try block. When the exception is thrown, execution is interrupted at that point and control is transferred to the innermost catch block that declares to handle it Jul 31 08:35:53 what it does with the exception is that block's own discretion. Some merely log it and continue, others tell a higher level to do some different action, sometimes you wrap an exception in another type and throw it on Jul 31 08:36:06 c.setRequestProperty("Authorization", "basic " + Base64.encode(encodeMe.getBytes(), Base64.DEFAULT)); If encodeMe = "username:password"; does this look like a correct way to get past basic http auth? c= httpurlconnection Jul 31 08:36:58 alankila, makes sense Jul 31 08:37:12 because i seem to be running into a 401 response code :( Jul 31 08:37:58 Jesperhead: can you read the server's error log Jul 31 08:38:01 it might have more info Jul 31 08:38:09 dont have access at this hour Jul 31 08:38:11 what you are doing looks correct to me Jul 31 08:38:23 ill try as a get Jul 31 08:38:46 its for a logout function and nothing worthwhile is actually being returned, so i might be mistaken submitting a post Jul 31 08:39:19 a logout for http basic auth? I guess you have two layers of authentication here. Jul 31 08:40:11 actually... will it break if its https and im using httpurlconnection? hurrdurr maybe thats the problem Jul 31 08:40:18 There is some sql error in the project, I just can't seem to catch it in insert method Jul 31 08:41:05 no, httpurlconnection is just name for a class. Jul 31 08:41:27 you are most likely actually dealing with httpsurlconnection as the real object, but you are declaring that you only need the httpurlconnection part of the api Jul 31 08:41:42 alankila: ah... Jul 31 08:42:01 remember that Object x = y; has no impact on what y is or does Jul 31 08:42:13 but it has an impact what operations you can perform by the handle x Jul 31 08:45:40 still 401ing :( Jul 31 08:46:29 On my android 4.4.2 avd, sometimes context.getFilesDir().getParentFile().getAbsolutePath(); returns "data/user/0/..." and sometimes "/data/data/...". Googling they seem to point at the same dir so there should not be a problem? Jul 31 08:47:21 I guess it's for that multiuser android. Conceptually the paths are probably the same in significance. Jul 31 08:47:43 alankila: I wonder why it seems arbitrary which one I get though Jul 31 08:48:29 Yeah, that is a bit odd. I don't know how that feature is put together. Jul 31 08:48:50 * jesperj nods Jul 31 08:49:52 Jesperhead: what exactly is the logout doing? Is there a server side session you want to destroy? Jul 31 08:50:01 yup Jul 31 08:50:04 the way to do logout with http basic auth is to just forget the credentials of course Jul 31 08:50:14 oh no Jul 31 08:50:27 2 levels. you need to pass basicAuth just to access the page to destroy the session Jul 31 08:51:09 the normal design is to have a server side entry point that creates a session in exchange of authorization tokens, and all other actions work as long as the session token is presented Jul 31 08:51:17 and after the end session api call, the session token ceases working Jul 31 08:51:55 all the interaction should be done on https of course. Jul 31 08:52:05 I wouldn't use sessions for mobile auth with backend Jul 31 08:52:43 Foxandxss: why not? Jul 31 08:53:45 cookies are problematic time to time Jul 31 08:53:53 yeah i brought up auth tokens to my boss, we might implement in the future Jul 31 08:53:56 orthogonal issue. Session does not have to be carried by cookies. Jul 31 08:54:07 Just a key Jul 31 08:54:12 and sessions are from the past :P Jul 31 08:54:17 long live to jwt :P Jul 31 08:54:19 in a typical API, the session is returned as an authorization message using json or xml or whatever Jul 31 08:55:21 almost all designs I've seen ask you to POST to some auth action, and if it succeeds it prints you the session token Jul 31 08:55:37 that is correct Jul 31 08:55:46 the good part of JWT is that it doesn't create any session on the backend Jul 31 08:55:50 from that point onwards, you'd place it in the query or URL depending on how it's specified, though cookies could be used I suppose. Jul 31 08:55:53 and you still have your token clientside Jul 31 08:56:05 so what, is the client-side token the entire serialized session then? Jul 31 08:56:18 no, of course not Jul 31 08:56:29 well where is the state if it's in neither client side or server side? Jul 31 08:56:38 the needed bit like user_id or even if user is admin Jul 31 08:57:25 you send it back, backend read it, get the user_id and get the user from db and return what you asked for Jul 31 08:58:29 sounds insecure. Is there cryptographic signature on such sensitive parameters? Jul 31 08:58:46 100% secure Jul 31 08:58:51 there is a signature of course Jul 31 08:58:53 http://www.intridea.com/blog/2013/11/7/json-web-token-the-useful-little-standard-you-haven-t-heard-about internet, gooo Jul 31 08:58:56 with a secret password Jul 31 08:59:13 I wrote an article about it, but I don't feel like spammin my blog here Jul 31 08:59:13 :P Jul 31 08:59:59 so it sounds like client-side session to me then, except maybe you don't have some giant form hidden with 4 kB of data in it like you'd have in say ASP.Net but maybe larger set of smaller parameters Jul 31 09:00:33 normally the user_id is enough on the token, I mean enough to identify yourself on the backend, which knows nothing about the token Jul 31 09:00:59 client-side session is imho pretty smart concept. I like it, except for the difficulties it presents with browser url links because they can't be used anymore. ASP.Net replaces all links with form submits and wraps everything into one giant form. Jul 31 09:02:28 token goes on the header Jul 31 09:04:16 Either way, these issues are exactly why I ignore backend issues and offload it either to a backend developer or Parse >_> Jul 31 09:04:37 wise enough :P Jul 31 09:05:03 Why yes, I will call that handy login() method, thanks. Jul 31 09:08:22 the white paper of JWT states that sessions live in application server memory and whenever an action in client side component is taken, the corresponding server side component fires Jul 31 09:11:29 alankila: gettin' 200 now :) I used the Authenticator class instead of setting the request property Jul 31 09:11:32 the security model is that the server knows what page client should be seeing, so it only allows the actions that are visible to the client. The data submitted by client may be used to update the server side state, and doesn't have to be echoed back to the client because it can be just kept in server-side objects. Jul 31 09:12:23 my guess is that JWT must be able to spill pages to disk or there is a memory exhaustion attack just by starting enough sessions. On the other hand, with memory sizes of today, that number is probably very large. Jul 31 09:12:39 Hi guys, I am getting a sig fault when using handler.proceed onAuthRequestReceived Jul 31 09:12:40 Fatal signal 11 (SIGSEGV) at 0x00000038 (code=1), thread 1750 (WebViewCoreThre) Jul 31 09:12:50 Only on JellyBean Jul 31 09:12:52 I use a web application framework called wicket that works in much the same basis. Jul 31 09:13:02 jjbrunton: you're probably trying to modify the UI from the webview thread Jul 31 09:13:13 Well, maybe not >_> Jul 31 09:13:25 but that's what I get wheneever WebViewCoreThread pops up for me :P Jul 31 09:14:19 But I am just proceeding the handler? Jul 31 09:15:09 http://pastebin.com/PUTAzGA5 Jul 31 09:21:05 alankila: another question if you dont mind. So I'm handling logins and logouts, and my app contains webviews that displays information depending on who you're logged in as. My problem is that when I log out and log in as a new user, the old pages are still being pulled. Do I need to clear caches? Im running a custom method that deletes files/dirs in the app_cache folder on logout but that... Jul 31 09:21:07 ...doesnt seem to help Jul 31 09:22:26 maybe need to clear app_webview ehhhh? Jul 31 09:22:35 Hmmh. There could be some caches though my understanding was that by default webview did not cache anything, you had to do work to make that happen Jul 31 09:23:29 Jesperhead Jul 31 09:23:30 maybe it's different now. Even so, in that case either the caching is broken, as the cached resources should be identified as needing a refresh. And there is of course the possibility that your server side is broken and displays residual information Jul 31 09:23:35 Welcome to my world for the last two weeks Jul 31 09:23:38 all eyes jjbrunton Jul 31 09:23:43 HAH Jul 31 09:24:00 WebView doesn't give a shit whether you want to give it new credentials or not Jul 31 09:24:06 alankila: yeah i hadnt ruled out serverside error. Jul 31 09:24:25 but there is an ios app that doesnt run into the error so still not sure Jul 31 09:25:01 ah actually it was the URLConnection that didn't cache anything. The webview may do whatever. Jul 31 09:25:05 theres a cookies file in app_webview containing a session id >:-| Jul 31 09:25:22 let the purging... begin Jul 31 09:26:06 If you logged out, the session id shouldn't give you anything useful. And you can probably clean the cookie jar on client side, though well-designed logout method would send you a new session id cookie that's empty Jul 31 09:27:29 well at the very least, i dont want that crap in there after ive logged out Jul 31 09:27:39 just residual garbage Jul 31 09:28:47 well cached data could be useful for the next user session Jul 31 09:29:29 Hi guys :) Jul 31 09:30:04 there's a webview method clearCache(true) that should wipe both the memory and disk caches Jul 31 09:30:45 cookiemanager would support a method removeAllCookies() Jul 31 09:30:58 You should probably do this when application fires up and when user closes session Jul 31 09:31:17 Try calling clearCache before a loadURL Jul 31 09:32:42 thanks for the input Jul 31 09:33:55 ok how about this, i am view a particular section of a webview, and I click a button that loads a new site in the same webview. When I press the back button, I am returned to the beginning of the webpage content, instead of where I left off Jul 31 09:36:02 hi all Jul 31 09:36:30 what is the difference between a loader and adapter. I see something like building a listview using loader and arrayadapter Jul 31 09:37:53 not sure what "loader" would be here, but an adapter is a way of converting raw data items (from an array, a database, or whatever) into something suitable for showing in a spinner or a list Jul 31 09:40:07 ok Jul 31 09:41:34 loader is designed to load data from database, adapter is used to feed data to adapterviews (listview/spinner... etc.,) Jul 31 09:45:08 While I work with database which one should I use.Loader or adapter. Oh so loader will load the content from database and adapter will give us the view to see them Jul 31 09:45:28 So I need both when developing a enterprise application? Jul 31 09:45:45 Somethings bugging me about secondary threads and writing to a canvas on a surface. In nearly all examples I see the thread run() simply loops while the surface is valid constantly redrawing the same scene over and over again regardless of whether the screen has been invalidated etc. Now, this is surley bugging out the CPU at 100% for that process? Which makes me wonder if that display thread run() shouldnt be limited. Now It doesnt Jul 31 09:45:45 seem right to put a sleep in there. So whats the best practice to limit the execution of the display loop (assuming the screen is on and we dont get into activity lifecycle issues like onPause etc). Jul 31 09:46:05 if you are pulling data from database to show it in list, you better do that with cursoradapter Jul 31 09:46:56 bhagi: yes I have to pull data from database and show in a list Jul 31 09:48:28 bhagi: now what is difference between cursoradapter and arrayadapter Jul 31 09:48:33 http://developer.android.com/guide/components/loaders.html please look at this, you can couple cursoradapter with loaders to load data from database and render it in list Jul 31 09:49:06 adapterviews are special kinds of views which pulls data from source called adapter. There are multiple adapters like arrayadapter, cursoradapter, etc., Jul 31 09:49:37 all adapters are datasources that feed data to adapterviews on demand Jul 31 09:50:44 bhagi: ok Jul 31 09:50:47 so, if you have all the data in hand, you simply create an array, give that array to arrayadapter which feeds the data to list Jul 31 09:51:23 ok Jul 31 09:51:30 incase if your data is there in database (can contain thousands of rows), you need to use special kind of adapter called cursoradapter Jul 31 09:51:37 rgr, wait() / notify() maybe? Jul 31 09:52:13 the beauty is that it wont fetch all data in database to memory, it will fetch only those records that are shown on listview Jul 31 09:52:35 I need to read up on general multithreading with game/display intensive programs with java I think. A google shows people are not in agreement... surprisingly... Jul 31 09:52:53 thanks bhagi Jul 31 09:53:06 niru, ArrayAdapter, CursorAdapter, etc are just different kinds of adapters, they pull the data out of different kinds of sources, you use whichever is the most suitable for your case Jul 31 09:53:48 ok ravilov Jul 31 09:55:16 also, ArrayAdapter is in 99% of cases wrong for you ;_ Jul 31 09:55:18 ;) Jul 31 09:55:45 why? Jul 31 09:56:11 ravilov, the fact that ArrayAdapter has "hidden" arraylist storage very much confuses most newbies Jul 31 09:56:20 oh Jul 31 09:56:22 newbies Jul 31 09:56:26 yeah nevermind Jul 31 09:56:29 <-- not one Jul 31 09:56:37 I've seen most people do a mistake of extending ArrayAdapter and then using another ArrayList inside to store data Jul 31 09:56:52 which, of course, causes metric ton of issues due to inconsistency of data :) Jul 31 09:57:00 * ravilov has just used an ArrayAdapter that maps enum fields with descriptions for a spinner Jul 31 09:57:21 so I usually just tell them to extend BaseAdapter for ListViews - the difference is in 1 field and having to implement getCount anyway :) Jul 31 09:57:37 Mavrik, I just passed a "new ArrayList()" straight to the constructor and forgot about it completely :) Jul 31 09:57:45 mhm, that works :) Jul 31 09:57:56 as long as you understand what'll happen when you'll have to extend that :D Jul 31 09:58:17 nice point Mavrik Jul 31 09:58:20 I'll never have to extend that, this is specific to this single view only Jul 31 10:00:23 so as long as I dont extend ArrayAdapter class I should not have any issues using it? Jul 31 10:00:52 I will be having a huge data access everytime. So what is prefered? Jul 31 10:00:57 Mavrik, I'll admit at first I did save a reference to the list as well as pass it to the adapter, and then try to add entries by adding them straight to the list :) Jul 31 10:01:04 instead of using adapter.add() Jul 31 10:01:05 oh yea Jul 31 10:01:18 another common mine people step on with ArrayAdapter Jul 31 10:01:21 it makes an internal copy :D Jul 31 10:01:52 niru, no, so long as you understand how it works you should hae no issues with it Jul 31 10:02:02 ok... Jul 31 10:02:10 hey Mavrik are you familiar with webviews? Jul 31 10:02:11 avoiding specific patterns is not always the best way to avoid issues Jul 31 10:02:39 sometimes an ArrayAdapter is indeed the best tool for the job, but in order to use it you have to understand it Jul 31 10:03:40 right now I'm trying to "beautify" this same adapter/spinner by providing a custom layout for entries Jul 31 10:06:09 ravilov: ah go ahead Jul 31 10:06:16 thanks to all Jul 31 10:08:18 * ravilov thanks niru for generously granting permission to go ahead and goes ahead Jul 31 10:10:15 Hi to everybody. i have doubt : Does a service get restarted when a activity unbinds from it? Jul 31 10:12:44 Jesperhead: Did you get the login issue fixed? Jul 31 10:13:01 I have some issue with semicircle sprite.. How I can hide it partial ? Jul 31 10:13:02 jjbrunton: sort of. The webview refreshes on app kill/reload Jul 31 10:13:16 trying to clear the webview everytime the activity is called Jul 31 10:14:02 Maybe some AndEngine expert can look at it http://stackoverflow.com/questions/25054773/andengine-gles-2-animated-hiding-curvy-sprite ? Jul 31 10:14:09 I don't know if we are having similar issues, mine is basic authentication and when a user enters the correct password they get in. If they then attempt to connect with an incorrect password then the old password is used and they bypass the invalid password Jul 31 10:14:23 This is with a brand new webview as well Jul 31 10:14:30 oh the basic auth issue? Jul 31 10:14:34 Yup Jul 31 10:14:40 ahhh youre dealing basic auth in the webview Jul 31 10:15:15 Appears to be a problem because there is a google issue: https://code.google.com/p/android/issues/detail?id=25507 Jul 31 10:15:21 I overrode public void onReceivedHttpAuthRequest(WebView view,HttpAuthHandler handler, String host, String realm) Jul 31 10:15:28 abdelix: FWIW, I've seen such behaviour in a service on one of my apps, where the goal was to have a service always running, but it seemed to restart every time the app went away. Except for handling it correctly, I never investigated further. Jul 31 10:15:51 onReceivedAuthRequest doesn't get called in the second scenario Jul 31 10:16:00 abdelix, depends on how it's been started Jul 31 10:16:02 If the user has previously authed Jul 31 10:16:14 is should get called if the auth shows up? hrm Jul 31 10:16:28 It uses the old correct credentials Jul 31 10:16:37 abdelix, according to docs, if the service has been started as a result of bind, then yes it will be terminated once the client unbinds Jul 31 10:17:51 ravilov : i have started it with startService to ensure it keep running Jul 31 10:18:15 then it should keep running after unbind Jul 31 10:19:05 ravilov, but it seems to get restarted when all activities that use it are stopped. Jul 31 10:19:20 it keeps running but restarts Jul 31 10:19:41 abdelix, then it might depend on what value you return in onStartCommand() Jul 31 10:20:43 i return Service.START_STICKY Jul 31 10:22:10 abdelix, that should do Jul 31 10:22:25 not sure why it terminates then Jul 31 10:27:10 i have three activity/fragment 'combos'. a user goes from A -> B -> C. A is a list view that passes on an id to B so B knows what to show. can i have A pass on other info to be retrieved by C? Jul 31 10:27:46 ravilov , it gets restarted not terminated Jul 31 10:27:52 Why type of info aaearon Jul 31 10:28:23 just Strings that represent login/password info that are used by C as part of a URL to get a video stream Jul 31 10:28:24 If it is primitive you can just pass it to the bundle in B then pass it to C from B Jul 31 10:31:09 abdelix, yeah yeah, tht Jul 31 10:31:10 that Jul 31 10:31:16 terminated then started Jul 31 10:31:18 ravilov, i found the reason in the docs http://developer.android.com/reference/android/content/Context.html#unbindService(android.content.ServiceConnection) Jul 31 10:31:19 ie restarted :p Jul 31 10:31:27 ;) Jul 31 10:32:36 hi in my code i call a php script.. but when i read response on my app it is NULL why? http://pastebin.com/k3rUM1bS Jul 31 10:32:49 if i run url from web i view correctly the data! Jul 31 10:32:55 abdelix, cool, good find Jul 31 10:33:14 now if only someone could explain why is it necessary for the service to restart when unbound... Jul 31 10:33:54 ravilov, and if the are is any way to avoid it without leaking the connection Jul 31 10:34:30 well the connection is free to disappear, I don't care about that Jul 31 10:34:36 I care more about the service itself Jul 31 10:35:19 I usually first do startService() and then bindService(), but I have no idea if that helps any since I didn't actually check if my service gets restarted, I guess I should Jul 31 10:36:43 i view this error 07-31 12:36:21.109: E/log_tag(6194): Errore in http connectionjava.lang.NullPointerException Jul 31 10:38:03 jjbrunton, thanks. so the info goes from A -> B -> C? Jul 31 10:38:10 still learning :P Jul 31 10:38:35 ravilov: you can help me? Jul 31 10:39:16 Alfreda: which line it is showing that exception? Jul 31 10:39:40 Yes Jul 31 10:40:00 Providing your app allows that architecture Jul 31 10:43:07 Alfreda, hardly, you didn't show any code Jul 31 10:43:24 ravilov: look my code: http://pastebin.com/k3rUM1bS Jul 31 10:43:49 line 68 Jul 31 10:43:53 i have this error Jul 31 10:44:03 07-31 12:36:21.109: E/log_tag(6194): Errore in http connection java.lang.NullPointerException Jul 31 10:44:32 null pointer exception could be just about anything, you'll need to provide the exception stack trace too Jul 31 10:44:36 use e.printStackTrace() Jul 31 10:47:22 in catch block? Jul 31 10:49:07 yes Jul 31 10:49:18 not like you have "e" anywhere else, do you? Jul 31 10:49:43 http://pastebin.com/B3nixP72 Jul 31 10:50:10 When I start my app for the first time the action bar is colored correctly, but the background is still white before applying the right background color from the layout Jul 31 10:50:13 is there a way to change this? Jul 31 10:50:47 ravilov: line 97 is this: is[i] = entity.getContent(); Jul 31 10:51:17 you want view my php file? Jul 31 10:51:39 How do I turn off the screen progrmatically? Jul 31 10:52:14 Alfreda, so what's in line 97 of MyDogs1.java? Jul 31 10:52:21 is[i] = entity.getContent(); Jul 31 10:52:44 yoavst, http://stackoverflow.com/questions/7994786/how-to-put-the-screen-in-sleep-mode-in-android Jul 31 10:52:51 yoavst: http://stackoverflow.com/questions/9561320/android-how-to-turn-screen-on-and-off-programmatically ? Jul 31 10:53:01 Alfreda: and where do you instialize static InputStream[] is = null; with an Array? Jul 31 10:53:26 yes is an array Jul 31 10:53:35 and is null, where do you give it size? Jul 31 10:53:39 read the question again, Alfreda Jul 31 10:53:53 static InputStream[] is = null; after public class MyDogs1 extends Activity{ Jul 31 10:54:01 we can all see the code... Jul 31 10:54:12 http://pastebin.com/B3nixP72 Jul 31 10:54:13 how do you expect to stash something in an array that has not been initialized? Jul 31 10:54:26 s/initialized/allocated/ Jul 31 10:54:32 ^ Jul 31 10:54:36 what? i dont undstand Jul 31 10:54:42 is IS null Jul 31 10:55:08 initialized to null yes Jul 31 10:55:10 but after Jul 31 10:55:11 is = null <-- why? Jul 31 10:55:17 initial value Jul 31 10:55:17 this is your problem Jul 31 10:55:19 no Jul 31 10:55:22 lasserix_: are you online? Jul 31 10:55:26 ahh Jul 31 10:55:30 then i cant use array Jul 31 10:55:32 apparently you don't know how to work with arrays Jul 31 10:55:42 ravilov: loool Jul 31 10:55:50 i work from 5 years in C/C++ Jul 31 10:55:56 ravilov: ;) Jul 31 10:56:04 it seems that is only an obstacle now Jul 31 10:56:24 yes because C/C++ >>> Java for me Jul 31 10:56:35 however i must use an arrayliststring Jul 31 10:56:45 well go back to your precious C++ then :p Jul 31 10:57:13 Alfreda: do is = new InputStream[counter]; in your onCreate after getting your lines] Jul 31 10:57:39 ravilov: for Android is monopolized for Java Jul 31 10:57:41 :| Jul 31 10:57:56 canvs2321-: no i must use a List Jul 31 10:58:01 i dont know counter Jul 31 10:58:09 If it was required to write apps in C++ it would be a hell of a shit load worse. Jul 31 10:58:10 it's in your code :/ Jul 31 10:58:26 myid.add(line); Jul 31 10:58:26 counter++; Jul 31 10:58:47 ravilov: can I get some help on DAO,datasource,factory and the main program which will use these. Jul 31 10:59:16 I am understanding but then coming to implementation I am messed up Jul 31 10:59:20 or is = new InputStream[myid.size()]; Jul 31 10:59:29 niru, uhhh, probably not since I've never used DAO Jul 31 10:59:30 sorry Jul 31 10:59:40 ah ok.. Jul 31 10:59:53 ravilov: you know some one here who can help me? Jul 31 11:00:04 canvs2321-: yes but i need a global variable at start Jul 31 11:00:05 no, but surely someone will respond Jul 31 11:00:17 Is anyone try draw Sprite on BezierPath? Jul 31 11:00:21 Alfreda, your variable *is* global, you are only allocating it later Jul 31 11:00:25 Alfreda: ^ Jul 31 11:00:31 can I get some help on DAO,datasource,factory and the main program which will use these Jul 31 11:00:46 canvs2321-: ah yes yes sorry my erro Jul 31 11:00:58 C++ developers often think that something like List fooList; has created instances of Foo somehow. Jul 31 11:01:19 but on java, collections are just places to put references into, they don't hold the objects. Same goes for java arrays. Jul 31 11:01:29 except for the java arrays that hold native types like int or float Jul 31 11:01:52 primitives* Jul 31 11:03:29 canvs2321-: so at start static static InputStream [] is; Jul 31 11:03:33 and in onCreate method Jul 31 11:03:41 new InputStream[counter] ? Jul 31 11:03:51 you don't need static... Jul 31 11:03:56 ok Jul 31 11:04:08 this is not C, dammit Jul 31 11:04:13 ravilov: lol Jul 31 11:04:56 Alfreda: you intialize is to null in your class, then whenever you know the size you want it, you allocate it Jul 31 11:05:57 canvs2321-: yes thanks Jul 31 11:06:11 ok thanks Jul 31 11:06:32 how can I edit something in a layout after its been drawn? Context: I log in from my preferences activity. from there i am kicked back to main activity which downloads a logo dependent on the account logged in. My imageview for the logo is not updating until after I relaunch the app Jul 31 11:06:44 Alfreda, also, reading log messages and exception stack traces is a very important skill when debugging, you should learn it asap Jul 31 11:07:00 reading and interpreting* Jul 31 11:08:10 Jesperhead: just setting ImageView.setImage*() should update. Jul 31 11:08:29 if not try ImageView.invalidate() but shouldn't need it Jul 31 11:08:32 well i have that in onResume and onCreate but it wont update until app relaunch Jul 31 11:08:44 ravilov: i thinked that result from query was null Jul 31 11:08:52 have your code that is doing the loading do it Jul 31 11:09:00 of course you did, that's why it is important to know how to read logs Jul 31 11:09:04 just setting a new bitmap for imageview will invalidate it Jul 31 11:09:15 ^ figured so Jul 31 11:09:17 but the new bitmap must be fetched, I suppose Jul 31 11:09:57 Jesperhead, is there no way to fetch the logo at time of prefrence creation? Jul 31 11:10:28 ravilov: i *need* to do it onLogin Jul 31 11:10:37 but havent moved code yet Jul 31 11:10:42 ok, fair 'nuff Jul 31 11:10:44 just asking Jul 31 11:10:59 oh yeah no im just saying its an issue i recognize Jul 31 11:11:27 typically you add a shared preference change listener for the preference you care about. Jul 31 11:11:35 I guess you are changing some pref like username Jul 31 11:11:57 When that fires, you'd likely do all your invalidations at that moment like log out, wipe caches, whatever Jul 31 11:12:02 yeah, is this something realtime/in-memory only or something you store in your sharedpreferences? Jul 31 11:12:53 well not explicitly. but if there is a logo, there will be other information that I *am* checking for, such as location Jul 31 11:13:28 but i think ive figured it out Jul 31 11:14:02 im launching my asynctask immediately after logging in. the imageview doesnt have enough time to update. now if i simply load a new activity and return, the logo has changed Jul 31 11:14:07 instead of needing app restart Jul 31 11:14:24 so... progress Jul 31 11:14:42 but shared pref change listener... that sounds much ismpler Jul 31 11:34:03 im making a http get request and its returning a username/password as a json object. my method is returning that jsonobject. i want to log the response but obscure the password. ideas? Jul 31 11:35:09 aaearon, the number of ways are almost infinite, from crude string search/replace, to more advanced regex search/replace, to full json parsing/rebuilding Jul 31 11:35:28 regex is probably best bet. thank you Jul 31 11:42:47 "want to obscure the password" is pretty open ended there. Obscure it where? In the json object? The convert the json to an object, change it then convert it back. Using regex would be insane. Jul 31 11:50:46 aaearon: Are you really sure you want to do that? Obfuscation != safty.. Jul 31 11:50:56 +e Jul 31 11:51:20 danijoo for now im just not going to send any of the response content to logcat Jul 31 11:51:22 yes it is if it a one way transform. Jul 31 11:52:08 yeah rgr but as its the response of an http get request, i guess he want to use that password somewhere in the app so its not 1-way Jul 31 11:53:07 aaearon: everybody can intercept the http request if the phone is on wifi and if its only obfuscated, you can reverse engineer the old password Jul 31 11:54:07 rubbish. YOu can not reverse engineer an properly obfuscated anything. its a password : not an algorithm. e.g "mypass" -> obfuscation "sopfjksopfisopfipo" . Reengineer that. Jul 31 11:54:43 rgr: obfuscation != encription Jul 31 11:55:14 of course the plaintext http fetch is another issue and something adequately covered in every single article about http get/post out there. You cant alway use ssl. You need a client server algo. Thats not the same as obfuscation for display purposes. Jul 31 11:55:22 thats exactly what I mean. Jul 31 11:55:25 you can decompile the apk and rebuild your obfuscation method. With obfuscation all you can do is make it harder to do that Jul 31 11:56:09 wait : in the context the obgducation is merely converting it into a non readable string : none of the important "info" is there anymore. or that was my reading. eg convert "mypass" in a json record to "xxxx". Jul 31 11:56:21 aaearon: as you see the answer to your question highly depends on what you want to do with it :) Jul 31 11:56:21 obfuscation not obgducation.... ;) Jul 31 11:57:01 danijoo: (y) +1 ... I read it as just wanting to mask out the pass field in the json for display purposes. Jul 31 11:57:18 yeah for my purpose all i'd like to do is be able to echo the response data (which contains a password) to logcat with the password part obscured Jul 31 11:57:36 right, so convert the json to an obj. replace the pass. done. Jul 31 11:57:47 for example if you want to send a password from server to the app thats used for.. lets say access an ftp server from the app afterwards. the only answer is "thats a bad idea at all" Jul 31 11:57:55 hes not asking about that... Jul 31 11:58:20 oh sorry Jul 31 11:58:27 i just misread the whole stuff Jul 31 11:58:46 i thought the server is responding with a json containing the password .. not that he want to log something :/ Jul 31 11:58:53 totally my mistake :/ Jul 31 11:58:55 everyone and his mother knows passwords as cleartext is bad : but here he has a password (however he got it) an just wants to logcat an approcimation of it ... so he needs to wipe the json field. Jul 31 11:59:07 yeah. i got it now :D Jul 31 11:59:08 ;) no worries. Jul 31 11:59:21 then just replace it with ***** or something like that.. :) Jul 31 12:00:27 exactly... I wonder why it warranted a Q actually which made me wonder if there was more. Hw probably want to logcat the json as "json" ... hence my recoo he converts to obj, replace the pwd, and converts back to json. Using regexp would be stupid stupid. Jul 31 12:01:01 wondering why theres a password in the json anyways.. Jul 31 12:01:11 because why not? Jul 31 12:01:15 dunno Jul 31 12:01:35 lots of systems talk in json and throw passwords around. good or bad. Jul 31 12:01:37 but as you said, the method would be to replace via regex Jul 31 12:01:47 no thats not that way. that would be stupid. Jul 31 12:02:01 yes but seems what hes looking for :) Jul 31 12:02:35 Why? Because it requires a knowledge of json format. Its not time critical. Convert to obj. set field. convert back. let the system parsers do the work for this. Jul 31 12:03:52 mh I think thats a matter of taste.. I'd just do a jsonString.replace(regex, "XXXX"); Jul 31 12:10:48 right: so quick, whats the regex? Jul 31 12:11:13 you answer compounded my explanation ;) But all to their own.... Jul 31 12:11:19 later.. Jul 31 12:16:38 hi Jul 31 12:16:48 how i can do for write in a file in append mode? Jul 31 12:16:50 thanks Jul 31 12:17:44 now i use FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_PRIVATE); //salva in /data/data/nomeapp/file/prova.txt fos.write(result.getBytes()); fos.close(); Jul 31 12:17:49 but dont work Jul 31 12:17:53 in append mode Jul 31 12:21:10 Alfreda: if I search in Google it's in the first link... Jul 31 12:21:25 http://lmgtfy.com/?q=android+write+file+append Jul 31 12:22:04 but i want only edit my code Jul 31 12:22:09 i dont want rewrite a new code Jul 31 12:22:16 i use fileoutputstream Jul 31 12:26:47 Alfreda, google is not there to provide ready-made code that you can just copy&paste, google is there to teach you how to do it yourself Jul 31 12:27:01 ravilov: The method write(int) in the type OutputStreamWriter is not applicable for the arguments (byte[]) Jul 31 12:27:09 filewrite dont has write function! Jul 31 12:27:14 yes it does Jul 31 12:27:31 you really need to get rid of your bad C/C++ habits Jul 31 12:27:52 no Jul 31 12:27:53 dont has Jul 31 12:27:55 I think learning Java should go first Jul 31 12:28:08 f.write(result.getBytes()); Jul 31 12:28:15 ravilov: you're talking to a guy who started his Android coding by trying to modify an open source app by modifying the smali code Jul 31 12:28:15 i cant write BYtes Jul 31 12:28:31 Leeds, yeah... might be a lost cause, lol Jul 31 12:28:50 Alfreda: do you ever try to solve a problem yourself before asking this channel? ^^ Jul 31 12:28:58 Estel: yes Jul 31 12:29:03 do you really? Jul 31 12:29:43 Leeds: Is this a joke? O.O Jul 31 12:29:49 ravilov: yes O.O Jul 31 12:30:07 flan3002, sadly no, I've heard this story before, I just forgot Jul 31 12:30:42 i resolved thanks Jul 31 12:30:43 MODE_APPEND Jul 31 12:30:57 yo, i got a UTF8 string which is Korean text encoded, how do I make my app show the Korean font? currently my app prints garbage Jul 31 12:31:02 if you have a Writer, you can write strings. If you have a Stream, you can write byte[] Jul 31 12:31:24 you've to be kidding me.... Jul 31 12:32:03 this is the key difference between Writer abstraction and Stream abstraction. This is why Writers are constructed from Streams with optional Charset argument in the constructor. Jul 31 12:32:14 the charset is required for translating from string to byte[]. Jul 31 12:32:27 sabton, I believe this is entirely up to the system, unless your app is going to provide an entire new font Jul 31 12:32:49 ravilov: thx for comment. my app shows garbage even on a Korean device Jul 31 12:33:03 sabton, that is weird, are you sure you have properly encoded text? Jul 31 12:33:23 ravilov: well, it's not Unicode Jul 31 12:33:41 sabton: didn't you say it was utf8? Jul 31 12:33:47 utf8 != unicode Jul 31 12:33:55 Leeds yes, ravilov is right tho Jul 31 12:34:10 yes, utf8 is an encoding Jul 31 12:34:33 basically these are MP3's with Korean meta, the meta is written to MP3 in the native codepage non-Unicode Jul 31 12:35:02 Eww. Jul 31 12:35:47 one may have to make a guess of the charset, as mp3 files might not have a well-defined encoding for metadata at all Jul 31 12:35:56 alankila: fos.write(result.getBytes()); how i write line? i want result.getBytes()+"\n" Jul 31 12:35:57 there are probably conventions based on the time period and location of the mp3's origin Jul 31 12:36:16 fow.write(result.getBytes()); fos.write('\n') Jul 31 12:36:30 Alfreda, if you want a line, work with strings and not byte arrays Jul 31 12:36:51 note that if you use the getBytes() method, you get current locale's charset into the files. May be a problem. It could be wise to have a defined Charset instance handy. Jul 31 12:37:05 such as, protected static final Charset UTF8 = Charset.forName("UTF-8"), then use getBytes(UTF8) Jul 31 12:37:25 alankila: is a simply integer Jul 31 12:37:25 in java 8, we have StandardCharsets.UTF8 so that particular line will be going away Jul 31 12:37:27 alakila: you are correct, it is not well-defined. MP3 textual meta is stored as either Unicode, or non-Unicode. for non-Unicode it's the default codepage ISO charset of the system that tagged it Jul 31 12:37:27 like 1 Jul 31 12:37:28 2 Jul 31 12:37:29 3 Jul 31 12:37:54 sabton, I'm afraid you might be SOL on this Jul 31 12:38:17 sabton: so you will have to make informed guess based on statistical analysis of text properies I am afraid Jul 31 12:38:26 ravilov: well the reason im pursuing this issue is because some Samsung app handles this guy's korean meta fine Jul 31 12:38:34 UTF-8 is nice because very little text will incorrectly parse as UTF-8, so you can always try that and see if it's consistent Jul 31 12:38:44 for the rest, you'll just have to guess based on statistical properties I suppose. Jul 31 12:39:00 sabton, yeah, I'm sure samsung devs spent quite some time figuring this out too, not to mention samsung is a korean company, isn't it? Jul 31 12:39:07 lol maybe Jul 31 12:39:10 :) Jul 31 12:39:12 alankila: fos.write('\n'); don work! Jul 31 12:39:23 Alfreda: that is odd. I remember using it myself every now and then. Jul 31 12:39:49 odd? Jul 31 12:39:58 Alfreda: Think. Think why it wouldn't work. Hint: What type does it want to have and what type are you passing? Jul 31 12:40:04 this in particular should promote argument to integer and then write the low 8 bits. (Yeah, the interface is strange.) Jul 31 12:40:04 so lemme ask you guys this, my app running on this Korean phone -- it still shows English characters everywhere. is that because my app' Jul 31 12:40:20 (cont) app's strings are Unicode and Roboto is mutli-language? Jul 31 12:40:56 flan3002: ahh i need an int Jul 31 12:41:01 sabton, as per docs, the en-US locale is guaranteed to always be available on all devices/systems Jul 31 12:41:02 int of \n ? Jul 31 12:41:08 Uhm... Jul 31 12:41:24 sabton: it is just likely that you are telling android APIs that the text is something like latin-1 or something inadvertently and it prints English characters as consequence. Not that I know anything about this. Jul 31 12:41:30 public void write (int oneByte) Added in API level 1 Writes a single byte to this stream. Only the least significant byte of the integer oneByte is written to the stream. Parameters oneByte the byte to be written. Throws IOException Jul 31 12:41:47 which is byte of \n Jul 31 12:41:50 Alfreda: did you try 'fos.write("\n")'? That is different from fos.write('\n'). Jul 31 12:41:54 (int)'\n' Jul 31 12:41:58 ok thanks Jul 31 12:42:01 with casting! Jul 31 12:42:11 it should do implicit casting though... Jul 31 12:42:14 nah, the cast shouldn't be necessary Jul 31 12:42:21 * ravilov is pretty sure Alfreda is doing something wrong Jul 31 12:42:21 java knows how to promote char to int Jul 31 12:42:30 yeah I know Jul 31 12:42:42 I don't think my bit will solve anything Jul 31 12:42:46 fos.write((int)'\n'); Jul 31 12:44:21 Didnt read all the stuff but is he really trying to write string as byte instead of writing the damn strings directly? Jul 31 12:44:43 danijoo: if you have a Stream and not a Writer, it's not unreasonable to do foo.getBytes(UTF8) or something. Jul 31 12:44:57 ultimately that is what the Writer abstraction will do anyway I guess Jul 31 12:45:17 alankila, the way I understood, it was his choice and his choice alone to have a Stream and not a Writer Jul 31 12:45:17 yes. and thats why we have those writes :) Jul 31 12:45:35 on on Reader side it's more interesting because it could be a bit tricky to handle partially-so-far read characters correctly Jul 31 12:46:15 * ravilov is guessing a non-8bit reader will always read in units of *characters*, not bytes Jul 31 12:46:40 fos.write((int)'\n'); <--work Jul 31 12:46:54 http://lazygeeks.files.wordpress.com/2012/02/facepalm.jpg Jul 31 12:48:02 ravilov: well it's a buffering matter, you will have to consume chunk of the inputstream and then translate it to characters and stop when the charset says that it can't translate this because it could be partial (or is partial), and then you read some more until you know EOF is all you have Jul 31 12:48:20 and then you have to handle the possibility that stream terminated while you still have stuff in buffer that can't be translated and raise some IOException to indicate that Jul 31 12:48:41 hm yeah Jul 31 12:48:41 tricky Jul 31 12:49:09 danijoo, lol Jul 31 12:49:17 reinventing the wheel and stuff.. Jul 31 12:49:54 I'd be happy if the unicode consortium would stop inventing more characters Jul 31 12:49:58 well it's pretty obvious the guy just simply cannot get rid of his infamous C/C++ past, and thinks in C/C++ only :p Jul 31 12:50:41 thats a bad it habit. Its always hard to switch style between languages. Jul 31 12:50:58 danijoo, especially if you're not even trying Jul 31 12:51:08 he was glorifying C/C++ earlier Jul 31 12:51:11 excatly what i wanted to append Jul 31 12:51:18 yeah i was arround Jul 31 12:51:51 when there are 5 people saying "dont do it that way in java", one might rethink .. Jul 31 12:52:07 * ravilov is tempted to tell him to just do it in JNI next time Jul 31 12:52:09 but he doesnt. every day. Jul 31 12:53:37 me? Jul 31 12:53:39 lol Jul 31 12:53:52 who else Jul 31 12:56:49 i dont know Jul 31 12:57:55 Alfreda: just curious: Why are you writing texts as byte instead of using a Writer? Jul 31 12:59:04 the answer seems to be out of my line buffer :( Jul 31 13:01:54 probably because some random person gave a line that happened to be doing that Jul 31 13:02:08 might have been me even. Jul 31 13:02:37 I am having now a custom TextView class which applys letter spacing, but it seems not to work without adding the text view programatically. Any idea how to let it redraw the TextView? Jul 31 13:02:40 I know perfectly well to use Writers as a rule but I often skip them because the write(byte[]) api is convenient enough and spares characters on IRC or elsewhere Jul 31 13:02:44 other than invalidate() Jul 31 13:02:57 plus I sort of dislike the fact that Writers and other abstractions tend to monopolize the close() operation Jul 31 13:03:06 * ravilov is thinking it's because writing byte arrays is more similar to C Jul 31 13:03:24 sometimes I don't want the underlying streams to close, so I end up doing something like deriving the class to anonymous class with ineffective close() Jul 31 13:03:38 Feel dirty and bad afterwards, as one would expect Jul 31 13:04:09 alankila: but at least you KNOW what you are doing .. Jul 31 13:04:48 it's just a favorite API irritation of mine, that if I pass an InputStream or OutputStream to somebody, that better not come back closed after the call Jul 31 13:05:06 but that tends to happen surprisingly often -- I imagine because it is convenient. But that abstraction did not open it, it has no business closing it Jul 31 13:05:17 platzhirsch: If I get it right all your TextView does is setting spaces in the text (making "a s d" when typing "asd")? Jul 31 13:05:35 danijoo: about that, yes Jul 31 13:05:36 alankila, dd you also document such overridden close() with // ICK! Jul 31 13:05:39 ? Jul 31 13:05:47 ravilov: no. I just hide in shame. Jul 31 13:05:55 platzhirsch: so whats the problem? its not working in xml? Jul 31 13:05:56 danijoo: here, is't the solution from Pedro http://stackoverflow.com/a/16429758/658718 Jul 31 13:06:10 fetal position and all? lol Jul 31 13:06:26 I used to write 'I'm really sorry that this code is so shitty' in my code when I was younger but then I realized I'm tempted to write every second line as an apology Jul 31 13:06:44 platzhirsch: seems good. wheres the problem? Jul 31 13:06:49 so I quit writing apologies altogether. It has to be atrocious now to be worth a comment. :-p Jul 31 13:07:38 danijoo: well, changing the default letter spacing (the hard coded one) doesn't change anything in the result, I am having a look if the problem is solved if the whole object is created programtically and not in the layout xml Jul 31 13:08:39 you mean when calling setLetterSpacing(float) ? Jul 31 13:09:47 danijoo: yes, basically it is also called when setText() is called Jul 31 13:09:52 why a custom view? can't this be solved with styles or something? Jul 31 13:09:54 why with JSONArray jArray = new JSONArray(result); i take only first row in result? Jul 31 13:10:00 and I assume that also the layout will call setText() to render it, but maybe not.. Jul 31 13:10:07 platzhirsch: you always have to call invalidate after a change to make it happen Jul 31 13:10:16 this is my code:http://pastebin.com/0MW3GEa9 Jul 31 13:10:26 oh, or maybe the layout xml uses a different setText, different signature Jul 31 13:10:28 super.setText() should do it though. mh.. Jul 31 13:10:33 yeah maybe.. Jul 31 13:10:43 there are like 4 different setText methods Jul 31 13:10:47 "0000-00-00" Jul 31 13:11:08 and after for date i view "0000-00-00" Jul 31 13:11:35 the thread.join() method says "Blocks the current Thread (Thread.currentThread()) until the receiver finishes its execution and dies" can someone put into plain English what the receiver is here. Jul 31 13:11:52 receiver is the thread instance you try to join Jul 31 13:12:03 platzhirsch: lets look into the source ;) Jul 31 13:12:24 How take all result with JSONArray jArray = new JSONArray(result); i take only first row of result Jul 31 13:12:43 result infact is: 07-31 15:09:26.595: E/log_tag(28310): [{"Nome":"gg","Sesso":"M","Nato_il":"0000-00-00","Razza":"Cane1"}] Jul 31 13:12:44 07-31 15:09:26.595: E/log_tag(28310): [{"Nome":"gius","Sesso":"F","Nato_il":"0000-00-00","Razza":"Cane2"}] Jul 31 13:12:44 07-31 15:09:26.595: E/log_tag(28310): [{"Nome":"j","Sesso":"M","Nato_il":"0000-00-00","Razza":"Cane5"}] Jul 31 13:12:57 Alfreda: generate it correctly Jul 31 13:13:01 danijoo: :) you mean look which setText is called when using the attribute android:text=".." ? Jul 31 13:13:03 [{...},{...},{...}] Jul 31 13:13:11 platzhirsch: yes Jul 31 13:13:14 i need a matrix? Jul 31 13:13:24 instead of [{...}],[{...}],etc. that makes no sense Jul 31 13:13:31 I want to dig more into the source code in general, it's the number first approach to solve detailed problems, I am just missing often the starting point here Jul 31 13:13:41 http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/TextView.java#TextView.%3Cinit%3E%28android.content.Context%2Candroid.util.AttributeSet%2Cint%29 Jul 31 13:13:56 thats the onCreate where the xml methods are passed to the object Jul 31 13:14:00 alankila: oh right. Since im on main ui thread this call to workerThread.join() doesnt allow my method to continue until the workerthread has finished up. And by "finished up" I guess this means EXITING the run() method it was invoked for? Jul 31 13:14:03 xml-attributes* Jul 31 13:14:28 alankila: you mean in php script? Jul 31 13:14:40 rgr: the thread most stop somehow for the join to return, though you can give it a timeout. I wouldn't recommend it. Maybe you want to periodically poll if the thread is finished, or notify the main thread from the other thread when it's done. Jul 31 13:14:56 danijoo: you mean the constructor with three parameters, right? Jul 31 13:15:04 yes Jul 31 13:15:13 with Context context, AttributeSet attrs, int defStyle, yeah Jul 31 13:15:38 AttributeSet attrs holds your xml variables Jul 31 13:15:47 that is a massive switch code :) Jul 31 13:16:28 okay, found it Jul 31 13:16:47 alankila: in this case the worker thread is looping and writing to a surface. the loop gate is a boolean about whether the surface is valid (as usual with the world and his mother its another mongrol/zombie variation on the awful Lunar Lander example). Since just before I call join() I set the "surfaceValid" to false the run() that the thread is engaged in will therefore "exit". Im assuming (being new to all this) what a thread "exits" Jul 31 13:16:47 when the obj.run() it executes on thread.start() returns. Jul 31 13:17:51 danijoo: looks like it is using the setText method I am already overriding Jul 31 13:18:03 rgr, is your boolean gate declared as volatile? Jul 31 13:18:40 it is also possible you're not checking its value often enough Jul 31 13:19:02 well basically all those setText() methods are forwarding to the same setText() anyways Jul 31 13:19:11 try calling obj.interrupt() before calling join() Jul 31 13:20:26 danijoo, I don't know if my stuff got through since I got a ping timeout - the layout inflater actually never calls any form of setText() Jul 31 13:20:29 How take all result with JSONArray jArray = new JSONArray(result); i take only first row of result Jul 31 13:20:52 this is my code http://pastebin.com/0MW3GEa9 Jul 31 13:20:55 danijoo: in any way I assume the right magic happens when it's added to the view programatically. It's just a bit confusing, because I assumed invoking invalidating after performin gthe changes would do the trick Jul 31 13:21:01 ravilov: didnt came through Jul 31 13:21:07 netsplitted away :/ Jul 31 13:21:12 i call 3 times a php script Jul 31 13:21:31 platzhirsch: would assume the same.. Jul 31 13:21:51 what IDE for android dev do people use? Jul 31 13:21:58 danijoo: well thanks a lot to give me a push towards the source code, I am sure I can figure out the rest on my own :) Jul 31 13:21:59 Android Studio? Eclipse? Jul 31 13:22:09 ok :) Jul 31 13:22:16 [mainly for UX development] Jul 31 13:22:35 Alfreda, you are not going to get a response by being annoying - you have asked this already, the fact you got no response doesn't mean you need to ask again Jul 31 13:22:46 ravilov: shutup pls Jul 31 13:22:58 lol Jul 31 13:23:01 right Jul 31 13:23:19 well he's definitely not going to get anything from me anymore Jul 31 13:23:23 ravilov: ? Sorry? nothign to do with what the gate is : its a question about thread.join. Jul 31 13:23:48 rgr, sorry, I was on the phone and didn't get the whole gist, let me reread Jul 31 13:23:58 no need. its ok. thanks. I got it. Jul 31 13:23:59 (I also got a ping timeout) Jul 31 13:24:20 ravilov: with this attitude he wont get one from anyone in the next view hours i guess.. Jul 31 13:24:28 :D Jul 31 13:24:54 danijoo, you'd be surprised - eventually someone gets caught and actually tries to help, as ungrateful and rude as the guy might be Jul 31 13:24:54 I'm trying to change a grid layout that I added 10 children to(in code, view.addView(v);) with a columnCount of 5 to a columnCount of 10 and back, the first part works, but when I try to change it back to five I get an exception: java.lang.IllegalArgumentException: columnCount must be greater than or equal to the maximum of all grid indices (and spans) defined in the LayoutParams of each child. Jul 31 13:25:00 Is there a way I can work around that? Jul 31 13:25:08 * ravilov wonders are any ops available at any time Jul 31 13:26:33 rgr, join sucks don't use it Jul 31 13:26:41 Read jcip Jul 31 13:27:17 ravilov: SimonVT is responsible for administrative tasks. ^^ Jul 31 13:28:15 Hi y'all! Jul 31 13:29:52 pfn: just about every example I see uses it. but ok. I'll google jcip. But as a relatively new boy I dont want to go down too many "killer" frameworks before I understand the underlying basics. Ar right a book. I'll stick it on my reading list Perfection can come later.! Jul 31 13:31:42 Hi, I'm following this guide: http://developer.android.com/training/basics/firstapp/index.html - I've got to the end of the first part where the second activity is started. The project builds with no errors, but when the app button is pressed, the app 'Unexpectedly quits'. Can someone help troubleshoot this with me please. Jul 31 13:31:57 Join is the worst way to do thread synchronization Jul 31 13:32:15 bcvery: You know how to read the logs? Jul 31 13:32:42 flan3002, No, please explain. Jul 31 13:32:50 bcvery: Do you use an IDE? Jul 31 13:33:05 flan3002, Yes, NetBeans. Jul 31 13:33:23 Oh, I've never used that one... Are you on Linux? Jul 31 13:33:31 flan3002, Yes. Jul 31 13:33:35 s:Linux:GNU/Linux: Jul 31 13:34:19 bcvery: Open an new VTE and run $ adb logcat. Then reproduce the crash. Jul 31 13:36:26 bcvery: You'll have to locate the stacktrace of your app and show it to us. Don't paste it in here though. Use your favorite pastebin service instead. Jul 31 13:37:36 bcvery: apparently there's a logcat viewer builtin to NBAndroid (which you're presumably using), so you could probably just open that window, too Jul 31 13:38:01 That's superior of course... Jul 31 13:38:10 Hey guys. I'm extending a BaseActivity, and the child activity (NewsActivity) loads just fine, but the listview that gets presented doesn't recognize clicks, not just the onitemclick, but i cannot scroll through the items either. Is this something i'd need to post my code for, or does it ring a bell? Jul 31 13:38:36 i can still use the actionbar menu and navigation drawer though Jul 31 13:38:37 tetraktys: is the ListView in the baseactivity, or child activity? Jul 31 13:38:42 it's in the child Jul 31 13:41:22 code or it didnt happen :) Jul 31 13:41:29 it's like the base activity is overlaying the child Jul 31 13:41:42 alright danijoo, i'll get to it :) Jul 31 13:41:59 sounds like theres some invisible layout over your list or sth.. Jul 31 13:45:58 Alfreda: c est ecrit desssus, ratp ou sncf Jul 31 13:45:59 flan3002, Estel, Sorry it took a while, here is the log: http://pastebin.com/vGcMdKgV Jul 31 13:46:00 meme si ce sont les memes, valables aux memes endroit Jul 31 13:46:02 a paris, ratp et sncf se font une gueguerre a la con Jul 31 13:46:06 that's what i think as well, danijoo https://gist.github.com/joostvanrijn/7c59eecfee922b1fa4a2 Jul 31 13:46:11 oops, wrong chan, sorry guys Jul 31 13:46:20 chpo: ? Jul 31 13:46:40 Alfreda: my ssh is lagging like hell, wrong chan with wrong autocompletion, soory Jul 31 13:46:50 bcvery: has more than one : Check your manifest! :) Jul 31 13:46:59 chpo is talking about trains in france :) Jul 31 13:47:10 chpo: and so' Jul 31 13:47:48 bcvery: if you search for com.nbapp you'll find the useful stuff around line 303 Jul 31 13:48:56 In particular, try not to look at the first line, but go down the tree of "at ..." and "Caused by..." until you find a line within your own code or a useful description Jul 31 13:49:51 bcvery: Your manifest seems to be bugged. Post it? Jul 31 13:50:36 I guess they might be able to fix their problem just from the error :) Jul 31 13:50:50 tetraktys: BaseActivity line 14 Jul 31 13:51:11 Estel: It also says it contains more than application tag... Jul 31 13:51:25 defining mDrawerLayout? Jul 31 13:51:27 And lacks the activity decl, but yeah... Jul 31 13:51:36 you are inflating acitvity_base. is this wished? shouldnt it be layoutResID ? Jul 31 13:51:55 I assume activity got swapped for application Jul 31 13:52:02 oh well nvm Jul 31 13:52:29 Estel, I appreciate your confidence, however I'm working on the first chapter of a guide called 'My First App' (or something similar)! :) Jul 31 13:53:00 danijoo, no it's correct. I actually solved is a second ago: In NewsActivity onCreate() i had to call setcontentview after the inflater Jul 31 13:53:08 flan3002, manifest: http://pastebin.com/XKrbPUQw Jul 31 13:53:14 getLayoutInflater().inflate(R.layout.activity_news, mContentFrame); these lines do nothing Jul 31 13:53:14 bcvery: well, the error around line 305 says " Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.nbapp/com.nbapp.DisplayMessageActivity}; have you declared this activity in your AndroidManifest.xml?" :) Jul 31 13:53:57 oh well nvm again. Jul 31 13:53:58 its k :D Jul 31 13:54:16 bcvery: First: use-sdk > uses-sdk Jul 31 13:54:24 why in my app i view only 1 item in ListVIew? my code are: http://codepaste.net/b6zyq3 and this is MobileArrayAdapter http://codepaste.net/9phfec Jul 31 13:55:29 tetraktys: ok :) Jul 31 13:55:34 flan3002, Thanks, that's fixed. Crash still occurs. Jul 31 13:55:37 thanks either way Jul 31 13:56:52 bcvery: Try changing android:name="com.nbapp.DisplayMessageActivity" to android:name=".DisplayMessageActivity". Jul 31 13:57:07 And similarly add a . in front of MainActivity Jul 31 13:57:18 Usually, the FQCN is not needed because of package="com.nbapp". Jul 31 13:57:27 I'm integrating the library "Retrofit" into my app and I'm running into a strange issue. Whenever I set the LogLevel to FULL, everything works. However when I switch back to LogLevel BASIC, I no longer receive any parsed objects from the Retrofit methods. The request is still successful (the log reports the proper request url and a status code 200), but the method returns null instead of the parsed object. Any ideas? Jul 31 13:59:34 app dont enter in public View getView why? Jul 31 14:01:42 Alfreda: you need to relearn how adapters work imo Jul 31 14:01:58 is a strange behaviours Jul 31 14:02:01 you can help me? Jul 31 14:02:08 i view only 1 item Jul 31 14:04:05 MrMaffen link me where you build your restadapter Jul 31 14:04:25 If I set a columnCount of 5 on an empty gridlayout and then add 10 objects, it should just fill a second row on the 6th to 10th object, right? Jul 31 14:04:36 Syzygy: yeah Jul 31 14:04:51 I get this error though: java.lang.IllegalArgumentException: column indices (start + span) mustn't exceed the column count. Jul 31 14:05:01 Syzygy: wait, do you mean GridView? Jul 31 14:05:07 GridLayout is very different Jul 31 14:05:09 no, gridlayout Jul 31 14:05:15 Then no Jul 31 14:05:26 i have resolved! Jul 31 14:05:56 Estel, actually, it works one and doesn't work the second time. let me paste my code. Jul 31 14:06:00 mattblang: http://paste.kde.org/pwywug4dt Jul 31 14:06:10 Alfreda: Congrats, you're being /ignored now. -.- Jul 31 14:06:22 why? Jul 31 14:07:34 mattblang: here's my JacksonConverter http://paste.kde.org/pefupda8m Jul 31 14:07:46 mattblang: and here's how I construct my Jackson ObjectMapper http://paste.kde.org/ph5qmjy5x Jul 31 14:08:00 Alfreda: because you can't follow simple instructions and expect other people to do the work for you Jul 31 14:08:06 there, I said it.. :P Jul 31 14:08:07 Jackson doesn't throw any exceptions htough Jul 31 14:08:12 :P Jul 31 14:08:48 MrMaffen any reason why you used Jackson over gson? Jul 31 14:09:14 mattblang: because I already used Jackson prior to implementing Retrofit Jul 31 14:09:15 http://pastebin.com/SFFDgn4C here's my code. It constructs a gridlayout with a columnCount of 5, fills it with 10 elements (so 2 rows). if you click the first element it displays all elements in a single row (it's contained by a horizontal scroll view), if you click it again it should go back to the way it originall was, but I get the error Jul 31 14:09:23 I feel more comfortable using it ^^ Jul 31 14:10:42 any titanium devs here? Jul 31 14:10:51 Hello. is there a way to wrap long words via a style? My textview wraps correctly when the words are broken up, just not long words. Jul 31 14:11:31 I'm digging through the documentation, and I get the impression that using Alloys XML only complicates matters. It would seem better to just code it all up in Javascript Jul 31 14:11:33 flan3002, unfortunately the behaviour is the same. Here is the new manifest: http://pastebin.com/hjiqn2rb and here the relevant part of the log: http://pastebin.com/hjiqn2rb Jul 31 14:12:08 Syzygy: what's R.layout.search_query_element look like? Jul 31 14:12:29 MrMaffen how hard would it be to try gson just to see if it works? retrofit uses it by default, so you would just not specify a converter when building your adapter Jul 31 14:12:50 it's a linear layout with two textviews (stacking an icon and a description on top of each other) Jul 31 14:13:08 bcvery: Check your links, they are identical. Jul 31 14:13:15 MrMaffen I would guess that if you are getting a 200 success that the problem lies somewhere in the deserialization Jul 31 14:13:22 flan3002, sorry, log: http://pastebin.com/7vMBy4Ga Jul 31 14:13:48 unmgmt_: Isn't #titanium_app suited better for you? O.o Jul 31 14:14:08 flan3002: it would be, but no one responded... :/ Jul 31 14:14:11 mattblang: yea but the strange thing is that it works with LogLevel.FULL but not with BASIC. that's why I thought the problem isn't necessarily related to my jackson converter Jul 31 14:14:44 mattblang: switching over to gson is not that easy unfortunately :S Jul 31 14:14:54 MrMaffen okay, try not setting a log level at all and see what happen Jul 31 14:15:16 will do Jul 31 14:15:58 MrMaffen I am assuming it is NONE by default. I either do FULL or none, depending on if I am in development or building for production Jul 31 14:16:12 bcvery: Show me the code in DisplayMessageActivity.java. Jul 31 14:16:44 mattblang: same problem when setting no loglevel ... it returns null Jul 31 14:16:45 Hi all. It's funny that Google has been rather silent about Android Studio. Not a big mention on IO 2014... :/ Oh well... Jul 31 14:17:07 mattblang: my app is currently in beta, so I thought it might be a good idea to have some basic log info in there Jul 31 14:17:23 flan3002, Sure: http://pastebin.com/Gr9uknCH Jul 31 14:17:29 pedrosanta: It was in one of the very first talks. Jul 31 14:17:44 MrMaffen that is really weird, so double check, for sure if you set it to FULL right now it will work? Jul 31 14:17:48 And most of what they showed, like Android View is already in 0.8.4 Jul 31 14:17:59 I can't laugh about that... :/ Jul 31 14:18:02 kakazza: Was? Which one? Can you give me a URL, more info? :) I'm interested. Jul 31 14:18:16 What's new in Android Tools I think Jul 31 14:18:38 They talked about Gradle, then Tor Norbyte talked about Android Studio. Jul 31 14:18:45 mattblang: yup works with FULL :D Jul 31 14:18:50 really weird indeed Jul 31 14:18:53 kakazza: Cool got it, thanks. :D Jul 31 14:19:29 pedrosanta: yeah, it was the day 2 keynote! :P Jul 31 14:19:55 It's amazing the amount (and the pace) of cool stuff Google is putting out these days. Feeling excited. Jul 31 14:20:17 So. Jul 31 14:20:29 I have a DialogFragment that accesses getString() at some places. Jul 31 14:20:41 That works fine most of the times, except when it doesn't. It's very intermittent. Jul 31 14:21:05 When it fails, it fails with IllegalStateException: Fragment not attached to Activity Jul 31 14:21:18 Any thoughts on why this could happen? Jul 31 14:21:37 you're doing weird stuff with your fragment object? Jul 31 14:21:44 MrMaffen is it doing this for every web service mapping (how many do you have)? Jul 31 14:22:01 bcvery: The line numbers don't line up. Are you sure it's the whole file? What's at line 34? Jul 31 14:22:08 Estel, nothing weird at all. Just displaying some text. Jul 31 14:22:35 Estel, here's how that looks in the app: https://www.dropbox.com/s/r69g0lu619pi20f/Screenshot_2014-07-31-16-18-17.png (the footer is the important part I linked earlier). I find it weird that I can build it the first time, but the second time I get an error. Jul 31 14:22:50 mattblang: quite a lot, like ~20 or so Jul 31 14:22:56 and yes for every one I've tested so far Jul 31 14:23:07 which were 4 I think Jul 31 14:23:47 maybe JakeWharton can help? (shameless ping :P) Jul 31 14:23:53 How reduce distance between items in a List View? Jul 31 14:24:11 MrMaffen: It's still 7AM in the west coast Jul 31 14:24:22 I'm integrating the library "Retrofit" into my app and I'm running into a strange issue. Whenever I set the LogLevel to FULL, everything works. However when I switch back to LogLevel BASIC, I no longer receive any parsed objects from the Retrofit methods. The request is still successful (the log reports the proper request url and a status code 200), but the method returns null instead of the parsed object. Any ideas? Jul 31 14:24:24 MrMaffen is there a simple one that you aren't doing anything special with jackson? I'm still curious what would happen if you tried gson. Might be easy to at least test if you have a web server that you aren't needing to convert any of the json Jul 31 14:24:44 Alfreda, padding, margin. try negative values. Jul 31 14:24:46 MrMaffen even if you can't switch to it, would be nice to know for sure that it is something weird going on with Jackson Jul 31 14:24:59 mattblang: yea true. I'll check on that Jul 31 14:25:08 MrMaffen or rather, the interaction of Jackson and retrofit Jul 31 14:25:27 Syzygy: Margin or padding? Jul 31 14:25:42 both. play around with them. Jul 31 14:26:01 marginTop? Jul 31 14:26:10 for example. Jul 31 14:26:14 By default there's no "distance" between listview items Jul 31 14:26:30 An emotional distance. Jul 31 14:26:37 It's rather your listview items that have "distance" between its bounds and its content Jul 31 14:26:37 flan3002, Sorry, I cleared out a load of comments (without thinking), here it is when the log was recorded: Jul 31 14:26:37 http://pastebin.com/v3PMHTyL Jul 31 14:26:48 Just change the layout you're using for your items Jul 31 14:27:36 Syzygy: Margin reduce only ListView Jul 31 14:27:46 no distance between items inside ListView Jul 31 14:28:01 apply it to the items, not the listview. Jul 31 14:28:24 bcvery: It seems as if textView is null, which shouldn't happen, however. Jul 31 14:29:33 mattblang: ok it seems like the problem is related to me setting a specific Deserializer for one of the properties in my json Jul 31 14:29:58 Syzygy: i want reduce this distance look: http://postimg.org/image/px68ccn4d/ Jul 31 14:30:00 mattblang: http://paste.kde.org/pc6gvptoq Jul 31 14:30:38 ah wait no Jul 31 14:30:41 I forgot something Jul 31 14:30:50 bcvery: You're not calling super.onCreate Jul 31 14:31:08 Alfreda, yes, change the padding and/or margin of the items in the listview. Jul 31 14:31:14 how? Jul 31 14:31:16 in xml? Jul 31 14:31:24 yes, also works in code. Jul 31 14:31:48 in xml i have only no item Jul 31 14:33:26 Damn it, SimonVT, of course... -.- Jul 31 14:34:46 Alfreda, your listview is filled by an adapter. you either set a padding/margin in getView or reference a layout file (R.layout.something) that specifies the list items with a padding/margin Jul 31 14:34:50 mattblang: nvm, that's not it Jul 31 14:35:27 Syzygy: yes Jul 31 14:35:31 in getView method? Jul 31 14:35:38 try it and see. Jul 31 14:36:42 SimonVT, Yes, thank you. This has been updated, however the behaviour remains the same. Jul 31 14:37:09 Nah, behavior would be different Jul 31 14:37:23 Since last time it crashed because the actionbar compat wasn't initialized Jul 31 14:37:33 Now it is, so you're getting a different crash Jul 31 14:37:44 hi all - whats a good way to play gif animations? Jul 31 14:37:56 press play? Jul 31 14:37:56 one frame at a time Jul 31 14:38:21 http://instantrimshot.com/ Jul 31 14:38:35 not sure if wanna click Jul 31 14:38:59 it's just a bad sound effect for a bad pun. Jul 31 14:39:59 mattblang: setting the return type to "Response" results in a non-null return value Jul 31 14:40:08 as expected Jul 31 14:41:28 kakazza: lemon party left its scars, huh? Jul 31 14:42:39 These wounds, they will not heal. Jul 31 14:43:28 I wouldn't want to risk getting banned over something like that. Jul 31 14:44:05 I almost got banned once by leaving in debug output in my code that were lyrics to some song that was stuck in my head. Jul 31 14:45:52 can I clear the state of a view somehow (especially layout params)? Jul 31 14:47:28 There's no reset() method Jul 31 14:47:59 On that note, why exactly did you implement .reset() on ButterKnife, SimonVT? Jul 31 14:48:17 I'm not sure how nulling them out would matter. Can they even leak? Jul 31 14:48:22 I tried getLayoutParams() right after I created it and wanted to set that when reusing, but fun fact, apperently layoutParams are null at that point, and you can't set null as layoutParams. Jul 31 14:49:44 kakazza: Two reasons really Jul 31 14:50:19 When you detach a fragment, you're still keeping the instance alive.. There's no reason to keep a reference to the views (they're never going to be used again) Jul 31 14:50:35 Might even use a lot of memory if you display a lot of bitmaps Jul 31 14:51:16 Never going to be used again, why? What if I reattach? Jul 31 14:51:17 Also, if you have a retained fragment it would keep a reference to the views, and thus the activity, through configuration changes Jul 31 14:51:31 It isn't necessarily added to the new activity immediately Jul 31 14:51:58 woot Jul 31 14:52:04 When you re-attach onCreateView is called again Jul 31 14:53:49 Fair enough Jul 31 14:53:58 Just wish ButterKnife could do this automatically. Jul 31 14:54:16 ButterKnifeFragment Jul 31 14:54:18 Noone wants that :) Jul 31 14:54:35 ;p Jul 31 14:54:49 I'm totes gonna do that! Jul 31 14:55:05 I do that as well Jul 31 14:55:17 But making it a part of ButterKnife isn't a good idea Jul 31 14:55:22 Yah Jul 31 15:00:21 Do you only override onDestroyView in your ButterKnifeFragment? Jul 31 15:00:34 And do the "injection" in the child classes? Jul 31 15:02:32 mattblang: works with gson ... Jul 31 15:05:24 Override onViewCreated and onDestroyView Jul 31 15:05:27 Do both :) Jul 31 15:05:52 But inflation must happen in the child, how do you pass the rootView to the parent for injection? Jul 31 15:06:26 onViewCreated is called after onCreateView where the child would inflate Jul 31 15:06:38 Ah, I missread. Jul 31 15:07:21 And forgot about that callback, used https://developer.android.com/reference/android/app/Fragment.html#Lifecycle as a reference but didn't look down in the method documentation. Jul 31 15:10:07 i have a linked list string containing numbers. I attempted to sort with Collections.sort but entries like 10 or 11 precede an entry of 2. Jul 31 15:10:26 entry = list element Jul 31 15:11:34 string-nums i mean Jul 31 15:13:43 Google natural sorting Jul 31 15:15:32 If you're comparing strings, then you're not comparing numbers Jul 31 15:17:16 MrMaffen I was expecting so. May be worth making an SO or github issue, even if just for the sake of pointing out some weird interaction. Jul 31 15:19:26 ty kakazza and SimonVT Jul 31 15:23:20 Can anyone tell me what triggers the spinner and the text "Loading..."? It's still showing after a fragment (with news items) pops up, Jul 31 15:24:55 Syzygy: in mydogs1.xml i have this xml: http://codepaste.net/cby56s Jul 31 15:25:09 how i edit? Jul 31 15:26:59 might be the layout_height of the ImageView, try changing that to match_parent or some smaller dp value Jul 31 15:27:01 you mean margin and padding of Linear Layout Jul 31 15:27:14 ? Jul 31 15:29:02 Syzygy: ? Jul 31 15:29:17 the size of the linear layout is defined by the children (because of wrap content), so you would have to change the values in the children. except maybe the layout_marginTop="-90dp" and the layout_height="100dp" I see no values that should result in a large impact on the size Jul 31 15:31:57 Syzygy: who is children? Jul 31 15:32:07 textedit? Jul 31 15:32:24 everything between and Jul 31 15:32:29 Who is children for ten, Alex. Jul 31 15:32:59 Syzygy: no is impossible this Jul 31 15:33:06 then just quit. Jul 31 15:33:38 if i edit margin of edittext Jul 31 15:33:45 it move on the layout Jul 31 15:34:27 why i view space between item of listview? Jul 31 15:34:27 you want it to move. play around with the values until it moves the way you want to. also try the layout_height of the image view. Jul 31 15:36:27 Syzygy: if i change layout_height of the image i view only more item but same distance Jul 31 15:36:37 because image is more small Jul 31 15:37:38 have you changed this value yet? android:layout_marginTop="-90dp" Jul 31 15:38:04 Syzygy: for edittext? Jul 31 15:38:12 whats a library to do pull to refresh like gmail that's not depracated? Jul 31 15:38:22 do you see that value anywhere else? Jul 31 15:38:36 change it to soemthing like 5dp Jul 31 15:38:50 if that doesn't help you i'm out of ideas and you're on your own. Jul 31 15:38:56 no because after i view this Text view in another position! Jul 31 15:40:30 Syzygy: i want this: http://postimg.org/image/tiiyto7h5/ Jul 31 15:40:45 if i edit for android:layout_marginTop Jul 31 15:41:10 so you want more space? I thought you wanted less. Jul 31 15:41:11 for android:id="@+id/textView2" i view it move down Jul 31 15:41:18 no i want less Jul 31 15:41:22 from item Jul 31 15:41:27 at another Jul 31 15:41:35 of list view Jul 31 15:43:10 I have no idea why you have this much space between the items. you could try giving your LinearLayout a negative marginBottom, but it would be a bad approach. Jul 31 15:43:35 instead you should figure out why there is this much space in the first place, but I can not help you with that any further. Jul 31 15:46:40 negative bottom margin dont work Jul 31 15:47:24 Estel, sorry for directing this directly to you, but you seem to know a lot :) When i start my app the first activity loads data from an external source with an asynctask. A spinner with the text "Loading..." gets diaplayed, but when the news items fragment loads the spinner is still visible on top of the fragment. I already commented out the ProgressDialog, and I'm not calling a dialog anywhere else Jul 31 15:49:15 tetraktys: I know very little to be hoenst, but I need to get home from work so can't answer atm, sorry ^^ Jul 31 15:49:33 Ah, that's too bad Jul 31 15:50:27 No it isn't! I want to get home! :P Jul 31 15:51:30 You'll probably want to pastebin your code, either wya Jul 31 15:53:15 I'm sure I've asked this before, but I'm constantly finding hidden collection libraries in java. Is there something comparable to ruby's Enumerable#map in java that can be used in android? Collections(2), Iterables, something? Jul 31 15:59:05 god damn it, i've been stuck on this for hours now. Jul 31 16:00:17 Syzygy: i've resolved Jul 31 16:00:23 insert a new horizontal layout Jul 31 16:01:58 mattblang: I've been using an outdated version of jackson, that's why I saw such weird behaviour by retrofit. latest version of jackson works fine Jul 31 16:02:04 just thought I'd let you know ^^ Jul 31 16:05:40 MrMaffen awesome man! thanks for letting me know Jul 31 16:11:36 mattblang: thanks for brainstorming with me :) Jul 31 16:14:16 hey guys I’m having a hard time completing my migration to Android Studio Jul 31 16:14:26 latest challenge is this error: org.slf4j.impl.AndroidLoggerFactory cannot be cast to ch.qos.logback.classic.LoggerContext Jul 31 16:18:19 yaw O.o Jul 31 16:20:23 g00s: any help? thanks Jul 31 16:23:03 yaw that doesn't look like an error from AS Jul 31 16:23:10 build from the command line Jul 31 16:23:34 g00s: I did, it’s a gradle error Jul 31 16:23:50 but I don’t use gradle except in Android Studio Jul 31 16:24:10 everything works in Eclipse (if that’s important information) Jul 31 16:24:14 yaw do you use slf4j ? Jul 31 16:24:46 not intentionally. maybe an application on my machine uses slf4j Jul 31 16:25:37 sounds like your tooling is messed up if this isn't being used in your app. make sure you have the latest of everything Jul 31 16:26:17 g00s: yes, that’s taken care of. Jul 31 16:26:39 I use gradle-1.12 in Android Studio Jul 31 16:28:10 and sdk buil tools ? Jul 31 16:28:45 20 (the latest) Jul 31 16:29:05 sorry i have no idea Jul 31 16:29:30 I need a small image gallery which can contain up to 5 thumbnails with a thrash icon next to each one, to delete the image. How would I go best about this? Try creating a new custom view? Or rather some sort of ListView with an adapter? Jul 31 16:30:02 g00s: thanks for your time :) Jul 31 16:30:13 Or just plain ImageViews with a Button next to them? Jul 31 16:31:19 is it possible to register two android applications for the same facebook app? Jul 31 16:59:22 I am furious can someone tell me why the Nexus 7 has such a high-ass resolution but is only xhdpi? Jul 31 17:00:14 when a thread is "start"ed and sometime later the run() invoked on the runnable exists that thread object is now said to be what? useless? resuable? (I know there are thread pooling etc but Im just wondering about the one thread I create and if I can reuse it somehow : im very knew to this) Jul 31 17:00:24 s/exists/exits Jul 31 17:00:37 finished Jul 31 17:01:33 I can or cant no restart it? Jul 31 17:01:51 eg terminated. Thread.State.Terminated Jul 31 17:01:59 I can't quickly find proof in the docs, but my memory says no Jul 31 17:02:22 platzhirsch: because the density is still only 320dpi ? Jul 31 17:02:52 so where I stanrted my bg rendered with something like Thread t = new Thread(runnable);t.start(); .. when that "run" exits on the runnable my "t" is now used and finished? Jul 31 17:03:05 IIRC, yes Jul 31 17:03:29 Thorbear: mhm.. still icons are too small now Jul 31 17:03:50 "It is never legal to start a thread more than once. In particular, a thread may not be restarted once it has completed execution." Jul 31 17:04:01 platzhirsch: so provide different icons for different screen sizes? Jul 31 17:04:05 (from Oracle's Java docs) Jul 31 17:04:23 Thorbear: yeah, that's what one does :) for mdpi, hdpi, xhdpi Jul 31 17:04:27 should have seen that. thanks. Jul 31 17:04:38 on all hdpi devices so far it's rightly proportioned, but the Nexus 7 breaks ist Jul 31 17:05:04 platzhirsch: no, that's for different screen densities, for screen sizes use small/normal/large/xlarge Jul 31 17:05:30 oh Jul 31 17:05:47 platzhirsch the Nexus 7 (both the old and the new) are a bit different than expected. What doesn't help is that other 7" tablets don't necessarily follow their convention either Jul 31 17:05:52 gross. when i create a new email in gmail, it shows an advertisement where i would put the body Jul 31 17:05:53 screen sizes have been deprecated Jul 31 17:06:14 really? Jul 31 17:06:23 if you are using a sufficiently large API, you should base your layouts on minimum and maximum width/heights in dps Jul 31 17:06:32 yes, really Jul 31 17:06:36 what? Jul 31 17:06:44 * Chainfire never follows his own advice in this Jul 31 17:06:58 Ah, replaced by screen dp count Jul 31 17:07:34 screen dp count? Jul 31 17:07:38 any doc link? Jul 31 17:07:51 http://developer.android.com/guide/practices/screens_support.html#DeclaringTabletLayouts Jul 31 17:09:33 Thorbear Chainfire: Thanks you two, that's very useful Jul 31 17:09:53 g00s gmail app has ads now? Jul 31 17:10:18 Chainfire saw that on the web version. usually see eads on the side, but it was in the compose window Jul 31 17:10:31 anyone else getting wrong exit codes from su calls (using SuperSU)? Jul 31 17:10:34 gmail app is supposedgly getting adds though Jul 31 17:11:06 "The One-Horse Race: 85% Of The 300M Smartphones Shipped In Q2 Were Android" oi ! Jul 31 17:11:49 yikes g00s. glad I never drank from the gmail koolaid then Jul 31 17:11:54 I get ads in the "Promotions" category of the gmail app... I never really open that category though Jul 31 17:12:02 EPG if you're using SuperSU v2.01 on L, upgrade to v2.02 Jul 31 17:12:07 Chainfire i've been looking at fastmail Jul 31 17:13:00 Chainfire, I'm using v2.01 on 4.3 Jul 31 17:13:45 would an update make sense/a difference there, too? Jul 31 17:14:05 well, you're going to have to provide a test case, then Jul 31 17:14:48 ok, I'll tinker a bit with it. Doesn't occur always unfortunately Jul 31 17:15:37 Can I have a ListView be the height of all it's containing items? And be placed among other views in a ScrollView? Jul 31 17:16:12 syndarion, afaik no Jul 31 17:16:28 EPG: thanks for quick answer Jul 31 17:16:29 syndarion: i didnt understand your question completely, but its not at all recommended to put listview inside a scrollview Jul 31 17:16:38 Here's the deal Jul 31 17:16:50 I need some sort of photo gallery containing up to 5 thumbnails Jul 31 17:17:14 next to each thumbnail needs to be a button to delete the image Jul 31 17:17:25 syndarion maybe look at cwac-mergeadapter Jul 31 17:17:29 what would be the best way to do this then? Jul 31 17:17:41 syndarion: read about gridview? Jul 31 17:17:45 might I add that this is my first venture into Android programming :p Jul 31 17:17:45 have a listview with all the things, and one child adapetr the thumbnails Jul 31 17:18:27 also, this gallery isn't the entire height of the activity, but appears below some textfields Jul 31 17:18:38 technically, only 5 things doesn't warrant a listview - especially if everything else around it is static also Jul 31 17:18:38 so the entire activity screen is in a scrollview Jul 31 17:19:03 g00s: so beter going with just 5 imageview with buttons next to them? Jul 31 17:19:34 syndarion if everything else around it is static, and you are just starting off with android, yeah i'd go with that Jul 31 17:19:44 funny, that's what I had Jul 31 17:19:52 but it seemed.. wrong, I guess :p Jul 31 17:19:57 if you increase to more things definitely listview Jul 31 17:20:16 syndarion well then , go for the gusto and do it with listview, it will be good learning Jul 31 17:20:16 but the problem is that the gallery doesn't take up the entire screen Jul 31 17:21:00 right now, I've tinkered up a PictureAdapter, but now my ListView is the height of 1 item, and is scrollable Jul 31 17:21:28 which isn't my intention Jul 31 17:22:40 syndarion listview must be width/height match_parent Jul 31 17:23:26 g00s: but that will make it the height of the entire window, which I don't need Jul 31 17:23:50 The window consits of a few TextViews, and than an "Add picture" button Jul 31 17:24:01 so the added pictures need placing somewhere Jul 31 17:24:16 for which I though a ListView would be good, but appearently not Jul 31 17:24:25 syndarion, add weights Jul 31 17:24:30 yes ;) Jul 31 17:24:40 g00s: yes to the weights? Jul 31 17:24:55 yes, then make LV height = 0dp, weight=1 Jul 31 17:25:10 put inside LinearLayout Jul 31 17:25:23 habe the buttonBar on the bottom Jul 31 17:25:31 LL orientation vertical Jul 31 17:25:44 so... I have a bg rendering thread that currently exits the run() method when the surface is invalidated. I then neded to create a new thread when the surface is recreated. My Q is about how android treats things. If I put something in my bg thread run() so that it sits there in a while() loop while there is no valid surface is that ok? Will the thread by frozen by the system anyway when I switch to another app? Jul 31 17:27:26 g00s: doesn't work. Might I add that all this is happening inside a ScrollView :) which is probably considered.. bad practice? Jul 31 17:27:45 syndarion you cant have a lv in scrollview, scrolling in the same dimension Jul 31 17:28:15 but still considered bad practice probably? :p Jul 31 17:28:41 so let's say we leave the LV for now.. What would be the best way to add the picture gallery, containing up to 5 pictures? Jul 31 17:29:49 rgr> stop/kill the thread when the surface is invalidated, create a new one when its present again Jul 31 17:29:56 syndarion sorry, have to run Jul 31 17:30:00 threads do not necessarily stop executing when you switch apps Jul 31 17:30:13 g00s: np, thanks for the help Jul 31 17:33:22 Chainfire: yeah. thats what im doing. Jul 31 17:36:22 dumb question - is there some (magic|elegant|free-artwork) way to display emoji in an app vectorially, along with multiple-colors? [eg: I assume this means ttf files are out] Jul 31 17:38:16 is there a way for me to check if a linear layout is "full"? e.g. like the view at the top here: https://www.dropbox.com/s/syupqd0584q341j/Screenshot_2014-07-31-19-37-33.png Jul 31 17:39:43 Also, I can't seem to find a way to put padding/margin between the backgrounds of those text views. any idea what i could do there? Jul 31 17:40:48 Syzygy: for #2 - layout_margin* should be respected by LinearLayout - maybe paste the xml somewhere if that parameter doesn't do the trick Jul 31 17:41:27 kbs, wouldn't i apply the margin to the textview? Jul 31 17:41:56 Syzygy: yes, that would be the approach - maybe paste the xml if it doesn't seem to work? Jul 31 17:42:44 give me a moment, I'm trying out something first Jul 31 17:44:52 Hi guys.. So, I have an app that works fine on android 3.x+, when I run it on 2.x (I use android support libs, with nag drawer) I get a NoClassDefFoundError when trying to load a fragment Jul 31 17:45:04 fmontano, which class? Jul 31 17:45:06 its not a library, its a class I have in one of the packages Jul 31 17:45:19 I called BookListFragment.java Jul 31 17:45:38 extends android.support.v4.app.fragment Jul 31 17:46:41 its super weird that gives that noclassdef, when it works perfectly on 3.x+. Has anyone seen something like this? Jul 31 17:49:07 kbs, the LinearLayout is a standard linear layout with the required attributes and just stuff to position itself as well as an ID. Jul 31 17:49:16 here's the more interesting code: http://pastebin.com/saFLrhQE Jul 31 17:51:51 but the margin is only specified for your customview. Jul 31 17:52:07 did you mean to pad the containing layout instead? Different things. Jul 31 17:53:54 Is anyone here going through the Udacity Android videos and having problems with the Content Provider stuff? Jul 31 17:54:37 It seems my provider always returns an empty cursor so no data shows up in the ListView, I've placed print statements and it says it is inserting rows into the underlying database so I don't understand. Jul 31 17:55:21 rgr, I want to space out the textviews so that they're not so close together anymore Jul 31 17:55:27 the parent layout should respect the child's margin request when laying out the children - [tbh, I don't know that "layout_margin" by itself is a thing - I always thought you had to specify them explicitly] Jul 31 17:56:16 I don't see "layout_margin" documented in the marginlayoutparams, but given android, that doesn't mean anything :-) Jul 31 17:57:05 layout_margin seems to work in other places so i don't see why it wouldn't work here Jul 31 17:57:10 If anyone wants to take a few minutes to try and help me with my Content Provider problems, here's a link to the project: https://github.com/jdawes/sunshine-android Jul 31 17:57:11 I see, okay Jul 31 17:58:08 Syzygy: interesting. So if you've checked that layout_margin is acceptble, then no further ideas on my end - oh well. Jul 31 17:58:51 might as well try margin_left, margin_right Jul 31 17:58:54 or whatever it is Jul 31 18:03:13 doesn't seem to work Jul 31 18:04:04 what's the actual attribute you used? Jul 31 18:07:56 kbs, https://www.dropbox.com/s/lvqtx24rag0j7q9/Screenshot_2014-07-31-20-05-03.png here's how it looks now with the following attributes Jul 31 18:08:24 android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:paddingLeft="10dp" android:paddingRight="10dp" Jul 31 18:09:05 Hello. Which networks are you guys using for app monetization? Jul 31 18:09:14 Any suggestions. :) I'm thinking RevMob. Jul 31 18:10:15 Syzygy: if what I'm seeing is margins added to a layout that is being used directly as list elements in a listview, then that will not work, the margin of the list elements are ignored, add another layer for your list elements (even though lint will think one of them is useless) Jul 31 18:11:20 Syzygy: looking back at your code, [ Thorbear - http://pastebin.com/saFLrhQE ] I wonder if you also need to requestLayout on your header Jul 31 18:11:21 Thorbear, I'm talking about the textviews at the top ("stuff 2"), here is the code I use to add it (the xml has changed, to no avail) http://pastebin.com/saFLrhQE Jul 31 18:13:02 Syzygy: though, not sure - something about that code is a bit odd. Why are you doing one more find after inflation? Jul 31 18:14:03 kbs, because I'm stupid, I'll remove it. do I do requestLayout before or after adding? I've never used it before Jul 31 18:14:33 Syzygy: don't pass null as parent for inflating, pass the header view, and add a third parameter false. Jul 31 18:15:31 Syzygy: oh, ok - then the find is a non-issue. requestlayout after adding the view (should force the layout to run its measure/layout pass, which will at least confirm this has run.) Jul 31 18:17:20 However, looking at the LinearLayout code it seems like it should still have drawn the children properly regardless, so I'm not too optimistic... oh well Jul 31 18:17:37 doing requestLayout and then I'll have to leave Jul 31 18:17:55 * kbs is also out of ideas :-) Jul 31 18:17:59 since some friends have decided to come over and I need to get home first Jul 31 18:18:10 nope doesn't work either Jul 31 18:18:20 anyway thanks for the help, I'll probably ask some more stuff tomorrow. Jul 31 18:22:53 Has anyone messed with dual booting on an Android device Jul 31 18:23:04 maybe different versions of an OS or something Jul 31 18:23:16 alright, so I'm trying to work out how best to open a file when my app starts, electing to use external storage if possible. I've got (simplified) http://pastebin.com/Rek5mmUV in my main public class, but I can't work out how I can get a Context into line 4. Docs don't seem to help either. Any suggestions? :| Jul 31 18:23:52 Hmm I guess that might be a root question nvm Jul 31 18:25:22 NeoThermic_II: When you are in an Activity "this" is a Context Jul 31 18:25:52 Hm, I wonder if Syzygy's issue might be with it not creating the correct layoutparam class because it's being inflated without knowledge of the parent class Jul 31 18:25:55 NeoThermic_II: Also this.returnFileForWrite is redundant, you don't need to say this. Jul 31 18:27:21 saying this.* ever is always redundant in java Jul 31 18:27:31 you could always just say * Jul 31 18:29:18 Thorbear: think you're correct about the issue being not passing in the parent - that would probably cause the wrong layoutparam class to be created Jul 31 18:30:44 NeoThermic_II, this is indeed an overly complicated piece of code (even if simplified) Jul 31 18:31:04 you don't even need to pass the context around like that, all your code is running *within* the context Jul 31 18:33:20 what do yall think about the back button causing the app to close when at the top level views with nav drawer, as apposed to going back to the last visited item? Jul 31 18:34:00 in most cases, beating-the-dev-in-bloody-pulp worthy. Jul 31 18:34:05 ^ Jul 31 18:34:12 mattblang, too little info to tell for sure Jul 31 18:34:33 mattblang, depends on what your app really does Jul 31 18:34:52 ravilov, Mavrik was just wondering as I was using the IO 2014 app Jul 31 18:35:03 but you're dealing with something that's connected to muscle memory of the user... if users will accidentaly quit from app when they want to go back they WILL be frustrated Jul 31 18:35:05 ravilov, Mavrik is that becoming the new standard? it bothers me a bit for some reason Jul 31 18:35:14 I sure hope not. Jul 31 18:35:34 I thought the "new" trend is to press back twice to exit from apps Jul 31 18:35:39 with a little toast in between Jul 31 18:35:56 Mavrik yeah, I guess it is muscle memory. since Ive first used Android I could always rely on the back button taking me to whatever I was prevoiusly doing Jul 31 18:36:40 mattblang, I think you should make it so that merely touching the screen closes the app :p Jul 31 18:37:36 ravilov what about @Override onBackPressed( // generate random number // pick activity from list based on random number // startActivity(randActivity) Jul 31 18:38:01 mattblang, nah, that would be confusing instead of frustrating Jul 31 18:38:12 ravilov haha Jul 31 18:38:13 mattblang isn't back to close the normal default behavior ? Jul 31 18:38:37 g00s, no? Jul 31 18:38:40 g00s if you haven't gone anywhere else maybe Jul 31 18:38:51 g00s but if I have been using the app, I always expect back to take me to whatever I was just doing Jul 31 18:39:05 g00s the io 2014 app takes you out of the app if you are on any of the top level screens Jul 31 18:39:16 i'm just trying a few apps. liek gdrive , back exits Jul 31 18:39:17 g00s and I've noticed some other apps do that. so makes me conflicted about hwo to implement it Jul 31 18:39:29 keep does it Jul 31 18:39:39 ravilov what are you talking about ? Jul 31 18:39:42 g00s yeah, it seems to be Google's new way. but based on the fact that it bothered me, I wondered if it bothers anyone else Jul 31 18:39:42 ravilov: oooh Jul 31 18:39:50 There shouldn't be a back button at top level with the nav drawer Jul 31 18:40:02 yiati the hard back button, not the home back Jul 31 18:40:07 okay Jul 31 18:40:17 g00s, about your statement about pressing back to close Jul 31 18:40:21 hey dudes Jul 31 18:40:23 * ravilov has had an experience with an app that had like 3 tabs and pressing back would take you through the full history before eventually exiting Jul 31 18:40:27 iirc kitkat guidelines specified that pressing back would eventually close the app (after going back through layers), and to me that seems quite natural now, I expect apps to close when I press back without being deep in a menu. Jul 31 18:40:30 Chainfire, no issues with SuperSU 1.97. If you need more detail, pm? Jul 31 18:40:45 Play books does it too Jul 31 18:40:58 so if you were on tabs 1 -> 2 -> 3 -> 2 -> 3 -> 1 -> 3, then you would need to press back 7-8 times to exit Jul 31 18:41:00 so i think back is exit at the top level :) Jul 31 18:41:10 ravilov: so how would I pass MODE_PRIVATE into my file calls? is it part of the get[External]FilesDir() call? Jul 31 18:41:12 thorbear yeah, but what if you have gone through every top level item in the nav drawer, then hit back. do you expect it to leave the app or go to the previous top level nav drawer view Jul 31 18:41:35 * kbs just expects the back button behavior on android apps to be unpredictably entertaining :-) Jul 31 18:41:38 NeoThermic, um, no? it is part of the File class Jul 31 18:41:42 mattblang: if I am at top level, I expect it to close. Jul 31 18:41:46 kbs exactly XD Jul 31 18:41:47 ooh. Jul 31 18:41:52 no matter what I did before Jul 31 18:42:22 Thorbear interesting. I don't know why I feel differently. I guess because I've always thought of the hard back button as "whatever I was just previously doing" Jul 31 18:42:59 which is what historically the back button has been. i guess its like Mavrik mentioned, muscle memory Jul 31 18:43:10 mattblang: do note that I never touched android 2 or 3, my first android phone was the galaxy nexus Jul 31 18:43:16 there's a reason it's called the *back* button Jul 31 18:44:15 g00s: after 5 months of Android dev, 7 months of iOS dev and 1 month of again Android dev, I realized the development on iOS devices is generally a bit better. Jul 31 18:45:05 g00s, Mavrik, ravilov, Thorbear, yiati I guess I just want to make sure I go with the flow, which I imagine Google dictating. so if the IO app, and other Gapps are exiting at top level back press then I shoudl do so too. it just feels weird to do that Jul 31 18:45:06 gdrc after learning the few "rules" about alloc / init in obj-c, iOS was pretty easy yeah. some yucky stuff like nibs, etc but i agree Jul 31 18:45:40 gdrc: yep, android development imho has become sooooo much better with the new build system and Android Studio and shows signs that it will keep getting better Jul 31 18:45:57 mattblang, I would ignore what what the almighty google says and just do what feels natural, pretty sure your users will appreciate that too Jul 31 18:46:03 yiati oh god yes, Android Studio and Gradle have been a godsend. and the x86 images Jul 31 18:46:39 the back button and back task are unnatural how you use them, i think users hate it Jul 31 18:46:47 *task stack Jul 31 18:47:01 maybe undo one level, but treating an app like a website is stupid Jul 31 18:47:11 but you don't Jul 31 18:47:16 g00s that is how the back button has been historicaly though Jul 31 18:47:27 and i remember reading the design about Mosaic - the back button was just a quick hack because nobody could think of a better way Jul 31 18:47:38 but it stuck :( Jul 31 18:47:50 g00s im totally fine with the idea of a nav hiearchy, not task stack. it makes it easier to things. but historically the back button definitely has been a go back to previous task button Jul 31 18:47:52 they could not put a button on screen...? Jul 31 18:47:53 maybe a quick hack turned out to be the right thing to do Jul 31 18:47:58 I guess it wasn't always touch screen Jul 31 18:48:21 What gradle build tools should I use with IDEA 13.4? Jul 31 18:48:33 when back is overloaded between temporal and spatial, its just a mess. especially in the same app. also between apps though, every app starts to behave differently. Jul 31 18:48:42 13.1.4 that is Jul 31 18:48:55 i hate that you cant clean a wear screen with it powered on, and then have to either have a pin or hook it up to the charger to turn it back on after cleaning Jul 31 18:48:59 alankila, as far as I know, back in the day there was a list of capabilities a device must meet in order to run android successfully, having a touchscreen was one of them Jul 31 18:49:01 GOODEVENING! Jul 31 18:49:02 *off-topic* Jul 31 18:49:09 that's back in the days of good ol' hardware buttons Jul 31 18:49:10 Oh, wrong channel Jul 31 18:49:21 well, we should go back to before it was called android Jul 31 18:49:22 g00s yeah, I agree with you. which is why I realy started asking about this topic originally. do you think most apps will start to shift towards the spatial way like Google is? Jul 31 18:49:28 Hey guys. I need some help trying to record audio using MediaRecorder. I'm able to record one audio, but when I try to record a second one I always got the same error: "media server died". After the error, I'm able to record another audio again, then the next one will fail again. When the error occurs I'm unable to reproduce the saved audio file. Here is the my code. http://pastebin.com/43YQLzym Jul 31 18:49:33 any ideas? Jul 31 18:49:46 Birk_, didn't you ask this yesterday? Jul 31 18:49:59 better luck this time, eh? I recall nobody responded Jul 31 18:50:18 revilov: Yep, but no one answered and I'm still looking for a solution :( Jul 31 18:50:52 mattblang i think the nav drawer brings some friction with back. sometimes, you launch a new activity like 'Settings' and one expects to go back, But if you look at the design, and see a different style (bold) for stuff - i think those are like tabs in the same activity - on those, back should exit Jul 31 18:50:52 yiati: yes, android studio is a fantastic ide Jul 31 18:51:06 I'm getting Manifest merging failed if I use 0.9.+ and ClassCastException: com.android.build.gradle.internal.model.ApiVersionImpl cannot be cast to java.lang.Integer if I use 0.+ Jul 31 18:51:36 gdrc: I would still agree ios development is a bit better but that gap seems to have shrunk a lot so that's nice Jul 31 18:52:24 yiati we'll see ... i think it will depend on how 'L" compat story, if its a pita to support L and 4.x Jul 31 18:52:29 g00s: what I miss in iOS is a serie of fantastic library wich are on Android like Retrofit or GreenDAO ORM Jul 31 18:52:45 for ORM i guess core data Jul 31 18:53:08 autrilla, check the changelog for 0.11 http://tools.android.com/tech-docs/new-build-system for the ClassCastException Jul 31 18:53:16 actually i like their persistence story better than android; you can use plain sqlite, or core data Jul 31 18:53:22 for my job core data is not ok, I usually do query with multiple joins Jul 31 18:53:27 and core data can be backed by whatever Jul 31 18:54:45 one really annoying thing with android wrt fragmentation, are the different versions of sqlite out there. sometime oems do weird stuff with them, and use nonstandard versions (that don't ship with aosp) Jul 31 18:54:53 and sqlite is a big complex ball of stuff Jul 31 18:57:20 SimonVT, I don't see anything related on 0.11 Jul 31 18:57:52 Anything under "Breaking API/DSL Changes" is related Jul 31 18:58:12 Cus it breaks older build.gradle files Jul 31 18:58:54 g00s: I'm lucky, I'm working on a big project and I work just with one device (samsung tablet). Jul 31 19:00:07 SimonVT, defaultConfig {minSdkVersion 8 targetSdkVersion 20 versionCode 1 versionName "1.0"} isn't fine any more? Jul 31 19:00:27 gdrc nice Jul 31 19:04:14 "Samsung Tells Its Investors A Phone With 'New Materials' Is Coming In The Next 6 Months" ... ha, is that Google Material or Samsung Material :D Jul 31 19:04:33 new materials sounds like something from black mesa Jul 31 19:04:34 autrilla: That should be fine.. Anyway, the stacktrace should tell you on what line the issue is Jul 31 19:05:15 SimonVT, where should I look for it? It isn't on the event log Jul 31 19:06:16 Run gradlew with --stacktrace Jul 31 19:18:22 SimonVT, ... build successful. Should I try gradlew --stacktrace assembleDebug? Jul 31 19:18:41 Anyone familiar with NativeActivites? Jul 31 19:18:49 I have a quick question. Jul 31 19:19:03 If an activity is running in C++ code (mostly). Jul 31 19:19:18 How can I create an event (touch or other type) to send to the C++ code portion? Jul 31 19:19:26 So it can handle the event however it wants to. Jul 31 19:36:09 i've got a problem with my textview.. it's off-screen and it's got a weird margin on top. https://dl.dropboxusercontent.com/u/21637985/Random/Shot-140731-223147-r.png this is the code: http://bpaste.net/show/2XaUqFdgC2NNwgYaMfrp/ Jul 31 19:36:34 removing the buttons somehow make it better Jul 31 19:36:40 what's going on >_< Jul 31 19:40:46 Guys is there a smart way to get the phone groups for the current google account? Jul 31 19:40:49 For contacts Jul 31 19:41:23 I am currently retrieving all groups and I know I can get the current email of the device but is there a more concrete way to pull only the groups for the device google account? Jul 31 19:45:28 Hi all- i'm having problems with my code; depending on geolocation i connect to wifi (if inside range) and if outside this range, i disconnect. I don't know what is causing 1minute disconnections/connections to wifi after I connect to my wifi for the first time. Here's log: http://pastebin.com/f2h9fFt1 - paying 5eur if you help me find the proper solution. Jul 31 19:49:45 heh. sounds an awful lot like an app i wrote :P Jul 31 19:50:10 lordgreg: haven't looked at the pastebin, but have you tried just turning on/off the radio when you enter/exit the fence? Jul 31 19:50:23 let android handle the connect when the radio is turned on :) Jul 31 19:51:27 birbeck: sorry, i've interpreted myself wrong.. Jul 31 19:51:45 when i enter location i ENABLE wifi. when i am outside, i DISABLE wifi Jul 31 19:52:15 so you are not specifying the network to connect to in your own code? Jul 31 19:52:48 i just enable it, i don't specify SSID, correct. Jul 31 19:53:01 ah, well there goes my idea :) Jul 31 19:53:07 have you tried on different networks? Jul 31 19:53:41 point is, only one person out of 10+ testers has this problem Jul 31 19:54:33 so its not something you can replicate? Jul 31 19:54:58 interesting https://www.eff.org/deeplinks/2014/07/mitro-a-new-free-password-manager Jul 31 19:55:01 no, but its happening to that person every minute Jul 31 19:55:59 this is the only few weird lines i can find: Jul 31 19:56:01 wlan0: CTRL-EVENT-SCAN-STARTED Jul 31 19:56:15 Starting service, intent=Intent { act=com.google.android.location.reporting.ACTION_LOCATION_STATUS cmp=com.google.android.gms/com.google.android.location.reporting.service.DispatchingService (has extras) }, extras=Bundle[{status=LocationStatus[cell status: STATUS_SUCCESSFUL, wifi status: STATUS_TIMED_OUT_ON_SCAN, elapsed realtime ns: 13122296016454]}] Jul 31 19:56:46 does that mean it timed out on wifi? Jul 31 19:57:38 g00s: meh Jul 31 19:57:56 not interested in 3rd party hosting passwords, open source or not Jul 31 19:58:31 i don't think EFF would endorse it , if it was flawed by design Jul 31 19:58:52 birbeck but i understand how you feel, i'm like that too Jul 31 19:58:53 3rd party hosting is already flawed by design Jul 31 19:58:58 i'll wait and see how it goes Jul 31 19:59:08 birbeck: not if you hold the key Jul 31 19:59:10 what if the servers get hacked? what if the keys get leaked? Jul 31 19:59:28 the third party doesn't have the keys. doesn't matter if they get hacked Jul 31 19:59:29 birbeck i think they said the code is GPL's so maybe you can run it on your own stuff Jul 31 19:59:31 JesusFreke: and how do you sync the key between devices? Jul 31 19:59:39 I just found the problem with wifi reconnections. Jul 31 19:59:43 birbeck: password derivation Jul 31 19:59:51 http://forum.xda-developers.com/showthread.php?t=2491855&page=13 <-- the unofficial rom he's using. Jul 31 19:59:53 FCUK! Jul 31 19:59:53 you enter your password on each device Jul 31 20:00:06 that's exactly what, e.g. lastpass does Jul 31 20:00:07 Lol lordgreg. :) Jul 31 20:00:14 At least you found it! :) Jul 31 20:00:34 lordgreg: i figured it was a device or network specific issue Jul 31 20:00:42 glad you can blame the user :) Jul 31 20:00:43 So what's wrong with the custom rom? Jul 31 20:00:48 It's not behaving correctly? Jul 31 20:01:46 yep... Jul 31 20:01:53 it had problems with wifi disconnects Jul 31 20:03:00 I wish to have a top level view overlay the rest in a framelayout : it'll contain semi opaque bitmap saying the "status". z order etc and sizing is no issue I'm just wondering the best way to do this? What kind of view just to be painted with an opaque bitmap? Jul 31 20:03:12 i have a preferences activity that once it has a username and password, calls a method in another utility class which makes and receives a json object response via a HTTP GET request. in that class i have logic as to whether or not its a 'good response'. if its bad i want to pop up a toast. how do i 'kick off' the toast from the method in the utility class? Jul 31 20:07:03 Would it be better to let a Fragment implement View.OnClickListener than to declare a few listeners anonymously? Jul 31 20:09:15 I'd consider it better to create one or more private inner classes Jul 31 20:11:04 Thorbear: do you have an explanation? Jul 31 20:12:36 Provides an easy way to Ctrl-click to the functionality without needing to keep the functionality in the same place you attach the listener (as well as being able to use the same listener multiple places) Jul 31 20:13:18 So it's more convenient like that. There's no memory-related reason? Jul 31 20:14:34 None that I know of Jul 31 20:15:33 Or rather, none that I know have enough impact to care =) Jul 31 20:17:04 Ok, guess I don't need to care either then :p Jul 31 20:18:38 Why wouldn't android-studio put the actual generated sources in generated/sources? Jul 31 20:21:13 Not even getting generated code from annotation processors Jul 31 20:34:16 Is there a way to limit my distribution by Performance or CPU Cores? Jul 31 20:37:51 pBlack: not that i know of Jul 31 20:40:19 i'm confused, the iosched grade file has dependencies { } contianing both compile 'com.android.support:support-v13:20.+' Jul 31 20:40:19 compile 'com.android.support:support-v4:20.+' Jul 31 20:40:32 why v4 and v13 ? Jul 31 20:41:37 because those are different libraries? Jul 31 20:41:48 he speaks the truth Jul 31 20:42:59 does anyone here use aide? Jul 31 20:43:15 Mavrik i always get messed up about this. isn't v13 a subset of v4 ? Jul 31 20:43:34 Ok, thanks desmin88. Jul 31 20:43:39 Maybe they just forgot about transitive dependencies Jul 31 20:44:26 g00s, not entirely Jul 31 20:44:37 Or maybe they started by adding v4, then later needed something in v13 Jul 31 20:45:14 why studio need to download something from gradle.com without asking me anything? Jul 31 20:45:21 ok ... i thought i had to pick one of them at any time Jul 31 20:46:03 abator: because AS uses gradle? Jul 31 20:46:16 sorry, its services.gradle.org Jul 31 20:46:26 As? Jul 31 20:46:26 its downloading gradle Jul 31 20:46:30 android studio Jul 31 20:48:34 hmm, i have no idea what is gradle. just got confused because no question was asked before downloading something. and i consider this a careless behavior. Jul 31 20:49:49 Um, no Jul 31 20:49:58 hmm, why? Jul 31 20:50:00 v13 - support library for 14-19 Fragment stuff brought back Jul 31 20:50:16 stuff in there is compatible with Fragment class from Android SDK Jul 31 20:50:33 v4 - support for 5-19 stuff brought back, has it's own FragmentManager, Fragment, etc. classes Jul 31 20:51:46 will it be possible to setup android without internet access? Jul 31 20:52:01 in future*** Jul 31 20:52:54 Mavrik still kinda confused, they have duplicate things though like FragmentStatePagerAdapter Jul 31 20:53:13 g00s, yes. Jul 31 20:53:18 it uses different parameters. Jul 31 20:53:38 g00s, in v4 you have android.support.v4.Fragment class and everything takes that Jul 31 20:53:59 in v13 those classes use by using android.app.Fragment and friends Jul 31 20:54:17 because there's no reason to drag full reimplementation of fragments when you're on 13+ right :) Jul 31 20:54:35 ahh ... but i thought i should be using v4 fragments (impl) because those contain bug fixes Jul 31 20:54:44 if you use v13 you are delegating to the buggy ones Jul 31 20:55:24 delegating to the OS defined ones, which have various bugs i should say Jul 31 20:58:01 Am I connected? Yes; Jul 31 20:58:36 What do you do to make a dialog with 2 spinners? I.e height in feet, and inches; Jul 31 20:59:04 g00s, mhm, but I guess that's the point of v13... never used it myself due to Fragment bugs :) Jul 31 20:59:31 explodes, provide your own content view? Jul 31 21:00:24 Yea, I was thinking that was the solution, is there no built-in mechanism for multiple spinners? Jul 31 21:04:03 explodes, no there isn't, that's exactly why there is this mechanism for providing your own content view Jul 31 21:14:37 hi. does anybody see my messages on #android a couple of minutes ago? about CardException "response too small" and all that install for install thing? should i repeat, or nobody here can help me with that stuff either? Jul 31 21:15:24 that's about Android's NFC smart card aka Secure Element. Jul 31 21:15:25 g00s: v13 contains four classes Jul 31 21:15:35 sainaen, seen, repeat, wait for answers Jul 31 21:16:01 it's a superset of v4 with four tiny helpers Jul 31 21:16:13 EPG, ok then. here it goes Jul 31 21:16:43 is here anyone who has tried to work with Android's NFC element (real, not emulated) via its SmartcardAPI? because I have strange problem while installing applet: SE returns response smaller than two bytes (possibly empty) which causes CardException "response too small" in Terminal#transmit() Jul 31 21:16:57 and by "while installing" i mean sending install for install APDU, with package already loaded on SE. Jul 31 21:17:07 Hey folks, how's it going? Jul 31 21:17:51 is there any other way to get real response from SE than try to call NfcExecutionEnvrionment/NfcAdapterExtras by hand? i really want to know why it doesn't return [0x90, 0x00] as it should. Jul 31 21:17:54 JakeWharton thanks Jul 31 21:19:35 does anyone know where sdk manager installs the samples on os x> Jul 31 21:20:09 tab1293: it should be in your applications folder or something along those lines Jul 31 21:20:17 tab1293, android SDK folder, "samples" Jul 31 21:20:55 do not see an SDK folder in the applications folder Jul 31 21:21:07 i.e. home\USER\Applications\Android Studio\sdk\platforms\.... Jul 31 21:21:08 where did you install the SDK? Jul 31 21:21:21 oh had to open the package Jul 31 21:21:33 found them thanks! Jul 31 21:21:36 if you downloaded Android Studio it's in /Applications/Android Studio.app/sdk :) Jul 31 21:22:57 yeah I don't actually use a mac and when I did I created sdk folder under root and moved the android sdk there Jul 31 21:23:08 but that's because I'm crazy Jul 31 21:28:30 Hey guys. Probably a dumb question, but I've searched around and I can't find what I'm looking for: I have an API client app I'm building for my API, and I have local and production versions of it. Is there a way I can set which API Endpoint to use based on whether I'm building for debug or release? Or is there a better way? Jul 31 21:29:25 Im drawing direct to a canvas. I paint the entire thing one color then paint a bitmap over the top. In a certain mode I wish to darken the lot (paused). How would you advise doing this? Could I maybe paint again with an semi opaque black bitmap over the entire canvas? Jul 31 21:30:20 rgr, I've seen some apps do pretty much that Jul 31 21:30:31 yes?how? Jul 31 21:30:40 johnhamelink: yes you absolutely can, you can define assets folders for each of your build variants Jul 31 21:31:07 rgr, just set a paint to black with some alpha value and draw a rect over the entire canvas? Jul 31 21:31:29 johnhamelink: http://tools.android.com/tech-docs/new-build-system/resource-merging Jul 31 21:31:39 Thanks Ankhwatcher I'll have a read :) Jul 31 21:31:40 ok. more googling. paints frighten me a little. Jul 31 21:31:49 (all new to me) Jul 31 21:31:54 it's not such a big deal Jul 31 21:31:56 hold on Jul 31 21:35:21 rgr, http://pastebin.com/cKE28y1i Jul 31 21:35:56 thanks. I'll try it. Jul 31 21:38:18 What do I have to import to get this to compile without error? public class DisplayMessageActivity extends ActionBarActivity { .... } ? Jul 31 21:39:00 why are you using actionbaractivity Jul 31 21:39:44 garyserj: http://developer.android.com/tools/support-library/setup.html Jul 31 21:40:03 that works brilliantly. thanks. Ill need to read up on that stuff now as its time to start chucking some gfx around ;) Jul 31 21:40:30 desmin88: because it's used here in this first app tutorial http://developer.android.com/training/basics/firstapp/starting-activity.html Jul 31 21:40:32 rgr, np, good luck Jul 31 21:41:16 desmin88: most of the tools and docs are now telling people to use the support libraries Jul 31 21:41:30 thats silly Jul 31 21:41:52 nah, when L breaks everything we'll want people to be used to support libraries Jul 31 21:42:10 Ankhwatcher: I have already run android.bat brought up that android sdk manager and installed the support library and support repository, but still got that error Jul 31 21:42:23 Ankhwatcher: what is L? Jul 31 21:42:33 is the support library actually imported into your project? Jul 31 21:42:42 I suppose not imported Jul 31 21:42:43 garyserj, whoa, really? what is L? Jul 31 21:42:58 heh, must be the klingons Jul 31 21:42:59 garyserj: you probably haven't put the line into your build.gradle file Jul 31 21:43:06 or the borg Jul 31 21:43:08 read more of that page I linked you Jul 31 21:43:18 Thanks Ankhwatcher, works beautifully :) Jul 31 21:43:22 hello Jul 31 21:43:23 i'm not using gradle though.. i'm using ant Jul 31 21:43:28 garyserj, http://developer.android.com/ -- it's right there smack at the front page Jul 31 21:43:31 garyserj: just get out Jul 31 21:43:46 can anybody help me out with an ndk question? Jul 31 21:43:49 Ankhwatcher: what? Jul 31 21:43:54 chuckr: maybe Jul 31 21:44:19 oh I see, it's there L Jul 31 21:44:28 in ndk r10, it looks like gdb is broken for targeting x86, at least on windows Jul 31 21:44:39 chuckr: no clue, sorry. heh Jul 31 21:44:41 johnhamelink: you're welcome, it really is magical when you get it to work Jul 31 21:44:43 ok, I have a question now: what is the best/safest way to make an app a system app by moving it into /system? the only assumption is the device is rooted (ie. has the su binary), no busybox or anything else Jul 31 21:45:21 Ankhwatcher: took a little while for me to release it has to be *absent* from the main dir, but now that I figured it out, I'm a happy bunny :) Jul 31 21:45:34 ok, I'm off to bed now, but if you know anything about what may cause "response too small" in SmartCardAPI Terminal#transmit() while executing GP's Install[for install + make selectable] apdu (80 E6 0C 00...), please PM me. Jul 31 21:46:05 ravilov: you'd probably be better off asking that in #android-root Jul 31 21:46:27 dragorn: thanks Jul 31 21:46:28 sorry everyone for a little spamming. Jul 31 21:46:39 Ankhwatcher, gotcha Jul 31 21:46:39 chuckr: not a windows guy so I've got nothing, sorry Jul 31 21:47:56 I need to get on with this, the trains stop running in 45 minutes Jul 31 21:49:01 ravilov: what import statement would I use to import the support library? Jul 31 21:49:29 also I cannot see an ActionBarActivity.java so i'm not sure the path to the class Jul 31 21:49:32 garyserj, I have no idea tbh, I don't use gradle Jul 31 21:49:35 or A Jul 31 21:49:36 AS* Jul 31 21:49:50 * ravilov is using good ol' eclipse Jul 31 21:50:24 eclipse might use ant Jul 31 21:50:30 android studio uses gradle.. Jul 31 21:50:37 what ant and gradle are.. i'm no expert! Jul 31 21:50:59 but I think they play a role in processing xml files and enabling them to add code to java files Jul 31 21:51:28 to my knowledge, ant is the traditional way of compiling/building java files into classes Jul 31 21:51:31 or something to that effect Jul 31 21:51:33 no. they're both build systems, like makefiles Jul 31 21:51:46 ravilov: traditional way of building java files into classes is javac.exe Jul 31 21:51:47 gradle is the "new player" Jul 31 21:52:08 garyserj, yes, gradle and ant both call the actual compiler in the end Jul 31 21:52:14 or something Jul 31 21:52:16 ravilov: no doubt javac.exe is still current ;-) Jul 31 21:52:55 no that familiar with c so don't know much about makefiles, though i've run the commands make and makefile to get things working on linux before. Jul 31 21:52:57 you should probably refer to dragorn's response Jul 31 21:53:16 ^ just did Jul 31 21:53:42 gradle/ant both take care of dependencies within a project, also detect which files have changed and need recompiling Jul 31 21:54:32 dragorn: What do I have to import to get this to compile without error? public class DisplayMessageActivity extends ActionBarActivity { .... } ? I have installed the support library and repository Jul 31 21:54:58 I cannot see the path to ActionBarActivity, I don't have an ActionBarActivity.java Jul 31 21:55:15 ActionBarActivity is part of the support library Jul 31 21:55:23 ravilov: I know Jul 31 21:55:25 having it installed is fine but you need to actually include it in your project Jul 31 21:55:33 ravilov: that is what i'm asking Jul 31 21:55:37 what import statement would do it Jul 31 21:55:44 hi guys Jul 31 21:56:04 garyserj, it's not up to an import statement Jul 31 21:56:46 garyserj, technically you need "import android.support.v7.app.ActionBarActivity;" as per https://developer.android.com/reference/android/support/v7/app/ActionBarActivity.html Jul 31 21:56:50 but that alone won't do Jul 31 21:56:56 I'm looking at my own code and wondering how the hell it works Jul 31 21:57:09 Ankhwatcher, MAGIC Jul 31 21:57:15 YES Jul 31 21:57:16 you need to comment your code Jul 31 21:57:17 :p Jul 31 21:57:25 https://www.irccloud.com/pastebin/Lo5XksSC Jul 31 21:57:39 ohai magic Jul 31 21:57:40 is that the proper way to increase the numbers in an input box? Jul 31 21:57:43 this is what happens with hackathon code Jul 31 21:57:49 getting an exception Jul 31 21:57:54 Hai ravilov Jul 31 21:58:23 adymitruk, ...? Jul 31 21:58:27 you are adding 10... Jul 31 21:58:29 ...to a string Jul 31 21:58:37 wait Jul 31 21:58:39 no you're not Jul 31 21:58:58 can someone give me advice on how to do following, i want to display some text (changable) next to it i want to display image (changable,clickable), and next to image some buttons Jul 31 21:59:06 adymitruk, I'd probably wrap the end result in String.valueOf() before passing it to setText() Jul 31 21:59:32 ah now I see it Jul 31 21:59:38 I was thinking backwards Jul 31 21:59:46 adymitruk, you're getting an exception because you're passing int to setText() which tells it to look for a string resource with that ID Jul 31 22:00:14 Ankhwatcher, sometimes it's all about the proper mindset, eh? Jul 31 22:00:52 ravilov: so it won't implicitly convert int to string Jul 31 22:01:20 it will try and look for a resource with that numeric id? Jul 31 22:01:20 http://pastebin.com/MRdTy8nq Jul 31 22:01:21 adymitruk, java converting anything into anything is more an exception than a rule Jul 31 22:01:38 implicitly converting* Jul 31 22:01:39 ah.. I'm switching from C# Jul 31 22:01:42 thanks Jul 31 22:01:58 have to review my java knowledge Jul 31 22:02:02 C#... poor fella Jul 31 22:02:24 what's a good book to read on Java these days - knowing I come from C#? specifically for android dev.. Jul 31 22:02:34 ya. I'm done with MS crap Jul 31 22:02:52 finished my last job in that stack in april.. 15 years worth of it Jul 31 22:03:02 please can someone help me with layouts Jul 31 22:03:05 adymitruk, rule #1: forget everything you know, from now on it can only ever be an obstacle Jul 31 22:03:19 ravilov: I figured Jul 31 22:03:40 Vasquez: I'll try, pastebin something Jul 31 22:03:41 at least I have intellij that's close to resharper for refactoring etc Jul 31 22:03:46 hardly ... c#->java is a simple conversion ... they share a lot of common characteristics Jul 31 22:03:48 Vasquez, so what exactly is your problem? did you give a shot at anything yet? Jul 31 22:04:21 bankai_au, apparently they don't share some that can prove to be a trap, namely auto-converting ints to strings Jul 31 22:05:32 hmh, #android-root seems to be very inactive Jul 31 22:06:20 ravilov: that's the nature of the IRC beast, sadly Jul 31 22:06:32 there's a shedload of idlers in there though Jul 31 22:10:32 how about using some functional features of java to refactor this: Jul 31 22:11:00 https://www.irccloud.com/pastebin/TqcSGpgI Jul 31 22:13:12 http://i59.tinypic.com/2dilhrr.jpg Jul 31 22:13:26 aww i finally found a need for multi-cursor in IJ -- what a cool feature! hehe Jul 31 22:13:39 this is how i want it to look Jul 31 22:14:00 the thing is that i need onclick listener for image, so it can give me x,y coords Jul 31 22:14:02 Vasquez, give some code Jul 31 22:14:16 or do you expect someone to come up with a ready-made layout for you? Jul 31 22:14:32 i need advice how to do it, shout i inflate, or can i do it without it Jul 31 22:15:05 no, please, i cant find solution for this Jul 31 22:15:08 okay, so a horizontal linear layout with a TextView, an image and relativelayout containing 3 buttons Jul 31 22:15:21 i just need oppinion of more expirienced developers Jul 31 22:15:38 why is this website suggesting I would also be interested in a picture of a naked guy on a couch? Jul 31 22:15:47 Vasquez, you can always build your own view from scratch, but there is no practical reason to as the inflater works perfectly well Jul 31 22:15:53 lol Jul 31 22:16:14 so you would go with the inflator for this ? Jul 31 22:16:36 http://picpaste.com/uEKztW3K.png Jul 31 22:17:03 i tried making custom view, but i couldnt manage to make it work both onclick for image, and onclick for buttons Jul 31 22:17:28 Vasquez: pastebin the xml that you wrote Jul 31 22:17:41 Ankhwatcher, did you enjoy that? Jul 31 22:17:50 Vasquez, yes I would use the inflater Jul 31 22:18:14 ravilov: well I did laugh a little Jul 31 22:18:34 so that's a yes on "enjoys being offered guys on couches" Jul 31 22:18:37 * ravilov makes notes Jul 31 22:18:44 http://pastebin.com/WnafM9G9 Jul 31 22:19:39 Vasquez: does this layout look right on screen? Jul 31 22:20:33 yes, but i cant changde bitmap of imageview, and thats what i must do Jul 31 22:21:04 so you tried image.setImage*() and it doesn't work? Jul 31 22:22:46 i am not 100% positive, but i think i did, and couldnt get expected result Jul 31 22:22:53 ok let me try be more specific Jul 31 22:24:17 is it possible to have 1 layout relative, to have imageview on which is overriden ontouch method so i can get x and y of image presented, and also have attached onclick listeners to buttons Jul 31 22:25:03 and is inflater best option to do it Jul 31 22:25:29 and bitmap of imageview should be chagable Jul 31 22:25:49 inflator is IMO the best option for building/creating the layout, but you still have to manage your layout yourself Jul 31 22:26:34 and what about listeners ontouch, and onclick can they work together? Jul 31 22:27:11 probably Jul 31 22:27:22 kinda getting too hard to follow for me Jul 31 22:27:30 I need to go to bed anyway Jul 31 22:27:43 thanks for help Jul 31 22:35:15 I am trying to save a framebufferobject in android Jul 31 22:35:25 Does anyone have any google tutorials Jul 31 22:35:57 good tutorials Jul 31 22:42:58 Can someone help me figure out what the hell is wrong with my builds in AS? Jul 31 22:43:17 No annotation processing, no actual files in generated/sources Jul 31 22:43:35 I downgraded from J8 to J7 because the crashlytics plugin doesnt play well with J8. Jul 31 22:52:22 Radzell: What are you trying to do with the framebuffer object? Jul 31 22:53:34 Save a screenshot of a glsurfaceview Jul 31 22:53:50 I'm assuming to a file? Jul 31 22:53:52 i'm trying to use TabPageIndicator instead of TitlePageIndicator and uhm it seems that the tabs don't respond well to ViewPager's dataset changes. i can't get it to react anyhow to new pages Jul 31 22:53:58 Toa bitmap Jul 31 22:54:02 to a bitmap Jul 31 22:54:18 anyone knows if that's how it's supposed to be? Jul 31 22:54:24 Once you finish rendering in onDrawFrame... Just use glReadPixels(); Jul 31 22:54:35 glReadPixel is to slow Jul 31 22:54:47 Thats what I am using now. Jul 31 22:54:50 That's the only way to get image data (pixels) back into a file. Jul 31 22:55:08 If you Render to FBO, you can't directly access that texture. Jul 31 22:55:12 (From the CPU). Jul 31 22:55:19 It's still on the GPU, just sitting and waiting. Jul 31 22:55:26 In Video Memory. Jul 31 22:55:46 And yes, glReadPixels is slow. :) Jul 31 22:56:13 I was assuming it would be faster if I rendered I already had the FBO. Jul 31 22:56:38 Like using the previus frame instead of rendering then taking the screenshot. Jul 31 22:56:45 No, that's not the slow part. Jul 31 22:57:01 In order for you to save data to a file, the data needs to be accessable from the CPU. Jul 31 22:57:14 So to do that, All the data needs to be moved from the GPU to CPU (Slow). Jul 31 22:57:18 Then it's in main RAM. Jul 31 22:57:26 Now you can create a file from the buffer. Jul 31 22:57:29 And save it. :\ Jul 31 22:57:49 Squirrel: Your using a viewPage + actionBar tabs? Jul 31 22:58:15 night all Jul 31 22:58:18 Night. Jul 31 22:58:37 squirrel: Your using a viewPage + actionBar tabs? Jul 31 22:59:44 pBlack: i'm using a ViewPager and ActionBarSherlock and TitlePageIndicator, and i want to change the latter to TabPageIndicator Jul 31 23:00:44 Ahh, my solution uses normal ActionBar + ViewPager. Jul 31 23:00:53 With tabs obviously. Jul 31 23:02:09 by the way, those normal action bar tabs. is there a way to make them stay inside action bar even if there are too many to show? Jul 31 23:02:27 like scrolling them right inside there Jul 31 23:03:53 Not sure about that one on the top of my head. Jul 31 23:04:01 Sounds very doable though. Jul 31 23:04:40 i mean, something that wouldn't require inventing a bicycle.. Jul 31 23:05:17 how can i set one view in a relative layout to be the same height as a sibling? Jul 31 23:06:37 join #android-root Jul 31 23:08:56 squirrel: What I do is 2 steps. Jul 31 23:09:08 ViewPage.setOnPageChangeListener(...); Jul 31 23:09:49 Then in onPageSelected(...) { getActionBar().setSelectedNavigationItem(int tabNumber); }; Jul 31 23:09:56 Pseudo-code. Jul 31 23:10:06 That's it, each time the page changes, I just set the selected tab lol. Jul 31 23:10:15 To the proper index. Jul 31 23:10:35 It doesn't do the "slide" effect, it's more instantaneous. Jul 31 23:10:48 mhm Jul 31 23:11:21 simple enough Jul 31 23:11:55 but i want something that would work across all sorts of screen sizes etc Jul 31 23:12:06 Ya, that works lol >< :) Jul 31 23:12:18 Use the support Library actionBar and Viewpager instead. Jul 31 23:12:26 and i want it to stay inside action bar if the screen is small Jul 31 23:12:27 That way you get higher compatibility. Jul 31 23:13:01 because you get keyboard + action bar + tabs and what you are left with is 5 lines of text Jul 31 23:13:33 ..this way you could get 6. (yay!!) Jul 31 23:13:44 Lol, not sure about that then. :) Jul 31 23:13:57 I'm assuming you can set a custom size on the ActionBarSherlock? Jul 31 23:14:19 i uh Jul 31 23:14:21 no idea Jul 31 23:15:11 I mean, you only have so much screen space. Jul 31 23:15:25 Your expecting to see the text + keyboard + actionbar right? Jul 31 23:19:11 why am I getting an insane amount of WifiStateMachine spam in my logcat? Jul 31 23:19:19 it's even supposedly filtered to just my app Jul 31 23:20:35 because android studio. just set your filters again Jul 31 23:21:34 * squirrel put titlepageindicator inside action bar Jul 31 23:21:45 well, technically, it works. Jul 31 23:21:45 aha, IntelliJ, but that did the trick, thanks squirrel :) Jul 31 23:22:09 weird though...isn't it a little inefficient for it to log that much? Jul 31 23:22:26 I'm sure it's properly threaded. :) Jul 31 23:23:05 ..except titlepageindicator is quite bad at small sizes. Jul 31 23:26:02 Hello, can anyone tell me how the picture size (of a picture taken by the camera) relates to the size of the preview? My preview crashes when I want to set some supported sizes which would match my screen so the preview is distorted. And the saved image seems to be distorted as well Jul 31 23:26:18 i might just write my own viewpaer indicatro Jul 31 23:29:30 kpj: The picture size is the size of the image that will be saved when you call takePicture(); Jul 31 23:29:54 The preview size is the size of the image that you will use when "displaying" it to the user, such as the default camera app does. Jul 31 23:30:10 For instance, when you open the default camera app, and look at the live video stream, this is the "preview size." Jul 31 23:30:19 And when you call takePicture(); that's the "picture size." Jul 31 23:30:43 That's what I thought as well. But I am setting the picture size to one of the supported ones and it still looks as distorted as the preview (i.e. really bad) Jul 31 23:31:16 Might it be, that I have to adjust the camera rotation somehow? Jul 31 23:31:53 How are you viewing your image? Jul 31 23:32:03 Through OpenGL? Or Usual Android SDK. Jul 31 23:32:43 usual android sdk Jul 31 23:33:10 Read this: http://developer.android.com/reference/android/hardware/Camera.Parameters.html Jul 31 23:33:20 Look at the setPreviewSize(...) method. Jul 31 23:33:32 Maybe that's what your looking for. It mentions screen orientation etc. Jul 31 23:33:48 hey guys, RadioButton:textColor accepts state list? Jul 31 23:34:03 I'm getting inflater exceptions up the wazoo on that one Jul 31 23:34:36 setPictureSize does indeed mention 'Applications need to consider the display orientation'. I'm going to try it, thanks! Jul 31 23:34:44 shipit: Says just a "int" is needed. Jul 31 23:34:52 Np kpj. Jul 31 23:35:08 shipit: I'm assuming the input will be along the lines of R.color.*; Jul 31 23:35:16 R.* always returns an int. :) Jul 31 23:35:25 pBlack: I assumed so too Jul 31 23:35:37 So define it in colors.xml, then reference it through R.color.myColorDef; Jul 31 23:35:59 pBlack: I plugged in a @drawable/rb_color that didn't work ie exception Jul 31 23:36:14 #FFFF0000 <---- in .xml. Jul 31 23:36:20 Then R.color.red in code. Jul 31 23:36:21 I moved from xml from res/drawable to res/color Jul 31 23:36:37 Not there. :) Jul 31 23:36:41 res/values Jul 31 23:36:51 color.xml goes there. At least that's where mine is, and it works. :) Jul 31 23:36:52 pBlack: I know the color value spec but not sure if state list works in color Jul 31 23:37:19 pBlack: dude, I'm trying not trying to set a single color, a state list Jul 31 23:37:24 for android:textColor Jul 31 23:37:25 Ahh ok. Jul 31 23:37:49 the inflater complains if the textColor references @drawable Jul 31 23:37:57 So you define it in res/color. Jul 31 23:37:59 As xml. Jul 31 23:38:03 that's what I did Jul 31 23:38:13 Then do, getResources().* Jul 31 23:38:19 Let me see exactly what it is. Jul 31 23:38:28 but android.view.InflateException: Binary XML file line #39: Error inflating class Jul 31 23:38:37 anyone here done a master-detail using only one Activity? Jul 31 23:38:43 thanks! lemme bang my head a lil bit more Jul 31 23:38:57 shipit: It's getResources().getColorStateList(R.*); Jul 31 23:39:18 W/e your file is called. That will return you a ColorStateList Object, and you can use that to set the ColorList. Jul 31 23:39:19 I'm setting it in the layout xml Jul 31 23:39:25 Ohh, ok. Jul 31 23:39:29 That's wierd then. :) Jul 31 23:39:30 I assume it should work Jul 31 23:39:36 Yea, sounds like it should. Jul 31 23:39:45 Oh, do you have 2 names the same? Jul 31 23:39:54 One drawable, and same name again in colorStateList def? Jul 31 23:39:57 something in the color spec that should be different from drawable Jul 31 23:40:01 no pBlack Jul 31 23:40:08 no namespace conflict Jul 31 23:40:50 Hmmm. Jul 31 23:41:47 It should be referenced as: @color/ Jul 31 23:41:50 Not drawable. :) Jul 31 23:43:59 pBlack: found the issue, since I moved the file from res/drawable to res/color, I didn't change android:drawable to android:color for , everything works now - thx! Jul 31 23:44:17 Np! Congrats. :) Aug 01 00:24:50 so I tried to add the play services lib to my project and it put me over the dex method cap. I'm using android studio but not gradle. Is there a way to turn on proguard without having to migrate to gradle, so android studio will use progaurd, so I can actually compile with play services? Aug 01 00:25:05 or an easy way to generate gradle files from an existing project Aug 01 00:50:02 * frankdrey is about to try setting up android SDK on a Pi :p Aug 01 00:50:40 sounds like a fun experiment :) Aug 01 00:50:59 * jug6ernaut published 3 projects to maven central Aug 01 00:51:01 woho Aug 01 00:51:14 nice jug6ernaut , congrats :) Aug 01 00:51:23 thx :) Aug 01 00:51:23 android projects ? Aug 01 00:51:31 yeah Aug 01 00:52:14 https://github.com/jug6ernaut/debugdrawer, https://github.com/jug6ernaut/divide, and a part of https://github.com/jug6ernaut/alogger Aug 01 00:53:41 jug6ernaut cool, i remember now seeing debugdrawer that is nice Aug 01 00:53:47 what is alogger ? Aug 01 00:54:23 README is kinda sparse :) https://github.com/jug6ernaut/alogger/blob/master/README Aug 01 00:55:02 logging class built on top of the android log system but it matches the java logging syntax. IE Logger logger = Logger.getLogger(...); Aug 01 00:55:41 stores log to a file in case of crash/w/e for upload ect. Also has a fragment which allows you to view the log activity in real time. Aug 01 00:55:49 latter part needs updating tho Aug 01 00:55:53 oic Aug 01 00:56:00 & yeah need to update that lol Aug 01 00:56:54 Hmm, I'm guessing I just need to compile build tools for arm and im good Aug 01 00:57:49 There's already ant, jdk Aug 01 00:59:21 * jug6ernaut now closes the 30 tabs he had open in reference to uploading to maven central Aug 01 01:04:00 So it seems the issue isn't java8 vs java7, still not getting annotation processing from butterknife Aug 01 01:04:54 Brainfart Aug 01 01:05:34 cm, in, mm, m, km, are all examples of...? Aug 01 01:05:50 measurement Aug 01 01:05:56 Length Aug 01 01:05:57 Not the word Im looking for Aug 01 01:06:04 doesnt need to be length Aug 01 01:06:09 could be oz, lb, kg, etc Aug 01 01:06:17 Metric? Aug 01 01:06:21 Wait Aug 01 01:06:21 Derp Aug 01 01:06:25 :p Aug 01 01:06:46 Oh wait Aug 01 01:07:02 bankai_au: was almost right - Units of Measurement haha, the Units bit was what I was looking for, Thanks guys,. Aug 01 01:08:30 bloody hell Aug 01 01:16:14 What does it take to get annotation processing other than enabling annotation processing in AS and including "compile 'com.jakewharton:butterknife:5.1.1'" in build.gradle Aug 01 01:16:25 nothing Aug 01 01:16:45 thats why im pulling my hair out Aug 01 01:16:49 haha Aug 01 01:17:00 java7 vs java8 hasnt made a difference either Aug 01 01:19:44 run with --debug and look for the call to javac Aug 01 01:19:59 good idea Aug 01 01:20:58 JakeWharton got the debug drawer project i showed you few weeks back on central :) Aug 01 01:21:06 awesome! Aug 01 01:23:15 wait Aug 01 01:26:45 so it is actually creating the viewinjector class Aug 01 01:32:01 So then, why would I get "MISS: Reached framework class. Abandoning search." even though the view injector classes are present Aug 01 01:32:52 either they're not in the apk, you're calling BK with the wrong arguments, or you're proguarding which is obfuscating things Aug 01 01:33:28 just about to check if theyre in the apk Aug 01 01:34:06 oh Aug 01 01:34:07 my Aug 01 01:34:08 god Aug 01 01:34:27 Not sure if that was done on purpose, but HAH Aug 01 01:34:34 Best timed joining of IRC ever. Aug 01 01:37:02 What happened? Aug 01 01:37:35 If this is the problem im going to punch a small child. Aug 01 01:38:41 So JakeWharton, my package names got messed up somehow in a refactor. Guess what they package name now started with? Aug 01 01:38:49 I'll give you a hint. "if (clsName.startsWith("android.")" Aug 01 01:40:34 ah, haha Aug 01 01:40:41 yeah that'll do it Aug 01 01:40:55 and thankfully i'm not a small child Aug 01 01:40:58 lol Aug 01 01:41:08 thats just a silly cause to the problem Aug 01 01:43:03 https://github.com/JakeWharton/butterknife/issues/152 Aug 01 01:43:29 haha Aug 01 01:43:30 thanks Aug 01 01:43:31 you endured this pain to save others from it Aug 01 01:44:52 lol Aug 01 01:46:51 Question, I got this Resources$NotFoundException error. Only ref i get to my scripts is the @override line above the main activity's OnCreate. I have no idea where this error comes from. Aug 01 01:47:18 with breakpoints i figured out it crashes upon setContentView Aug 01 01:47:38 can’t find the layout? Aug 01 01:47:40 Also, it happens when I'm trying to build for a lower target SDK (10) Aug 01 01:48:05 is the iccid the same as the sim card number printed on it? Aug 01 01:48:28 yeah it can, it should at least, it's the same code as for all the other SDKs. Im also not getting any errors in the IDE regarding incompatibility for min SDK Aug 01 01:51:02 this is the error: http://pastebin.com/MnfTg6zZ Aug 01 01:51:16 This definately points to an error in the layout, correct? Aug 01 01:51:45 you are using actionbars? Aug 01 01:52:04 yes the support actionbar Aug 01 01:52:24 im fairly new to android dev, but if i remember right, you have to use specific imports to get it to work properly at a certain sdk lvl Aug 01 01:53:39 I already had it working a few versions back though. Since then I did fiddle around with the main layout, but not intrusively. No compatibility errors in the xml either Aug 01 01:54:38 it’s just on the sdk10 it fails? Aug 01 01:55:02 yes Aug 01 01:55:19 and you had it working before @ sdk10 with actionbar Aug 01 01:55:47 yessir Aug 01 01:56:16 im going through all the layouts in the actionbar right now Aug 01 01:56:41 you using source control, so you can go back to a working build Aug 01 01:57:52 when is onSaveInstanceState() used? Is it used on Android 4.4? Got a simple app & tried to do various things & that method was never invoked Aug 01 01:58:04 kb; got my own backup system running Aug 01 01:58:59 ah, like i mentioned, im still new to android. but, that’s where i would start probably. figure out exactly what i changed Aug 01 01:59:22 ThomQ: post your xml Aug 01 02:01:56 http://pastebin.com/WSn9UAq2 Aug 01 02:02:31 this is the main xml its trying to use with setContentView Aug 01 02:04:17 is it normal to have multple xmlns:android="http://schemas.android.com/apk/res/android" in a single .xml Aug 01 02:04:59 I'm not sure, but it's probably just my messy scripting :) Aug 01 02:06:16 Is there a way to find out what resource ID #0x7f030027 is? Aug 01 02:06:53 go into your R file Aug 01 02:07:32 Nivag: that's called when the os kills your app Aug 01 02:07:45 not when the user presses back and quits, but when the os kills your app due to memory pressue Aug 01 02:07:51 Hmmm.. All i get is a stub Aug 01 02:08:13 lasserix: thanks! Aug 01 02:09:23 I just set my path using python for android studio.. will $HOME/android-studio/bin suffice Aug 01 02:09:56 py0 depends but you might want to add sdk/tools sdk/platform-tools depending on what you are linking Aug 01 02:10:07 http://stackoverflow.com/questions/10137692/how-to-get-resource-name-from-resource-id Aug 01 02:10:11 I was just gonna grab a jdk Aug 01 02:11:14 that might not be right, lol Aug 01 02:13:55 should I put the path for my jdk in too? Aug 01 02:18:21 hey guys, all I want to do is change the dropdown textColor for action bar? Do I have to re-define the whole style? Aug 01 02:23:37 if a user installs an app that exploits fake id vuln, when he upgrades to a unaffected android version, the app will still have the extra privileges right? Aug 01 02:24:03 when is the check for whether an app can access NFC hardware done for example? I assume every time it needs access? or else if an app can access it would be stored somewhere? Aug 01 02:26:41 I have a layout with email and password fields and a login button. I'd like to have my app show an error textview and push the login button down whenever there's an error. What's the best way to do this Aug 01 02:27:09 textview.setError("Error Message"); Aug 01 02:27:25 and set two animations on the button? One moving it down, and one changing its alpha? Aug 01 02:27:29 brb Aug 01 02:31:17 Anthaas: I'd rather not have the error message attached to the email or password fields Aug 01 02:31:35 it looks better as a separate textview Aug 01 02:32:15 I disagree, but its preference. Aug 01 02:32:31 You could use a toast, or the crouton library? Aug 01 02:33:50 setError generates some pretty ugly dialogs Aug 01 02:34:07 Helloooo Aug 01 02:34:10 Beats Music has it where it dynamically inserts an error message and it looks really nice Aug 01 02:34:11 Hola Aug 01 02:34:31 I need help Aug 01 02:34:47 String oldText = new String(getText().toString()); Aug 01 02:34:47 String newText = oldText + ":)"; Aug 01 02:34:47 Then editText.setText(newText); Aug 01 02:38:00 Anthaas: figured it out, if I set visibility to gone, it doesn't use any space Aug 01 02:41:28 Messii, getText from ... ? Aug 01 02:41:53 From edittext Aug 01 02:42:03 i think Messii is a bot Aug 01 02:42:08 :D Aug 01 02:42:30 Jajajajaa Aug 01 02:42:31 No Aug 01 02:42:34 Im human Aug 01 02:42:42 How to gettext???? Aug 01 02:42:43 real Messi is definetely a bot! :p Aug 01 02:42:58 editText.getText() ? Aug 01 02:43:15 No work Aug 01 02:43:22 Two activities Aug 01 02:43:24 well at least it's a different (sorta) problem this time Aug 01 02:43:59 well, you have a lot more going on then what u pasted, hard to help you if you dont explain what is going on Aug 01 02:44:09 pass the value of the text in an intent Aug 01 02:44:12 to the 2nd act Aug 01 02:44:30 I speak spanish Aug 01 02:44:37 i speak english :) Aug 01 02:44:41 Ok Aug 01 02:44:46 I speak english Aug 01 02:44:52 One moment Aug 01 02:45:28 I do not represent in technical language Aug 01 02:45:46 whatever you need from activity 1, needs to be pushed to activity 2, a good method of doing that is using Intents Aug 01 02:46:16 you use an intent to start Activity 2? Aug 01 02:46:17 Yes im using intent, wait please Aug 01 02:47:11 so, u can get the text, store it as a String stringName, then do a intent.putExtra(“stringName”, stringName) Aug 01 02:47:46 then in Activity 2, Intent intent = getIntent(); and intent.getExtra( Aug 01 02:47:58 “stringName”, null) Aug 01 02:48:15 and do whatever you want with it Aug 01 02:49:48 Kb Aug 01 02:49:51 kbmobile::: Aug 01 02:49:52 Http://pastebin.com/q3wqkscB Aug 01 02:49:55 This is my code Aug 01 02:50:34 Works, but I can not get the text of the first activity Aug 01 02:50:49 I do not... Aug 01 02:52:21 Question. I was looking at the current spectrum of installed SDKS on all android phones:http://upload.wikimedia.org/wikipedia/commons/e/ee/Android_historical_version_distribution_-_vector.svg Aug 01 02:52:41 what happened with HoneyComb? It never got a big footing, and got wiped out pretty quickly Aug 01 02:53:46 yeah Aug 01 02:54:50 Messil, i have to go, i’ve only ever messed with startActivityForResult once in Xamarin, so I don’t remember the correct flow…. But, what I would do is simplify it, just get something, anything passed over, then build upon that success Aug 01 02:54:55 Honeycomb was terrible. Laggy and unpolished Aug 01 02:55:24 night all **** ENDING LOGGING AT Fri Aug 01 03:00:00 2014