**** BEGIN LOGGING AT Thu Oct 17 02:59:58 2013 Oct 17 03:04:19 Checked the code, there is no way to set the colour of the PopupWindow (Thats the class name, althoguh I have found the class ErrorPopup but cant find documentation on it), or change the PopupWindow that TextView uses. Oct 17 03:04:31 The first time I have ever been disappointed when doing Android development Oct 17 03:04:36 Such a customisation seems so simple. :/ Oct 17 03:04:55 Probably is a way to do it, but it doesn't seem as intuitive as you'd expect - such that I can't find it :/ Oct 17 03:06:11 if im following something like this: http://techblogon.com/android-login-registration-screen-with-sqlite-database-example/# how can i make the database available to multiple phones? like over the internet? Oct 17 03:06:27 Use a web service Oct 17 03:06:54 The main database (of all users, credit card info, etc.) should not be stored on the device itself. Oct 17 03:07:18 Then, depending on what you are sending and receiving, encrypt and decrypt as necessary Oct 17 03:09:42 Anthaas: is there a free service out there? Oct 17 03:09:51 No, you should develop one Oct 17 03:10:42 using mysql (or any other DML) with a database, and php, xml (or json) Oct 17 03:11:16 can i just use windows SQL server, and open the ports and connect to my house?> Oct 17 03:11:47 You are probably better off creating a script to access it through the web, but whatever you can get working to your satisfaction, I guess... Oct 17 03:12:28 like i just want to be able to store user name and passwords but for multiple phones Oct 17 03:12:50 Yep, then you need a web service of some kind Oct 17 03:12:54 SuperMiguel: another option is to use parse.com Oct 17 03:13:23 ^ never heard of that - but creating a web service isn't hard. Oct 17 03:13:26 that will allow you to build a backend for android and iphone Oct 17 03:13:46 Anthaas: take it a look at it. its pretty nice. Oct 17 03:14:14 a hell of lot easier than hosting your own backend with php and mysql Oct 17 03:15:31 Looks pretty sweet Oct 17 03:15:39 But I have never found using php and mysql hard Oct 17 03:15:49 Its quite simple Oct 17 03:15:59 yes, i know. Oct 17 03:16:03 Posting data (or even not), and parsing a feed in return Oct 17 03:16:38 Its great that this is out there, but I cant see a case where I'd ever use it Oct 17 03:16:38 nickfox: does the free version works for what i want? Oct 17 03:16:41 OR WANT to Oct 17 03:16:49 SuperMiguel: yes Oct 17 03:16:50 Storing your data on their servers? Oct 17 03:17:19 nickfox: do i have to modify my program alot to make it work with their servers? Oct 17 03:17:32 ^yes Oct 17 03:17:34 Inevitable Oct 17 03:17:56 You'd have to modify it to work with any API / Service Oct 17 03:18:39 I wonder if Romain Guy will know about a possible solution to my PopupWindow problem in TextView.setError() Oct 17 03:18:49 I shall have to politely ask him when he is on. Oct 17 03:19:25 SuperMiguel: https://parse.com/docs/android_guide#users Oct 17 03:26:30 Still searching for a way - if anyone gets bored and want to help me look please feel free - the more help the better tbh - there has to be a way it can be done.... Oct 17 03:27:49 Anthaas if you can't find your question on SO just create one :P Oct 17 03:28:16 Ive looked into how I could do that, and can't even find a way myself let alone a suggestion on how to create my own online... Oct 17 03:28:41 Greetings Oct 17 03:28:49 Ahoy hoy Oct 17 03:29:37 Anyone know any solutions to this GLES problem I'm having? Pretty sure it has to do with texture filters when resizing images. Oct 17 03:31:17 https://www.dropbox.com/s/un2ogi0gi0m7f2v/StretchedPixels.png This is my game with Nearest or no filter; pixels stretching in odd places. https://www.dropbox.com/s/2glc86oqyfy4usu/artifacts.png This is my game with Linear filtering; sprites highlighted at edges and random pixels at the edges of the Texture's Region Oct 17 03:32:21 well its sampling the nieghbor pixels Oct 17 03:32:26 its not random Oct 17 03:32:28 its normal Oct 17 03:32:39 Any idea how to fix that? Oct 17 03:33:01 did you look at your alpha channels etc? Oct 17 03:33:23 Yeah, I have them as pink originally then delete the whole color in gimp Oct 17 03:33:47 are these PNGS? Oct 17 03:33:52 Yup Oct 17 03:33:57 can you email me one? Oct 17 03:34:01 like the bunny Oct 17 03:34:14 I can PM one Oct 17 03:34:20 ok lets try that Oct 17 03:35:00 http://www.plaidworld.com/images/screenshots/MH_03.jpg Oct 17 03:35:07 my games don't have this issu Oct 17 03:35:13 Im trying to remember whats the fixes Oct 17 03:37:21 Anthaas, you can just set a color span on your text... Oct 17 03:37:37 TexturePacker might fix this but I'd have to split all the cells into separate image files... and that'd be tedious Oct 17 03:37:55 Plus I'd have to re-write my texture loading code Oct 17 03:38:13 pfn: ? The issue I am having is that the PopupWindow displayed by setError has a black background, and a red bar. Also, the drawable displayed in the EditText is red. I need to change these colours. Oct 17 03:41:52 the draw able, you can supply your own... Oct 17 03:41:53 Red is not on my apps colour palette - nor is there room for it to be squeezed in. The main colours in the app are white and light blue Oct 17 03:42:20 Yes, I have gotten the red circle with an ! in the middle from the android git page, and have changed the colour of it. Oct 17 03:42:27 But the PopupWindow is still hidious Oct 17 03:43:20 https://github.com/android/platform_frameworks_base/blob/master/core/java/android/widget/Editor.java#L3808 Oct 17 03:43:56 look up the referenced theme and see if it references any attrs that can be overridden Oct 17 03:44:17 I looked at that already Oct 17 03:44:18 then set as appropriate in your styles xml Oct 17 03:45:13 I dont understand how that is done? Oct 17 03:45:22 (Im not too great with Styles or Themes :/) Oct 17 03:45:44 However I cant even see a style referenced in there? Oct 17 03:46:02 Theres this: final TextView err = (TextView) inflater.inflate(com.android.internal.R.layout.textview_hint, null); Oct 17 03:46:22 But thats A) A layout, B) Ive opened it already, and its just a textview Oct 17 03:47:15 JakeWharton: I tried running picasso with a 20 MB LRU... Awesome speed!!! Oct 17 03:49:46 set android: errorMessageBackground in your theme Oct 17 03:50:12 the style is set in errorpopup Oct 17 03:50:17 pfn: can internal styles/layouts/etc be overridden? Oct 17 03:50:36 not internal, no Oct 17 03:50:41 my theme is Holo.Light Oct 17 03:50:56 so basically his only option is rewrite that feature Oct 17 03:50:57 extend holo light then Oct 17 03:51:00 no Oct 17 03:51:33 if said theme uses a reference then he can just set the value of the reference Oct 17 03:51:38 pfn: This whole concept is new to me, I've never played with themes before - much to my dismay :/ Im googling now Oct 17 03:52:16 how have you been setting your app palette without themes... Oct 17 03:52:33 are you hardcoding your colors all over? Oct 17 03:53:58 Hmm, android:errorMessageBackground has no matching resource? Oct 17 03:54:13 Yeah :/ Oct 17 03:54:32 I feel like a prat now :/ Oct 17 03:54:40 dunno if it's a hidden attr Oct 17 03:58:02 if it's hidden, I suppose it can't be changed Oct 17 03:58:06 I really hope there is a work around :/ Oct 17 03:58:12 Black and red just looks so bad on this Oct 17 03:58:23 I really wouldnt have thought Andorid devs would have made you stick to those colours :/ Oct 17 03:58:53 https://code.google.com/p/android/issues/detail?id=55879 Oct 17 03:59:38 Argh Oct 17 03:59:46 Can I ask for some advice then, as to what you'd do? Oct 17 04:00:39 extend text view and reimplement setError Oct 17 04:01:03 setError is called within Editor, not TextView Oct 17 04:01:14 TextView's setError calls Editor's setError rather Oct 17 04:01:29 There would be soooo much to reimplement :/ Oct 17 04:01:33 right, reimplement and call your own Oct 17 04:01:41 not that much Oct 17 04:01:51 just show your own error pop-up Oct 17 04:02:21 Was just thinking Oct 17 04:02:42 You know those toasts which take up the width of the screen, sliding down from the top, and sliding back away after X time Oct 17 04:02:51 Do they look good or are they "too iOS"? Oct 17 04:05:34 Ive "voted" on that bug Oct 17 04:05:40 I can't see it getting changed any time soon though Oct 17 04:11:24 Hmm :/ I dont even know where to begin with this overriding Oct 17 04:11:33 I want it to look EXACTLY the same, except for the colours lol Oct 17 04:12:37 I have never even used set error before Oct 17 04:13:09 Really? How would you go about displaying an invalid field without giving an entire dialog box for it? Oct 17 04:15:18 I've always written my own thing... Oct 17 04:15:25 Anthaas: set the field background to red to indicate error Oct 17 04:15:43 shmooz, he hates red Oct 17 04:15:55 I have a textview in a listview that turns white when pressed... Any idea what property or behavior is that? Oct 17 04:15:56 and yeah, showing hidden views, highlighting, etc Oct 17 04:16:05 I don't think that's the listSelector Oct 17 04:16:06 he wants to stab it and make it bleed blue Oct 17 04:16:26 (the textview is in a clickable linearlayout) Oct 17 04:16:29 gavilan2, the text color Oct 17 04:16:51 pfn: but which text color is used when it's being "pressed"? Oct 17 04:16:59 it's a state selector Oct 17 04:17:00 what's the name of the property to set that? Oct 17 04:17:17 pfn: In which kind of "views" can you put that state selector? Oct 17 04:17:31 set textColor to some non default value Oct 17 04:17:59 you can put draw ables and colors in state selectors Oct 17 04:18:14 oh, what can you put them in? Oct 17 04:18:29 anything that accepts a color or drawable Oct 17 04:18:36 pfn: nice Oct 17 04:18:40 OMG a new IT Crowd episode !!!! Oct 17 04:18:55 that was weeks ago, keep up Oct 17 04:19:24 pfn: and is there an easy list that says which state is each view for each event? http://developer.android.com/guide/topics/resources/color-list-resource.html isn't extremelly clear.... Oct 17 04:19:40 ? Oct 17 04:20:14 pfn: How do I know which states to set for my textview? Oct 17 04:20:19 there are a lot of states there Oct 17 04:20:23 those state_ all look very clear to me... Oct 17 04:20:31 Hmm, Im debating having something like in the crouton library (if anyone has seen that?) Oct 17 04:20:45 do you want your textview to change color? Oct 17 04:20:49 I have an AI lecture in like 8 hours - not slept all night - not good haha Oct 17 04:21:11 if not, just set a single color Oct 17 04:21:39 Anthaas, are you a professor or TA or something? Oct 17 04:21:55 Student and TA Oct 17 04:22:09 Im not taking the lecture Oct 17 04:22:15 Im in it studying... Oct 17 04:22:25 oh Oct 17 04:23:06 pfn: but it has a single color, and it's changing anyway :/ Oct 17 04:23:48 gavilan2, you explicitly set a color on the textview already? Oct 17 04:24:00 you set some #aarrggbb value? Oct 17 04:24:22 pfn: yes Oct 17 04:24:47 and it's inside a linear layout which is clickable Oct 17 04:25:25 so you didn't set it to something like primary_text_color Oct 17 04:26:22 pfn: It's set to @drawable/black and black is set to be a color Oct 17 04:27:14 * pfn shrugs Oct 17 04:27:52 pfn: ? Oct 17 04:30:46 Hi guys, I need some tips, I made an app before, and wanted to improve it, heres my question on reddit http://www.reddit.com/r/androiddev/comments/1omh14/hi_so_i_have_an_app_with_gazillion_classes_around/ Oct 17 04:33:57 why do you have several files with 2 at the end of the name? Oct 17 04:34:08 Database.java, Database2.java, etc Oct 17 04:34:35 one is a dummy, one is the real one, with 2 is like a scratch paper. Oct 17 04:35:01 the one with number 2 is scratch. Oct 17 04:35:02 scratch paper? do you not use source control? Oct 17 04:35:24 nope, I don't even know what that means Oct 17 04:35:52 heh Oct 17 04:36:05 pfn: what is primary_text_color? Oct 17 04:36:25 I mean I use version control on RubyonRails but not android. Oct 17 04:37:00 androidnewb: Don't make a new one Oct 17 04:38:06 wtf is "Drawables" class Oct 17 04:38:14 Android doesnt recognise it but its in source code Oct 17 04:38:23 androidnewb version control allows you to save all revisions to your code, eliminating the need for dummy classes where you test new features/refactorings Oct 17 04:38:54 gavilan2? yes, I will not, just delete all that classes, because this app is alreaDY ON play store, Oct 17 04:38:54 gavilan2: anytips? Oct 17 04:39:12 androidnewb: don't delete all the classes Oct 17 04:39:23 androidnewb: convert them to the new classes by refactoring + rewrite Oct 17 04:39:40 anyone Video tutorial about it? I prefer this instead of reading? Oct 17 04:39:48 gavilan2 that's uh... sort of what he's asking how to do Oct 17 04:40:04 gavlian2: ill keep that in mind. Oct 17 04:40:08 can you add git to the eclipse plus android sdk download? on windows Oct 17 04:40:47 zmuser3: I'm on Mac, I might have to setup that yet, (additional pain). Oct 17 04:42:13 zmuser3: yes, I heard about that but have not try it, but that exist. Oct 17 04:43:04 your questions prompted me to ask mine, I wasn't suggesting anything Oct 17 04:43:43 seand: rewrite from scratch and refactoring are two very different things Oct 17 04:44:58 that's great gavilan2, but neither of them answered his question Oct 17 04:45:06 pfn: Im about to run SOMETHING Oct 17 04:45:24 It definitely is SOMETHING Oct 17 04:45:26 but its way off haha Oct 17 04:45:36 the math on the positioning is way off Oct 17 04:45:48 and the error icon is in the wrong view... Oct 17 04:45:49 ffs oww Oct 17 04:47:29 is there a framework to add some simple calendaring stuff into my app? I first tried inserting stuff in the real calendar with an intent but I don't have enough control that way Oct 17 04:48:27 There is no calendar view - there is an API available from Google though Oct 17 04:48:34 You can always create your own calendar class/views? Oct 17 04:48:40 There are quite a few examples of that online Oct 17 04:48:45 ok Oct 17 04:49:03 I just know that date manipulation is a complete nightmare Oct 17 04:49:30 So is the setError() popup window on TextViews.... Oct 17 04:49:41 heh Oct 17 04:56:05 GAHHHH Oct 17 04:56:08 This is so shit! Oct 17 05:00:32 I would like someone on the Android team to find whoever made errorMessageBackground etc private, kick them in the shin, and then stick their middle finger up to them :( Oct 17 05:00:44 pfn: overriding it is not simple... Oct 17 05:00:46 not at all Oct 17 05:06:02 Anthaas why is it not simple Oct 17 05:13:51 seand: large amounts of maths and code involved in doing it Oct 17 05:14:11 i thought it would largely just be a copy-paste job Oct 17 05:14:48 seand: basically, I have to overwrite Editor's showError(), chooseSize(), getErrorX(), getErrorY() methods, and possibly one or two more because what I have isnt working... Oct 17 05:15:02 seand: https://android.googlesource.com/platform/frameworks/base/+/jb-release/core/java/android/widget/Editor.java Oct 17 05:16:31 probably hideError() too now Ive looked at it... Oct 17 05:17:12 yeah makes sense, but you shouldn't have to rework the math Oct 17 05:17:49 Its either that or my view (which is JUST a textview. that is the base view) is wrong... Oct 17 05:18:03 Because the text ends up way off and a bit too high too Oct 17 05:18:14 turns out git already comes with eclipse and the sdk. so I tried team->share project, it did a bunch of stuff then gave an error. now my project is gone Oct 17 05:18:37 looks like it moved out of my workspace dir to my git dir, how do I open it back up? Oct 17 05:19:44 re-import the project? Oct 17 05:20:22 check it out? Oct 17 05:20:30 hmm Oct 17 05:20:56 You know what doesnt come with Eclipse or the SDK? Oct 17 05:21:05 what Oct 17 05:21:08 A WAY TO CHANGE ERROR POPUPWINDOWS ON TEXTVIEWS!!!!!!! :@ Oct 17 05:21:11 lol Oct 17 05:21:11 *angry face* Oct 17 05:21:27 I honestly give up - Im just going to look for another way to do it. Oct 17 05:21:38 A different way of telling someone an email address is invalid Oct 17 05:21:42 THATS ALL IT FUCKING IS Oct 17 05:21:43 NO SLEEP Oct 17 05:21:49 LOOKING AT IT FOR OVER 5 HOURS Oct 17 05:21:58 JUST TO TELL SOMEONE NOT TO BE A FLIPPIN' RETARD!!!! Oct 17 05:22:01 I hate myself. Oct 17 05:22:05 Don't look at me. Oct 17 05:22:05 yep, that's lovely, can you quit bitching and caps please ? Oct 17 05:22:19 Could do... Oct 17 05:22:31 iOS is thataway Oct 17 05:22:36 hey i tried to convince you hours ago that changing the colors was a bad idea Oct 17 05:22:40 Hahahaha Oct 17 05:22:44 Shhh Seand :P Oct 17 05:23:09 No ta - I'd rather drag my nutsack over a cheese grater backwards than start looking at iOS. Oct 17 05:23:21 Although inevitably at some point I will Oct 17 05:24:55 seand: Wouldnt say its a bad idea - having the option is always a good thing. Oct 17 05:25:18 not necessarily Oct 17 05:25:29 When it comes to it being a cosmetic thing I don't see how not? Oct 17 05:25:42 Surely the UI should be fully customisable, esp. in terms of colours? Oct 17 05:26:22 android obviously wants to establish a certain user experience for their users Oct 17 05:26:38 I fail to see how this minor limitation does that? Oct 17 05:27:01 There are 10312391823018 other ways to do the same job, (But I want THAT way), and you can make anything else look how you want. Oct 17 05:27:02 i'm not sure it applies here but you said it very generally Oct 17 05:27:09 ^ Oct 17 05:28:43 http://www.androidviews.net/2012/11/android-appmsg-crouton/ Oct 17 05:28:53 Looking at possibly using that as an alternative Oct 17 05:31:25 do you even need a *popup*? Oct 17 05:31:48 if you just had an error icon for a text field that's supposed to be an email address, wouldn't that be obvious enough to the user Oct 17 05:32:06 I'd like to display more information describing the problem rather than have the user guess Oct 17 05:32:19 what would there be any guessing about Oct 17 05:32:23 it's an email field Oct 17 05:32:27 So could be field is required when they have left empty, field is not valid in some way, perhaps several fields do not match Oct 17 05:32:33 No, that was one example of how I would use it Oct 17 05:32:36 oh Oct 17 05:45:47 I am using the Instrumentation.onException but it doesn't seem to work. I forcefully throw an exception but the method is never called Oct 17 05:45:58 <^cheeky> ok ... @ one point .. i really had it working ... !!!! but this is too much failure Oct 17 05:50:10 <^cheeky> i swear it worked, but i have no idea why i still get network icon for image loading, is it because i am using fit, and centercrop with picasso Oct 17 05:51:11 thats weird Oct 17 05:51:28 my custom views are failing to instantiate in the graphical preview even though Ive changed nothing and they were fine just now Oct 17 05:53:30 any ideas? Oct 17 05:53:47 Where should static references that might leak context be dereferenced declared in a service (particularly ime)? Oct 17 05:54:24 It is also ignoring the "NoActionBar" in the manifest Oct 17 05:54:32 <^cheeky> Anthaas: i prolly wouldnt know the answer, preview ? Oct 17 05:54:55 The Graphical Preview when viewing XML Layout files Oct 17 05:56:54 the error: "Native Typeface Cannot Be Made" - TO GOOGLE! :D Oct 17 05:56:56 <^cheeky> open it up in design view and see Oct 17 05:57:03 <^cheeky> heh Oct 17 05:57:20 <^cheeky> is there a height and width for a gallery app ? Oct 17 06:05:13 thepoosh http://www.androidpolice.com/2013/10/14/kitkat-to-complete-sms-api-require-default-texting-app-and-limit-all-others/ Oct 17 06:09:05 <_the_surfer_> anyone have experience with sencha touch framework and extracting android apps from it? Oct 17 06:12:50 g00s: I read that - that seems partially like what I said needed to happen Oct 17 06:13:12 Anthaas: Some amount of restriction on applications that can do what they want with SMS Oct 17 06:13:26 oops, messaged myself there... Oct 17 06:14:39 holy crap Oct 17 06:14:46 please teach me how to make an android app Oct 17 06:14:46 https://play.google.com/store/apps/developer?id=Greenway Oct 17 06:16:26 wow, people even downloaded some of these Oct 17 06:21:02 p_l|x230 hwat gizmos did you get ? Oct 17 06:24:09 jbraeg: can you java? Oct 17 06:24:17 <^cheeky> ummm, if i a just passing in a url to picasso what would be the issue for it download the image badly that it caused GC_CONCURRENT to appear and load the image slower than what it was before, i used center_crop and fit() Oct 17 06:37:10 <^cheeky> i guess ill just make one ofe those just for the time i have spent Oct 17 06:43:54 <^cheeky> are there any apps thats open source i could take a peak @ how picasso is being used ? Oct 17 06:44:27 I copied some files into the src dir, how can I get them to be in my project? Oct 17 06:44:40 eclipse doesn't notice them Oct 17 06:45:10 wow all the sudden it does nevermind Oct 17 06:49:45 <^cheeky> if anyone please could help me .. may force ++ in you Oct 17 07:02:59 <^cheeky> too cold to joggg Oct 17 07:04:58 never too cold Oct 17 07:05:14 ^cheeky: "being used" there's only so many ways to use it Oct 17 07:16:23 using one activity and the rest being only fragments Oct 17 07:16:26 what do you think of that idea Oct 17 07:18:47 for the entire application, always, even if it's a huge application Oct 17 07:21:47 a kind of macrooptomizing Oct 17 07:22:47 consider a complicated settings ui: you could have many fragments living in one activity alone, that are interconnected but don't directly talk to other fragments in a "main" activity Oct 17 07:23:52 nb-ben: i have one activity, 50ish views, and a state machine Oct 17 07:23:57 no fragments Oct 17 07:24:23 ui state machine sounds like a really good idea :) Oct 17 07:24:37 that's all that fragments are Oct 17 07:24:43 except they're a shitty state machine Oct 17 07:24:48 idk, doing those things sound counter-idiom to me Oct 17 07:25:28 can I set the back button to load the previous pager adapter? Oct 17 07:25:58 nb-ben: it definitely is. fragments are a set of chains and they don't want you to break out of them Oct 17 07:26:14 right now my navigation is just constantly switching the adapter in my listAdapter Oct 17 07:26:35 tab1293: yeah you can override onBackPressed in an activity Oct 17 07:26:55 fragments have startActivityForResult and activities have startActivityForResult Oct 17 07:26:59 but they don't share a common interface Oct 17 07:27:10 lasserix, okay but where will I keep the list of previous adapters? do i have to keep them on a stack myself? Oct 17 07:27:11 they don't need to Oct 17 07:27:29 it's either I support fragments in my API or I suppose activities Oct 17 07:27:44 even though, theoretically, there should be no issue at all supporting both Oct 17 07:27:55 just because they don't share the same interface, I can't refer to that functionality in a generalized manner Oct 17 07:28:11 so make your own interface Oct 17 07:28:25 this API was clearly not written by people who are experienced in Java Oct 17 07:28:30 the two are wholly different concepts. just because they have the same method doesn't mean you can treat them the same for everything Oct 17 07:28:50 JakeWharton: I didn't mean they should be inheriting from the same parent Oct 17 07:28:52 tab1293: something like that but you should make sure to release resources adapaters on the stack don't need Oct 17 07:29:00 JakeWharton: doesn't startActivityForResult do the same thing in both of them Oct 17 07:29:12 lasserix, okay ill try that out Oct 17 07:29:14 kind of Oct 17 07:29:21 JakeWharton: kind of or exactly that? Oct 17 07:29:22 the goal is the same, the semantics around usage are different Oct 17 07:29:25 kind of Oct 17 07:29:28 notice how i said kind of Oct 17 07:29:31 i meant kind of Oct 17 07:29:36 <_the_surfer_> anyone have experience with sencha touch framework and extracting android apps from it? Oct 17 07:30:20 the two are not polymorphic therefore no interface should be provided Oct 17 07:30:34 code should not be generalized between the two because there is semantic and behavior differences Oct 17 07:31:22 JakeWharton: does abs cache frequently redisplayed (sub)views (instead of drawing them again) for performance? Oct 17 07:40:46 <^cheeky> burrrrrrrrr Oct 17 07:40:56 <^cheeky> freaking cod out there, no freaking beach to surf Oct 17 07:40:59 <^cheeky> sucks over here Oct 17 07:41:13 damn those haddock Oct 17 07:42:13 <^cheeky> JakeWharton: in my log all i see it https object and concurrent, i am not sure if i am using it in the wrong place maybe not in my getview() , all i pass into picasso is just an url, could i show my code, which is uber rubbish Oct 17 07:51:45 lasserix, is there anyway to code in the onBackPressed() something like "if the adapter stack is empty run the normal onBackPressed behavior"? Oct 17 07:52:32 would that just be super().onBackPressed()? Oct 17 07:52:36 <^cheeky> i am not sure if i am using picasso the right way here :( Oct 17 07:52:37 <^cheeky> http://pastebin.com/FjQBL0Wa Oct 17 07:55:10 tab: aye Oct 17 07:57:29 <^cheeky> i tried using without a a view holder pattern just the image view but same issue, Oct 17 07:58:08 Is it possible to use @InjectView to inject a SupportMapFragment to a RoboFragmentActivity? Oct 17 07:58:57 currently I have to get the map like this: SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map); Oct 17 08:01:32 ah, just found @InjectFragment, testing... Oct 17 08:03:10 <^cheeky> thats a crazy term , injectFreagment Oct 17 08:03:13 <^cheeky> heh Oct 17 08:03:16 <^cheeky> never used ti Oct 17 08:03:17 <^cheeky> it Oct 17 08:04:04 <^cheeky> 0oo ... nice Oct 17 08:17:18 so my contentprovider doesn't create all my tabels Oct 17 08:17:21 tables even Oct 17 08:17:25 it only creates the first table Oct 17 08:20:54 Is it possible to find out if the user sent a message or simply pressed the back button after I launch the "sms" intent? Oct 17 08:22:12 does anyone know a trick to get in between field assignment in gson object creation? -.- Oct 17 08:22:19 <_the_surfer_> anyone have experience with sencha touch framework and extracting android apps from it? Oct 17 08:24:19 sulaiman, only if the SMS app sets result on intent… I wouldn't count on it though Oct 17 08:25:45 sulaiman: when using SmsManager to send a message, you should give a sent intent and a delivered intent and catch them in a broadcast receiver Oct 17 08:27:16 thepoosh, can messages that are sent through the SmsManager be made to appear in the default Messaging app? Oct 17 08:27:20 I'm registering a BroadcastReceiver in one of my classes by calling context.getApplicationContext().registerReceiver(). How can I unregister it when the application is destroyed from within that class. Is there a callback function which I can get from the context? Or is there a method to get all registered receivers from the Activity? Oct 17 08:27:37 sulaiman: yes, there is documentation on how to do this Oct 17 08:39:39 How does the android display work? Can i stop it? Kinda like killing x-server on ubuntu? Oct 17 08:39:47 thanks Mavrik, thepoosh Oct 17 08:39:59 ivali: try killing the zygote process Oct 17 08:40:08 it will basically bring android up in a "headless" mode Oct 17 08:40:18 do note: NOTHING will come up graphically then. Oct 17 08:40:27 (assuming you are building from scratch) Oct 17 08:40:30 sulaiman: pleasure, just had lots of XP with sending SMS so if you have questions, ask away Oct 17 08:40:31 My device randomly reboot using an app I'm developing, any idea on how I can debug what's going on? -- I'm integrating with Vuforia https://developer.vuforia.com/resources/sdk/android using JNI and C++ code Oct 17 08:40:41 or are you talking about a specific device? Oct 17 08:40:50 My device is a Nexus 4 Oct 17 08:41:49 chronodekar, i am trying to kill the display server so i can use it by writing in /dev/graphics/fb0 :) Oct 17 08:43:24 ivali: are you trying on an emulator or an actual device? Oct 17 08:43:38 when does the onCreate() of a SQLiteOpenHelper get called? Oct 17 08:43:46 cause one of my tables is not being created Oct 17 08:44:14 I am trying on the motorola razr i. The zygote process is starting automaticly after i kill it. Now i'm google'ing some solutions for that :) Oct 17 08:44:45 I didn't anything weird.. I'm just running a native library code... the device shouldn't reboot like that. Oct 17 08:44:55 crash, maybe, reboot? no! Oct 17 08:50:17 ivali: zygote will automatically start because its mentioned in the "init.rc" file. Oct 17 08:52:03 ivali: haven't tested it, but I expect this to work: http://stackoverflow.com/questions/16273301/disabling-android-services-in-init-rc Oct 17 08:53:03 this command "setprop ctl.stop zygote" might also help Oct 17 08:53:16 please remember: you are basically asking to turn your device into a brick. Oct 17 08:53:25 have a backup phone around in case that happens. Oct 17 08:53:55 lemonxah, onCreate() is called only once, when the database is not been created. After that you need increment your database version and in onUpgrade() you can alter your tables Oct 17 08:56:29 chronodekar, asking the phone turn into a brick? wouldn't be zygote start again after a reboot? Oct 17 08:56:36 compengi, yeah but its not being called ever Oct 17 08:56:43 but i think i understand why now Oct 17 08:57:25 ivali: hmm... yes, if you do NOT fiddle with init.rc then it will. Oct 17 08:57:41 but I do advice you to be careful. Oct 17 08:58:05 still; did you try the setprop command I suggested? Oct 17 08:58:18 lemonxah, even if during creating an exception was thrown sometime (not always) the db is considered created. You need to uninstall your application from the device to re-create once again Oct 17 08:58:29 I managed to port android to a non-phone device and running that command results in the boot animation looping endlessly. Oct 17 09:00:02 ok..if someone is thinking in trying "setprop ctl.stop zygote" please don't. my screen frozen, had to remove the battery :D Oct 17 09:00:45 umm... it was supposed to freeze your screen. Oct 17 09:01:07 ohhh..darn Oct 17 09:01:08 but I would think that adb would still be working. Oct 17 09:01:25 the idea was that the screen would be dead, but through adb shell you could do whatever you wanted. Oct 17 09:01:53 on the good side, at least we know that you could remove your battery to reset the phone. ;P Oct 17 09:02:30 chronodekar, not on all devices :O Oct 17 09:02:56 I was referring to ivali's phone. Not generalized. Oct 17 09:03:06 I see Oct 17 09:04:13 compengi, this is super anoying Oct 17 09:04:38 ok .. this is actually working as expected .. thanks Oct 17 09:04:43 <_the_surfer_> anyone have experience with sencha touch framework and extracting android apps from it? Oct 17 09:06:29 lemonxah, it is, that's why the fastest way is to execute your create sql statement with a sqlite manager first before you do that on your device Oct 17 09:07:46 the sql works though Oct 17 09:07:47 :/ Oct 17 09:10:50 lemonxah, are you initializing an object of that class and calling the super constructor of SQLiteOpenHelper? Oct 17 09:11:03 yes compengi Oct 17 09:12:43 lemonxah, well then without a code snippet I can't really see what's wrong Oct 17 09:12:54 i will give you one soon Oct 17 09:16:11 https://github.com/lemonxah/xaHChat/blob/master/src/main/scala/com/xah/chat/datamodel/tables/Messages.scala Oct 17 09:16:19 that is the table that is not being created Oct 17 09:23:43 compengi, its setup exactly like the contacts table Oct 17 09:24:07 and i have logging in that onCreate and it never shows so its not even trying to create it Oct 17 09:26:05 lemonxah, I think I know why, you are probably getting an exception. There is no sqlite type "timestamp". Wrap the db.execSQL(create) statement with a try-catch block and get the exception message Oct 17 09:26:20 awesome Oct 17 09:26:32 but the timestamp worked on my editor :/ Oct 17 09:26:34 thnx Oct 17 09:26:47 let me tetst it Oct 17 09:27:03 lemonxah, check the supported datatypes in sqlite http://www.sqlite.org/datatype3.html Oct 17 09:27:55 i still get android.database.sqlite.SQLiteException: no such table: Messages (code 1 Oct 17 09:28:27 You need to re-install the app Oct 17 09:28:34 yes Oct 17 09:28:40 and i even have break points there Oct 17 09:28:45 it doesn't hit the break point Oct 17 09:32:43 man this is anoying :/ Oct 17 09:40:19 compengi, its even worse now Oct 17 09:40:47 if i dont access the contacts table then it creates the messages table no worries Oct 17 09:40:52 but then the contacts table doesn't exist Oct 17 09:41:11 lemonxah, This is weird Oct 17 09:41:17 no kidding Oct 17 09:43:11 lemonxah, as far as I can tell, the error message says that you don't have messages table, which means it was not created Oct 17 09:43:23 yes Oct 17 09:43:45 but like i said if i dont do a query on the contacts table then that error goes away and i can see it being created Oct 17 09:43:52 and the data gets put in the db Oct 17 09:44:11 but then the error says Oct 17 09:44:12 android.database.sqlite.SQLiteException: no such table: Contacts (code 1) Oct 17 09:44:21 so its like 1 or the other but not both Oct 17 09:45:36 Hi, does anyone use android studio? My Project structure window doesn't match what I Read on internet Oct 17 09:47:14 maybe that gradle issue I heard about, uhm Oct 17 09:49:45 or they are not needed with gradle. Uhm, confusing :P Oct 17 10:45:19 how can i move my projects for android created in eclipse to android studio? Oct 17 10:50:42 I think that android studio has an import option Oct 17 10:51:35 <_the_surfer_> anyone have experience with sencha touch framework and extracting android apps from it? Oct 17 10:53:36 but as someone said yesterday, android studio is buggy buggy Oct 17 10:58:05 really buggy Oct 17 10:58:08 really really Oct 17 10:58:58 That's not what I've heared about it from others. Oct 17 10:59:17 If you want most features but a more "stable" experience, use IntelliJ IDEA 13 EAP. Oct 17 10:59:30 I am learning android since yesterday and I found some bugs :P Oct 17 10:59:53 options that appears and disappear magically :P Oct 17 11:00:10 Feel free to try IntelliJ IDEA 13 EAP then. Oct 17 11:00:12 and eclipse... It has something I don't really like, no reason :P Oct 17 11:00:18 yep Oct 17 11:00:26 Foxandxss -> it had been buggy but about as much time as it's been out by now, most bugs people have been facing should be eliminated. android studio is not a new ide. it's just a rebranded named for the best damn java ide that's been around for some time and bundled with the android sdk Oct 17 11:00:36 12 is alright too, but 13 EAP is better, I use it ona daily basis. Oct 17 11:00:39 IDEA 13 release is due in less than 2 months \o/ Oct 17 11:00:55 I hope they change that stupid rounded cornered filter box Oct 17 11:00:55 BullShark: Indeed, I bought a rubymine license some time ago Oct 17 11:01:11 Zharf -> what new changes are planned for the IDEA 13 release? Oct 17 11:01:35 BullShark, tons of android development improvements Oct 17 11:01:49 try it out with IDEA 13 EAP Oct 17 11:02:12 wasn't android studio based on version 13? Oct 17 11:02:12 ok Oct 17 11:02:13 or was 12? Oct 17 11:02:38 13 Oct 17 11:02:57 let me try the EAP Oct 17 11:03:19 Leeds http://www.infoq.com/news/2013/10/samsung-slowing-tizen Oct 17 11:04:15 since you mentioned tizen the other day Oct 17 11:06:03 Foxandxss -> looking at the import option for android studio and i do not see anything about eclipse. i see import as a gradle project but eclipse uses ant, not gradle, as its build system Oct 17 11:06:10 people still write cold fusion? Oct 17 11:06:47 BullShark: http://developer.android.com/sdk/installing/migrate.html Oct 17 11:07:05 uh, intellij has a nice config wizard Oct 17 11:07:10 I've been using Android studio for a month or two now (currently using 0.2.11) and my experience has generally been very positive. Oct 17 11:08:04 g00s: getting lumped in with ubuntu, firefox and sailfish isn't a good sign Oct 17 11:08:07 cideroxylon: in project structure window, you get all the options (module, deps, global deps, etc) or just an option to config the sdk? Oct 17 11:08:23 what are the differences between eclipse and intellij idea (aka android studio)? Oct 17 11:08:25 just the sdk Oct 17 11:08:58 speaking of which, ubuntu touch is meant to have its stable release today... Oct 17 11:09:05 I see. Not sure if that is because you need to do it by hand in gradle or that is a bug. I see a lot of info in internet of that window with all the options Oct 17 11:09:34 In Android studio gradle file contains all the project configuration options, so project structure window is a bit of a red herring Oct 17 11:09:37 cideroxylon -> they can both use the same version/ latest of the android sdk. surely there has to be differences among usage of the IDEs and other interactions. Oct 17 11:09:40 in fact, 13.10 was released a few minutes ago :) Oct 17 11:10:27 The 'Sync Project with Gradle Files' toolbar button is your friend:) Oct 17 11:12:07 Leeds -> nice. i'll be expecting mint to soon release a new version of itself based off of that ubuntu and reinstall mint with 16 while i currently have 14, nice to have a solid ubuntu system with the gui of cinnamon or mate instead of unity. Oct 17 11:12:20 cideroxylon: so all the config is by hand atm right? (I don't care, I am just trying to understand) Oct 17 11:13:20 Yes, all the dependencies and so on need to be configured in the build.gradle file Oct 17 11:16:28 sounds good. I am a android dev noob (no knowledge at all). I was reading a new android studio book and I stumbled into the project structure dialog so I started to google Oct 17 11:17:11 I guess that this gradle stuff is pretty new Oct 17 11:18:29 Yes, for Android development at least, it is pretty new, but it definitely seems to be the wave of the future:) Oct 17 11:19:08 sounds good what I read so far, I want to see the google I/O video about gradle later Oct 17 11:20:43 then, I'll stick with android studio, I can't stand with eclipse Oct 17 11:21:01 What I like about Android Studio compared to Eclipse (which I have used for quite a while) is that in Android Studio the java files, the xml resources and the gradle build file all feels like code and seems much more integrated Oct 17 11:21:39 I don't think I see your point Oct 17 11:21:51 jetbrains IDEs editors are really good, that is true Oct 17 11:26:48 cideroxylon: thanks btw, you solved some questions I had in mind Oct 17 11:43:19 hmmm windows 8.1 is out Oct 17 11:44:10 begging android-dev. Shall I begin by Adroid studio or get the eclipse plugin? Oct 17 11:44:18 *android Oct 17 11:44:21 zquad: very in-topic Oct 17 11:44:28 *beginning Oct 17 11:44:32 :) sorry Oct 17 11:45:07 android studio will probably become better than eclipse at some point, but that point isn't now imo Oct 17 11:45:27 we're still debating android studio? Oct 17 11:45:37 thought that was settled several minutes ago Oct 17 11:47:04 zquad: great so I'm grabbing Android studio. I wasn't sure if it had any serious bugs Oct 17 11:47:20 I can tell yo that IT DOES Oct 17 11:47:31 getting google play services working is a bitch Oct 17 11:47:37 oh sorry Oct 17 11:47:44 yeah Oct 17 11:47:45 plus some other things that were headaches Oct 17 11:48:01 I am not telling you that from a review I read, this was my personal experience Oct 17 11:48:09 I don't really want to think to much about this Oct 17 11:48:24 I'm just starting out and can switch anytime Oct 17 11:48:30 well, sir Oct 17 11:48:33 up to you Oct 17 11:48:34 No, there's not really any serious bugs Oct 17 11:48:36 good luck Oct 17 11:48:39 what are companies like google using Oct 17 11:48:40 And they're quite fast about fixing Oct 17 11:48:46 eclipse? Oct 17 11:49:25 notepad maybe, I have a friend who uses vim Oct 17 11:49:27 idk Oct 17 11:49:34 aha Oct 17 11:50:21 great Oct 17 11:50:30 I normally use vim Oct 17 11:50:39 I shall checkout some plugins Oct 17 11:53:13 using vim to develop for Android is just… self-torture. Oct 17 11:54:52 Mavrik, are you developing on eclipse? Oct 17 11:55:00 IDEA Oct 17 11:55:51 Mavrik, any problems with it so far? i actually want to learn android dev with it .... Oct 17 11:56:17 IDEA 12 is nice, very stable, but not Gradle support yet Oct 17 11:56:30 I'm currently on IDEA 13 which is practically equivalent with Android Studio Oct 17 11:56:37 same features, same bugs :) Oct 17 11:56:43 good enough for production usage though Oct 17 11:59:49 <_the_surfer_> got issue on adb not recognizing my samsung device... i have installed sdk usb drivers and also "specific" samsung drivers but still nothing... anyone had this issue? Oct 17 12:00:09 are you using adb over wifi? Oct 17 12:00:12 Mavrik, great. What do you suggest me to read after the google's developer tutorial? Oct 17 12:00:18 _the_surfer_: OS? Oct 17 12:00:28 svector, the trainings are awesome Oct 17 12:00:32 then get to work :P Oct 17 12:00:33 great books? Oct 17 12:00:40 I never liked eclipse, no reason tbh Oct 17 12:00:45 also: is your device not listet at all or just "unknown / offline" ? Oct 17 12:00:46 read on components as you need them… I haven't found any books that would be better than official guides Oct 17 12:00:52 svector: commonsware has a 2500+ pages book Oct 17 12:01:12 :) okay Oct 17 12:01:25 I didn't know the guides were vast Oct 17 12:01:49 Foxandxss, checking it out Oct 17 12:01:51 <_the_surfer_> gdrc ktwo android 4.1.2, samsung galaxy s3, other samsung device is working, version 2.3. Oct 17 12:02:03 _the_surfer_: OS of your PC Oct 17 12:02:13 <_the_surfer_> gdrc windows Oct 17 12:02:14 svector: updated every month, you can buy a year subscription Oct 17 12:02:18 <_the_surfer_> gdrc win 7 Oct 17 12:02:47 _the_surfer_: try this http://pdanet.co/ Oct 17 12:02:57 but do you see it in the devices list ? Oct 17 12:03:02 or not at all - usb or wifi Oct 17 12:03:06 @_the_surfer_ If I remember correctly (this is a while ago) I could see and debug my Samsung device from adb after I installed Samsung Kies (which obviously installed the right drivers) Oct 17 12:07:16 Foxandxss, looks interesting. Shall definitely consider it after finishing the google tuts Oct 17 12:07:40 svector: Is the most complete resource, covers practically all, even gradle Oct 17 12:08:24 well, gradle chapters are coming yet, there is 2 atm Oct 17 12:08:27 Foxandxss, thanks for the suggestion Oct 17 12:08:56 you welcome Oct 17 12:10:29 about ide fights, I am with you too, one became problematic? switch :P Oct 17 12:11:21 <_the_surfer_> ktwo it is not listed on devices list... i tried other samsung device and it works... Oct 17 12:11:38 <_the_surfer_> gdrc thx, i will try Oct 17 12:12:16 Foxandxss, that's right. the trick is to pick one quickly. I am actually planning to join an android dev team. Can I promise I will be become reasonable good in three weeks given I'm good at programming in general? Oct 17 12:13:05 svector: I am not the person to ask, I am in the same position as you, good at programming, no android knowledge Oct 17 12:13:41 aha Oct 17 12:14:01 anyway, shouldn't be that hard Oct 17 12:14:28 anyway I'll throw myself into it Oct 17 12:15:16 I would say android studio because is the official one and I really like jetbrains. Canary versions comes fast it seems Oct 17 12:19:56 Hey guys, I've only had one download for my app in the past week but overnight I got 7 ratings reviews (no comments) out of nowhere. Why is this? Oct 17 12:20:27 _the_surfer_, make sure you've 'allowed' the machine if you're prompted anything about RSA fingerprints. Newer versions of android will not link with a machine unless you agree Oct 17 12:22:50 guiseeee Oct 17 12:24:57 CocoStorm: Perhaps someone's started pirating your app already? Who else would leave the reviews? :/ Oct 17 12:26:21 chronodekar, really? Why would they leave reviews on play store if it's pirated? Oct 17 12:26:31 and I don't want my app pirated! Oct 17 12:26:58 To be honest, I really don't know. It was a blind guess. Oct 17 12:27:03 CocoStorm, your app probably hasn't been pirated. App totals are never 100% up to date Oct 17 12:27:11 wait a week and your download count will bump up Oct 17 12:27:17 are all seven reviews the same rating? Oct 17 12:27:23 ratings however always are in sync Oct 17 12:27:31 hence you can end up with more ratings than downloads Oct 17 12:27:32 Kegsay, ah I see Oct 17 12:27:33 it could be the same guy leaving a review but got disconnected due to bad internet. Oct 17 12:27:37 chronodekar, nope different but most 5 stars Oct 17 12:28:35 heh Oct 17 12:28:39 hmm.. I don't know then. Kegsay's "wait and see" suggestion makes sense to me. Oct 17 12:29:32 CocoStorm: in the remote case (from ignorance) that pirated rating counts, they help, somehow :P Oct 17 12:31:16 chronodekar, yeah for sure I guess I will Oct 17 12:31:21 we'll see Oct 17 12:31:54 what's your app anyway? (if you don't mind sharing the play link) Oct 17 12:33:04 chronodekar, https://play.google.com/store/apps/details?id=com.marco.numbersnap Oct 17 12:33:09 NumberSnap Oct 17 12:34:57 sounds cool Oct 17 12:35:11 CocoStorm: Hmm... looks like it has a nice UI. :) Oct 17 12:35:13 Thanks Oct 17 12:35:26 on the bright side it says that there are 100 - 500 installs/downloads. Oct 17 12:35:35 perhaps some of them left the reviews after using the app for sometime? Oct 17 12:35:37 does it sell? (curiosity of how users are willing to pay) Oct 17 12:35:54 yeah I've got like 150 or something but only because it was featured on TechCrunch and Gizmodo in July Oct 17 12:36:08 and then the downloads dropped when the exposure died Oct 17 12:36:19 so the reviews were definitely not from those downloads :) Oct 17 12:36:35 I know the feel Oct 17 12:36:58 My blog was exposed into hacker news one day, I got like 30k visits in two days, after that, 500/day :P Oct 17 12:37:33 Reminds me of the visits I get when I write fanfiction... Oct 17 12:37:47 Foxandxss, yeahh it sucks :( but 500/day is really good! Oct 17 12:37:55 very high when someone recommends it but drops off afterwards. Oct 17 12:37:59 doesn't admob worth? Oct 17 12:38:20 Foxandxss, me? Oct 17 12:38:34 admob, not you :P Oct 17 12:38:42 but yes, can be applied to an app like yours Oct 17 12:38:48 not sure if it gives real money or not Oct 17 12:38:53 I am new to android dev Oct 17 12:39:00 ah I see Oct 17 12:39:18 My only mobile app was WP7 and was free (no adds) Oct 17 12:39:19 Foxandxss, what's your blog? Oct 17 12:39:42 one for angularjs (google's javascript framework for web dev) Oct 17 12:39:51 ah cool Oct 17 12:40:12 I am a docs guy Oct 17 12:40:58 brb Oct 17 12:41:09 does anybody know the best way to read extension files from the NDK? I know they are regular files, I want to know the best way to read a file INSIDE the extension file from the NDK Oct 17 12:41:26 without unpacking the extension file Oct 17 12:58:56 Hello. I'm trying to close my app the proper way, once I close it onDestroy() is called and it closes down inputstreams, scanner etc. Problem is that I have a while loop in another thread, which continues to try to scan.nextLine(), eventho there's nothing next (streams are closed now). So the problem is, everytime I close application I get an java.util.NoSuchElementException at java.util.Scanner.Nextline.... Oct 17 13:01:14 so I need to stop a threads loop somehow Oct 17 13:07:52 is there any way to disable autowrap of long lines in textview and enable horizontal scrolling for it? Oct 17 13:19:12 ohcibi, placing the TextView in an HorizontalScrollView? Oct 17 13:21:22 <_the_surfer_> anyone with any experience developing android apps in sencha touch framework? Oct 17 13:29:19 Is there a correct way to get the xml attribute value of a standard Android widget? android.R.styleable.TextViewAppearance is marked as internal so that won't work Oct 17 13:34:58 leslie, most of the xml attributes can be accessed via setters/getters on the view, some attributes may be more difficult though, what did you have in mind? Oct 17 13:35:53 I'm trying to get the string value used in the fontFamily attribute. The only getter related is getTypeface but that's not the same thing. Oct 17 13:36:39 Hi, does anyone have an idea why recreating the GLSurfaceView makes my app render odd geometry? (Getting more odd every recreation) (Nexus 7, Android 4.3, OpenGL ES 2.0) Oct 17 13:36:51 Or how I can find out... Oct 17 13:38:16 _the_surfer_, no, but avoid webview frameworks like that for mobile developments Oct 17 13:39:21 flan3002, what do you mean by recreating the surface? Oct 17 13:39:34 <_the_surfer_> mastro thx, i agree but its not me who decide... team project, just need someone with experience to share some tips.. Oct 17 13:39:46 Hello guys - i have a rather old device that i am trying to install an application on. It works - however, my system does not recognize which device it really is - this means that the device is not shown in my DDMS and therefore i can not track it in Logcat. It is a samsung galaxy s 19000 Oct 17 13:40:20 _the_surfer_, then you should look for a sencha channel because that has nothing to do with android development Oct 17 13:40:35 mastro: After one Call to onSurfaceCreated it renders as supposed, the second makes it show weird geometry. Oct 17 13:40:35 the device is shown as being attached when i run the command adb devices - but it is shown as: "3031BCE606A000EC" Oct 17 13:41:02 troloyolo, are you running on Linux,Mac,Windows? Oct 17 13:41:06 leslie, from the looks of it the fontFamily attribute is never stored anywhere accessible, it is immediately used to create a Typeface Oct 17 13:41:13 mastro - windows Oct 17 13:41:23 mastro: I test this by simply rotating my device from landscape to portrait or vice versa. It doesn't get recreated after rotating by 180 degrees. Oct 17 13:41:36 troloyolo, if the device is showed by adb devices you should be able to see the logcat what does adb logcat command say? Oct 17 13:41:39 i have tried manually installing the usb driver, and tried with Samsung Skies i think its called - however without any luck Oct 17 13:42:03 Kegsay, right. I have a subclass of TextView, so I have an AttributeSet, but no way of accessing the required attribute values Oct 17 13:42:06 mastro - nothing is shown in Logcat because no device is selected for Logcat to show Oct 17 13:42:29 oh, you have the attribute set, then ummm Oct 17 13:42:30 flan3002, you are holding some data statically and not resetting it correctly Oct 17 13:42:48 flan3002, or you are not clearing depth buffers and so on Oct 17 13:43:13 troloyolo, that doesn't answer my question, what does the command adb logcat print? Oct 17 13:43:18 hmmm internally is uses com.android.internal.R.styleable.TextView_fontFamily Oct 17 13:43:28 yup Oct 17 13:43:36 troloyolo, and I'm telling you to actually EXECUTE the adb logcat command Oct 17 13:43:46 mastro: yeah, but I don't have any static non-final vars on the Java side. How can I clear vbos from java? Oct 17 13:44:00 maybe what I'm trying to do just isn't possible Oct 17 13:44:10 mastro - running the command shows the Logcat output, but in my terminal view Oct 17 13:44:17 and therefore i am unable to filter the information Oct 17 13:44:29 leslie, no, but you should be able to get the style resource ID Oct 17 13:45:07 mastro how do you mean? Oct 17 13:45:23 troloyolo, meaning you have some issue with Eclipse, not with the device Oct 17 13:45:32 (I guess you are using Eclipse) Oct 17 13:46:01 mastro - well i just guessed it was with my device since is it not shown in my computer either Oct 17 13:46:12 but i suppose you are right Oct 17 13:47:55 leslie, I did something similar to what you are doing, I declared a custom stylable and attribute, I then set the attribute to my textAppearance style. from code I do: TypedArray a = context.getTheme().obtainStyledAttributes(attrs, R.styleable.MyStylable_TextAppearance, 0, 0); int ap = a.getResourceId(R.styleable.MyStylable_TextAppearance_style, -1); a.recycle(); if (ap != -1) myView.setTextAppearance(context, ap); Oct 17 13:48:08 join ##OpenGl Oct 17 13:48:27 leslie, there are other wais of obtaining an attribute value without declaring a stylable Oct 17 13:48:28 Sorry, missed "/" Oct 17 13:49:28 Are bluetooth sockets supposed to be difficult.. or am I missing something..? Oct 17 13:49:31 troloyolo, is the device selected in Eclipse DDMS view? Oct 17 13:49:53 have you tried closing / reopening eclipse? Eclipse sucks most of the time :) Oct 17 13:50:00 troloyolo, + Oct 17 13:50:03 troloyolo, ^ Oct 17 13:50:19 leslie, s/wais/ways/ Oct 17 13:50:45 ah. I'm not sure how well that'd work in my case, mastro. basically I'm just trying to backport the new Jelly Bean fonts without having to change a lot of the code Oct 17 13:51:19 leslie, then you are talking about typeface, not text appearance Oct 17 13:51:29 yeah, that's what I said Oct 17 13:51:40 fontFamily Oct 17 13:51:50 leslie, and there's no way to change the typeface from XML / attribute / style Oct 17 13:51:58 leslie, you need to do it via code Oct 17 13:52:22 right. but I need to get the fontFamily xml attribute, mastro Oct 17 13:52:59 so that if it says "sans-serif-light", I can load and set the Typefac Oct 17 13:53:04 Typeface* Oct 17 13:53:37 leslie, then in your custom TextView (I advice you to create one) you can do int style = getTypeface().getStyle(); then parse the style and select the right typeface to set it Oct 17 13:54:54 leslie, but you can't do it transparently to the developer, so I advice you to create your stylable attribute to define the typeface on your custom TextView class Oct 17 13:55:16 but getTypeface() returns the wrong value if the font isn't installed on the system, because it only gets set if the font exists when the TextView is created. otherwise it returns the system default font Oct 17 13:55:41 leslie, then create your stylable attributes Oct 17 13:55:57 right, I guess that's the only real way to do it Oct 17 13:56:00 leslie, I repeat hoping it will go through: you can't do it transparently to the developer Oct 17 13:56:11 ok. that's a shame Oct 17 13:56:54 <[A3G1S]> thepoosh hi Oct 17 13:56:55 leslie, and the reason is that typeface are hardcoded in the Android framework and loaded natively, if you need to change typeface you are on your own in the typeface style handling Oct 17 13:56:56 <[A3G1S]> sup ? Oct 17 13:57:53 I understand that, but if I were able to get the fontFamily attribute, I could handle the loading/setting of the fonts. but apparently that's not possible Oct 17 13:58:39 Hey,any dev here got a minute or two to estimate how long something would take to develop ? Oct 17 13:58:51 Would be a WiFi Client where we use the API of a 3rd Party Customer Oct 17 14:00:04 leslie, com.android.internal.R.styleable.TextAppearance_fontFamily <--- internal by design || private void setTypefaceFromAttrs(String familyName, int typefaceIndex, int styleIndex) {...} <--- private by design Oct 17 14:00:23 leslie, don't know why, but that's how it is :) Oct 17 14:01:40 hi, AlertDialog's setButton is deprecated, what should I use instead for single-button alerts? Oct 17 14:02:11 leslie, consider you can use Spannable to change typeface, that's an alternative over overriding TextView (and Button, Checkbox, ...), you'll have to programmatically set each text tough Oct 17 14:04:50 nb-ben, not all setButton() methods are deprecated, and you should use the Builder anyway Oct 17 14:05:31 mastro, you can just call setTypeface from a subview of TextView once you've loaded the font, that part isn't difficult. The best thing I can think of is to make my own fontFamily xml attribute instead. Oct 17 14:06:07 leslie, that's what I said, create your own stylable Oct 17 14:06:24 parse it in your own view (which extend TextView and subclasses) Oct 17 14:06:26 ok, I'll do that Oct 17 14:06:27 android-dev: Estimations have the nasty trait to be off by a lot. You shouldn't give a lot on them. Also, it depends on your experience... Oct 17 14:06:36 leslie, cache the font statically or something like that Oct 17 14:06:44 yup Oct 17 14:06:46 ok thank yoi mastro Oct 17 14:09:17 flan3002 thanks Oct 17 14:09:28 and wtf did I have that nick for :o Oct 17 14:09:48 im just curious because we have 2 delivery companies, each with their own networks Oct 17 14:10:03 now we'd need to code the second one completely by ourself Oct 17 14:10:41 SrRaven-work: You'll have to give more info for anyone to give a good opininon. Oct 17 14:11:53 SrRaven-work: Just based "a WiFi Client where we use the API of a 3rd Party Customer" we can interpret thousands of things and in the end, you meant something totally different... Oct 17 14:12:02 *based on Oct 17 14:14:05 in AndroidStudio... is there a way to add an item to a menu from a button click? or do you have to cut/paste/type in the entire item from scratch? Oct 17 14:14:46 leslie, I extracted something from what I did... it's very hacky because it does exactly what I need and nothing more... but you may find it useful: http://paste2.org/FLnWID25 http://paste2.org/Jye7IMcY Oct 17 14:26:03 Someone got an idea, why using Vertex Arrays vs Vertex Buffer Objects renders different? I use both of them the same, but the Vertex Arrays render weird... Oct 17 14:27:51 Please have a look at the binding code: https://gist.github.com/hoeppnerTill/7e5fc4ced5c7d09e7f9e Oct 17 14:28:44 flan320 mind if I message you? Oct 17 14:29:45 SrRaven-work: Go ahead... Oct 17 14:30:22 thanks, mastro, I'll take a look Oct 17 14:34:42 android dev workflow is really complex, jar files, aar, using libs in project... :P Oct 17 14:34:59 flan3002, I've no idea but I guess the end floatBuffer.position(0); shouldn't be there Oct 17 14:39:50 mastro: Hm, I'll give it a try, though I don't see where this could harm the rendering... Oct 17 14:45:40 mastro: Didn't change anything... Oct 17 14:45:59 flan3002, it was worth a try Oct 17 14:46:57 mastro: Definitely... Oct 17 14:47:29 Foxandxss: Yeah, so many complex things. You're almost running out of fingers on one hand to count them all! Oct 17 14:49:19 mastro: Would you mind having another look? I updated the gist with the full code... Oct 17 14:49:19 have to reboot it as I had it set to the Intel video Oct 17 14:51:17 kakazza: more if I don't come with a java background :P Oct 17 14:52:22 it is like open a google play service example, you get a lot of dialogs, try to run one, doesn't work, and not getting surprise :P Oct 17 14:55:41 flan3002, I'm not expert in OpenGL nor in Android + OpenGL :) sorry Oct 17 14:57:08 Okay, I'll head over to ##OpenGL then... Oct 17 15:01:28 Question: I was asked to develop an existing ios app to android. The app is simple: it displays a bunch of custom emoji icons and when selected they are copied to the keyboard for use in messages. Oct 17 15:01:33 Is this at all relevant to android? Oct 17 15:01:47 Being that the emoji's are then used exclusively outside of the app Oct 17 15:05:14 any websites to recomend about pre-release or latest Android Games? Oct 17 15:05:33 only android games I play are those on sale from humblebundle Oct 17 15:06:43 humbledundle...any website? Oct 17 15:07:09 ReGiStRaS: https://www.humblebundle.com/ Oct 17 15:07:30 this gradle is very awesome Oct 17 15:08:26 how can I get the list of active fragments started with FragmentPagerAdapter ? Oct 17 15:11:41 only android games I've bought are those that have had desktop versions sold with them on humble bundle... butI n ever tried them on android -.- Oct 17 15:11:46 mobile gaming is silly Oct 17 15:12:09 I prefer games in tablet Oct 17 15:12:25 Zharf: Successful nonetheless... Oct 17 15:12:43 flan3002, successful most definitely doesn't mean a good game ;) Oct 17 15:16:18 What's the best way to create a "Background Thread" that won't effect the UI. I'm animating a view, and loading some data from SQLite at the same time. and when I turn the data load off my animation is smooth, but when I turn the data load on, the animation is ugly, even when I use a new thread to load the data up and pass it back on the UI thread. Oct 17 15:17:17 jaynewstrom: What's wrong with AsyncTask? Oct 17 15:17:31 Or the Loader API? Oct 17 15:17:53 I haven't tried using async task yet. But I did myThread.setPriority(Process.THREAD_PRIORITY_BACKGROUND); and that didn't help either Oct 17 15:18:54 You're animating from which thread? Oct 17 15:19:12 Well, i'm pretty sure the only thread you can animate in is the MainThread :p Oct 17 15:19:44 Yeah, but you can post to the UI thread or you can have a giant loop on the UI thread... Oct 17 15:19:46 but i did myThread.setPriority(Process.THREAD_PRIORITY_BACKGROUND); on the background thread loading the SQLite data Oct 17 15:20:04 it uses a Handler.post Oct 17 15:20:11 to post to the UI thread Oct 17 15:20:23 You're populating a ListView? Oct 17 15:20:40 nope, it's a custom control. Oct 17 15:21:52 Anyway, have a try with Loaders: http://developer.android.com/guide/components/loaders.html Oct 17 15:22:29 Then you should profile what specific part takes the longest time. Oct 17 15:23:06 If I don't call the code to load the SQLite data in the animation is butter. Oct 17 15:23:17 Accessing the disk is never fast, I know that Oct 17 15:23:27 especially when you're trying to draw 60 fps Oct 17 15:24:14 So, what animation are you performing? Oct 17 15:25:00 haha, it's a custom animation too. it's actually 2 animations one fading in one fading out. it changes width, height, x, y, and alpha Oct 17 15:25:25 hi, I need to every 2 min to do some work on a service, is it better to use handler is this case ? or AlarmManager Oct 17 15:25:57 So, its in no way related to the loading data? Oct 17 15:26:32 the animation is only shitting when I actually call the code to load the data from SQLite Oct 17 15:26:47 jaynewstrom, too much cpu usage in your thread Oct 17 15:26:59 or you're not actually running on the thread like you think Oct 17 15:27:12 i called thread.start() not thread.run() Oct 17 15:27:39 what's difference between using thread and asynctask Oct 17 15:27:43 Please, don't use Threads for Android-UI related async-stuff. Oct 17 15:28:07 No difference Oct 17 15:28:12 I use AsyncTask to get a webpage, but if the user hits the back button before the http connect timeout my app crashes. is there some way to kill the connect if they hit back or otherwise leave? Oct 17 15:28:16 You just have to handle posting back to the ui thread, etc, yourself Oct 17 15:28:21 oh okay Oct 17 15:28:23 thx Oct 17 15:28:38 just don't ever extend thread Oct 17 15:28:49 pfn: why not? Oct 17 15:29:00 because doing so illustrates a clear lack of understanding of java and OO Oct 17 15:29:10 jaynewstrom: Cause you lose flexibility... Oct 17 15:29:19 implement runnable instead? Oct 17 15:29:50 You could otherwise use an ExecutorService without a lot of changes. You can't submit a thread to it, just runnables... Oct 17 15:30:34 sure Oct 17 15:31:12 and for that matter, depending on circumstances, you might just want to call run() on the current thread yourself, rather than posting it somewhere Oct 17 15:31:38 sure, you can do the same thing with a thread though too Oct 17 15:32:35 with a lot of thread object overhead Oct 17 15:32:36 sure Oct 17 15:32:55 yeah. but none the less. Oct 17 15:33:17 once again, fundamental lack of experience with java Oct 17 15:33:21 doing so is wrong Oct 17 15:33:26 for numerous reasons already provided Oct 17 15:34:00 i don't think that's the case. There are definitely use cases for both Oct 17 15:34:22 i am reading here, if i start a service and the device go to sleep mode the service will stop running ? Oct 17 15:35:24 unless you grab a wakelock Oct 17 15:36:22 humm.. ok, i need to every 2 min send a GPS location, how can I accomplish this ? Oct 17 15:36:37 daivyk lots of ways. Oct 17 15:36:37 grab a wakelock Oct 17 15:37:00 hellow guys Oct 17 15:37:13 is it better to use AlarmManager ? grab a wakelock and send the gps location ? Oct 17 15:37:37 alarm manager = nice method Oct 17 15:37:48 make sure you handle device restart, because it will get wiped out. Oct 17 15:38:28 tonyMontana9099: ok, on_boot_receiver Oct 17 15:38:35 jaynewstrom, there is absolutely 0 use case to ever extend Thread Oct 17 15:38:49 unless you are porting a jvm to a new platform Oct 17 15:39:06 I am having issues using open / close db.. getting db closed exception Oct 17 15:43:35 TIL you can't even initialise private member variables in custom views (such as Typefaces) otherwise it won't render in the Graphical Layout view in Eclipse. Oct 17 15:43:45 Outside of constructor that is obv. Oct 17 15:44:03 I mean inline like private Typeface mTypeface = Typeface.from....etc Oct 17 15:44:58 nexus7 is x86 or arm? Oct 17 15:45:05 arm Oct 17 15:45:14 thanks Oct 17 15:47:12 you know how sometimes the phone thinks there is network but you can't connect anywhere? how can I simulate that for testing? Oct 17 15:48:23 zmuser3 network for calls or 3g ? Oct 17 15:48:31 3g Oct 17 15:48:43 check for internet connection and not connectivity. Oct 17 15:48:48 ping somewhere... Oct 17 15:49:12 well I am going to put a timeout on a connect but I want to test it Oct 17 15:49:28 new Socket().connect(new InetSocketAddress("google.com", 80), 5000); Oct 17 15:50:12 oh... kinda hard to emulate that i guess... Oct 17 15:50:19 and now to test that I need to somehow make the phone or emulator think net is up but not reachable Oct 17 15:50:26 you can take the internet wire off your router... Oct 17 15:50:38 but keep it on... Oct 17 15:50:41 ah ok Oct 17 15:50:50 device will think there is connectivy.. but there wont be any ping ... Oct 17 15:50:54 right Oct 17 15:51:02 try it... Oct 17 15:51:09 its way different in ios though.. Oct 17 15:51:12 I will put a firewall rule to block the site it is trying to connect to Oct 17 15:51:17 :) Oct 17 15:51:45 thats another alternative too Oct 17 15:51:52 your suggestion gave me that idea Oct 17 15:52:00 thanks Oct 17 15:52:20 tonyMontana9099 i didn't think you were supposed to call SQLiteDatabase.close() Oct 17 15:52:55 seand what do you mean ? Oct 17 15:53:04 why should you need to ever call that? Oct 17 15:53:16 i donno, i shouldnt ? Oct 17 15:53:25 if I do not... I get an error in logcat, but the app does not terminate. Oct 17 15:53:31 what error Oct 17 15:53:39 db not closed explicitely Oct 17 15:53:44 but the app does not crash.. Oct 17 15:53:52 however, like this the app does crash.. because of null pointer Oct 17 15:54:18 where are you calling close()? i would think if anywhere it would be in onDestroy Oct 17 15:54:56 well, what if a thread runs it and the db should operate after the activity is destroy in some cases. Oct 17 15:55:13 true Oct 17 15:55:34 http://stackoverflow.com/questions/4940308/im-getting-a-database-object-not-closed-exception-in-sqlite-android-but-im/4940343#4940343 Oct 17 15:55:41 close() was never explicitly called on database - app doesn't crash Oct 17 15:55:47 so I shouldnt care if I get the warning ? Oct 17 15:55:50 are you closing all your cursors? Oct 17 15:56:08 yes, the cursors do get closed inside the DbHelper class methods, so no worries there Oct 17 15:57:55 too bad you can't access the destructor for your SQLiteOpenHelper subclass, that would probably be the ideal place Oct 17 15:58:21 is there a website that can help me with picking a colourscheme for my app? Oct 17 15:58:43 navetz: How about https://kuler.adobe.com/create/color-wheel/ ? Oct 17 15:59:03 flan3002: ah cool Oct 17 15:59:08 They also offer numerous color schemes to choose from. Oct 17 15:59:22 tonyMontana9099 you are using a singleton SQLiteOpenHelper subclass, right? Oct 17 15:59:40 my design skills are very limited so this should help Oct 17 16:05:01 thanks for the link flan3002 Oct 17 16:08:15 Hmm, same people on now than was earlier Oct 17 16:08:25 Was going to ask one last time if anybody knew anything about my problem... Oct 17 16:08:34 I don't want to accept defeat! Oct 17 16:08:39 what problem Oct 17 16:08:46 The setError problem Oct 17 16:09:12 oh, the alignment issue? Oct 17 16:09:22 The whole issue really Oct 17 16:09:29 The alignment issue is deleted. Oct 17 16:09:38 Just any possible solution. Oct 17 16:09:50 Or at least an explanation as to why it is done this way Oct 17 16:10:07 Anthaas no idea about typefaces at all mate :( sorry. try SO. Oct 17 16:10:14 Its not typefaces mate Oct 17 16:10:17 the solution is as pfn said yesterday, override setError, provide your own Editor subclass with overridden methods Oct 17 16:10:22 That was a small issue with Eclipse Oct 17 16:10:32 Yeah - that is not simple at all Oct 17 16:10:49 I dont understand the maths doing on Oct 17 16:10:54 Well, I do Oct 17 16:10:57 Anthaas: Yeah, I ran into that problem as well... Nasty thing! Oct 17 16:11:01 you don't need to provide an editor subclass Oct 17 16:11:02 But wouldnt know how to adjust it Oct 17 16:11:07 just do the same thing as showError() in the editor Oct 17 16:11:21 flan3002: Such an awkward issue! Oct 17 16:11:29 pfn: Yeah - thats what I tried to do Oct 17 16:11:47 pfn: But they link to about 6 different methods, at least 2 of which I find it difficult to follow Oct 17 16:11:55 I did a copy paste job, but the alignment was wayyyy off Oct 17 16:11:58 get better at following :p Oct 17 16:12:09 :P Oct 17 16:12:11 maybe you didn't copy all the styles Anthaas? Oct 17 16:12:19 There were no styles to copy Oct 17 16:12:31 Just pass it a textview and a drawable Oct 17 16:12:38 The drawable was a direct copy paste Oct 17 16:12:43 So was the textview actually Oct 17 16:12:51 But it didnt work lol Oct 17 16:13:01 eh? Oct 17 16:13:06 I think the issue was with "chooseSize()" Oct 17 16:13:11 That kept throwing errors Oct 17 16:15:02 It doesnt really seem, on as many web pages as I could view within like 6 hours last night/this morning, that anybody has a working solution. Oct 17 16:15:19 so fix the errors Oct 17 16:15:21 and don't blindly copy/paste Oct 17 16:15:25 I dont Oct 17 16:15:29 I already read, and modify Oct 17 16:15:44 Out of habit now because I find that 99% of stuff on SO doesn't work anyway hahaha Oct 17 16:16:09 Working might have been a superfluous to say, what I meant was nobody has a solution, just work arounds Oct 17 16:16:19 i.e. doing it a different way or using a different library etc Oct 17 16:16:52 come on guys, lets not underestimate SO Oct 17 16:16:55 that's because they don't have your spirit Oct 17 16:17:03 Hahah Oct 17 16:17:06 its a nice go to for quick answers and getting insights.. Oct 17 16:17:09 I REALLY want a way to get this to work Oct 17 16:17:16 IRC is more for hardcores :P Oct 17 16:17:21 Its not as good as it used to be Oct 17 16:17:36 Now its full of people saying "please you can look my code and help thank you :-)" Oct 17 16:18:16 tonyMontana9099: Yeah, but you only get the attention of the people who are online. Right now, nobody doing OpenGL on Android seems to pay attention... Oct 17 16:18:20 No discussion as to ways to get to a solution or why things work :/ although you do get the odd hero (who I love) who shows every step in his thought/solution process and posts it. Oct 17 16:18:35 Anthaas well, yes.. Oct 17 16:18:47 Its all fine and well having a solution Oct 17 16:18:50 the thing is, the market emerged.. and everybody is doing it.. so lots of newbies.. Oct 17 16:18:51 But I like to know why it works etc too Oct 17 16:19:00 Anthaas mee too... Oct 17 16:19:11 Which is why, again, I dont want a work around hahaha Oct 17 16:19:20 mainly code in SO is copy pasted without the paster knowing what is a work around... Oct 17 16:19:35 If it means I must go to Android HQ and repeatedly kick the UI team in the shins until it gets fixed then I shall! :D Oct 17 16:19:40 but I have to admit... ppl in here do not answer newbie question sometimes... Oct 17 16:19:47 Im more than happy too Oct 17 16:19:49 Anthaas email romain guy.. Oct 17 16:20:03 he is the demigod of the gui stuff i guess Oct 17 16:20:08 Nah - he isn't going to want to be bombarded by 109832103 people per day asking stupid questions when he has a job to get on with. Oct 17 16:20:31 email him.. you might get a reply.. Oct 17 16:20:34 Imagine the number of developers he gets emails from asking how to do things. Oct 17 16:20:40 i hear he's also leaving/left the android team Oct 17 16:20:45 he left.. Oct 17 16:20:47 Ahhh Oct 17 16:20:50 he's still in google tho Oct 17 16:21:06 hopefully working in that secret lab of theirs Oct 17 16:21:10 Not really his job either then Oct 17 16:21:10 there is a guy on SO named commonsguy... has a book too... answers stuff pretty fast and with details.. Oct 17 16:21:35 yeah, he has office hours too Oct 17 16:21:43 it's helpful when you can't get an answer in here Oct 17 16:21:51 Oh he does? Oct 17 16:22:00 Wait, who are we talkig about Oct 17 16:22:06 yes.. Commons guy Oct 17 16:22:07 mark murphy, commonsware guy Oct 17 16:22:11 Ahhh Oct 17 16:22:15 How do I get hold of him? Oct 17 16:22:23 In Office hours? Oct 17 16:22:29 you get a subscription Oct 17 16:22:31 you need to subscribe Oct 17 16:22:32 http://commonsware.com/ Oct 17 16:22:35 by buying the book Oct 17 16:22:35 Ahhh bollocks haha Oct 17 16:22:41 no no Oct 17 16:22:44 I dont need another book :( Oct 17 16:22:49 Anthaas he really is a humble guy... Oct 17 16:22:56 and the book is realy helpfull.. Oct 17 16:23:06 tonyMontana9099: Agreed! Oct 17 16:23:12 does exactly what you said above... tells u how things work, rather than telling how to make things work. Oct 17 16:23:24 damn i missed office hours this morning Oct 17 16:23:58 I emailed him couple of times... and he replied back in less than a day.. Oct 17 16:24:07 Also a student, so can't really afford to buy this Oct 17 16:24:12 Although it does sound really good. Oct 17 16:24:14 Im impressed. Oct 17 16:24:16 oh i haven't tried emailing him, that's a good idea Oct 17 16:24:22 Anthaas it really is. Oct 17 16:24:38 Anthaas email him and tell him you are a student .. maybe he can give you an offer.. Oct 17 16:24:46 Anthaas why don't you make a post on SO for your question... and just make it detailed with screenshots as to what your current obstacle is Oct 17 16:24:51 i'm sure someone would be able to help Oct 17 16:25:16 It would be his living. I wouldn't want to ask for a discount because of my life choices. That money puts food on his table etc. Oct 17 16:25:44 Anthaas just ask him dude... no need to overanalyze Oct 17 16:25:51 if you never ask, the answer is always no. Oct 17 16:25:51 seand: I did that, no answer... Oct 17 16:26:06 link? Oct 17 16:26:13 Not over analysing man, just don't think its right using my circumstance to get benefits :/ Oct 17 16:26:22 I like to pay my way etc Oct 17 16:26:31 Anthaas totally understandable. Oct 17 16:26:49 what good about commonsguy is that, if he doesnt know it. he tells you he doesnt know it. Oct 17 16:26:57 he doesnt play the I know it all guy. Oct 17 16:27:25 Im assuing it is a digital book? Oct 17 16:27:28 yep Oct 17 16:27:33 it is. Oct 17 16:27:38 He said its over 2,300 pages...wouldnt want that fucker landing on my doorstep hahaha Oct 17 16:27:45 he just published a new version... Oct 17 16:27:54 i highly doubt any fizikal book can be 2300 these days.. Oct 17 16:28:02 he's been merging volumes Oct 17 16:28:06 Anthaas imagine 2300 of pure android wisdom.. Oct 17 16:28:21 which get updated every now and then with new version releases Oct 17 16:28:53 Im trying to think what would be in there that I dont already have access to in the books that I have etc though Oct 17 16:28:59 I really do have to justify the price :/ Oct 17 16:29:40 well... the order of things... go tos etc.. Oct 17 16:30:34 is the TOS publicly available? Oct 17 16:30:53 TOS? Oct 17 16:31:17 yes Oct 17 16:31:18 github Oct 17 16:31:27 they are avaialable without the book too Oct 17 16:31:28 oops meant TOC* Oct 17 16:31:32 table of contents Oct 17 16:31:41 yes i guess via his web Oct 17 16:31:52 it was because of the impressive TOC that i bot it.. Oct 17 16:31:54 Its available on the site you guys linked me Oct 17 16:31:55 cant recall though Oct 17 16:31:57 Also found this though: Light ad-hoc questions-and-answers can be obtained through the CommonsWare Office Hours, Oct 17 16:32:04 Don't think my question qualifies... Oct 17 16:32:10 Anthaas that what we are telling u :P Oct 17 16:32:26 Anthaas you never know ! Oct 17 16:32:38 Anthaas like i said, create a post on Stack Overflow... then when in office hours just paste the link and see what he says Oct 17 16:32:41 If it was, I'd hope it'd have been on SO or somewhere by now! haha Oct 17 16:32:44 hi... I'm trying to size a 2x1 widget properly on a galaxy nexus.. i've even tried to size down the width to 100dp and it's still taking 3x1 cells.. how is that possible? Oct 17 16:32:49 or like tony you could just email him Oct 17 16:32:53 Hmmm Oct 17 16:33:10 I don't know his email address? Oct 17 16:33:16 is there a way i can forcefully crash my app and show the "unfortunately app has crashed" dialog Oct 17 16:33:25 ...why would you want to? Oct 17 16:33:40 Anthaas ill give it to u now Oct 17 16:34:19 because I am using the Thread.setuncaughtexceptionhandler to take debug info but then I would want my app to continute to crash after this Oct 17 16:34:49 It seems unusual to me to WANT the app to crash? Oct 17 16:34:50 Thread.setUncaughtExceptionHandler* Oct 17 16:35:39 ya unusual. but not when you know the reason. currently my app just stays at irresponsive state Oct 17 16:35:52 better to have it crash Oct 17 16:35:55 Would it not be better to address that issue? Oct 17 16:36:19 because I am using the Thread.setUncaughtExceptionHandler to take debug info but then I would want my app to continute to crash after this Oct 17 16:36:58 im adding a feature to log all crash info. need to cause crashes to achieve thsi Oct 17 16:38:23 if i have a text field, how do i write a variable to it? like how do i call its id ? i want to do something like R.id.editText = "test" Oct 17 16:38:53 String s = editText.getText.toString(); Oct 17 16:38:54 TextView textview = (TextView) findViewById(R.id.editText); Oct 17 16:39:00 textview.setText("test"); Oct 17 16:39:41 oh, write a variable... correct Anthaas Oct 17 16:39:46 my bad SuperMiguel Oct 17 16:41:40 tonyMontana9099, you assign values to variables Oct 17 16:41:45 Anthaas: thxs, tonyMontana9099 thanks bro Oct 17 16:42:41 brb Oct 17 16:43:25 poutine ? Oct 17 16:45:44 guys i'm going crazy trying to figure out why my alarm manager is not working I've been debugging it forever. Could someone take a look at the code and tell me if there is a glaring mistake? http://pastebin.com/gA8yXbnx Oct 17 16:45:53 tonyMontana9099 i think what he's pointing out is that wording is not correct, so you shouldn't apologize because he wasn't being SuperHelpful with his question Oct 17 16:46:48 line 118 is where the alarm gets set all the time under the tests i'm running Oct 17 16:46:52 navetz: your code is very.... alarming http://www.youtube.com/watch?v=6YMPAH67f4o Oct 17 16:47:15 seand: it's a shitstorm i'm trying to debug right now Oct 17 16:47:30 i was just kidding i haven't even looked at it Oct 17 16:47:42 ah lol Oct 17 16:49:25 oh ok Oct 17 17:00:09 I guess you can't put a toast in a timertask handler. kaboom Oct 17 17:01:14 zmuser3 try using the nameOfClass.this instead of just this if you are doing like that Oct 17 17:01:54 ok Oct 17 17:03:18 any of you guys work with parse? I need to do a query but cant figure out how Oct 17 17:03:41 morning peeps Oct 17 17:05:45 Any OpenGL developer online? Oct 17 17:06:20 no, its night time in opengl Oct 17 17:06:56 I just mean that anyone who develops with OpenGL AND reads this should tell me... Oct 17 17:07:06 I am. Oct 17 17:07:11 i do that OpenGL thing. Oct 17 17:07:22 are you a robot? Oct 17 17:07:30 You mean me? Oct 17 17:08:15 i ... am ... not ... a .... robot. Oct 17 17:08:20 yeah right Oct 17 17:08:22 warning ... will .... robinson Oct 17 17:08:25 :) Oct 17 17:08:39 robots don't fucking sweaqr Oct 17 17:08:45 LMFAO Oct 17 17:08:49 coderroadie: Could you please have a look at this gist (https://gist.github.com/hoeppnerTill/7e5fc4ced5c7d09e7f9e) ? Oct 17 17:09:22 The problem is that when using VertexArray, it draws weird additional geometry... Oct 17 17:10:00 gotcha. thought you were going to say you have a performance problem .... ok. Oct 17 17:11:06 well if you're seeing additional geometery it just means you're not populating vertexArray properly. Oct 17 17:11:20 But I pass the same float[] to them! Oct 17 17:11:34 Is a gridview of animated gif's (using movie) reasonable Oct 17 17:11:51 coderroadie: With VertexBuffer it works as intended... Oct 17 17:11:53 Or is it too expensive to consider Oct 17 17:11:59 @flan3002 ... looking at reference ... just a sec. Oct 17 17:12:46 is it possible to get a bitmap at the dimsions of an imageview that is using it, even if the ImageView's drawable is larger? ie; if the ImageView uses layout_width/height="48dp" and the asset is 128x128..can you still get a bitmap at 48x48? Oct 17 17:13:14 tnzr, look into scaletype Oct 17 17:13:20 BenOrnstin: on it, thanks Oct 17 17:13:35 No problem! Oct 17 17:14:40 flan3002: one thing that will help is to put all of your OpenGL commands in the same function. Oct 17 17:14:51 ... and i mean for the whole application. Oct 17 17:15:06 you might have some wayward OpenGl command being executed. Oct 17 17:15:24 coderroadie: You mean all calls in GLES20? Oct 17 17:15:32 yes. Oct 17 17:15:36 all your gl* calls. Oct 17 17:15:42 other than that ... Oct 17 17:16:33 If you need more information, tell me! Oct 17 17:17:27 try it with glVertexAttribPointer Oct 17 17:17:36 http://www.learnopengles.com/android-lesson-seven-an-introduction-to-vertex-buffer-objects-vbos/ Oct 17 17:20:15 you just have to play around with it. Nothing obvious is jumping out at me at the moment. Oct 17 17:22:46 Did you see http://developer.android.com/training/graphics/opengl/shapes.html ? Oct 17 17:23:55 Hm, I'm trying the first page right now... Oct 17 17:24:59 it's using GLES20.glDrawArrays .... that's the only major difference I see between what you have and what the example has. Oct 17 17:28:13 coderroadie: Could it have to do with a missing glDisableVertexAttribArray? Oct 17 17:32:01 Once an thread is stopped by interrupt(), does the JVM stop keeping track of it and at the same time drop any reference to the thread? Oct 17 17:38:29 I am trying to migrate a project from eclipse to android studio … but when I start it on my andro vm it gives me a "java.lang.NoClassDefFoundError: com.google.android.gms.common.GooglePlayServicesUtil" Oct 17 17:38:53 I am right assuming this comes from not having a support library? Oct 17 17:39:24 (which I definitely have) Oct 17 17:48:42 hi Oct 17 17:49:23 jan1337z: why would an error come from not having something you have? that would be impossible Oct 17 17:49:26 how to achieve "Phone" and "Email" group labels for text inputs like here: http://developer.android.com/design/media/text_input_typesandtypedown.png Oct 17 17:49:53 xrq propably my gradle is not set up right but I doubt that Oct 17 17:49:59 or what is its name Oct 17 17:50:44 jan1337z: it is unable to find that class definition, you need to troubleshoot and find what reason Oct 17 17:51:18 what would be your first step? Oct 17 17:59:38 SuperMiguel: Can you do basic PHP and MySQL? Oct 17 18:15:21 hi all Oct 17 18:15:49 is there a way to make the soft keyboard show the suggestion bar all the time, not just when there is text entered in an EditText? Oct 17 18:17:07 even if there is not a single letter inserted ? Oct 17 18:18:46 correct Oct 17 18:20:35 well, I have never tried it. But i assume it might Oct 17 18:20:43 what are you using ? autocomplete textview ? Oct 17 18:21:16 The stock keyboard does that already Oct 17 18:21:49 So I'd imagine it's up to the keyboard how it handles it Oct 17 18:22:55 romainguy: Would you have a look at my vertex array binding code? I haven't yet found the reason, why it does draw additional geometry, compared to my vertex buffer objects, when passed identical arrays. Oct 17 18:24:06 The gist is located at https://gist.github.com/hoeppnerTill/7e5fc4ced5c7d09e7f9e Oct 17 18:24:12 flan3002 the chances of reply for that are around 0.0000001%. but kudos for trying. Oct 17 18:24:44 flan3002: romainguy is no longer in android team :P Oct 17 18:25:02 gdrc: So what, he has a ton of experience (or more)... Oct 17 18:25:02 yep. he isnt. move b4 two weeks. Oct 17 18:25:10 but it doesnt mean he forgot all android :P Oct 17 18:25:20 flan3002: just kidding Oct 17 18:25:40 flan3002 he prolly gets around 3424 questions per day. Oct 17 18:25:43 What does he join this channel for? Surely not asking questions... Oct 17 18:26:04 for the same reason Dr. House does clinic hours. Oct 17 18:26:16 lol Oct 17 18:26:18 flan3002: maybe he forgot to remove the join here Oct 17 18:26:31 was he active anyway ? Oct 17 18:26:40 gdrc: Possible... Oct 17 18:26:44 i mean, did he talk to you guys ? you know, give and take ideas etc.. Oct 17 18:26:53 tonyMontana9099: wtf is b4? Oct 17 18:27:07 for? Oct 17 18:27:52 b4 = before Oct 17 18:28:22 oh ok cuz I googled that and I get: Google calls its SDN network "B4." Oct 17 18:28:30 come on hahahahahhaa Oct 17 18:28:45 b4 and ftr Oct 17 18:29:02 sorry I'm not native english :P Oct 17 18:29:09 im not either :P Oct 17 18:29:26 you can tell because "move before two weeks" isn't proper english :P Oct 17 18:29:53 Hello everyone, do you know where (on the android filesystem), an application's resources (like xmls, assets etc.) are decompressed ? Oct 17 18:29:53 I always hated this sms speech. Costs more time figuring out what it means, than is saved typing it... Oct 17 18:29:56 ok so I can say I just chat in tech channels Oct 17 18:31:20 yep. i missed the d seand Oct 17 18:31:25 moved* Oct 17 18:31:55 still not sure what that means Oct 17 18:32:20 moved out of the team before 2 weeks. Oct 17 18:32:27 @romainguy Are you there? I have a second about a specific part of TextViews which has been bugging me and a few others on here for a little while now. Oct 17 18:32:38 2 weeks ago? Oct 17 18:32:44 yeah i guess Oct 17 18:32:46 I dont think I did his name right to alert him :/ Oct 17 18:33:18 Anthaas most irc clients will highlight when your name is said in chat Oct 17 18:33:22 you don't need to prepend @ to it Oct 17 18:33:26 Even with the @? Oct 17 18:33:32 Or should I rewrite without it? Oct 17 18:33:40 not sure, try it with mine Oct 17 18:33:43 @seand Oct 17 18:33:44 seand Oct 17 18:33:48 yea both highlight Oct 17 18:33:50 http://androidcommunity.com/android-engineer-romain-guy-leaving-team-but-not-google-20131004/ Oct 17 18:33:52 cool Oct 17 18:34:06 they wont highlight with me on mirc Oct 17 18:34:18 tonyMontana9099 i can tell you how to set that up Oct 17 18:34:22 I've only ever had help from Romain once before and he was quite patient with me which was nice. Oct 17 18:34:36 seand please do Oct 17 18:34:41 Anthaas you had ? nice Oct 17 18:34:50 Tools > Address Book Oct 17 18:34:55 go to the Highlight tab Oct 17 18:35:13 click add, type $me as the text Oct 17 18:35:17 In this channel. I think he was explaining the difference between requestLayout() and forceLayout() to me, there was another one too, and he explain that I shouldn't really be using forceLayout(). Oct 17 18:35:25 and set however you want to be notified for the highlight Oct 17 18:35:37 done Oct 17 18:35:40 please send me my name Oct 17 18:35:42 tonyMontana9099 Oct 17 18:35:47 done !!! thanks matey ! Oct 17 18:35:51 sure Oct 17 18:35:52 Anthaas thats nice Oct 17 18:36:03 usually such ppl at his position get cocky and stuff Oct 17 18:36:08 and do not waste time.. Oct 17 18:36:14 glad to hear he is humble Oct 17 18:36:15 flan3002: sure I can take a look but it's GL ES, so I can't promise I can figure out what's wrong :) Oct 17 18:36:45 tonyMontana9099: It was because I had told someone to use force, and he explained that I was wrong, but rather than say I was wrong, he explained it. Oct 17 18:36:59 romainguy: Do you have time for a quickish question from me? Oct 17 18:37:06 romainguy: Thanks a lot! Oct 17 18:37:32 tonyMontana9099: Sometimes those 0.0000001% are enough... Oct 17 18:37:44 flan3002 haahaha, yep, indeed they are ! Oct 17 18:37:52 ima tweet that ! Oct 17 18:38:00 omg miracles do happen Oct 17 18:40:13 anywas guys, heads gonna bam infromt of screen forever. Oct 17 18:40:21 would go to a coffeeshop and read a bit. laterz Oct 17 18:41:13 Hello, I want to create a custom view that set it's size according to it's content, lets say that at some point i know my view needs to be 100px width, should i just set it's size? do i need to invalidate? how does onMesure() comes into play here? Oct 17 18:41:35 Anthaas: sure shoot Oct 17 18:41:39 viran: I think thats where Paint comes into it Oct 17 18:42:43 romainguy: Thanks. Im looking to change the setError PopupWindow layout, or specifically the colour, I can't find any way of doing this? Is this not possible intentionally? Or is there a way to do it that Im missing. I was told to look for the errorMessageBackground style but apparently it is private to TextView? Oct 17 18:43:39 romainguy: I think it is possible to change the compound drawable with intrinsic bounds, but not the popupwindow that comes with it? Oct 17 18:44:11 I don't think you can modify the error popup, maybe through a theme Oct 17 18:44:22 but you'd be able to change only the background 9patch Oct 17 18:45:30 romainguy: That is fine, because with that, I can change the colour (from red and black to blue and darker blue to fit with the colour palette of my application). As it stands the colour of the error popup stands out awfully :( Would you happen to know the style I'd have to change? I am using Theme.Holo.Light at the moment. Oct 17 18:46:09 romainguy: Oh, I misinterpreted what you said. So, there are a few backgrounds depending on my theme, and I have to go with one of those? Oct 17 18:47:39 romainguy: Have you had a look at it? Do you need more information? Oct 17 18:52:34 hey all, have a noob question Oct 17 18:53:39 flan3002: I don't see anything obvious Oct 17 18:55:03 it's about intents in AndroidManifest; our android app integrates a few different 3rd-party classes, 2 of which want to have the same intents (main & launcher); how can we get these libs to work without having 2 icons for our app? Oct 17 18:55:24 Can I send someone a screen shot some how to get their opinion on this popupwindow issue? Oct 17 18:55:31 I think its really bad - others might not Oct 17 18:55:41 Anthaas: why Paint? Oct 17 18:55:43 I want the UI as clean as possible though so I want a brutal opinion Oct 17 18:55:46 WogerWabbit: just remove the intentfilter... Oct 17 18:55:59 but then 3rd party lib doesn't work Oct 17 18:56:03 Anthaas: go on Oct 17 18:56:15 viran: Use can use an Object's Paint variable to get the width of how much of the screen it needs. AutoResizeTextViews are implemented like this Oct 17 18:56:20 flan3002: Ok two secs Oct 17 18:56:24 flan3002: Oct 17 18:56:37 WogerWabbit: "doesn't work" is not a good description :P Oct 17 18:57:20 Anthaas: You could just upload it somewhere so we all could have a look... Oct 17 18:57:36 Thats what Im going to do. Oct 17 18:58:55 WogerWabbit - sounds like your third party library is from another application ... true? Oct 17 18:59:17 romainguy: If it was obvious, I wouldn't have asked... Oct 17 18:59:58 Is Imgur within the accepted places to host images? Oct 17 19:00:27 Or is there perhaps somewhere better? Oct 17 19:01:33 Anthaas: I don't see a reason why it shouldn't be... You could also use http://postimage.org/ Oct 17 19:02:35 http://s7.postimg.org/3uadd04rf/device_2013_10_17_195826.png Oct 17 19:02:57 See what I mean about how badly the red stands out? Oct 17 19:03:10 and the black Oct 17 19:04:05 flan3002: well lib with the commented out intent is supposed to launch another app and it doesn't if the intents are commented out. Oct 17 19:05:36 I'm trying to dissect this code, from a stack overflow question. I understand everything except for where the `myPaint` variable comes from. Can anyone explain/assist? Thanks http://stackoverflow.com/questions/16813171/draw-chat-bubble-android Oct 17 19:05:36 Anthaas: Sure, it seems a little aggressive (white-blue vs black-red), but I think to alert people its okay. I mean: You want to get their attention, right? Oct 17 19:06:13 flan3002: Of course, but my argument is that blue and a slightly darker blue, or even white and blue would do the same in that case just as well Oct 17 19:07:10 I just think the red and black is too much Oct 17 19:07:38 coderroadie: sorry, didn't understand youru question… it's a 3rd party jar / class that we're embedding to give us extra functionality. Oct 17 19:08:07 Anthaas: Yep, definitely. If you CAN change it, do that. Just not plank white... But it's no showstopper, as most users shouldn't get to see it... Oct 17 19:08:22 flan3002: http://www.androidviews.net/2012/11/android-appmsg-crouton/ - This is my alternative approach - but it can be blue rather than the colours shown. Oct 17 19:08:38 It kind of fades in and out, like a toast, but a more aesthetically pleasing toast. Oct 17 19:09:08 If you search "Android-AppMsg" on Google Play, there is a sample app for it. Oct 17 19:09:10 Yeah, I know Crouton... Oct 17 19:09:16 Is it any good? Oct 17 19:10:25 romainguy: http://s7.postimg.org/3uadd04rf/device_2013_10_17_195826.png This is the application that I am developing - you will see what I mean about the colours and the need to customise them. Oct 17 19:10:40 I know you probably aren't interested now, but I figured I'd just show you what I mean more visually... Oct 17 19:11:41 flan3002: did the details help? Oct 17 19:11:51 flan3002: Is Crouton any good? Oct 17 19:11:57 cool, MS pushed a RDP client for android https://play.google.com/store/apps/details?id=com.microsoft.rdc.android Oct 17 19:12:31 g00s: They kind of had to. Hahaha. Oct 17 19:12:36 Anthaas: Just don't use the error view Oct 17 19:12:42 Anthaas: Crouton will be a viable/beautiful alternative if you insert it into the layout. But I'd still go with setError if you can change the background somehow... Oct 17 19:12:47 Disable the login button Oct 17 19:12:56 g00s: awesome Oct 17 19:13:45 SimonVT: You mean just call setCompoundDrawableWithIntrinsicBounds(l,t,r,b)? I like the idea of being able to give some feedback as to what the error is :/ Oct 17 19:13:45 WogerWabbit: Not really. Is is possible to give the exact manifest part? Oct 17 19:14:06 flan3002: sure, but it's the common main and launcher tags Oct 17 19:14:29 What library are you wanting to incorporate? Oct 17 19:14:37 Anthaas: I think it's been established that to log in you usually need a username and a password Oct 17 19:14:55 flan3002: Oct 17 19:15:05 2 libs have the same Oct 17 19:15:07 You can just disable the login button until the user has entered a username and a password Oct 17 19:15:09 flan3002: it's a custom lib Oct 17 19:15:12 SimonVT: Indeed, but for example if the server returns that the username doesn't exist - I would to be able to explain that to the user in a clean way. Oct 17 19:15:30 WogerWabbit: What does the "custom lib" do? Oct 17 19:15:50 flan3002: it does a few specific checks and opens another app Oct 17 19:15:56 I'm trying to dissect this code, from a stack overflow question. I understand everything except for where the `myPaint` variable comes from. Can anyone explain/assist? Thanks http://stackoverflow.com/questions/16813171/draw-chat-bubble-android Oct 17 19:16:05 WogerWabbit: if you have multiple libraries that expect to catch a MAIN and LAUNCHER intent then it indicates the third party library might actually be an application. Oct 17 19:16:26 Try to set up an intent filter in the manifest that filters for some other intent. Oct 17 19:16:35 coderroadie: no, but it goes to another app and returns to our app Oct 17 19:16:44 eghdk: myPaint? Oct 17 19:16:55 gotcha. Oct 17 19:17:32 if you're opening another app, then typically you wouldn't hide the other icon. Oct 17 19:19:19 no the 2nd icon is our app… when you have 2 launcher entries in 1 app's manifest it creates 2 icons Oct 17 19:19:50 coderroadie: Oct 17 19:20:22 seand: Yeah, I don't know where he is setting myPaint Oct 17 19:20:35 eghdk i don't see the myPaint variable Oct 17 19:20:48 Sorry! myPath Oct 17 19:20:53 Sorry about that! Oct 17 19:21:44 WogerWabbit: gotcha. well if you know what intent the other library expect to catch then just use an intent filter with that intent's name. Oct 17 19:21:51 eghdk: maybe this code snippet will help. it defines a myPath var: http://stackoverflow.com/questions/11602801/accessing-the-members-of-a-simple-class-in-android Oct 17 19:21:52 don't use MAIN and LAUNCHER. Oct 17 19:22:24 coderroadie: sorry we're noobs, what would another filter be if the lib is expecting main & launcher? Oct 17 19:24:01 seand: "Pt can't be resolved as a type" Oct 17 19:24:26 the code snippet defines a Pt class too Oct 17 19:24:42 you could just use Point, in the std java library Oct 17 19:24:43 Sorry, I'm still really new to this and java and oop, but the last piece of my project is to draw a chat bubble programatically. Oct 17 19:24:54 eghdk: just use this instead: http://docs.oracle.com/javase/7/docs/api/java/awt/Point.html Oct 17 19:26:00 Hmm… when I typed point into eclipse it let me import point from android.graphics Oct 17 19:27:11 yeah that works too Oct 17 19:27:46 i have a question. I have a HTTP Service which do several posts. It does ~similar posts using an asynctaskexecutor. The Http post class is a Service which get implemented into another class(es) with extends myPostService. The Class has a Post method which adds the stuff to a ThreadPoolExecutor(). Now when the AsyncTasks reaches a Limit of nAsyncs it will stop working. I could increase the Oct 17 19:27:46 value but it will crash with outofmemory. Oct 17 19:28:03 WogerWabbit: see the section called "Action test" http://developer.android.com/guide/components/intents-filters.html Oct 17 19:28:59 I had the idea to store all those Posts into the Database and let the ThreadPoolExecutor get new stuff when it reaches less then 10 similar running asynctasks. This is not really a problem _BUT_. How can i serialize the interface? HttpPost method to post a file looks like that: public void post(final Context _context, HashMap hm, String cmd, File mFile, boolean isImage, Oct 17 19:28:59 final HttpInterface httpInterface); the HttpInterface returns the string to the class when its there Oct 17 19:29:05 eghdk: although you may want to use a 9 patch image for the chat bubble, as this answer says: http://stackoverflow.com/a/16813417 Oct 17 19:29:54 is there something like defining an ID which will be submitted to the AsyncTask and gets back to the class when it has been executed? (like a broadcast)? Oct 17 19:30:21 eghdk: i think the method you're trying (painting it yourself) won't scale, or it will be more effort to scale it correctly Oct 17 19:30:37 eghdk: have you seen this? http://stackoverflow.com/questions/9399612/create-a-chat-bubble-in-android Oct 17 19:31:19 im looking something like .. keeping the service class alive until a notify has been received for example Oct 17 19:31:53 coderroadie: sorry, it's not clear to us what you're asking. we already have an action tag for the intent and it is apparently the one that the lib needs. Oct 17 19:32:07 hmmmm. Oct 17 19:32:25 so - it should work. the other activity should start then. Oct 17 19:33:03 coderroadie: that's the issue, if there are 2 acitivties with those same intents, then our app has 2 icons Oct 17 19:33:26 seand: I need to be able to change the color on the fly. So a 9patch wont suffice. Oct 17 19:33:39 WogerWabbit: just to clarify - are you trying to start another activity or a different application? Oct 17 19:33:47 sounds like you're starting another activity? Oct 17 19:33:54 we pass something from our app to another app and back Oct 17 19:34:02 coderroadie: Oct 17 19:34:10 if it's one app to another then you're going to have two icons. Oct 17 19:34:38 on some android phones the user can hide an app's icon in the application manager. Oct 17 19:34:44 eghdk: i remember you saying something about that in the commonsware chat the other day Oct 17 19:35:27 eghdk: and you said you needed more than like just a dozen different colors, right? Oct 17 19:35:42 we have to have duplicate icons of our app for every app we want to pass data to? Oct 17 19:35:52 that can't be right, if so, what moron designed this? Oct 17 19:35:58 coderroadie: Oct 17 19:36:54 seand: Yeah! Oct 17 19:37:12 coderroadie: sorry, just find Android so obtuse sometimes Oct 17 19:37:41 eghdk: hmm, that's unfortunate. hopefully sizing the bubble won't be too much of an issue Oct 17 19:37:57 seand: I can't even get a bubble to show though =( Oct 17 19:38:09 like no one ever there thought an app would like to interface with more than 1 other lib and NOT have multiple app icons (making a terrible UX experience for the user… why 2? which one is the right one? they don't know. etc.) Oct 17 19:39:15 if I have a listview that is displaying a list of songs but I want to divide the songs by album and have a bigger list item with the album artwork and such in between the songs how should i go about doing htat? Oct 17 19:58:35 setViewCount() getViewType() Oct 17 20:00:57 * method names may vary Oct 17 20:01:02 :) Oct 17 20:02:45 seand: I got it to paint! Oh man this is AWESOME. Oct 17 20:02:52 nice! Oct 17 20:02:58 birbeck, if the the row that i want to be different is dynamic how should I send it to the adapter from the listfragment? Oct 17 20:03:40 One question I have though is that every single corner is rounded. Any idea on how to choose which ones get rounded? Not sure if you know too much about paint seand Oct 17 20:03:44 so my list fragment is implementing a loader which loads the songs by a specific artitst. with that data I want to order by album and then let the adapter know where to style the album headings Oct 17 20:04:03 sorry eghdk, i don't have any experience with painting stuff Oct 17 20:05:02 Alright, thanks. If anyone knows how to round corners with paint… let me know. Erm… actually. All of my points are rounded. I only want to round 4 out of 7 points... Oct 17 20:06:38 hello people Oct 17 20:08:05 tab1293: your song cursor has the ablum name, if the ablum name is not the same as the previous item, display the art row Oct 17 20:08:51 is it possible on Android to have an app that interfaces with other apps via intents, but still have only 1 app icon? Oct 17 20:09:47 an app is not required to have an icon Oct 17 20:10:39 and you can programatically remove an icon Oct 17 20:11:42 I started learning android developing a few months ago. I made some simple Apps to get started Oct 17 20:12:35 My first app just gave me random 2D coords Oct 17 20:13:24 My 2nd app was able to calculate distance between 2 given coords Oct 17 20:16:06 birbeck, yes but I have to let the adapter know this info and set the getViewType() accordingly to the position right? Oct 17 20:18:07 Anyway, I added new options to my first app, making it to inflate a custom 2nd layout (to get started with multiple layout apps) Oct 17 20:19:25 The 2nd layout is smaller, but I want it to inflate in the center of the screen. How can I do that? Oct 17 20:20:38 I achieved to make it inflate, but aligned to the top-left corner Oct 17 20:25:16 Can anyone give me a summary of how the WAKE keyword in keyboard layout files is processed? Does Android use this to tell the SOC whether the key should wake up the device? Or does the SOC ask Android when the key is pressed if it should wake up the device? Oct 17 20:25:18 I would like to have several ToggleButtons with a drawableBottom associated with it that has state (I'm trying for a similar effect to the toggle buttons for things like wifi state in the notificationsDrawer on Samsung devices). I can't, however, figure out how to style a drawableBottom component. Any ideas? Oct 17 20:25:22 anyone developing on linux? Oct 17 20:25:27 or C, none of the above Oct 17 20:29:20 gdrc, I'm on Linux, Ubuntu 13.04 64bit Oct 17 20:29:35 do you have a nexus 7? Oct 17 20:30:05 no Oct 17 20:30:10 Galaxy Nexus Oct 17 20:31:29 romainguy can you recommend a vector drawing program i can use for app icons on mac? i know you like pixelmator which has some vector, but not enough (need radial clones, etc). Ps is too expensive. inkscape seems dead on mac. Anything like Sketch ? Oct 17 20:31:56 grdc, are you having problems connecting adb to the nexus 7? Oct 17 20:32:07 (but sketch didn't have any automation abilities) Oct 17 20:32:27 g00s: oh no mac for inkscape? Oct 17 20:32:28 too bad Oct 17 20:32:32 I love inkscape. Oct 17 20:32:42 XXCoder they haven't put a release out in a few years Oct 17 20:32:47 nobody is really working on it Oct 17 20:32:49 :( Oct 17 20:33:08 is there a mac wine? Oct 17 20:33:30 i could try linux in vbox, but yuck Oct 17 20:33:58 maybe like xfce or lxde Oct 17 20:34:02 can somebody explain the getView() function on an adapter? If you do a switch statement on the position parameter will that set a certain view given the index of the row? Oct 17 20:34:05 http://sourceforge.net/projects/darwine/ Oct 17 20:34:09 darwin wine Oct 17 20:34:22 i never got wine running well Oct 17 20:34:23 last update 2 months ago Oct 17 20:34:38 farkerhaiku: yeah, I see my nexus 7 as offline Oct 17 20:34:59 inkscape is most stable on linux; i'd use linux vm; not win emu layer for a linux app :D Oct 17 20:35:00 maybe is becouse of using ubuntu in virtualbox Oct 17 20:35:49 gdrc, presumably you've got the 51-android.rules file configured correctly? Oct 17 20:36:02 what's that? Oct 17 20:36:20 gdrc, http://stackoverflow.com/questions/9210152/set-up-device-for-development-no-permissions Oct 17 20:43:23 farkerhaiku: thanks Oct 17 20:43:41 I'm trying to change the imeOption of an EditText while the keyboard is showing. The code runs, but the enter key doesn't change. Oct 17 20:43:52 Is there some way to restart the input connection? Oct 17 20:46:24 Can an Android library get a reference to the ContextWrapper without it being explicitly passed in? Oct 17 20:46:53 can you style a drawable included via drawableBottom to fill_parent such that a 9 patch will stretch to fill the parent container (in this case a ToggleButton)? Oct 17 20:50:56 my guess is "No", but just want to make sure I'm not missing something Oct 17 20:55:27 actually what I really want is to find out the internal storage directory (eg, what ContextWrapper.getFilesDir() returns). is there a trick to finding that out without having a ContextWrapper? Oct 17 20:56:02 Nope Oct 17 20:56:56 ok, so I wonder what most libraries end up doing then .. just having callers pass in a ContextWrapper or the pieces needed from it? Oct 17 20:57:26 Yep :) Oct 17 20:57:53 Or well, just Context Oct 17 20:58:14 ContextWrapper is a subclass of Context Oct 17 20:58:53 ok, thanks. If that's the idiomatic way to do it, then I guess I'll do the same Oct 17 21:01:08 can you replace a fragment from within a fragment? Oct 17 21:30:44 sure why not Oct 17 21:54:05 hey, I'm looking for a bluetooth nfc communicator that I can dev for, would anyone happen to know of some good brands? Oct 17 21:54:13 I found idchamp, but the price seems to be a little high Oct 17 22:07:23 how do you specify Roboto Medium in code? sans-serif-medium doesn't appear to do it Oct 17 22:30:35 hey Oct 17 22:31:07 whats being programmed? Oct 17 22:31:43 consumerism Oct 17 22:31:51 ? Oct 17 22:32:16 i.e. consumers ;) Oct 17 22:54:38 onSelectedDayChange in CalendarView is getting called just from scrolling to look at another month Oct 17 22:54:59 without selecting another day, same date is popping up in my debug toast Oct 17 22:55:29 I guess I can keep track and see if it actually changed Oct 17 22:58:41 are you supposed to just write your own widgets so you can make ones that actually work? Oct 17 22:59:03 you can, if you're using them over and over again its a good idea Oct 17 22:59:30 otherwise, I just write subclasses of ViewGroups and put the functionality in there Oct 17 22:59:47 do fragments inherit its activity's service connections? Oct 17 22:59:47 When I do ParseFacebookUtils.initialize( … ) am I passing in my facebook app id or my parse app id? The docs are unclear. Oct 17 23:02:56 How do I import a jar to my project's classpath using Eclipse? Oct 17 23:04:04 Project -> properties - > JAva Build path -> Add (external) JAr Oct 17 23:04:23 add jar if the jar is in another project in your workspace Oct 17 23:04:32 external if it's a file somewhere else on your system Oct 17 23:07:47 NZSmartie: thank you Oct 17 23:07:52 You're welcome Oct 17 23:14:32 hey - it's Friday in Europe. Oct 17 23:16:06 it's friday in many places Oct 17 23:16:30 SearchView is clearing when I submit a search... is there a way to keep my search term visible? Oct 17 23:16:30 its always friday in baconland Oct 17 23:17:29 mmm bacon Oct 17 23:18:00 ^^ Oct 17 23:18:03 wanna some Oct 17 23:29:08 JakeWharton: Is it ok to unregister from Otto only in onDestroy instead of onPause or will I die a slow, horrible death if I do so? Oct 17 23:29:20 depends what you're trying to do Oct 17 23:29:22 I want the Activity/Fragment in the background to still receive the events. Oct 17 23:29:24 you can get events when paused Oct 17 23:29:30 if that's fine with you, then go for it Oct 17 23:29:46 It's fine with me, even wanted. It's only in one case. Oct 17 23:29:57 Just wanted to know if that is horribly bad. Oct 17 23:30:25 Also, another one. I'm currently updating a legacy app. It currently has dagger 0.9.1 Oct 17 23:30:38 Will I be bitten by the 1.x stable API when upgrading? Oct 17 23:30:40 old school Oct 17 23:30:45 no Oct 17 23:30:48 just some tweaks to migrate Oct 17 23:31:02 Any hints on what these might be? I use it quite extensively. Oct 17 23:31:12 I don't want it to break randomly. Oct 17 23:34:48 ended the gradle's google I/O 13 video. That is a great great tool indeed Oct 17 23:34:59 they're compile-time Oct 17 23:35:03 it'll break on build Oct 17 23:35:17 Sweet Oct 17 23:36:01 heh, tape is still at 1.1.0, all other libraries are outdated. Oct 17 23:36:42 if a fragment has to use the same service connection that the activity already created, is there a way to pass this connection the fragment or should the fragment just bind again? Oct 17 23:36:59 so i wrote code to turn the camera led on, how do I get it to blink instead? do I have to program that or is there code/feature that already does that? Oct 17 23:42:46 aried3r jakewharton re: that otto conversation i thought onDestroy wasn't guaranteed to be called Oct 17 23:43:07 if it's not the process is dying so it doesn't matter then Oct 17 23:43:44 ah if the process dies who cares about the state of the bus Oct 17 23:43:58 yeap yeap yeap Oct 17 23:44:12 Sesame street? Oct 17 23:45:10 i think that was just 'yep' Oct 17 23:46:17 Or yip Oct 17 23:46:52 yip from those sily aliens Oct 17 23:47:01 other alien is yep yep so on Oct 17 23:47:09 think so anyway Oct 17 23:53:04 One more thing about unregistering otto. I'm not exactly sure when I should call unregister in classes that are POJO. Oct 17 23:53:12 Since I have no @onPause() in that case. Oct 17 23:55:21 When you don't need them anymore Oct 17 23:56:26 Well, at some point they "just go away". aka, whatever is holding a reference to them, doesn't anymore, they get collected etc. Oct 17 23:56:48 yeah that's hard to do Oct 17 23:57:08 we added scopes to otto so you can create a "child" bus for your activity and then in onPause you can unregister everything that was registered in that scope Oct 17 23:58:20 Is that what your ScopedBus Gist ist for? Oct 17 23:58:22 is* Oct 18 00:05:02 hey romainguy can I pm? Oct 18 00:19:53 man, everytime I use an iphone, it feels so smalll Oct 18 00:19:54 puny Oct 18 00:19:56 friggin' puny Oct 18 00:20:12 it gets smaller with each use. ;) Oct 18 00:20:17 you must have used it so many times Oct 18 00:20:18 jk Oct 18 00:20:19 i really with there was a good small android phone Oct 18 00:20:34 shig depends on what dim Oct 18 00:20:41 like iphone sized Oct 18 00:20:44 the galaxy nexus size is pretty great, I like it a lot Oct 18 00:20:45 I know few thats really thin giant phones lol Oct 18 00:20:47 i would love an iphone sized nexus Oct 18 00:21:10 i wouldnt really consider the galaxy nexus "small"[ Oct 18 00:21:26 epic 4g is good size for me Oct 18 00:21:33 if bit thick, with case Oct 18 00:22:02 but then epic 4g is bit hard to use for me without case lol Oct 18 00:22:23 "ships with android 2.3"... Oct 18 00:22:39 yeah I have long moved on lol its retty old device Oct 18 00:22:49 my epic uses cm 10.1 Oct 18 00:23:53 i want a nexus 3 Oct 18 00:27:17 Android Studio, "performing code analysis" for days... Oct 18 00:27:21 I want a NEW keyboard phone Oct 18 00:28:40 i want a flip phone :( Oct 18 00:28:52 feature phone all the way baby! Oct 18 00:29:37 in android room, speaking of flip phones... Oct 18 00:31:24 what's the best way to find out why BitmapFactory.decodeFile() returns null? Oct 18 00:31:44 bank probably wont gappen what with more expensive build Oct 18 00:34:40 Why does my syntax highlighting for Android Studio not work, on 1 file :'( Oct 18 00:35:07 you probably fat fingered the extension or it thinks the file is a different type to what it is Oct 18 00:39:16 now it's highlighting for parts of the file. And everything compiles and works great. Oct 18 00:59:20 ok I want to implement themes where user can choose background color and text color, is there a color picker someone already made that I can just use, or do I gotta build my own color table ? Oct 18 00:59:23 who'se awake? Oct 18 01:00:16 shomooz I would love to know if one existed Oct 18 01:00:26 on of my lwps need it Oct 18 01:00:57 shmooz i think there is a color picker in the Calendar app Oct 18 01:00:57 I made one in java long time ago, maybe I'll have to dig it out ;) Oct 18 01:01:14 I had hack of using 3 slider bars Oct 18 01:01:17 I need a color picker api class Oct 18 01:01:18 r g b thing Oct 18 01:01:19 sucked Oct 18 01:01:39 shmooz i dont think there is one ;) Oct 18 01:01:49 just 3rd party libs Oct 18 01:01:50 XXCoder: that sounds just like what I made :) Oct 18 01:02:10 I'd prefer one like gimp has Oct 18 01:02:15 found one Oct 18 01:02:17 well maybe Oct 18 01:02:22 https://github.com/attenzione/android-ColorPickerPreference Oct 18 01:02:33 cool Oct 18 01:02:55 definitely trying it when I get working on windyflowers again Oct 18 01:03:05 I'll check that out, so hmm, maybe we should work on creating a reusable API Oct 18 01:03:31 yeah I'm not that good I'm afraid Oct 18 01:03:38 i would take a modern nexus one Oct 18 01:03:49 XXCoder: that looks pretty good Oct 18 01:04:02 not my project\ Oct 18 01:04:24 I heard rumors that kitkat will allow you to pick background and foreground colors for all widgets system wide Oct 18 01:05:03 it might clash if I build a custom one but its fun to build Oct 18 01:05:22 interesting Oct 18 01:05:29 I would use black and blacker Oct 18 01:05:36 me too :) Oct 18 01:05:40 super amoled save some power Oct 18 01:05:49 totally agree Oct 18 01:05:59 but its best to give them the choice Oct 18 01:06:01 I love node battle because of that, in least till post-GB broke line drawing :( Oct 18 01:06:24 agreed Oct 18 01:06:31 I like black background cyan text best Oct 18 01:06:43 white text for me Oct 18 01:06:49 if I feel like retro, neon green Oct 18 01:07:31 cyan is magical Oct 18 01:07:40 #00FFFF Oct 18 01:08:13 :) Oct 18 01:09:52 man I love calibre Oct 18 01:10:00 making ebook stuff MUCH easier. Oct 18 01:11:55 calibre is great for converting/managing for sure. [not android-related in any way I guess :) but find it easiest to run my own scripts for making new epubs. essentially, markdown-ish with custom tags to embed media; including video/audio.] Oct 18 01:12:31 NEED HELP: with a runnable thread: http://pastebin.com/rznJza2f, on line 46 I am attempting to stop my call to blinkLight(); but its not working, what am I doing wrong? Oct 18 01:12:45 i've been using haroopad for markdown lately; very nice :) Oct 18 01:24:32 zquad: You don't need a thread for that. Oct 18 01:24:45 go on Oct 18 01:25:38 1 sec ... Oct 18 01:26:06 use Handler.sendMessageDelayed(Message, long). Oct 18 01:26:17 and in the handler loop do something like this: Oct 18 01:27:35 if (isLightOn) turnlightoff() else turnlighton(); sendEmptyMessageDelayed(0, 100); Oct 18 01:27:56 g00s: I'm rather impressed with the speed of the new lappy so far :D Oct 18 01:28:16 p_l what did you get? i must have missed some messages Oct 18 01:28:19 .. of course, you should call Handler.sendEmptyMessageDelayed(0, long) to start it off (instead of sendMessageDelayed(Message, long)) Oct 18 01:28:28 coderroadie, I want to link to blink for 10 seconds Oct 18 01:28:39 g00s: x230 with i5-3210M, 12G of ram, and samsung 840 Pro 256G Oct 18 01:28:56 I finally started installing the OS on it, after loooong suffering about how to setup crypted disk :> Oct 18 01:28:56 what is that ? Oct 18 01:29:02 create a long to not the start time: Oct 18 01:29:07 g00s: thinkpad Oct 18 01:29:11 ooh, nice :) Oct 18 01:29:34 public class testingRunnable() Oct 18 01:29:35 { Oct 18 01:29:37 long start = System.currentTimeMillis(); Oct 18 01:29:38 .... Oct 18 01:29:46 then in the handler: Oct 18 01:30:22 f (isLightOn) turnlightoff() else turnlighton(); if (System.currentTimeMillis() - start > 10000) sendEmptyMessageDelayed(0, 100); Oct 18 01:30:24 coderroadie, you might wanna use pastebin, dudes get annoyed in here :) Oct 18 01:30:33 it's friday in Europe. Oct 18 01:30:39 :-D Oct 18 01:30:44 oh np :) Oct 18 01:30:51 i was gonna post on one line by my IRC client posted three . Oct 18 01:30:59 i hear ya though. Oct 18 01:34:27 bit of an issue getting youtube video to play back in an android virtual device Oct 18 01:41:49 wirehead: videos need to be tested on a real device, maybe genymotion or some third party emu can do it Oct 18 01:43:54 shmooz, this little app plays that video fine on a smartphone, just won't play in the emulator Oct 18 01:44:14 will try a diff. emu Oct 18 01:45:25 wirehead: let me know if it works Oct 18 01:45:26 videos using built-in media framework pretty sure won't play on emulator Oct 18 01:45:47 well, at least the emulator I'm used to actually run instead of crash'n'burn ;) Oct 18 02:41:03 Sup Oct 18 02:41:43 How would one go about protecting against interruption of processing through say AsyncTask? Oct 18 02:42:30 what kind of protection and from what exactly? Oct 18 02:42:50 If you want ensured continuing execution, you can forget about it - Android won't give you realtime priority Oct 18 02:43:12 CAN you protect against your application being interrupted by say an incoming call meanwhile an asynctask is being processed? Oct 18 02:43:19 okay Oct 18 02:43:49 an application needs to be in focus by the user in order for threaded processes like an asynctask to continue executing correct? Oct 18 02:43:50 as for asynctask... it should not be killed unless there's OOM condition Oct 18 02:43:56 nubish: no Oct 18 02:44:16 not for asynctask? Oct 18 02:44:17 ah Oct 18 02:44:17 unless limit of background tasks is exceeded or it's killed explicitly Oct 18 02:44:48 asynctask should continue executing to completion Oct 18 02:44:59 if not, check if you can kick it into service? Oct 18 02:45:01 are you saying no to the app having to be focused by the user in order for asynctask to complete? Oct 18 02:45:08 yes Oct 18 02:45:24 asynctask doesn't need application being in focus Oct 18 02:45:50 i understand the service and that would definitely work, but I am struck at processing of asynctask not having to have the user be focused on the application Oct 18 02:46:35 nubish: asynctask is executed in separate thread from the UI thread. when focus is lost, iirc, only the UI thread is explicitly suspended Oct 18 02:46:40 reason being that the asynctask updates an activity through callbacks on the UI thread Oct 18 02:47:04 oh suspended Oct 18 02:47:06 that makes sense Oct 18 02:47:09 okay Oct 18 02:47:19 thank you p_l Oct 18 02:47:33 nubish: Just in case, I'd suggest you write some test code and check Oct 18 02:47:54 im certain that you are correct Oct 18 02:48:18 anyway, when your application is changing state in any way, you should get a call on apropriate method of Activity/Service Oct 18 02:48:34 hey would it be best to purchase an android-supported tablet for testing your application as opposed to a handset device? Oct 18 02:48:48 or would that be sort of foolish? Oct 18 02:48:52 nubish, you said your task updates an activity onPostExecute? Oct 18 02:49:02 nubish: I'd suggest to get a device that fits the kind of app you want to make Oct 18 02:49:18 i guess handset then Oct 18 02:51:16 onpostexecute() wont be called if asynctask gets cancelled right Oct 18 02:51:51 i was going to say if you're updating the activity via callbacks from asynctask, you should check to make sure the activity still exists first Oct 18 02:51:52 no no seand Oct 18 02:52:28 but if activity is destroyed, the asynctask gets destroyed does it not? Oct 18 02:52:51 p_l can correct me if i'm wrong but if you get a phone call in the middle of an async task and you try to update during a callback it will crash Oct 18 02:53:04 thats what i want to know :P Oct 18 02:53:10 seand: only if the activity was destroyed, afaik Oct 18 02:53:27 he said the asynctask will just get interrupted but im assuming it will continue once the application gains focus Oct 18 02:53:27 oh Oct 18 02:53:48 what does afaik mean? Oct 18 02:53:52 i always see it being used Oct 18 02:53:53 as far as i know Oct 18 02:53:57 OOOOOH Oct 18 02:53:58 nubish: it won't get continued, but unless the activity gets killed... Oct 18 02:53:58 It wont get interrupted, it will keep going as your app is in the background Oct 18 02:54:05 ^ Oct 18 02:54:09 Even if the activity is destroyed it will keep going Oct 18 02:54:18 It's 0354, I might be rubbish at explaining even during the day ;) Oct 18 02:54:19 I see SimonVT Oct 18 02:54:21 And of course leak your activity if it has a reference to it Oct 18 02:54:26 even if its destroyed? Oct 18 02:54:28 dafuq Oct 18 02:54:30 this is strange Oct 18 02:54:31 lets recap Oct 18 02:54:32 (e.g. after orientation changes) Oct 18 02:54:54 nubish: best way would be to decouple the updates in some way from activity, I guess Oct 18 02:54:59 Not strange, it's just a thread on an executor Oct 18 02:55:00 SimonVT would it have a reference to it if it's an inline in the activity class? Oct 18 02:55:31 seand: Yes Oct 18 02:55:38 interesting Oct 18 02:55:50 If your AsyncTask can call methods on your Activity it has a reference to it Oct 18 02:55:51 sorry my rat has me preoccupied Oct 18 02:56:14 Simon and that reference stays until the activity is destroyed? Oct 18 02:56:22 or would it still stay even after restarting of app? Oct 18 02:56:23 No, until the thread is done Oct 18 02:56:26 oh Oct 18 02:56:29 makes sense Oct 18 02:57:01 im an idiot ight now Oct 18 02:57:03 so probably not a big issue for most apps Oct 18 02:57:11 you see, im confusing app with activity Oct 18 02:57:12 <.< Oct 18 02:57:29 of course activities get destroyed Oct 18 02:57:38 way more clear now. Oct 18 02:58:39 living up to your name lol Oct 18 02:58:53 There's nothing special about the android lifecycle.. It's just methods being called by the framework Oct 18 02:58:54 and it will keep going because it processes in a worker thread Oct 18 02:59:02 right Oct 18 02:59:08 callbacks left and right Oct 18 02:59:10 beautiful Oct 18 02:59:16 onDestroy is just the framework letting you know it's not going to use that Activity anymore.. It'll clear references to it Oct 18 02:59:42 i anticipated for the future seand Oct 18 02:59:43 Then you have a thread that still keeps a reference to the Activity.. So it wont be gc'd **** ENDING LOGGING AT Fri Oct 18 02:59:58 2013