**** BEGIN LOGGING AT Fri Mar 29 02:59:59 2013 Mar 29 03:00:28 I know I sound like a fool.. but from where do I download them? from the grepcode link? Let me try that.. Mar 29 03:01:05 Oh - the "Sources downlaod" link Mar 29 03:01:13 oh you'll have to download the .jar. then extract it somewhere Mar 29 03:01:38 okay this is making sense now.. Mar 29 03:03:40 haha I guess I need to get the jar program to extract this. Mar 29 03:05:57 can use 'jar -xf' on mac/linux Mar 29 03:06:20 Oh, heh. unzip does it if I rename it from .jar to .zip. (I don't have an executable command in my path which is named jar.) Mar 29 03:06:36 coco89|away: sorry, but I don't understand. can you explain the "It is only true when I'm out of the app and I scan a tag" part? is the app in the background but still alive? do you get the toast messages then? Mar 29 03:13:13 g00s: hey Mar 29 03:13:29 coco89|away: you're away: sssshhhh Mar 29 03:13:39 I need help :(((( Mar 29 03:13:46 pleaseee Mar 29 03:13:52 i need to run some errands ;| Mar 29 03:13:58 ah okay Mar 29 03:14:42 armdale: So I downloaded the android-4.2.2_r1-sources.jar file, then I unzipped it in /big/android/tmp/ then I did File > New > Project, Android > Android Project from Existing Code, then I Root Directory to /big/android/tmp and it automatically found a projected named core, Mar 29 03:15:26 then I checked the "copy projects into workspace" and clicked finish, and it seems happy but I cannot figure out where it copied them to. Mar 29 03:16:02 any new projects will be in your Project Explorer in the left pane of the Eclipse window Mar 29 03:16:55 There are no new projects listed there. The only ones there are the same 6 that were there before - and they are all ones I created previously. Mar 29 03:18:16 erm. actually you can just download the sources using android sdk manager, that might be easier. they get downloaded to your android-sdk folder Mar 29 03:19:43 I previously downloaded them using the sdk manager but didn't know where to look for the downloaded files Mar 29 03:19:52 looking in sdk sources folder now.. Mar 29 03:19:59 yea so they're in your sdk folder. should be anyway Mar 29 03:20:11 I have 86M in sdk/sources Mar 29 03:20:17 in my case: android-sdk-macosx/sources/android-17 Mar 29 03:20:25 yeah, android-17 for me too Mar 29 03:20:44 so I wonder if this is just the java source, or the sources also for the native code Mar 29 03:20:53 so generally the classes you'll be interested in will be in android-17/android Mar 29 03:21:13 the com.google.android APIs Mar 29 03:21:32 Ahh, sure enough, there is media/AudioRecord.java Mar 29 03:22:08 so you'll have better luck adding a project to eclipse using that root folder: android-17/android Mar 29 03:23:56 Hmm. so AudioRecord.read() just calls native_read_in_byte_array().. Mar 29 03:24:21 So is there a way to go one level deeper and view the sources to the native functions? Mar 29 03:24:32 Maybe I need to download the NDK Mar 29 03:25:39 that's as far down as i've journeyed Mar 29 03:26:30 Thank you very much for the help! I'm closer then I was. Mar 29 03:27:40 np Mar 29 03:27:50 hi i am having trouble with my layout matching up across 1 or more devices. The layout i setup using relative layout containers doesn't match what i see when i run the app on a single device. Also the same layout is not consistent on other devices (buttons/checkboxes are misaligned..too far down, too far right etc). How do you get a consistent UI layout across multiple devices in Android ? Did I miss something ? It should be fairly Mar 29 03:27:51 simple. Put your ui in relative and/or linear layout containers and drag to desired positions. But its not working. Help ? Mar 29 03:27:56 armdale: What's your best suggestion for getting closer to the source as far as finding answers to under-documented methods -- does romainguy sometimes pop in here and talk? Mar 29 03:29:19 greets Mar 29 03:29:25 howdy rr Mar 29 03:29:45 where's jessica ? Mar 29 03:30:04 no idea Mar 29 03:31:06 mobydev: would you like me to look at your layout? (I'm new here. Not sure if I'm allowed to say that.) Mar 29 03:34:11 well, its not complicated. I could describe it. There is a root relative layout with a bg set. there is a child relative layout with image views, text views and and an image button. I try to line up my button with a line from the root layout bg. I can't get it to line up on all devices. too far down, too high up, too far right etc….. Mar 29 03:35:05 Are you doing so by editing the text of the xml file, or by the WYSIWYG layout editor? Mar 29 03:35:18 using the editor Mar 29 03:35:51 drag and drop. I edit the text if the editor gets annoying. Mar 29 03:37:32 I'm trying some things.. Mar 29 03:41:03 Hmm Mar 29 03:42:27 mobydev: relative can be tricky because there are so many relationships between views -- for example, a button can be achored by its own edge, or the bottom of the text, etc. Mar 29 03:42:48 I would have to see the layout to even begin guessing at it Mar 29 03:44:35 I'm going to try separating the bg into components and put each part into its own container with the ui i want it to match up with Mar 29 03:45:15 i don't think i can do what i want to do with a single bg Mar 29 03:45:29 too many screen sizes Mar 29 03:45:53 oh -- are you trying to line views/widgets up with stuff in the background picture? Mar 29 03:51:21 yup Mar 29 03:51:40 doesn't line up though Mar 29 03:51:57 and if i get it lined up on one device, it doesn't line up on other devices Mar 29 03:52:11 so i think you gotta keep em separated Mar 29 03:52:18 Ohhh... yes. I would not even try to do it that way, because Mar 29 03:52:51 because the relative layout has its margins set in pixels, while the background image scales by percentages to fill the background Mar 29 03:53:14 hmm Mar 29 03:53:35 however... you may be able to change the positions of the widgets in your java code so that on startup, the activity takes note of the size of the screen and calculates the correct positions for each View/widget on the screen Mar 29 03:54:05 by hand ? Mar 29 03:54:09 No Mar 29 03:54:14 let me see if I can explain this Mar 29 03:54:57 Let's say that you want your button positioned at x=screenwidth/3 and y=screenheight/3.. Mar 29 03:55:57 In the activities onCreate() method, you *may* be able to have code which checks the screen width and height and calculates a pixel offset that is still at the 1/3 x 1/3 position -- regardless of screen size.. Mar 29 03:56:38 Your java code would then modify the widget's x and y positions (if that is possible?) to place them in the correct place on the screen for that particular resolution. Mar 29 03:56:45 that would have to be done for each ui element correct ? Mar 29 03:56:51 Yes. Mar 29 03:57:07 except the ones which were relative to the edge of the screen :) Mar 29 03:57:44 Essentially what you want is for your View locations to act like pins stuck to a stretchy background image Mar 29 03:58:11 ah, i have too many screens and too much stuff in em. it would take forever…..I need a quick fix. I will have to come up with something. Thanks for your help though. Mar 29 03:58:24 hehe np Mar 29 03:58:57 mobydev, you could use vectors, maybe? Mar 29 03:59:09 Not sure about the support for that, though Mar 29 04:02:53 oi Mar 29 04:03:03 hi dross Mar 29 04:03:16 hhi Mar 29 04:37:33 hi all, I am using an actionprovider. however, i would like to know how to make it left aligned on the actionbar. currently it is appearing at the right-most side of it. how would i force it to appear on the left instead? Mar 29 04:41:46 hi ashiswin Mar 29 04:42:17 it's been quite for a long time in here and I don't know what an action provider or action bar is Mar 29 04:42:38 haha ok XD Mar 29 05:48:34 guys, I have a question Mar 29 05:48:44 I am talking with a hardware manufacturer Mar 29 05:48:57 uhhuh Mar 29 05:49:01 asking how I can detect if the app is running on their hardware or just some ordinary Android phone Mar 29 05:49:25 he told me I can use [ro.product.manufacturer]: [(their name here)] Mar 29 05:49:39 and [ro.product.model]: [(product name here)] Mar 29 05:49:50 I'm slightly familiar with java, but only barely Mar 29 05:49:59 I don't recognize what that stuff does Mar 29 05:50:06 what is ro. Mar 29 05:50:12 what am I indexing? Mar 29 05:50:21 ro = read only Mar 29 05:50:26 Would you like to stand by while I see if I can figure it out? Mar 29 05:50:38 any help, I would appreciate Mar 29 05:50:46 if I can word it more clearly, let me know Mar 29 05:50:55 I apologize if it is sloppy Mar 29 05:51:04 Let me see what I can figure out here Mar 29 05:51:09 thanks Mar 29 05:52:33 http://developer.android.com/reference/java/lang/System.html#getProperty%28java.lang.String,%20java.lang.String%29 Mar 29 05:52:42 checking Mar 29 05:52:48 getProperty Mar 29 05:53:08 returns sys info that includes build.prop and others I think Mar 29 05:53:16 eg manuf. flags Mar 29 05:53:47 heres an example http://caliper.googlecode.com/git-history/a3d5021e3696a9d9e7c9bc843a7629db9157e1b1/caliper/src/main/java/com/google/caliper/EnvironmentGetter.java Mar 29 05:53:51 is that different from....I forget the exact namespace....something like build.os.manufacturer.NAME or something like that Mar 29 05:54:41 there is android.os.Build.MANUFACTURER and similar. i think that comes from the build prop but i'm not sure Mar 29 05:57:31 ok Mar 29 05:57:52 if ro.product.manufacturer == HTC && ro.product.model == FacebookPhone { throw new Exception ("Get a real phone:); } Mar 29 05:58:36 nice Mar 29 05:59:00 i'm going to put that in a library and post in on github Mar 29 05:59:19 so ro. is a compile-time defined value? Mar 29 05:59:22 based on my target? Mar 29 06:00:37 That's strange. Eclipse doesn't know what ro. is Mar 29 06:00:44 no, it's read from build.prop on boot Mar 29 06:01:04 so ro.* isn't known at compile-time, but gets filled in? Mar 29 06:01:12 same as build.prop.*? Mar 29 06:01:41 wat Mar 29 06:02:41 sorry if I'm asking dumb questions. I'm new to android dev Mar 29 06:02:56 not dumb at all. Mar 29 06:03:00 from my understanding, there is some namespace that is full of values known about the device at run-time Mar 29 06:03:05 so like, I can write an app Mar 29 06:03:18 and know when the app is run "Am I on _____ device?" Mar 29 06:03:28 I think they are build.* somethign Mar 29 06:03:41 earlier, I said compile-time, but that was wrong Mar 29 06:03:44 it is all run-time Mar 29 06:04:08 build. has various members named BOARD, BOOTLOADER, HARDWARE Mar 29 06:04:14 they are all string values Mar 29 06:04:34 but I'm not sure what they mean. For example, I did "HARDWARE" and it just says sun4i Mar 29 06:06:08 manufacturers often have so many variants it's really hard to detect by device. like if you want to identify the galaxy s2 you'd probably have to deal with 10 or 20 different possible values for the different items Mar 29 06:06:46 but the good news is that you rarely need to, as it's generally not the right approach Mar 29 06:07:28 yeah, that would be a mess scrubbing and normalizing the string Mar 29 06:09:16 ProgramMax: Build.MODEL looks like your best bet. Mar 29 06:11:09 On my Polaroid Android Tablet model PIMD701C, Build.MODEL is a string that says "PMID701C" Mar 29 06:14:09 Polaroid makes an android tablet ? Mar 29 06:14:09 Let me check what my motorola droid does Mar 29 06:14:51 i'm guessing also that custom roms mess with this probably ;) Mar 29 06:17:49 Ahh yes Mar 29 06:18:06 ProgramMax: My motorola Droid gives the model as "Droid" Mar 29 06:18:42 so I would guess that any device set up by a factory of a given model number will all return the same model number. Mar 29 06:19:27 that is not true Mar 29 06:19:43 kevinb: please tell us what you know about it. Mar 29 06:20:18 https://gist.github.com/teslacoil/3840f72241355945d107 that is non-comprehensive and should not be relied on as i'm sure it's missing some Mar 29 06:20:36 but i used it for an optimization on that device in the past Mar 29 06:21:16 I just tested two oem unmodified devices and they both reported the same model as is printed on their case Mar 29 06:22:00 and that gist references 10 different SGS2s Mar 29 06:23:01 But I guess if the manufacturer rebrands or whatever then a given exact design could show up with different model numbers even though they were the same Mar 29 06:24:36 for the original droid there is the milestone which is essentially the gsm version of the droid. i assume it'd return Milestone or milestone for model, but i do know that both the droid and milestone return sholes for Build.BOARD Mar 29 06:24:41 ProgramMax: Build.HARDWARE is maybe better if the manufacturer cannot provide you with a list of model numbers they burn into their system Mar 29 06:26:18 What is a sholes? Mar 29 06:26:50 one of the code names for the droid Mar 29 06:28:44 kevinb: Strange. Mar 29 06:32:31 haha my droid returns "sholes" for both BOARD and HARDWARE. Mar 29 06:34:10 ProgramMax: I guess your best bet is to talk to the manufacturer and ask them what field you can rely on. If they tell you that they put a certain number of different HARDWARE strings in or whatever, then you can match against those in your code. If the manufacturer doesn't know what they burn into their boards then there's not much you can do I guess. Mar 29 06:36:05 downloading adk now, 32 or 64? Mar 29 06:36:20 i'm on win7 64 Mar 29 06:37:58 ahh Mar 29 06:38:08 I'd say try 64 first Mar 29 06:38:23 but I don't even use windows or mac! Mar 29 06:38:27 ok thanks Mar 29 06:38:44 well, good advice still Mar 29 06:38:49 but matching your operating system is a very good idea -) Mar 29 06:39:21 yeh the 32 64 thing kinda gets me Mar 29 06:40:03 eclipse/ phonegap/ adt/ java sdk Mar 29 06:40:14 downloading all that now Mar 29 06:40:23 Technically, the CPU can run 32 bit apps while running a 64 bit OS, but all those 32 bit apps will need 32 bit DLL/s and libraries.. or something like that. If you can go all 32 bit (os and apps) or all 64 you are better off. Mar 29 06:40:33 Having said that, some apps won't work in 64 bit :( Mar 29 06:40:56 ha Mar 29 06:41:08 Did you find a good step by step procedure list for getting started? Mar 29 06:41:50 dont worry too much about me, i've done this once before Mar 29 06:41:57 oh good :) Mar 29 06:42:07 just lost all my files Mar 29 06:42:08 I did it about 5 times before I did it right ha ha ha Mar 29 06:42:21 and got to re set all of this stuff Mar 29 06:42:31 =p Mar 29 06:42:49 yeh, been there Mar 29 06:43:00 i may be doing that again Mar 29 06:43:17 in fact maybe I should make a tutorial Mar 29 06:43:25 and put it on youtube Mar 29 06:43:52 yeah! that's a great idea! Mar 29 06:44:00 I just wrote down the steps and emailed them to myself Mar 29 06:44:35 i just noticed on the Ubuntu download page they still recommend 32-bit versions? Mar 29 06:44:39 yeh I'll do that too Mar 29 06:53:00 what gave me the biggest hseadache last time was permissions Mar 29 06:53:34 windows needs to explicitly be told you are the administrator at times Mar 29 06:54:01 well no, not if you disable ACL and your account has admin Mar 29 06:54:05 from what I remember Mar 29 06:54:16 although not used windows in quite some time :) Mar 29 06:54:39 StingRay_: my acl? Mar 29 06:54:56 nah i don't think that works Mar 29 06:54:59 UAC Mar 29 06:55:03 oh Mar 29 06:55:07 yeah it does Mar 29 06:55:09 :) Mar 29 06:55:10 that's disabled Mar 29 06:55:16 Well I'm calling it a night. I was trying to find the sourcefile with the class for the AudioRecord object in the native code but so far could not. Now I'm downloading the 8+GB source code for android OS itself :P Good Night. Mar 29 06:56:33 StingRay_: nope, i've been there, in win7 you have to be weary of two things, folder permissions and actually running each tool as an administrator explicitly Mar 29 06:56:48 right click, run as administrator Mar 29 06:57:29 otherwise you will think everthing is fine to have everything blow up in your face later Mar 29 06:58:55 well I use either linux or osx Mar 29 06:59:02 oh Mar 29 06:59:03 solves lots of issues Mar 29 06:59:05 :) Mar 29 06:59:11 well there's that Mar 29 06:59:15 =) Mar 29 07:00:12 truthfully there's a desire to learn linux but it's not a priority Mar 29 07:00:56 everytime i hear someone talk about it i think to myself, i should learn that Mar 29 07:01:14 but seem to be getting by Mar 29 07:01:59 still downloading, Mar 29 07:02:11 99 percent done Mar 29 07:16:53 so it looks like android sdk comes with eclipse now Mar 29 07:17:33 well the adt bundle Mar 29 07:19:21 maybe it's been like this for some time now Mar 29 07:19:40 well i guess that's convenient Mar 29 07:25:01 kinda like baking a cake, Mar 29 07:25:38 a dash of android sdk here, a sprinkle of java jdk there Mar 29 07:25:56 a touch of eclipse Mar 29 07:26:18 and a pinch of phonegap Mar 29 07:26:31 mix it all together Mar 29 07:26:46 and you have yourself a bowl Mar 29 07:27:04 to put all the real ingredients in Mar 29 07:27:23 ... and a diarrhea in the morning Mar 29 07:27:34 hahah Mar 29 07:28:22 downloading android 4.2.2 api 17 Mar 29 07:28:37 hoping it's backwards compatible Mar 29 07:35:26 reminds me of 56k modem days Mar 29 07:35:37 such a big DL Mar 29 07:37:20 well after this i will need to remember what folders to link to my system path variable Mar 29 07:45:52 adding phone gap will give anyone that eats that diarrhoea Mar 29 07:46:36 after all a cake made of the best ingredients still tastes like sh*t when you add sh*t to it :) Mar 29 07:48:51 do I need the NDK Plugins? Mar 29 07:49:03 veQue: most of the time, not Mar 29 07:49:07 StingRay_: good analogy btw Mar 29 07:49:14 k thanks Mar 29 07:49:15 veQue: unless you are going to build stuff based on NDK parts Mar 29 07:49:42 ... i would not ... know Mar 29 07:49:57 what does that mean? Mar 29 07:50:13 PhoneGap is like easily-broken cooking tools that flake parts of their coating on barest scratch, and so unless you're super-duper-extra careful it will make the cake give people food poisoning Mar 29 07:50:42 veQue: NDK = building 'native' code shard libraries that you can use in java code (or even as standalone activities) Mar 29 07:50:52 oh Mar 29 07:50:56 writing in C/assembler/whatever Mar 29 07:51:00 nope Mar 29 07:51:04 dont need it then Mar 29 07:51:28 veQue: are you building a phoneGap web site ? Mar 29 07:51:31 I mean app Mar 29 07:51:33 :) Mar 29 07:51:53 yes Mar 29 07:52:04 then you should be in #phonegap really Mar 29 07:52:18 no, it's not time yet Mar 29 07:52:30 you guys are doing a fine job Mar 29 07:52:35 well if your setting up requirements then yeah it is Mar 29 07:52:41 :) Mar 29 07:52:43 i'll get over there in a bit Mar 29 07:53:17 and have you considered just how bad it really is compared to doing a proper app ? Mar 29 07:53:34 don't worry I've been through the ringer before Mar 29 07:53:58 not my first rodeo, almost done setting up Mar 29 07:54:06 hehe Mar 29 07:54:14 oh I remember watching a vid on ndk Mar 29 07:54:28 most annoying thing with NDK is how often it has broken navigation Mar 29 07:54:33 for people who want to build apps using c++ Mar 29 07:55:16 onPrepareSubMenu is never called, any suggestion? Mar 29 07:57:27 is that an error or warning? Mar 29 08:51:07 is there any test tool for android on SQLiteDatabase? Mar 29 08:52:55 test tool ? Mar 29 08:52:59 reader ? Mar 29 08:53:03 editor ? Mar 29 08:53:09 validator ? Mar 29 08:53:11 DbUnit? Mar 29 08:53:30 I actually use a firefox add-on that I really like Mar 29 08:53:47 well impressed with it Mar 29 08:58:07 can junit do it? Mar 29 09:05:34 mhm.. any idea why i get an "leaked window" Exception? i create a new SurfaceView in an activiy mSurfaceView = new SurfaceView(this); and want to add it to the WindowManager by using window.addView(mSurfaceView, mWindowParams); Mar 29 09:36:50 people don't know about my g-unit Mar 29 09:38:03 How would I go about to add a "footer view" to my Actionbar "dropdown list"? Add it manually in the adapter for position lastData+1? Mar 29 09:38:22 (also making sure getCount() returns super.getCount()+1) Mar 29 09:47:54 can I make activity which will just display toast message, without any "scren"? Mar 29 09:48:24 normally would you not use a notification for such a thing ? Mar 29 09:49:01 StingRay_: it's just for my debuging of intent filters Mar 29 09:49:22 then you would Log.* it ? Mar 29 09:50:16 Yeah, I might do that... Mar 29 10:24:30 i have a problem with a grid view i am using. image views displayed in it are overlapping in smaller screened devices. the spacing in a grid view is supposed to be automatic right ? so why would it overlap ? Mar 29 10:25:33 cause of your settings on the gridView, bounds on the childs and scaleType on the imageViews ? Mar 29 10:25:50 let me see…. Mar 29 10:25:51 * StingRay_ is just guessing on how he could make it do that Mar 29 10:26:07 image view settings are…. Mar 29 10:26:17 no didn't ask for them Mar 29 10:26:23 was just saying why Mar 29 10:27:04 do you get kicked for posting a few lines of code in here ? Mar 29 10:27:04 and imageView attires are last in the list of affections Mar 29 10:27:14 oh i see Mar 29 10:27:58 image view layout params are 185x185, padding is 5,5,5,5, center crop Mar 29 10:28:17 that could be why Mar 29 10:28:30 thanks! Mar 29 10:28:34 so yeah, choosing a fixed size is a bit wrong Mar 29 10:28:39 yup Mar 29 10:31:53 Hi! I've created custom account to android contacts and People app not show birthday in my custom contacts. How to fix it? Mar 29 10:32:10 In android 2.3 all fine. Mar 29 10:32:56 My birthday exists in data table and my app successfully retrieve it. Mar 29 10:33:11 field name change ? Mar 29 10:33:43 I build it against latest SDK Mar 29 10:33:45 e.g., has_phone != exist in 2.3 but does in >= 3.0 Mar 29 10:34:06 I have a language app, that is part educational/part reference so I can't decide which category to upload it to in the store Mar 29 10:34:11 What would you guys recommend? Mar 29 10:34:29 edu Mar 29 10:34:59 and field change can't possible due to its simple DATA1, DATA2 etc Mar 29 10:35:10 Thanks StingRay_ , what makes you say that? Mar 29 10:35:29 logic Mar 29 10:42:26 and you have said it's an edu app b4 now Mar 29 10:42:27 :) Mar 29 10:46:05 Yeah good point :) Mar 29 10:47:14 When is the promo graphic used? Mar 29 10:48:52 apple741: in market, the big graphics for apps Mar 29 10:49:38 Can I directly format a float in a String resource? Currently, is use "%1$f kg" (with getString(...) etc. in Java), but that formats with several decimal places - I want one) Mar 29 10:50:02 p_l: Is that not the feature graphic? Mar 29 10:50:22 apple741: I thought it was the promo graphic, the one that ended up on the big tiles in market Mar 29 10:50:44 I think your both right :) Mar 29 10:51:01 Kopfgeldjaeger: in C it is %.2f for two decimals Mar 29 10:51:30 oh great, my finder is not responding Mar 29 10:51:31 pduin: yep, that works with String.format(...), but I don't know the Syntax for getString(...) Mar 29 10:51:38 beachball time Mar 29 10:52:37 I could just use a String as placeholder and format it in code, but I'd like a nicer solution Mar 29 11:11:46 Kopfgeldjaeger: one method is to String(getString(R.string.foo)).format(1,2,3) Mar 29 11:13:16 clever: yes, I did it like that now :) Mar 29 11:53:36 what is the proper method to get phone number from Uri "tel:+420123456780" (I want to get the part after :) Mar 29 12:00:00 how is that parseable as a uri ? Mar 29 12:00:04 whats it from ? Mar 29 12:01:32 from intent Mar 29 12:01:55 I mean that string is from what source ? Mar 29 12:02:25 uri.toString() Mar 29 12:02:45 ok, let me ask another way Mar 29 12:02:54 what gave you that string in that format ? Mar 29 12:03:41 Pitel_IPEX: tried uri.getHost()? Mar 29 12:03:46 or uri.getPath() Mar 29 12:03:55 or something like that Mar 29 12:04:14 instead of uri.toString() Mar 29 12:04:22 isn't that a bit flakey ? Mar 29 12:04:50 path and host are for valid long uri's ? Mar 29 12:04:57 i don't know how the phone numbers are entered in URIs, but if android make the the host part, why not using that? Mar 29 12:05:02 StingRay_: I have my app registered as phone app (like skype) and this is the intent's data I get when making call through my app Mar 29 12:05:17 thats really odd Mar 29 12:05:26 Log.d(getString(R.string.app_name), getIntent().getData()); Mar 29 12:05:38 sounds logical so far Mar 29 12:05:45 ^toString() is missing... Mar 29 12:05:46 tel: ? Mar 29 12:05:58 yeah its also an uri Mar 29 12:06:02 And I got this: D/ipexcti (18689): tel:%2B420777771729 Mar 29 12:06:03 like contact:// etc. Mar 29 12:06:22 mob: hme: ? Mar 29 12:06:44 tel is not a host for a uri though right ? Mar 29 12:06:47 http://developer.android.com/reference/android/content/Intent.html this format is also here, at the top page as axample Mar 29 12:07:00 it won't resolve to any content root Mar 29 12:07:32 ACTION_DIAL tel:123 Mar 29 12:07:40 oh it's the ACTION prefix Mar 29 12:07:56 wow Mar 29 12:08:03 still think thats odd :) Mar 29 12:08:12 StingRay_: why is it odd? Mar 29 12:09:25 that a diaper uses a tel: prefix ? Mar 29 12:09:33 dialer* Mar 29 12:09:49 but shouldn't it be like that? Mar 29 12:09:51 I would have thought it relate more to the action Mar 29 12:10:06 Pitel_IPEX: have a look at the PhoneNumberUtil class Mar 29 12:10:07 if it's content rather than action Mar 29 12:10:14 DAIL:398539486 Mar 29 12:10:18 try its getNumberFromIntent Mar 29 12:10:19 CALL: Mar 29 12:10:40 its not the action? Mar 29 12:10:43 the action is ACTION_DIAL Mar 29 12:10:55 the data uri in that intend is tel:+123 Mar 29 12:10:59 timroes: thanks! this might be it :) Mar 29 12:11:01 I mean it don't relate to content Mar 29 12:11:13 it relates to the data Mar 29 12:11:13 its like ACTION_VIEW and http://whatsoever.com Mar 29 12:11:22 it's really no more odd than http:// or www.; guess they wanted to make sure it's textual representation would be differentiated as a phone number Mar 29 12:11:25 jsut with ACTIN_DIAL and tel:+123 Mar 29 12:11:37 can someone verify that there is a bug in this calculation: calculateInSampleSize() @ http://developer.android.com/training/displaying-bitmaps/load-bitmap.html Mar 29 12:11:37 10 hours and i could not figure out why my takePicture is not working on the second time -_- Mar 29 12:12:08 timroes: not sure why it needs context, but I'll try it Mar 29 12:13:13 http://pastebin.com/BmA0J6wU maybe anyone knows why the second time i do startService() is not working (Failed to Connect to Camera). Mar 29 12:13:38 Pitel_IPEX: because it calls this method: http://developer.android.com/reference/android/content/Intent.html#resolveType(android.content.Context) Mar 29 12:13:43 and needs to pass an intent to it Mar 29 12:14:00 kthx, it works :) Mar 29 12:14:27 though it seems to never use the return value of that method :D Mar 29 12:14:34 seems like someone forgot to clean up Mar 29 12:15:35 ah but it still needs it for contentresolvers Mar 29 12:18:15 if i make a singleton, is it guaranteed to exist throughout the app's life? Mar 29 12:18:40 it depends how you implement it Mar 29 12:18:55 first activity i check if it exists, if not, make it Mar 29 12:19:02 and how do you store it? Mar 29 12:19:04 app dies, next up is that first activity again Mar 29 12:19:06 a static field in the class? Mar 29 12:19:18 yes Mar 29 12:19:31 static fields will not be garbage collected Mar 29 12:19:46 so as long as you save it in a static field, it will stay there until the app dies Mar 29 12:19:53 coolio Mar 29 12:20:21 hm then again Mar 29 12:20:58 is my statement valid in that if the app is killed, next time it's started the 'startup activity' is started first? Mar 29 12:21:03 or will the system remember Mar 29 12:22:15 no if the dalvik vm is killed everything is gone Mar 29 12:22:24 and the next time you will initialize this variable it will be initialized again Mar 29 12:22:35 thought i am not sure, if you are so sure about when the dalvik vm gets killed Mar 29 12:22:45 that doesnt mean your app is in backgruond or so? Mar 29 12:22:57 its killed sometime by the system, when it needs the memory Mar 29 12:24:38 come again? Mar 29 12:25:07 Your app may be called at any time by the system Mar 29 12:25:17 called=killed? Mar 29 12:25:17 When relaunched, the last visible activity will become visible again Mar 29 12:25:21 yes Mar 29 12:25:23 =culled Mar 29 12:26:04 so then my singleton would not be initiated Mar 29 12:26:13 makes sense Mar 29 12:26:38 That's why you have a getInstance method in your singleton that initializes if it's not Mar 29 12:28:13 singletons should be lazy loadable (and if they are holding any persistent state, they should be write-on-change) if you want to avoid a world of pain Mar 29 12:28:48 yeh my problem is that i need a context to initlialize the thing Mar 29 12:29:00 why's that a problem Mar 29 12:29:07 then initialize it in your Application.onCreate method Mar 29 12:29:30 hmm Mar 29 12:29:34 never done that.. let's see Mar 29 12:29:40 or initialize it somewhere esle where you have a context, but you would need to make sure, that you don't call it before you initialized it Mar 29 12:29:56 i usualyy have an application class that gives static access to the applicationContext Mar 29 12:30:11 is that a thing? Mar 29 12:30:24 if you need some other context you will need to initialize it there Mar 29 12:31:27 http://stackoverflow.com/questions/987072/using-application-context-everywhere osxorgate the answers also tell about the problems with that approach Mar 29 12:32:22 thanks Mar 29 12:32:33 i need the context to make a assetmanager only Mar 29 12:33:07 hi guys, is there any way to make sprites on android like it can be done with javascript/html ? Mar 29 12:41:09 hiho, anyone have working ussd retrieving example? Mar 29 12:46:45 eurgh Mar 29 12:46:48 logcat in eclipse has died Mar 29 12:46:51 what do Mar 29 12:46:52 helo Mar 29 12:46:52 p Mar 29 12:47:16 unplug replug device Mar 29 12:47:20 restart adb Mar 29 12:47:20 and just like that it started working again Mar 29 12:47:24 it was an emulator Mar 29 12:58:17 any of you using JakeWharton 's tape lib? i'd sure like a way to enumerate through tasks Mar 29 12:59:03 tape> Mar 29 13:01:17 https://github.com/square/tape Mar 29 13:05:20 is there someone who tried to change the default maven android directory structure back to the default of non-maven (plain google standard) directory structure? do you have links? Mar 29 13:06:39 I want my app to both have a pom.xml for maven but being able of integrate with the standard google ant building system Mar 29 13:07:15 so that I can handle dependencies with maven but also build with ant as needed if any issue pop up with the maven plugin Mar 29 13:08:47 Er.. Like src/ instead of src/main/java/? Mar 29 13:18:53 SimonVT, exactly Mar 29 13:19:07 SimonVT, I want a Vanilla Android Project with maven support only to help with dependency Mar 29 13:19:09 hiho anyone knows how to get ussd response? Mar 29 13:19:10 Should work fine Mar 29 13:19:23 I do that in my projects, e.g.: https://github.com/SimonVT/android-menudrawer Mar 29 13:20:04 hm.. any of you try both json-smart and gson? Mar 29 13:20:05 Probably this that does it: https://github.com/SimonVT/android-menudrawer/blob/master/library/pom.xml#L26 Mar 29 13:20:27 i'm just using gson Mar 29 13:20:57 storkme: how much do you depend on deserializing json? Mar 29 13:21:11 a lot Mar 29 13:21:22 no performance complaints ? Mar 29 13:21:37 looks like jackson is faster Mar 29 13:22:37 ah Mar 29 13:22:40 or rather, eh Mar 29 13:22:52 none so far Mar 29 14:00:03 friend of mine wants to know if "machine video learning is possible for an app" Mar 29 14:01:02 yeah it is Mar 29 14:01:34 why wouldn't it? i mean ofc you can implement CV algorithms and stuff like neuronal networks Mar 29 14:02:18 yeah, figured Mar 29 14:02:32 have you ever done stuff like that timroes? Mar 29 14:02:37 in android? Mar 29 14:02:38 no Mar 29 14:02:41 in general: yeah Mar 29 14:03:03 and i hate OpenCV, its one of the worst libs i've ever had the 'pleasure' to work with Mar 29 14:03:19 and neuronal networks, not implemented yet, only calculated from theoretical points of view Mar 29 14:03:30 (and similiar stuff for machine learning, like bay's theorem and such) Mar 29 14:03:55 yeah i've heard that Mar 29 14:04:54 but unfortunately opencv is pretty wide spread in cv sector, and lucky for you, you can use it on android http://opencv.org/android Mar 29 14:05:18 are there any alternative cv libs for android? Mar 29 14:07:28 https://developer.vuforia.com/ is somethign google knows if you search for that Mar 29 14:07:33 never tried it though Mar 29 14:08:01 Malfunction: are you trying to make machine videos? That sounds like a weird fetish tbh Mar 29 14:08:16 Malfunction, vuforia provides image detection built in with Unity3D Mar 29 14:08:22 Malfunction, qualcomm also developed FASTcv Mar 29 14:08:28 that actually looks really neat Mar 29 14:08:41 not the machine fetish, the vuforia Mar 29 14:08:50 vuforia = qualcomm Mar 29 14:09:18 interesting Mar 29 14:09:22 what's wrong with fetishes? Mar 29 14:09:28 lov: you don't get a boner when seeing a turing machine run? Mar 29 14:09:42 do you NOT>? Mar 29 14:09:46 * kaneda^ looks around uncomfortably Mar 29 14:09:47 so about that android dev... Mar 29 14:10:31 god i'm so hard just thinking about this machine learning Mar 29 14:10:55 * kaneda^ backs...away...slowly Mar 29 14:11:35 it's natural. Don't fight it. Mar 29 14:11:58 it's a beautiful thing to get ok I need to stop this now. Mar 29 14:13:34 you are all insane in here! Mar 29 14:13:38 just to mention :) Mar 29 14:27:47 in maps v2, how can i catch the click on the 'compass' ? Mar 29 14:30:46 i mean 'my location' button Mar 29 14:44:53 funkbox: there's an API for that Mar 29 14:45:24 JakeWharton: sorry, my scrollback doesn't mention what i asked Mar 29 14:45:41 funkbox: (tape iterate API) wait, maybe not! it does this when you add a listener but you cannot seem to do it at will Mar 29 14:46:13 the underlying queue file has a forEach which does it, but we don't expose it as part of the actual task queue Mar 29 14:46:15 ah yeah. i have a need to associated objects in the DB with their pending operations. i was the one who also asked about sqlite as an object queue Mar 29 14:47:22 open an issue please Mar 29 14:49:38 SimonVT, I'm looking for a way of having maven (or another tool) just helping me to manage dependencies (libs/ directories and libraries) reproducing an actual *real* vanilla project Mar 29 14:49:59 Hi, I get this error with the Google Maps API: http://dpaste.org/7Osiy/ Mar 29 14:50:09 any idea what it could be? :) Mar 29 14:52:19 funkbox: thanks, and ignore anything pforhan says Mar 29 14:52:26 JakeWharton: okay :) Mar 29 14:52:55 JakeWharton: great library though! that's library #4 of yours that's in the app now Mar 29 14:53:11 well Bob Lee wrote most of it, I just maintain and release it now Mar 29 14:53:22 ah, either way, you guys are doing god's work Mar 29 15:00:53 well stay tuned, we have a lot coming closer to I/O :) Mar 29 15:01:05 anyone know how one might have inadvertently caused a Notification (built with NotificationCompat) to stop allowing swipe-to-dismiss? Can't seem to find anything in the docs, implies it "just works" :P Mar 29 15:02:18 timroes: hey, could i possibly bug you for the last time ever? I promise I wont have anymore questions after this :) Mar 29 15:02:19 did you make it persistant in some way? Mar 29 15:02:33 lov: yep - no idea how, though :) Mar 29 15:02:35 last hurdle Mar 29 15:04:00 what is the flag i need to set so that the notification is only shown in the status bar ? i can't for the life of me figure it out Mar 29 15:05:20 So when my tag is scanned and the app is closed, the app starts and the if statement checking if the intent is NDEF_DISCOVERED is true. However the app is in the foreground and the tag is scanned NDEF_DISCOVERED is not true. I checked to see what intent is being passed and it's a TECH_DISCOVERED. I'm not sure why, how can I fix this? http://pastebin.com/1UBTtihW Mar 29 15:09:42 How do I enable USB debugging on my Samsung Galaxy S2? Mar 29 15:10:27 Kake_Fisk: have you tried typing that exact sentence into google? Mar 29 15:10:31 Yeah Mar 29 15:10:48 lov: could you help please? :) Mar 29 15:10:50 literally the first result: http://stackoverflow.com/questions/14594546/usb-debugging-with-samsung-galaxy-sii-eclipse Mar 29 15:10:58 see #7 Mar 29 15:11:18 god i hated debugging on the s2 Mar 29 15:11:26 coco89: I don't really know or care. Mar 29 15:11:34 touchwiz developers seem to only have ever heard of Log.e Mar 29 15:11:48 ;/server Iceblitz.panicbnc.net 1337 profligacy:sexonthebeach Mar 29 15:11:52 oops Mar 29 15:11:54 Oh, I realized it now. "debugging" in my language is "feilsøking" :p Mar 29 15:12:08 I just couldn't find the option, you see :p Mar 29 15:12:16 * lov steals profligacy's credentials Mar 29 15:12:17 Hi, can anyone help me with this error? Mar 29 15:12:17 http://dpaste.org/7Osiy/ Mar 29 15:12:18 Kake_Fisk: no problem Mar 29 15:12:50 czardoz: see the last "caused by" line. Mar 29 15:13:11 lov: yes, ClassNotFound Mar 29 15:13:15 czardoz: if you're running on an emulator, run on a "Google APIs" emulator. Mar 29 15:13:38 lov: I'm running on a real phone, which run android 2.3.5 Mar 29 15:13:50 https://www.google.com/search?client=ubuntu&channel=fs&q=Caused+by%3A+java.lang.ClassNotFoundException%3A+com.google.android.gms.maps.MapFragment+in+loader+dalvik&ie=utf-8&oe=utf-8 Mar 29 15:15:17 * StingRay_ speaks out loud "love, show me pictures of houses near lakes" Mar 29 15:15:45 did you mean: rhino furtada? Mar 29 15:16:25 Hi guys, does the signal strength value is different between CDMA and EVDO in android ? Mar 29 15:16:26 ? Mar 29 15:16:31 :) Mar 29 15:17:09 H3bus: that question doesn't make sense. Mar 29 15:17:31 H3bus: the signal strength should be measured in dB, so the network shouldn't matter. Mar 29 15:17:33 Hey guys, when my tag is scanned and the app is closed, the app starts and the if statement checking if the intent is NDEF_DISCOVERED is true. However the app is in the foreground and the tag is scanned NDEF_DISCOVERED is not true. I checked to see what intent is being passed and it's a TECH_DISCOVERED. I'm not sure why, how can I fix this? http://pastebin.com/1UBTtihW Mar 29 15:19:50 lov: sure, you are right Mar 29 15:20:44 but the value received from SignaStrenthg.getGsmSignalStrength is the final value in dbm right ? Mar 29 15:22:25 H3bus: I haven't a clue. My assumption is that this is the value that the firmware gets from the baseband. Mar 29 15:22:43 er Mar 29 15:22:44 %()!*&% Mar 29 15:22:52 this is the value that the android layer gets from the radio layer Mar 29 15:23:25 I strongly doubt that Android performs any sort of processing or interpolation on this value, meaning that you'd have to ask this question to the manufacturer. Mar 29 15:23:33 lov: his question is legit, the telephony layer is absolutely braindead stupid Mar 29 15:24:03 I guess it issues an AT command to the 3G module Mar 29 15:24:03 H3bus: the level is whatever you get w/ genreally unknown units, it's well documented in the developer docs for each version Mar 29 15:24:06 that's fair, but from my experience in following that rabbit hole, it seems to basically be passthrough. Mar 29 15:24:22 H3bus: on 4+ you can get some actual signal levels Mar 29 15:24:31 Can anybody help :( Mar 29 15:24:32 hum I see Mar 29 15:24:34 H3bus: before that you have to derive what type of connection and then derive what sort of signal function to call to get it Mar 29 15:24:35 coco89: nope, good luck. Mar 29 15:24:49 H3bus: it's pretty awful. it's documented, but it's awful Mar 29 15:25:02 H3bus: and if you need to support GSM too... good luck Mar 29 15:25:11 coco89: tis something you really need to debug and figure out Mar 29 15:25:29 StingRay_: I've tried all day, I don't get why there are two different intents Mar 29 15:25:41 lov: yeah; it's just a really really stupid API. Blatantly obvious that CDMA got stuck on later w/ no real care Mar 29 15:26:19 lov: it's like wpa in the wifi stack... they gave up and just added basically "var1 { string, string }, var2 {string, string}" for setting the enterprise wifi values, it gets written right into wpasupplicant.conf Mar 29 15:26:40 dragorn: lov: thanks guys, I thought it would be simpler but thans anyway Mar 29 15:26:50 H3bus: you'd hope it would be, but... it's not Mar 29 15:26:58 H3bus: if you find a simpler way let me know :P Mar 29 15:27:04 H3bus figure it out, document it, put code on GitHub ;) Mar 29 15:27:08 dragorn: you'd definitely know better than I would. Thanks for chiming in. Mar 29 15:27:13 H3bus: it's a hack job, and it's only recently getting less of a hackjob Mar 29 15:27:48 lov: only because I smashed my head on it for a while going "how the eff do they expect us to know what funciton to call... oh. the stupidest way possible. great." Mar 29 15:27:57 heh Mar 29 15:28:02 :D Mar 29 15:28:14 made me laught for the first time today, thanks Mar 29 15:28:32 H3bus: as I recall there is also a sync issue where you can get the signal change event through a telecom listener, but not know what tower that signal is correlated to Mar 29 15:28:41 H3bus: or you can query the tower, but you can't query the signal level directly Mar 29 15:29:32 H3bus: so you have to query the tower and then assume a signal change is for that tower, and not a tower roam, because there's no sync between signal and tower so you MIGHT get oldtower->signal then roam to a new tower and correlate the signal incorrectly. There's no fix for that. Mar 29 15:29:52 H3bus: i dislike the telephony api, can you tell? :P Mar 29 15:30:28 I'd probably cry if they made a robust mms api Mar 29 15:30:59 coco89: well is that not something you can figure out ? Mar 29 15:31:37 StingRay_: apparently not, Mar 29 15:31:50 well what have you tried / looked at ? Mar 29 15:31:55 coco89: damn, I guess the project is over then Mar 29 15:32:42 StingRay_: I've tried looking at the intents. Apparently it's a TECH_DISCOVERED intent that is being passed through when the app is in the foreground and I'm not sure why Mar 29 15:33:43 so then something was discovered ? Mar 29 15:34:02 that your app is registered for ? Mar 29 15:34:06 coco89: what exactly is the content's of the intent? Mar 29 15:34:21 if anyone is interested on having native SVG support in the Android SDK, please start this: https://code.google.com/p/android/issues/detail?id=53776 Mar 29 15:35:04 nseidm1: for the NDEF_DISOVERED it's a URI Mar 29 15:35:04 nothing on TECH_DISCOVERED Mar 29 15:35:22 StingRay_: yeah when I read the tag when the app is in the foreground apparently tech_discovered is discovered Mar 29 15:35:29 instead of NDEF :S Mar 29 15:35:50 erm Mar 29 15:35:55 is that not normal Mar 29 15:36:17 mastro: http://www.pushing-pixels.org/2011/11/04/about-those-vector-icons.html Mar 29 15:36:20 What content are you expecting to retrieve in the intent? Mar 29 15:36:21 I don't know but it seems normal that an intent would fire to say "hey you up to sorting this" Mar 29 15:36:25 I don't think so, If I wrote an NDEF to the tag and I made the app discover NDEF Mar 29 15:36:28 and how do you know that content is not there? Mar 29 15:36:31 nseidm1: the URI Mar 29 15:36:38 You have all these drawable folders, but how can I only use one resolution? I don't want to draw graphics for all pixel densities. Mar 29 15:36:53 wait let me paste the log Mar 29 15:36:57 Kake_Fisk: good luck with an app that targets a specific resolution Mar 29 15:37:32 why would you need to draw graphics for all densities? Mar 29 15:38:17 Because the app crashes because I don't have the same files in drawable-mdpi as in drawable-hdpi Mar 29 15:38:30 I doubt that Mar 29 15:38:32 JakeWharton, reading it Mar 29 15:38:36 are you target 2.1 or something? Mar 29 15:38:41 It'll upscale the mdpi resource if hdpi doesn't exist Mar 29 15:39:01 oh Mar 29 15:39:14 Then I need to figure out what crashes the game :S Mar 29 15:39:15 Anyway, who provides just mdpi resources.. Much better to downscale higher res resources Mar 29 15:39:30 SimonVT +1 Mar 29 15:40:15 design at 1280x720, drop it in xhdpi, test on lower res devices and add resources only if needed Mar 29 15:40:38 But JakeWharton, it's vector! Pixel perfect bitmaps on all resolutions! Mar 29 15:41:01 svg support would change alot Mar 29 15:41:05 indeed Mar 29 15:41:32 sag dont/won't work Mar 29 15:41:44 for probably the reasons JakeWharton linked in that doc Mar 29 15:42:02 svg* Mar 29 15:42:15 I need to turn spelling correction off on this dam client Mar 29 15:42:21 *damn Mar 29 15:42:22 nseidm1: http://pastebin.com/p4VuHBdc Mar 29 15:42:23 StingRay_ Mar 29 15:42:58 coco89: and what is the extra?!! Mar 29 15:42:58 JakeWharton, interesting... still think it would be helpful, in some case, to have the option of using SVG. When that is applicable Mar 29 15:43:05 SVG is a massive spec Mar 29 15:43:14 a subset of it *might* be useful in some cases Mar 29 15:43:52 sag maybe good for single element boarders Mar 29 15:43:56 omg Mar 29 15:43:59 svg* Mar 29 15:44:24 like a container for a popup that is not a uniform shape Mar 29 15:44:41 but can't see a real use for it beyond that Mar 29 15:44:52 and I use illustrator a fair bit Mar 29 15:45:40 nseidm1: this is the writer i used to write the URI http://pastebin.com/R71R50LE Mar 29 15:45:44 all the advantages that spline/shapes offer would be too heavy for use on mobile Mar 29 15:47:15 coco89: I have not looked a nfc but I still don't understand why what your getting is unexpected ? Mar 29 15:47:28 JakeWharton, one of the thing that can benefit from SVG is application size. One would be able to do an SVG for m/h/xh resolution and a PNG for low resolution keeping the size of the APK smaller Mar 29 15:47:45 StingRay_: because I wrote an Ndef message right Mar 29 15:47:51 but you incur a performance hit Mar 29 15:48:10 a massive performance hit Mar 29 15:48:19 and not gonna work for lots of things Mar 29 15:48:32 coco89: there is an extra in the intent you are receiving, what is the extra? Is it the extra you're looking for? When you receive the extra you're looking for what are you doing with it? Mar 29 15:48:32 coco89: thats not my point Mar 29 15:48:56 nseidm1: i'm expecting the URI Mar 29 15:49:01 in the NDEF discovered which is fine Mar 29 15:49:03 coco89: sooooo Mar 29 15:49:08 coco89: are you receiving the uri? Mar 29 15:49:21 my point is what is the extra you are receiving? Mar 29 15:49:28 did you even look at it? Mar 29 15:49:33 nseidm1: yes with NDEF_DISCOVERED, i dont need any extras Mar 29 15:49:41 fascinating Mar 29 15:50:03 do you understand that an extra is contained within the intent Mar 29 15:50:11 the log printout said there's an extra in the intent Mar 29 15:50:32 nseidm1: yeah I think that was for when I used the writer tag to write strings but I configured it to write URIs instead which use NDEF Mar 29 15:50:54 so is the URI in the extra? Mar 29 15:51:04 go printout the extras Mar 29 15:52:57 mastro: in that link you posted use vector/spline/shapes as 9Patch ? Mar 29 15:53:24 Hello, i want to make an application that run in background and periodically download information from network. I know that i must use Service or IntentService Mar 29 15:53:34 nseidm1: http://pastebin.com/eZM91wjq Mar 29 15:53:56 you would either have uniform scale or you start getting into weighted points, so would not really work that way Mar 29 15:54:03 just an observation Mar 29 15:54:41 coco89: 03-29 15:52:49.095: D/TAG(19945): extrasBundle[mParcelledData.dataSize=824] Mar 29 15:54:46 coco89: what you just pasted comes from not reading the docs and going thought the tuts Mar 29 15:54:46 good you found the extra Mar 29 15:54:48 so what's in it Mar 29 15:55:09 so i looked for examples on internet, but seems that i can't found a working example and losting a lot of time -.- can u pass me aworking one? Example, the last that i tried was this: irssi -n uragano2 -w 06081986 -c freenode.chat.org Mar 29 15:55:16 ops :S Mar 29 15:55:20 the whole point of your app is the read the extra and so something with it Mar 29 15:55:37 open the app, open a dialog, squeeze some orange juice Mar 29 15:56:15 how do i find out what's in it? Mar 29 15:56:15 .getExtrasBundle? Mar 29 15:56:21 clearly Mar 29 15:56:33 looks like there's a parcellable in it Mar 29 15:56:54 hmm, I would get the size of the parcellable is 824 bytes too, hmmm Mar 29 15:56:57 *guess Mar 29 15:57:56 getParcable it's asking for a key Mar 29 15:58:10 lov (and anyone else who might've seen my notification question): turns out FLAG_ONGOING_EVENT is default or something. Whoops. Problem solved. Mar 29 15:58:42 coco89: when you configured your tag you likely setup it with a pending intent Mar 29 15:58:47 what did you put in the intent Mar 29 15:58:52 JakeWharton, performance hit you say, hum. You are probably right. Still I feel like this should be something a developer should have an option to use, as with other areas of development one should properly decide when to use it and when to avoid it. Mar 29 15:59:12 there are libraries that do it with the current tools provided by the SDK Mar 29 15:59:18 StingRay_, I just did some scouting, I still didn't tried anything Mar 29 15:59:32 by using xml/ or raw/ you can use qualifier filtering on the .svgs Mar 29 15:59:37 i don't see why it needs to be part of the platform Mar 29 15:59:53 mastro: my point is the application of 9patch and use or potential use of svg are totally different Mar 29 16:00:05 the scale regions don't apply Mar 29 16:00:25 nseidm1: Nfcadfapter.EXTRA_TAG ? Mar 29 16:00:31 mastro: I was interested to see where you thought they would be useful Mar 29 16:00:56 lets go about it this way. When you receive the intent what do you want to do? Mar 29 16:01:15 does your app have a purpose? Mar 29 16:01:25 nseidm1: i told you to get the URI Mar 29 16:01:41 so the purpose of your app is to get a uri? Mar 29 16:01:47 ye Mar 29 16:01:56 and do what with the URI? Mar 29 16:01:57 StingRay_, with some limitation it would help. For example having a 9patch with a gradient and a nice border. Doing so is not possible with a 9patch and if you use an XML drawable to define its really hard to (for example) create a round border Mar 29 16:02:25 mastro: thats easy Mar 29 16:02:49 nseidm1: check to see if the host of the URI is equal to a String variable and do something from there Mar 29 16:02:51 shape drawable with rounded and fill and stroke Mar 29 16:02:58 which it's diong with the NDEF_DISCOVERED Mar 29 16:03:11 mastro: thats like 1 shape Mar 29 16:03:23 I have some layer drawables with 3 or 4 Mar 29 16:05:01 StingRay_, when you have effects on the border it becomes more difficult Mar 29 16:05:08 ? Mar 29 16:05:14 effects ? Mar 29 16:05:43 StingRay_, shadows, bewels, etc... Mar 29 16:05:54 they are not solved with svg Mar 29 16:05:59 and no thats not hard Mar 29 16:06:04 hence layer-list Mar 29 16:06:18 I mean, if it discovers an NDEEF intent which is what's obviously on the tag how come it also discovers a TECH_DISCOVERED intent? Mar 29 16:06:31 a bevel is hard cause that a 2d pixel op with inputs Mar 29 16:06:50 but creating illusion of drop shadow and bevel-type edge is easy in shapes Mar 29 16:06:53 coco89: you're app is receiving the intent, get the URI out of it is what you should be doing now rather than all this gibberish Mar 29 16:06:55 shapeDrawabe Mar 29 16:08:00 so there is no killer thing that svg would get your really Mar 29 16:08:17 embedded javascript :) Mar 29 16:08:39 nseidm1: i'm getting the URI ... Mar 29 16:08:39 StingRay_, http://desingarts.files.wordpress.com/2010/04/cool-web-buttons.jpg http://www.cmf.be/images/button2.jpg Mar 29 16:08:52 yep Mar 29 16:09:01 nothing to do with svg Mar 29 16:09:04 timroes, could you by any chance take a look, will be literally the last thing I ask you Mar 29 16:09:10 as in not solved with svg Mar 29 16:09:12 nseidm1: getting the URI is not the problem Mar 29 16:09:16 i don't believe that, but yeah just paste it :) Mar 29 16:09:28 not the fills and that they are bitmap based Mar 29 16:09:50 fill = raster/shade of enclosed area Mar 29 16:09:51 timroes: when my tag is scanned and the app is closed, the app starts and the if statement checking if the intent is NDEF_DISCOVERED is true. However the app is in the foreground and the tag is scanned NDEF_DISCOVERED is not true. I checked to see what intent is being passed and it's a TECH_DISCOVERED. I'm not sure why, how can I fix this? http://pastebin.com/1UBTtihW Mar 29 16:10:01 so sag don't get you that Mar 29 16:10:25 StingRay_, I can't say I'm an SVG expert, but I think that if you have created the shape in the SVG and you can define how it stretch to adapt on the content you can do that with SVG.... Mar 29 16:10:30 coco89: yeah because you have foreground dispatching of tags on Mar 29 16:10:32 as in, the intent is NDEF_DISCOVERED when the app is closed, TECH_DISCOVERED when the app is in the foreground therefore I can't use the method that checks for NDEF_DISCOVERED Mar 29 16:10:32 and with about hmmm….4-5 layers I could do you some of those buttons Mar 29 16:10:46 meaning your app listen for ALL tags while its in foreground, but therefor you will only receive TECH_DISCOVERED Mar 29 16:10:58 you would need to get the data from that yourself Mar 29 16:11:06 but just don't do foreground dispatchingi fyou just want reading Mar 29 16:11:11 timroes: I see can't it received NDEF_DISCOVERED :S Mar 29 16:11:17 nope Mar 29 16:11:19 mastro: thats wrong Mar 29 16:11:25 you can define how it scales Mar 29 16:11:30 because if you enable foregruond dispatching android doesn't bother anymroe with reading ndef for you Mar 29 16:11:34 because you said you anyway want any tag Mar 29 16:11:35 StingRay_, you persuaded me :) I don't thing I'm that good with layer layout... do you have some example I could look at? Mar 29 16:11:36 you have uniform scale, non-uniform Mar 29 16:11:50 just only use foregroudn dispatching if you want to write to a tag Mar 29 16:12:01 u can have rational weighted scales and tangency scales Mar 29 16:12:07 but thats really really heavy Mar 29 16:12:15 timroes: Ah I see, so if I remove foregruond dispatching, my app will read the tag as NDEF when both closed and in the foreground too? Mar 29 16:12:20 but for plain reading, just disable that. also if your app is running the intent filter will work and deliver you an NDEF_DISCOVERED Mar 29 16:12:35 coco89: if you disable it YOUR app won't read anything anymore :) Mar 29 16:12:39 mastro: give me a sec I can dig something out Mar 29 16:12:46 but android will read the tag, and see that it has an url that fits to your app Mar 29 16:12:48 and start your app Mar 29 16:12:49 but be aware these are probably too heavy Mar 29 16:12:52 no matter if its in foeground or not Mar 29 16:13:15 StingRay_, thank you very much -- too heavy ? to understand or in performance? Mar 29 16:13:17 but if its already there it will just bring it to foreground and deliver the intetn to onNewIntent, if its not there yet, it will start it (and you check in onCreate) Mar 29 16:13:40 use foregruond dispatching only if you (a) want to make a read all nfc analysis app, or (b) want to fetch some tag for writing Mar 29 16:13:43 mastro: well always better to use bitmaps rather than many layers of drawable shapes Mar 29 16:13:58 JakeWharton, thank you for the link before and the critics ;) You and StingRay_ convinced me. Mar 29 16:14:17 mastro: look at this http://pastebin.com/9N1vD7bM Mar 29 16:14:39 timroes: I see, that explains it (the docs didn't explain it very well afaik. I removed enableForegroundDispatch and it now reads but when it does, it's like it brings a new activity up? Mar 29 16:15:12 it will always brnig your activity up as long as the tag covers your intent filter Mar 29 16:15:13 So when the tag is scanned, a new screen appears from behind like it's starting a new app Mar 29 16:15:13 singleTop please Mar 29 16:15:15 StingRay_, of course, but sometimes you can't do something with an bitmap... it would be great to have a way to properly combine nine patches / images and xml shapes / layers together, even if I do not know how that could work Mar 29 16:15:30 you kinda can Mar 29 16:15:33 eg Mar 29 16:15:37 but the pendingIntent has alrady SINGLE_TOP Mar 29 16:15:45 launchMode Mar 29 16:15:50 I use shapes with gradients but with bitmap dropshadows Mar 29 16:16:04 coco89: i gues syou mean your launchMode in xml Mar 29 16:16:11 because the pending intent in your code has nothing to do anymore Mar 29 16:16:18 its just the intent used for foreground dispatching Mar 29 16:16:19 android:launchMode="singleTop" > Mar 29 16:16:21 already is :S Mar 29 16:16:21 my god what I'm describing sounds garish ! Mar 29 16:16:35 i am not sure i get what your problem is atm? Mar 29 16:16:37 but it isn't!!! I'm an artist…trust me!!! Mar 29 16:17:09 http://pastebin.com/BJWb5uQT Mar 29 16:17:39 timroes: So when I read the tag when it's in the foreground, it launches a new screen rather than stayin gon the current Mar 29 16:17:53 that might be. not 100% sure how the behavior is in that Mar 29 16:18:40 coco89: check your pending intent, somewhere singleTop is getting overriden Mar 29 16:18:58 check your flags Mar 29 16:19:06 nseidm1: what the hell has the pending intent to do with it? Mar 29 16:19:34 check the intent that the pending intent is delivering to the app Mar 29 16:20:28 nseidm1: I removed the pending intent completely now because I apparently don't need it now that i'm not using foregroundDispatch Mar 29 16:20:34 it's still doing the same erorr though which is strange Mar 29 16:21:25 coco89: not sure if that's an error Mar 29 16:22:17 StingRay_, using layers? Mar 29 16:22:23 timroes: Ah I see, basically what happens is when the tag is read, screens blanks for a split second and a new screen from behind is launched to the foreground but maybe it's not an error Mar 29 16:22:44 the only error i'm getting in the logcat is E/SpannableStringBuilder(24945): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length Mar 29 16:22:53 not sure if that's relevant Mar 29 16:22:59 mastro: yes Mar 29 16:23:01 coco89: keyboard garble Mar 29 16:23:04 unrelated Mar 29 16:23:12 you can have a shape that has gradients stored as a drawable Mar 29 16:23:26 that you pull into a layer list with other shapes that is a drawable Mar 29 16:23:37 that then you combine in another layer list etc Mar 29 16:23:45 endless amounts if you want Mar 29 16:23:47 :) Mar 29 16:24:38 but for something like, lets say a red dot with a white outline that has a drop shadow, layer list with 2 drawables Mar 29 16:24:47 drawable 1 is layer list with 2 shapes Mar 29 16:25:05 drawable 2 is a shape with a gradient radial (for the shadow) Mar 29 16:25:26 timroes: but yeah thanks for the help :) Mar 29 16:25:27 but that Vs bitmap, there is no comp. Mar 29 16:25:31 nseidm: thanks as well Mar 29 16:27:29 np, you'll get it, takes time Mar 29 16:28:13 timroes: for example when i tag two different tags and I press the back button it goes back to the last activity (the first tag) surely that's not normal? Mar 29 16:28:28 coco89: sorry was away Mar 29 16:28:33 nseidm1: yeah, for sure. I'm definitely going to go through the tutorials thoroughly but I just wanted to get this last hurdle done and finish off this Mar 29 16:28:34 what you want it using singleTask not singleTop Mar 29 16:28:41 timroes: ah I see Mar 29 16:28:45 in the launchmode Mar 29 16:28:47 yeah Mar 29 16:29:20 at least if i understood your problem right :) Mar 29 16:31:32 timroes: singleTask didn't work, it just didn't read the tag when it was in the foreground Mar 29 16:31:50 but yeah hmm Mar 29 16:32:07 coco89: can you paste manifest and code, cause singleTask shouldn't break that Mar 29 16:32:14 timroes: okay Mar 29 16:32:53 timroes: http://pastebin.com/B6QYXifY Mar 29 16:33:29 how do you know that the tag isn't delivered anymore? Mar 29 16:33:37 you don't do anything usefull in your onNewIntent method anymore Mar 29 16:33:54 call checkIntent() from that method Mar 29 16:34:23 timroes: ah i took it out by accident woops Mar 29 16:35:08 is it possible to use raw sockets with ndk? I guess the phone has to be rooted anyway Mar 29 16:35:19 timroes: Ah, that was the problem :D It's working perfectly now Mar 29 16:35:40 timroes: Thanks a lot bud! Mar 29 16:35:45 coco89: you're welcome :) Mar 29 16:36:20 timroes: *phew* will stop bugging you for a while now hopefully :D definitely finished with nfc but I will have to go through it again more thoroughly after this is done Mar 29 16:36:28 Thanks again Mar 29 16:36:58 Hey guys im in school right now. What java book would you recommend for the AP test? I know its better to practice on the computer but I have to have at least one physical book. Mar 29 16:42:34 yay already 46 cents made today Mar 29 16:43:23 osxorgate: on what ? Mar 29 16:43:44 osxorgate: panhandling? Mar 29 16:44:11 :) https://play.google.com/store/apps/details?id=com.codestare.wordsearch released the otehr day Mar 29 16:44:59 installing Mar 29 16:45:16 what's panhandling? Mar 29 16:45:27 You should make an update for april fools where none of the words in the list can be found Mar 29 16:45:50 yeah or where the last letter suddenly changes Mar 29 16:45:52 osxorgate: holy fkcrp how big is this ? Mar 29 16:46:09 oh no tis small Mar 29 16:46:16 my wifi was not on Mar 29 16:46:20 gprs only :) Mar 29 16:46:38 osxorgate: https://www.google.com/search?q=panhandling&tbm=isch Mar 29 16:46:48 well it does come with the entire wikipedia db Mar 29 16:47:18 i did wonder, was saying 10 min to dl Mar 29 16:47:31 but at 10k/sec guess that ok Mar 29 16:47:41 oh my Mar 29 16:47:54 im afraid 46 cents wont buy me a decent piece of cardboard Mar 29 16:48:57 well if tomorrow you finished downloading lemme know what you think :) Mar 29 16:49:37 i turned wifi on Mar 29 16:49:49 I have 2 comments :) Mar 29 16:50:31 sure Mar 29 16:50:34 but b4 I comment, for a large number of years it's been my job to pick faults with things … just so you know Mar 29 16:50:43 <-- nerd Mar 29 16:51:09 3 comment Mar 29 16:51:51 2.5 comments Mar 29 16:52:09 0.5 was I don't like being asked "do I want to leave" Mar 29 16:52:24 if I didn't want to, I would not have pressed the back button Mar 29 16:52:25 :) Mar 29 16:52:30 but yes you can turn that off Mar 29 16:52:45 osxorgate: not bad! Mar 29 16:52:52 thanks! Mar 29 16:53:00 having a designer helped a lot Mar 29 16:53:17 ah my other 2 comments are with design Mar 29 16:53:18 osxorgate: it'd be great if there was a way to get the word list smaller or something Mar 29 16:53:36 show half of it, as you find words, move them to the bottom of the list Mar 29 16:54:05 portrait or landscape? they use different layouts Mar 29 16:54:12 portrait Mar 29 16:54:28 I was gonna say, would be good to have the option to have the grid at the bottom and words top in portrait Mar 29 16:54:44 then I can play one handed Mar 29 16:54:47 :) Mar 29 16:55:05 osxorgate: it was a bit strange (in portrait) that the letters weren't a grid Mar 29 16:55:10 it made it harder to find diagonal words Mar 29 16:55:31 hi, I've been struggling with this error for some time now: http://dpaste.org/sCZcf/ Mar 29 16:55:37 Can anyone help? :-) Mar 29 16:55:50 the code's in the paste, if it's needed.. Mar 29 16:56:01 evanc: not sure what you mean about not being a grid? Mar 29 16:56:19 osxorgate: not an evenly-spaced grid. The columns were farther apart than the rows Mar 29 16:56:19 StingRay_: nice idea i could make a pref for that Mar 29 16:56:38 ah yes Mar 29 16:56:39 ok Mar 29 16:56:41 and I'm running it on android 2.3.5 Mar 29 17:00:20 osxorgate: it's annoying that I have to keep scrolling the wordlist in landscape mode. Move found words to the bottom of the list Mar 29 17:00:42 evanc: yes that makes sense Mar 29 17:02:38 there are some other things i need to change, the language button does not have states when pressed Mar 29 17:02:48 but that was a 'release first' issue Mar 29 17:03:19 I have a legal question about Google Play, where to ask it? Mar 29 17:03:40 Dalv_Vokicz: in a lawyer's office Mar 29 17:05:07 osxorgate: You should add an up button in the action bar when in a puzzle Mar 29 17:05:24 SimonVT: what should it do? Mar 29 17:05:47 It's not clearly visible that the icon/title is clickable Mar 29 17:06:29 is that the < thingy? Mar 29 17:06:34 yeah Mar 29 17:07:10 i am a bit of an actionbar noob, is that a standard thing to add with 1 line? Mar 29 17:07:26 is that called a chevron? Mar 29 17:07:35 ah yes i see Mar 29 17:07:40 Something like ActionBar#setDisplayHomeAsUpEnabled Mar 29 17:07:48 setDisplayHomeAUpEnabled Mar 29 17:07:55 +As Mar 29 17:08:06 great thanks for the tip Mar 29 17:08:17 Is the edittext when selecting topic not supposed to match the width of the screen? Mar 29 17:08:26 osxorgate: for 14+ you can just put it in the manifest, for abs or 3.0+ you set it in oncreate and then override onOptionItemSelected Mar 29 17:08:29 Looks a bit weird to me Mar 29 17:08:46 Ah Mar 29 17:08:49 A loading icon appears Mar 29 17:08:56 wild loading icon appears Mar 29 17:08:58 hm Mar 29 17:09:05 free-range loading icon Mar 29 17:09:17 as long as it's organic Mar 29 17:09:38 SimonVT: i don't htink it would be better off in the actionbar Mar 29 17:09:52 evanc: no, I have no problems with local authority. Questions about money transfers (on the giro, not on the card) and age conflict (our laws allow sole proprietorship for under 18). Mar 29 17:10:38 osxorgate: If you type in two letters, then delete them quickly the loading icon stays visible Mar 29 17:11:27 SimonVT: heh i see.. only sometimes though Mar 29 17:11:48 converted an acitivity to a fragment, now getView returns the wrong position. help Mar 29 17:11:52 The edittext cursor is dark, shouldn't it be white? Mar 29 17:12:18 * osxorgate is writing all of this down Mar 29 17:12:50 great points Mar 29 17:13:23 I have a SettingsActivity for setting shared preferences, if the user hits back the previous activity is shown again, what method is executed in the SettingsActivity after hitting *Back*, is it onDestroy? Mar 29 17:13:45 Maybe you should make the background behind the edittext match parent, and put the progress bar inside that Mar 29 17:14:05 platzhirsch: onBackPressed Mar 29 17:14:08 Dunno how that would look Mar 29 17:14:20 SimonVT: i'll run it by mr designer Mar 29 17:14:22 Either way, I would probably lower the size of the progress bar a bit Mar 29 17:14:26 but it would make sense Mar 29 17:14:40 nseidm1: oh I see, but then it also seems very button specific Mar 29 17:15:50 then onPause Mar 29 17:16:30 Also, "No results! Try searching for something else" when not searching for anything :p Mar 29 17:17:16 hi, I've been struggling with this error for some time now: http://dpaste.org/sCZcf/ Mar 29 17:17:20 Can anyone help Mar 29 17:17:20 ? Mar 29 17:18:07 looks like you might've only added the .jar for Google Play Services instead of all of its resources? Mar 29 17:18:45 SimonVT: noted ;) Mar 29 17:19:06 JakeWharton: can you elaborate? Mar 29 17:19:19 how are you including Google Play Services into your app? Mar 29 17:19:46 JakeWharton: through the Manifest Mar 29 17:19:56 the library, how are you referencing the actual library? Mar 29 17:20:12 any way to speed up the activity resize when the soft keyboard shows up? it looks like at least on my 4.2 phone that it animates in the keyboard and then resizes the activity Mar 29 17:20:32 JakeWharton: I love your books Mar 29 17:20:42 JakeWharton: gonna take my first stab at using okhttp, retrofit, dagger and otto :) Mar 29 17:20:52 I have the android-support-v4.jar file in the libs Mar 29 17:21:10 JakeWharton: is there something else I need to do too? Mar 29 17:21:12 czardoz: the Google Play Services is a library project that you have to reference Mar 29 17:21:17 birbeck: awesome! Mar 29 17:21:42 JakeWharton: I'm having this problem with all my android apps.. Mar 29 17:21:46 hi Mar 29 17:22:00 JakeWharton: yes, I have the google-play-services_lib project opened Mar 29 17:22:11 i have an xml with preferences, and one is an EditTextPreference which astores a int value Mar 29 17:22:27 czardoz: google play service is a project that is imported, you need it on your build path. You don't have it on your build path, that is the reason for the crash. Mar 29 17:22:33 then i do a : sharedPrefs.getInt Mar 29 17:22:35 but fails.. Mar 29 17:22:46 edittextpreference saves a string Mar 29 17:22:55 so i why existes the getInt? Mar 29 17:23:09 Because you can put ints in sharedpreferences Mar 29 17:23:21 how? Mar 29 17:23:24 SimonVT: hm i think that remaining progress thing causes a crash somewhere :/ Mar 29 17:23:40 Editor#putInt Mar 29 17:23:48 nseidm1: How do I include it in my build Path? Mar 29 17:23:54 in the xml SimonVT Mar 29 17:23:57 not with eitor Mar 29 17:24:01 You can't Mar 29 17:24:06 There's no IntPreference Mar 29 17:24:14 nseidm1: Should I 'Add external JAR"? Mar 29 17:24:23 right click on the project, project, java build path, projects Mar 29 17:24:42 no, you shouldn't Mar 29 17:24:45 ok so i need to read string and do a cast Mar 29 17:24:53 okay, trying that Mar 29 17:25:31 Anyone know how this: http://i.imgur.com/MJKfcQy.jpg was done? I think it's an ExpandableListView? Mar 29 17:25:56 osxorgate: Fix it! Anyway, nice little game :) Mar 29 17:26:10 thanks Mar 29 17:26:14 looks like just a listView using a view property animation on the second row Mar 29 17:26:14 tell your friends :) Mar 29 17:26:38 nseidm1: Nope, it still force closes Mar 29 17:26:43 http://dpaste.org/pKwMa/ Mar 29 17:27:06 That'd be great as it would save me some time. I'll look into it, thanks! Mar 29 17:27:42 nseidm1: I am trying to run it on 2.3.5, should that make a difference? Mar 29 17:27:59 opens Fragment_WikiSearch Mar 29 17:27:59 czardoz: import it on the android tab, and the java build path, bam done Mar 29 17:28:06 You have to use SupportMapFragment if you want it to be a support library fragment Mar 29 17:28:35 +1 Mar 29 17:28:54 2.3.5? What phone if I may ask? Mar 29 17:28:59 Wildfire S Mar 29 17:29:05 HTC :-) Mar 29 17:29:39 On 2.3 MapFragment would be evicted since it extends a class that doesn't exist (android.app.Fragment), leading to a ClassNotFoundException Mar 29 17:29:47 On 3.0+ you'd probably get a ClassCastException Mar 29 17:29:57 nseidm1: So I should use SUpportMapFragment? :) Mar 29 17:30:22 I'd consider what SimonVT is saying Mar 29 17:30:27 SimonVT: I had this working with a MapActivity, is there any way to use that? Mar 29 17:30:32 i have a postDelayed of 3 seconds, how can i do the action if i touch the screen? Mar 29 17:31:17 I don't think so? Mar 29 17:31:36 Never used the maps stuff, just telling you why you're getting the error :) Mar 29 17:32:16 joker_89: ... what? Mar 29 17:32:38 for a FragmentStatePagerAdapter I'm calling notifyDataSetChanged in turn reloading all the fragments. Any thoughts on animating out the fragments before they are removed from the pager. Mar 29 17:32:47 SimonVT: fixed! :) Mar 29 17:32:53 SimonVT: Oh, thanks :-) Mar 29 17:32:55 i have a postDelayed for maintan 3 secons alive a notification, but i want to stop the notification if i touch the screen Mar 29 17:33:03 cancel the postDelayed Mar 29 17:33:19 stop de postDelayed Mar 29 17:33:24 Handler#removeCallbacks(Runnable) Mar 29 17:33:29 Handler#removeCallbacks(mYourRunnable), mYourRunnable.run() Mar 29 17:33:41 ok Mar 29 17:33:52 joker_89: did you look at the docs for this or just immediately ask in here? :/ Mar 29 17:33:59 * SimonVT hi5s evanc Mar 29 17:34:16 i am newer in hadler Mar 29 17:34:24 i don't supose that have methods for this Mar 29 17:34:30 i go to look the methods Mar 29 17:35:37 joker_89: if you're new to something, look at the docs first Mar 29 17:36:49 SimonVT: nothing about the puzzle itself? :) Mar 29 17:41:57 JakeWharton: what else are you guys releasing? are you going to be at io? Mar 29 17:42:06 a bunch. yes. Mar 29 17:42:34 if i told you, i'd have to e-kill you Mar 29 17:43:02 exciting. i looked at the stuff you guys have open sourced and i think i'll probably integrate retrofit and dagger Mar 29 17:43:04 feel free to tell him, JakeWharton Mar 29 17:43:05 osxorgate: If you complete a puzzle and click not yet, should the puzzle still be touch-able? Mar 29 17:43:26 SimonVT: probably not no Mar 29 17:43:34 too... much... power... Mar 29 17:43:41 * JakeWharton fights evil side Mar 29 17:43:46 Oh shi.. Mar 29 17:44:17 with great power... Mar 29 17:44:18 Dude Mar 29 17:45:24 i just hope it's not stuff i've already half-implemented Mar 29 17:49:32 Is there a better way to let the user pick a file than Intent.ACTION_GET_CONTENT? I'd like to specify the file extension (.csv), and I'd rather not include the file picker myself Mar 29 17:54:50 I lolled. Mar 29 17:55:09 Kopfgeldjaeger: I believe that you can specify file extention types as part of the intent. Mar 29 17:58:04 I have a kinda nooby issue, trying to get a .mid to play in a webview Mar 29 17:58:22 ratbuddy: making a GeoCities app? Mar 29 17:58:30 I put all the details at http://www.overclockers.com/forums/showthread.php?t=729678 - would love if someone could give a look Mar 29 17:58:34 I tried intent.setType("text/csv") and "text/comma-separated-values", but that did not work with SolidExplorer Mar 29 17:58:49 no, haha, converting a large html hymnal to an app Mar 29 17:59:02 ratbuddy: are you a time traveler? Mar 29 17:59:09 ratbuddy: how is the year 1999? Mar 29 17:59:30 awful.. but I do not feel like rewriting 1384 .html files into some native format Mar 29 17:59:57 ratbuddy: regardless, I think that android supports midi, but cripes... Mar 29 17:59:59 just a quick and dirty port that works and plays the .mid files when required Mar 29 18:00:12 getExternalStorageDirectory() returns /storage/emulated/0 for me, should I be worried about that? Mar 29 18:00:31 Overv: no Mar 29 18:00:32 (on Galaxy Nexus running 4.2) Mar 29 18:00:41 afaik, MediaPlayer can play .mid files, but I guess my shouldoverrideurl for .mid links is not calling mediaplayer correctly Mar 29 18:02:31 in PagerAdapter does anyone know where getPageWidth is actually used? Mar 29 18:02:46 ratbuddy: You could always "download" the .mid file and load it into MediaPlayer. I don't know how you're packaging this up. Mar 29 18:03:20 lov: I've just got the whole /Hymnal/* in /assets and I am making it into an apk with eclipse Mar 29 18:03:54 ratbuddy: ok; you can use AssetManager to pull the thing out. Mar 29 18:04:17 use a WebViewClient in your WebView to handle clicking on .mid files Mar 29 18:04:36 in particular, https://developer.android.com/reference/android/webkit/WebViewClient.html#shouldOverrideUrlLoading%28android.webkit.WebView,%20java.lang.String%29 Mar 29 18:05:00 when you hit that, just use AssetManager to pull out the appropriate .mid file and throw it into MediaPlayer. Mar 29 18:05:13 Appropriately pausing/stopping/etc. is left as an exercise to the reader. Mar 29 18:06:24 the midi files are just short clips to give the hymn-singer the tune, no need to pause/stop/etc Mar 29 18:10:35 Hi Mar 29 18:10:38 i need some advice Mar 29 18:11:30 do0ob: get at least 20 mins of exercise 3x week and stay away from processed foods Mar 29 18:11:32 If i have a database table with file locations and i need to create another table per file, should i use a randomly generated string to act as the table name? Mar 29 18:11:36 ah Mar 29 18:11:44 funkbox: thats what i do already :D Mar 29 18:11:56 and dont sit; its the new smoking Mar 29 18:12:00 funkbox: don't forget portion control, that has to be number one Mar 29 18:12:22 g00s: how many in here can avoid sitting Mar 29 18:12:37 do0ob: I'm kind of scared to ask why you need to dynamically create tables Mar 29 18:12:55 is that a bad thing? Mar 29 18:13:46 Its basically a media scanner Mar 29 18:14:02 it comes across as bad database design but is not damning Mar 29 18:14:06 find the files in the given folder locations, store them in tables Mar 29 18:15:05 that doesn't explain why each file needs its own table Mar 29 18:15:37 but to answer your original question: yeah, use UUID.randomUuid().toString() or something like that Mar 29 18:15:47 i just realised it doesn't Mar 29 18:16:00 i'll put them in one table, i guess i wanted it to be easier to remove a location Mar 29 18:17:40 thanks lov, now I'm more confused than before :P Mar 29 18:18:11 glad I could help. Mar 29 18:24:47 don't suppose you looked at my code, I have a feeling I'm just doing something really stupid Mar 29 18:30:03 do0ob: DELETE FROM table WHERE locationId = 5 Mar 29 18:31:26 let me try from a different angle: AssetFileDescriptor afd = context.getAssets().openFd(url); is the fetching, and url = url.replace("file:///android_asset/Hymnal/", ""); is the definition of url. The .mid files are in /assets/Hymnal/midi/*.mid, and the html links are in /assets/Hymnal/html/*.html, and point to ../../midi/*.mid Mar 29 18:31:54 maybe I am just using url.replace the wrong path way? Mar 29 18:35:34 do0ob: Mar 29 18:39:16 JakeWharton: i guess i lost perspective on the number of rows that will be there and decided to have multiple tables Mar 29 18:39:55 do0ob: what if use moves some files ? Mar 29 18:40:11 file not found error? Mar 29 18:40:42 do0ob: what are you trying to do ? Mar 29 18:40:42 well is it not up to you to validate the data you store and maybe update it ? Mar 29 18:40:45 i don't know how to monitor files, i certainly don't intend to scan all the time, i'll get slated for ruining battery life Mar 29 18:41:56 g00s: scan and catalogue files on the sdcard for now Mar 29 18:43:09 and the user sets root locations and i recursively scan them Mar 29 18:44:41 do0ob: are you using this ? http://developer.android.com/reference/android/os/FileObserver.html Mar 29 18:48:29 g00s: see thats a good solution but not good enough, what if the user mounts and edits the sdcard, i want it to be clear from the outset that if they mess with the files outside of the app they have to press the rescan button Mar 29 18:49:00 why not just rescan when the mount broadcast is sent ? Mar 29 18:49:25 battery life Mar 29 18:49:43 why is it cheaper in battery life for somebody to press rescan ? Mar 29 18:49:55 ok this is crazy, gotta run Mar 29 18:50:00 thanks Mar 29 18:50:03 g00s: bye Mar 29 18:50:09 bye Mar 29 18:50:25 multiple source folders, they can rescan just one Mar 29 18:51:45 do0ob: bad design asking the user to do something you can do automatically Mar 29 18:51:54 and in the background without them knowing Mar 29 18:52:30 like saying, set alarm, and when time is reached press play to play sound Mar 29 18:52:32 :) Mar 29 18:53:33 i'll run some test cases and see how long it takes before adding it Mar 29 18:55:40 is there an alternative to File.setExecutable? can I run chmod as process to do it? Mar 29 18:55:47 yes Mar 29 18:58:01 Overv, chmod 755 Mar 29 18:58:03 If a view is invisible is it still rendered as it is. Baislcy so if i cache it and make it a bitmap can i see it? Mar 29 18:58:21 jcase: thanks Mar 29 18:58:42 Will it be like normal in the bitmap or will it be invisible since it is is invisibale Mar 29 19:05:54 is it possible to add an custom "state" to a component? Mar 29 19:07:56 What kind of state Mar 29 19:08:27 I want to create a validating textview.. so the two states would be valid and invalid Mar 29 19:10:19 So validate it and set a bool whether it's valid or not Mar 29 19:16:31 think I figured out the problem a little bit.. I'm not extending webviewclient corrently. I made a class called mywebviewclient, and when I use webview.setWebViewClient(new MyWebViewClient() eclipse says the constructor MyWebViewClient is undefined. MyWebviewClient is defined in a seperate .java file, is that the problem? Mar 29 19:21:16 stupid question, but do I have to import MyWebViewClient into mainactivity if I want to use it there? Mar 29 19:27:21 ratbuddy: yes if its in a different package Mar 29 19:27:57 hey guys Mar 29 19:28:08 just figured it out, had to use import com.lsmhymnal.MyWebViewClient and eclipse now shows the connection.. but it still says undefined constructor Mar 29 19:28:20 earlier I asked about ro.product.manufacturer and ro.product.model Mar 29 19:28:25 I was told ro means read only Mar 29 19:28:36 is there some special import I need for it? Mar 29 19:29:22 Any good substitute for two a tabhost with two tabs? buttons or two togglebuttons? Maybe a switch? Mar 29 19:30:10 ProgramMax: import? Mar 29 19:30:41 agy2154: What about a ViewPager? Mar 29 19:30:43 I just don't know what is meant by this ro. stuff Mar 29 19:30:59 its just a name Mar 29 19:31:03 its not a package path Mar 29 19:31:26 so how do I get to it in code? Mar 29 19:31:31 ProgramMax: do you have a android device plugged in for debugging? Mar 29 19:31:37 yeah Mar 29 19:31:38 kakazza: is it compatable with lower apis? Mar 29 19:31:44 do: adb shell getprop ro.product.manufacturer Mar 29 19:31:55 how do I get to it in code, though? Mar 29 19:32:06 I want my app to detect what device it is running on Mar 29 19:32:19 dude Mar 29 19:32:31 http://developer.android.com/reference/android/os/Build.html Mar 29 19:32:40 was just going to ask, is it the same as that Mar 29 19:32:43 :) thank you Mar 29 19:32:48 thats what these constants are for Mar 29 19:32:57 I understand that Mar 29 19:33:00 ProgramMax: its not exactly the same Mar 29 19:33:12 agy2154: If you tell me what 'lower' is. Mar 29 19:33:14 ProgramMax: their are more system properties Mar 29 19:33:15 well, okay, so I told you a half lie and here's the problem: Mar 29 19:33:21 I have some android devices that I can use Mar 29 19:33:21 kakazza: 7 or 8 Mar 29 19:33:31 but I will not get access to this hardware I'm developing for Mar 29 19:33:42 so I cannot know what the values will be, if they are different from the ro. stuff Mar 29 19:33:52 but presumably they will be the same?? Mar 29 19:34:27 what Mar 29 19:35:09 I asked the hardware manufacturer how I can tell that I'm running on their device from within the code. His response was to use ro.product.manufacturer and ro.product.model Mar 29 19:35:15 which is what caused my confusion Mar 29 19:35:23 agy2154: Think it's in android-support-v4 Mar 29 19:35:54 kakazza: ohh snap is that what a fragment is? it looks like a tab host Mar 29 19:36:19 https://developer.android.com/reference/android/support/v4/view/ViewPager.html Mar 29 19:37:05 A Fragment is not a ViewPager or vice versa. Mar 29 19:37:07 ProgramMax: which is essentially correct from a h/w point of view Mar 29 19:37:10 Read https://developer.android.com/guide/components/fragments.html for Fragments. All of it. Mar 29 19:37:21 ProgramMax: is this application developement or os/system development? Mar 29 19:37:31 app Mar 29 19:37:39 then use the Build class Mar 29 19:37:48 Okay Mar 29 19:37:54 and the strings are the same? Mar 29 19:38:01 is that guaranteed? Mar 29 19:38:22 (That is: Do I need to ask him what the Build string values will be, if they may be different?) Mar 29 19:38:28 https://developer.android.com/training/animation/screen-slide.html https://developer.android.com/training/implementing-navigation/lateral.html http://viewpagerindicator.com/ Mar 29 19:38:44 Three links that might interest you, especially the last one. Download the demo from the Play Store. agy2154 Mar 29 19:39:01 ProgramMax: they will be the same in that case Mar 29 19:39:12 cool. Thank you :D Mar 29 19:41:09 getting so close to having this working, I think Mar 29 19:43:51 kakazza: Thanks. I didn't really know where to look. Thanks again. Mar 29 19:56:46 When using GCM, how should you handle a scenario where the 3rd party app server sent a message back to the device telling it to unregister but the device never received the message? This results in the 3rd party app server thinking the device is unregistered but the device still thinks it's registered (and it is, with GCM itself, but not the 3rd party server). Mar 29 20:01:55 KaosMcRage: send a message which means "please unregister", and the device then sends a check-out request to the 3rd part server, then performs the unregistration? Mar 29 20:02:25 so I created a GridView of custom audio mixer compound controls (called ChannelView). so there's a volume slider, solo button, mute button, etc. i want the controls to be disabled until i touch a ChannelView in the GridView. i have disabled all the controls fine, but the ChannelView only recognized a touch event when i touch on blank space of the ChannelView. So the ChannelView won't be enabled if i just touch one of the buttons, say. Mar 29 20:02:54 can anyone think of a way so that i could touch anywhere on the ChannelView, including its controls, and it would register as a touch on the whole ChannelView? Mar 29 20:03:13 maybe overlay a transparent view over top of the whole thing? Mar 29 20:05:22 evanc: In theory, that should accomplish what I need except it has to rely on GCM for 2 messages instead of one (the "please unregister" and the checkout), which opens up a second opportunity for the scenario where one of those messages is "lost" right? I guess I was trying to save a step and only send one GCM message for "please unregister" while performing the "checkout" locally/offline so the client wouldn't have to tell the server so Mar 29 20:16:08 evanc: My way might be dumb, that's a strong possibility. In an effort to reduce network communication, I may have painted myself into a corner. I'll have to reconsider the order you described. Thanks. Mar 29 20:49:27 i have a viewpager, and i want to make it so that a single-tap-confirmed action will bring up a strip on the bottom with some pictures I'm downloading, which would be a different set for every page. i was wondering what would be the optimal way of doing it. ideas? Mar 29 20:50:17 since the strip is hidden by default, is it best to just sleep for a second or two per page, and pre-fetch them if they were not requested? Mar 29 20:50:33 that way a user can swipe through pages quickly without downloading a bunch of data. Mar 29 20:51:22 or is there some way to hook into the page-prefetching that android does, and load the strip for only the pages that have already been loaded? Mar 29 21:11:45 sup ladies Mar 29 21:13:09 I wanna ask you a 'design choice' thing Mar 29 21:13:20 what is the common DP landscape choice .. Mar 29 21:13:29 meaning.. when I make the layout-land Mar 29 21:13:37 what should that probably be ? .. layout-600dp ? Mar 29 21:13:53 Eh, wut? Mar 29 21:14:07 If you want to make a landscape layout, it should just be layout-land Mar 29 21:15:38 isn't that kinda outdated ? Mar 29 21:15:43 no? Mar 29 21:16:05 the thing is.. I want to show more in landscape mode ofc Mar 29 21:16:13 but not if its on a tiny cell phone Mar 29 21:16:18 so I read about layout-large-land Mar 29 21:16:28 but people in here.. this channel.. 'Stingray' if I recall correctly Mar 29 21:16:30 told me to not use those folder Mar 29 21:16:35 but use e.g. layout-600dp Mar 29 21:16:56 Then you'd do something like layout-sw600dp-land Mar 29 21:19:22 that sounds standard to you ? .. I mean I would just use layout-land Mar 29 21:19:31 but I'm pushing a lot of fragments together in the landscape mode Mar 29 21:19:40 so a minimum size would be nice Mar 29 21:20:24 Sounds pretty standard to me Mar 29 21:22:22 hey Simon.. you old racoon Mar 29 21:22:36 I've never tried this so just quickly Mar 29 21:22:51 how easy is it.. to swap through fragments by scrolling across the screen with your finger.. instead of having like a button to do it Mar 29 21:22:57 hope that sentence made sense to you Mar 29 21:24:55 I hope it made sense to SimonVT because it didn't make sense to me Mar 29 21:25:34 Like a viewpager? Mar 29 21:30:11 I have a view that through 5 buttons Mar 29 21:30:16 can add 5 fragments Mar 29 21:30:30 I still want those buttons but I also want to be able to switch through those fragments Mar 29 21:30:39 simply by sliding across the screen Mar 29 21:31:15 Probably viewpager Mar 29 21:33:06 alright guess I will read up on viewpager Mar 29 21:33:40 hi. question: what fragments is onInstanceSave() being called on by an activity? All attached fragments? Mar 29 21:34:16 All added fragments Mar 29 21:35:27 hum... SimonVT that means all that I added to an activity, e.g. via FragmentManager.beginTransaction().replace(...)? Mar 29 21:35:44 or do I have to do something else to 'add' the fragment to the activity? Mar 29 21:36:26 replace removes fragments in the container and adds the new one Mar 29 21:36:28 tinloaf: call .commit() Mar 29 21:37:41 evanc: yeah, .commit() is called... ok, let me find out why that instance is not saved. :-/ Mar 29 21:43:33 mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm Mar 29 21:43:54 SimonVT.. how do I restrict. so its only allowed to 'slide' between fragments as in viewpager Mar 29 21:43:56 when its in profile Mar 29 21:44:10 oh.. I just add a viewpager in the profile xml.. and have them in that Mar 29 21:44:11 ! Mar 29 21:45:46 as of right now.. to determind in my Java code if the device is in landscape mode.. I check with Configuration.ORIENTATION.LANDSCAPE Mar 29 21:45:56 but considering I want it to also be a matter of 600dp Mar 29 21:46:03 how do I do a new check ? Mar 29 21:46:10 the checking for orientation mode is all I know Mar 29 21:47:52 any idea how i can get a custom font on my actionbar tabs? I'm trying to set a custom layout for my tabs but I can't for the life of me get the tab text to center vertically, it seems to be ignoring any of my gravity settings... any ideas? Mar 29 21:48:23 Hello. I've been redirected here from #android. I have a little question as an user. Is there a way to swap OK and Cancel buttons? Right now OK is the left one, Cancel the right one. And I'd like to have OK as a right button and cancel as a left. I am using CM7.2 Quarx's version on Motorola Defy+. Mar 29 21:50:19 getRecources().getConfiguration().screenWidthDp > 599 Mar 29 21:50:22 does this make sense? Mar 29 21:51:27 Horokeu: I would probably try extending the current class which handles Ok / Cancel screen and swap the button's positions in construct Mar 29 21:54:23 cisus: It sounds a bit complicated. I'm not developer by myself, decompiling and recompiling via apktool and using adb was the furtherst I've went. I'd love to try your method, but I simply don't know how. In the other hand I don't want to waste your time with such a little stupid thing. Mar 29 21:57:55 uh oh, iRadio coming this summer. guess we'll gave gRadio soon after Mar 29 21:58:50 did i just type that? Mar 29 21:58:54 >.> Mar 29 22:12:24 i have a one-to-many relation of image urls on my server, a viewpager displays the parent, and a single-tap on the page will pop up an overlaid view containing the children. A user can be expected to swipe through a bunch of pages, pick one at random, then tap to bring up the children. What's a good high-level way of implementing the children? Mar 29 22:12:42 i'd like to pre-fetch them before the user taps Mar 29 22:12:56 but i don't need to pull them for every page if he's swiping through them quickly. Mar 29 22:16:32 doubly linked list? preload 5 to the left and 5 to the right of the current position Mar 29 22:18:39 pzero_: ? Mar 29 22:21:13 aahh, stupid connection. can you please repeat what you said? thanks! Mar 29 22:22:18 pzero_: well, you can find lazy loading example in romain's shelves app Mar 29 22:22:29 oh great Mar 29 22:22:31 thank you! Mar 29 22:22:41 an aside; i hope you aren't making the user swipe too often; its poor usability Mar 29 22:22:59 no, they might be flipping through images is all. Mar 29 22:23:05 its a browsing thing. Mar 29 22:23:53 maybe you could keep a map , store all your URLs Mar 29 22:24:00 if storing all the URLs is feasible Mar 29 22:24:14 seems his connection was lost again Mar 29 22:24:18 nope, still on. Mar 29 22:24:37 preferably a sortedMap, supplying a Comparator if you need Mar 29 22:25:01 and then you can store a currentIndex, and always have images -3 ... index ... +3 around it loaded Mar 29 22:26:01 that makes sense. it's what the viewpager is doing with the parent images, afterall Mar 29 22:26:35 any idea how i can get a custom font on my actionbar tabs? I'm trying to set a custom layout for my tabs but I can't for the life of me get the tab text to center vertically, it seems to be ignoring any of my gravity settings... any ideas? Mar 29 22:28:54 Anybody experience with opensuse, eclipse (Juno) and AVD? After hibernation the PC the AVD's won't start. After rebooting everything is ok. Mar 29 22:38:25 benvla: you mean hibernation still doesn't work in linux ;) Mar 29 22:39:09 nobody knows how to fix actionbar tab fonts Mar 29 22:46:35 yes, hibernating the laptop works. only when starting the laptop after hibernation i'm not able to 'fully' start avd's Mar 29 22:50:41 maybe it is unpossible. Mar 29 22:51:44 benvla: that's very weird. if I had to guess maybe something isn't being set up for networking, but without knowing what the avd error is, that's only a guess Mar 29 22:53:23 that's probably the only thing suspend is likely to reset. slim chance that it's resetting something in your video drivers and breaking that; i'd say it's pretty unlikely Mar 29 22:53:43 dragorn: network is fine. everything else is working. even made new avd's after hibernation to no avail. i'm guessing something is 'locked' or being reused which ain't ther anymore Mar 29 22:54:11 networking may work but avd may be setting up other virtual networking stuff Mar 29 22:54:16 and being pissy when it doesn't exist Mar 29 22:54:25 start it from a command line and see what the error actually is Mar 29 22:55:53 dragorn: i'll try that, but being way past bed time it'll be tomorrow. good night mike Mar 29 22:59:07 any idea how i can get a custom font on my actionbar tabs? I'm trying to set a custom layout for my tabs but I can't for the life of me get the tab text to center vertically, it seems to be ignoring any of my gravity settings... any ideas? Mar 29 22:59:30 I'm looking for OK - canel to canel - OK swap, anyone? :( Mar 29 23:00:12 Horokeu: ew, don't do that. One of the major things with UI design is to put buttons in regular locations. Mar 29 23:00:25 (also i don't think you can do it without writing your own dialog) Mar 29 23:00:50 i think he's trying to mod an android ROM for personal use Mar 29 23:01:03 Yes, indeed storkme. Mar 29 23:02:02 Been using ICS / JB for a while, and now I'm forced to use GB based CM7. And that OK - cancel positioning annoys me greatly :/ Mar 29 23:02:15 storkme: ah Mar 29 23:02:15 Maybe #android-root is for you. It's the place for mods etc. Mar 29 23:02:27 I already tried. Mar 29 23:02:41 It's pretty silent over there... Mar 29 23:03:58 could try asking in a less silent channel like #ubuntu Mar 29 23:05:06 I'm afraid that they may get mad :/ Mar 29 23:08:20 pretty cool article on how future android UI style may be http://www.androidpolice.com/2013/03/28/editorial-prediction-androids-next-iteration-will-emphasize-hybrid-card-layouts-other-subtle-design-shifts/ Mar 29 23:08:35 not too profound, speculation, but fun read Mar 29 23:09:43 meanwhile Tasker seems to have taken the multi-apk approach for each android version; something i'm still exploring depending on how different KLP will be Mar 29 23:10:02 nice Mar 29 23:11:51 Hey everyone, I have a question. I have a singleton which holds open a connection to a sqlite db. I am currently initializing it in the Application subclass I made by calling an initialize() method. I am wondering if I could instead of doing that, have an internal flag which says if it has been initialized and call it internally the first time it is used Mar 29 23:12:15 carbohydrate: that would be better, actually Mar 29 23:12:25 awesome Mar 29 23:12:27 no need to drag in an Application subclass just for that Mar 29 23:12:36 Yeah that was what I was thinking Mar 29 23:12:44 pass your singleton a context, and on that context, call .getApplicationContext() to be defensive Mar 29 23:13:01 you dont want to pass in a ui context ;) Mar 29 23:13:21 well if you do it defensively like this, it doesn't matter Mar 29 23:13:40 please god put me out of my misery how do i change the font on actionbar tabs Mar 29 23:14:43 the tasker guy is smart "It's not possible to fix problems reported via Play Store Comments..." Mar 29 23:14:49 g00s: Oh snap! Now I remember why I originally did it that way... I need a context to open the db. And I did not want to have to pass a context in every time I used it. Mar 29 23:15:30 So it looks like my only choice is to use Application, unless there is another way I'm not aware of Mar 29 23:15:31 carbohydrate: dealing with contexts in android and passing them around is a fact of life Mar 29 23:16:18 Yeah, but this is a logging thing and I'm putting tons of them everywhere Mar 29 23:16:29 I'd like for it to appear a blackboxish as possible Mar 29 23:28:44 I can't remember the last time I made a stackoverflow question Mar 29 23:28:48 I'm so ashamed Mar 29 23:31:23 What's the correct way to have a row height in ListView to change automatically? Should It be calcualted? Mar 29 23:33:26 change to what Mar 29 23:34:36 So it adjusts based upon the content Mar 29 23:34:55 wrap_content Mar 29 23:35:29 I have that set, but then there's a textview that's not displaying as if it's overlapped by another Mar 29 23:36:33 https://gist.github.com/rburton/5274409 Mar 29 23:36:51 The TextView "10 minutes ago" doesn't show and the one above does Mar 29 23:38:36 The fuck are you doing with layout_gravity Mar 29 23:38:40 android:layout_gravity="center_vertical|bottom|top" Mar 29 23:38:46 android:layout_gravity="center_horizontal|bottom|left" Mar 29 23:38:55 ha interesting Mar 29 23:40:56 corrected that didn't notice it. Mar 29 23:41:10 stil doesn't resolve the issue with the last TextView not showing Mar 29 23:41:41 Your linearlayout should probably be wrap_content as well Mar 29 23:42:38 android:layout_height="wrap_content"? Mar 29 23:42:59 Line 24 Mar 29 23:44:18 Good catch! Mar 29 23:44:44 simonvt how much do I need to pay you to answer my SO question Mar 29 23:44:55 storkme: he starts at $80/hr Mar 29 23:45:08 (minimum 2 hours) Mar 29 23:45:12 oh Mar 29 23:45:31 * rburton- stops the clock. Mar 29 23:45:34 3 mins :) Mar 29 23:46:00 really I need mister actionbarsherlock himelf Mar 29 23:46:03 Too bad it's zimbabwean dollars ;/ Mar 29 23:46:25 storkme: JakeWharton is $90/hr Mar 29 23:46:35 JakeWharton of square? Mar 29 23:46:46 ack Mar 29 23:46:46 yes? Mar 29 23:46:48 yes but he's a github kinda guy; he's willing to help people just for street cred Mar 29 23:46:49 too many highlights Mar 29 23:46:51 ah! Mar 29 23:47:00 * rburton- submitted the patch for RetroFit Mar 29 23:47:18 rburton-: i keep pasting it in our chat and nobody is merging it Mar 29 23:47:27 awkward, now he's turned up.. JakeWharton: best way to go about changing the font on actionbar tabs? Mar 29 23:47:37 :) It's okay I'll get Eric or Bob to push it lol Mar 29 23:47:43 How have you been Mar 29 23:47:44 storkme: you can't Mar 29 23:48:34 rburton-: busy busy busy. Mar 29 23:48:41 time.make() Mar 29 23:48:46 JakeWharton: in which case, a custom tab layout is my best bet, right? what witchcraft do i need to pipe into a custom tabl ayout to make my tabs look like your magic abs ones? Mar 29 23:48:48 There really should be a website that has all sorts of android widgets. I like QuickAction and a few others Mar 29 23:49:01 JakeWharton: That's good to be busy. Where did you fly off to? Mar 29 23:49:03 there's androidviews.net but it's pretty weak Mar 29 23:49:12 Boston for EclipseCon Mar 29 23:49:27 From the Bay area to Bost? Mar 29 23:49:38 Thanks for the link, I'll check it out Mar 29 23:51:20 yeah. i'm back now though Mar 29 23:51:32 EclipseCon was... very dated Mar 29 23:51:35 That was a quick trip Mar 29 23:51:49 storkme: You could probably look into these: https://developer.android.com/reference/android/R.style.html#Widget_Holo_ActionBar_TabBar Mar 29 23:53:08 Put a Sherlock in there somewhere and you got yourself the ABS equivelant Mar 29 23:53:36 ABS was just a few cp's from frameworks/base/ and running sed -i s/Holo/Sherlock/ Mar 29 23:53:42 yeah I've tried my best to hijack the relevant style but it still doesn't seem to center my text quite so Mar 29 23:54:30 Can someone clear something up for me. When I have a Service object - does each call to startService result in a separate object? Mar 29 23:55:47 No Mar 29 23:56:09 JakeWharton: evanc@evanc:~$ make time Mar 29 23:56:09 make: *** No rule to make target `time'. Stop. Mar 29 23:56:22 well, shit. if Google can't solve it.... Mar 29 23:56:38 Just got an e-mail saying it was merged JakeWharton Mar 29 23:56:46 twas Mar 29 23:56:51 i should have just merged it myself Mar 29 23:56:58 slacker Mar 29 23:57:03 ;) Mar 29 23:57:32 RetroFit reminds me of IBeans that Ross Mason created Mar 29 23:58:09 I really need to spend time styling up this application I'm doing. I hate the fact its black, white and gray. Mar 30 00:00:14 Is there any way to jump directly to the next directory that contains files on github? I feel like I'm spending 50% of my time clicking through empty java package directory structures. Mar 30 00:00:42 I'm looking for help. I'd love to swap my buttons from OK - cancel to cancel - OK. Using CM7.2 by Quarx based on GB, Motorola Defy+. Any ideas? :/ Mar 30 00:01:03 Horokeu: you'd have to build a custom version of CyanogenMod Mar 30 00:01:13 ask how to do that in #cyanogenmod-dev Mar 30 00:01:47 I would suggest that you just get used to [Cancel] [OK] because it's not going anywhere. Mar 30 00:02:04 or you could learn Arabic which would flip the order Mar 30 00:02:15 http://stackoverflow.com/questions/15712995/changing-the-font-on-actionbar-tabs?noredirect=1#comment22317151_15712995 answer my question or else, yo Mar 30 00:02:22 Err.. I'd love to, really. I have OK cancel right now. Mar 30 00:02:33 And I'd like to tchange to Cancel - OK Mar 30 00:03:07 Horokeu: it changed when it went to, uh, ICS? (I think that's CM10?) Mar 30 00:03:40 Horokeu: so in short, you can't. You need a newer version of Android, or you need to build CM7.2 yourself and write the change to flip it Mar 30 00:05:56 evanc: Kk, thanks. I found a little trick on xda (they wanted to do the opposite switch), so I tried it, but no avail. Decompiled frameworks-res.apk, changed button posistion, recompiled it, pushed via adb to my device aaand failed. Now my CM7 stucks at loading screen :x Mar 30 00:23:27 if i add an item to the action bar from code (not xml), is the title the only way to idenitfy which item was clicked in onOptionsItemSelected Mar 30 00:23:51 Not if you give it an id Mar 30 00:25:35 So if each call to startServer does not result in a different object, how do they stay separate? Do they not? Mar 30 00:26:01 SimonVT: I'm looking at Menu.add(int groupId, int itemId, int order, int titleRes); do i just give it my own random integer? Mar 30 00:26:19 Sure, or define an id in xml you can use Mar 30 00:27:17 Is either approach better than the other, or it doesn't really matter? Mar 30 00:27:19 carbohydrate: they do not; services are singletons Mar 30 00:27:40 f2prateek: use XML Mar 30 00:28:59 thanks Mar 30 00:32:03 evanc: Hmm. Okay. I have a service for updating a widget that can be potentially be started multiple times - so because the service is a singleton, does this mean that the onStartCommand can be running multiple times simultaneously? Mar 30 00:32:30 well 1) onStartCommand should not take a long time to run, and 2) no, they would execute serially Mar 30 00:33:58 evanc: How else would it do the work? Start a thread? Mar 30 00:34:42 carbohydrate: yes. Services run on the main thread. You might be looking for IntentService? Mar 30 00:34:56 Like right now the onStartCommand calls a private handling method that generates the remoteview for the widget - it takes a while to finish (like 1 second) Mar 30 00:35:16 i consider it a while, maybe it isnt Mar 30 00:35:42 that's too long. Are you doing disk i/o to build the views or something? Mar 30 00:36:10 disk io - reading from a sqlite db, writing to a logging db (potentially), reading various things from sharedPrefs Mar 30 00:36:25 yeah, do that off the main thread Mar 30 00:37:38 Hmm Mar 30 00:37:54 How would I do that? Using an AsyncTask? Or however I want? Mar 30 00:39:05 OK so if the service stuff is done serially then Android must somehow keep track of each call and wait until the first one finishes before calling the second one? Mar 30 00:39:38 The calls are on the same thread Mar 30 00:40:01 carbohydrate: IntentSevice Mar 30 00:41:06 evanc: My service holds open a BroadcastReceiver for the battery changed event (which can't be specified in the manifest) so I can't let it die Mar 30 00:41:16 Or I lose the intents for battery changed Mar 30 00:42:21 I think I understand though - I need to have my handler method start a thread or something to do all the calculation Mar 30 00:48:32 carbohydrate: how would an IntentService die? Mar 30 00:49:06 "the service is started as needed, handles each Intent in turn using a worker thread, and stops itself when it runs out of work." Mar 30 00:49:16 Am I misunderstanding this? Mar 30 00:49:37 apparently :) Mar 30 00:49:47 it's a service which allows you to run blocking operations Mar 30 00:51:27 incoming intent -> register receiver -> perform work -> unregister receiver -> send update command Mar 30 00:52:10 If I unregister the receiver than my widgets will not update - because the intent will only be receiver is the broadcast receiver is active Mar 30 00:52:16 right, so, I think it can be beneficial for _some_ apps to have an EXIT button so that if it gets stuck in a bad state a user can restart it Mar 30 00:52:24 s/be receiver/be received/ Mar 30 00:52:30 carbohydrate: shouldn't you register that at the manifest level? Mar 30 00:52:38 instead of a runtime registration? Mar 30 00:52:40 evanc: This particular one can't be Mar 30 00:52:43 hmm Mar 30 00:52:48 Trust me I wiiish it were possible Mar 30 00:52:59 That way I wouldn't need a constantly running service Mar 30 00:53:57 alright, well what I would do is: Mar 30 00:54:08 start your forever-service, which registers your BR Mar 30 00:54:25 when you get a broadcast with the battery info, start you blocking service to update the appwidget Mar 30 00:54:29 are any of you in china? Mar 30 00:55:00 carbohydrate: I have to take off, though. Good luck! Feel free to shoot me a /msg if you want, I'll look at it in, uh, day or so, haha Mar 30 00:55:13 evanc so having two services is better than starting a thread in one service? Mar 30 00:55:27 thanks man for your help Mar 30 01:24:00 Can I put a viewpager in the middle of a layout? Or does it only work under the action bar? Mar 30 01:26:57 agy2154: it's a view, you can put it anywhere Mar 30 01:27:21 f2prateek: sorry I ment TabsAdapter **** ENDING LOGGING AT Sat Mar 30 02:59:59 2013