**** BEGIN LOGGING AT Wed Aug 21 02:59:59 2013 Aug 21 03:11:29 So I updated my phone to a rom based off of Android 4.3 and now my application is having some really weird memory issues. Anyone else with Android 4.3 on their device that is hitting some weird memory issues? I'm using ashmem with mmap to create memory mirrors Aug 21 03:44:03 Guys, I'm new to android dev and total crap with the xml design. Can someone help me recreate this? http://i.imgur.com/MNEtTQ8.png I can't seem to get thing to layout like that at all. Aug 21 03:44:09 Atm, I have this - http://i.imgur.com/pjtXcKM.jpg Aug 21 03:46:25 Laying things out horizontally just doesnt seem to work Aug 21 03:47:11 desmin88: You want a relativelayout Aug 21 03:47:32 aaaaaaaand im using linear. Aug 21 03:48:28 The entire thing being relative? Or just the layout on the top half of the divider, what would be best Aug 21 03:49:20 desmin88: to be honest, Not a clue.. I'm still learning this myself. :D Aug 21 03:49:25 oh Aug 21 03:50:06 you might be able to get away with a gridlayout. Aug 21 03:50:32 hmm Aug 21 03:50:44 cant use that Aug 21 03:51:04 i want to support sdk 7 at minimum Aug 21 03:52:03 gridlayout is 14 Aug 21 03:52:50 can anybody else weigh in here? Aug 21 04:00:10 anybody got a clue why an @Override 'public void finish(){' is expecting a ; ? // Aug 21 04:06:33 Bleeptech: Proabbly in the code before a ; is missing Aug 21 04:08:55 desmin88: A LinearLayout or a RelativeLayout could work Aug 21 04:09:11 yiati, atm i'm using a linear layout, but have no idea how to do that Aug 21 04:09:45 desmin88: What's the xml look like, and what's your goal Aug 21 04:10:07 Oh I see what your goal is Aug 21 04:10:10 desmin88: I would do this with a relative layout Aug 21 04:10:43 yiati / memoryleak: http://pastie.org/8255457 is my xml, http://i.imgur.com/MNEtTQ8.png is the goal Aug 21 04:11:22 just a warning, been doing this for less than a week, still bad at it. Aug 21 04:13:37 desmin88: One note is that nesting LinearLayout's is slightly bad for performance and it's recommended to use RelativeLayouts if you have to nest, buuut functionality comes first Aug 21 04:14:12 It also may be simpler to have the first inner LinearLayout be a RelativeLayout Aug 21 04:14:32 ok Aug 21 04:14:38 Everything is grouping together to the left as it naturally should without any other guidelines Aug 21 04:14:47 which isn't what you want Aug 21 04:15:01 yeah Aug 21 04:15:17 Their gravity is also top left, and you probably want them centered Aug 21 04:16:06 yeah Aug 21 04:16:37 So you are going to need to specify that 1) They need to be spaced out with android:padding/android:margins, and 2) You need to set the android:gravity of each of the TextView's/ImageView's Aug 21 04:16:50 ok. Aug 21 04:23:29 desmin88: I would change the first LinearLayout to something like http://pastebin.com/6XZhiqVu Aug 21 04:24:37 The first inner one that is Aug 21 04:25:40 thanks Aug 21 04:27:34 and then I can adjust the date textview position using padding and margins? Aug 21 04:28:01 One or the other or both yep Aug 21 04:28:10 sweet, thanks. Aug 21 04:28:29 k001 Aug 21 04:28:53 It's easier to do my JNI tests in the shell than to keep compiling APKs... Aug 21 04:40:08 yiati, I got rid of the second linear layout, simply made it a textview without that parent Aug 21 04:41:00 cool I didn't see that, that simplifies things nicely Aug 21 04:41:38 mhm Aug 21 04:44:01 Is it possible to have a cursor data after closing connetion to database? Aug 21 04:49:55 looking for something similar to DataTable in C# Aug 21 05:01:14 I'm having trouble with the tutorial provided at developer.android.com Aug 21 05:01:59 it tells me I'll 'soon update the hello_world statement to instead have the value you stored from a field' Aug 21 05:02:12 & the tutorial goes through all the java, but then says there you're done Aug 21 05:02:29 & I'm still stuck at INCEPTION Hello World Aug 21 05:03:45 I mean, I try to do the basic language tutorial provided on the website before I go diving into the API & I can't even get an example of how the XML should look? Aug 21 05:03:59 or any mention of how it goes together at all? Aug 21 05:07:42 atari2600a: just to confirm, what page are you on? Aug 21 05:07:54 http://developer.android.com/training/basics/firstapp/starting-activity.html Aug 21 05:08:47 hey guys, I have a moto atrix (the first gen). My problem is I use the phone for robotics projects and it has this 1 feature that blows. When the battery is fully charged, it disconnects the USB, I use it for ethernet so it disconnects my bots. Any help here? Aug 21 05:09:26 install cyanogenmod :P Aug 21 05:10:39 atari2600a, I could, but lets just say my employer wont be up for that ;). I was hoping someone one here would know so userspace fix for it. (ie - no op or something) Aug 21 05:11:33 atari2600a: and the last section of that page deals with getting the data from the Intent and displaying it Aug 21 05:12:44 AND displaying it? Aug 21 05:12:52 but how does that work if it's not represented in the XML? Aug 21 05:13:30 the TextView is in the XML, you set the value from code Aug 21 05:13:31 I'm kinda new to high-level programming, so I'm taking this all in at once (well, the java half at least) Aug 21 05:13:41 textView.setText(message); Aug 21 05:14:10 but I wasn't instructed to change Aug 21 05:14:10 android:text="@string/hello_world" /> Aug 21 05:14:17 & that's what's showing on my screen Aug 21 05:14:29 have you send a message from the first activity? Aug 21 05:14:51 the value in the XML can be overridden later in code Aug 21 05:15:32 but what identify's this particular TextView from any others on the layout? Aug 21 05:16:10 err, that came out wrong Aug 21 05:17:01 maybe Aug 21 05:17:05 actually, I was misreading Aug 21 05:17:21 ? Aug 21 05:17:28 if we go through the code in the onCreate function at the bottom of the page, line-by-line in English... Aug 21 05:17:41 super.onCreate - blah, boring Aug 21 05:18:01 getIntent() - get a handle on the Intent which was used to start this Activity Aug 21 05:18:31 intent.getStringExtra(MainActivity.EXTRA_MESSAGE); - get a copy of the string we stored in the Intent when we created it and used it to start this Activity Aug 21 05:18:45 new TextView(this); - make a new TextView object Aug 21 05:19:11 textView.setTextSize(40); textView.setText(message); - set the size of the TextView, and set the text to the message we retrieved earlier Aug 21 05:19:30 setContentView(textView); - set the content of this Activity's UI to be just that TextView Aug 21 05:19:56 in other words, get the message, create a textview containing that message, display the textview Aug 21 05:20:16 make sense? Aug 21 05:21:44 that activity never uses *any* XML layout Aug 21 05:22:23 I realize I left a function in there Aug 21 05:22:34 the API 11=< check thingy Aug 21 05:22:43 with the action bar Aug 21 05:22:56 took it out & recompiled as that's how it's represented on the page Aug 21 05:26:23 I don't know how, but that fixed it Aug 21 05:26:30 your explanation made it make sense though Aug 21 05:26:39 too bad I'm a little high right now Aug 21 05:26:55 right... Aug 21 05:27:01 it's the kind of thing I'll remember remembering but I won't be able to remember :P Aug 21 05:28:22 I haven't Java programmed since highschool, & even then it wasn't really java, it was a Macromedia Director MX-specific derivative Aug 21 05:28:35 How can i retain the data in Cursor after closing database connection Aug 21 05:28:54 but, the whole 'this' thing which I didn't get earlier definitely reminds me of 'goto the frame' :P Aug 21 05:30:23 hey, so, should I stick with the official tutorials or does anyone here have a recommended guide/tutorial/series/whatever? Aug 21 05:33:40 How can I prevent this? http://gyazo.com/a3f4ad33c85fc9247b52f07fd2721f42 The date has variable length from the class Aug 21 05:37:50 padding or margins wont help Aug 21 05:41:39 nvm Aug 21 05:51:04 so bummed, i had an old logitech 510 from like, 7 years ago that just started to fail. i went to go look at the current logitech stuff, its expensive but shitty Aug 21 05:53:26 so I *just* found the API page with the detailed explanation of everything Aug 21 05:53:31 probably should have started there Aug 21 05:54:43 anyone here a Googlployee? Tell them API Guides should totally go before tutorials Aug 21 05:55:32 what do you guys think of this ui? http://gyazo.com/90195f6cef1ece599f7aa9a99d5e51d2 Aug 21 05:55:33 i almost had an atari 2600, but wound up with a c64 instead Aug 21 05:56:40 desmin88 wasting lots of real estate between those cards Aug 21 05:56:45 terrible, basically Aug 21 05:57:29 c64 has tim follin music yay Aug 21 05:57:30 shhhhh. Aug 21 05:58:01 all I could get my hands on was an atari 800 as I was a kid, & even then it was 30 years old Aug 21 05:58:50 g00s, better? http://gyazo.com/e0195113ec8ffdc55521dc91f0657213 Aug 21 05:58:50 got into 6502 asm, moved to the NES, then I sorta just fell off the map for 7 years Aug 21 05:58:55 & that's BEFORE the pot Aug 21 05:59:28 desmin88 yeah, a blank screen. thats great :) Aug 21 05:59:45 g00s: ultra minimalist. haha try this one http://gyazo.com/f973b6e953a6e2e983c0eddadf63a8a4 Aug 21 06:00:23 desmin88 sorry man, i dont see the point Aug 21 06:00:29 just put it in a list Aug 21 06:00:31 no cards Aug 21 06:00:41 yeah but then that looks boring Aug 21 06:01:17 a plain list? blegh Aug 21 06:01:23 g00s: the mx1100 is really nice Aug 21 06:01:25 add shading to the details parts of the entries Aug 21 06:01:30 well, if you fit more items on the screen, it has better usability which is measurable, rather than "boring" which isn't Aug 21 06:01:51 JesusFreke i'll have to check it out, thanks Aug 21 06:02:02 probably the most comfortable mouse I've tried, except for the evoluent vertical mouse Aug 21 06:02:15 g00s, trying to strike a balance between usability and a little bit of non-boring, hehe. Aug 21 06:02:32 desmin88 its just visual noise :) Aug 21 06:02:43 its like blinking divs in html or something Aug 21 06:02:53 JesusFreke: I recall seeing that in magazines like 10 years ago. Or maybe it was slashdot 5 years ago... Aug 21 06:03:10 atari2600a: 5 years ago, maybe. definitely not 10 Aug 21 06:03:37 It's not part of their current lineup, but you can still get new ones on ebay Aug 21 06:03:42 I fell in love with the logitech trackball mice my grandmother & father would buy Aug 21 06:03:44 atari2600a: (assuming you mean the logitech) Aug 21 06:03:59 atari2600a, what do you mean by shading? Aug 21 06:04:02 I use my mx1100 at home, and an evoluent at work Aug 21 06:04:17 JesusFreke i think i saw that, and it looked comfy - but what the hell is that button behind the scroll wheel, i thought that was very annoying Aug 21 06:04:37 g00s: a plain list is just visual noise, i'll display the data as binary :P Aug 21 06:04:40 desmin88: bg grey on the details, white on the entry name Aug 21 06:04:52 g00s: iirc, I think that's to change the tracking resolution Aug 21 06:04:55 maybe a light yellow on the date? Aug 21 06:05:13 I don't remember for sure. I don't really use the button, obviously :) Aug 21 06:05:14 ill try that out Aug 21 06:05:16 actually, a light blue would go better w/ yellow Aug 21 06:05:37 anyone else here on android-studio? Aug 21 06:05:40 i am. Aug 21 06:05:43 For the evoluent, I actually took some sugru and made 2 little ridges right between my last 3 fingers, on the side of it Aug 21 06:06:09 a perfect fit for my fingers, and makes it easier to pick up and move, when you need to Aug 21 06:06:29 hey, so, how much access can apps have to the mic? Aug 21 06:06:46 record whenever they want i believe. Aug 21 06:07:04 does android provide a library that'll allow me to do threshold cutoffs & whatnot or will I be programming that all in myself? Aug 21 06:07:41 perhaps explaining the concept would help what I need Aug 21 06:08:27 I need an app that can start recording after a sustained threshold-range is met on the mic & cut off once it drops for say 500ms Aug 21 06:09:18 all I culd find was (getRecord?) in the API reference so I figured I'd ask if there's some API-level stuff that can help me or whether I should go hunting for snippets Aug 21 06:10:26 what I'm saying is...I don't want an app that'll record & process the audio for usable data as much as an app that analyzes in realtime with a low sample rate Aug 21 06:11:03 sounds like a good arduino project Aug 21 06:11:15 it's for a game I'm calling HerbSmoker Aug 21 06:11:20 atari2600a: afaik (I haven't done much with audio/mic), you just get the samples from the mic. It's up to you to do whatever you want with them Aug 21 06:11:27 you put the mic up to your mouth, rip, & you go for the high score! Aug 21 06:11:33 g00s: I understand what you mean by visual noise, but I'm not trying to go for a straight data representation, i want some sexyness to it, if you will Aug 21 06:11:48 typical casual-game gamification elements will be at play, as well as advertising Aug 21 06:12:20 I'll also be sure to make it amusing (not just play a bong rip mp3 or something) Aug 21 06:12:29 atari2600a: I would love to see a didgeridoo player give your game a try. Get some circular breathing going on.. ;) Aug 21 06:12:42 desmin88 sexiness is in the eye of the beholder; get feedback on it maybe. and don't get emotionally attached to it ;) Aug 21 06:13:07 that is true Aug 21 06:13:52 JesusFreke: that's when the stoner soundbite says in a frail voice "dude you smoked all my Herb* man!" Aug 21 06:14:18 *I'm not making any actual drug references, just innuendo, to attempt to clear Google Play's 'unlawful' policy Aug 21 06:15:15 I mean, I'm not saying making drug jokes is illegal, I'm just saying emulators have been taken down for less Aug 21 06:16:21 JesusFreke, I don't think this is what you meant, is it? http://gyazo.com/fc6ff02a8d24017c2b43f963b237fbd2 haha Aug 21 06:16:45 JesusFreke i though the expensive apple mouse was the worst, being too flat Aug 21 06:16:52 their touch mouse Aug 21 06:17:57 g00s: heh. never tried one :) Aug 21 06:18:00 g00s: yeah that's what I thought when I saw it too; Apple never EVER seems to take ergonomics into account. Aug 21 06:18:16 desmin88: I have no idea what that link was referring to :) Aug 21 06:18:28 just give me a keyboard that'll let you re-arrange all the keys to Dvorak & I'm good Aug 21 06:18:29 JesusFreke, The shading for the details Aug 21 06:18:46 desmin88: I think you might have the wrong person :) Aug 21 06:19:00 uhh, yes i do. Aug 21 06:19:15 I meant the background on the date should be light blue Aug 21 06:19:34 that doesnt make sense Aug 21 06:20:02 it should look like a coloured-in spreadsheet 2 rows deep, maybe 3 columns wide w/ the bottom row merged Aug 21 06:20:51 like, barely percievable from white but enough that it provides the distinctive contrast Aug 21 06:21:59 like, you know how some editors have it every newline Aug 21 06:22:03 white, grey, white, grey Aug 21 06:22:32 that's how I pictured how it should be in my head, anyways, & apparently describing it is filling everyone's screens Aug 21 06:23:36 im not gonna lie, i can't picture what you mean in my head Aug 21 06:24:12 fuck, let me see if I have libreoffice installed on this chromebook... Aug 21 06:30:05 what's the preferred image uploading service here? Aug 21 06:30:21 ideally one that accepts PNG so I don't have to boot up gimp Aug 21 06:31:18 imgur Aug 21 06:31:20 is my favorite Aug 21 06:31:46 http://postimg.org/image/ksp0r8blb/ Aug 21 06:31:50 too late :P Aug 21 06:32:12 umm Aug 21 06:32:16 all i see is blank Aug 21 06:32:26 yeah Aug 21 06:32:27 weird Aug 21 06:32:32 it shows up like that locally too... Aug 21 06:32:42 ...& I already closed calc... Aug 21 06:33:11 Whats a company like atari doing here? Aug 21 06:34:55 atari2600a, something like this? http://gyazo.com/392a2d73dda71638411281c3260e2418 Aug 21 06:37:02 desmin88: yeah but white on title, 10% grey on details, 10% yellow on date/dot Aug 21 06:37:14 ok Aug 21 06:37:16 you know Aug 21 06:37:22 something your eyes can EASILY adjust to Aug 21 06:38:09 I've never seen someone have so many levels to their nick... Aug 21 06:38:34 i wonder if i put a black outline to my circle.. Aug 21 06:38:37 i can* Aug 21 06:39:46 oh, & once you get the bg coloring done, you can remove the outlines since the only thing that then needs seperation is each entry from other entries Aug 21 06:40:22 what's the dot represent anyways? Aug 21 06:40:35 available, working, away, don't disturb? Aug 21 06:41:14 how close to the date Aug 21 06:41:20 far/close/urgent Aug 21 06:42:26 in not sure if thats the best indicator Aug 21 06:42:29 still playing around with it Aug 21 06:43:21 urgent should be a fast-pulsing white light, maybe with Hz representing how urgent it is relative to the time it's happening? Aug 21 06:43:40 or, you know, something attention-grabbing Aug 21 06:43:52 good idea Aug 21 06:43:57 ill add it to the list :P Aug 21 06:44:48 it's nice to know I've paid my dues to the internet relay chat collective before I go offline tonight Aug 21 06:44:57 lol Aug 21 06:45:00 *collective conciousness Aug 21 06:45:01 thanks for the input Aug 21 06:47:24 Is this too much overdraw? http://gyazo.com/1865c70dbf515ffaf02e61c2d0f4c503 Aug 21 06:47:27 * atari2600a takes a melatonin, rolls .7g into a menthol Aug 21 06:47:54 I do irregular but frequent QA / web-design critique work on mTurk Aug 21 06:48:24 & I've only been denied the $0.70 once & that was my first time, where I went at it like the Angry Web-Designer Nerd Aug 21 06:48:59 so I guess that's probably a career opportunity I should pursue :P Aug 21 07:27:20 So I just figured out my app crashes with at least some non-western countries time/date locales which SimpleDateFormat is unable to parse. Anybody have any pointers/info on how I can get a java Date out of such strings (e.g. "٢١‏/٨‏/٢٠١٣")? Aug 21 07:29:27 what is it? Aug 21 07:29:34 looks like arabic Aug 21 07:30:03 or persian Aug 21 07:30:18 It's a date, probably separated by slashes. Could be arabic, I have no idea really. I just need to know if Android has anything that can parse it, because those strings trigger date parser errors in my app. :-) Aug 21 07:31:35 you'd think this'd be up to the locale stuff to understand if it's letting people enter them like that Aug 21 07:32:43 or it could be a 3rd party keyboard Aug 21 07:33:43 Hm. https://code.google.com/p/android/issues/detail?id=36689 Aug 21 07:33:49 when i move cursor through it appears to be left to right, sort of Aug 21 07:34:30 Well on my phone most labels are right to left, so I guess it's the opposite way of what we're used to here. Aug 21 07:35:06 arabic numbers are written rtl, but text ltr i believe Aug 21 07:35:20 other way around sorry Aug 21 07:35:32 kjeldahl: that looks like date written with arabic or persian numerals Aug 21 07:36:05 and probably SimpleDateFormat can't handle non-ascii numerals Aug 21 07:37:34 arabic numbers are 1,2,3,4,5,6 dude Aug 21 07:37:35 catch the error and politely ask for the date in the other arabic numerals? Aug 21 07:37:36 it's what we use Aug 21 07:37:54 That much I know (now). I get that string from a TimePicker and would like to get a Date instance from it. Aug 21 07:38:02 Xabster: have you considered that how they *look* changed a lot over time? Aug 21 07:38:15 https://en.wikipedia.org/wiki/Arabic_numerals Aug 21 07:38:19 https://en.wikipedia.org/wiki/Eastern_Arabic_numerals Aug 21 07:38:55 it indeed it eastern arabic numerals Aug 21 07:39:18 21/8/2013 Aug 21 07:39:20 .. or more like DatePicker. Aug 21 07:42:12 you could extend DateFormat and override parse() in a way that understands these numerals Aug 21 07:42:45 I just get the string returned from the DatePicker, and try to parse it myself. And failing at that. Aug 21 07:43:51 hmm, Time and DatePicker both have getHours(), getDayOfMonth(), etc.. methods that should handle locale-related stuff Aug 21 07:43:54 why parse string? Aug 21 07:45:00 Yeah, something is fishy in my code. Trying to wrap my head around it now. Aug 21 07:45:40 I'm probably passing the string back and forth one time too many, trying to accomodate users in showing dates formatted to their current locale. That works fine for display, but probably not the other way around. Aug 21 07:46:06 mhm :) Aug 21 07:56:14 Yup, that was pretty much it. Thanks for listening. :-) Aug 21 08:04:24 Hi all, is here somone who uses the picasso library for on of his/her projects? Aug 21 08:39:25 I'm making an app which needs to switch between a light custom theme and a dark custom theme, can I make references to TextAppearance which will switch automatically when the Theme is changed in the Activity onCreate? Aug 21 08:39:42 (and if so, how) Aug 21 09:04:49 Here guys, have a remote image view component that adds an setImageURL method which accepts a remote URL: http://pastebin.com/r9yf6rqh Aug 21 09:09:34 hello, is there a way to make a EditTextPreference display a string after the input? ie, the user enters 180, and 180cm shows up? Aug 21 09:10:00 what would be the best way to move native networking(done by a native c lib) on a background thread? so the main ui doesnt block? Aug 21 09:10:36 stephan48: have a thread to call native functions? Aug 21 09:22:28 what would be the best way a native thread or an android based thread? Aug 21 09:26:56 hello... is there a way to download image from internet and set it as notification icon ? Aug 21 09:37:32 What exactly is the disadvantage of using a ListView in a vertical ScrollView? Aug 21 09:39:30 (and setting the ListView height to a fixed size) Aug 21 09:42:05 I'm trying to define a style for a button which sets its background and TextAppearance, how do I do that? Aug 21 09:43:12 Here is what I have: http://pastebin.com/QqjMTTuA it changes the background the but text remains black. Aug 21 10:52:54 I would like to use Otto for inter-fragment communication. For me is quite clear how it works but I have some doubts for this scenario: let's imagine a classic List-Detail application where the click on a list item should refresh the Detail fragment. On a tablet, where both fragments exist at the same time, Otto would permit to communicate directly from the List fragment to the Detail fragment but on a phone, where I shoul Aug 21 10:52:54 d start another Activity for the Detail, how this situation should be handled? Aug 21 10:55:34 i dont know about otto, but you want to start an activity from another activty? Aug 21 10:55:40 @ rciovati Aug 21 10:56:28 Anyone around Aug 21 10:58:00 hi guys , i should design this UI .. but if you notice they design button in circle shape ! so how can i design it to keep aspect ratio , i mean which layout should i use or how can i do that generally .. http://oi44.tinypic.com/287ejm.jpg ! Aug 21 10:59:08 PatrickBic, yes but both the activity and the fragment should subscribe the event. Aug 21 11:00:43 rciovati_ need suggestions here Aug 21 11:00:56 do we have some kind of data tables in Android library Aug 21 11:01:43 which can be used to display data, with features like column sorting, column filtering, column reordering, column grouping Aug 21 11:01:52 rciovati, http://pastebin.com/jbzYTyp5 thats for starting an activity Aug 21 11:14:59 is there some kind of user-prefered device name? Aug 21 11:15:15 like "Peters Galaxy Nexus" Aug 21 11:15:41 Hi folks, I have quite a complex app to develop which has several significant and distinct components to it. Reading the developer docs indicates the best way to present this interface is using a DrawerLayout and I've been playing with this and it seems to suit quite well. The only problem is that the example given simply changes an existing layout fragment to show a new pic of a planet, rather than to instantiate a new activity (and call its o Aug 21 11:18:44 EditText has setInputType and InputType has TYPE_TEXT_FLAG_MULTI_LINE Aug 21 11:18:48 For multi line. Aug 21 11:19:03 How do you set it to single line? Aug 21 11:19:10 There is no TYPE_TEXT_FLAG_SINGLE_LINE Aug 21 11:19:14 or any such thing :( Aug 21 11:25:46 Omnipotent, public static final int TYPE_TEXT_FLAG_MULTI_LINE Aug 21 11:25:46 Added in API level 3 Aug 21 11:25:46 Flag for TYPE_CLASS_TEXT: multiple lines of text can be entered into the field. If this flag is not set, the text field will be constrained to a single line. Aug 21 11:27:03 I am using Gingerbread api Aug 21 11:27:06 so API level 9 Aug 21 11:27:11 I should be good to go then. Aug 21 11:27:47 PatrickBic, How do you unset a flag? Aug 21 11:28:49 For e.g. I am setting it to desc.setInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE); Aug 21 11:28:53 how do I unset it? Aug 21 11:28:54 something.setFlags(something.getFlags() & (~ removeThisFlag)); Aug 21 11:35:49 Omnipotent, did it work? Aug 21 11:35:59 Nope :( Aug 21 11:36:09 Wasn't able to figure out what you mean by ~ removeThisFlag Aug 21 11:39:53 yours is like desc.getInputType(desc.getInputType() & (~ InputType.TYPE_TEXT_FLAG_MULTI_LINE)); Aug 21 11:40:09 it gets the values, removes the one you specify, and sets the "new values" again Aug 21 11:43:38 Aha Aug 21 11:43:49 Gotcha Aug 21 11:43:51 Thanks a lot! Aug 21 11:43:54 :) Aug 21 11:45:02 works now, i suppose? Aug 21 11:47:20 http://blog.suda.pl/2013/04/the-hell-of-testing-google-play-in-app-billing/ Aug 21 11:47:26 this, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Aug 21 11:56:23 if someone from Google reads that, please fix ASAP! Aug 21 11:56:38 the UX is horrible for testing Aug 21 11:56:48 http://developer.android.com/reference/android/graphics/Region.Op.html XOR does erase the specified Region from the other Region (or add it if not present), right? Aug 21 11:56:58 PatrickBic, Sorry, didn't saw you asking that, yes it does!! Aug 21 11:57:04 Thanks! Aug 21 11:57:09 yw :) Aug 21 11:57:31 By far I just know how to fire up an activity through intent Aug 21 11:57:43 But I don't know how to fire up a particular method in that activity Aug 21 11:58:17 as in "start the method when the activity starts" ? Aug 21 11:58:54 Say, if I click "add" button in current activity, It should add some stuff to a conatainer Aug 21 11:59:11 and then in another activity it should read that container and show it in a ListView. Aug 21 11:59:22 I suppose, I can manage it, yeah. Aug 21 12:00:55 Say, I have class Foo{/* details in here */ }; then Array of those Foo's (something like vector in C++ or List in C#) Aug 21 12:00:56 when starting the activity with an Intent you can hand over the container. Aug 21 12:01:07 The only problem I see here is, How do I get that container accessible in another activity. Aug 21 12:01:13 Can I pass it as an argument? Aug 21 12:01:15 List is also java :-P Aug 21 12:01:24 yea, you can.. lemme look that up, how Aug 21 12:01:40 Yeah, I am not that familiar with Java :D I have worked a lot with C++ and some with C# Aug 21 12:01:49 now Trying luck in Android for fun Aug 21 12:02:19 Omnipotent: activities talk to each other in very limited ways Aug 21 12:02:29 Ah Aug 21 12:02:34 basically you need to serialize your data if you need to pass something from one activity to another Aug 21 12:02:41 :\ Aug 21 12:02:42 Omnipotent, Intent something = new Intent(this,SomeOtherActivity.class); something.putExtra("someKey",someObject); startActivity(something); Aug 21 12:02:47 and usually you do that with Intents Aug 21 12:03:06 PatrickBic, Right, Recall reading something about Extra in Getting Started a few days ago! Aug 21 12:03:11 ;-) Aug 21 12:03:30 PatrickBic, Thanks again! Aug 21 12:03:35 glad to help Aug 21 12:03:44 *if i can help. blah Aug 21 12:05:05 And lastly, this is not a question but, Just a random guess, File I/O should be exactly same, Android and its API's do not matter right? Aug 21 12:05:53 Yes Aug 21 12:05:59 you can use standard-file objects from java.io yep Aug 21 12:07:24 anyone an idea on the XOR-question i posted earlier? *bump* Aug 21 12:10:13 found it. always the same, when you ask you find it (even if you looked beforehand). meh Aug 21 12:10:28 mmm Aug 21 12:10:33 Happens many times hehe. Aug 21 12:12:00 hi Aug 21 12:13:34 I just had an update in the SDK manager. 2 new android emulator images Aug 21 12:16:32 superlinux-hp: presumably this: http://android-developers.blogspot.hk/2013/08/google-play-services-32.html Aug 21 12:18:07 Leeds, nope! Aug 21 12:18:42 they are ARM EABI images for android and Google Api's android Aug 21 12:19:14 i have the complete set of images from api 1 till api 18 Aug 21 12:19:55 wow your apps much be super compatible ;) Aug 21 12:20:59 sabton, all, yet, are 15GBytes Aug 21 12:21:30 i have a android_maps_conflict_avoidance any ideas? Aug 21 12:21:31 i mean if you want to download the whole set. Aug 21 12:21:44 Mapview is deprecated with 14 ? Aug 21 12:22:24 superlinux-hp: i don't think i need to do that Aug 21 12:23:02 it's good to have them if some dumb customer complains! Aug 21 12:23:05 LOL Aug 21 12:25:45 hey guys - i am trying to enable pinch zooming on my application. The onTouchEvent method is working, and i get the correct scale values returned. Aug 21 12:26:07 However, i am lacking the method that actually scales the image. Ive looked online, but no luck finding it. Anyone who can help me out ? Aug 21 12:29:25 matrix.postScale(scale, scale, mid.x, mid.y); view.setImageMatrix(matrix); Aug 21 12:30:25 matrix is of type Matrix, scale is your factor, mid.x/y is type PointF from you finger (2) Aug 21 12:32:22 PatrickBic - got an example of that anywhere ? Aug 21 12:32:39 http://stackoverflow.com/questions/4227451/android-imageview-setting-drag-and-pinch-zoom-parameters Aug 21 12:33:57 graphics.matrix or opengl ? Aug 21 12:36:06 android.graphics.Matrix; Aug 21 12:36:47 Is it worth avoiding the support library if you can avoid it because of the unnecessary bloat? Aug 21 12:36:58 Or does the Java compiler trash what's not used? Aug 21 12:38:16 Hello, I need some help with the v7 support library. I followed these instructions: http://developer.android.com/tools/support-library/setup.html, and when I try extending ActionBarActivity I get java.lang.ClassNotFoundException error. Aug 21 12:51:18 Morning Aug 21 12:58:23 lovethang_: it's good to avoid the support library if you don't have to use it. The compiler won't cut unused parts afaik, but proguard will Aug 21 12:58:24 Good moaning Aug 21 12:58:59 I want a drawer navigation on the left but it seems so sad to have to import the entire universe for one little thing :( Aug 21 13:00:56 My app will be big enough as it is, the extra bloat will cause problems Aug 21 13:02:56 lovethang_ did you try with slidemenu? Aug 21 13:04:38 No :-O What is this pls? I am new to Android dev Aug 21 13:05:18 https://github.com/jfeinstein10/SlidingMenu Aug 21 13:08:07 Thanks, this looks very useful Aug 21 13:09:31 The problem I have is I need to develop an app which has a lot of distinct sections to it and I will need quite a few activities so I was trying to find a good UI to bring it all together, and DrawerLayout seemed the best way to present this to the user. The downside is that trying to make everything as a fragment didn't seem to work, and also there are some bugs like webview doesn't work properly in a fragment Aug 21 13:10:48 Anyone know if one can pass flags when an app is launched from browser urls (BROWSABLE type Intent)? At the moment I'm ending up with two instances of the app Aug 21 13:34:34 any of you have a nexus 10 cover? Aug 21 13:34:45 i'm looking for something similar to the ipad flip cover thingie Aug 21 13:46:15 also, any of you play with the chromecast? can you basically tell it to mirror your entire app? Aug 21 13:51:50 funkbox, no, you can't mirror an app yet. Aug 21 13:53:04 how hard is it to get close to something like that? Aug 21 13:54:11 funkbox, reverse engineer chrome tabcast protocol, implement your own Aug 21 13:54:16 you'll at least need a video encoder. Aug 21 13:54:18 (hard) Aug 21 13:54:25 ain't nobody got time for that Aug 21 13:54:26 (use miracast on your device instead) Aug 21 13:54:37 (that's why it's there.) Aug 21 13:56:24 Mavrik: i wanted to get something on the level of airplay Aug 21 13:56:40 Miracast. Aug 21 13:56:55 not part of the google ecostystem, is it? Aug 21 13:57:25 it is. Aug 21 13:57:44 if by "google ecosystem" you mean "android devices support it" Aug 21 14:00:26 i mean more of a "buy these things from google and it works' Aug 21 14:02:07 nexus 4 + ptv3000 works if you define works as have to stand within 0.5m and still get graphical glitches and stuttering video ;) Aug 21 14:28:03 how bad of an idea is to throw a lot of logic into view holders? Aug 21 14:29:18 I often re-compose views into logical classes, effectively, they're viewholders with logic Aug 21 14:30:46 yeah i've gotten into using "controller" a lot Aug 21 14:39:55 I'm trying to unit test a contentprovider and keep getting: java.lang.IllegalStateException: Don't have database lock! Aug 21 14:40:06 should I be closing something somewhere? I can't figure out how to fix this. Aug 21 15:00:01 Hi all, how can i give the user the option to select an image? (to link the selected image to a profile) Aug 21 15:01:07 An onClick event? Aug 21 15:03:05 and use something like a spinner for it? Aug 21 15:03:06 does anyone know if pixel buffers in Android have been replaced by FBOs? Aug 21 15:04:24 maybe a grid of the images? Aug 21 15:04:32 eg gridview Aug 21 15:36:39 is there a way to use the actionbarcompat library without extending ActionBarActivity? Aug 21 15:36:49 no Aug 21 15:37:16 there has got to be a way. Aug 21 15:38:21 Just do everything ActionBarActivity does Aug 21 15:38:52 i haven't been able to find the source for the v7 library. is there a link I'm missing? Aug 21 15:40:52 https://www.google.dk/search?q=actionbaractivity.java Aug 21 15:42:00 that is the package android.support.appcompat.app; Aug 21 15:43:40 You get to its source in AOSP, then you follow the breadcrumbs up to https://android.googlesource.com/platform/frameworks/support/ Aug 21 15:44:24 Thanks Aug 21 15:46:51 https://android.googlesource.com/platform/frameworks/support/+/master/v7/appcompat/src/android/support/v7/app/ is the link I was looking for. Thanks for the direction @SimonVT Aug 21 16:09:53 when SQLiteDatabse.openOrCreateDatabase() asks for a path does it literally mean soemthing like /data/data/package/databases/dbname? Aug 21 16:10:00 or is just the dbname sufficient? Aug 21 16:12:06 The first Aug 21 16:12:33 hi guys. I have a relativelayout that has with a viewpager. I want to place text at the bottom left of the view pager that has a transparent black background and white text. Right now I'm using layout_width and layout_height with wrap_content settings but it's making the wholeviewpager have a black background: http://pastebin.com/AQ9jGQmT Aug 21 16:12:42 Context has the method getDatabasePath or something that you should use Aug 21 16:12:51 <_\Mrks> Is there documentation on dependancy management using the new build system (gradle) in eclipse? Specifically I want my project to depend on android-support Aug 21 16:15:06 yeah, I just wasn't sure if the getDatabasePath would give me anything meaningful if the database wasn't already there Aug 21 16:16:48 <_\Mrks> I've seen this http://developer.android.com/tools/support-library/setup.html, but unless I check the jar into revision control, every developer would have to manually follow the steps under "Using Eclipse" after checking out the project... Aug 21 16:17:22 <_\Mrks> I am very opposed to commiting librarys to RCS Aug 21 16:33:46 _\Mrks, then use a non-shitty ide that understands how to use dependency specs Aug 21 16:36:45 <_\Mrks> pfn: Recommend a replacement. Would Android Studio do what I want Aug 21 16:37:06 <_\Mrks> pfn: If I had my way, everone would use vim or emacs and gradle command line Aug 21 16:37:28 _\Mrks, android studio, intellij, both will work fine Aug 21 16:38:00 please, this is 2013, you should be able to bitbang the JTAG interface manually by now Aug 21 16:39:02 <_\Mrks> pfn: thanks, I'll give it a shot, I am not a huge Eclipse fan to begin with Aug 21 16:39:02 okay, fragments and loaders question Aug 21 16:39:17 so, you can put fragments on the backstack Aug 21 16:39:20 intellij doesn't support aars yet Aug 21 16:39:26 and when they are, their loaders keep loading Aug 21 16:39:27 annoyingly Aug 21 16:39:32 and also stay valid Aug 21 16:39:46 is there a way to limit the number of fragments on the back stack who's loaders stay valid? Aug 21 16:40:05 for instance, you have 10 fragments on the backstack, but only the first 5 keep their loaders around Aug 21 16:41:25 THere's no connection between the two, so no Aug 21 16:41:58 The loader loads until you destroy it Aug 21 16:47:45 any help with getSupportFrgamentManager? Aug 21 16:48:12 SimonVT: i've never destroyed a loader in my life, so you're saying that every loader i've ever created is still loading for eternity? Aug 21 16:49:09 Until your process is destroyed Aug 21 16:49:13 Could be eternity Aug 21 16:49:21 that's not how they work Aug 21 16:49:30 the loadermanager is made so you don't worry about implementation like that Aug 21 16:49:44 it destroys them during certain fragment transactions Aug 21 16:51:12 in fact, most people should never have to call destroy on a loader Aug 21 16:53:06 how to call getFragmentManager() from my Activity and not FragmentActivity ? Aug 21 16:54:23 papachan, are you using the support library? Aug 21 16:54:24 you can't Aug 21 16:54:36 you cannot mix FragmentActivity and Activity Frgments Aug 21 16:54:41 you must use all of one or the other Aug 21 16:55:29 jonc : yes Aug 21 16:55:38 i am trying to push down to api 12 Aug 21 16:56:31 if you're using api12+ don't bother with support fragments then Aug 21 16:56:37 what's the problem Aug 21 16:57:27 i was using 14 Aug 21 16:57:37 so? Aug 21 16:57:40 but i cannot migrate this old code to FragmentActivity Aug 21 16:57:51 api12 doesn't need FragmentActivity Aug 21 16:57:59 yeah i know Aug 21 16:58:10 then what's the problem Aug 21 16:58:18 i am trying to see if i can call getFragmentManager() Aug 21 16:58:38 you can't Aug 21 16:58:48 unless you make your activity extend FragmentActivity Aug 21 16:58:57 note: using FragmentActivity doesn't mean you have to use Fragments Aug 21 17:04:29 if you're in api12, you can just call getFragmentManager() Aug 21 17:04:31 what's the problem? Aug 21 17:04:38 and use native fragments Aug 21 17:06:21 pfn: don't you still have to extend FragmentActivity even in api12+? Aug 21 17:08:01 sorry i even dont see any getFragmentManager() in api 12 Aug 21 17:08:18 oh i have find it Aug 21 17:08:25 https://developer.android.com/reference/android/app/Activity.html#getFragmentManager() Aug 21 17:09:54 Call require Api level 11 Aug 21 17:12:22 evanc, no Aug 21 17:12:34 evanc, FragmentActivity is only required for android.support.v4 usage Aug 21 17:12:48 papachan, yes, and you require 12, so it's done Aug 21 17:12:59 https://github.com/pfn/android-sdk-plugin#new-features-in-10x Aug 21 17:13:00 woot Aug 21 17:13:03 pfn: ah Aug 21 17:13:13 papachan: you are saying you are porting your app from minSdk 14 to minSdk 12? that seems very unusual. Honeycomb (sdk 11, 12 and 13) are only 0.1% of active devices Aug 21 17:13:37 kevinb you right Aug 21 17:13:43 i am just messing here Aug 21 17:14:02 evanc, and yeah, so my widget problem yesterday was trying to pre-optimize by hanging on to RemoteViews references Aug 21 17:14:17 evanc, docs for updateAppWidget should say that re-using RemoteViews is bad Aug 21 17:14:45 (and RemoteViewsFactory.getViewAt should say that as well) Aug 21 17:15:46 now my irc client and widgets are zoom zoom fast Aug 21 17:15:46 they should almost even throw an exception if a remote view is reused. for compatibility i guess they'd have to allow it on sdks lower than when they document the fact that it will throw Aug 21 17:16:08 pfn: I thought it said somewhere that RemoteViews shouldn't be reused, but anyway, you should file a docs bug on b.android.com Aug 21 17:16:26 I filed a few docs bugs like years ago... I don't think it ever got closed... Aug 21 17:16:35 kinda makes me hesitant to file anymore Aug 21 17:16:42 gah there has to be somethign wrong with Android Studio not including libs Aug 21 17:16:43 alright Aug 21 17:16:53 then just yell into #android-dev and it's sure to get fixed Aug 21 17:17:12 it'll be logged for posterity in someone's irc log ;-) Aug 21 17:17:15 or submit a patch Aug 21 17:19:05 speaking about filed bugs tha taren't fixed, when is api x86 image going to get fixed and not spam the logging Aug 21 17:19:27 bug filed, ignored Aug 21 17:20:01 api 17, specifically Aug 21 17:39:28 i am trying to change the title of a action bar menu item when my app starts. The title is a counter of the total amount of times i've opened the app since I've had it installed. When I try to change it in onCreateOptionsMenu it fails with a resource not found exception. If I set the title to something static like "TEST" it works. when I try to set it to my counter variable it fails. Aug 21 17:39:40 does anyone know how I can do this properly ? Aug 21 17:40:35 navetz: use .setTitle("" + count); or similar. Basically, you're passing in the count (as an int) and it's looking for a resource (which are also ints) Aug 21 17:45:37 evanc: thank you so much man. I want to punch myself in the face for not figuring this out earlier. Aug 21 17:46:02 navetz: haha no problem. If I had a dime for every time I'd done that ... well, I'd have like fifty cents, but still Aug 21 17:47:06 evanc: 50 cents and lots of time back Aug 21 17:47:40 Integer.toString() :) Aug 21 17:48:09 "" + count is kinda nasty Aug 21 17:48:10 ^ Aug 21 17:48:24 String.valueOf() Aug 21 17:48:28 but I prefer "" + myself Aug 21 17:48:52 JesusFreke: at least use Integer.valueOf(i).toString() (though I prefer String.valueOf()) Aug 21 17:48:58 5 keystrokes vs. 19 Aug 21 17:49:01 ""+ was just easier to type Aug 21 17:49:25 17, rather Aug 21 17:49:36 and equally readable Aug 21 17:49:44 no, there's a toString() that accepts an int Aug 21 17:49:48 Integer.toString(count) Aug 21 17:49:58 a static toString, that is Aug 21 17:50:10 yes, Integer.toString() is 19 keystrokes Aug 21 17:50:28 google should have used csharp Aug 21 17:50:29 pfn: do you use 1 letter variable names for everything too? Aug 21 17:50:36 20 Aug 21 17:50:43 I use them if the method bodies are short enough, yes Aug 21 17:50:51 19 if your autocomplete sucks Aug 21 17:51:02 x, i, j, k, etc. are all well understood and defined Aug 21 17:51:15 notice how I said "for everything" Aug 21 17:51:28 my point is that readability often trumps the number of keystrokes :) Aug 21 17:51:29 now what about a, b, c... Aug 21 17:51:37 "" + ... is readable Aug 21 17:51:50 ugly and readable Aug 21 17:52:19 pfn: I would argue it's not. especially with how different languages could handle an expression like that Aug 21 17:52:52 pff ""+ is obviously javascript Aug 21 17:52:59 I don't code to target to all languages Aug 21 17:53:01 plus, it's probably less efficient Aug 21 17:53:08 I write my code to cater to users of the language I'm working with Aug 21 17:53:09 to the bytecode, batman! Aug 21 17:53:16 yes, it is a little less efficient Aug 21 17:53:18 s/users/user/ Aug 21 17:53:20 maybe compiler optimizes Aug 21 17:53:21 less efficient lol Aug 21 17:53:34 you have a double-alloc Aug 21 17:53:36 like you care about efficiency in those cases ? Aug 21 17:53:46 one to create the string for the int, one to create the wrapper string for the concat Aug 21 17:53:52 the "" is already interned Aug 21 17:54:28 anyway it's semantically ugly Aug 21 17:54:30 too lazy to javap -c to see Aug 21 17:58:03 5 dalvik instructions for System.out.println(Integer.toString(blah)), 12 for System.out.println("" + blah) Aug 21 17:58:21 not that the efficiency is even my main argument against it :) Aug 21 17:58:24 anyone here who's worked with mediacodec? Aug 21 17:58:37 (http://pastebin.com/iwV4JRTE) Aug 21 17:59:10 I'm trying to render to surface - but the onAvailableFrame method is never called even though I have an output buffer Aug 21 18:00:56 It just hit me that I'm interviewing with Google next week Aug 21 18:00:57 lol Aug 21 18:01:06 papachan, have you worked with media codec? Aug 21 18:01:15 Brian|CS, you better know about mediacodecs then :P Aug 21 18:01:27 God I hate dealing with media Aug 21 18:01:27 lol Aug 21 18:01:36 liquidmetal no Aug 21 18:01:46 I had to write a MP3 player class in java for my group freshman year, it was pretty bad Aug 21 18:01:48 >.> Aug 21 18:03:00 The most fun thing I've written recently was a basic reverse geocoder to take lat/lon and get the city/state combo from it Aug 21 18:03:34 jonc in java? Aug 21 18:03:40 uses a quad tree to load the shape file boundaries with indicies into the shapefile (to save memory) Aug 21 18:03:41 yeah Aug 21 18:03:52 from the shapefile* Aug 21 18:04:11 jonc cool Aug 21 18:04:38 and then a point comes in I get the potential cities that the lat/lon falls into (the bounding box it is inside) and then use the indices to load the actual shapes in and use a point in polygon to determine which boundary it falls into Aug 21 18:05:25 ~800mb shape file (combined all states using some python scripts) from the US tiger/line data, only takes 8-10mb when running though Aug 21 18:05:44 and takes ~3-5ms for a response on my home machine Aug 21 18:06:00 on, on java, not android Aug 21 18:06:02 s/on/oh Aug 21 18:06:20 coolest thing I've re-written lately is just my class-usage dependency inspector :( Aug 21 18:06:46 I wrote this over a weekend and released it to the company as open source Aug 21 18:06:52 we use it backend to find a user's location Aug 21 18:07:08 https://github.com/pfn/android-sdk-plugin/blob/master/src/ReferenceFinder.scala Aug 21 18:07:11 :( Aug 21 18:07:15 oh well, it was fun for me Aug 21 18:07:24 jonc nice. is it opensource? Aug 21 18:07:34 it is, but I haven't put it up anywhere Aug 21 18:07:55 ok Aug 21 18:07:58 and other than our work environment it hasn't been tested all that thoroughly Aug 21 18:08:18 I've also been working on using facebook interests to give a user potential things to watch on netflix Aug 21 18:09:11 created a fb scrapper to seed the database / naive bayes for determining connections between different interests Aug 21 18:09:59 and then use some regex to split up netflix movie titles to try and match against facebook interests Aug 21 18:10:15 like Terminator and Terminator 2: Judgement Day are really almost equivalent Aug 21 18:10:34 if you like one or the other then you may be interested in the other one Aug 21 18:11:17 and the android part comes in because I am also writing an app to display this (hopefully link right to the netflix app) Aug 21 18:12:56 just need to get the server stuff into a state where I can pretty much set it and let it run (currently have to download the netflix streaming xml by hand and fill the database) before I release it Aug 21 18:15:23 just adding a setOnClickListener to a button makes my app have runtime crash Aug 21 18:15:25 I wonder why Aug 21 18:15:27 No extra errors Aug 21 18:15:35 you fail at reading errors Aug 21 18:15:56 http://ideone.com/WPLBOZ Aug 21 18:16:01 pfn, Perhaps. Aug 21 18:16:26 But I've added 13 other events by far, seems to have no problems Aug 21 18:16:26 you fail at pasting errors, too Aug 21 18:16:32 Just because it compiles doesn't mean it works Aug 21 18:16:36 Aye. Aug 21 18:16:44 anyway, presumably addBtn is null Aug 21 18:17:13 but it compiles, ship it! Aug 21 18:18:02 Either way, I solved it by removing the entire snippet, making IDE recreate it and rebuilded entire project. Aug 21 18:18:03 Meh. Aug 21 18:18:45 pfn, About your "I being fail at pasting errors" If there were any, I would have sure. Aug 21 18:18:58 anyone familiar with mediacodec? Aug 21 18:19:03 Thats why I chose words, Runtime CRASH and not Runtime error Aug 21 18:19:04 Meh. Aug 21 18:19:26 compile time crash :) Aug 21 18:19:40 If it was compile time crash, There would have been some errors :) Aug 21 18:20:05 But these runtime errors are at least better than C++'s unknown segfaults! Aug 21 18:20:10 xD Aug 21 18:20:28 pfn I'm using your app Aug 21 18:21:01 heh Aug 21 18:21:02 fancy Aug 21 18:21:22 Which app? Aug 21 18:21:35 pfn's app Aug 21 18:23:11 canadiancow|cell, you like? Aug 21 18:24:13 What is it for? Aug 21 18:24:28 irc client Aug 21 18:24:32 Oh. Aug 21 18:24:46 https://play.google.com/store/apps/details?id=com.hanhuy.android.irc.lite Aug 21 18:24:53 thanks for linking Aug 21 18:25:02 oooh nice UI Aug 21 18:25:27 You made the UI in? Aug 21 18:25:44 in xml, what else Aug 21 18:26:30 anyone familiar with mediacodec? Aug 21 18:27:11 Anyone here familiar with renderscript? Aug 21 18:27:35 anyone familiar with mediacodec? Aug 21 18:27:43 can we get a kickban please? Aug 21 18:27:46 Android studio is giving me hell. I can't get it to compile rs properly. Aug 21 18:27:57 Achillion, what's the problem? Aug 21 18:27:59 Maybe it's a gradle-renderscript issue? Aug 21 18:28:01 I dunno if gradle supports renderscript yet Aug 21 18:28:10 pfn: on who? Aug 21 18:28:28 evanc, the repeated "anyone familiar with mediacodec" every minute Aug 21 18:28:32 pfn under Description I can't see a description of what the app is, just updates and things Aug 21 18:28:42 damn Aug 21 18:28:51 gradle should support rs Aug 21 18:28:51 shmooz, description of what? Aug 21 18:28:59 pfn: It should. It used to work fine a few versions ago. Ever since 4.3 it's been a bit weird. Aug 21 18:29:06 shmooz, click read more? Aug 21 18:29:06 pfn: I didn't see it every minute, but liquidmetal: stop it. Aug 21 18:29:22 I can compile rs manually with llvm, but I can't get android studio to do it during the compile process using gradle. Aug 21 18:29:25 I was just hoping one of the people who joined would know Aug 21 18:29:38 try using gradle from the command line Aug 21 18:29:48 11:27 anyone familiar with mediacodec? 11:26 anyone familiar with mediacodec? 11:18 anyone familiar with mediacodec? Aug 21 18:29:48 maybe its just AS Aug 21 18:29:53 anyway Aug 21 18:29:54 g00s: same result. Aug 21 18:29:55 yeah, cut it out Aug 21 18:30:07 pfn: the first paragraph after Description should be a overall summary description that stays at the top Aug 21 18:30:09 Hang, on let me have another try. Aug 21 18:30:14 shmooz, says you Aug 21 18:30:16 okay Aug 21 18:30:32 shmooz, the title says what it is Aug 21 18:30:39 and if you don't know what IRC is, you aren't my target audience Aug 21 18:30:53 I'm only offering constructive help ;) Aug 21 18:31:18 thanks, I'm not interested in changing it right now Aug 21 18:31:48 Ah. Found this now. http://tools.android.com/tech-docs/new-build-system/user-guide . Looks like I came here with my annoying questions too soon. Aug 21 18:32:28 I should see if renderscript stuff still compiles in my plugin Aug 21 18:32:31 haven't tested it since I wrote it Aug 21 18:32:44 * pfn still needs to figure out a reason to use renderscript... Aug 21 18:33:15 Computational POWAH!? Aug 21 18:33:52 Hello! My app freezes sometimes when it is supposed to resume. It does not crash, though. I cannot tell, why it is happening because I don't know how to reproduce it. Do you have any hints? I assume it could be some networking that does not work or a Database query. Aug 21 18:34:14 if it freezes, you get an anr, if you have an anr, you have a stack trace Aug 21 18:34:14 use it Aug 21 18:34:15 pfn: my benchmarks show me I'll get a good boost in speed for some of my intensive tasks. Aug 21 18:34:18 /data/anr/traces.txt Aug 21 18:34:28 Achillion, good, I suppose Aug 21 18:34:31 oh thanks Aug 21 18:34:41 I did not know that Aug 21 18:36:00 hmm Aug 21 18:36:03 time for espresso! Aug 21 18:36:15 pfn: when Aug 21 18:36:20 when's it launching? Aug 21 18:36:26 Damn you! Stop making me want more coffee. Aug 21 18:36:48 Setting the LayoutParams like this centered the bottom of the newly added view on the GeoPoint on the map. Aug 21 18:36:53 whoops Aug 21 18:36:54 http://www.youtube.com/watch?v=qtKx1WxK7cw&feature=youtu.be Aug 21 18:38:26 theelfismike, when what? Aug 21 18:38:34 when is espresso launching Aug 21 18:38:49 oh, no idea what that is Aug 21 18:39:04 it's supposed to be a better way to do ui automation testing Aug 21 18:39:05 http://www.reddit.com/r/androiddev/comments/1d574r/espresso_for_android_new_ui_automation_testing/ Aug 21 18:39:10 internal ui testing, I see Aug 21 18:39:19 internal as in google-internal right now Aug 21 18:39:23 I mean espresso as in the drink Aug 21 18:39:38 http://www.youtube.com/watch?v=1p4Q0tEEloE Aug 21 18:39:55 lol equally stimulating Aug 21 18:40:32 instrumented ui testing that works reliably would be nice Aug 21 18:40:52 but yeah, time to make a video of my entire shot pulling process Aug 21 18:41:28 Can you help me with this? I don't see the problem: especially since it usually runs normally: https://gist.github.com/i-am-the-slime/e0515d030ab04dcd74f6 Aug 21 18:41:53 Line 119 is actually the def run()… line it complains about. Aug 21 18:44:45 why use java.util.Timer Aug 21 18:44:50 just handler.postDelayed, or postAt Aug 21 18:45:25 Hmm okay, I will have a look at that. Aug 21 18:45:46 I had never done any timer stuff and I assumed this was the way to go. Aug 21 18:46:49 anyway, look at more anr's, not just that one Aug 21 18:46:51 So I have to create a Handler instead of a timer? Aug 21 18:46:54 reproduce like 5 or six Aug 21 18:46:59 Actually Aug 21 18:47:05 I usually just create a single handler that I reference from everywhere Aug 21 18:47:08 e.g. with a uibus Aug 21 18:47:33 There are a few and they are all that one. Aug 21 18:47:46 I am suspecting that maybe I am starting more than one timer. Aug 21 18:47:55 maybe Aug 21 18:48:09 Because there is up to Timer 37 Aug 21 18:48:21 nice Aug 21 18:48:29 Starting from 0 Aug 21 18:48:33 and hilarious at the same time Aug 21 18:48:43 Hilarious is always nice! Aug 21 18:49:19 That should make the updating of seconds in my view really precise! Aug 21 18:50:25 So I'll make one handler maybe in the companion object of the Activity class and then just use that one? Aug 21 18:51:14 yes Aug 21 18:51:43 I will try that. Aug 21 18:51:58 Thank you, it was very helpful to point out that ANR file Aug 21 18:56:07 hey guys Aug 21 18:57:01 how long does it usually take for a post to hit the developers group. I've posted a few things (mostly replies and a few questions) over the last few weeks and none of them have showed up Aug 21 18:57:17 if my app has assets for mdpi, hdpi and xhdpi, what assets will an ldpi device use? hdpi / 2? or mdpi scaled by 1.5? Aug 21 18:58:16 it's not exactly defined but the docs say in that case it would use hdpi/2 Aug 21 19:00:25 pfn: I don't get it, how would the Handler work differently than that timer thing? Should I just use it because it's a native android thing? I override the handler class that has a handleMessage function which takes a Message subclass containing the UI element I want to update and then I do runOnUiThread to update it? And in onCreate I post this message every second? Aug 21 19:05:20 marrrk, yeah, because it's native, and post a runnable, removeCallbacks on it Aug 21 19:05:30 marrrk, so you don't have more than one running at a time when you queue Aug 21 19:07:14 pfn: I will try to do that but I don't exactly understand how it will work yet. Aug 21 19:08:08 marrrk, do you need to be every second exactly? or just 1 second in between, just post it once ever, and let the runnable re-post itself Aug 21 19:08:20 marrrk, also, do not post it again, unless it's not already posted Aug 21 19:08:43 It's just a text view with some elapsed time including seconds. Aug 21 19:08:58 then yeah, make sure you clear all callbacks in onCreate Aug 21 19:09:06 then post your runnable once, and let it re-post itself every second Aug 21 19:09:40 So what are all the components I need? A Handler subclass, a Message subclass and a Runnable subclass? Aug 21 19:09:41 val r: Runnable = () => { do shit, handler.postDelayed(r, 1000) } Aug 21 19:09:59 in onCreate() { handler.removeCallbacks(r); handler.postDelayed(r, 1000) } Aug 21 19:10:25 hmm nothing in onResume? Aug 21 19:10:43 Yeah, I guess that won't be necessary Aug 21 19:11:15 Do you think I should just keep a reference to the view or should I pass it in every message to the handler? Aug 21 19:11:57 that depends on where your runnable lives Aug 21 19:13:35 and you don't have to pass a message to the handler, just pass your runnable Aug 21 19:13:52 Oh yeah I oversaw your first line with var r:Runnable actually. Aug 21 19:14:01 val Aug 21 19:14:10 I meant that. Aug 21 19:14:33 So you meant the onCreate of the runnable, then? Aug 21 19:14:41 runnables don't have onCreate Aug 21 19:14:48 okay so you didn't Aug 21 19:16:06 Where do I do anything with the runnable then? In onCreate I only work on the handler. Aug 21 19:16:48 12:09 in onCreate() { handler.removeCallbacks(r); handler.postDelayed(r, 1000) } Aug 21 19:17:50 Oh so it's all intertwined the handler references the runnable and the other way around. Okay I'll implement it now and think about it. Aug 21 19:21:13 I didn't know there already was a handler variable! Aug 21 19:21:33 Do I need runOnUIThread in a runnable? Aug 21 19:21:51 anyway, if you create the runnable within your activity class, rather than object, you should probably removecallbacks in onDestroy Aug 21 19:21:59 runOnUiThread takes a runnable Aug 21 19:22:29 and a handler you create from your activity will implicitly run on the ui thread Aug 21 19:23:52 Yeah, it just works. Quite nice. Aug 21 19:23:57 Just have to add the onDestroy. Aug 21 19:24:06 However I've got bigger problems if onDestroy gets called. Aug 21 19:24:19 onDestroy gets called whenever you rotate your device Aug 21 19:24:26 when you press back, etc. Aug 21 19:24:49 if your handler exists in your companion object, then it will cause a memory leak Aug 21 19:24:56 make your Handler static Aug 21 19:25:10 that's exactly it, if you don't removeCallback(r) then you have a memory leak Aug 21 19:25:17 your whole activity will leak Aug 21 19:25:25 I put it in onDestroy now. Aug 21 19:25:34 However I usually do moveTaskToBack Aug 21 19:25:39 Should I put it there, too? Aug 21 19:25:49 no, just pair it up in onCreate and onDestroy and it's fine Aug 21 19:25:50 er, what? Aug 21 19:25:56 Okay Aug 21 19:26:31 maybe you'll wait to do it in onResume/onPause, for starting/stopping your timer Aug 21 19:26:41 since you probably don't want the timer running while your app isn't active? Aug 21 19:26:55 It only needs to run when this activity is visible. Aug 21 19:27:01 then you're ok Aug 21 19:27:47 http://www.youtube.com/watch?v=p9X-TOT5IuU Aug 21 19:27:48 yum Aug 21 19:27:49 Really nice that's the last issue I've had in my testing and now I'm quite confident it's solved. Somehow it didn't' like my 38 Timer Tasks. Aug 21 19:28:13 I wonder if I'll actually get into coffee once I have a job where I need to get up in the morning. Aug 21 19:28:49 I drink it because I enjoy it, not because I need it to wake up Aug 21 19:29:13 I'll stick to tea in that case. Aug 21 19:31:46 I didn't know that syntax you used for making a subclass of Runnable Aug 21 19:32:20 Or whatever it is doing. Aug 21 19:32:54 well, I assume whatever libraries you're using has an implicit conversion from Function to Runnable Aug 21 19:34:10 Oh okay that's what the () stands for? I could just as well have said x => … ? Aug 21 19:34:18 () means unit Aug 21 19:34:46 Ah, okay, that's what confused me and then I did not know about that implicit conversion in scaloid but that's a nice feature. Aug 21 19:34:58 * pfn hasn't used scaloid Aug 21 19:35:11 Are you using anything similar? Aug 21 19:35:23 I have my own small implicit conversions library Aug 21 19:35:27 scaloid is too big for my tastes Aug 21 19:35:39 https://gist.github.com/pfn/1763017 Aug 21 19:35:42 I have something like that Aug 21 19:37:30 That looks quite a bit smaller. But I'm okay with my app's size. Aug 21 19:49:35 Hello, I'm new to android development and I'm not sure how to do something that is likely quite simple. I have a ListView that is populated by an ArrayAdapter (using android.R.layout.simple_list_item_1). How can I implement an onClickListener for the ListView items? Aug 21 19:50:26 psion, ListView has an OnItemClickListener Aug 21 19:51:07 I think I might need some help getting gradle to properly build renderscript. Aug 21 19:51:44 pfn: I was trying to implement that, though I was getting a force close just by registering it, hrm. I'll look further into that Aug 21 19:53:53 were you checking the logs to see what was causing it? Aug 21 19:54:11 jonc: nullpointerexception Aug 21 19:54:16 I would guess the listview you were trying to set the onclicklistener for had a null pointer Aug 21 19:54:37 so the ListView object you are trying to set the listener for is null Aug 21 19:54:53 make sure you are getting the correct item from the view before you set the listener Aug 21 19:55:49 jonc: I gave it an id in xml, then used findViewById() in my onCreate, is there a better way to obtain the listview? Aug 21 19:56:27 that is the proper way, but it seems it cannot find the object (or you are setting it to null elsewhere, but before you set the listener) Aug 21 19:58:38 dcow: it looks like it's actually using mdpi in our case, since modifying those assets seemed to alleviate our issue. weird. Aug 21 19:58:52 in your onCreate? Aug 21 19:59:06 jonc: If you don't mind, can you look at my onCreate? there's almost nothing in it, yet implementing the click listener causes a null pointer exception. http://pastebin.com/tRxjXJDR Aug 21 20:01:26 not implementing the listener causes a null pointer Aug 21 20:01:33 dereferencing your listview is causing the null pointer Aug 21 20:02:11 s/de// Aug 21 20:02:39 ^ Aug 21 20:04:30 I see what you mean now, findViewById is returning back a null pointer, odd Aug 21 20:04:44 yup Aug 21 20:04:55 not really odd, you're just not referencing the id from a layout you've loaded Aug 21 20:06:03 oh I see, because I haven't run setContentView? Aug 21 20:06:09 you're calling findViewById before set...yeah Aug 21 20:06:09 so it hasn't loaded the layout? Aug 21 20:06:20 psion, it's because of "setContentView(R.layout.activity_main);" that sets what view should be loaded, but you are trying to get something from the activity's view before that is called Aug 21 20:06:31 wow, I feel a little silly, thanks guys Aug 21 20:06:44 if you don't tell it to load, how would it be loaded? Aug 21 20:07:06 programming isn't as simple as willing it into being through pure mind control, yet Aug 21 20:07:20 I have a layout with an imageview that should be obscured by a listview when it grows large enough to cover it. However, the imageview remains visible "through" the listview item. How can I ensure the listitem obscures the image view which is "behind" it. Aug 21 20:07:41 zanberdo, give it a non-transparent background Aug 21 20:12:35 Hi all Aug 21 20:15:05 People, I'm using the google maps on android and the place where has many towers the accurate is to feet when I set to show where I'm (whithout GPS). That is the the standard android location service right. Well, Is possible to develop a android app using the standard android location service + google maps? In other words, I would like to do a mobile app using googlemaps but with that location feature that has in google maps app. Aug 21 20:15:37 network location provider operates independently of google maps Aug 21 20:16:00 I'm not sure what you are trying to say. But yes android apps can use the android location service that is sometimes accurate without gps Aug 21 20:16:18 If I do a second setContentView, will that just override the current content or do I need to do something like unsetContentView? Aug 21 20:16:24 said location service has nothing to do with google maps Aug 21 20:16:34 marrrk, it replaces the current content, generally not a good practice Aug 21 20:17:28 I actually want the content to be replaced only once ever. In the on resume if one week has elapsed since the app install. Aug 21 20:17:43 So in that case it's not to bad, right? Aug 21 20:17:53 too Aug 21 20:18:06 I guess Aug 21 20:18:30 spikebike: this -> http://img.ctrlv.in/img/5215183d36ea5.png <- is possible to do this in my android app? maps with the location service Aug 21 20:18:31 got an issue with restricted profiles - my apk contains native libraries and it seems that if the application is installed *before* the restricted profile is created & access is granted to my application, the native libraries are not accessible ... re-installing solves the problem ... anyone have any ideas what could be going on? Aug 21 20:20:13 ugh Aug 21 20:21:33 plm: er you can write an app to use the location service. However the google map app isn't open source and you can't modify it Aug 21 20:22:40 should add that installing the application *after* creating the restricted profile also works ... Aug 21 20:22:44 spikebike: but what is advantage to use the location service if I can't show my position on the google maps? Aug 21 20:23:19 plm: well google maps will show your position. If you want to do something different you need to write it Aug 21 20:24:27 there is also a google map sdk so you can display google maps inside your app Aug 21 20:24:50 location services doesn't need to be used with maps, could also be done so it could show nearby deals or detect if you're at work or home or whatever Aug 21 20:25:01 spikebike: sorry, when you say "If you want to do something different you need to write it" what this mean? Aug 21 20:26:01 Or to play video games with :P Aug 21 20:27:16 Sonicadvance1: I actually almost said that, but was picturing ingress which actually does use google maps, just without any labels and the colors are inverted :P Aug 21 20:28:07 ah right. Been a while since I've touched that app Aug 21 20:29:23 kevinb: ohh now I see your message. Understood =D Aug 21 20:30:04 HorizonXP: yeah that's why I said it's not really defined Aug 21 20:30:12 what is this houdini background process? Aug 21 20:33:43 anyone knows a push implementation for android that i can host myself? Aug 21 20:34:03 there seems to be a billion services that do it but no simple library Aug 21 20:39:46 what's to host? Aug 21 20:39:48 you use gcm Aug 21 20:39:51 and you post messages to it Aug 21 20:40:08 it's just an http request... Aug 21 20:40:18 i dont want to ask the user for permission to use its google account :/ Aug 21 20:40:31 so i want to implement the android side not using gcm Aug 21 20:40:45 gcm doesn't use google account Aug 21 20:41:03 the manual sais you need to instantiate a google account thing Aug 21 20:41:18 yeah, but it doesn't require usage of the account, that I recall Aug 21 20:41:22 > A Google account is not a requirement on devices running Android 4.0.4 or higher. Aug 21 20:41:26 http://developer.android.com/google/gcm/gcm.html Aug 21 20:41:31 with AccountManager Aug 21 20:41:50 oh hm. ok. what would i use on kindle though? Aug 21 20:42:36 asprin Aug 21 20:43:12 i suppose that was a joke? Aug 21 20:43:17 haha yeah, sorry Aug 21 20:43:24 There's not requirement for a Google account on the device to use GCM, you just call the APIs and get a "registerid" which identifies the device. You pass this to your server, and the server use this to send messages to the device. No account stuff needed. Aug 21 20:44:05 humm. weird. i must have been mislead then by the example code and wrong stackoverflow posts Aug 21 20:44:12 i'll just try Aug 21 20:44:26 still, doesnt look like the kindla has any equivalent. not sure what to use there Aug 21 20:45:13 > you just call the APIs and get a "registerid" which identifies the device. Aug 21 20:45:25 i think the api will only work if you're authenticated with a google account pre ICS Aug 21 20:45:26 iirc Aug 21 20:45:33 On the device, call the GCM api to get a registerid. This may or may not contact the GCM servers. A registerid is typically good for a week or so. Aug 21 20:45:37 No, no authentication needed. Aug 21 20:45:55 "The android.permission.GET_ACCOUNTS permission as GCM requires a Google account (necessary only if if the device is running a version lower than Android 4.0.4) Aug 21 20:45:56 Your app will send this to your server, typically through a REST call or similar. Aug 21 20:46:01 http://developer.android.com/google/gcm/client.html Aug 21 20:46:15 so its fine >4.04 Aug 21 20:46:40 unfortunately i don't think i can just ignore the masses of users with crappy android3 devices Aug 21 20:47:00 it also relies on google play service sdk Aug 21 20:47:08 which isn't available on non-google play store devices Aug 21 20:47:09 like kindle Aug 21 20:47:21 aep: Android v3? That's hardly anyone. Aug 21 20:47:45 android studio has some serious xml rendering issues Aug 21 20:48:22 eh 2.something? Aug 21 20:48:51 right, 2.3 acording to http://www.appbrain.com/stats/top-android-sdk-versions Aug 21 20:49:14 I Aug 21 20:49:15 er, Aug 21 20:49:25 I'm not even sure it's worth targeting 2.x anymore. Aug 21 20:49:40 right Aug 21 20:50:01 Just keep in mind that while your server may send messages to the device (push) using GCM, your app on the device will NOT. UNLESS, you are able to set up a CCS server AND Google give you explicit permission to do that. If you depend on that, you may want to apply right away. Google haven't responded to my request yet... Aug 21 20:50:05 Unless your goal is millions of users, you'll probably be happier (and saner) sticking with 4.x Aug 21 20:50:41 Your app on the device will NOT be able to push to your server using GCM, it needs to talk to your server using REST or similar... I meant. Aug 21 20:51:01 yeah,thats fine. i only want push to save battery. Aug 21 20:52:01 i guess i'll just use gcm now and wait for amazon to approve my fricking creditcard so i can try their push service Aug 21 20:52:13 i think i tried all the others. none of them are any good Aug 21 20:52:34 .. which depends on GCM anyway. I think they are just unifying the different APIs from different providers. Aug 21 20:52:51 (and their own for their own devices obviously) Aug 21 20:52:54 are they? meh Aug 21 20:53:03 there's some stuff that doesnt use gcm Aug 21 20:53:12 like parse.com, but its eating battery Aug 21 20:54:08 i'm not sure how gcm works at all that it can wakeup the device Aug 21 20:54:40 Yeah, they are obviously polling, but so is GCM to some degree. I'm hoping to do some latency measurements on GCM to figure stuff out. Aug 21 20:54:49 jfpoole, 2.x is still something like 30% of the android userbase Aug 21 20:55:05 Yeah, but are they an interesting part of the userbase? Aug 21 20:55:19 wish there was some real data on that Aug 21 20:55:26 aep what do you mean? Aug 21 20:55:30 on userbase Aug 21 20:55:31 aep: http://developer.android.com/about/dashboards/index.html Aug 21 20:55:36 I've got a paid application and < 5% of my customers are on 2.x. Aug 21 20:55:44 yeah i mean on who those people are Aug 21 20:55:48 oh Aug 21 20:56:04 I'll bet there's one whose name is "Bob". Aug 21 20:56:07 jfpoole, well thats just confirmation bias just because your app has a low amoutn of 2.x users doesnt mean others dont Aug 21 20:56:38 the play store actually shows "your app" versus "top 10" in your category Aug 21 20:56:39 my application appeals to techies. not people who buy phones because they need some random phone Aug 21 20:56:42 desmin88: Indeed, but as I said earlier, unless you're going after millions of users, why bother targeting 2.x? Aug 21 20:57:47 is this channel for app developers or for contributors to the android os itself? Aug 21 20:57:56 app development Aug 21 20:58:08 ok Aug 21 20:58:08 Also, the platform statistics you pointed out only show how many devices are running each OS. There's no indication how many of those users are active application users. Aug 21 20:58:22 desmin88: #android-root has some platform develppment. but no idea if there is any where google guys are Aug 21 20:58:28 vs someone with a 2.x device who uses it as a phone and only a phone. Aug 21 20:58:30 wrong user Aug 21 20:58:36 true Aug 21 20:58:45 Discordian93: ^ Aug 21 20:59:07 I'm not interested in os development, it's fine for me if this is for app development Aug 21 20:59:25 anyone ever seen PgaGrallocLock: Invalid dimensions for lock Aug 21 20:59:43 jfpoole: yeah i think i agree. i'm more interested in targeting kindla than deadphones from the past Aug 21 21:01:07 damn, those stats put 4.0.3 and 4.0.4 in the same column, but 4.0.3 would be "broken" with GCM Aug 21 21:01:13 I was wondering, what do i need to know to be able to follow along the google android training pages? I'm currently a computer science freshman and I'm studying Java, should a basic knowledge of java be enough to get me started writing some basic apps? Aug 21 21:01:35 Juts for learning btw, I'm aware i need significant expertise for commercial grade apps Aug 21 21:02:11 aep: AFAIK most phones running 4.0.3 can upgrade to 4.0.4. Aug 21 21:02:21 ah Aug 21 21:02:34 i guess i'll just use it and pray or something Aug 21 21:02:41 (in that I'm not aware of any phones stranded on 4.0.3). Aug 21 21:04:55 Is someone here actually using the Android Studio graphical layout editor ? It has got to be the most un-intuitive piece of software ever .... makes me constantly re-define whatever I knew about drag and drop Aug 21 21:05:16 do people use nhibernate as an orm for android apps ? Aug 21 21:06:27 ddewaele, no gui editors ever work well, just use it in preview mode Aug 21 21:06:59 is the old nexus 7 stuck on 4.2.2? Aug 21 21:07:13 Discordian93: No. It's got 4.3. Aug 21 21:07:22 mmm Aug 21 21:07:30 for some reason mine doesn't upgrade Aug 21 21:07:41 f0ster : Apple managed to pull it off with XCode. I thought graphical layout editing was one of the main selling points of Studio (especially during I/O) Aug 21 21:08:46 well, studio is still a early preview Aug 21 21:08:52 hopefully they'll improve it Aug 21 21:11:18 Discordian93 : It was pretty crappy in Eclipse ADT as well... don't think they'll get it right ... like pfn states, might only be good in preview mode Aug 21 21:11:53 I don't know, as I've said I'm just getting started with android, I don't ven know what I need to know to get started Aug 21 21:12:23 Is knowledge of java enough to follow the basic tutorials? Aug 21 21:13:59 or dor do i need to know embedded systems stuff before diving in? Aug 21 21:14:07 f0ster: nhibernate is for .NET, so...unless they're writing their Android app in .NET, no. Aug 21 21:14:24 the google dev fee is 25$ annualy or only once? Aug 21 21:14:33 Discordian93: you should be able to get through the tutorials with Java knowledge. Aug 21 21:14:36 I think the fee is only once Aug 21 21:14:40 Thanks Ryan Aug 21 21:14:47 Just remember you have a LOT less memory than java on desktop Aug 21 21:15:02 and less processing power Aug 21 21:15:12 yes, $25 fee is only once Aug 21 21:15:14 Discordian93, java knowledge is good Aug 21 21:15:19 SrRaven, once Aug 21 21:15:20 My first apps will suck and freeze my tablet, I'm ready for that :P Aug 21 21:15:39 bah, good knowledge of java transfers well to android Aug 21 21:15:46 I dont even know how to code yet,but starting my CS degree in October. My App idea is pretty simple and the 25$ investment shouldnt kill me :) Aug 21 21:15:49 particularly on >2.0 devices :p Aug 21 21:15:52 Just don't do I/O on the main thread :-) Aug 21 21:15:58 I'm starting my cs degree in october too Aug 21 21:16:01 RyanM, that applies regardless of environment Aug 21 21:16:17 java apps on the desktop have historically had bad performance because idiots do shit on the main thread all day long Aug 21 21:16:18 ^ Aug 21 21:16:27 Discordian93 yei, except that im 5 yrs older so buh Aug 21 21:16:57 being older sucks ;-) Aug 21 21:17:03 I know how to code a bit in python and I'm learning java in udacity right now, and after learning java i wanna make some android games Aug 21 21:17:15 I'm 20, so I guess you are not that much older Aug 21 21:17:19 when you start uni and everything wasnt even born when you started school,thats meh Aug 21 21:17:22 that's not even android really then Aug 21 21:17:54 what uni Discordian93 ? Aug 21 21:18:05 UNED Aug 21 21:18:23 RyanM: hmm someone told me they were going to use nhibernate for an ORM in android.. yeah that doesnt make sense Aug 21 21:18:26 I had java for engineers once,wasnt too hard but failed cause my professor insisted I use the classes he wanted to,didnt matter if my version worked Aug 21 21:18:33 doesnt tell me anything,but cool Aug 21 21:19:28 It's spain's distance education uni Aug 21 21:19:33 oh Aug 21 21:19:38 sorry to hear :P Aug 21 21:20:03 SrRaven, doing it wrong is doing it wrong :p Aug 21 21:20:05 I plan to transfer to a traditional uni if I do well this year Aug 21 21:20:14 just 'cuz it "works" doesn't mean it's right Aug 21 21:20:34 pfn he insisted on using classes that arent official Aug 21 21:20:36 but right now, distance uni is cheaper and works around my narcolepsia Aug 21 21:21:09 so whenever I used the proper classes, I got a error on it Aug 21 21:21:47 official? Aug 21 21:21:51 SrRaven I would have failed you too Aug 21 21:22:03 thats not nice :( Aug 21 21:22:06 you can't learn about data structures and whatever by just using what is already in the standard library Aug 21 21:22:26 haha usually there's a reason profs tell you to do things a certain way Aug 21 21:22:34 regardless of whether you see it at the time or not Aug 21 21:22:44 our introductory course is taught in Scheme Aug 21 21:22:51 everyone hates it when they're first learning Aug 21 21:22:53 the reason was,that we never ever have to touch java again and the classes he provided were "easier" for us Aug 21 21:22:58 going by the homework questions in ##java, it's because of incompetence Aug 21 21:23:02 dcow what book / interpreter do you use ? Aug 21 21:23:19 we use a scheme thing too in programming 1 Aug 21 21:23:25 and java afterwards Aug 21 21:23:32 after 4 years you realize that functional languages are the shit Aug 21 21:23:48 g00s: We use Scheme + Mediascript Aug 21 21:23:50 we have to program a dig dug clone from what I heard Aug 21 21:23:53 so that'll be cool Aug 21 21:24:04 pioneered at MIT but we have our own literature and labs Aug 21 21:24:23 SrRaven were you at Berkely? Aug 21 21:24:29 I know they use Scheme Aug 21 21:24:47 nah jsut checked, its http://racket-lang.org/ what we use Aug 21 21:25:02 MIT has since dropped Scheme from their introductory repertoire Aug 21 21:25:07 Yep Aug 21 21:25:08 yeah we use DrRacket too Aug 21 21:25:37 I did an online version of mit's intro programming course and it's in python Aug 21 21:25:40 TU Darmstadt btw,if anyone even cares :P Aug 21 21:26:02 ah, germany Aug 21 21:26:22 yes,the EU mother :P Aug 21 21:26:39 The last country in europe where programming skills pay something Aug 21 21:26:52 52k a year is alright yes Aug 21 21:27:03 better than in spain Aug 21 21:27:15 here a cs degree is worthless Aug 21 21:27:22 as a german, spain and greece are like.....useless :P Aug 21 21:27:48 good to hire people from, but economically useless Aug 21 21:27:56 the unemployment rate is sickening Aug 21 21:28:04 Agreed, as soon as I get my degree, I'm laving and never coming back Aug 21 21:28:09 i hate my own country Aug 21 21:28:33 balllls Aug 21 21:29:54 I'll tell you why spain is economically useless: They don't value innovation at all. It's actually frowned upon. Traditional values rule supreme and any attempt to do something different is met with frowning. Aug 21 21:32:06 I can't tell anyone that I plan to be a programmer, it's just looked upon badly, nobody knows what programmers do or care, when people see me writing programs they think it's like using an antivirus or pirating software "something that computer people do" and that requires no skill Aug 21 21:32:17 It pisses me off to no end Aug 21 21:33:46 Tell them you intend to be a traditional programmer, and use C instead of Java >:^D Aug 21 21:34:09 Discordian93 : one piece of advice for your Android development endeavours : Avoid frustration with the standard Android emulator. It sucks bigtime, will cause you a lot of frustration and takes all fun out of development. Look at genymotion.com for a fast smooth emulator instead or develop on actual android devices. Aug 21 21:34:36 Or just use the HAXM image Aug 21 21:34:55 Just received an email from Google: "Get started with the new GCM APIs!". Wonder if this means my CCS application was approved, or if it's just "advertising" the GCM APIs to all users. Anybody else got the email? Aug 21 21:34:58 rather the intel image with HAXM virtualization extensions Aug 21 21:35:05 And programming is just an example, but for example, even after the housing bubble burst, people still think owning a home is a must and that renting is wasting money, and this comes from people that have lost millions on the bubble. And being able to speak english is seen as a super-eliteskill that is incredibly hard to gork Aug 21 21:35:31 grok* Aug 21 21:36:17 Renting is pretty useless. You lose money because of stupid bankers offering bad mortgages. It's still always better to own a place if you do it correctly Aug 21 21:36:19 dcow : even those are pretty slow last time I checked. And no intel 4.3 image Aug 21 21:36:37 yeah no 4.3 image sucks but that will come, ddewaele Aug 21 21:36:50 if you plan to skip country, owning a home is apretty bad idea Aug 21 21:36:54 On my machine it actually runs faster than android Aug 21 21:37:08 *native android Aug 21 21:37:20 Discordian93: well yes Aug 21 21:37:39 As Rockerfeller said, "Own nothing, control everything" Aug 21 21:37:45 Discordian93: that's true. if you're in any place short term it's not favorable Aug 21 21:38:15 dcow : and no google play services in the < 4.3 images Aug 21 21:38:24 honest to god question btw, are "app developers" actually looked after at the moment or is the job market flooded with them? Aug 21 21:38:30 btw the english thing leads to spanish developers sucking hard, since they can't read documentation Aug 21 21:38:47 SrRaven: iOS developers are fine. Aug 21 21:38:53 No idea re: Android developers. Aug 21 21:39:10 meh,id rather not develop for iOS Aug 21 21:39:21 cant stand the apple philosophy Aug 21 21:39:33 Preach it Raven Aug 21 21:40:07 screw cupertino, fandroids forever! Aug 21 21:40:19 sadly iOS is where the money is Aug 21 21:40:27 SrRaven: what's the "apple philosophy"? Aug 21 21:40:30 Theft Aug 21 21:40:32 overpriced Aug 21 21:40:53 closed stolen overpriced hipster system Aug 21 21:41:03 I find it hard to point to anything Apple have done that they didn't first take Aug 21 21:41:19 * jfpoole wonders what he started. Aug 21 21:41:23 I'd argue the android philosophy is give everything for "free" at the expense of being able to watch your every move Aug 21 21:41:26 Where do you think iOS comes from? Aug 21 21:41:50 ios still watches everything you do, but you pay for it Aug 21 21:42:16 Android has not developer support, bad documentation, and is understaffed. Aug 21 21:42:26 Pick your poison I'd say. Aug 21 21:42:31 It's BSD Aug 21 21:42:32 and being open source,m chances are android actually has less spyware Aug 21 21:42:46 at least in the core os Aug 21 21:42:53 Discordian93 lol Aug 21 21:42:54 this entire conversation is making everyone in here dumber for having been present for it. Can you take it to #android where trite conversation like this belongs? Aug 21 21:42:54 I'm not talking about spyware. It's the Google business modle Aug 21 21:43:36 "spyware" wasn't the word to use there. but agreed, let's stop this, it's getting stupid Aug 21 21:45:09 paying for things becomes less and less of an issue, Discordian93 w/e I have been having incredible frustrations *developing* for android lately Aug 21 21:45:20 Talking of stupid, I have a problem which makes me very sad. I have a complex app to develop and can't seem to find the right UI to present to the user an always-available quick list of components to jump to. I've been playing with fly-in/slide-out navigation with DrawerLayout and SlidingMenu etc. but they all require unnecessary bloat Aug 21 21:45:43 Like requiring a huge support library or ActionBarSherlock. I can't seem to find anything clean, small and simple that works :( Thoughts? Aug 21 21:45:51 lovethang_: spinner? Aug 21 21:46:00 huge support library? Aug 21 21:46:07 it's like 40K Aug 21 21:46:19 :-| Wow Aug 21 21:46:24 JakeWharton: YEAH BUT DO YOU KNOW HOW SMALL ASM PROGRAMS WERE BACK ON THE C64?! Aug 21 21:46:25 and if you turn on proguard optimizations... Aug 21 21:46:26 4v is bigger than that Aug 21 21:46:29 android-support isn't that huge Aug 21 21:46:37 I guess when your livelihood is on the line, philosophy becomes less of an issue. I prefer android because of philosphical reasons, been a linux and open source fanatic since I was like 12 Aug 21 21:46:46 But it's like importing the universe when all I want is a DrawerLayout Aug 21 21:46:51 i read too much fsf propaganda at a vulnerable stage Aug 21 21:46:55 lovethang_: let proguard sort it out Aug 21 21:47:04 I am a C programmer, this is not in my nature Aug 21 21:47:09 500k isn't that big Aug 21 21:47:15 lovethang_: surprise! to make things happen requires both code and resources. Aug 21 21:47:16 and yes, proguard can filter it out Aug 21 21:47:21 lovethang_: this isn't C Aug 21 21:47:23 The programmer should sort it out and 500k is unprecedented :-O Aug 21 21:47:30 JakeWharton: I'm running all my Android apps off a floppy drive adapter that emulates an SD card, so 40k is a lot of space to me. Aug 21 21:47:37 I know and because of that people think it's ok to have such bloat Aug 21 21:47:39 I am shocked to my core Aug 21 21:47:45 lovethang_: okay Aug 21 21:47:56 whatever Aug 21 21:48:00 just do it yourself then Aug 21 21:48:07 ++ Aug 21 21:48:09 lovethang_: I feel ya, and I'm rather new in the Android dev world too, but I think you'd be better off biting the bullet and succumbing to the bloatness. Aug 21 21:48:19 /extras/android/support/v4/src Aug 21 21:48:20 evanc: and this convo is any better? Aug 21 21:48:23 copy what you need Aug 21 21:48:23 and if you'd really cared, you'd be writing this all in C Aug 21 21:48:24 I was wondering if I could get the stuff I require out of the support library and create a minified version containing just what I need Aug 21 21:48:26 and use the ndk Aug 21 21:48:28 and then you'd be done Aug 21 21:48:39 lovethang_: that's literally the entire point of proguard. Aug 21 21:48:42 lovethang_: you probably could, but do you really want to support it? Aug 21 21:48:51 my app is 0K because I never wrote it. bloat free! Aug 21 21:48:59 (it=your own version of the support lib) Aug 21 21:49:10 JakeWharton but how many methods? maybe its empty calories :) Aug 21 21:49:24 Well I get what proguard is for but really you're then putting faith in a third party tool and making yourself oblivious to it, that just doesn't fit in with my philosophy of passing responsibility off to something else for what the programmer should be doing Aug 21 21:49:24 dcow: at least it's about android app development. Aug 21 21:49:28 Achillion: He doesn't even need to! He can just use proguard, as has been suggested repeatedly. Aug 21 21:49:42 fun fact: Android apps are awful. don't waste time worrying about 40K and try to write an app that doesn't suck using whatever is available Aug 21 21:49:56 lovethang_: any time you use any third-party library, you're putting faith in a third-party tool and making yourself oblivious to it. Welcome to computers? Aug 21 21:50:00 well, gonna go learn about how arrays are done in java, apparently they are a lot more complex than lists in python. Bye! Aug 21 21:50:12 RyanM: Right, my bad. Just saying, even without proguard... Aug 21 21:50:14 lovethang_: Well I get what the Java compiler is for but really you're then putting faith in a third party tool and making yourself oblivious to it, that just doesn't fit in with my philosophy of passing responsibility off to something else for what the programmer should be doing Aug 21 21:50:29 How can I change things like actionbar color and text color if I' Aug 21 21:50:33 m using actionbarcompat? Aug 21 21:50:56 use the theme and styles Aug 21 21:50:57 desmin88: styles Aug 21 21:51:03 I get that but you miss the point that it's not a problem to use a third party library, it's just a problem to order a keg of beer when I only want a drop Aug 21 21:51:33 lovethang_: there are trade offs everywhere Aug 21 21:51:33 I tried, but the ability to set the actionbar style was added in api 11 Aug 21 21:51:36 I shouldn't just throw it at proguard and hope that it will return the smallest it can, I would rather create a custom library and support it. A huge support library for a little scroll-out menu is sledgehammer for a walnut Aug 21 21:51:45 lovethang_: not only is it more cost-effective to ship kegs, but good luck brewing drops Aug 21 21:51:49 your analogy sucks Aug 21 21:51:52 lol Aug 21 21:51:57 This is getting interesting. Aug 21 21:52:08 I think sledgehammer for walnut is better Aug 21 21:52:08 And im minimum api 7 Aug 21 21:52:19 engineers don't dry mud into bricks when they build houses Aug 21 21:52:21 lovethang_: it's better and wrong Aug 21 21:52:36 Reinventing the wheel, etc, etc. Aug 21 21:52:37 JakeWharton: maybe *you* don't Aug 21 21:52:41 and then grows trees to cut 2x4s Aug 21 21:53:14 dcow, whats the alternative to styles if i cant use them? Aug 21 21:53:14 if you want to compile custom binaries for arm go ahead Aug 21 21:53:25 desmin88: write your own actionbar Aug 21 21:53:42 well thats certainly one route to take Aug 21 21:53:51 Let's put it simply. If you don't want to trust third-party tools, why do you trust the Java compiler? Why not write the bytecode yourself to make sure it's the smallest it can be? Aug 21 21:54:05 RyanM: http://cm.bell-labs.com/who/ken/trust.html Aug 21 21:54:15 at the Java level people seem to prefer extensive libraries Aug 21 21:54:20 Also there are some awful bugs in Android with using a webview inside certain layouts in fragments, and the DrawerLayout might not even be the best thing to use because I want each different activity to instantiate itself but the example given on the Android dev site simply replaces an existing fragment with a pic of a new planet Aug 21 21:54:36 build them all and let proguard sort 'em out Aug 21 21:54:43 ^ Mortified Aug 21 21:55:05 lovethang_: then write your own. golly Aug 21 21:55:13 I don't know Java ¬_¬ Aug 21 21:55:21 lovethang_: Mortified Aug 21 21:55:24 But I want to write this in Java Aug 21 21:55:30 And I want to do it the "Android way" Aug 21 21:55:38 > And I want to do it the "Android way" Aug 21 21:55:41 ^ Aug 21 21:55:44 import the support library Aug 21 21:55:46 lovethang_: you have two options: 1) use the libraries or 2) don't. Your choice; but there is no magical two-byte drop-in solution that lets you also have control over everything or whatever it is you want. Aug 21 21:56:02 jarjar the JVM into your app, use Swing Aug 21 21:56:11 JakeWharton++ Aug 21 21:56:13 JGlassPane Aug 21 21:56:30 programmers are such neat freaks. They need more java corruption. Here's a 2 MB library with 30 dependencies for the single function you want from it Aug 21 21:56:43 lol. Aug 21 21:56:45 alankila: I think you just described the entire Apache everything Aug 21 21:56:59 guava ftw Aug 21 21:57:04 also guava Aug 21 21:57:10 Well each platform has its own customs so sure why wouldn't I. I wish there was just an easier way to present a UI for a complex app with lots of activities that didn't require a massive bloated support libraries(s) Aug 21 21:57:27 evanc: yeh, pretty much. Almost everything from apache namespace is pure crap Aug 21 21:57:56 lovethang_: I bet you can write something that serves your prupose in 200 lines of code Aug 21 21:57:59 lovethang_: Just write the drawer ui your self? Aug 21 21:58:14 using the stock views/widgets Aug 21 21:58:42 lovethang_: also look at the spinner nav model Aug 21 21:58:46 I hope so but I don't know if I know enough yet Aug 21 21:58:56 well you see that's the problem Aug 21 21:58:57 dcow: Yes I have been looking at that Aug 21 21:59:13 So I'm having a small issue. with Android studio my application builds fine, but when I build through ant, it doesn't build in my res/values and res/values-ja folders aren't built in to the apk, anyknow got an idea? Aug 21 21:59:20 lovethang_: don't whine to us because you don't know enough Android+Java to do something your way Aug 21 21:59:27 Well I'm new to Java but not new to development, my test app already has network connectivity, databases and is talking to 2 BT devices Aug 21 21:59:33 Just presenting this in the UI is really the problem I face Aug 21 21:59:44 just use the support library or learn more java, easy. Aug 21 21:59:48 the support library serves a distinct purpose and it's to make android seamless back to 2.1 Aug 21 21:59:58 I don't need that, my app will run on 1 hardware platform Aug 21 22:00:07 evanc: I think I've read that before but it was worth another read. Aug 21 22:00:10 then write your own Aug 21 22:00:25 support lib is open source (= (= Aug 21 22:00:33 pull the classes you need Aug 21 22:00:35 i wouldn't be surprised if the support library keep getting more cool stuff, or important stuff to help with compatibility when android 5 comes out, so you may as well get used to it Aug 21 22:00:42 +1 @dcow Aug 21 22:00:51 lol @ goos, yes Aug 21 22:02:36 But say I was to use the stock support library or create a minified version containing just what I need, I still don't see how one switches out whole activities as the example doesn't show them being instantiated Aug 21 22:03:05 It's just changing the drawable of an ImageView and I need something that would swap out whole activities Aug 21 22:03:16 you can switch out fragments, or start a new activity Aug 21 22:03:17 This is where I fall down, on the UI Aug 21 22:03:33 guava is nice but doesn't get along well with proguard, much to my dismay Aug 21 22:04:41 kevinb: Could the new activity run within the existing one or would it have to totally replace it and also create a new DrawerLayout to switch back to the original activity? Aug 21 22:06:35 lovethang_: Sounds like you should be using Fragments. Aug 21 22:06:37 lovethang_: that's what fragments are for. or if you don't want the overhead of fragments manage the views by yourself. Aug 21 22:07:14 or if you don't want the overhead of views, just have one big view that you draw the whole screen :P Aug 21 22:07:18 I did try with fragments but I couldn't see a way to get it to instantiate the class related to the activity of that fragment Aug 21 22:07:33 Took me a while to figure out fragments myself. Aug 21 22:07:38 Also sadly I discovered some bugs in Android when using a webview in certain layouts in fragments and one of the components of the app will use a webview Aug 21 22:07:51 yeah fragments suck until you figure them out Aug 21 22:08:00 WebView can be buggy sometimes, I'll give you that. Aug 21 22:08:06 But it's one of those things that require that one "OOOOooooh, *that*'s how it works" moment and it all makes sense. Aug 21 22:08:20 WebView is a whole different story, RyanM Aug 21 22:09:00 Achillion: until you put fragments in fragments and you app doesn't work and you have no idea why then you learn on SO that you can't do that but it's not mentioned anywhere in the docs.. Aug 21 22:09:05 dcow: they suck after you figure them out Aug 21 22:09:06 Unfortunately the webview bugs are a show-stopper, but I did get a little way with a DrawerLayout and fragments, just couldn't see how to get it to call the onCreate for each fragment I was using Aug 21 22:09:27 dcow: hahaha, sounds horrifying. Aug 21 22:09:35 JakeWharton: I was trying to be optimistic Aug 21 22:09:43 JakeWharton: but I tend to agree Aug 21 22:10:13 RyanM, what about guava doesn't get along with proguard? Aug 21 22:10:28 RyanM, it doesn't shrink much? Aug 21 22:10:41 Would it also not be bad practice to have an app with 30-40 activities as fragments instead of as activities? Aug 21 22:11:07 30 activities? Aug 21 22:11:12 wow, your app sounds too involved Aug 21 22:11:13 that sounds like a bad practice Aug 21 22:11:17 sounds like you need one ListView with 30-40 ways to query your database Aug 21 22:11:21 It is a very big app with a lot to do Aug 21 22:11:30 Without a config it doesn't even compile. Their official recommendation is to (in addition to ignoring the warnings causing this) disable optimization and obfuscation. Aug 21 22:11:42 Hence the need for UI to be as easy and quick as possible (hence the DrawerLayout or something similar seeming best) Aug 21 22:11:45 with 30-40 activities, 40k support library should be negligible Aug 21 22:11:47 fwiw Aug 21 22:11:49 RyanM, you have to disable optimization in android anyway, otherwise dex fails Aug 21 22:11:56 pfn: uh, no. Aug 21 22:11:58 theelfismike: Hence why every byte counts ¬_¬ Aug 21 22:12:13 RyanM, dex is extremely sensitive to optimizations Aug 21 22:12:15 it will fail Aug 21 22:12:23 dcow: All of them are very different there is no generic pattern Aug 21 22:12:36 how is that one application? Aug 21 22:12:41 getting better with this layout thing http://gyazo.com/5658ed4af8ac69e49a07404d15c5d847 Aug 21 22:12:45 pfn: our app on the market with proguard begs to differ. Aug 21 22:13:04 unless the ant proguard task automatically disables it Aug 21 22:13:08 optimization is OK at 1 pass Aug 21 22:13:27 if you let it keep going until it decides it can't any more, you'll often wind up in trouble Aug 21 22:14:10 thoughts? Aug 21 22:14:24 well then yes, one activity where you swap out fragments sounds better than 30 activities. but I don't know anything about your app. you might benefit from having a base activity that they all extend from. Activities are also entry points for your app. if each activity can stand on it's own and it is logical to want to be able to enter the app through any of them then go that route Aug 21 22:14:30 the obfuscation is what we really want. Aug 21 22:14:30 i haven't tried proguard 4.10 yet , hm Aug 21 22:15:09 or you have one activity that takes the information about what data it should show in the intent and attach one of 30-40 fragments Aug 21 22:15:14 it's really up to you. Aug 21 22:15:36 dcow: There has to be a single point of entry (setup and authentication) as there is a network connection started, accesses to databases opened and initialisation of 2 BT devices needs to be done before any of the activities can work Aug 21 22:16:20 sounds like a job for a service, lovethang_ then each activity can be required to bind to the service Aug 21 22:16:35 lovethang_: as in extend from a base activity that binds to the service Aug 21 22:16:38 dcow: Already using 2 services in my test app, this is more about presenting the UI in the "right" way to make it quick for the user Aug 21 22:16:58 well I'm not a consultant for you company.. that really up to you Aug 21 22:17:22 lovethang_ medical app? Aug 21 22:17:23 sounds like you need to explore what android can do in general a little more though Aug 21 22:17:38 RyanM, just because it's working now doesn't mean it will continue to Aug 21 22:17:45 so that you can feel comfortable with whatever decision you end up making Aug 21 22:17:51 and so you make a logical one (= Aug 21 22:18:53 dcow: Yes, I have been looking at UI examples and the DrawerLayout seems the quickest way to let a user jump between different parts of the app. But I can't seem to get it to create the same effect as launching a new activity and having its onCreate run, with each fragment replaced. Other than that it would seem ideal from a UI stance Aug 21 22:18:59 theelfismike: ERP Aug 21 22:19:29 fragments have an onCreate, lovethang_ Aug 21 22:19:42 None of them were being called and I spiralled in to a deep depression Aug 21 22:20:00 are you adding them and commiting them via a FragmentTransaction? Aug 21 22:20:02 RyanM, and yes, default proguard config for android disables optimizations Aug 21 22:20:08 Also then I found out the entire support library was being imported when I didn't use most of it Aug 21 22:21:14 theelfismike: I tried a mashup of the DrawerLayout example app in developer docs with some of my activities and it wasn't doing it, I am looking now to see if it was a transaction although I do seem to recall that Aug 21 22:21:34 make sure you call commit() at the end of the transaction Aug 21 22:21:49 FragmentTransaction tx = getSupportFragmentManager ().beginTransaction (); tx.replace (R.id.content_frame, Fragment.instantiate (HubActivity.this, fragments[0])); tx.commit (); Aug 21 22:21:54 Yes is how it was working Aug 21 22:21:58 But no onCreate was being called Aug 21 22:22:24 of course onCreate got called Aug 21 22:22:49 Log.d (TAG, "onCreate called for this activity"); // Never displayed Aug 21 22:23:03 and where is that log line Aug 21 22:23:08 looks like it's your activity not fragment Aug 21 22:23:16 lovethang_, so? Aug 21 22:23:20 In the onCreate of the class behing the fragment Aug 21 22:23:20 HubActivity.this implies you already have an instance of this Aug 21 22:23:24 use @Override Aug 21 22:23:26 why would the activity get created again? Aug 21 22:23:49 lovethang_: it needs to be in the onCreate of the fragment, not the class "behind" the fragment Aug 21 22:23:52 pfn: Call me old fashioned, but if a program is arbitrarily not executing instructions then "so" becomes quite A Very Bad Thing™ Aug 21 22:24:18 onCreate should be called in your *fragment* not in your *activity* Aug 21 22:24:19 Oh the message is supposed to be "onCreate called for this fragment"? Aug 21 22:24:32 pfn: Yes it did Override, and yes the class was attached to the fragment Aug 21 22:24:33 lovethang_: sounds like you're not entirely understanding fragments' lifecycle Aug 21 22:24:38 onCreate only happens once* in your activity Aug 21 22:25:12 dcow: You are entirely correct, but this is the crux of my issue. When the DrawerLayout lets the user choose another part of the app, it needs to instantiate that component and display its fragment Aug 21 22:25:33 lovethang_, uh, you didn't @Override, so you didn't implement onCreate like you thought Aug 21 22:25:42 aka, pebkac, you're doing it wrong Aug 21 22:25:44 pfn: I did Override Aug 21 22:25:48 so you say Aug 21 22:25:49 lovethang_: just clarify, is that Log.d message in an activity or fragment subclass? Aug 21 22:25:51 onCreate should be called in your *fragment* not in your *activity* Aug 21 22:25:58 lovethang_: so listen to what we just said. when a fragment is added it is attached to the *activity* not the other way around Aug 21 22:26:19 I am looking at the code now, it says @Override quite clearly Aug 21 22:26:31 dcow: Ok I am learning Aug 21 22:26:33 your activity callback don't get called for each fragment added, your fragment's callbacks get called Aug 21 22:26:56 pastebin the fragment's oncreate Aug 21 22:27:20 dcow: Can I just check, by "added" you mean "replaced" and the old fragment is destroyed? (which is what I want) Aug 21 22:27:27 and yes, onCreate in the fragment gets called per each fragment that gets created, just like onCreate gets called once in each activity that gets created Aug 21 22:27:33 lovethang_: yes Aug 21 22:27:39 replace is just remove then add Aug 21 22:27:53 Ok great, that's ideal for my situation otherwise I would soon run out of RAM Aug 21 22:28:06 fragment manager will manager your ram Aug 21 22:28:28 The kernel will manage my arm Aug 21 22:28:43 well of course. Aug 21 22:28:47 I would hope se Aug 21 22:28:48 so Aug 21 22:29:23 I need to put a simpler test app together I think to try this all again, I fully accept it seems I've done something quite dippy Aug 21 22:29:25 Hence me being here Aug 21 22:29:53 Anyone used Digital Ocean to host anything for their apps? Aug 21 22:30:44 lovethang_: +1 for prototyping Aug 21 22:30:58 lovethang_: things don't work well till you iterate, imho Aug 21 22:31:05 lovethang_: including learining Aug 21 22:31:22 dcow: I am here to be schooled so I fully accept this lol Aug 21 22:31:28 I have been using Java only for a week now Aug 21 22:34:12 lovethang_: sure but I'd start with a book on Java and a book on Android (or at least the dev docs) Aug 21 22:34:18 oh dear Aug 21 22:34:20 :p Aug 21 22:34:35 Effective Java is great Aug 21 22:34:53 So I'm having a small issue. with Android studio my application builds fine, but when I build through ant, it doesn't build in my res/values and res/values-ja folders aren't built in to the apk, anyknow got an idea? Aug 21 22:35:08 and there's an o'reily Learning Android (or more advanced Programming Android) book Aug 21 22:35:14 take a few weeks and read those Aug 21 22:35:21 then prototype your app Aug 21 22:35:22 dcow: Ain't nobody got time for that Aug 21 22:35:35 not to be mean but that ain't our problem Aug 21 22:35:43 people are insistent in doing a lot of hard work to avoid some light work Aug 21 22:35:44 ain't nobody got time to school you either Aug 21 22:36:04 here i am, entertain me ! Aug 21 22:36:13 well there you go Aug 21 22:36:21 dcow: I know :) In fairness I've figured out the complex stuff on my own in a small space of time, and I could present the crappiest UI in the world by just having a long list of new activities to launch. I've just come here to learn the "best" way of presenting a good UI Aug 21 22:37:00 lovethang_: focus on tasks the user is performing and make them as intuitive and pretty as you can. Aug 21 22:37:21 lovethang_: well an app drawer is a hot navigation model right now Aug 21 22:37:24 alankila: Fortunately for me this is a mirror of an existing app so that is pretty much done for me Aug 21 22:37:38 !_! Aug 21 22:37:50 * alankila should probably try to beat some sense into FBReader or get some different epub reader app Aug 21 22:37:55 alankila: But it's a web app Aug 21 22:37:57 these things all seem to suck Aug 21 22:38:08 Sonicadvance1, if you're using studio, why are you using ant, you should be using gradle Aug 21 22:38:27 So my renderscript building problem got solved. I had to nuke the site from orbit, i.e., cleaned out my build environment and reinstalled SDK and build tools. Aug 21 22:38:41 Achillion, that sounds like the wrong way to fix it.... Aug 21 22:38:50 pfn: I know and I feel bad. Aug 21 22:39:07 What is it with Android and sledgehammers+walnuts :D Aug 21 22:39:16 newbies Aug 21 22:39:18 that's what it is Aug 21 22:39:23 the documentation on where to put renderscripts isn't good, in fairness Aug 21 22:39:29 pfn, automated build system is using ant Aug 21 22:39:30 But I figure it might be due to renderscript being a sort of new thing that's in pretty active development coupled with android studio being similar. Aug 21 22:39:40 Sonicadvance1, you should be using gradle if you're using android studio Aug 21 22:39:50 As far as I can tell you can dump renderscripts anywhere in the src folder. Aug 21 22:39:51 and all that getting messed up between version upgrades of both the sdk and the IDE. Aug 21 22:39:52 Achillion, renderscript came out with android 2.3 or something Aug 21 22:39:54 Achillion, there's nothing new about it Aug 21 22:40:14 pfn, Should be, but I don't have to be Aug 21 22:40:25 ant builds the APK, just doesn't grab all the resources Aug 21 22:40:27 what I don't get it is why does it then require me to specify the package too in a # metadata. Why can't it just pick the package up automatically. Aug 21 22:40:33 Sonicadvance1, that's because you're using ant and not gradle Aug 21 22:41:07 gradle layout for renderscript puts it in src/main/rs now Aug 21 22:41:25 pre-gradle, they just went under src/ Aug 21 22:41:25 alankila: that's the problem, with a gradle build you put it in main/java/rs Aug 21 22:41:37 pfn: I thought it was introduced at 3.0. Regardless, it's went through heavy changes during 4.0-4.3, and the documentation isn't too great. Aug 21 22:41:52 Achillion, was it? I don't recall, even so, 3.0 is over 2 years old Aug 21 22:41:55 pfn, not using renderscript though, just isn't pulling in my res/values* folders Aug 21 22:41:58 Achillion: it's also been superceded by FilterScript Aug 21 22:42:15 which is almost the same as RenderScript but different suffix and some new limitations: no 64-bit types & no pointers allowed Aug 21 22:42:25 Achillion: I understand your pain. The docs lead you to believe the scripts go in the same folder as the package Aug 21 22:42:47 regardless, they don't so you have to specify the package Aug 21 22:42:48 dcow: well, right now, with my clean build env, it works with the scripts in the same folder. Aug 21 22:42:58 dcow: hmh. I can't say I like that direction but then again I can probably spend a long time before I have to switch to gradle Aug 21 22:42:59 it won't forever Aug 21 22:43:27 alankila: FS isn't great for my purposes. I need high accuracy. Aug 21 22:43:35 Achillion: okay. Aug 21 22:44:54 * alankila was thinking about whether to abuse renderscript to do FFT but isn't sure if it compiles better than NDK for non-parallelizable computation. Aug 21 22:45:10 dcow: I'll try to get it right this time, but right now I'm more happy about it working at all. Aug 21 22:45:36 also might be good idea to see if some of that complex computation could be expressed as float2 or float4 better Aug 21 22:45:48 could actually speed things up. Aug 21 22:46:47 I considered it. Aug 21 22:47:08 and it's in the neverending todo list. Aug 21 22:49:48 So, now that this is fixed, at 02:00, time to get working! Aug 21 22:57:36 sorry to barge in (not a dev) but I would love some input on an issue I am trying to realize / implement using script apps like Tasker or App Reactor. Anyone thinks I could drop off a few questions here or am I way in the wrong place here? Aug 21 22:58:51 the gist of it is I want to be able to emulate / simulate an incoming phone call when actually there is none, to trigger a ring fnction on my vehicle handsfree BT unit, in order to replace notifications that are not loud enough to be heard while driving... Aug 21 23:00:29 a more verbose description is here http://pastebin.com/bCpc1sg1 maybe someone has two minutes to let me know I am smoking crack to believe this could work, or point me in whatever direction. I don't need a silver platter solution but a pointer / direction would be most appreciated Aug 21 23:01:02 hello gentlemen Aug 21 23:02:44 Anyone has experience with external displays on Android >=4.2? I'm trying to figure out which resolutions my device would support for external displays but I can't find an API to get this info. Aug 21 23:06:19 Can I ge some feedback on my ui? http://gyazo.com/e42f4d848eb28d0999140f77fa500291 Aug 21 23:06:40 desmin88 hehe Aug 21 23:07:04 I already know your opinion, g00s Aug 21 23:07:08 hahaz Aug 21 23:07:11 haha* Aug 21 23:07:18 feedback for what? Aug 21 23:07:26 color contrast too subtle Aug 21 23:07:31 idk just what you think about it Aug 21 23:08:07 does the blue circle on each entry do anything? Aug 21 23:08:18 its more of an indicator Aug 21 23:08:24 ah, ok. Aug 21 23:08:25 how do you do those popup menus in the middle of nowhere anyway Aug 21 23:08:28 is there a standard control for that? Aug 21 23:08:39 (not desmin88's screenshot, but the pattern that's been popping up in general) Aug 21 23:08:48 you mean the cards? Aug 21 23:08:55 dcow: pfn: Yes you were right about fragment activity lifecycle, but it's onCreateView rather than onCreate which I need. My prototype is working ok so far Aug 21 23:09:22 lovethang_, depends on what you're doing, if you're creating/working with views, then you need onCreateView, yes Aug 21 23:09:36 pfn: Yes this is working ok for me so far Aug 21 23:09:38 pfn: It's simply a listview with some fancy padding. Aug 21 23:09:51 desmin88, no, not talking about your ui Aug 21 23:10:05 pfn: It's instantiating fine now which is what I needed Aug 21 23:10:16 oh, then what do you mean popup menus? Aug 21 23:10:40 nicklos: no idea Aug 21 23:12:42 lovethang_: cool Aug 21 23:13:33 noob question. So if I set the onClickListener for a listview row I lose the blue click feedback. What is happening that causes that? Aug 21 23:15:16 dcow: Do you not want setOnItemClickListener ? Aug 21 23:15:33 it's different for every row. I'm doing this in getView Aug 21 23:16:01 and it should only happen in certain cases. normally you'd want that Aug 21 23:16:25 dcow: I am using this also to quickly recycle rows in a listview using setOnItemClickListener Aug 21 23:16:52 Achillion no idea how it could be done? no idea if it could be done at all? Aug 21 23:19:06 But I'm doing something a bit weird where some rows when clicked bring up a LockPatternActivity or a password input depending on the security each user has setup, but also then clicking on the facepic when a row is selected brings up a zoomed picture and it seems to be working fine for me Aug 21 23:19:49 I'm sure it can be done Aug 21 23:20:35 nicklos: I'm sure it *can* be done, I'm just not sure how and how much hacking is invloved. Aug 21 23:21:14 The data is internal to the adapter so I want to handle clicks there. I don't have a list that I keep in my fragment off of which I can reference Aug 21 23:23:56 <|0xD34D|> dcow: you probably need to create a selector with the appropriate states and set that as the background for your row Aug 21 23:26:18 |0xD34D|: if my listview style extends the holo listview style I thought it would do that by default Aug 21 23:27:28 <|0xD34D|> if you use an OnItemClickListener does it show the selection correctly? Aug 21 23:29:20 Achillion thanks for your take on the question, the "hacking involved" phrase suggests to me that this is very likely not possible with ust some Tasker Profile or App reactor script but it indeed requires a discrete app that talks to the BT stack on a more involved level than those scripts can achieve Aug 21 23:29:43 so, yeah, thanks a lot for your quick assessment ;) Aug 21 23:32:28 |0xD34D|: it looks like I override the background of the view for each row in a separate style for my rows. that's probably why Aug 21 23:32:38 <|0xD34D|> that would do it Aug 21 23:32:42 <|0xD34D|> I think Aug 21 23:32:51 <|0xD34D|> good place to start though Aug 21 23:54:48 oh cool, a google video on using RxJava on android Aug 21 23:55:28 wow, RxJava has come a long way since i first looked at it (0.5) Aug 21 23:56:30 * pfn takes a break and plays a little lol Aug 21 23:56:51 need to go shop for a new bathroom vanity and toilet tonight :-/ Aug 21 23:57:32 Should the ant build automatically just pull in everything in the res/ folder? Aug 21 23:57:50 yes, it uses aapt Aug 21 23:57:55 if it doesn't, you done something wrong Aug 21 23:58:03 hi, when i have Matrix.orthoM(mProjMatrix.. does z position make any difference, becouse no matter to what i set the z position, the last triangle is allways over the that was drawed before ? Aug 21 23:58:04 g00s link to video? Aug 21 23:58:21 shigeru http://www.youtube.com/watch?v=DA0ZAnxUKDk Aug 21 23:58:35 rxjava builds with gradle? what kinda sucky crap is that Aug 21 23:58:41 ah cool thanks Aug 21 23:58:43 i think ive seen that one Aug 21 23:59:51 pfn, I've done something wrong then :| Aug 22 00:00:03 Sonicadvance1, just ant -verbose and look at your aapt line Aug 22 00:00:11 man square and netflix are pretty awesome when it comes to android open source Aug 22 00:00:50 shigeru here is the most recent video he did http://www.infoq.com/presentations/Netflix-API-rxjava-hystrix Aug 22 00:01:21 |0xD34D|: well that wasn't the problem Aug 22 00:01:44 shigeru i dont think that second video has anything new if you're already familiar with it though Aug 22 00:01:57 thanks Aug 22 00:02:22 i feel like i get the basic idea, itd be cool to see a real project that uses it though Aug 22 00:02:25 yeah, at LambdaJam Aug 22 00:02:42 pfn, I assume the resources are supposed to be put in with the -package-resources step? Aug 22 00:06:35 How do I add the namespace com.google.ads to my android project? I downloaded the Google AdMobs package with the download manager but the namespace is still not there Aug 22 00:09:17 Sonicadvance1, yes Aug 22 00:10:07 :/ Aug 22 00:10:19 It's just weird, only the translation files aren't getting moved over Aug 22 00:10:23 http://developer.android.com/training/basics/supporting-devices/languages.html <---Those ones Aug 22 00:11:41 ugh! Aug 22 00:14:42 Any tips… Do I have to add something to my manifest or something? Aug 22 00:15:09 Sonicadvance1, and what's the output of ant -verbose? Aug 22 00:15:15 Sonicadvance1, pastebin your dir structure, too Aug 22 00:19:52 pfn, ant output http://pastebin.ca/2435577 and dir structure http://pastebin.ca/2435580 Aug 22 00:21:10 use find or tree Aug 22 00:21:20 alright Aug 22 00:21:54 > Add external jar, find the .jar in the extras folder of the android sdk. Aug 22 00:22:32 pfn, http://pastebin.ca/2435583 new tree Aug 22 00:25:22 Sonicadvance1, unzip -t Dolphin Emulator.ap_ Aug 22 00:27:24 pfn, http://pastebin.ca/2435588 Aug 22 00:30:20 I'm blind or I don't even see values in there Aug 22 00:30:41 Like I said, ant hasn't been putting them in for some reason :< Aug 22 00:30:58 or they're packed into the arsc Aug 22 00:31:22 I forget, use aapt d to look at it better Aug 22 00:33:12 yes, values are stored in the resources.arsc Aug 22 00:35:30 pfn, Seems it is getting packed in to the arsc for some reason Aug 22 00:39:36 JesusFreke did you ever find a ragel mode for sublime ? Aug 22 00:39:58 g00s: found? I never looked :) Aug 22 00:40:11 vim has a nice one Aug 22 00:44:16 vi has a nice everything Aug 22 00:44:49 vi != vim :P Aug 22 01:21:57 is it possible to use the camera to take 5 or so pictures in quick succession Aug 22 01:22:15 so you could take pictures of action shots, like someone running Aug 22 01:24:16 holy crap, the flash player in chrome 29 must have some major memory leak or something Aug 22 01:24:48 RustyShackleford its usuall called 'burst mode' Aug 22 01:24:57 i would think its camera specific, maybe some have it Aug 22 01:25:27 burst mode tends to have various focus modes, like spot, servo, constant af, etc Aug 22 01:25:42 g00s: Chrome 29? Flash? On Android? Isn't Android Flash dead? Aug 22 01:25:51 hidgw oh, desktop Aug 22 01:25:57 29 on android has WebRTC i guess Aug 22 01:25:59 g00s oh, lol Aug 22 01:26:19 Yeah, the desktop Chrome seems crashier lately. Aug 22 01:26:35 hidgw flash is the only reason i have chrome, do you have any idea what a pita it is to install flash on a mac :P Aug 22 01:26:58 i like that its in the chrome bundle Aug 22 01:27:06 dont want to use some shitty adobe installer Aug 22 01:27:14 g00s: Actually yes. I have a Win7 and a OS X 106 and a OS X 10.7. :P Aug 22 01:27:30 s/106/10.6/ Aug 22 01:27:32 g00s, how might I see all the options/modes that my camera has? Aug 22 01:29:01 RustyShackleford you have to check http://developer.android.com/reference/android/hardware/Camera.Parameters.html Aug 22 01:29:09 i had to downgrade from chrome dev to chrome beta a while back :P Aug 22 01:29:33 canadiancow, you like? Aug 22 01:30:10 do i like chrome? Aug 22 01:30:11 yes Aug 22 01:30:16 i even bought a shirt with the chrome logo Aug 22 01:30:20 and i wear it regularly Aug 22 01:30:23 g00s, also quickly can I take picutures? Is a 3-5 per second totally unreasonable? Aug 22 01:30:52 RustyShackleford no idea, really, many factors - shutter speed, how quickly the image data goes from the sensor to the buffer, etc Aug 22 01:30:54 i believe my shutter speed is 1/17 sec, but how long does it take to process? Aug 22 01:30:55 not chrome, from earlier, you kinda disappeared Aug 22 01:31:05 oh. i went shooting stuff Aug 22 01:31:06 canadiancow That's dedication, buying a logo shirt. Aug 22 01:31:14 i only used it for a few minutes Aug 22 01:31:29 hidgw, i bought a bunch of shirts for family, and apparently i bought one too many Aug 22 01:31:59 canadiancow, I would be OK with that myself. I can never justify buying shirts for myself. ;) Aug 22 01:33:20 hi, how could I get the current battery wattage? Aug 22 01:38:43 hey guys I was looking for a bit of help, this android project im working on keeps crashing (memory leaks) Aug 22 01:38:57 was wondering the best way to clear everything when moving onto the next activity Aug 22 01:39:09 its crashing cause of bitmaps i think Aug 22 01:39:16 remove all references Aug 22 01:39:23 how :D ? Aug 22 01:39:44 use MAT to see what's holding memory Aug 22 01:40:12 im using eclipses log Aug 22 01:40:24 and it says its the bitmap Aug 22 01:40:38 images and obviously im using and debugging I know what the problem is Aug 22 01:44:02 I just can see every crash as it happens it just seems like this one page stacks the memory useage way to high but I dont know how to stop it Aug 22 01:44:13 if tried nohistory Aug 22 01:44:46 onStop() finish() Aug 22 01:46:24 If you're holding on to contexts that persist between activities then that might be why Aug 22 01:48:03 * kbs blames asynctasks :-) Aug 22 01:48:36 * lovethang_ hearts asynctasks Aug 22 01:49:25 #stockholm-syndrome :-) Aug 22 01:49:32 ok and whats the best way to let go of these contexts :P in all honesty im still quite the noob and this isnt my program Aug 22 01:49:35 im trying to fix it Aug 22 01:49:45 [I should stop trolling now, apologies. Late in the day, tired] Aug 22 01:51:19 sharpy-penguin: Well I'm not saying you do have any, I'm just saying that holding on to a context is a mistake I read to avoid because it keeps a lot of stuff from being garbage collected Aug 22 01:52:20 do you know anyway i can just drop everything and continue onto the next activity ? Aug 22 01:52:46 Launch an intent then call finish() but if you're holding a context in some persistent state then it will continue even after finish() Aug 22 01:53:14 Like if it's a context for the previous activity it will keep references open for everything in it, including all those bitmaps Aug 22 01:54:28 so when u say launch the intent do you mean on the page you are calling the new intent from or when you land on the new intent ? Aug 22 01:54:41 From the caller not the callee Aug 22 01:55:18 Intent intent = new Intent (this, SomeActivity.class); startActivity (intent); finish (); Aug 22 01:56:58 But if you have some persistent context you're holding on to from the caller activity, then everything in that activity will still exist even afterwards and can't be garbage collected Aug 22 01:57:02 ahh ok :) thanks shall give it a try Aug 22 02:04:52 if you always call finish(), you won't have a back stack Aug 22 02:04:57 then what will happen if the user hits back? Aug 22 02:07:06 In my app this is desirable, the first 2 activities are one-time only then the stack is cleared so going back returns to the Aug 22 02:10:12 http://www.youtube.com/watch?v=9HrOdmYIEQA <--- Running OpenGL ES 3 on Adreno 320 is a terrible experience Aug 22 02:10:21 when i hit back it dies ;( but the back simply calls a new intent? Aug 22 02:10:45 also all the images are inserted like this imageslist.add(R.drawable.plus_high_efficiency_gravity_feed_gun_cup); Aug 22 02:11:00 is there a better way to use them i think it is this crashing the system Aug 22 02:12:13 If hitting back crashes your app I think your real issue might be a little more obfuscated, I think pastebin relevant code would be more of a help Aug 22 02:12:44 i cant paste bin code only the errors i am getting Aug 22 02:12:50 but that might help you point me? Aug 22 02:13:09 Code helps more but sure, what do the errors say? Aug 22 02:16:24 http://pastebin.com/CFiB9TXw Aug 22 02:18:05 Out of memory on a 23301648-byte allocation. Aug 22 02:18:10 conclusions doctor ? :'( Aug 22 02:18:11 Your drawable is 23Mb? Aug 22 02:18:27 i beleive its added Aug 22 02:18:29 total Aug 22 02:18:57 Don't "believe" Aug 22 02:19:03 Find out for sure exactly how big this drawable is :-\ Aug 22 02:19:09 ok 2 sec Aug 22 02:19:35 width and height, not file size Aug 22 02:20:01 ^^^ ? Aug 22 02:20:13 the images size, not file size Aug 22 02:20:37 I think you should find out both Aug 22 02:20:40 i assume that your drawable is an image Aug 22 02:21:01 infact, yes, it is Aug 22 02:21:50 the file sizes are all small Aug 22 02:21:59 How big is small? Aug 22 02:21:59 none reach over 100kbs Aug 22 02:22:17 What on earth are you doing that suddenly tries to allocate 23Mb? Aug 22 02:22:43 I wince when allocating 23 bytes Aug 22 02:23:02 I have no idea thats what i was asked to find out :P Aug 22 02:23:17 Well if you don't know and can't share any code, I think you will go home empty handed tonight Aug 22 02:24:08 the files that are 100kb, open them in an image editor and tell us how wide and how tall they are in pixels Aug 22 02:24:55 Or use file ~/workspace/project/res/drawable*/* in Linux Aug 22 02:25:20 well a 64kb is 640 by 960 Aug 22 02:25:39 Are they all like that or do you have a bad egg? Aug 22 02:26:07 3 or 4 are like tht Aug 22 02:26:14 460 x 602 is another Aug 22 02:26:21 they're pretty big Aug 22 02:26:29 That's not crazy big though Aug 22 02:26:43 640 * 960 * 4 bytes = lots of bytes Aug 22 02:26:49 Nothing that should suddenly suck up a 23Mb allocation Aug 22 02:27:23 2457600 bytes Aug 22 02:27:24 a 97kb is 640 by 960 Aug 22 02:27:33 (background images these big ones) Aug 22 02:28:21 oh yeah, i'm a digit out Aug 22 02:28:41 ahh help Aug 22 02:28:44 lol Aug 22 02:28:52 just found a 1282 by 1136 Aug 22 02:29:11 I asked if you had a bad egg Aug 22 02:29:12 but its only a 9kb Aug 22 02:29:30 still only 5.5 MB Aug 22 02:30:09 most of these images get loaded at the sam time Aug 22 02:30:14 alex_PP: You cannot possibly calculate that to any degree of accuracy, there could be any number of sizes depending on the file type Aug 22 02:30:26 png Aug 22 02:30:33 but once it's loaded into ram it's going to take a certain amount of space Aug 22 02:30:38 https://developer.android.com/reference/android/graphics/Bitmap.Config.html Aug 22 02:30:54 i'm assuming ARGB_8888, worst case Aug 22 02:31:20 Yes but we don't know for sure if the allocation failed during the decompression of the image or the creating of the bitmap Aug 22 02:32:04 has anyone tried wifi direct on the nexus 4? Aug 22 02:32:31 sharpy-penguin: What happens if you only load a few images? Aug 22 02:32:33 good point, but it's quite likely to be the final bitmap Aug 22 02:32:44 i shall cut out 50% of the images Aug 22 02:32:45 and see Aug 22 02:32:56 Start by taking out that big one first Aug 22 02:33:20 I suspect though it's not actually the size of the images Aug 22 02:33:35 I think you're doing something that's trying to create a copy of your image list Aug 22 02:34:02 what do you mean? what benefit would there be in tht? Aug 22 02:34:27 as far as I'm aware, the 23MB allocation is a single allocation, not cumulative Aug 22 02:35:03 Well there is no benefit to it, it could be any number of strange things Aug 22 02:35:09 Are you using threads at all? Aug 22 02:35:15 i see there is an image list? in this code Aug 22 02:35:33 sharpy-penguin: If you won't share code nobody can say Aug 22 02:35:38 doesnt seem to be using threads no Aug 22 02:35:52 its not my code to share, if i share it i lose my job Aug 22 02:36:11 i'm going to order devices to communicate via wifi direct. I would like to use nexus 4s but there were some people saying it has issues on the nexus 4. Has anyone successfully sent data over wifi direct using a nexus 4? Aug 22 02:36:16 im a web developer lol but no one is here to sort this out ;( Aug 22 02:36:24 I understand, but you can always create a working example Aug 22 02:37:51 ok imma creating a mock up of some code where i think the issue may be Aug 22 02:38:06 Very sensible Aug 22 02:38:21 You could also try putting some debug in your code that's adding the images to keep dumping the amount of free RAM Aug 22 02:38:23 Watch that Aug 22 02:39:40 that stack trace seems a lot like it's all coming from xml, doesn't it? Aug 22 02:40:21 guys anyone have experiences on this sites for make apps , like andromo , theappbuilder, etc...? Aug 22 02:40:24 Yes I noticed LayoutInflater Aug 22 02:40:44 just seems like a relative layout in xml that's referring to a bunch of big images in its children - maybe just setting enormous backgrounds somewhere Aug 22 02:41:00 http://pastebin.com/5beQZSBj Aug 22 02:41:31 interesting class name :s Aug 22 02:41:45 could be the xml yes but whats th solution there? is there not way just to clear all memory down? Aug 22 02:41:55 basically reseting the app but without the long ass reboot? Aug 22 02:42:00 alertDialog.setMessage("Please select anyone of the peniss to compare"); :-| Aug 22 02:42:09 ahahaha Aug 22 02:42:19 I am simply not going to asl Aug 22 02:42:20 ask Aug 22 02:42:38 proably best not to Aug 22 02:42:40 :P Aug 22 02:43:02 Also do quickly check the activity XML file like mentioned, what images are used there? Aug 22 02:43:29 * kbs suddenly regrets the use of the term "enormous backgrounds" Aug 22 02:43:38 LOL Aug 22 02:43:57 Also FYI you are using AsyncTask so yes threads are involved Aug 22 02:45:43 well the images dont seem to be to heavy Aug 22 02:45:50 for this xml Aug 22 02:46:26 I think your best bet is to scatter some debug throughout your code, in onCreate, before/after creating the layout, adding images etc. Aug 22 02:46:33 Dump the free RAM Aug 22 02:46:40 And see when it suddenly decreases Aug 22 02:46:52 what do you mean ? Aug 22 02:47:01 I can't really say that any simpler TBH Aug 22 02:47:10 I meant dumping the free ram sorry Aug 22 02:47:13 dump to what? Aug 22 02:47:21 the value? Aug 22 02:47:32 Well computers have the ability to store temporary information in a very fast device called RAM Aug 22 02:47:37 RAM is of a finite capacity Aug 22 02:47:40 What is not used is free Aug 22 02:47:42 lol Aug 22 02:47:43 -___- Aug 22 02:48:08 Dumping the value of free RAM will lead to you see what is causing the amount of RAM to expire when you try to allocate the 23Mb Aug 22 02:48:20 I was assuming you meant dump the exsisting ram value to a log file... was wondering if u meant on a text file or the console Aug 22 02:48:27 No use Log.d Aug 22 02:48:32 ok Aug 22 02:48:49 whats the function to dump? Aug 22 02:48:54 No idea Aug 22 02:49:01 I just assume there is one Aug 22 02:49:08 I'm a C programmer not a Java programmer Aug 22 02:49:33 https://developer.android.com/reference/java/lang/Runtime.html#freeMemory() Aug 22 02:49:39 freeMemory() Aug 22 02:49:41 Oh what he said Aug 22 02:51:39 anyone here worked with mediacodec APIs? Aug 22 02:52:07 * lovethang_ has been wondering for the past few minutes what it would be like to own a R.drawable.plus_high_efficiency_gravity_feed_penis_cup Aug 22 02:52:42 :| Aug 22 02:52:51 I was sold at "high_efficiency" Aug 22 02:53:10 :x Aug 22 02:53:17 ahh Aug 22 02:53:20 i found it D: Aug 22 02:53:28 29mbs Aug 22 02:53:34 SHUT UP AND TAKE MY MONEY Aug 22 02:54:50 http://pastebin.com/EkWejCKs Aug 22 02:55:22 I am a PHP programmer Aug 22 02:55:34 All the best programmers are Aug 22 02:55:57 good with java SHIT with android (yes i know they are simular but yet so different) Aug 22 02:57:24 Oh sweetie you don't need to tell us you're shit with Android, I've only been doing it for a week and I'm helping you :) Aug 22 02:58:30 how many images are there in the XML that's being inflated in the first stacktrace you posted? Aug 22 02:59:09 the one in setContentView(R.whatever) **** ENDING LOGGING AT Thu Aug 22 02:59:58 2013