**** BEGIN LOGGING AT Thu Mar 07 02:59:58 2013 Mar 07 03:00:34 I got it :D Mar 07 03:00:47 I had the background set for gridview, not the layout itself Mar 07 03:03:15 Rob|boR: read, cause your still using things wrong Mar 07 03:14:12 I have an odd use case for the ListView. I have a screen that is already a scrollview. At the bottom, I have some comments. It seemed best to use a ListView for them, because I can use the adapter to roll them out, and such. However, I don't need scrolling functionality in the list. I just need all the comments to pour into the page and display at once. Mar 07 03:14:30 so basically, is it possible with a listview, to: disable scrolling, and grow the size of the container with the number of items added Mar 07 03:14:39 such that all items are constantly being displayed Mar 07 03:15:41 tdignan: why not just use a normal layout, rather than a listView ? Mar 07 03:15:46 but yeah it is Mar 07 03:15:53 I do the same Mar 07 03:16:03 but it's not great at the moment Mar 07 03:18:47 StingRay_: I can tweak the listview to get it to do what I want? Mar 07 03:18:54 StingRay_: the reason is that there's no other layout with built-in adapter glue Mar 07 03:18:57 I like the adapter. Mar 07 03:19:35 yeah, you will have to extend listView Mar 07 03:19:49 that's cool with me... what should I change about it? Mar 07 03:19:50 and measure elements in onDraw Mar 07 03:19:54 ohh Mar 07 03:19:59 then use that to adjust the height? Mar 07 03:20:05 and then get layoutParams and alter them Mar 07 03:20:12 yeah thats what I do Mar 07 03:20:30 I think Mar 07 03:20:33 hang on Mar 07 03:20:34 it sounds a bit hard Mar 07 03:20:35 heh Mar 07 03:20:57 I was wondering also about just extending linearlayout and writing my own adapter connectivity Mar 07 03:21:58 or just use this http://pastie.org/6408943 Mar 07 03:22:11 that mine Mar 07 03:22:24 and it works in my editor things Mar 07 03:22:28 in a scrollView Mar 07 03:22:40 StingRay_: :) Mar 07 03:22:42 you rock man Mar 07 03:22:53 but like I said, and adapter + listView ... not really happy with it Mar 07 03:23:08 cause you get simultaneous calls to all view items Mar 07 03:23:36 even if they are off screen, they are still in the listView bounds so it gets called Mar 07 03:23:50 I need to change that really, just not got round to it Mar 07 03:23:51 ah yeah Mar 07 03:23:59 I knew that would be a fact of this Mar 07 03:24:05 but honestly it's so convenient and awesome Mar 07 03:24:11 unless it was a real bottleneck Mar 07 03:24:17 I don't mind that drawback Mar 07 03:24:17 well I actually thought that if they were off screen, it wouldn't Mar 07 03:25:01 tdignan: I think that extending linLayout maybe better, dunno yet Mar 07 03:25:07 have to re-visit it Mar 07 03:25:13 it would probably be roughly the same Mar 07 03:25:19 because, we'd still have the issue you mentioned Mar 07 03:25:25 of having to keep all the elements in memory. Mar 07 03:25:30 well yes no Mar 07 03:25:34 cause Mar 07 03:25:48 listView has all the convertView etc Mar 07 03:26:01 well neways, I still think there maybe a better way Mar 07 03:26:09 but that will do you for what your wanting Mar 07 03:26:36 thanks a bunch man. I'll look into other ways when this application gets popular enough to have significantly long comment threads :) Mar 07 03:27:25 why not just use a vertical linearlayout and programmatically add comment views to it in a for-loop? Mar 07 03:28:12 pragma-: well yeah, but if you have like i have, a DB that has nice adapter, and then you want a chooser that can hold multi entries, that seemed a better immediate fit Mar 07 03:28:39 you can iterate Mar 07 03:28:43 I also wanted to do a "load/show more" Mar 07 03:29:29 better to just use my baseAdapter and cursor that is already there though, to lookup links in the table and show result Mar 07 03:29:45 dunno, still gonna have a look again when I get round to it Mar 07 03:29:52 fighting with broadcasts Mar 07 03:30:36 pragma-: i think the adapter makes things pretty clean and it's easy to design a good one.. I would like to take that same approach, and design it to fit a BaseAdapter.. but no time right now for that. Luckily, StingRay_ did it already :D Mar 07 03:32:30 broadcasts to the same receiver cannot get overwritten right ? even if they are send quickly one after another ? Mar 07 03:33:06 cause I'm loosing something somewhere, that I dont loose when stepping though the debugger Mar 07 03:33:43 so obvious difference is time Mar 07 03:35:14 losing/lose Mar 07 03:37:10 hey guys, I have a java question: if I implement an interface in a class, the subclasses also implement that interface? Mar 07 03:39:00 kulas: no, well I dont an my crap still works Mar 07 03:39:08 :) Mar 07 03:42:15 kulas: http://pastie.org/6409043 Mar 07 03:42:36 subclasses inherit the methods, therefore they implement those interfaces Mar 07 03:42:39 StingRay_ , I think he's asking if the interface implementation is inherited. Mar 07 03:44:36 tdignan for the goal. Mar 07 03:45:26 yeah I knew what he was asking Mar 07 03:45:48 maybe I answered it wrong cause I'm not a programmer :) Mar 07 03:46:24 oh I totally said the wrong thing lol Mar 07 03:46:33 was ment to be yes, rather than no Mar 07 03:46:45 tdignan: thanks! Mar 07 03:47:10 If I wish to lock the app from rotating I would need to add the following code to the manifest right? android:screenOrientation="portrait" Mar 07 03:47:15 I thought his question was "would I still have to implement the interfaces on subclasses" or thats how I read it Mar 07 03:47:27 Rob|boR: you should not do that Mar 07 03:47:34 why not? Mar 07 03:47:35 it's wrong and horrid Mar 07 03:47:53 i agree, please please don't do that! Mar 07 03:47:56 what happens on tablets ? Mar 07 03:48:12 or if some1 attampts to start your app while in landscape Mar 07 03:48:21 your forcing them to physically do something Mar 07 03:48:22 well I would need to recreate backgrounds... Mar 07 03:48:27 not great Mar 07 03:48:39 Rob|boR: you background is a gradient Mar 07 03:48:49 not really, that was a sample background lol Mar 07 03:49:01 I have a more customized background I made Mar 07 03:49:06 ok well then yes you should Mar 07 03:49:31 trying to keep the background consistent, guess I would need to zoom into an area of the background for it too look good Mar 07 03:50:00 but if I did want to lock the screen rotation, wouldn't that line of code do the trick? Mar 07 03:50:13 because I tried it, and the app still rotates -_- Mar 07 03:51:12 nvm it works Mar 07 03:51:16 muhaha Mar 07 03:53:04 alex_PP: check it out http://www.gizmag.com/lifebeam-smart-heart-rate-monitoring-bicycle-helmet/26548/ Mar 07 03:54:20 g00s: gift idea http://www.gibbssports.com/ Mar 07 03:54:59 StingRay_: wonder how much maintenance it needs ;) Mar 07 03:55:12 in salt water ? sh*t loads Mar 07 03:55:58 hmmmm Mar 07 03:56:03 I want a modded one with bigger wheels though Mar 07 03:56:30 hmm, if im using a bufferedwriter Mar 07 03:56:40 what would I do to get the last lets say 10 lines? Mar 07 03:56:51 * jda2000 is waiting for the flying version Mar 07 03:56:55 i got a simple script working to grab the last line, but can't think of a way to get the last 10 lines Mar 07 04:03:48 Trinsta , you want to be able to ask "what were the last ten lines that were written"? Mar 07 04:09:07 g00s, how is that an advantage over a strap? Mar 07 04:09:12 not sure i approve Mar 07 04:09:36 alex_PP: heh, well, i noticed my strap kept falling below my rib cage after i tucked in Mar 07 04:09:55 maybe i / it was just lame Mar 07 04:10:00 really? weird. mine never moves Mar 07 04:10:10 but i wear a compression top over it Mar 07 04:10:15 yeah, that helps Mar 07 04:10:39 i just don't like extra weight on my head Mar 07 04:10:44 and then my camelbak Mar 07 04:10:48 seems all upside down Mar 07 04:11:14 sternum strap kept "interfering" with the hrm strap under the shirt Mar 07 04:11:35 but dont they have HRMs for your finger now ? Mar 07 04:12:11 like a blood ox monitor from a hospital? Mar 07 04:12:18 yeah, kinda like that Mar 07 04:12:24 wouldn't that be even more annting Mar 07 04:12:27 also, the more V shape you have, the more likely the strap falls :) Mar 07 04:12:30 *annoying Mar 07 04:12:36 ha Mar 07 04:12:42 that's not a problem i have Mar 07 04:13:10 there are interesting though Mar 07 04:13:11 http://www.kickstarter.com/projects/alphaheartrate/alpha-the-holy-grail-of-heart-rate-look-ma-no-hand Mar 07 04:13:48 oh cool Mar 07 04:14:04 i've been looking for an ANT watch with GPS that isn't 1 million $ and isn't gigantic Mar 07 04:14:12 they don't exist Mar 07 04:14:19 i have a feeling in my belly that android 5 wiill have BLE Mar 07 04:14:47 g00s: there's already a bunch of Android hardware with theoretical support Mar 07 04:15:01 yeah, just need it in the official APIs Mar 07 04:16:21 there was some movement on issue 33371 Mar 07 04:16:34 hopefully now a bowel movement Mar 07 04:16:39 but it was assigned ;) Mar 07 04:17:16 canadiancow: this is the IRS Mar 07 04:17:22 o.O Mar 07 04:17:27 we need to audit you Mar 07 04:18:25 impersonating a government official... tsk tsk Mar 07 04:19:16 is it even possible to earn more than your personal allowance in android dev? Mar 07 04:19:32 uh Mar 07 04:19:33 yes Mar 07 04:19:33 ? Mar 07 04:19:40 not sure if you're trolling or just ignorant Mar 07 04:19:51 jokes Mar 07 04:19:54 canadiancow: you came up for audit when we noticed a bovine was filing for taxes ;) Mar 07 04:20:39 even our cobol system from the 30s flagged that one :P Mar 07 04:21:01 anyone have a fix for "Android Dex: the "--core-library" option to suppress this error message." error compiling with intellij ? Mar 07 04:21:42 xastey: the fix is probably just use eclipse Mar 07 04:21:46 * g00s ruuuuuuuns Mar 07 04:22:09 * xastey chases g00s with a meat cleaver Mar 07 04:22:14 wow, personal allowance is ~10k in the US. that's a lot of downloads Mar 07 04:22:44 there are two fire trucks outside my apartment Mar 07 04:22:47 lights flashing Mar 07 04:22:51 * canadiancow runs Mar 07 04:22:56 three Mar 07 04:23:09 this might help Mar 07 04:23:11 http://brunching.com/areyouonfire.html Mar 07 04:28:00 and they're gone Mar 07 04:31:18 canadiancow: sorry to bother ya, just wondering if you would have any idea how I could implement a BufferedWriter that reads from the bottom to top and saves the last 10 lines Mar 07 04:31:33 why are you singling me out :( Mar 07 04:31:36 or it coudl just save from top to bottom and save the last 10 lines Mar 07 04:31:42 cause i asked everyone else and no one answered =[ Mar 07 04:31:57 im on an android break right now Mar 07 04:32:01 its okay though Mar 07 04:32:03 ahh its fine :) Mar 07 04:32:28 canadiancow comes to android-dev for a break from android … love it! Mar 07 04:32:36 Trinsta , you didn't respond to my question. Mar 07 04:32:39 so i had a problem with my bouncer today Mar 07 04:32:42 so i wasnt on until i got home Mar 07 04:32:46 but now im home, and im not androiding Mar 07 04:33:01 canadiancow: did it catch on fire ? Mar 07 04:33:08 no :) Mar 07 04:33:56 jda2000: ahh didnt see it, i know what you mean though Mar 07 04:34:27 going to just try to implement something just for this project. I dont like how I need to run it through from the beginning. in case my .txt file is really long Mar 07 04:37:26 sorry, wifi shadow. Mar 07 04:39:11 Xcodeメモリ食い過ぎだけど、Eclipseよりはまし。 Mar 07 04:39:43 But you have an array. You put every line into it. Overwriting the oldest line once it is full. Mar 07 04:40:54 the result is you always he the Mar 07 04:41:16 have the last n lines Mar 07 04:43:29 Hey guys I'm just about to upload my android application. It has been two years! Mar 07 04:43:38 Since I made an android application and published it Mar 07 04:43:42 jda2000: mhm, doing that now Mar 07 04:43:51 I currently do have a minor problem thought which I want to fix before I upload Mar 07 04:43:59 oh man...I'm an idiot...I asked a question here a while ago Mar 07 04:44:01 only no I didn't Mar 07 04:44:04 Its actually not with the java this time and with the XML Mar 07 04:44:04 I asked it in another channel Mar 07 04:44:30 so...I have a listview with a background set to @color/background Mar 07 04:44:38 then I have a fragment for each item in the list Mar 07 04:44:43 it has the background @drawable/list_selector Mar 07 04:44:44 android:layout_alignWithParentIfMissing="true" doesn't work... does the view have to be set to GONE in order for it to work because right now I have it set as invisable Mar 07 04:44:49 oh...I have a drawable folder Mar 07 04:44:59 hrmmm not sure how to set the background color of a list item. That list_selector stuff doesn't have it set, I think Mar 07 04:45:05 just add an attribute to the s? Mar 07 04:46:25 I don't really want to mess with View.gone because im affraid it will cause other problems later on for making the views visable within the application baised on a boolean Mar 07 04:49:36 Does anyone know why this may be occuring? Mar 07 05:01:19 Is it possible to set a View's background drawable to be tiled horizontally and not stretched vertically? Mar 07 05:06:20 openback: if it's a BitmapDrawable check out BitmapDrawable.setTileModeXY . It's also possible via an XML drawable however on some Android 2.3 devices it won't be respected so you need to use the setTileModeXY method anyway if supporting 2.3. Mar 07 05:12:04 apparently my logitech revue had an OTA waiting Mar 07 05:12:08 clearly i havent turned it on in a while Mar 07 05:13:44 kevinb: Ahh, so I'm not going mad thinking I'm doing something wrong via XML. Mar 07 05:14:09 nope :) blame gingerbread Mar 07 05:15:18 What I'm trying to accomplish is basically a fancy header. A centered textview with a background color with wrap_content within a LinearLayout with a drawable as a background that repeats horizontally. Does that make sense to accomplish that? Mar 07 05:17:03 Actually, i have a mockup: http://i.imgur.com/XTOF61w.png I haven't figured out a "good" way to accomplish it. I've been fighting with things for a bit. Mar 07 05:18:14 openback: thats not a fancy header Mar 07 05:18:26 that looks like the default OS2/warp window title box Mar 07 05:18:29 lol Mar 07 05:18:33 -_- Mar 07 05:18:41 sorry Mar 07 05:18:41 Fancier than just text, is all I'm saying. Mar 07 05:19:21 eclipse told me a variable could only be null at one locaiton i was testing if it was null. eclipse was wrong :( Mar 07 05:19:43 that should be doable with the repeating background on the linear layout and a solid color background on the textview, or by having just empty Views with the repeating background on either side of the text view Mar 07 05:21:46 openback: how about a 9.patch recess ? Mar 07 05:21:49 kevinb: Yeah, I'm thinking the first one is the way to go, but now I'm fighting with 9patches. Mar 07 05:22:01 you not think that would look better ? Mar 07 05:22:20 Can someone point me to a draw9patch tutorial? I only found one that truly explained the program months ago. Mar 07 05:22:43 well it's just an png Mar 07 05:22:47 with a pixel border Mar 07 05:22:58 they're pretty simple. you might just want to open up a framework 9patch in the draw9patch program to see how it stretches Mar 07 05:23:25 basically on the top and left you define stretchable regions, and on the bottom and right you define content area (with undefined area being padding) Mar 07 05:23:42 openback: can I do you a quick recess for you to try ? Mar 07 05:23:53 kevinb: you sure you not swapped bottom/top there :) Mar 07 05:24:14 StingRay_: A quick recess? Mar 07 05:24:23 you know you have those diag things Mar 07 05:24:44 I'm thinking if you just want something there, a subtle recess 9.patch would be good Mar 07 05:25:00 taking up the same kind of space that you have Mar 07 05:25:13 kevinb: Yeah, I'm trying draw9patch, but I have yet to figure out how to get it to not stretch at all, which is what I want Mar 07 05:25:40 I'm totally confused. Mar 07 05:25:42 openback: thats just a image Mar 07 05:25:56 StingRay_: i didn't swap bottom/top Mar 07 05:26:00 if you dont want exapandable areas Mar 07 05:26:10 kevinb: oh sh*t really ? Mar 07 05:26:37 I don't want expansion, I just want it to repeat horizontally and not stretch vertically. Mar 07 05:26:48 well thats not a 9 patch then Mar 07 05:26:53 it's just an image Mar 07 05:29:57 yeah, nine patches won't repeat. Here's an example of a more complex nine patch http://teslacoilsw.com/tmp/nexus7.9.png open with draw9patch and you'll see how it fits different sizes without messing up the corners and keeps the camera in the center Mar 07 05:30:05 But if I have a LinearLayout with that image as a background, and a TextView inside, the image wants to stretch to fill it. Mar 07 05:30:35 and the markers on the right and bottom mean that content would fill the center transparent area Mar 07 05:30:51 I'm thinking the 9patch isn't right, though, as I want repeating, not stretching. Mar 07 05:31:39 yeah so for repeating ideally you could use the xml drawable for repeating () however on android 2.3 it won't work reliably Mar 07 05:32:27 so at runtime you want to load the bitmap drawable, BitmapDrawable bg = (BitmapDrawable) getResources().getDrawable(R.drawable.bg_...); then do bg.setTitleModeXY(TileMode.REPEAT, TileMode.REPEAT); Mar 07 05:32:36 then linearLayout.setBackgroundDrawable(bg); Mar 07 05:33:37 Hmm. That sounds a little more like what I need. Let me give it a try. Mar 07 05:35:44 also you might want to take StingRay_ up on his offer for a recessed style 9patch bg Mar 07 05:36:00 I think it would look better Mar 07 05:36:09 How can I detect when an orientation switch is happening? I have an activity, that whenever the user leaves the activity. I don't want them to be able to open back up into it. They have to navigate back to it. Ie? ensuring they are authenticated etc... Mar 07 05:36:27 I don't even know what you guys meant by that/ Mar 07 05:36:46 what I want to do is allow them to switch orientations. But, onDestroy is called when you switch orientation. I need a flag I can check so I know they are changing orientation Mar 07 05:37:38 is there such an existing mechanism? Mar 07 05:38:07 get orientation onDestroy, check in onResume ? Mar 07 05:38:26 but how will that solve your login issue ? Mar 07 05:38:41 I nav away from your app Mar 07 05:38:45 bad guy comes Mar 07 05:38:49 picks up phone Mar 07 05:38:57 rotates it and goes back to your app Mar 07 05:39:01 no need to login ? Mar 07 05:39:19 nah, I have a view that is under that handles all the authentication Mar 07 05:40:10 yay! Mar 07 05:40:25 I got my BufferedWriter to save the last 10 read data saves Mar 07 05:40:25 http://pastebin.com/EF1DcVVt Mar 07 05:40:26 :) Mar 07 05:40:55 you can't get to the activity that has sensitive information unless you go through xyz. What I am trying to ensure is that whenever you leave the secure information activity you cannot open the app back up into it. Mar 07 05:41:13 is this for launching nuclear missiles ? Mar 07 05:41:25 otherwise, sounds like a UX fail ;) Mar 07 05:41:35 finish() in onDestroy accomplishes that. But, I want the user to be able to use landscape and portrait. I think I am seeing what you mean stingray. ty Mar 07 05:41:57 g00s, no viewing your w2 Mar 07 05:42:32 s/g00s, no/g00s no,/ Mar 07 05:42:39 wordToDaBird, what? Mar 07 05:42:45 i dont get your login system... Mar 07 05:43:09 trinsta, I haven't explained it. Mar 07 05:43:15 and in a user's point of view, i'd think it would be annoying Mar 07 05:43:26 if you need me to login everytime Mar 07 05:43:47 fuck what they think is annoying. It is required. No, questions asked they don't like it use a different product. Mar 07 05:44:03 and may i ask if login is client-sided? Mar 07 05:44:10 server Mar 07 05:44:28 do you have any other server-sided functions beside login? Mar 07 05:44:39 is there somewhere you are going with this? Mar 07 05:45:12 Trinsta, 90% of the app requires that you talk to the server. Mar 07 05:45:35 whenever you get a request you need to talk to the server. When you download your pdf you need to talk to the server. Mar 07 05:45:42 okay, then why dont you just save login info in preferences, post that to the server everytime you do a server-sided function Mar 07 05:45:54 because, no Mar 07 05:46:13 lol, okay then :) Mar 07 05:46:56 I think stingray just hit the nail on the head. But, to make it plain for you. You download your w2 from a server, your pay information and other information you don't want floating around. Do you want anyone that picks up your phone to be able to view that? Mar 07 05:47:09 ssn included Mar 07 05:47:13 wordToDaBird: you could do that along with the onDestroy system time, and if say it's more than 10 seconds, onResume() destroy login info and ask user again Mar 07 05:47:20 well you'd clear preferences obviously... onlogout or onDestroy.. Mar 07 05:47:26 yeah that Mar 07 05:47:36 but hey! its your choice :) Mar 07 05:47:51 kevinb: That was the way to go, it seems, thanks. Some fiddling left, but it's good, thanks! Mar 07 05:47:56 make sure you give me a link to your app later so I can send in a support e-mail on security issues! Mar 07 05:48:23 and also some white-hat exploits i found :) Mar 07 05:48:47 on the other hand for your exact issue just use industry standard OAuth2.0 Mar 07 05:48:55 I think you mis-understood when you get sent back to the lower view you aren't required to login again. The session is cached until you leave the app. Mar 07 05:49:06 And why am I going mad here? If I have a LinearLayout with match_parent and within I have a TextView with wrap_content, should layout_gravity="center_horizontal" not place it in the center of the LinearLayout? Mar 07 05:49:10 Hi! What is the format of the userdata.img (in this case, from Android Emulator)? If I perform "file userdata.img", it shows "VMS Alpha executable". That isn't true -- the "file" utility is confused -- I suppose. Any idea how I can look into its content? Mar 07 05:49:31 dyek: what does blkid say? Mar 07 05:49:38 openback is the parent vertical lin layout ? Mar 07 05:49:51 openback: otherwise there is no control for it to do that Mar 07 05:50:03 StingRay_: The parent of which? Mar 07 05:50:09 textview Mar 07 05:50:16 clever: blkid return error code 2. I don't think blkid is used this way. Mar 07 05:50:27 needs the lin layout to be vertial Mar 07 05:50:38 for you to align with center_horizontal Mar 07 05:50:48 dyek: i'm not sure, but i think thats a partial disk image for qemu, meant to be used with the initial userdata.img file Mar 07 05:51:04 StingRay_: Weird. I would think horizontal would be fine. Mar 07 05:51:05 wordToDaBird, reading back on what you asked, its relatively easy to get back to your "secure" activity Mar 07 05:51:14 dyek: IIRC it's a yaffs2 image. there are some tools to unpack them. my knowledge could be outdated (or just wrong) though Mar 07 05:51:21 openback: not if you really think about it Mar 07 05:51:37 wordToDaBird, a even better "mechanism" in my opinion is ... public cryptology on your "sensitive" info Mar 07 05:51:38 as in multiple views it can hold Mar 07 05:51:40 is it still yaffs2? i thought ext4 Mar 07 05:51:42 clever: That sounds right. Mar 07 05:51:56 hashed+salted+encrypted with your login credentials :) Mar 07 05:51:59 StingRay_: Ooooh, I see your point. Mar 07 05:52:03 dyek: i'm guessing youll need a qemu tool to merge the patch and original file, then mount it via a loop device Mar 07 05:52:13 kevinb: OK. I think this is leading to the right direction. I heard that too. Mar 07 05:52:59 wow http://www.fark.com/comments/7628500/82887651 Mar 07 05:54:20 dyek: and i'm not entirely sure on how to make the android emu use a non-patch layout Mar 07 05:54:35 dyek: ive tried modifying the system image before, and it reverted to original contents every time Mar 07 05:54:56 clever: OK. Thanks for the info. Mar 07 05:55:29 trinsta, how do you get back to the "w2" which is the last view in the heirarchy Mar 07 05:56:27 trinsta, how do you get back to the "secure" activity, one example? Mar 07 05:58:03 upload your apk with your "secure" activity and let me try :) Mar 07 05:58:15 kevinb, StingRay_: thanks for all the help! Mar 07 05:58:25 you couldn't get to it anyway, you don't have the credentials to get to it. Mar 07 05:58:35 but, you just ignored my question. Mar 07 05:59:08 no i really didnt, i asked for you to upload your apk Mar 07 05:59:23 how am I supposed to know what to do without even mapping it out Mar 07 05:59:28 you might have disabled history, you might have not Mar 07 05:59:43 you might allow other activities to enter that screen you might not Mar 07 06:00:07 ty, but I have a security team whose job it is to do that. I hope they are not all idiots. Mar 07 06:01:16 Trinsta: you a bit of a security/hackery/encryption expert ? Mar 07 06:02:06 I have a class that extends SimpleCursorAdapter within which I have a view that needs to switch to another intent when clicked. I found that I could start the intent using FLAG_ACTIVITY_NEW_TASK, but I don't want it to be a new task. How am I supposed to do this the "right way"? Mar 07 06:02:34 StingRay_: no but i'd hope I know a little about it since i've worked on my own app's security extensively for 5 months Mar 07 06:02:59 I tried to implement OnListItemClick from the SherlockListFragment, but that was never being called. Mar 07 06:03:08 Trinsta: then I wonder if you would be willing to offer some advice, maybe not now cause not at that point Mar 07 06:03:15 but will be shortly Mar 07 06:03:18 mhmm Mar 07 06:07:32 kevinb: One thing, though. Since I will have multiple of these headers, how could I find all of them that are contained within a fragment? Mar 07 06:10:39 depends on how you structure it. probably where ever you inflate this you want to find it and set the background. Mar 07 06:23:07 oops, looking forward to my FF update capella :) Mar 07 06:23:39 hmmm? Mar 07 06:23:42 actually everybody got pwned Mar 07 06:23:54 http://h30499.www3.hp.com/t5/HP-Security-Research-Blog/Pwn2Own-2013/ba-p/5981157 Mar 07 06:24:34 i wonder how my froyo web browser would fair ;) Mar 07 06:26:06 heh crack java only nets 20k$ Mar 07 06:26:25 my chocolate lab was going for that one Mar 07 06:32:15 "Lego Spill Shuts Down Section Of West Virginia Highway" oh my ! :O Mar 07 07:09:21 my project won't compile. I'm getting an error that R cannot be resolved to a variable Mar 07 07:09:58 xml error ? preventing R from being generated ? Mar 07 07:10:03 <-- guessing Mar 07 07:10:11 cleaned your project? Mar 07 07:10:26 screwed up your imports? Mar 07 07:10:45 no Mar 07 07:10:51 i did clean Mar 07 07:10:59 no import issues Mar 07 07:11:15 all i did was clean build Mar 07 07:12:34 devslash, imports as in imported wrong R. as in... R.android vs R.yourpackagename Mar 07 07:12:44 no r imports Mar 07 07:13:01 devslash: xml error, check "problems" Mar 07 07:13:17 no xml issues Mar 07 07:13:27 it was fine and i haven't touched my xml file Mar 07 07:13:34 then its time to do a "fuck you eclipse" restart Mar 07 07:13:38 :) Mar 07 07:13:53 devslash: is it your own R that's a problem, or Android's? Mar 07 07:14:03 um not sure Mar 07 07:14:24 R cannot be resolved to a variable, what was the R."your stuff here" Mar 07 07:16:09 cliit didn't say R.something Mar 07 07:16:18 it Mar 07 07:16:34 screw it, pastebin code Mar 07 07:16:41 it just says "R could not be resolved to a variable" Mar 07 07:16:50 all of it ? Mar 07 07:16:57 imports and error Mar 07 07:17:34 do you have a reference to "R" somewhere? :) Mar 07 07:17:54 not in my imports Mar 07 07:18:04 is there a line number for the error? Mar 07 07:18:31 yea Mar 07 07:18:42 so there is actually a line of code that you can show us? Mar 07 07:18:47 the lines that refer to the R variable Mar 07 07:18:55 show that and imports Mar 07 07:19:05 setContentView(R.layout.main); Mar 07 07:19:05 lines? the error shows more than once? Mar 07 07:19:24 5 errors in all. each time that R is referenced Mar 07 07:19:45 does R.layout.main exist? ;) Mar 07 07:19:52 oh, don't you just love it when people have absolutely no idea how to report a problem or ask a question...? Mar 07 07:20:20 R.java is under the ten folder right ? Mar 07 07:20:30 gen :) Mar 07 07:20:32 gen Mar 07 07:20:37 stupid autocorrect Mar 07 07:20:42 Leeds: thats a catch22 though... usually if you know how to report a problem and ask a question you know how to solve your error by yourself :) Mar 07 07:20:57 ok i did clean build and it isn't there Mar 07 07:21:10 in gen? or layout? Mar 07 07:21:15 gen Mar 07 07:21:15 autocorrect? oh lord... Mar 07 07:21:23 ^ bahahahaha Mar 07 07:21:48 pastebin your main.xml Mar 07 07:22:11 and your Foo.java, whatever Foo might be Mar 07 07:22:32 http://pastebin.com/7dN4yNC7 Mar 07 07:23:20 do you reference any other R. resources in your ap? Mar 07 07:23:21 app* Mar 07 07:23:54 no Mar 07 07:24:11 pastebin code Mar 07 07:24:36 ^that and also do you have any other layouts in your layout folder? Mar 07 07:24:44 if you do, pastebin those as well Mar 07 07:25:01 can you just give us remote access to your computer? that might be quicker... ;) Mar 07 07:26:31 hei guys. Quick couple of questions. I've just noticed my app is featured on the 9th page of the Top New Free Apps. Is that good? Also ... how long will I be considered a "new app" and will be shown in that list, presuming the installs don't go down or anything? Also ... when I update my app to a new version, will it be considered a "new app" on every update, or do they start from the Mar 07 07:26:31 moment I release the first version of the app? Mar 07 07:26:59 :) Mar 07 07:27:30 i hope someone can clarify some of these for me. Mar 07 07:27:59 bogo10: I thought you said your app is featured as the 9th in the top new free apps Mar 07 07:28:06 was* Mar 07 07:28:26 but i've heard that apps will stay on there for up to 1 month? Mar 07 07:28:34 oh really? cool. Mar 07 07:28:51 but you may be booted out if another app gets more dls Mar 07 07:29:01 not sure about the last part though Mar 07 07:29:07 i only see 3 pages Mar 07 07:29:17 https://play.google.com/store/apps/collection/featured Mar 07 07:29:18 g00s: if you click on page 3, more appear Mar 07 07:29:19 right ? Mar 07 07:29:30 what you can do to test that though... is go around all the top free new apps on the first page and check for last updated Mar 07 07:29:32 yeah, I'm not sure 9th page is going to effect your downloads much Mar 07 07:29:40 devslash: all solved now? Mar 07 07:30:00 Leeds: well yesterday I was on the 14th page...today on the 9th ... Mar 07 07:30:16 bogo10: how many total dls on console? Mar 07 07:30:29 not quite Mar 07 07:30:44 bogo10: also, what's the app? :) Mar 07 07:30:54 i fixed that problem with the R imports but now its saying android manifest.xml is missing but its there Mar 07 07:31:00 Trinsta: 247 in 2 days and I'm waiting for the update for day 3 Mar 07 07:31:16 Leeds: Remy Lite https://play.google.com/store/apps/details?id=mooblia.remy.lite Mar 07 07:31:23 bogo10: yeah, a 4th page appears … thats it Mar 07 07:31:24 bogo10: i just remembered. updating probably wouldn't hurt Mar 07 07:31:24 nm Mar 07 07:31:49 bogo10: 1-2years ago they changed the schematics behind it all Mar 07 07:31:51 devslash: how did you fix the problem? Mar 07 07:32:51 but if you wanted to make sure... like i said just check all of the top frees and if more than lets say 3 were updated the last day or so you can be relatively certain updating doesn't affect your position Mar 07 07:33:21 i have this android device that i'm trying to connect to my Mac to debug using adb Mar 07 07:33:33 when i connect the usb cable, Android File Transfer pops up fine Mar 07 07:33:37 but adb devices Mar 07 07:33:42 doesn't list it Mar 07 07:33:43 HorizonXP: stock ? Mar 07 07:33:51 HorizonXP: so, either it's a secret device, or such a no-name device that it's not worth telling what it is? Mar 07 07:34:01 Leeds: no-name Mar 07 07:34:04 omg... Mar 07 07:34:08 MI 2? Mar 07 07:34:08 its not s4 is it? Mar 07 07:34:12 hahaha Mar 07 07:34:20 you give me too much credit :P Mar 07 07:34:43 your mission, should you choose to accept it, is to connect adb with a device, on a Mac... This message will self-destruct in 10... 9... Mar 07 07:34:46 also, if I was one of the few ppl with an S4, and I'm in here asking such a "dumb" question, we'd have problem. Mar 07 07:34:50 *problems. Mar 07 07:35:01 HorizonXP: stock ? :P ? Mar 07 07:35:03 basically the answer is... search google for your device's specific usb drivers Mar 07 07:35:04 HorizonXP: have you enabled USB debugging? Mar 07 07:35:06 Trinsta: aham, yeah, that's something I could try and see. Thanks for the info, I hope you're right with the 1 moth thing :) Mar 07 07:35:14 Trinsta: no drivers on OSX or Linux Mar 07 07:35:18 bogo10: it might be longer Mar 07 07:35:25 devslash: what did you do to fix the problem? Mar 07 07:35:41 thing is, this worked before Mar 07 07:35:41 Leeds: oh, nvmd. PS: don't help traitors. Mar 07 07:35:51 I *think* it stopped working when I updated my SDK Mar 07 07:36:17 that shouldn't matter though right? Mar 07 07:36:22 Trinsta: traitors? Mar 07 07:36:30 new versions of adb should be able to talk to older devices Mar 07 07:36:32 Trinsta: oh... hmm, ok. I'll see what more I can find out. Btw ... go download it and give a some stars :D (be gentle please) . hehe. Thanks again. Mar 07 07:37:00 Leeds: OSX Mar 07 07:37:13 Trinsta: how is an OSX user a traitor? Mar 07 07:37:36 at least it's not Windows... Mar 07 07:37:40 it's this device: pp passed NULL surface Mar 07 07:37:42 agh Mar 07 07:37:49 http://www.gsmarena.com/xiaomi_mi_2-4928.php Mar 07 07:39:00 Leeds: because windows phones don't stand a chance :) Mar 07 07:39:03 who the hell is xiaomi Mar 07 07:39:14 quite a well-regarded Chinese manufacturer Mar 07 07:39:21 g00s: http://www.engadget.com/2012/11/14/xiaomi-phone-2-mi-two-review/ Mar 07 07:39:35 Trinsta: but... presumably Android on the device, OSX on the Mac... Mar 07 07:40:03 g00s: very iPhone-knock-off, but otherwise quite nice little phones Mar 07 07:40:34 maybe - how will they survive against ZTE and Hauwei Mar 07 07:41:20 g00s: because there is close to 1.3 billion people living in china :) Mar 07 07:41:23 nah, they're much smaller and lower-profile than guys like that (also, Lenovo) - they're more in the Meizu camp Mar 07 07:41:46 Trinsta: and only 200 million or so have smartphones so far :) Mar 07 07:41:47 in any case, i don't see OS X drivers Mar 07 07:41:55 THERE ARE NO DRIVERS FOR OSX OR LINUX Mar 07 07:42:07 adb talks directly to the raw USB device on those platforms Mar 07 07:42:08 and the fact that android file transfer works tells me that it's not exactly a USB issue Mar 07 07:42:27 Leeds: Trinsta said to look for device-specific drivers Mar 07 07:42:32 so.... *shrug* Mar 07 07:42:34 HorizonXP: Trinsta was wrong Mar 07 07:42:49 fair enough :P Mar 07 07:42:59 just wanted you to be aware that I was wrong because he was wrong. Mar 07 07:43:03 i.e. not completely my fault. Mar 07 07:43:09 I'll ask again because you didn't answer last time - do you have USB debugging enabled? Mar 07 07:43:20 HorizonXP, If you're developing on Mac OS X, it just works. Skip this step. i think youre out of luck Mar 07 07:43:29 Leeds: yes it's enabld. Mar 07 07:43:40 right, when you plug in do you get a debug notification? Mar 07 07:43:43 Trinsta: it worked before. something has changed. Mar 07 07:44:02 Leeds: yes it says USB debugging connected in notifications Mar 07 07:44:02 have you tried restarting the device/retrying/restarting os Mar 07 07:44:14 good, then things are working on the phone Mar 07 07:44:14 retrying* usb* Mar 07 07:44:46 Trinsta: i've been rebooting phone and switches on it repeatedly to no avail Mar 07 07:44:58 g00s: If you're developing on Mac OS X, it just works. Skip this step. Mar 07 07:44:58 Leeds: so I messed something up on my dev machine then maybe? Mar 07 07:45:04 g00s: now i see why youre devving on mac Mar 07 07:45:13 which suggests that the problem is that adb isn't seeing, or recognising the phone Mar 07 07:45:32 Leeds: right, adb devices lists nothing Mar 07 07:45:35 HorizonXP: have you tried rebooting adb? Mar 07 07:45:48 Trinsta: adb kill-server -> adb devices? yes. Mar 07 07:45:52 I'll try again. Mar 07 07:46:08 no bueno. Mar 07 07:46:09 I honestly don't know if it makes a difference on OSX, but on Linux there are permission issues which can get in the way... so if you kill adb and re-run "adb devices" as root (under sudo, probably), does it show? Mar 07 07:46:22 Leeds: good idea let's try Mar 07 07:46:24 shouldn't be an issue Mar 07 07:46:38 no change. Mar 07 07:46:41 HorizonXP, The bug is: MacOS X 10.6.6 [on some hardware] breaks adb [for some phones]. Mar 07 07:46:54 oops Mar 07 07:47:03 I'm on 10.8.2 Mar 07 07:47:07 so Mountain Lion Mar 07 07:47:16 i'm on Lion 10.7 ;) Mar 07 07:47:33 i let all the other people like HorizonXP beta test before me :D Mar 07 07:47:43 someone said to set it to charge only Mar 07 07:47:43 g00s: thanks, you're so sweet. :P Mar 07 07:48:00 adb does connect to my GNex 4.2.2 just fine Mar 07 07:49:40 hmm, but still... try changing USB connection type to 'Charge Only' Mar 07 07:49:58 Trinsta: where would that be? Mar 07 07:50:15 no idea, but a good update :) Mar 07 07:50:26 is i think i know how to solve your problem Mar 07 07:50:28 hmm, love the fact that the Android docs suggest buying a Nexus S if you want an unlocked phone :) http://developer.android.com/tools/device.html#VendorIds Mar 07 07:50:56 Trinsta: i'm all ears Mar 07 07:51:10 do you have a newer version of adb? Mar 07 07:51:12 recently upgraded? Mar 07 07:51:19 Trinsta: yeah Mar 07 07:51:26 Trinsta: probably just yesterday actually Mar 07 07:51:36 HorizonXP: what about another computer ? Mar 07 07:51:54 g00s: i could try my chromebook Mar 07 07:52:00 but that could be interesting Mar 07 07:52:03 that broke it Mar 07 07:52:20 navigate to soething liek this Mar 07 07:52:27 ~ /Users/Justin/.android/ Mar 07 07:52:40 delete from there ~/.android/adb_usb.ini Mar 07 07:52:46 make sure you keep a backup!!!! Mar 07 07:52:59 HorizonXP: when you plug in, do you get a notification for media sharing or something? Mar 07 07:53:02 nah, you can nuke the whole ~/android dir w/o much issue Mar 07 07:53:03 oh CRAP Mar 07 07:53:07 Trinsta: you're awesome Mar 07 07:53:12 i remember this now Mar 07 07:53:16 of course, you lose your avds :) Mar 07 07:53:20 i had to *add* a line to this before Mar 07 07:53:28 the update removed it, it seems Mar 07 07:53:29 yea Mar 07 07:53:32 i have that line for you Mar 07 07:53:34 HorizonXP: erm... see where I linked to the instructions for that just about 3 minutes ago? Mar 07 07:53:40 0x2080 Mar 07 07:53:42 vendor id :) Mar 07 07:53:59 blah Mar 07 07:54:01 Leeds: i see that now, but i didn't realize that was for me Mar 07 07:54:02 : Mar 07 07:54:04 :P Mar 07 07:54:13 HorizonXP: no other conversation going on at the moment... Mar 07 07:54:26 funny though, xiaomi has the same vendorId as nook Mar 07 07:54:36 but its not listed itself Mar 07 07:54:40 i dont think we have to worry about the nook much longer Mar 07 07:54:54 Leeds: well excuse me for not assuming that I'm the centre of the universe :P Mar 07 07:54:58 thank you guys Mar 07 07:55:08 Trinsta: either they've just used someone else's ID - quite possibly for a Chinese company - or they're basing off a reference board from the same factory Mar 07 07:55:53 my ~/.android dir doesn't even have adb_isb.ini Mar 07 07:56:00 Leeds: thats a hard toss up actually... both are really likely possibilities. the first one to be cheap ;) - the second on also being cheap Mar 07 07:56:23 g00s: you don't need one if you're only working with mainstream devices - the IDs are built-in Mar 07 07:56:25 g00s: it's not required. Mar 07 07:56:38 both scenarios has someone being cheap haha Mar 07 07:57:39 HorizonXP: does that xaoimi device come with Play ? Mar 07 07:58:10 g00s: no Mar 07 07:58:21 g00s: looks like their own store Mar 07 07:58:33 i think we got this device from an investor Mar 07 07:58:41 so i'm a bit in the dark about it Mar 07 08:02:18 bloody hell Mar 07 08:02:33 speaking of China , http://sg.finance.yahoo.com/news/chinas-tech-ministry-warns-being-161045864.html Mar 07 08:02:35 i just realized that code that i took a week to figure out and write is almost useless Mar 07 08:02:42 *almost* Mar 07 08:04:15 g00s: anyone heard anything about ophone recently? Mar 07 08:04:23 rofl active war vs china Mar 07 08:04:24 google* Mar 07 08:04:25 i haven't Mar 07 08:04:34 is there a way to get the FK that causes a constraint violation? Mar 07 08:04:41 please don't create another OS =[ Mar 07 08:04:55 monsti: logging? Mar 07 08:06:25 so Guy Kawasaki is going to be editor in Chief of the Google Play Red Guide Mar 07 08:07:01 i'm surprised nobody has mentioned the Red Guide here yet Mar 07 08:07:02 Leeds: the constrain has a name Mar 07 08:07:12 Leeds: but android/sqlite doesn't tell me ;) Mar 07 08:07:33 is this a sqlie pragma? Mar 07 08:07:44 g00s: whats the Red Guide? Mar 07 08:08:29 Trinsta: http://www.guardian.co.uk/technology/2013/mar/04/google-android-apple-smartphone Mar 07 08:10:09 dang, thats nice. going to put android back to back with iphone Mar 07 08:10:59 g00s: how do you manage to stay on top of all this newsy stuff! Mar 07 08:11:25 Trinsta: honestly, i dont read that much news. i just look at the verge and HN Mar 07 08:11:31 news can rot your head Mar 07 08:11:52 i totally stopped reading anything that was mostly speculation / rumors / etc Mar 07 08:11:58 how do i enable snapshots when creating an avd from the commandline ? which switch should i add? Mar 07 08:12:11 g00s: o belabour the obvious, you've already figured out that this is all a fiction Mar 07 08:12:15 seems its fiction Mar 07 08:12:32 Trinsta: what is fiction ? Mar 07 08:12:53 it's what you get when two surfaces rub together Mar 07 08:12:56 the story Mar 07 08:13:03 anyone ? :/ Mar 07 08:13:04 or it would be, if Microsoft had managed to sell 2 of them :) Mar 07 08:14:10 Trinsta: guess i need to stop reading HN too :| Mar 07 08:14:39 g00s: hehe :) Mar 07 08:14:46 you got me all excited there too Mar 07 08:15:38 * g00s hangs head in shame Mar 07 08:15:55 a few more brain cells rotted away ... Mar 07 08:16:07 * g00s only has like 10 left Mar 07 08:17:26 maybe i'm cognitively disabled today because I spend much of my time reading about AccountManager, which has to be the most busted and convoluted thing I've seen in a while Mar 07 08:18:19 hmm, how many of you guys create frameworks so you don't have to deal with the same stuff later on? Mar 07 08:18:29 +1 Mar 07 08:18:43 * Trinsta finds it easier to update later Mar 07 08:18:44 I think it's more cause I would never be able to work the same stuff out Mar 07 08:18:51 yea Mar 07 08:18:53 :) Mar 07 08:19:18 Especially my security and warning system :) Mar 07 08:19:32 SynCrypt, SynWarning, SynID hehehe ;) Mar 07 08:20:06 oh and SynSecurity for detecting memory editting software / root Mar 07 08:22:29 StingRay_: do you doc your framework? Mar 07 08:23:06 no Mar 07 08:23:17 I'm not a programmer so I hardly comment too :) Mar 07 08:27:46 can i see some of your art? Mar 07 08:30:07 Trinsta: not had a portfolio in 10 years Mar 07 08:30:19 not had a CV in.... maybe longer Mar 07 08:30:57 I think if you do enough and known enough then it's not really needed Mar 07 08:31:08 well in my field neways Mar 07 08:31:47 well, at some point your name is enough Mar 07 08:32:05 maybe, been out of the game a year or so taking a break Mar 07 08:32:17 so it may be that I need one eventually Mar 07 08:32:21 :) Mar 07 08:32:29 So uh, is it normal in 4.0 that when AsyncTask is doing some processing the UI and GL threads start to lag? Mar 07 08:32:32 g00s: Hacker News is The Onion of programming Mar 07 08:32:39 g00s: or at least reads like that sometimes Mar 07 08:32:42 p_l: ;) Mar 07 08:33:05 Trinsta: I have some old videos up on youtube Mar 07 08:33:11 ahh link? Mar 07 08:33:15 I'm making sure that the heavy load starts when there're no important animations, but it's still noticeable at times Mar 07 08:33:18 with some of my stuff in, years old though Mar 07 08:33:22 1 sec Mar 07 08:33:23 its all good Mar 07 08:33:42 tis just test stuff though Mar 07 08:34:11 http://www.youtube.com/watch?v=cN5dzZmg1SE Mar 07 08:34:31 f*ck sake there are more, but hate the looking at them now Mar 07 08:34:40 100k views??????!?!? Mar 07 08:35:01 that a little or a lot ? Mar 07 08:35:10 small in youtube terms Mar 07 08:35:30 I was gonna do a whole learning maya series Mar 07 08:35:39 but couldn't find the time Mar 07 08:35:50 have plenty of it now though :) Mar 07 08:40:38 StingRay_: i liked http://www.youtube.com/watch?v=un2xuXa1KeY&list=UU5wJcoVmDDeibbx3Vn6volw&index=3 :) Mar 07 08:40:53 lol Mar 07 08:41:15 I like my organized multi-level menus Mar 07 08:41:32 bloody tablet interfaces... Mar 07 08:41:57 StingRay_: they're converging ! Mar 07 08:42:08 yeah, stupidly Mar 07 08:42:14 you know OS X 10.9 will be more iPadish than ever Mar 07 08:42:29 since the professional field is reliant on a non-tablet ui Mar 07 08:42:48 sound/video/cg/vfx/compositing Mar 07 08:43:03 all dead if sill tablet interface is standard Mar 07 08:43:06 StingRay_: Apple no longer needs DTP people being reliant on AppleScript to survive, they got enoug :> Mar 07 08:43:26 StingRay_: was that you correcting the bunny towards the end ? "Maxi Bunny Crazy Happy Rolling" Mar 07 08:43:30 p_l: dont care as long as I can turn it off Mar 07 08:43:43 no that was house m8 Mar 07 08:43:46 I was filming Mar 07 08:43:50 hehe Mar 07 08:44:14 very old bunny now, he's just turned 10 Mar 07 08:44:23 wich is like 100 or so Mar 07 08:44:30 which* Mar 07 08:45:23 * g00s cant believe he watched a bunny video on youtube … ok, time to get back to work Mar 07 08:49:34 g00s: http://www.youtube.com/watch?v=MKzqP4-0Z6M Mar 07 08:51:24 no, no more youtube Trinsta :) Mar 07 08:51:40 StingRay_: i thought it was going to attack like in monty python / holy grail Mar 07 08:52:01 btw, when filming that they didn't realize the red dye wouldn't come out :D Mar 07 09:03:41 Hand me the Holy hand-grenade ! Mar 07 09:04:31 you know that they can't find the place they filmed the rabbit scene? Mar 07 09:04:43 * g00s gives capella an android phone Mar 07 09:05:48 heh ... same rabbit who went the president in the rowboat incident :D Mar 07 09:05:58 * p_l takes away the phone, slaps an extra powerpack on it, gets root and hacks PMU self-destruct mode Mar 07 09:06:39 now, remember, count to *3* Mar 07 09:06:48 not 2, nor 4.. Mar 07 09:06:49 not 2, not four, and definitely the fuck not to 5 Mar 07 09:07:12 heh ... spam spam spam spam .... Mar 07 09:07:35 dead pickup will visit in the afternoon to pick up your dead Mar 07 09:08:06 that and the Lumberjacks blowing each other kissies .... I hate that I can't forget those lines XD Mar 07 09:08:36 the hiding PSA :D Mar 07 09:08:54 it's an ex-Parrot ! Mar 07 09:09:22 and "Always look on the bright side of death" Mar 07 09:10:26 "I'm here for an argument" Mar 07 09:12:06 "Always look on the bright side of Android" :) Mar 07 09:12:32 * p_l considers "Always look on the bright side of life" as the song for his funeral Mar 07 09:14:06 * monsti wants a p0rn trailer as win8 boot animatio Mar 07 09:17:46 <_kud> Hello, i've got a question about google play dev console and accounts Mar 07 09:17:57 <_kud> I've created an account with my own gmail address Mar 07 09:18:08 <_kud> though i'm developing an application for my company Mar 07 09:18:30 <_kud> for the moment, the application is branded with my nale Mar 07 09:18:31 <_kud> name* Mar 07 09:18:33 <_kud> which is wrong Mar 07 09:18:45 <_kud> Should I have to create another account especially for my company so? Mar 07 09:18:49 _kud: probably so Mar 07 09:18:53 <_kud> ah gosh. Mar 07 09:19:18 <_kud> I'd love that google play dev console works like github Mar 07 09:19:27 <_kud> you have your own account and you come in an organisation Mar 07 09:20:23 <_kud> So I have to create another account for my company, pay 25 bucks, and transfer the app? Mar 07 09:20:40 <_kud> and I really must use a "global" email for this account Mar 07 09:23:31 I think so Mar 07 09:23:44 didn't have a lot to do with it, so I can't help you more Mar 07 09:23:45 <_kud> okay Mar 07 09:23:53 <_kud> I see Mar 07 09:24:39 is there a way to use GCM on a Custom Android build? Mar 07 09:58:03 Hi, there's an odd feature I'd like to do, my app loads content from a web server that also has a normal front-end for browsers. There's going to be a link to download the native app from the playstore and when the app is installed and opened I want it to know where was the user in the browser so it can automatically continue from there. Are there any examples of this kind of thing anywhere? Like, on iOS it could've been done Mar 07 09:58:20 and then starting it again from the app to let the app know Mar 07 09:58:56 But Android has eons of browsers and you can't really be sure which one the user used when he clicked the install link Mar 07 09:59:19 So is there any way this sort of thing can be done? I'm out of ideas really Mar 07 10:00:14 Anonyneko: well send a get parameter to the url? Mar 07 10:00:43 http://foo/bar.php?stuff?1&frommyapp=1 Mar 07 10:01:00 your webpage has no frommyapp parameter... Mar 07 10:01:15 But how will it know that it's the same device Mar 07 10:01:37 Anonyneko: your users don't sign in or authenticate? Mar 07 10:01:42 Not necessarily Mar 07 10:01:59 Viewing doesn't require authentication Mar 07 10:02:03 Anonyneko: send the android device id as get parameter Mar 07 10:02:19 Oh, I see, thanks Mar 07 10:02:27 Is it available without root? Mar 07 10:02:34 yes Mar 07 10:02:37 Brilliant Mar 07 10:02:39 monsti: wont help since the browser doesn't make that available afaik Mar 07 10:02:39 Thank you Mar 07 10:02:41 btw. this is ALL shitty (!) Mar 07 10:02:49 Oh Mar 07 10:02:52 appel1: it's from his app Mar 07 10:02:53 The browser can't get it? Mar 07 10:03:36 monsti: yes, but he wants to remember that the user was on http://example.com/foo/bar so he can continue at the foo/bar activity in the app after the user has installed it Mar 07 10:03:40 as I understood it Mar 07 10:04:03 yeah - that's what i got, too Mar 07 10:04:09 More or less, yeah Mar 07 10:04:21 put some coockie if the user arrives with the android id Mar 07 10:04:33 but - you see? Mar 07 10:04:39 monsti: but he can't connect the browser user to the android id, can he? Mar 07 10:04:42 this is getting even more shitty ;) Mar 07 10:04:59 appel1: from an app - yes - only from a browser? no Mar 07 10:05:14 monsti: he starts off in the app Mar 07 10:05:20 web site I mean Mar 07 10:05:24 man, I need more coffee Mar 07 10:05:26 ahhh Mar 07 10:05:29 ok here what i suggest Mar 07 10:05:43 a conten provider link Mar 07 10:05:54 Yeah, website -> playstore link -> install app -> open app where it left off at the website Mar 07 10:06:30 no 100% way Mar 07 10:06:41 ok so my code didn't end up being useless Mar 07 10:06:42 after "install app" android might kicked the browser Mar 07 10:07:12 you can put a "go to my website" in your app after launch Mar 07 10:08:51 ok here my hack Mar 07 10:09:21 1) please write this number down "123456" 2) go to playstore + install 3) launch app "please enter your number you wrote down" Mar 07 10:09:35 Ahah Mar 07 10:09:36 this is shitty, too - but comes very close to that what you want Mar 07 10:09:53 Yeah, it'd be the manual way of doing the thing I want Mar 07 10:10:19 e.g. some customer id Mar 07 10:10:25 But if there's no way at all I'd rather just let the user go back to the browser and just "launch app" from the webpage Mar 07 10:10:54 i never did this - but in theorie you can put a content provider "link" to an app Mar 07 10:11:15 But if the app's not there yet... Mar 07 10:11:19 e.g. content://foo.bar.my.app.coolstuf - Mar 07 10:11:32 website -> app Mar 07 10:11:34 Anonyneko: use urls that exist on your website that tells the user to install the app Mar 07 10:11:36 or app->website Mar 07 10:11:40 no other way :) Mar 07 10:11:53 On Android there's no way a browser can save persistent, app-independent data on the device? Mar 07 10:12:12 with html5 you can save stuff in browser Mar 07 10:12:21 Anonyneko: for example, on your site you have a url http://example.com/app/some/url and then you have your app handle example.com urls that starts with app and do whatever Mar 07 10:12:40 but you can't be 100% sure if the browser A is used and when you launch "the browser" it's browser A - it could also be browser B Mar 07 10:12:46 Anonyneko: and on your website all app urls tells the user to install with links to play store Mar 07 10:12:52 Yep, the browser fragmentation is the issue Mar 07 10:13:01 Otherwise I could do it ios-style Mar 07 10:13:06 a keep it simple and stupid way Mar 07 10:13:11 put a cockie Mar 07 10:13:13 go to playstore Mar 07 10:13:19 launch browse Mar 07 10:13:29 cross fingers that it's the right one and your coockie is alive Mar 07 10:13:42 So pretty much launch standard or chrome if it's present Mar 07 10:13:53 "the browser" Mar 07 10:14:00 this is something userdependent Mar 07 10:14:06 Anonyneko: you don't launch a specific browser, you just tell android to view a url Mar 07 10:14:21 An app can't launch another app? Mar 07 10:14:27 sure Mar 07 10:14:31 Anonyneko: of course it can Mar 07 10:14:46 Anonyneko: but you usually don't launch specific apps Mar 07 10:14:53 I know the standard way is to let the user choose out of the intent-expecting apps Mar 07 10:15:04 you shouldn't force a user to use a specific browser Mar 07 10:15:05 But this whole issue is hack-on-hack-on-hack Mar 07 10:15:13 you can launch an app by the package name or shout to the system "launch a content type" Mar 07 10:15:26 I don't even need the user to do anything in the browser when it's launched from the app Mar 07 10:15:30 the coockie isn't a hack Mar 07 10:15:41 it's a 80% way because the stupid user is the stupid user Mar 07 10:15:42 It's just go to a specific url that'd return stuff back to the program and quit Mar 07 10:15:59 but your "registration process" for the app isn't well designed Mar 07 10:16:07 Well there is none Mar 07 10:16:22 website -> customer id -> app (needs customer id or launches website to get one) Mar 07 10:16:33 Viewing the public section without registration is something that's set in stone Mar 07 10:16:51 yes Mar 07 10:17:01 but when you need the id, you need it ;) Mar 07 10:17:14 if not, you can put a "go back to the website" as link in your app Mar 07 10:17:22 after launching the 1st time Mar 07 10:17:25 Anonyneko: what works is web -> install app and web -> open specific view in app or if not install redirect to install app Mar 07 10:17:38 appel1: yes that's the way Mar 07 10:17:38 Anonyneko: but there's really no good way for the app to determine where the user was on the site Mar 07 10:17:49 That's a pity Mar 07 10:18:10 well there is 100% way Mar 07 10:18:18 enter user/password ... for web and app Mar 07 10:18:38 yes, but the requirement was for no auth or identity Mar 07 10:19:12 Yeah, it's better to let the user return to the browser himself than to make him use auth and hope for the best Mar 07 10:19:21 yes so the "visit website" link in the app is the solution Mar 07 10:19:30 Anonyneko: you could on the page where you have the link to install the app explain to the user that he needs to resume from the website after installing the app to be able to navigate to the same place within the app Mar 07 10:19:54 appel1: wich in 99.99% of all cases the user will fail :) Mar 07 10:20:03 monsti: yeah Mar 07 10:20:07 Well, if there's nothing else, that's probably what I'll do Mar 07 10:20:20 and the browser might be dead! Mar 07 10:20:23 kicked by android Mar 07 10:20:32 Most likely Mar 07 10:20:53 guys have fun - i need some food Mar 07 10:20:57 monsti: that doesn't matter, he could still have a cookie to remember where the user was in the browser.. same way if the user resumes browsing after answering a call or whatever Mar 07 10:21:09 Oh Mar 07 10:21:16 monsti: actually, most browsers on android will restore the open tabs even if restarted Mar 07 10:21:22 Yeah Mar 07 10:21:30 monsti: or, all that I've ever tried that is =) Mar 07 10:21:59 would suck if the browser forgot where you were just because you got a call or whatever on a memory constrained device Mar 07 10:22:18 So basically either hope that the user opens the same browser or hope that he clicks on the "go to app" link otherwise Mar 07 10:23:35 Anonyneko: same way you'd have to hope he actually installs the app when you redirect to the play store ;) Mar 07 10:23:47 or launches it after it's been installed Mar 07 10:24:39 Well, the scenario implies that he does Mar 07 10:24:44 Otherwise it's his problem, not mine Mar 07 10:24:55 Hello does anyone have any idea why my MediaRecorder cuts last second when i`m recording mp4 video? Is there any solution :] Mar 07 10:25:37 Also can the browser tell if there's something to capture the myapp:// link without spamming errors? Like, some javascript that either launches the app if it's available or does something else otherwise? Mar 07 10:26:05 Anonyneko: don't use myapp: urls, use a real url on your website Mar 07 10:26:24 Anonyneko: that way either the app is opened, or if it isn't install the user will view the page at that url on your website in the browser Mar 07 10:26:38 real http url :) Mar 07 10:26:46 But won't the browser ask you every time if you want to see this url in the app if it's on the device? Mar 07 10:27:32 Anonyneko: so you have example.com/regular/stuff and open in app urls are example.com/app/regular/stuff Mar 07 10:29:31 So infer that the app's probably not installed if the user lands at that page in the browser Mar 07 10:29:46 Something like that? Mar 07 10:29:48 yes Mar 07 10:29:54 I see, thanks Mar 07 10:30:15 guys, is it possible to show a popup on top of a popup? Mar 07 10:33:36 So noone knows why MediaRecord freezes on last 1-2 second when you are recording something :[ Mar 07 10:39:10 we have to go deeper Mar 07 10:39:22 a popup ontop of a popup ontop of a popup Mar 07 10:40:19 by the way bLh if you actually did that your users will hate you. Nothing is more annoying than having to click away popups Mar 07 10:43:43 capella: one thing thats really annoying about FF desktop : if you have it in full screen mode and a website pops up a window, that also winds up in full screen mode Mar 07 10:43:50 not sure what the cure would be though Mar 07 10:53:22 hi all, how can I run the android emulator from a shell or a script in ubuntu? Mar 07 10:54:41 emulator @avdname Mar 07 10:54:43 http://developer.android.com/tools/help/emulator.html#startup-options Mar 07 10:57:54 and the emulator command is already inside ubuntu? or the sdk? Mar 07 10:58:10 it's part of the sdk Mar 07 10:59:36 hell0 folks Mar 07 11:00:00 Hello, Mar 07 11:00:09 hi Mar 07 11:00:54 i'm havingtrouble with gallery fling or onKeyDown, in a 1-element-swipe i implemented Mar 07 11:01:04 is anyone aware of bugs in android 2.x ?? Mar 07 11:01:14 it works just fine on 4.x Mar 07 11:02:01 y dont u put question on stackoverflow Mar 07 11:02:28 Is there any way to create an application container to isolate some application data? Idelly it would provide some virtual file system to keep thos data under control of some remote administration solution? Mar 07 11:07:10 mysmax been searching without success Mar 07 11:08:24 Nope dude Mar 07 11:10:19 say, is there any way of preventing a rooted phone from extracting your apk? Mar 07 11:10:36 balls2thewall: you can already do that on an unrooted phone so now Mar 07 11:11:03 the phone needs to extract the apk itself to get access to the stuff inside Mar 07 11:11:10 >_> bummer Mar 07 11:11:31 balls2thewall: and besides security by obscurity is a pretty worse pattern Mar 07 11:11:49 on an unrooted you might prevent stuff from accessing some data, but it won't stop rooted Mar 07 11:12:03 if you think about copy protection: don't waste your time with it Mar 07 11:12:09 the ppl stealing apk's anyway wouldn't buy them Mar 07 11:12:20 often they *can't* Mar 07 11:12:31 so better sepdn your time making your customers happy instead of trying (and you cannot succeed) making your not customers a bit more unhappy Mar 07 11:13:40 JakeWharton: are there any complications when using ABS and swipes / galleries ? Mar 07 11:13:40 one client stressed about his app being redistributed via piracy >_> Mar 07 11:13:41 is the android-eclipse IDE still regular Eclipse under the hood? Mar 07 11:13:56 balls2thewall: yeah it will Mar 07 11:13:59 it always will :_) Mar 07 11:14:12 belgianguy: yes Mar 07 11:14:15 name me one game that hasn't been cracked? Mar 07 11:14:18 dandre: Samsung Knox ;) Mar 07 11:14:22 afahim: k, thanks :) Mar 07 11:14:32 and you think large publishers don't put enough effort in macking their games crack safe Mar 07 11:14:57 the safer you will make it the more happy you will make the crackers, since for most of them its sport and not because they eagarly wants your apk and don't want to pay for it Mar 07 11:15:04 lol imo they deserve it actually, who the hell makes you pay for an app with promises of updates and then publishes updates for even more pay (they do) Mar 07 11:15:34 I have a listview with custom ArrayAdapter. each row in this list has a textview and button. I want to get for each click on each row which item is clicked the textview or the button ? Mar 07 11:15:36 you can always try to make some stuff with server authentification, but still ppl can modify your apk and get rid of that Mar 07 11:15:49 balls2thewall: I think you'll find that most people use the common model of 'free with ads' and 'pay without ads' and both receive updates at about the same time Mar 07 11:16:07 But you should still buy Chu Chu Rocket Mar 07 11:16:14 g00s: I have seen a news on this Mar 07 11:16:37 but I have no information about its availability Mar 07 11:16:55 nor anything else ;-) Mar 07 11:17:20 can someone help me with my case Mar 07 11:17:43 a Sherif with a cold case ! Mar 07 11:18:15 is knxo a proprietary dev from samsung or is it avaliable for other devices? Mar 07 11:18:53 dandre: they acquired it from another company, dont recall Mar 07 11:19:17 ok I see Mar 07 11:20:30 g00s: cellrox? Mar 07 11:20:40 anyone can support with my case above ? Mar 07 11:21:57 hi, im doing a http-get and wanna get the result back, but im not allowed to do so it seems from a run(), what should i do? http://pastie.org/6410937#27 or am i thinking wrong? Mar 07 11:22:47 cHarNe2: thats pretty much a java question, but you have not understood threads right Mar 07 11:23:02 (a) you cannot re assign values to final variables Mar 07 11:23:14 u r rite Mar 07 11:23:32 (b) you start the thread, what means it will run in background, the return res will return immediately, BEFORE all that in the run method is executed Mar 07 11:25:15 timroes: aww, ok. ye i under stand the concept of threding but never done it before acually. Mar 07 11:26:04 timroes: i read somewhere that im suppose to thread when im doing http-post/get in android, so i dont slow down the main-thread. thats correct right? Mar 07 11:26:17 its not a should Mar 07 11:26:21 from android 4.0 on its a must Mar 07 11:26:30 android won't allow you do to network traffic in main thread anymore Mar 07 11:27:30 that explains the error i had before, but then how am i suppose to get the result back to my "code" Mar 07 11:29:00 hello Mar 07 11:29:26 who knows anything about bluetooth 4 / bluetooth smart ready / bluetooth low energy ? Mar 07 11:29:42 I have some problems with my app... I have more than 11 error reports of the type "OutOfMemoryError"... i s abitmapfactory really using that much memory? Mar 07 11:31:03 afahim: in what way? Mar 07 11:31:43 SpeedEvil: I'm developing an app and would like to make sure that this protocol is being used when I send data Mar 07 11:32:01 afahim: afaik there's no support for BT-LE Mar 07 11:32:20 that Mar 07 11:32:39 ble also requires hardware support on both sides Mar 07 11:32:59 p_l: What is I'm using two S3's, both of which are supposed to be Bluetooth 4 ready Mar 07 11:33:20 afahim: i'm guessing android 5 might have it :) but it will take a year or 2 for adoption to be useful ;) Mar 07 11:34:00 if your S3 gets android 5, maybe ... Mar 07 11:34:01 afahim: they can have BT4.0 and not have low energy Mar 07 11:34:27 https://code.google.com/p/android/issues/detail?id=40578 Mar 07 11:34:27 haha Mar 07 11:34:30 wtf :D Mar 07 11:34:37 g00s: Thanks. I was just wondering if there was some way I can carry out some testing on BT4, to see if its actually low energy as compared to normal BT Mar 07 11:34:57 is a bitmap factory using much memory?... Mar 07 11:34:59 there are a few phones which have oem-provided proprietary APIS Mar 07 11:35:40 afahim: there is no support for ble in stock Mar 07 11:35:53 afahim: it's not something that just happens magically Mar 07 11:35:55 DashCC: haha, indeed Mar 07 11:36:20 afahim: plus, the transmission may be low power, you don't care about this Mar 07 11:36:35 afahim: you could get a TI SensorTag and see if you can read from it :D Mar 07 11:36:43 (its not going to work) Mar 07 11:36:56 afahim: even 'high power' Bluetooth will use less power than the CPU not idle Mar 07 11:37:53 SpeedEvil: not quite sure if I understand but okay Mar 07 11:38:11 afahim: what are you actually trying to do? Mar 07 11:38:25 is it presence detection, or actually sending data? Mar 07 11:38:35 SpeedEvil: I'm trying to measure the energy that it takes to send data using different technologies Mar 07 11:39:08 afahim: that does not have a clearly defined meaning. it will depend on latency requirements. Mar 07 11:39:08 SpeedEvil: I wanted to actually send some data using BT4 and see how much energy it took Mar 07 11:39:35 SpeedEvil: Assuming phones are places next to each other Mar 07 11:39:41 and could vary by easily six orders of magnitude, depending on what the data rate is. Mar 07 11:40:04 afahim: BLE is a completley different link Mar 07 11:40:34 waking the CPU will typically use 300mW or so. Mar 07 11:41:03 the radio uses lots less than this for Bluetooth, even in the maximum case Mar 07 11:41:11 packetisation matters Mar 07 11:41:54 http://wiki.maemo.org/N900_Hardware_Power_Consumption you may find useful Mar 07 11:42:20 SpeedEvil: Hmm Mar 07 11:44:08 SpeedEvil: Thanks Mar 07 11:54:13 which is best android app Mar 07 11:54:28 mine of course Mar 07 11:58:40 hmm, atlassian sourcetree is still free. thought it was paid now Mar 07 11:59:00 between that and free dl of p4merge, i struck gold today XD Mar 07 12:00:40 Styler2go: i would check if you have a memory leak in your bitmap handling, that could cause it if they often rotate device (or similiar stuff) Mar 07 12:01:01 could i show you my class which handles bitmaps? Mar 07 12:01:12 no :) Mar 07 12:01:21 hmm ok Mar 07 12:01:22 because memory leaks are pretty heavy to detect (and need a lots of time) Mar 07 12:01:39 i can highly recommend that talk: https://www.youtube.com/watch?v=_CruQY55HOk Mar 07 12:01:48 but maybe you see that i am obviously doing something wrong Mar 07 12:01:51 he shows (even with an example of leaky bitmaps) how you can find them Mar 07 12:01:58 okay paste it, perhaps i see something obvious :) Mar 07 12:02:12 but if I don't that gives you no guarantee there is none :) Mar 07 12:02:29 yes Mar 07 12:03:09 http://pastebin.com/RwTVAqdV Mar 07 12:03:12 and i still recommend the talk, also for some geenral techniques on using the memory analyzer and such Mar 07 12:04:05 Styler2go: the class where loadCoverImage is used ? Mar 07 12:04:19 you want to see this too? Mar 07 12:04:30 sigh. why is the up-button broken in the battery low details activity? Mar 07 12:04:34 Styler2go: yeah :) Mar 07 12:04:47 wait a second.. its used many times, i give you one example ... Mar 07 12:05:47 http://pastebin.com/sGkeEJ2w Mar 07 12:07:17 Bitmap myBitmap = BitmapFactory.decodeStream(new FileInputStream(imageExist)); this is the most reported line Mar 07 12:08:26 don't see any pretty obvious Mar 07 12:08:41 but even IF there is no memory leak, there might be just too much images for low end devices :) Mar 07 12:08:43 ok :) thanks for having time for me :) Mar 07 12:08:51 hmm Mar 07 12:09:04 Styler2go: do you ever recycle bitmap instances when done with them? might be that you create bitmap objects faster than they are gc:d Mar 07 12:09:05 there is a maximum of 10 images sent to this function Mar 07 12:10:33 but i found another, bigger memory leak... i have a picture upload function and before they upload it they will get an dialog with just an imageview with the image chosen in it, this seems to be the bigger problem... and this is only one photo in this case... Mar 07 12:11:09 ImageView showPic = new ImageView(this); showPic.setImageURI(imageUri); Mar 07 12:11:28 the second line causes this problem... Mar 07 12:11:38 appel1: but that shouldn't cause out ofmemory, but as long as the pictures are already freed for GC (and just not GC:d) the gc will run when you try to allocate the next one, isn't it? Mar 07 12:12:01 instead of a concurrent one you will get and GC_FOR_ALLOC run then Mar 07 12:13:42 timroes: perhaps it has improved in newer versions of android Mar 07 12:27:29 Styler2go: are you testing on a 2.x or 4.x device? :) Mar 07 12:27:45 i am using a 4.x device for testing Mar 07 12:28:07 ok Mar 07 12:28:17 why are you asking? Mar 07 12:28:40 i have two test devices, one is 2.3 and one is 4.x but i only test it on 2.3 if i do some bug changes Mar 07 12:29:55 hmm, is this dropbox sync api new ? Mar 07 12:33:08 Styler2go: on older devices the gc isn't triggered when you run out of memory because of bitmaps afaik Mar 07 12:55:52 Hi. I'm making an app to make it easier for people to authenticate on my school's WiFi. I can get the response (OK, Wrong password, already logged in or couldn't connect) in LogCat, but I really can't get it to open a Toast, or show a dialog box. How would I do that, from within the networking thread? On line 62, for instance... http://pastebin.com/M4LhjuEp Mar 07 12:59:26 Kottizen: use an AsyncTask or runOnUiThread from your background thread to do ui stuff Mar 07 13:15:47 Hi, im trying to make my application fragment to display something (using sherlock) . but there doesnt seem to be a nice way to do this from an activity as getSupportFragmentManager() is undefined for an activity, is it right that I need to make all my activities fragments if I want to use fragments? Mar 07 13:15:58 appel1: Thanks :) Mar 07 13:19:48 can a try catch fetch a outofmemory? Mar 07 13:20:13 Also, what are the dialog loading bars called? The ones you see when you for instance unlock the sim card Mar 07 13:20:45 I want it to be displayed between that the user has touched/clicked the "Log in" button and that the app gets a response Mar 07 13:26:10 Anyone got experience with AlarmManager aquiring wakelock in receiver to play sound in a service? Is it enough to aquire the wakelock in the receiver, startService and then release the wakelock? Or must I wait for the sound to be played in the Service before I release wakelock? :) Mar 07 13:26:20 any of you got the partner io2013 invite? the hotel stuff is weird Mar 07 13:39:19 i hope you bitches enjoy your cats and pongs on the io 2013 site Mar 07 13:39:25 is there a way to get javascript console.log in logcat? Mar 07 13:39:30 from a webview Mar 07 13:40:49 setWebChromeClient on the webview and overwrite onConsoleMessage in that client Mar 07 13:41:06 hm... Mar 07 13:41:07 wait link is comming Mar 07 13:41:18 http://developer.android.com/guide/webapps/debugging.html#WebView Mar 07 13:41:23 timroes: you remind me of squid Mar 07 13:41:32 the proxy? Mar 07 13:41:41 or the animal? Mar 07 13:41:48 or something else i don't know yet :D Mar 07 13:42:00 thank you :) Mar 07 13:42:26 animal Mar 07 13:42:33 cool Mar 07 13:42:42 i've already compared to worse animals :D Mar 07 13:42:45 oh no.... Origin null is not allowed by Access-Control-Allow-Origin. at null:1 Mar 07 13:44:37 hmm calling show() on a SherlockDialogFragment throws the following exception: Unable to instantiate activity ComponentInfo ...... cannot be cast to android.app.activity. any ideas? Mar 07 13:47:23 mikedg: there's cats and pongs? Mar 07 13:47:35 funkbox: yes Mar 07 13:47:41 if you enter codes on the i/o main page Mar 07 13:47:50 you can play pong, see cats and other stupid shit Mar 07 13:48:00 mikedg: ahh. Mar 07 13:48:16 i was too excited about registering early to play with that Mar 07 13:48:26 you got to register early ? Mar 07 13:48:53 i'll give you $45,000 for your ticket Mar 07 13:48:56 yes they let "partners" register early Mar 07 13:49:20 if I marry a googler I can get early reg? Mar 07 13:49:38 i think only if they're on the IO team Mar 07 13:49:55 i got early reg in 2011, since then Ihavent been cool enough Mar 07 13:50:04 you can only get a IO reg if you camp the site, have no idea how to program or even what Android is, and sell the goodies on ebay later Mar 07 13:50:40 timroes: what phone do you have? Mar 07 13:50:45 galaxy nexus Mar 07 13:50:56 mikedg: yeah the only reason i got it is because there's people who are known Mar 07 13:50:58 ok :) Mar 07 13:51:35 what dou you guys think about the wirless loading function? Mar 07 13:51:47 *charging Mar 07 13:52:34 tested it once, but not much Mar 07 13:53:17 do you think its a good new thing or is it unnecessary? Mar 07 13:53:38 can be interesting Mar 07 13:53:45 not enough hw to test :) Mar 07 13:53:52 ok :) Mar 07 13:53:57 <_kud> Hey Mar 07 13:54:01 hello Mar 07 13:54:11 <_kud> We cannot remove an application from our google play dev console? Mar 07 13:54:20 nope Mar 07 13:54:30 _kud: the application needs to be never published Mar 07 13:54:36 and if you get suspended your apps are there withbright red lettering saying suspended foreveerrr Mar 07 13:54:39 or unpublished again, then you need to remove all apk's manually Mar 07 13:54:45 <_kud> The thing is I created an application with my own google account Mar 07 13:55:01 <_kud> I saw that it wasn't the best solution because it's the application of my company Mar 07 13:55:10 you can transfer an app Mar 07 13:55:12 <_kud> so I've created another google account about my company Mar 07 13:55:26 <_kud> Yes, I think I will do that. Mar 07 13:55:41 <_kud> But in any case, I have to modify my application Mar 07 13:56:02 <_kud> the package name sucks, I did it via cordova, and the package name is " io.cordova.hellocordova" Mar 07 13:56:03 <_kud> \o/ Mar 07 13:56:15 <_kud> which is wrong, I have to push another apk version Mar 07 13:56:18 you cant change the package name once uploaded Mar 07 13:56:20 <_kud> I hope the package name will change Mar 07 13:56:26 <_kud> Okay... Mar 07 13:56:28 <_kud> right. Mar 07 13:56:34 http://android-developers.blogspot.de/2011/06/things-that-cannot-change.html Mar 07 13:56:34 just unpublish and chalk it up to lessons learned Mar 07 13:56:35 <_kud> So I will get a dead app in my account? Mar 07 13:56:39 yes Mar 07 13:56:40 <_kud> Okay. Mar 07 13:56:42 <_kud> Thank you ;) Mar 07 13:57:06 if you unpublished it and delete all apks from developer console you can delete it ? (i read somewhere) Mar 07 13:57:25 <_kud> Gotta have a try Mar 07 13:57:43 i hate these phone sleeves :( i want to see my back of the phone but i want to protect it... :( *first world porblems* :D Mar 07 13:58:36 timroes: seems true: http://img213.imageshack.us/img213/6498/climsyclipboardy.png Mar 07 13:58:52 Styler2go: this app never has been published? Mar 07 13:58:58 no Mar 07 13:59:00 never published app you can delete easily Mar 07 13:59:03 thats not the problem :) Mar 07 13:59:18 but i think already published apps need some more steps Mar 07 13:59:29 let ssee.. i have one which could be deleten Mar 07 13:59:39 yeah, if you've already published the app and anyone's downloaded it, you cannot safely change the packagename for it. Mar 07 13:59:54 if no one has downloaded it but it's been published (then unpublished) you can probably ask elgoog. Mar 07 14:00:00 If it's never been published, NO PROBLEM. Mar 07 14:00:28 yepp, i cant delete published apps Mar 07 14:00:45 not after unpublishing and removing all apks manually?> Mar 07 14:01:09 wait... Mar 07 14:01:48 nope Mar 07 14:01:53 you cant delete it Mar 07 14:01:55 okay Mar 07 14:02:37 hello, is there any possibility to ellipsize single line edit text? Mar 07 14:02:47 <_kud> Sorry, timeout. Mar 07 14:02:52 <_kud> Okay, thank you for your answers Mar 07 14:05:06 So, in order to be able to receive key-input on my SurfaceView, I have to do setFocusableInTouchMode(true). But then the Back button and Volume buttons doesn't work anymore. Do I really have to code my own volume control and back button, or am I just missing something? Mar 07 14:06:03 this wireless charging is expensive... o.O Mar 07 14:09:42 is there any possibility to ellipsize single line edit text? Mar 07 14:09:56 I have two threads, one producer, one consumer. Events should be consumed on a FIFO basis. Would an ArrayBlockingQueue be the best choice here? Mar 07 14:11:07 uh-oh, ron's here Mar 07 14:21:02 please, i really disappointed, why i can elipsize edit text? is it possible? Mar 07 14:21:34 xgear: I have no idea. Probably. Mar 07 14:21:51 wheee, got my date for on-site interview Mar 07 14:21:52 xgear: https://developer.android.com/reference/android/widget/TextView.html#attr_android:ellipsize Mar 07 14:21:59 xgear: EditText extends TextView. Mar 07 14:22:11 either it does or doesn't work. Do some research. Mar 07 14:22:12 i know Mar 07 14:22:14 p_l: congrats, where Mar 07 14:22:31 but i cant :( do it! Mar 07 14:22:43 welp! Mar 07 14:22:59 feel free to post on stackoverflow or something, or just continue complaining incessently Mar 07 14:23:04 you know, whatever. Mar 07 14:23:28 http://pastebin.com/GvNiEGhz Mar 07 14:23:29 Oh hey Mar 07 14:23:36 I did a google search for "EditText ellipsize" Mar 07 14:23:40 and I got http://stackoverflow.com/questions/5199712/android-edittext-doesnt-get-ellipsized as my first result Mar 07 14:24:03 i tried Mar 07 14:24:07 I feel like there should be a rule in the topic that says "If your question can be answered by typing it into google, get out" Mar 07 14:24:13 it doesn't help Mar 07 14:24:25 xgear: I honestly couldn't care less. Mar 07 14:24:55 it sounds like you're going to have different results on different platforms potentially Mar 07 14:25:18 i use 2.2 emulator and 4.0.4 device Mar 07 14:25:43 09:24:50 < lov> xgear: I honestly couldn't care less. Mar 07 14:25:47 lov: London, monday Mar 07 14:25:56 sorry Mar 07 14:25:56 I fly in on sunday Mar 07 14:25:58 I'm being mean Mar 07 14:26:13 but you should definitely use stackoverflow for this kind of question too. Mar 07 14:26:27 p_l: ok, where in london? Anyone I'd have heard of internationally? Mar 07 14:26:50 lov: having a good day, huh? :) Mar 07 14:27:05 lov: Google London :) Mar 07 14:27:11 p_l: nice Mar 07 14:27:47 lov: http://clip2net.com/s/4HMX2X Mar 07 14:28:24 i searched 2 pages of google Mar 07 14:30:52 sounds like EditText doesn't support ellipsed properly then. Mar 07 14:30:54 Problem solved. Mar 07 14:32:54 lov: i got 1 more lumia than you Mar 07 14:33:31 can someone change the topic to "All we do is google for you, so please google yourself" Mar 07 14:33:54 mikedg: I got one more 8X than you Mar 07 14:34:00 really, just replace this channel with http://xkcd.com/627/ Mar 07 14:34:01 damnit Mar 07 14:35:29 leeds ill trade you Mar 07 14:35:33 then ill have one more 8x than you Mar 07 14:35:46 ill even through in an ATT pre! Mar 07 14:35:52 "sounds like EditText doesn't support ellipsed properly then" according my logic - if edittext have ellipsize attribute, so this feature should be supported. Mar 07 14:35:52 I don't want either... Mar 07 14:36:37 oh ok then ill just pay pay postage for your to send your 8x? Mar 07 14:36:38 thanks Mar 07 14:36:39 ! Mar 07 14:37:31 got to make friends with HTC Mar 07 14:41:13 everytime i want to export my app i get dalvik error and have to clean my porjects.. why? Mar 07 14:46:31 hei guys and gals. Quick question. The Top New Free Apps list and every other list of the kind on GooglePlay ... are those lists country specific/dependent? Mar 07 14:46:37 yes Mar 07 14:46:40 crap Mar 07 14:47:03 at least partly, anyway Mar 07 14:47:14 so if i want to see what people from the US see I'd need to use a proxy i'm guessing. Mar 07 14:47:15 no? Mar 07 14:47:32 i can't choose this from the website Mar 07 14:47:33 ? Mar 07 14:47:49 no, you can't choose it from the website Mar 07 14:48:10 crap. And I was so happy I was featured on the 9th page :)) Mar 07 14:48:12 lol Mar 07 14:48:50 on my N7, it looks to me like the top paid is global, but top free and grossing look local - simply from the presence or absence of Chinese apps Mar 07 14:49:20 oh...yeah Mar 07 14:50:07 either that, or people in Hong Kong *really* don't buy apps, but they do like IAP Mar 07 14:51:01 IAP ? Mar 07 14:51:15 top paid for me looks local, plenty of swedish only apps there Mar 07 14:51:49 in-app purchase Mar 07 14:51:55 oh...ok Mar 07 14:52:09 well, that's a bummer Mar 07 14:52:13 appel1: are you Swedish? Mar 07 14:52:13 ok guys, thanks Mar 07 14:52:21 deepy: yes Mar 07 14:52:23 appel1: so from 2 data points, we can conclude... that it's sometimes local, sometimes not, maybe :) Mar 07 14:52:54 I've been thinking so becuase of your nick for a while now. But I figured I might as well confirm it Mar 07 15:02:35 cool firefox and skydrive have me pegged at 98% cpu each Mar 07 15:30:52 blet Mar 07 15:36:51 cho? Mar 07 15:42:15 gimme my prereg, gimme my preg Mar 07 15:42:21 what if it was you hanging up on this wall Mar 07 16:07:07 good morning everybody Mar 07 16:07:36 does anybody know how to check programmatically if a device supports OpenGLES 2.0? Mar 07 16:08:13 yep check for android 2.2 Mar 07 16:08:14 offhand, I'm not sure, but you could just set the requirement in the manifest. Mar 07 16:08:35 popers: you could set it in the manifest Mar 07 16:08:41 and even check again in the code Mar 07 16:08:52 (some apps fallback to 1.x) Mar 07 16:09:20 i put it in the manifest Mar 07 16:09:31 but i want to check my devices fisically Mar 07 16:09:59 im sorry for my English but im learning yet Mar 07 16:10:06 popers: final boolean supportsEs2 = configurationInfo.reqGlEsVersion >= 0x20000; Mar 07 16:10:22 where do i have to put that Mar 07 16:10:35 I extract values from a String with this: http://pastebin.com/BchEZ4ck . But how should I do it if I want to have different locals? I mean, the [hm] will sometimes be different depending on language. Mar 07 16:10:41 that's Java, in OnCreate I reckon Mar 07 16:12:12 Is it possible to use instrumentation for data collection for applications that are published on the market? Mar 07 16:12:39 Quacked: localized string resource as you do with any localization Mar 07 16:13:02 hi Mar 07 16:13:02 but configurationInfo is instantiated by what? Mar 07 16:14:03 I need some advice, I'm making a diagram making app, I would like to know what's the best way to draw on screen? Mar 07 16:14:17 I've tried with the canvas object within a view, to draw itself Mar 07 16:14:44 and also, adding subviews to a groupview Mar 07 16:15:07 i need to move this figures onscreen, so with the first one i redraw the view Mar 07 16:15:18 and with the second aproach i move the view Mar 07 16:15:30 do u know which is better or if there's something else? Mar 07 16:15:51 appel1: but surely this can't work? Pattern p = Pattern.compile("(\\d+)([getResources().getString(R.string.h)m])"); Mar 07 16:16:13 ericvargas: use a SurfaceView or GLSurfaceView. Mar 07 16:16:32 Quacked: no, you need to either put the whole regex in the resource or concatinate the parts Mar 07 16:17:13 Is it possible to use instrumentation for applications that are published on the market? Mar 07 16:17:14 regex is your noob tubes! Mar 07 16:17:33 Ah, I'll try with whole regex in resource Mar 07 16:22:02 asdf Mar 07 16:22:04 thanks belgianguy Mar 07 16:22:56 belgianguy, isn't that just checking if your requested version is >= 2.0? Mar 07 16:23:28 lov, do u recommend to treating each element in the view as something that must be drawn by the canvas? Mar 07 16:23:39 to treat* Mar 07 16:23:56 actually yeah belgianguy popers, that doesn't do what you want Mar 07 16:24:05 it's going to return exactly what you have set in your manifest Mar 07 16:24:11 and then deal with touch events watching if a touch is within the boundaries of this element? Mar 07 16:24:56 ericvargas: I'd honestly recommend having your own engine to handle this, including where to dispatch touch events. Mar 07 16:25:06 I would recommend having one SurfaceView or GLSurfaceView that dispatches everything to your engine. Mar 07 16:25:17 You COULD make this out of multiple views, etc, but that could get a little hairy Mar 07 16:25:20 it's possible though. Mar 07 16:26:18 hi Mar 07 16:26:19 canadiancow: source: http://www.learnopengles.com/android-lesson-one-getting-started/ Mar 07 16:27:49 canadiancow: the manifest flag is set to 2.0 though Mar 07 16:28:02 I have a List of a class "AlarmHolder", which has a member called "PersonHolder", and this one has a member called "SensorHolder". All of them are Parseable. If I try to get SensorHolder on a different activity, AlarmHolder, and PersonHolder members are all correct, but the SensorHolder members are the last ones that got stored into the List to begin with Mar 07 16:28:12 any thoughts on how to avoid this? It is driving me nuts Mar 07 16:28:14 belgianguy, Mar 07 16:28:15 Information you can retrieve about hardware configuration preferences declared by an application. This corresponds to information collected from the AndroidManifest.xml's and tags. Mar 07 16:28:20 source: http://developer.android.com/reference/android/content/pm/ConfigurationInfo.html Mar 07 16:28:24 :P Mar 07 16:28:29 if I do a List, SensorHolder has the expected behavior Mar 07 16:28:43 maybe i'm wrong, but then the documentation is wrong too :P Mar 07 16:29:16 canadiancow: well those odds are pretty slim, but then again you used to have a bubble next to your name :p Mar 07 16:29:40 (in xchat) Mar 07 16:30:00 Just try it Mar 07 16:30:08 Change your manifest settings, see if the value changes Mar 07 16:30:19 i have a black and white bitmap. when i draw it onto a canvas using a pain with the alpha value set, the alpha appears just fine. if i set a color to the paint, the new bitmap is still black. any suggestions on how to set the color of the new image? Mar 07 16:30:35 belgianguy, better? :P Mar 07 16:30:55 im still the same old me Mar 07 16:31:56 any Parceable person willing to lend me a hand? :( Mar 07 16:32:30 https://gist.github.com/speakingcode/180977bc078fd59f6c1a the snippet here that changes the color of individual pixels makes the entire image red w/o alpha if i place that after i do the redraw onto a new canvas. if i place it before, it seems to do nothing Mar 07 16:33:16 Is it possible to use instrumentation for applications that are published on the market? Based on what I'm seeing, it doesn't seem possible Mar 07 16:33:48 alemos, if you mean Parcelable, then even though i, as a person, am not Parcelable, i may still be able to help ;) Mar 07 16:33:55 but your best option is always just to ask a question Mar 07 16:34:04 I did up top Mar 07 16:34:06 hang on Mar 07 16:34:08 canadiancow: ahh, sorry, was afk for a moment, but you've still got it ;) Mar 07 16:34:19 canadiancow: "I have a List of a class "AlarmHolder", which has a member called "PersonHolder", and this one has a member called "SensorHolder". All of them are Parseable. If I try to get SensorHolder on a different activity, AlarmHolder, and PersonHolder members are all correct, but the SensorHolder members are the last ones that got stored into the List to begin with" Mar 07 16:34:19 is the docu from d.android.com also in some repository to fix it, or do i have to complain somewhere Mar 07 16:34:25 what's up canadiancow Mar 07 16:34:56 timroes, it's in aosp Mar 07 16:35:46 timroes, if it's the javadocs for a class, you want that java file Mar 07 16:35:52 okay nice, then i will search it later and fic it :D Mar 07 16:36:43 if it's just a training page or osmething, it's frameworks/base/docs/html/ Mar 07 16:37:18 ah okay i guess its no in there then :) Mar 07 16:37:21 its the GCM tutorial Mar 07 16:37:27 use branch jb-mr1.1-dev Mar 07 16:38:18 actually no. jb-mr1-dev Mar 07 16:38:25 i'm using confiurationInfo.getGlEsVersion() but i only get 0.0 Mar 07 16:38:32 what could be the problem Mar 07 16:38:46 canadiancow: you now by chance if the GCM tutorial is in the aosp? Mar 07 16:38:52 since its a google service i guess its not Mar 07 16:38:54 it definitely is Mar 07 16:38:59 if it's on d.android.com Mar 07 16:39:08 okay nice, then i will seach it when i am home thanks :) Mar 07 16:39:36 because you need to add a library to your project to get it working (json parser) that is never mentioned in the tutorial :D Mar 07 16:40:04 anyone here using ACRA for error reporting? Mar 07 16:40:27 I'd like to call the putCustomData method from two threads...but I can't figure out if the method is thread safe... Mar 07 16:40:29 any ideas? Mar 07 16:41:07 I've looked through the code and I determined with 60% that it's not synchronized ... but I'm not 100% sure Mar 07 16:41:11 anyone? :) Mar 07 16:51:17 i've solved searching in api demos Mar 07 16:51:40 ok, then here's another question. I've figured out that the putCustomData is in fact a call to the method "put" of a HashMap ... Mar 07 16:51:50 ActivityManager am=(ActivityManager) getSystemService(Context.ACTIVITY_SERVICE); Mar 07 16:51:53 but that method is not synchronized either... am i right? Mar 07 16:52:16 then ConfigurationInfo c=am.getDeviceConfigurationInfo(); Mar 07 16:52:42 and c.getGlEsVersion() is available Mar 07 16:53:50 vmware, ios simulator, and android emulator all running Mar 07 16:53:51 wheeee Mar 07 17:02:44 canadiancow: clearer here? http://pastebin.com/2WPmWWMs Mar 07 17:03:21 I have a breakpoint at on the first line of my AsyncTask onPostExecute which isn't being hit, despite the breakpoint on the return of doInBackground() being hit. Any ideas what I can check? Mar 07 17:03:23 I am adding a Parcelable to a List<>, and one of its members is overriden :| Mar 07 17:04:34 Oh whoops I was calling doInBackground() manually. Mar 07 17:12:00 operhiem1: if I had a dime for every time I'd called .run() on a Thread instead of .start()... Mar 07 17:12:08 ... I'd probably have like fifty cents but still! Mar 07 17:17:14 evanc: that would be _THE_ bug for lint Mar 07 17:17:29 but lint just finds correct stuff and marks this as an error Mar 07 17:17:49 monsti: file a bug or write a patch :) Mar 07 17:18:47 well i found the "make lint less anoying" button Mar 07 17:19:13 it's like the "click more, work less" button in outlook :) Mar 07 17:23:51 canadiancow: could you tell me which branch i should use again? Mar 07 17:23:54 and he left before i could help him Mar 07 17:23:56 jb-mr1-dev Mar 07 17:24:01 thanks :) Mar 07 17:25:32 <_kud> is there anyone who uses cordova by any chance? Mar 07 17:26:11 <_kud> I'd like to modify my package name, I already did it in AndroidManifest, but it seems that cordova continues to want to compile the class with another package name Mar 07 17:29:29 evanc: :) Mar 07 17:34:37 Whats the oldest android phone we should test on? Mar 07 17:34:52 G1 Mar 07 17:35:40 just kidding, that's a subjective question based on your app, minSdk, etc. Mar 07 17:35:49 ah ok lol Mar 07 17:35:58 gnarf gerrit is really a bunch of... anything Mar 07 17:36:09 again i cannot add a gruop to my commit.. Mar 07 17:36:32 it just loads and finished without adding anyone Mar 07 17:43:01 JakeWharton: I always test on a Sooner Mar 07 17:44:05 * reanguiano watched someone use visual studio to write android apps just now Mar 07 17:44:11 I mostly just do it later Mar 07 17:45:20 A +1 cookie to both of you Mar 07 17:48:46 So what device would you recommend for small games JakeWharton ? Mar 07 17:51:04 I was thinking the samsung galaxy s? Mar 07 17:51:39 small games? Mar 07 17:51:43 yeah that's a good relatively low-end phone Mar 07 17:52:45 I have a nexus 7 for higher end stuff, so I was thinking of getting a lower end phone for simple games, like doodle jump for example. Mar 07 17:54:17 galaxy s is not a low end phone Mar 07 17:54:19 http://asia.cnet.com/samsungs-galaxy-s-scores-in-benchmarks-62200389.htm Mar 07 17:58:04 JakeWharton: show me some bacon Mar 07 17:58:48 show me what the Nexus 4 scores compared to the Galaxy S, though Mar 07 17:59:10 that's irrelephant Mar 07 17:59:28 I would like some bacon Mar 07 17:59:48 lov: get me an io ticket and ill give you $100 worth of bacon Mar 07 17:59:53 no deal Mar 07 18:00:15 $101 Mar 07 18:00:36 i'll give you jake wharton's hair Mar 07 18:00:48 each strand has the code for an android library Mar 07 18:00:49 Let me think about it, I'll get back to you. Mar 07 18:00:55 actually I wouldn't doubt that last part. Mar 07 18:01:11 I can probably look on github.com/jakewharton/haircomb/ and find something Mar 07 18:05:59 Hey guys..!! I am not able to instantiate a database helper.. can anyone help..? Mar 07 18:06:07 purezen: did you make on Mar 07 18:06:07 e Mar 07 18:06:50 mikedg: Hi.. sorry.. didn't get you.. Mar 07 18:07:05 purezen: state your problem clearly Mar 07 18:07:09 what are you trying, and what's not working? Mar 07 18:07:33 evanc: I have my question on stackoverflow.. shall I past the link here..? Mar 07 18:08:39 It's here..http://stackoverflow.com/questions/15275901/android-application-crashes-on-starting-an-activity-with-message-fatal-exceptio Mar 07 18:10:18 Or here: http://pastie.org/6413454 Mar 07 18:10:28 Sorry for the mess..:( Mar 07 18:13:21 Hi all. Mar 07 18:13:25 purezen: commonsware answered you. read his answer. Mar 07 18:13:40 So the lower end HTC Desire would be a better option? Mar 07 18:14:30 a htc tattoo is a good attempt Mar 07 18:15:13 I have some questions regarding getting into android dev. :) Can anyone help me? Mar 07 18:15:55 yes Mar 07 18:16:00 i love mad men Mar 07 18:16:21 can you get me to be an extra on the new season? Mar 07 18:18:41 lov: Thanks.. but I edited the post after that.. (after trying that stuff and what a guy answered in the comments to the main post).. Mar 07 18:19:23 Hamm: d.android.com Mar 07 18:19:31 I expect an extra role on Mad Men for this. Mar 07 18:19:36 (Just ask your question) Mar 07 18:22:48 i self taught myself enough java to program some little text adventure games... and i wanted to put them on my android phone, but not sure where to start Mar 07 18:23:11 d.android.com is a good idea Mar 07 18:23:38 Hamm: you should just hire someone to port it for you Mar 07 18:23:47 * kaneda^ shoves mikedg out of the way Mar 07 18:24:15 don't have the money for that, didn't think it would be as tough as it it. :P Mar 07 18:25:37 not enough money? Mar 07 18:25:42 i call bs Mar 07 18:25:48 Hello Mar 07 18:25:50 I barely have enough for smokes ha. Mar 07 18:25:57 Can somebody help me understand scope errors Mar 07 18:25:59 purezen: You never instantiate dbHelper, you don't pass a context to DbHelper, you keep a static reference to the imaginary context, I don't even know what this is "taskentry.new TaskEntry(DisplayTasks.this).DbHelpermethod();", this is also major fail "public DbHelper DbHelpermethod() { return this.DbHelpermethod(); }" Mar 07 18:26:12 public void onClick(View v){ Intent i = new Intent(Level1.this,Level1.class); i.putExtra Mar 07 18:26:16 Doesn't work Mar 07 18:26:21 Some bullshit about scope Mar 07 18:26:23 Man I hate Java Mar 07 18:26:50 ignore the i.putExtra bit, it was gonna be the next bit if that bit just worked like it should Mar 07 18:27:03 Why must I have to worry so much about abstract crap like "scope" ? Mar 07 18:27:12 you make it sound like java's fault that you dont know java Mar 07 18:27:17 ;lol Mar 07 18:27:39 i want a compiler that compiles me lollipops Mar 07 18:28:05 SimonVT: Thanks.. all the while I have been trying to instantiate dbHelper.. could you please further enlighten me as to how do I keep a static reference to the imaginary context wrt my code../ Mar 07 18:28:18 You don't Mar 07 18:28:29 anyone? Mar 07 18:29:07 1 line of code, 5 lines of bullshit.. Naw, not gonna bother Mar 07 18:29:07 SimonVT: ok.. so how do I proceed..? Mar 07 18:29:56 purezen: I pointed out your errors.. You could start by fixing them Mar 07 18:30:03 First one is easy Mar 07 18:30:27 You never instantiate dbHelper - solution: instantiate dbhelper Mar 07 18:30:35 you don't pass a context to DbHelper - pass it a context Mar 07 18:30:45 you keep a static reference to the imaginary context - don't keep a static reference Mar 07 18:31:01 Last two, I don't even.. Mar 07 18:31:29 purezen: Thanks.. am looking at them.. Mar 07 18:33:25 SimonVT: Btw.. those lines which you mentioned 'taskentry.new TaskEntry(DisplayTasks.this).DbHelpermethod();...' were actually answer to my post (in the comments..).. Mar 07 18:33:25 So, how can I make something in scope? Mar 07 18:33:37 All I'm trying to do is do something so very, very simple, why just Java make it so very, very hard?! Mar 07 18:33:54 ImageButton button = (ImageButton) findViewById(R.id.imageButton1); button.setOnClickListener(new View.OnClickListener(){ public void onClick(View v){ Intent i = new Intent(Level1.this,Level1.class); } Mar 07 18:33:59 Why does this NOT work? Mar 07 18:34:26 it works exactly as written. Mar 07 18:34:30 You've created an intent. Mar 07 18:34:31 Are intents not allowed in buttons? Mar 07 18:34:33 ...... which you do nothing with. Mar 07 18:34:33 no, I didn't Mar 07 18:34:36 It errors Mar 07 18:34:43 boy, maybe you should tell us the error then? Mar 07 18:34:45 what's the error Mar 07 18:34:49 also, use a pastebin please. Mar 07 18:35:00 where did you get Level1.this from Mar 07 18:35:02 copy pasta? Mar 07 18:35:06 No enclosing instance of the type Level1 is accessible in scope Mar 07 18:35:08 seriously Mar 07 18:35:13 it's just the name of another activity Mar 07 18:35:18 All I want to do is start an activity Mar 07 18:35:19 *sigh* Mar 07 18:35:28 Meron_: pastebin the class the encompasses this code. Mar 07 18:35:34 without context we can't help. Mar 07 18:36:20 http://pastebin.com/4D3sW3XR Mar 07 18:36:28 Hamm: start at https://developer.android.com/training/index.html Mar 07 18:36:32 I wish android used python, so much eaaaasier Mar 07 18:36:36 Hamm: download the tools from https://developer.android.com/tools/index.html Mar 07 18:36:51 Meron_: not understanding OO isn't something python will magically help you with. Mar 07 18:37:03 Meron_: replace Level1.this with Test.this Mar 07 18:37:05 problem solved. Mar 07 18:37:17 lov, you're on fire Mar 07 18:37:24 you need to understand what you're doing, instead of copy/pasting and then going "THIS DOESN'T WOOOOORKKKK JAVA SUUKKKKKSSSSSS" Mar 07 18:37:46 I get OO Mar 07 18:37:48 Python OO Mar 07 18:37:51 Which is straightforward Mar 07 18:37:51 no, obviously, you don't get OO. Mar 07 18:37:57 Trust me Mar 07 18:37:58 I do Mar 07 18:37:59 you dont Mar 07 18:38:06 Just Java requires all sorts of additional bullshit to work Mar 07 18:38:08 do you even understand why what lov said works? Mar 07 18:38:08 python has the same rules of scope as java Mar 07 18:38:17 No it doesn't, or what I wrote would work Mar 07 18:38:25 hahahahaha Mar 07 18:38:31 Meron_: do you understand what an inner class is? Mar 07 18:38:34 ^_^ Mar 07 18:38:36 Hah. Python OO is more complex than Java OO. Multiple inheritance all the way Mar 07 18:38:36 Also, what an Anonymous Inner Class is? Mar 07 18:38:40 Meron_: roll over Mar 07 18:38:45 MRO3. Mar 07 18:38:48 Meron_: you're writing an Anonymous Inner Class. Mar 07 18:38:54 How is Python OO more complex than Java OO Mar 07 18:39:04 Python OO doesn't have all these multiple types of classes etc Mar 07 18:39:06 It just works Mar 07 18:39:07 I understand OO you idiots Mar 07 18:39:15 13:39:33 < Meron_> Python OO doesn't have all these multiple types of classes etc Mar 07 18:39:20 everything in Python is an Object Mar 07 18:39:22 Meron_, Moron_, wtf Mar 07 18:39:23 Meron_: Metaprogramming ? Mar 07 18:39:28 what a strange surprise; everything in Java is an Object. Mar 07 18:39:31 none of this stupid stuff like Context Mar 07 18:39:32 Meron_: MRO3 ? Mar 07 18:39:36 http://developer.android.com/reference/java/lang/Object.html Mar 07 18:39:37 lov, what about primitives Mar 07 18:39:43 well except for primatives Mar 07 18:39:59 So, why Mar 07 18:40:03 Your mom's primitive Mar 07 18:40:09 Must the 'context' be the activity I'm currently in Mar 07 18:40:13 Not the activity I'm trying to access Mar 07 18:40:17 SimonVT, she doesnt have a class container? i accept! Mar 07 18:40:18 *sigh* Mar 07 18:40:19 ok, so. Mar 07 18:40:21 Meron_: "Just works" is a way to say "I can use it without actually understanding it". It doesn't mean that the system itself is any simpler to understand. Mar 07 18:40:24 lov: so explain to me what I don't know about OO Mar 07 18:40:33 Moron_, scope Mar 07 18:40:40 you dont understand scope Mar 07 18:40:42 suck on my scope Mar 07 18:40:57 Meron_: You're in an inner class. What you need is a reference to the outer class. In this case, the outer class is Test. You use Test.this to reference the 'this' of Test. Mar 07 18:40:57 troll bait Mar 07 18:41:12 Level1.this is nonsense, because you're not in an inner class of Level1. Mar 07 18:41:12 okay then Mar 07 18:41:15 master of troll bair Mar 07 18:41:18 You don't actually have a reference of Level1. Mar 07 18:41:30 So why must I reference the outer class Mar 07 18:41:42 Because you need a Context reference. It doesn't actually matter what the context reference IS. Mar 07 18:41:44 (Also, compare this: http://docs.python.org/2/tutorial/classes.html to this:http://www.crazysquirrel.com/computing/java/basics/java-class-types-part1.jspx) Mar 07 18:41:46 Do you understand the concept of instances? Mar 07 18:41:49 Yes Mar 07 18:41:52 ok. Mar 07 18:41:59 no Mar 07 18:42:06 Do you understand why you don't have an instance of Level1 here? Mar 07 18:42:13 is there an android dev program for linux? Mar 07 18:42:20 I never made an instance of level1 Mar 07 18:42:22 Hamm, eclipse adt Mar 07 18:42:24 right. Mar 07 18:42:25 Hamm: Eclipse + ADT Mar 07 18:42:26 Hamm, you can download it from android Mar 07 18:42:29 There's no x = Class() Mar 07 18:42:30 Or Mar 07 18:42:35 whatever java's screwed up way of saying that is Mar 07 18:42:39 But it's probably ten lines long Mar 07 18:42:40 Found one ha. my bad. Mar 07 18:42:40 dont make an instance of LEvel1 Mar 07 18:42:44 Meron_: no, Foo foo = new Foo() is correct. Mar 07 18:42:46 ...invoking the class constructor with the new keywrod? Mar 07 18:42:48 you dont understand OO and you dont understand Android Mar 07 18:42:56 that's correct Mar 07 18:42:58 Meron_: However, Activities and such in Android are special in that you don't actually instanciate them yourself; the runtime instanciates them for you. Mar 07 18:43:02 Moron_, seriously, stop trolling Mar 07 18:43:11 Oh Mar 07 18:43:12 Okay Mar 07 18:43:13 I see Mar 07 18:43:13 I was sad since I made the game with swing and stuff, but I heard you can't use swing on android? Is that true. Mar 07 18:43:13 yeah, mikedg, you're laying it on a little thick. Mar 07 18:43:14 I kind of like this guy Mar 07 18:43:28 So I never need to declare a class as an instance explicitly Mar 07 18:43:32 Hamm, no, but a lot of the GUI stuff is similar Mar 07 18:43:36 I can just reference the instance of the activity? Mar 07 18:43:36 Hamm: thankfully, yes, it's true that you can't use Swing Mar 07 18:43:37 Hamm: correct Mar 07 18:43:43 Because it gets made for me Mar 07 18:43:47 evanc, i read this was not good practice Mar 07 18:43:52 err, is Microsoft about to get Google Maps banned in Germany on a vague patent? Mar 07 18:43:57 http://www.fosspatents.com/2013/03/google-about-to-lose-patent-spat-with.html Mar 07 18:43:57 Dling the sdk now. Mar 07 18:43:59 kaneda^: it's not. I think you read my message wrong. Mar 07 18:44:00 Meron_: since you're in the onCreate method, which is not a static method, your class is already instanciated. Mar 07 18:44:05 I hate that site, but I just saw that pass by Mar 07 18:44:08 Meron_: you can just reference 'this' to get a reference to the class. Mar 07 18:44:11 evanc, hmm, ok Mar 07 18:44:28 Meron_: All you need for the Intent creator here is a Context, of which Activity is a subclass. So, you use Test.this as your Context reference. Mar 07 18:44:40 it works like the same in python btw, if you have some class and define function def foo(self): Mar 07 18:45:04 This is why "Level1.this" is nonsense; you're not an inner class of Level1, so you don't have the instance of it directly. Mar 07 18:45:08 in java you don't have that "this" variable there Mar 07 18:45:11 Now, if there was a Level1 object, you could reference it, but you don't. Mar 07 18:45:18 Okay Mar 07 18:45:23 I used bluej for my java stuff, since I wasn't sure how to use eclipse. do I need to know how to use eclipse? Mar 07 18:45:26 Do you understand what's going on now? Mar 07 18:45:28 So in this case, Level1.class is a subclass of Test.this ? Mar 07 18:45:32 Hamm, i find it to be helpful Mar 07 18:45:43 no, not unless your Level1 class actually subclasses it. Mar 07 18:45:47 hamm I dont Mar 07 18:46:00 which, since you haven't pastebinned it, I can't tell, but I'm assuming it just extends Activity and thus it doesn't. Mar 07 18:46:03 No Mar 07 18:46:10 level1.class is never a subclass of Test.this Mar 07 18:46:11 Cool, as long as I can use bluej I'm sure I can write something atleast ha. Mar 07 18:46:18 intelliJ++ Mar 07 18:46:19 I did pastebin it Mar 07 18:46:20 unless you are subclassing classes Mar 07 18:46:26 that's two Mar 07 18:46:29 You pastebinned your Test class. Mar 07 18:46:34 oh Mar 07 18:46:35 right Mar 07 18:46:36 You never pastebinned your Level1 class. Mar 07 18:46:41 level1 just extends activity Mar 07 18:46:48 right. Mar 07 18:46:51 it doesn't extend Test Mar 07 18:47:02 which really doesn't matter for this case anyway, since instances aren't the same thing as class hierarchies Mar 07 18:47:14 So how does referencing Test.this allow me access to the other activities? Mar 07 18:47:37 anyone add support for samsung multiwindow feature before? Mar 07 18:47:48 my app shows in the bar but no icon, just name Mar 07 18:47:51 Look at the constructor for Intent. What you need is a Context. Fortunately for you, Activity is an (indirect) subclass of Context. Mar 07 18:48:00 So, you can use your Test class, which subclasses Activity, as your Context. Mar 07 18:48:07 You just need to get the reference to your class to your Intent's constructor. Mar 07 18:48:20 That's where Test.this comes in. Mar 07 18:48:29 So when creating intents, do I always want to use the current activity as the context? Mar 07 18:48:32 Test.this is syntactic sugar for referencing the outer class in an anonymous inner class. Mar 07 18:48:33 guys I have a linked list and I need to get the 6th element form the end and my code keeps getting kicked out of code review saying it's inefficient Mar 07 18:48:46 Meron_: if you're doing it from an Activity, yes, but again, you only need a Context. Mar 07 18:48:53 So you'll use a Service reference if you're in a service, etc. Mar 07 18:48:58 You can use an Application as well in other circumstances. Mar 07 18:49:03 Okay Mar 07 18:49:05 Gottit Mar 07 18:49:06 Cheers Mar 07 18:49:09 You might even be passed a Context to use, such as in a Broadcast Receiver. Mar 07 18:49:11 canadianMIKEDG: you're on thin ice Mar 07 18:49:22 Expect more questions later while I try and wrestle with Intent.putExtra Mar 07 18:49:23 how come other people get to ask fucking stupid questions Mar 07 18:49:30 and then get snippy Mar 07 18:49:35 Meron_: Well, one thing to note here: You've created an intent, but it doesn't actually do anything. Mar 07 18:49:39 You need to call startActivity too. Mar 07 18:49:41 Not yet Mar 07 18:49:51 Basically, I have a bunch of buttons Mar 07 18:50:04 canadiancow: ignorance is not the same as stupidity. You're neither. Mar 07 18:50:06 Fortunately, for inner classes, it can infer outer class methods in some cases, so you're probably ok with just writing startActivity(i); Mar 07 18:50:14 what? Mar 07 18:50:23 Each one, when clicked should launch the same activity, but depending on what data I send through with Intent.putExtra, that activity will do different things Mar 07 18:50:27 Meron_: It's really important that you actually understand java before you do development. Otherwise, you end up blaming your tools or the language as before. Mar 07 18:50:27 i'm hoping this is possible? Mar 07 18:50:28 canadiancow: he left before I tab-completed. Mar 07 18:50:31 Meron_: sure. Mar 07 18:50:34 Okay Mar 07 18:50:37 ah Mar 07 18:50:38 Hello people! I need to display many (key, value) pairs in an activity. What gui element should I be using? ( the data do _not_ come from a db ) Mar 07 18:50:46 when i read that comment... i was REALLY confused :P Mar 07 18:50:53 :) Mar 07 18:51:01 Meron_: I would very strongly recommend that you at least skim http://docs.oracle.com/javase/tutorial/java/index.html so that you understand the language. http://docs.oracle.com/javase/tutorial/essential/index.html is helpful too. Mar 07 18:51:01 gonna try that Mar 07 18:51:15 Beket: ListView Mar 07 18:51:21 Meron_: if something doesn't work like you expect, it's important to stay calm, and try to figure out what went wrong, instead of blaming the language for not being python. Mar 07 18:51:43 evanc, will I need a custom array adapter though? (Imagine that by data are 2 columns, first is key, 2nd is value) Mar 07 18:52:10 Beket: making an adapter is not hard Mar 07 18:52:36 so, I will need a custom array adapter ? Mar 07 18:52:42 lov: got to say, great attitude! Mar 07 18:52:54 vavirta: it was a 50-50 coinflip on just kicking him :> Mar 07 18:53:01 Welp Mar 07 18:53:07 :D Mar 07 18:53:08 Beket: not necessarily an array adapter but yes, you'll need an adapter Mar 07 18:53:20 actually probably closer to 75-25. Mar 07 18:53:23 ok, thanks evanc ! Mar 07 18:53:35 It's just odd going from being able to do something in python to a newish language where everything is different Mar 07 18:53:50 yeah Mar 07 18:53:59 Like, all these class types are new to me Mar 07 18:54:08 but then first thing is to learn basics of the language Mar 07 18:54:19 and then try to learn the framework Mar 07 18:54:19 is there some documentation you know of that I can read to get started? other than java, i don't know any other languages. and java is just some text adventure variable crap ha ha. Mar 07 18:54:26 right. Which is why you need to learn the language. Java has its quirks and flaws but it's generally possible to accomplish everything without too much trouble. Mar 07 18:54:37 Hamm: argh Mar 07 18:54:40 most languages can accomplish most things Mar 07 18:54:42 Hamm: have you clicked any of my links? Mar 07 18:54:44 Hamm: any of them? Mar 07 18:54:48 I need to understand how the classes fit together Mar 07 18:54:57 apart from that i'm guessing everything else is mostly the same Mar 07 18:55:04 Meron_: have YOU been to https://developer.android.com/training/index.html yet? Mar 07 18:55:08 Yeash Mar 07 18:55:11 Did the first thing Mar 07 18:55:25 Seemed reasonable but it isn't too indepth Mar 07 18:55:33 it's better than it used to be :P Mar 07 18:55:38 if you are going to learn obj-c some day, you'll notice that the language is really different than anything else you've been doing so far Mar 07 18:55:51 wanted to wait for the sdk to finish sorry. Mar 07 18:55:53 Voegall isn't too bad, http://www.vogella.com/tutorials.html Mar 07 18:55:57 *Vogella Mar 07 18:56:14 so it will teach you really nice way that first thing is to learn to understand the language, and then you can start to learn for example iOS framework (cocoa touch) Mar 07 18:57:19 hah, i already have that site open Mar 07 18:57:25 on the explicit and implicit intents page Mar 07 18:59:17 Hmm, if I send an intent via intent.putExtras("Value","1") Mar 07 18:59:46 wait Mar 07 18:59:48 nevermind Mar 07 19:00:09 btw, if your intent (heh) is to send number 1, you shouldn't wrap it to string Mar 07 19:00:28 are signing-key signatures only allowed to be registered with Google APIs once? I know the package name/key signature combo must be unique globally, but if I delete a key, I should be able to reuse that combination, right? Mar 07 19:02:08 Got the sdk open. woo Mar 07 19:04:32 Is there a tutorial on drawing images to the screen? Mar 07 19:05:06 http://developer.android.com/guide/topics/graphics/index.html Mar 07 19:05:28 thanks Mar 07 19:08:47 Are you free to choose "company" when you send your apps to the play store? I mean the name written underneath the app name Mar 07 19:11:18 yes Mar 07 19:11:54 thanks, found the guidelines now too Mar 07 19:12:33 doesnt say if you can change it afterwards Mar 07 19:12:37 you know if thats possible? Mar 07 19:17:35 you can Mar 07 19:17:54 i ocassionally change mine away from PenIsland Apps whenever I go for an interview Mar 07 19:18:50 haha Mar 07 19:19:28 And google cache is why he never gets the job Mar 07 19:21:21 so, apparently Gallery.layout is deprecated Mar 07 19:21:22 but the name must be unique? Mar 07 19:21:24 What can I use instead? Mar 07 19:22:04 Meron: what does the docu say you can use else? Mar 07 19:22:12 It doesn't.. Mar 07 19:22:21 This class was deprecated in API level 16. Mar 07 19:22:21 This widget is no longer supported. Other horizontally scrolling widgets include HorizontalScrollView and ViewPager from the support library. Mar 07 19:22:23 It's the example code from "2d-graphics" Mar 07 19:22:41 ... please read the references of deprecated classes to see what you should use instead Mar 07 19:25:32 it's ok to use google never removes stuff Mar 07 19:25:56 I use Gallery views in my AbsoluteLayouts Mar 07 19:27:11 :) Mar 07 19:29:44 absolutelayouts by birbeck Mar 07 19:29:51 the best Mar 07 19:30:07 Hi Mar 07 19:30:50 actually, i recently used my first absolutelayout. it was a small app i made for a friend specifically for a single tablet Mar 07 19:31:25 i didnt want to spend too much time trying to line up edittext's with a background image Mar 07 19:31:38 is it possible to specify the app to only be shown to those with 16:9 screen resolutions? Mar 07 19:31:46 And then later this year he buys a new tablet and complains it looks crap ;d Mar 07 19:31:58 tough :) Mar 07 19:32:01 pixel Mar 07 19:33:04 do0ob: why specifically 16:9, surely you could make it work in any landscape screen Mar 07 19:33:20 just use absolutelayouts :) Mar 07 19:35:30 I don't think there are many 16:9 devices Mar 07 19:36:23 do0ob: no, you can't do that Mar 07 19:39:05 you could select only 16:9 devices in the play store Mar 07 19:39:22 haha, yeah Mar 07 19:40:50 anyone here know anything about the Google APIs console? i think i've "lost" a project. Mar 07 19:41:01 How to create intent filter for tha packet data button ? Mar 07 19:41:42 I want when the button is enabled and not when the actual connection is established. Mar 07 19:42:08 mysticc: is english your native language? Mar 07 19:42:31 tophyr: i doubt that Mar 07 19:42:39 tophyr: you cant even delete a project if you tried Mar 07 19:42:43 oh wait Mar 07 19:42:44 nevermind Mar 07 19:42:46 tophyr: No Mar 07 19:42:53 tophyr: why do you think you lost it Mar 07 19:43:09 i swear i lost a project on the microsoft api console the other day Mar 07 19:43:12 mysticc: ok, just wondering :) what's the "packet data button" you're referring to? Mar 07 19:43:40 tophyr: When you enable the mobile data. Mar 07 19:44:36 mikedg: i'm trying to access project 221656438364. i have multiple google accounts, and on all but one of them if i go to its url, the console tells me i don't have access to it. if i go to the url on the one that doesn't error out, it immediately redirects me to project 529120587856 Mar 07 19:45:04 problem is, i think i've got my app's release key registered to an oauth key for the old project. Mar 07 19:45:32 need very much to unregister it and register it for the new one, or simply reactivate the old project and turn api access back on. Mar 07 19:45:51 tophyr: When you enable data access over mobile network.. Mar 07 19:46:05 mysticc: gotcha. i have no idea if there's a hook available for that Mar 07 19:46:40 tophyr: Is it possible then? Mar 07 19:47:03 i have no idea Mar 07 19:47:18 So I should wait for someone else then. Thanks Mar 07 19:48:29 Hey guys..!! My application is returning this on starting an activity.. Mar 07 19:48:30 android.database.sqlite.SQLiteException: no such table Mar 07 19:49:29 mysticc: yeah. best of luck :) Mar 07 19:50:32 purezen: is there such table? Mar 07 19:50:35 even though it says that it has successfully created the database.. i.e. onCreate method of SQLiteOpenHelper has worked.. but error seems to be while executing rawquery here.. Mar 07 19:50:50 create databse != create table Mar 07 19:51:06 http://pastie.org/6414349 Mar 07 19:51:23 cHarNe2: Thanks.. how do I check that..? Mar 07 19:53:17 purezen: i got no idea Mar 07 19:57:20 cHarNe2: ok.. I can't even seem to access local the db via adb.. seems a limitation of Nexus 7 (?).. any thing I could do..? Mar 07 19:57:49 cHarNe2: I mean *access the db.. Mar 07 19:59:14 "SELECT TaskEntryDetails.TASK_SUMMARY FROM TaskEntryDetails.TABLE_NAME ORDER BY TaskEntryDetails._ID" Mar 07 19:59:17 See the issue? Mar 07 19:59:50 hint: quotes Mar 07 20:00:02 You're querying TaskEntryDetails.TASK_SUMMARY (not the value of TaskEntryDetails.TASK_SUMMARY, mind you. Literally the string) from the table "TaskEntryDetails.TABLE_NAME" (again, literally the string) Mar 07 20:01:38 Is there some extra work I need to do for a full-screen activity, vis-a-vis unregistering broadcast receievers? I have a very simple Activity, which is flagged with the "@android:style/Theme.Light.NoTitleBar.Fullscreen" theme. Whenever the Activity finishes, a warning exception is logged (but no errors on screen.). The exception is here: http://pastebin.com/0w1gScr3 Mar 07 20:02:05 It's nothing for a full-screen activity Mar 07 20:02:08 it's for any activity Mar 07 20:02:15 if you register a receiver, you need to unregister it when you're done Mar 07 20:02:17 are you unregistering it in onStop? Mar 07 20:02:21 ^^ Mar 07 20:02:25 I have no receivers Mar 07 20:02:37 let me publish the activity itself, maybe that might clarify... one moment. Mar 07 20:02:41 Hmm Mar 07 20:03:24 The activity is here: http://pastebin.com/8m88MG5R Mar 07 20:03:48 Is it possible that one of your views is doing this? Mar 07 20:04:05 the stacktrace about not unregistering the receiver should state where it was registered Mar 07 20:04:06 Nope -- but let me publish that as well, just in case. Mar 07 20:04:07 I have to admit that I'm a little stumped. Mar 07 20:05:14 yeah, looking at the trace there that's weird Mar 07 20:05:20 kevinb: it does, look at the pastebin. it doesn't seem to be something in his code. Mar 07 20:05:20 The one view in that activity -- code is here. http://pastebin.com/RZ5AKqS8 The rest of the code referenced has nothing associated with the UI Mar 07 20:05:22 any suggestions about how to debug nullpointer exception in AOSP? Mar 07 20:05:33 at android.view.Window.interceptFsRequest(Window.java:1126) Mar 07 20:05:34 tinti_: look at the stacktrace? Mar 07 20:05:49 SimonVT: Ok.. just looked.. well.. ya.. I get that.. Mar 07 20:05:50 but in Android ROM Mar 07 20:05:59 kevinb: yeah -- the closest I see is the reference to a full-screen broadcast receiever. The only connection is that the activity has the full-screen theme Mar 07 20:06:04 lov: in framework service to be more exact Mar 07 20:06:04 tinti_: and? Mar 07 20:06:12 there should be a nice fat stacktrace. Mar 07 20:06:15 Look at the stacktrace. Mar 07 20:06:21 kbs: curious. what device is this? Mar 07 20:06:23 Figure out why it could be null (maybe attach the debugger) Mar 07 20:06:39 SimonVT: So, what should I do in that case.. repalce TaskEntrydetails.TASK_SUMMARY and stuff.. with what..? Mar 07 20:06:40 kevinb: it's a color nook, with the CM 7 install on it. Mar 07 20:06:53 lov: http://pastebin.com/YHLCw8kf Mar 07 20:07:32 tinti_: your configuration is pooping. See the "Caused by" Mar 07 20:07:41 tinti_: anyway, #android-root Mar 07 20:07:58 purezen: http://docs.oracle.com/javase/tutorial/java/data/strings.html Mar 07 20:08:15 kbs: quick google search for interceptFsRequest looks like that's a common log on the HP Touchpad and "cmtouchpad". I'd guess it's some bug in CM related to hardware buttons. Mar 07 20:08:16 thanks lov Mar 07 20:08:54 (common as is also occurs there. only 20 hits though) Mar 07 20:09:45 kevinb: ah, ok. Perhaps it occurs on the color nook too -- thank you for the pointer, much appreciated. Mar 07 20:10:22 lov: do you know how to I get the "6 more"? Mar 07 20:11:02 The 6 more are above the caused by line Mar 07 20:11:07 how can i capture and use the data i get from a http-request? is this what i should do? http://developer.android.com/guide/faq/commontasks.html#threading Mar 07 20:12:32 SimonVT: thanks Mar 07 20:12:44 Is there an intent filter for mobile network enable action? Mar 07 20:12:52 * tinti_ I can build Android but can't debug java Mar 07 20:13:43 tinti_: #android-root really might be more helpful Mar 07 20:15:40 birbeck: i'm struggling to scale my layout Mar 07 20:15:44 SimonVT: Thanks.. did that.. but the issue persists.. Mar 07 20:16:13 i have horrible banding in my background gradients and i used a lot of transparent drop shadows Mar 07 20:17:02 SimonVT: My code: http://pastie.org/6414884 Mar 07 20:17:17 do0ob: do you use 9patches? Mar 07 20:17:54 how will nine 9patches help with a radial gradient that finishes outside of the screen Mar 07 20:19:05 TABLE_NAME = "tasks_list"; - FROM task_list" Mar 07 20:19:08 That one was easy Mar 07 20:19:18 But you were supposed to figure out that you can concatenate strings Mar 07 20:19:33 you could use a relativelayout or framelayout instead of @background, have the background layer fill the screen, it may stretch or truncate a bit, but if the gradient ends off the screen anyways, that should be ok Mar 07 20:19:37 "SELECT " + TASK_SUMMARY + " FROM " + TABLE_NAME Mar 07 20:20:48 TABLE_NAME="foo; SELECT * FROM mysql.user where 1;--" Mar 07 20:21:08 birbeck: but it will look different on different dpi and i want to avoid that Mar 07 20:21:41 do0ob: it will look identical at different densities Mar 07 20:22:20 different densities, same screen resolution, will it look the same? Mar 07 20:22:29 make sure your designers give you the proper assets for each density to avoid banding Mar 07 20:22:53 I created the design Mar 07 20:23:12 then make sure YOU create the required assets Mar 07 20:24:24 i have a service accessed using asynctask. i also have a Filter that i'd like †o make service calls. i'm using a CountDownLatch to block until the service returns, but calling latch.await() inside Filter.performFiltering pretty much seems to stop everything ideas ? Mar 07 20:25:03 Will translucent drop shadows work without banding if layer them on a gradient background? Mar 07 20:25:55 how would transparency be affected. they are just layered above the background Mar 07 20:26:33 but a drop shadow is a transparency gradient of black and that on top of another gradient might band Mar 07 20:27:22 im sure you'll be alright Mar 07 20:28:42 i'll try it Mar 07 20:28:47 thanks for the help Mar 07 20:28:51 np. Mar 07 20:29:09 SimonVT: Thanks..!! I should have figured it out though..:-) Mar 07 20:29:31 just wrap your layout in either a framelayout or relative layout, move your @background to an imageview with width and height set to match_parent and set the desired scaleType Mar 07 20:30:10 the real layout which will be layered above the "background" imageview should render just fine Mar 07 20:30:32 you can tweak the scaleType of the background imageview to get the effect you want Mar 07 20:31:15 Could i layout the entire app with imageviews and then have a transparent touch layer for buttons? Mar 07 20:32:26 not sure how you would do that, and that would be a very bad design Mar 07 20:32:57 youre buttons then wouldnt be state drawables and would not react to presses Mar 07 20:33:25 I was thinking of coding that change Mar 07 20:33:30 and you would have a world of trouble trying to get the touch zones correct, better to learn how android layouts work Mar 07 20:46:12 that would also result in a lot of overdraw Mar 07 20:49:43 rugby: but it got rid of the background banding Mar 07 20:49:45 I really have no idea how to draw images on with these new functions now they got rid of gallery Mar 07 20:49:53 All these other methods seem really complicated Mar 07 20:50:06 All I want to do is, when a button is clicked, start a new activity with an image, centered Mar 07 20:50:11 preferably with size controllable Mar 07 20:50:13 I just dunno how Mar 07 20:50:29 like, an image view, that you can pinch zoom? Mar 07 20:52:01 Meron: does this accomplish what you're looking for? https://github.com/chrisbanes/PhotoView Mar 07 20:52:03 NOT ZOOMABLE Mar 07 20:52:05 sorry Mar 07 20:52:16 Just a static image Mar 07 20:53:43 Meron: android.widget.ImageView ? Mar 07 20:57:14 Hi, does anyone know why I am getting strange behaviour from TextView. Basically, I have an onTextChangedListener() which doesn't seem to recognise what to do when text has been deleted. Mar 07 20:57:51 If I enter text, the code works and a change happens. If I delete text, and text no longer meets my criteria, why my change doesnt happen again? Mar 07 20:58:23 probably can't answer without seeing your onTextChangedListener() code Mar 07 21:01:13 I just tested my app on nexus one and it's too slow. I'd like to restrict my app to newer, faster devices. How can I do this? Mar 07 21:01:44 windsurf_: api level to 14 Mar 07 21:01:46 I see on stack overflow that there's a way to do it by device but I'm not familiar with all the devices and it's just a cpu thing for me, should work on any screen size. Mar 07 21:01:49 android 4 Mar 07 21:02:27 monsti: how many years back does that go realistically you think? 1 yr, 3 yr? Mar 07 21:02:35 The higher API level you set your app to, generally, only the more newer devices can install it. Mar 07 21:02:41 i think the galaxy sIII is 4 eh? Mar 07 21:03:05 s3 is 4.1 afaik Mar 07 21:03:13 k Mar 07 21:03:16 thank you Mar 07 21:03:17 i am not sure if the S3 was a 4.0 Mar 07 21:04:34 it's ok, i'm seeing 26% market share for 4.0 Mar 07 21:04:43 that's decent Mar 07 21:04:46 S3 was released with IceCreamSandwich Mar 07 21:04:48 Is now at JellyBean Mar 07 21:04:50 4.1.2 Mar 07 21:05:05 (I have one lol) Mar 07 21:05:10 (regretably) Mar 07 21:05:15 i have 2 or 3 ;) Mar 07 21:05:18 i duno xDDDD Mar 07 21:05:25 I need another spare Android phone for development Mar 07 21:05:29 oh i wonder if i should make it 3.1 then instead of 4.0 Mar 07 21:05:31 Its not that I regret the S3 Mar 07 21:05:43 3.x never made it to a phohne Mar 07 21:05:43 I would have preferred a Nexus device in hindsight Mar 07 21:05:56 so api 14 is 4.0.0 Mar 07 21:06:00 (There are devices out there with it - although not many) Mar 07 21:06:19 i consider getting a nexus 4 Mar 07 21:06:35 monsti: can i set that in the manifest xml? Mar 07 21:06:41 yeah Mar 07 21:06:42 My S2 got broken by my brother in Nov so I had to get a new phone there and then Mar 07 21:06:46 S3 was the best option at the time... Mar 07 21:06:51 my nexus s has 2.3.x, my galaxy nexus has 4.0.x, and my nexus 4 has 4.2.x Mar 07 21:07:04 the S4 won't be much better - only in HD Mar 07 21:07:15 my s3 and one x have 4.1.x with oem skins Mar 07 21:07:19 If the images I have seen of the S4 ARE the S4, then it looks pretty sweet. Mar 07 21:07:23 samsung has really superpowers for their next gen phone Mar 07 21:07:33 but they won't put the new stuff in the s4 Mar 07 21:07:39 There is SOME new stuff Mar 07 21:07:43 Like, smart scrolling etc Mar 07 21:07:44 oh never mind i do it in eclipse. Mar 07 21:07:45 (Rumoured) Mar 07 21:07:49 yeah but not from apple ;) Mar 07 21:07:53 Yeah - in the Manifest. Mar 07 21:07:58 Or the build path Mar 07 21:08:01 either or Mar 07 21:08:05 so we have to wait for the S5 xDDD Mar 07 21:08:16 Sod that, for me it will probably be the next Nexus device Mar 07 21:08:22 I can't see Samsung's Tizen kicking off Mar 07 21:08:30 Nor Ubuntu really, apart from the really die-hard geeks Mar 07 21:08:43 The kind that want to be seen with it because it appears to make them look intelligent lol Mar 07 21:08:52 Although I will say, the Ubuntu UI is feckin' sexy Mar 07 21:08:54 yeah like that qt phone some years ago Mar 07 21:08:55 please go to #android or something Mar 07 21:08:59 Like all Ubuntu. Mar 07 21:09:08 wtf use kmail and xterm on a phone? Mar 07 21:09:13 Why? lov? Mar 07 21:09:20 This discussion did stem from a development question. Mar 07 21:09:28 And it is quiet in here Mar 07 21:09:38 And we are still answering people's development questions. No harm done. Mar 07 21:10:22 to bridge the gap, i am writing an app for both android and ubuntu touch Mar 07 21:12:49 connectbot on android = terminal client for android Mar 07 21:13:23 Hmm, not sure I'd be interested in writing for Ubuntu Mar 07 21:13:30 What language will it use? Java I would presume? Mar 07 21:13:48 i am so happy not to use it on my desktop anymore, for all the reasons, that are even worse on mobile :D Mar 07 21:13:53 * g00s is reading the f-secure report on android malware; this can't be good Mar 07 21:14:01 :D Mar 07 21:14:02 (too much apps in background, to much ram consumption, ...) Mar 07 21:14:11 g00s - its fine - the only people at risk are the idiots. Mar 07 21:14:19 There isnt a single platform out there that is invulnerable. Mar 07 21:14:36 Like most platforms, if you take care, the malware threat is non-existant. Mar 07 21:14:44 Anthaas: the malware folks seemed to make Android their home Mar 07 21:14:58 and mainly an virus scanner writing reports about how dangerous it is (and ofc you should buy there solution against it...) Mar 07 21:15:05 ^ Mar 07 21:15:26 the report lists the specifics of each family of new malware, i think its worth considering Mar 07 21:15:38 it doesn't do android any good when people blow this off Mar 07 21:17:36 some of this stuff looks like it would be lestened by using something like the Samsung Knox Container thing Mar 07 21:17:44 g00s: on last years chaos communication congress there were some interessting short notices about creativity in new mobile malware :) Mar 07 21:19:00 we can also dismiss things by saying "dont go to unofficial stores" but, other carriers like China Mobile are pretty official to large swaths of the market ;) Mar 07 21:19:31 the ACLU guy is right, its a disaster Mar 07 21:20:53 so Anthaas when you say platform X or Y doesn't have a chance; maybe the catalyst isn't that it gets a foothold but another falls and a vacuum is formed. i can see that happening if android gets a bad reputation from malware Mar 07 21:21:46 Lets be honest, people have been slating the security of Android since the beginning of....Android. Mar 07 21:21:54 i'm having an issue with some xml for a map fragment. you can add some map options to the map fragment's xml element, by adding a name space xmlns:map="http://schemas.android.com/apk/res-auto" Mar 07 21:22:29 What specifically is your problem? Mar 07 21:23:28 and then setting attributes like map:cameraTargetLat, map:cameraZoom, etc. problem is my fragment is not the root of the layout file. if the xmlns:map def is not in the root element, it gives an error. so i put it in the root element, but then the map:... attritbutes give an error unless they are also in the root element, which of course makes them have no effect on the map fragment Mar 07 21:24:13 out of interest - have you considered setting these programatically rather than in XML? Mar 07 21:25:03 yes but there are some options that don't seem available programatically, for instance hybrid view, and it's much more pain. if i have to do it programatically, so be it, but i'd like to understand this limitation either way. Mar 07 21:25:04 speakingcode-wor: are those valid xml attributes? Mar 07 21:26:36 evanc, yes. if the layout contains solely the map fragment, it works fine, but once it is no longer the root element things break down. i don't know much about xml namespaces and how attributes associate with them; i imagine this may just be an xml limitation but i'd like a resource explaining that if such is the case. Mar 07 21:27:04 speakingcode-wor: got a link to the docs for that? I've never seen them before, but I haven't worked with maps since MapView in like 2010 Mar 07 21:27:15 yeah, a lot has changed. one sec Mar 07 21:27:46 https://developers.google.com/maps/documentation/android/map#using_xml_attributes Mar 07 21:27:49 attributes associate with them through a "declare-styleable" XML page, and are used in java through the AttributeSet passed in to the Views constructor Mar 07 21:28:21 speakingcode-wor: can you pastebin your code? (simplified if necessary) Mar 07 21:28:40 evanc - you will love Maps V2 Mar 07 21:28:49 A beautiful, aesthetically pleasing, pain in the ass. Mar 07 21:30:28 Can you restrict an app to only be shown to devices with accelerometers? Mar 07 21:30:35 https://gist.github.com/speakingcode/362763ecbdafb332f973 Mar 07 21:31:00 do0ob: I think every device is required to have an accelerometer (GTVs excluded) but I'm not positive about that Mar 07 21:31:03 ^^^ what Anthaas said. very round-about process just to get running Mar 07 21:31:24 speakingcode-wor: oh, set those map:whatever attributes on the Mar 07 21:31:35 not on the LinearLayout Mar 07 21:31:36 Yes do0ob Mar 07 21:31:37 scroll down evanc Mar 07 21:31:44 there's a second example in there Mar 07 21:31:53 speakingcode-wor: oh, right you are Mar 07 21:32:30 Also, what evanc said Mar 07 21:32:34 and, moving the xmlns:map ... declaration into the fragment produces another error Mar 07 21:33:33 seems the namespace declarations must be in the root element, but i'm surprised the attritbutes with that name space would need to be also. i'm wondering if its possibly just a bug (or bad setting somewhere) in eclipse? Mar 07 21:33:49 Thats not always the case speakingcode-wor Mar 07 21:34:00 I currently have a project open with a namespace in a non-root element Mar 07 21:34:22 And I currently have a project open with namespace defined in the root, but used in a non-root element Mar 07 21:34:25 o. well then i have no idea when that restriction applies, or perhaps it is just something with eclipse/lint Mar 07 21:35:01 honestly this all looks on the level Mar 07 21:35:08 (the second half) Mar 07 21:35:29 by 'on the level' you mean... sane? Mar 07 21:35:35 yeah, sorry Mar 07 21:35:43 no worries just making sure. Mar 07 21:37:00 Hmm, it does. I'm personally not a fan of setting variable values in XML. Mar 07 21:37:07 Wait, a better way to word that Mar 07 21:37:13 Values that might vary lol Mar 07 21:37:25 e.g. lat and long Mar 07 21:37:43 We all have our ways, I guess... Mar 07 21:37:46 well, i want the map to start at that particular 'focus' every time Mar 07 21:38:10 I don't like setting values that won't change Java side either... Mar 07 21:38:15 Just to balance it out. Mar 07 21:38:22 That can be done in Java side. Mar 07 21:38:39 there more attributes i just didn't copy/paste over Mar 07 21:38:57 However, should you ever want the user to be able to change focus, for example swapping between locations on button press, then I'd implement it all Java side. Mar 07 21:38:57 but at any rate, i was just curious why this doesn't work. workaround is fine if that's my option Mar 07 21:39:02 Any of you use Dropbox as workspace? Mar 07 21:39:05 No. Mar 07 21:40:05 well, it's just the initial view Anthaas. changing it dynamically is still possible, and the user can move about of course Mar 07 21:40:10 Hmm, not entirely sure on why it won't allow it. Perhaps something to do with the nature of a fragment? Mar 07 21:40:28 Yeah, I would definitely, in that case, set it Java side regardless. Mar 07 21:40:37 As fragments can be swapped about Mar 07 21:40:52 I would imagine the issue lies in it referencing a namespace that it might at some point not have access to Mar 07 21:41:15 true, but i know i won't be swapping in fragments in this app. but, in general i prefer to keep my constants in java also. if nothing else it makes the code more portable Mar 07 21:41:43 I keep all my variables context related too, which I know some people don't. Mar 07 21:42:02 E.g. I am completely AGAINST a "Constants.java" file being anywhere in a project. Mar 07 21:42:26 it depends on the scope and nature of the project and how lazy i am :-) Mar 07 21:43:13 Noooo Mar 07 21:43:14 Never do it Mar 07 21:43:26 Bad practise. Mar 07 21:43:39 eh, i don't think it's necessarily bad Mar 07 21:43:49 often insufficient tho Mar 07 21:44:28 It is. It kind of removes the concept of Object-Orientedness slightly. Mar 07 21:44:41 Its kind of like the House having to go to the garage to find out how many windows it has. Mar 07 21:45:27 well in that example it would violate encapsulation Mar 07 21:45:48 Also that Mar 07 21:45:56 I forgot the word Mar 07 21:46:00 so I didnt mention it lol Mar 07 21:46:01 ;-) Mar 07 21:46:30 ah well, i guess i'll do it programagically Mar 07 21:50:46 Anthaas, the best is when you have Constans.java, and Constants is an interface, and then all your other classes implement it :) Mar 07 21:52:07 and then you somehow wrap it all in enumerables Mar 07 21:52:11 canadiancow: Hmm, I dont like the idea of implementing interfaces where you don't need the majority of the content. Like, if I have one widget in an entire activity that uses an OnClickListener, I'd rather have an anonymous listener Mar 07 21:52:27 i was joking Mar 07 21:52:31 Oh ahaha Mar 07 21:52:34 i actually think it's the worst Mar 07 21:52:35 Its hard to tell :P Mar 07 21:52:37 Good :D Mar 07 21:52:44 Nice to see someone sees things from my perspective hahaha Mar 07 21:52:53 I had to fix someones code the other day Mar 07 21:52:58 No word of a lie, they did this Mar 07 21:53:12 String string = getIntent().getStringExtra("myString"); Mar 07 21:53:17 String s = string; Mar 07 21:53:24 And then did everything in the method with s Mar 07 21:53:30 speaking of that. a few weeks ago i was at a talk, and someone commented about "his firned that's a programmer" that never returns anything from any method, always void, and instead puts the value in some buffer, and the caller can grab it from there Mar 07 21:53:58 speakingcode-wor: sounds like someone I would love to hire Mar 07 21:54:01 so I could fire them Mar 07 21:54:04 Hahahaha Mar 07 21:54:07 haha yeah Mar 07 21:54:39 what evanc said Mar 07 21:55:04 Anthaas: in their defense (sort of ) they may have copied and pasted various snippets of code and "String s = string" was their way of adapting them together :-D Mar 07 21:55:15 and then forgot to make it not suck Mar 07 21:55:16 Nope Mar 07 21:55:18 Wrote themselves Mar 07 21:55:20 I could tell Mar 07 21:55:22 Because it was shit. Mar 07 21:55:27 yeah Mar 07 21:55:43 not long ago i worked on some javascript code that had been under theh ands of off-shore contractors Mar 07 21:55:59 Also been there. Mar 07 21:56:09 "Please active connection for internet" Mar 07 21:56:12 if you have a non-void return value, use it, otherwise, do not Mar 07 21:56:46 there was stuff like function d(input) { value = input; .... Value = .... VALUE =... InputValue = .... } Mar 07 21:57:50 it's like they were afraid to directly reference the parameter outside of an assignment, and afraid to use variable names that weren't all the same meaningless word Mar 07 21:58:09 speakingcode-wor: This is valid Java code: int o = 1; int ο = 2; int о = o + ο; Mar 07 21:59:10 "Duplicate local variable o" Mar 07 21:59:16 I was thinking of getting the galaxy s as a testing device, do you guys think that this is a good choice? Mar 07 21:59:44 speakingcode-wor: you didn't copy and paste my code Mar 07 21:59:46 no Mar 07 21:59:57 unless it's just lint giving tighter restrctions, it isn't Mar 07 22:00:27 ohh Mar 07 22:00:44 apple741: a galaxy s is OLD. as the most popular phone a galaxy s3 would be a good test device, for development a nexus 4 Mar 07 22:00:56 lmao. what is the 2nd 'o' character? Mar 07 22:01:23 speakingcode-wor: http://files.evancharlton.com/WTF.java should work if you feed that through javac Mar 07 22:01:50 yeah it worked when i copied it Mar 07 22:01:52 :P Mar 07 22:02:33 suuch monstronsities should not happen Mar 07 22:02:59 birbeck: I thought the galaxy s is still quite popular? A lower end device might be better for testing? Mar 07 22:03:35 apple741: a galaxy s and a galaxy s3 are completely different Mar 07 22:03:38 speakingcode-wor: so that guy can get much more creative with his value/Value/VALUE/etc code :P Mar 07 22:04:12 apple741: thats like the difference between an iphone and an iphone 4 Mar 07 22:05:10 birbeck: wow I didn't realise the difference was quite that big, I guess the galaxy s would be a bad choice for testing. Mar 07 22:05:39 actually it would be more like iphone 3g vs iphone 5, but you get the idea Mar 07 22:05:54 is it possible to alignTop to a textview when that textview is set as centerVertical? Mar 07 22:06:28 Gravity and LayoutGravity are two different things Mar 07 22:06:35 The former determines its location within its parent Mar 07 22:06:38 using a relative layout Mar 07 22:06:42 the latter determines the location of its contents Mar 07 22:06:48 (Or children depending on the view) Mar 07 22:06:56 yeah, i'm using a relativelayout Mar 07 22:07:04 apple741: most original galaxy s devices either have a custom rom, or have been upgraded to a s2/s3 or other device by now. you wouldnt test a new ios app on a iphone 3g, unless you were specifically targeting the older device Mar 07 22:07:05 so one view is centerVertical Mar 07 22:07:27 trying to align another view to the top of it Mar 07 22:07:34 it doesn't seem to work Mar 07 22:07:41 birbeck: I remember reading somewhere its the 3rd most popular android device being used? Is there any truth behind that? Mar 07 22:10:16 apple741: possibly, looking at my own app stats, i see the galaxy s as the fifth most popular device for 3 different apps Mar 07 22:11:08 Normal to get "Device driver API match, Device driver API verision: 17, User space API version: 17, mali: REVISION=Linux-r3p1-01rel1 BUILD_DATE=Thu Jan 24 17:16:14 KST 2013" when launching app to device? Mar 07 22:11:16 I can't remember having it earlier Mar 07 22:11:30 apple741: and one of those apps has 2.2 million installs Mar 07 22:12:32 birbeck: wow thats really impressive :) I'm guessing the most popular was the S3/S2 ? Mar 07 22:16:08 i don't know about birbeck's statistics, but the "top device" for my apps is still less than 10% of installs (though devices sometimes get listed multiple times, for different varients). Android is very diverse. Mar 07 22:17:34 kevinb: Thats an interesting point, could I ask what device gets the most installs of your app? Mar 07 22:17:48 top for me is an S2 @ 5.44% Mar 07 22:18:05 but yeah, there are other variants at lower percentages Mar 07 22:18:28 for my app that targets Android 4.0 and later, I see the S3 (m0 whatever that means) at 8.6%, then the Nexus 7 at 8%. Later I see a different S3 at 2.84% and yet another at 2.12% Mar 07 22:18:46 another of my apps has 6.94% for Droid X Mar 07 22:19:11 for my app that targets 2.1+, i see the S2 at 7.6%, then the S3 at 5.5% and another S3 at 2.8% Mar 07 22:19:35 yeah I see the Droid X at 1.7%. it was a popular one in it's day Mar 07 22:20:04 for that app, i only distribute in U.S. and CA Mar 07 22:20:16 the Droid RAZR is second Mar 07 22:20:36 Evo 4G third Mar 07 22:20:41 seems odd Mar 07 22:21:52 apple741: my point though is that the galaxy s is very old, not very popular any more, and even the new low end phones match or beat it in speed and display. so you would be best to get a modern phone Mar 07 22:22:36 i agree (unless you have a modern device and are specifically looking for an old 2.3 device to test against) Mar 07 22:23:25 I have a nexus 7 but was looking for a phone with a smaller screen to make sure things still look ok and general testing etc. Mar 07 22:24:05 well 10" and 7" and phones - are very different in layouts ;) Mar 07 22:24:12 apple741: adb shell am display-size 480x800 Mar 07 22:24:24 do you want to support Android 2.3? (Personally I'd say just support 4.0 and higher) Mar 07 22:24:27 apple741: adb shell am display-density 320 Mar 07 22:24:46 kevinb: yeah we decided to go 4.x only Mar 07 22:25:08 also 1280x720 is the min size Mar 07 22:25:11 apple741: do those and bam! your nexus 7 becomes a Nexus S! \o/ Mar 07 22:25:42 i want a 4.8" phone with a 4k display! Mar 07 22:25:52 if i create a fragment with MapFragment.newInstance(options) how can i put it back in the fragment container created by the element in the xml? Mar 07 22:25:52 apple741: https://plus.google.com/u/0/107708120842840792570/posts/cz5TxuoNDfG Mar 07 22:26:06 evanc: wow thanks! Would the screen behave the same way it would on a phone? Mar 07 22:26:13 speakingcode-wor: replace it? Mar 07 22:26:16 apple741: yes Mar 07 22:26:17 apparently to programmatically set map options, one has to instantiate a new map object Mar 07 22:26:26 evanc: yes. how? Mar 07 22:26:37 speakingcode-wor: with a standard FragmentTransaction, no? Mar 07 22:26:50 give it the ID of the fragment's container Mar 07 22:26:54 dunno. never done any fragment swapping Mar 07 22:26:54 k Mar 07 22:27:00 got a link? Mar 07 22:27:51 evanc: Stupid question , but how would I go about doing that? Mar 07 22:28:28 apple741: I gave you the command you need :) plug in your device, copy/paste that into your terminal, and press , haha Mar 07 22:29:47 haha great! I didn't think it would that simple. Thanks for the tip! Mar 07 22:30:15 what happens if i copy a sqlite database while its in read/write state at the moment? am im able to copy->access the copy file or will it be corrupted? Mar 07 22:30:56 apple741: no problem! Mar 07 22:32:29 evanc: So if I developed something for the nexus 7 but stuff gets 'cut-off' on mobile devices that test will still show that? Mar 07 22:35:15 apple741: if stuff is getting cut off, you're doing it wrong :) but yes, it would Mar 07 22:36:07 Thanks evanc , thats exactly why I want to check. To make sure I'm doing it right :) Mar 07 22:46:57 I'm using IntelliJ IDEA and finding it difficult to get a stack trace when my app dies with an exception. Any suggestions? Mar 07 22:47:06 Use Eclipse :P Mar 07 22:47:44 Does that work better? Mar 07 22:48:01 Stack Trace is always printed when an app dies due to exception. Automatically... Mar 07 22:48:03 Whenever I use Eclipse it strikes me as slow and clunky. Mar 07 22:48:16 That would make sense, yes. Mar 07 22:48:24 you can set the android pane to either 'docked' or 'floating' mode Mar 07 22:48:24 use e.printStackTrace() if you can catch the exception Mar 07 22:48:27 operhiem1: if adb is running and your project has the android facet, there is an android tab at the bottom of the screen which will show you the adb logcat output Mar 07 22:48:27 otherwise it should be in there Mar 07 22:48:40 set it to floating and place it somewhere else on your screen(s) Mar 07 22:49:56 i find the logcat pane in eclipse to be useless Mar 07 22:50:04 too small and too much word-wrap Mar 07 22:50:09 clever hows that? Mar 07 22:50:11 just logcat in xterm Mar 07 22:50:16 its floatable, dockable, expandable... heh Mar 07 22:50:37 I lvoe the logcat in Eclipse Mar 07 22:50:40 I do have an android pane, but logcat is so verbose I'm not sure what to make of it. I haven't been able to make an effective filter. The ADB logs is empty. Mar 07 22:50:41 speakingcode-wor: also, when i hit ctrl+f11, it kills the current activity, locks the package Mar 07 22:50:41 love* Mar 07 22:50:49 speakingcode-wor: then android tries to restore the previous activity Mar 07 22:50:49 Change it then Mar 07 22:50:55 operhiem1: change the verbosity to Error Mar 07 22:50:56 speakingcode-wor: logcat errors!!!! Mar 07 22:50:59 If you are looking for Errors change it to Errors lol Mar 07 22:51:01 so the logcat pane opens up :P Mar 07 22:51:04 Not "verbose" Mar 07 22:51:12 Anthaas: it errors on every single startup Mar 07 22:51:16 if one doesn't like eclipse, that's fine, but not knowing how to use it is not a good reason for it being poor Mar 07 22:51:26 Something is wrong with your computer/device etc then Mar 07 22:51:28 Doesnt happen for me. Mar 07 22:51:38 Anthaas: its because i'm several activities deep Mar 07 22:51:45 Several activities deep? Mar 07 22:51:56 Anthaas: the android os tries to restore the previous activity (because eclipse killed the current one) Mar 07 22:52:01 Anthaas: but the package is locked (being installed) so that fails Mar 07 22:52:13 Wait Mar 07 22:52:23 Are you programming/testing/debugging with the emulator? Mar 07 22:52:23 hi guys Mar 07 22:52:33 Anthaas: real device Mar 07 22:52:39 Was gonna say. Mar 07 22:52:39 no i'm using a kindle fire Mar 07 22:52:41 smiles Mar 07 22:52:47 full screen activity Mar 07 22:52:48 (Not a real device) Mar 07 22:53:06 trying to start a camera activity Mar 07 22:53:16 so far got the class called Mar 07 22:53:19 Theres an intent for that Mar 07 22:53:24 (Should be the new catchphrase for Android) Mar 07 22:53:26 but i don't see a preview yet Mar 07 22:53:30 not sure why Mar 07 22:53:33 Anthaas: let me get the error Mar 07 22:53:42 You using surface view? or trying to open the device's camera? Mar 07 22:53:58 surface view Mar 07 22:54:04 want to turn on the camera Mar 07 22:54:13 Followed a tutorial? Mar 07 22:54:15 making mushroom locator Mar 07 22:54:27 nawww i been doing this for years Mar 07 22:54:30 just rusty Mar 07 22:54:38 Regardless, follow a tutorial. Mar 07 22:54:44 just tell me Mar 07 22:54:44 StackOverflow is a great tool Mar 07 22:54:50 Chances are you aren't the first person to have the issue. Mar 07 22:54:52 No lol. Mar 07 22:54:54 Why should I? Mar 07 22:54:56 myActivity.this Mar 07 22:54:58 You won't help yourself. Mar 07 22:55:01 calmchess, what's the goal Mar 07 22:55:04 is the proper way to pass context right Mar 07 22:55:13 On many occasions, no. Mar 07 22:55:15 calmchess, enter is not punctuation, please describe your goal concisely Mar 07 22:55:23 goal is to roam the woods scanning for mushrooms Mar 07 22:55:27 the edible kind Mar 07 22:55:31 morels Mar 07 22:55:34 If something required context, generally "getApplicationContext()" is the best way as its a great way to avoid memory leakage. Mar 07 22:55:38 calmchess, good luc, considering some poisonous mushrooms look fine Mar 07 22:55:39 I want to have the button width of Save the same as Cancel, and the Hours textview the same width as Minutes, how can I do this? http://bildr.no/image/1409909.jpeg The XML is here: http://pastebin.com/bJ8XMgJ6 Mar 07 22:55:41 anyone know how to detect if soft keyboard visible in Browser (NOT a phonegap app)? Mar 07 22:55:56 I obviously don't want fixed pixels Mar 07 22:56:01 these kinda mushrooms are known Mar 07 22:56:07 i eat them every year Mar 07 22:56:26 calmchess, in any case, what you want to do sounds like 3d object recognition, have you looked at opencv4android? Mar 07 22:56:39 kaneda^: Each to their own, but I refuse to help people who openly refuse to help themselves. He refused to Google an answer and said "Just tell me". Mar 07 22:56:42 no i haven't but i'm noting it now Mar 07 22:57:29 I still cannot understand how to draw an imagwe Mar 07 22:57:40 Anthaas: almost got it... Mar 07 22:57:41 I don't understand why they deprecated the easy, simple, and effective method Mar 07 22:57:43 It sucks Mar 07 22:57:44 Meron: In what sense? Mar 07 22:57:58 Press a button, it opens an activity with an image specified drawn to the screen in a box Mar 07 22:58:11 just, draw an image to screen, with a definable size Mar 07 22:58:15 Meron: How have they done that? Mar 07 22:58:22 Gallery.layout Mar 07 22:58:25 has been removed Mar 07 22:58:27 Meron: There are loads of ways of doing that. Mar 07 22:58:30 Easy ones too Mar 07 22:58:34 and that's the only one with a tutorial or that actually makes sense to me Mar 07 22:58:38 mind pointing me to a tut? Mar 07 22:58:41 In fact. Look at BitmapFactory Mar 07 22:58:50 You can define the hitrect for it. Mar 07 22:58:55 getapplicationcontext worked well thanks for the tip Mar 07 22:59:01 Anthaas: 03-07 18:58:54.811 19629 19629 E / AndroidRuntime: java.lang.RuntimeException: Unable to instantiate application android.app.Application java.lang.NullPointerException Mar 07 22:59:05 Anthaas: 03-07 18:58:54.811 19629 19629 E / AndroidRuntime at android.app.LoadedApk.makeApplication(LoadedApk.java:536) Mar 07 22:59:12 looks comlicated Mar 07 22:59:17 i simply want to draw an image Mar 07 22:59:21 any tutorials at all? Mar 07 22:59:26 Meron: Its easy - what is your strength of Java/XML? Mar 07 22:59:38 Anthaas: this happens almost every time i hit ctrl+f11 to start the latest code Mar 07 22:59:48 clever: That often happens when you are trying to load the application through eclipse with the current application open. Mar 07 22:59:56 Anthaas: exactly Mar 07 22:59:57 This is because Eclipse has to kill the activity first. Mar 07 23:00:05 Anthaas: yep, thats what i said above, twice Mar 07 23:00:13 and that always opens the logcat pane in eclipse Mar 07 23:00:16 and gets in the way Mar 07 23:00:24 Anthaas my java stuff is weak/okay but i can't yet just look at an api reference and know how to use iot Mar 07 23:00:32 Basically, when you install, even a debug version, you use a keystore. You cant have two project with the same keystore, so Eclipse uninstalls one before installing the other Mar 07 23:00:47 ughg ughg ugjlhsrbghg Mar 07 23:00:50 But the first thing it tries to do is a straight install (how else is it supposed to know a version already exists on the device?) Mar 07 23:00:57 Anthaas: no, its clearly locking the package so it cant start durring the install process Mar 07 23:01:06 why won't the effing xml just work. setting these map optiosn programmtically is turning into a huge effing pain Mar 07 23:01:11 Meron: This is a very important strength that you should work on. Mar 07 23:01:19 Oops Mar 07 23:01:22 I mean debug apk, not keystore Mar 07 23:01:42 I know, but Java is a much more difficult language than the one I know Mar 07 23:01:43 the docs say use MapFragment.newInstance(Options options), of course that alone is insufficient. Mar 07 23:01:51 clever: You realise it isnt an actual exception that effects your project, it is printed from the install process Mar 07 23:02:00 Meron: Which is? Mar 07 23:02:00 Anthaas: yeah i know that Mar 07 23:02:03 Anthaas: but eclipse doesnt Mar 07 23:02:11 Anthaas: so eclipse keeps opening the logcat pane at every install Mar 07 23:02:16 Meron: Java is a very simple, well constructed language, that everyone and their dog can do. Mar 07 23:02:23 i get a fragmentmanager, then a transaction, and try to call replace. but it won't accept a MapFragment in the Fragment argument, apparently MapFragment does not extend Fragmet??? wtf? Mar 07 23:02:46 clever: Run in debug mode...? Mar 07 23:02:54 The method replace(int, Fragment) in the type FragmentTransaction is not applicable for the arguments (int, MapFragment) Mar 07 23:02:57 clever: I dont see this as an issue, if it is, it is a user-created one. Mar 07 23:03:10 Anthaas: i dont see how debug mode helps Mar 07 23:03:18 ((Fragment)this) Mar 07 23:03:24 Oh wait Mar 07 23:03:25 No Mar 07 23:03:25 Hahaha Mar 07 23:03:26 Python Mar 07 23:03:30 Seems so much easier Mar 07 23:03:30 You cant reverse polymorphism Mar 07 23:03:37 I created a canvas Mar 07 23:03:39 I have the image Mar 07 23:03:43 How do I ..blit it on Mar 07 23:03:52 I can't find any straight answeres Mar 07 23:04:04 Why are you creating a canvas? Mar 07 23:04:07 Use an ImageView Mar 07 23:04:16 I'm attempting to use an onGlobalLayoutListener on an injected view so that I can grab an ImageView's width that is set to match_parent, but it's LayoutParams().width is always -1 even though it's displaying fine. Also, the listener is called endlessly without any redrawing taking place. What might I be doing wrong? Mar 07 23:04:18 yeah, i don't know what the hell is going on. would be nice if the docs just showed an example Mar 07 23:04:18 Im assuming it is an image you want? Mar 07 23:04:24 Yep Mar 07 23:04:31 Use ImageView then Mar 07 23:04:32 I just want to draw an image Mar 07 23:04:35 Yes.. How? Mar 07 23:04:36 and set either the src or background. Mar 07 23:04:51 ...the graphical layout in XML, the XML editor, even Java side if you want Mar 07 23:04:52 I have an Imageview named image Mar 07 23:04:54 what do I do to it? Mar 07 23:05:07 Ah, but the image needs to be able to change depending on what I click Mar 07 23:05:22 In what way? Mar 07 23:05:38 Basically Mar 07 23:05:45 There are two buttons Mar 07 23:05:49 That send data to the same activity Mar 07 23:05:58 Depending which button is pressed, that same activity needs to display different images Mar 07 23:06:05 Ok Mar 07 23:06:08 Send an int to it Mar 07 23:06:15 Yes.. I've got that far Mar 07 23:06:19 It's the actual drawing I can't do Mar 07 23:06:59 http://pastebin.com/gXJrZie1 Mar 07 23:07:01 this is what I have Mar 07 23:07:38 For example: myButton.setOnClickListener(new OnClickListener(){ Intent myIntent = new Intent(getApplicationContext(), MyActivity.class); intent.putExtra("myImage", R.drawable.mydrawable); startActivity(myIntent);)); Mar 07 23:07:48 wait a sec Mar 07 23:08:21 is there anyone here that might be able to help me get a remoteTCP/IP connection to adb from OpenSuse VirtualBox image? Mar 07 23:08:29 It's not the sending that's the problem Mar 07 23:08:33 It's the drawing of the actual image Mar 07 23:08:38 Meron: There is a lot there that is the problem. Mar 07 23:08:52 all I need to do is draw an image Mar 07 23:08:56 I don't want anything more complex than that Mar 07 23:09:01 The code I have there works Mar 07 23:09:22 I fail to see how a lot of that works lol Mar 07 23:09:32 make a canvas, make a paint, draw the bitmap to the canvas with the paint Mar 07 23:09:33 It was from the tutorial Mar 07 23:09:39 tada Mar 07 23:09:47 Using ImageView is even easier though Mar 07 23:09:53 Then tell me how! Mar 07 23:09:59 You're code is FUBAR lol Mar 07 23:09:59 https://developers.google.com/maps/documentation/android/map#add_a_fragment this does not work Mar 07 23:10:00 As long as I can change images as I like, I'm happy Mar 07 23:10:09 The code works Mar 07 23:10:10 Is there a way I can talk to you? Mar 07 23:10:15 Like Mar 07 23:10:24 It hard, I want to do it for you hahaha Mar 07 23:10:26 replace, add, none of them accept a MapFragment object Mar 07 23:10:29 feel free Mar 07 23:10:36 so it is hard Mar 07 23:10:43 Nope Mar 07 23:10:46 Its easy Mar 07 23:10:58 Its hard to explain to you what is wrong with the code you sent, because there is so much Mar 07 23:11:11 Do you have skype? Mar 07 23:11:23 or team viewer? Mar 07 23:12:49 Meron: ? Mar 07 23:13:31 crickets... Mar 07 23:13:33 lol Mar 07 23:13:36 ...yup lol Mar 07 23:13:51 Well, I offered to help him. I was going to explain everything wrong with the code he sent. Which is completely FUBAR Mar 07 23:13:59 Meron: of a string compare use myString.equals("1") but better to use an int Mar 07 23:14:16 StingRay_: .contentEquals * Mar 07 23:14:26 yeah that Mar 07 23:14:29 :) Mar 07 23:14:35 Also, he is using an int lol Mar 07 23:14:40 oh Mar 07 23:14:42 anth - you have any idea how I can make a TCP connection to adb server on Win7 host from VirtualBox running OpenSUSE? Mar 07 23:14:45 Hello Mar 07 23:14:49 I want to have the button width of Save the same as Cancel, and the Hours textview the same width as Minutes. How should I do this? http://bildr.no/image/1409909.jpeg The XML is here: http://pastebin.com/bJ8XMgJ6 Mar 07 23:14:49 I am trying something Mar 07 23:15:07 seamonkey72: None, sorry - never needed to do that. Mar 07 23:15:33 Okay I changed code Mar 07 23:15:34 ok - AVD is just ridiculously slow Mar 07 23:15:34 seamonkey72: From experience of running Android tasks over a network connection, don't. Haha. Its an awful experience. Mar 07 23:15:35 Meron: heres an idea, pass the button id in. So when starting it putExtra("butID", v.getId() ) Mar 07 23:15:35 But still not working Mar 07 23:15:38 Displays a white screen Mar 07 23:15:53 Meron: Last time I will ask and offer to help. Do you have Skype? Mar 07 23:15:59 No :/ Mar 07 23:16:02 or TeamViewer? Mar 07 23:16:03 Let me show you new patebin Mar 07 23:16:06 No Mar 07 23:16:07 Wait Mar 07 23:16:10 Copy ALL your code. Mar 07 23:16:13 not parts. Mar 07 23:16:21 Because that last part you sent me would not work. Mar 07 23:16:24 It wouldn't even compile. Mar 07 23:16:29 Quacked: use "dp" Mar 07 23:16:33 http://pastebin.com/8y1DNjhL Mar 07 23:16:39 It compiled for me O.o Mar 07 23:16:43 Oh, that is not full code Mar 07 23:16:50 Just the bit I am having trouble with Mar 07 23:17:02 StingRay_: Quacked: Don't use DP. Use weight. Mar 07 23:17:13 Set both of their width to 0dp Mar 07 23:17:20 both height to wrap_content Mar 07 23:17:24 and both weight to 0.5 Mar 07 23:17:33 Post full code Mar 07 23:17:48 android:weight="0.5"? Mar 07 23:17:53 Man, java is so complex Mar 07 23:18:12 Meron: I wasnt talking to you lol Mar 07 23:18:12 image = (ImageView) findViewById(R.id.full_image_view); I mean, what is the purpose of repeating (ImageView) here? Mar 07 23:18:15 Oh Mar 07 23:18:17 hah Mar 07 23:18:18 You are casting it Mar 07 23:18:40 It seems you must repeat yourself often in Java, unlike Python where you just type x = whatever :P Mar 07 23:18:44 findViewById returns a View object, the casting tells the View that it is of type ImageView which is a subclass of View. Mar 07 23:18:58 I see Mar 07 23:18:59 Okay Mar 07 23:19:00 What you just typed is an example of polymorphism,. Mar 07 23:19:03 Java is very object-oriented. Mar 07 23:19:48 Meron: I am willing to fix this entire problem for you, but you are not making explaining it easy. You are pasting parts of code. If you had Skype, I would have fixed it for you with comments explaining what and why so you could understand lol Mar 07 23:19:55 http://pastebin.com/SuvP7sJr Mar 07 23:20:02 Now with the XML Mar 07 23:20:19 The rest of the code is pretty irrelevant.. has nothing to do with that part Mar 07 23:20:21 but okay Mar 07 23:20:22 Anthaas: weights to 0.5 and width to 0dp actually did not change anything Mar 07 23:20:23 give me a second Mar 07 23:20:43 Quacked: on both of them? are they in the same parent layout? Mar 07 23:21:23 http://pastebin.com/yrNU0Ex9 Mar 07 23:21:25 lione 15 and 25 Mar 07 23:21:37 and 68 and 78 Mar 07 23:22:32 Quacked: 2 things, make the parent linear width match_parent Mar 07 23:22:39 and dont use "fill_parent" as it is deprecated. Mar 07 23:24:01 what to use instead? Mar 07 23:24:41 match_parent Mar 07 23:24:58 well i finally got some mess to compile, and then it crashes saying MapFragment cannot be cast to Fragment, even tho i'm not casting Mar 07 23:25:13 Post the line of code in question? Mar 07 23:25:35 I'd imagine its a matter of whatever you are passing MapFragment into expects a Fragment. Mar 07 23:26:03 right, but MapFragment extrends Fragment so it ought to work jsut fine by way of polymorphism Mar 07 23:26:11 Nope Mar 07 23:26:18 Polymorphism doesnt work backwards Mar 07 23:26:23 Anthaas: this happened with match_parent for the linearlayouts: http://bildr.no/image/1409937.jpeg Mar 07 23:26:26 uh, what? Mar 07 23:26:27 yes Mar 07 23:26:37 B extends A, B is an A Mar 07 23:26:46 Oh ahha I misread your previous statement Mar 07 23:27:01 something(A arg) { } something(B) <- polymorphism Mar 07 23:27:31 B extends A, A cannot be cast to B Mar 07 23:27:35 That was my point Mar 07 23:27:39 But I misread your original statement Mar 07 23:27:41 ah, yeah Mar 07 23:28:01 03-07 17:15:39.666: E/AndroidRuntime(17478): Caused by: java.lang.ClassCastException: com.google.android.gms.maps.MapFragment cannot be cast to android.support.v4.app.Fragment Mar 07 23:28:04 03-07 17:15:39.666: E/AndroidRuntime(17478): at android.support.v4.app.Fragment.instantiate(Fragment.java:384) Mar 07 23:28:10 oops. well, heh. Mar 07 23:28:11 Quacked: use "DP" Mar 07 23:28:29 oh, wait a minute Mar 07 23:28:51 Quacked: both buttons to "60dp" and the time widget centered Mar 07 23:28:53 done Mar 07 23:29:22 or have a fixed width view of that popup in dp Mar 07 23:29:25 either or Mar 07 23:29:51 hmm, nope. i'm using SupportMapFragment, so it seems it ought to convert to support....Fragment just fine Mar 07 23:31:10 StingRay_: I just wanted it to scale for huge screens like tablets Mar 07 23:31:18 I'm attempting to use an onGlobalLayoutListener on an injected view so that I can grab an ImageView's width that is set to match_parent, but it's LayoutParams().width is always -1 even though it's displaying fine. What might I be doing wrong? Mar 07 23:31:25 would be nice if logcat would show the full stack trace, all that 11 more crap pisses me off Mar 07 23:31:55 i don't recall ever wanting or asking for stack traces to be flattened in my entire life Mar 07 23:32:11 and i don't appreciate the devs at google making that decision for me Mar 07 23:33:22 openback: thats not a dimension -1 = FILL_PARENT Mar 07 23:33:24 back Mar 07 23:33:45 openback: as in thats not a pixel value, its a layout constant type Mar 07 23:33:51 StingRay_: but thanks, setting the entire linearlayout to android:layout_width="180dp" kinda works Mar 07 23:34:07 Weighting is the only correct way to do it. Mar 07 23:34:48 openback: well -1 = fill parent or match parent Mar 07 23:34:53 StingRay_: Oh. Well how am I supposed to grab that view's actual width? Mar 07 23:35:05 StingRay_: Also, never pass in int values for constants. Mar 07 23:35:12 Makes it hard to read Mar 07 23:35:13 Anthaas: read up Mar 07 23:35:25 Anthaas: I would never do that!!! Mar 07 23:35:38 openback: well, depends when your doing it Mar 07 23:35:55 Quacked: Hang on Mar 07 23:36:02 Ill adapt your code and get the weights working Mar 07 23:36:23 Cool Mar 07 23:36:35 StingRay_: I have a square image that I want to fit to screen. So I set the ImageView to match_parent, and then I'm trying to find out what that ends up being and then setting the height to that in the listenere. Mar 07 23:37:00 openback: why not use a scaleType in the imageView ? Mar 07 23:37:28 openback: http://developer.android.com/reference/android/widget/ImageView.ScaleType.html Mar 07 23:37:48 Done Mar 07 23:37:51 so CENTER_INSIDE is what you want Mar 07 23:38:17 well, from the sounds of it Mar 07 23:38:18 StingRay_: I believe that only scales down, not up. Mar 07 23:38:25 oh god yes Mar 07 23:38:30 why scale up ? Mar 07 23:38:32 ew Mar 07 23:38:32 http://pastebin.com/DPbtuXhc Mar 07 23:38:52 yeah, I know, I wouldn't like to, but I need the ability to, at least. Mar 07 23:39:17 openback: You should use display metrics Mar 07 23:39:32 then use BitmapFactory to create a new bitmap scaled down using a ratio obtained from display metrics Mar 07 23:39:46 DisplayMetrics will allow you to get details on the activity's display side Mar 07 23:39:48 size* Mar 07 23:40:58 Quacked: Did you get that pastebin? It was for you Mar 07 23:41:23 openback: by default an imageView would do what you want ? Mar 07 23:41:26 I'm checking it.. It was only for the first LinearLayout though Mar 07 23:41:33 Anthaas: That's very useful (I'm still new, so all new things are welcome), but that doesn't give me the dimensions of my ImageView as laid out, so I wouldn't even know what size to end up with! Mar 07 23:41:55 openback: as in it defaults to fitCenter Mar 07 23:42:02 Your image view size can be obtained by calling myImageView.getHitRect Mar 07 23:42:05 this will return a rect Mar 07 23:42:13 which is 4 coordinates of its position on the screen Mar 07 23:42:48 StingRay_: Yeah, it is in the center, but it's small and needs to be resized to take the full width of it's container, as well as keep its aspect ratio. Mar 07 23:42:51 Quacked: Yeah, I removed the view you have imported/copied ebcause I dont have it Mar 07 23:42:55 changed the strings because I dont have them Mar 07 23:43:02 and made it work for one linearlayout Mar 07 23:43:12 However, if you apply it to the other one, that will work too Mar 07 23:43:29 Anthaas: Oh wow. I would have expected it easier to get the final width of a view. Mar 07 23:44:02 Anthaas: that code doesnt display the complete length of the Strings Mar 07 23:44:15 openback: Sorry, I thought you wanted its position (although its height and width can be obtained through the rect) Mar 07 23:44:16 it's like this: http://bildr.no/image/1409937.jpeg Mar 07 23:44:20 Try getMaxHeight() etc? Mar 07 23:44:27 openback: are you not attempting to get an image to scale up and maintain aspect, as in scale up to the screen size? Mar 07 23:44:28 Quacked: How long are they? Mar 07 23:45:12 wait a sec, maybe I can solve this with padding Mar 07 23:45:40 StingRay_: In one case, it is screen size, in another, it's not, it's the parent's view's size. Mar 07 23:45:55 well just match_parent on width height Mar 07 23:46:12 and the default imageView does what you want Mar 07 23:47:21 openback: the default type being FIT_CENTER I think Mar 07 23:47:35 is that not what you want ? Mar 07 23:47:56 I can only match_parent on one side Mar 07 23:47:57 thanks for the help, StingRay_ and Anthaas, :) Mar 07 23:47:58 Quacked: Oh I see, you are wanting to create a custom dialog. Mar 07 23:48:06 Quacked: np, solved now? Mar 07 23:48:23 Almost, I just added some padding to the numberpickers Mar 07 23:48:33 I just have to decide how I want it :) Mar 07 23:48:36 Quacked: normally, when creating a dialog and the content doesn't fit - you shouldn't pad it. It is normally an issue with the root layout Mar 07 23:48:57 Oj Mar 07 23:48:58 Ok Mar 07 23:49:00 StingRay_: Let's say it's in a vertical LinearLayout with more items in it. I can only match_parent on the width. If I do height, now everything's off. Mar 07 23:49:10 Gotta get some sleep. Gnite Mar 07 23:51:19 Basically, all I need to know is, if I have an ImageView who has a width of match_parent, how can I find out it's width once it's layed out? Since LayoutParams will only give me -1? Mar 07 23:52:23 openback: wait until it's been laid out and then call getWidth() Mar 07 23:53:56 What the...I could have sworn I tried that and gotten -1 back there as well. Ugh, thanks, evanc Mar 07 23:56:10 Problem solved, thanks! Mar 08 00:25:40 Alright. I was right about Eclipse. It'll sit with an error marker next to something I fixed a minute ago. Mar 08 00:26:30 Oh, I have to save it. Mar 08 00:44:10 I have a class that extends SimpleCursorAdapter within which I have a view that needs to switch to another intent when clicked. I found that I could start the intent using FLAG_ACTIVITY_NEW_TASK, but I don't want it to be a new task. How am I supposed to do this the "right way"? Mar 08 00:44:40 dont use that flag? Mar 08 00:45:23 Sorry, i should have specified that I was only able to set the OnClickListener from within the SimpleCursorAdapter, so it won't launch without it. Mar 08 00:46:16 OnListItemClick from the ListFragment would never be called, for some reason so I went with that method. I couldn't figure out why that was so. Mar 08 00:47:59 i dont really see how that would make a difference in what flags you claim to need Mar 08 00:48:54 When launching from the SimpleCursorAdapter, I would get an Exception from attempting to start an intent from outside of the activity context. Mar 08 00:49:06 Without the flag, I mean. Mar 08 00:52:02 Is there something that would keep OnListItemClick from firing? If I could get that working, then I wouldn't have the issue. Mar 08 00:52:13 i cant think of what would do that Mar 08 01:03:43 openback: onClick inside a listView with onItemClick ? Mar 08 01:04:54 view that hold focus would prevent itemClick from working no? Mar 08 01:05:03 such as default settings of a button Mar 08 01:06:20 Hmm. Mar 08 01:07:01 Each item does have some hidden buttons. I wonder if they're eating it up. Mar 08 01:07:24 (A View that slides over hidden buttons, I mean) Mar 08 01:08:45 if call .setChecked() on a toggle button will it call the onCheckedChanged listener? Mar 08 01:08:58 No, I removed all the buttons and still the same. Mar 08 01:12:03 Tried setting focusable="false" on just about everything and the same. Mar 08 01:15:20 openback: focusableInTouchMode Mar 08 01:23:10 I've tried that as well now and still no event. I've posted my list item's XML here http://pastebin.com/6jFvxQDb Mar 08 01:23:54 so you took out all the buttons ? and it still didn't work ? Mar 08 01:23:57 And as for setting it, I'm just using listView.setOnItemClickListener(new OnItemClickListener() { .... with a Mar 08 01:24:00 yeah Mar 08 01:24:06 oh no Mar 08 01:24:18 I dont know if that would work Mar 08 01:24:20 never done it Mar 08 01:24:33 oh sorry missread Mar 08 01:24:43 how are you doing onClick > Mar 08 01:25:04 What I just said there is my only click listener right now. Mar 08 01:25:46 os so you took out the onClick and now just using onItemClick ? Mar 08 01:26:21 I never even had an onClick Mar 08 01:26:40 are u supposed to use a ViewHolder for CursorAdapters like u do for array adapters? Mar 08 01:26:54 jug6ernaut_: if you want Mar 08 01:27:37 efficiency wise, so your not findViewById for each row load Mar 08 01:27:40 Right now I have that up there and I also just added onListItemClick to the ListFragment as well, so I could see if either would get fired, and neither do. Mar 08 01:27:52 i am, but its not reacting the way i would expect it to Mar 08 01:28:12 react ? Mar 08 01:28:21 well, it is, except for a RadioGroup and RadioButtons, I'm trying to setChecked & not but its not checking the buttons at all Mar 08 01:28:29 openback: take it back to the drawing board so to speak Mar 08 01:28:33 even if i setChecked(true) for every one Mar 08 01:28:43 openback: single view etc Mar 08 01:29:17 StingRay_: Yeah, I wasn't looking forward to that! That was my next step. Mar 08 01:29:35 Dinner first, though. Thanks! Mar 08 01:29:51 jug6ernaut_: yes, use ViewHolder Mar 08 01:30:20 k Mar 08 01:35:39 how can I have a location listener poll for event changes over a physical distance rather than time interval? Mar 08 01:39:56 the_jeebster, you can run a background service that queries where they currently are and measure the distance Mar 08 01:40:05 if enough has passed since the original measuring, fire an activity Mar 08 01:40:46 doesnt a location listener have 2 params ? mintime, mindistance ? Mar 08 01:42:19 StingRay_, i cant find the docs for it Mar 08 01:42:50 http://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener) Mar 08 01:42:59 i forgot that i changed all my system fonts to Roboto until i started using my desktop at home and wondered why all my fonts look messed up Mar 08 01:43:25 StingRay_, nono, for locationlistener, i dont see anythign about a time or distance Mar 08 01:43:54 that will just give you onlocationchanged i think, as i said before Mar 08 01:44:22 nvm, minDistance minimum distance between location updates, in meters Mar 08 01:44:31 kaneda^: does the minDistance in requestLocationUpdates not automatically poll for that specified distance change? Mar 08 01:44:45 it appears so, i thought it just had by time Mar 08 01:45:59 what's the best mocking library for android development? Mar 08 01:46:05 I would like something that runs on the emulator Mar 08 01:46:12 mockito is pretty good Mar 08 01:46:39 alrighty. I've heard of that one Mar 08 01:46:47 thanks Mar 08 01:47:05 I also heard good things about powermock Mar 08 01:47:10 I just want one that is mature enough to not cause problems Mar 08 01:47:33 I've never tried powermock, but mockito is pretty solid imo Mar 08 01:49:26 everybody get your chrome / ff 0day fixes :D Mar 08 02:33:19 anyone know if im going to extend SimpleCursorAdapter so i can convertview and use viewholder , do i need to override anything other than getView and BindView ? I really just need to get onclickItemListeners on each of the listviews elements Mar 08 02:38:01 So, I'd like to use fragmented tabs, but I also don't want to show the title/icon bar... Mar 08 02:38:32 But when I use the normal theme and then do actionBar.setDisplayShowHomeEnabled(false); actionBar.setDisplayShowTitleEnabled(false);, the title bar shows briefly and then fades into the tab bar... Mar 08 02:38:38 How can I do it "for real"? Mar 08 02:44:24 g00s: hmm ... http://h30499.www3.hp.com/t5/HP-Security-Research-Blog/Pwn2Own-2013/ba-p/5981157 Mar 08 02:45:25 hey guys. i did a little bit of light android development a few years ago and remember listviews being heinous to work with. hackery with getView() and all that. now i'm looking at http://developer.android.com/guide/topics/ui/layout/listview.html and i don't see anything about that, it's all this business about cursors and loaders and such. is this a change in how listviews work? Mar 08 02:46:07 no, they work in the same way Mar 08 02:46:12 or is my memory shot to hell Mar 08 02:46:21 just you use different adapters to drive them Mar 08 02:46:31 lists, arrays, cursors etc Mar 08 02:46:38 depends on what you use Mar 08 02:55:02 Nobody? >_> Mar 08 02:55:47 The accepted answer here doesn't apply to a main activity, and the next answer doesn't work (I get a NPE trying to get the action bar): http://stackoverflow.com/questions/9326337/android-3-2-remove-title-from-action-bar Mar 08 02:55:49 jrajav: I think it depends where you set it Mar 08 02:56:04 First thing in the onCreate.... Mar 08 02:56:08 if you call it as a window property in onCreate Mar 08 02:56:14 I think the window is already there Mar 08 02:56:21 just the content that is not Mar 08 02:56:30 I didn't know there was anything earlier than the main activity onCreate Mar 08 02:56:34 so look at maybe xml styled attribs for that activity Mar 08 02:56:45 or Mar 08 02:56:55 Right. I want the ActionBar style. Just not the title/icon. Mar 08 02:56:59 maybe look at starting the activity with diff flags Mar 08 02:57:41 oh this is the actionBar your talking about ? Mar 08 02:57:49 not the window decor views Mar 08 02:57:59 sorry, I read it wrong **** ENDING LOGGING AT Fri Mar 08 02:59:58 2013