**** BEGIN LOGGING AT Wed Aug 08 02:59:58 2012 Aug 08 03:09:52 findViewById(R.id.button1) is an object, right? Aug 08 03:10:56 i have an arraylist of type Button, i want to add the buttons to it Aug 08 03:10:59 buttons.add(findViewById(R.id.button1)); isn't correct Aug 08 03:14:22 i think i'm figuring it out, Button isn't that object type Aug 08 03:30:58 Hi guys, I have a ListView that is empty upon starting. In iOS, it shows empty rows with dividers until a row is actually added. In android it is just an empty view. How do I get it to display empty rows until content is added? Aug 08 03:37:40 how can i access my TableLayout programmatically? Aug 08 03:37:50 R.id.no_table_here Aug 08 03:50:38 How to zoom on the Emulator ? Someone told me that they could zoom using CTRL and Mouse 1 but it does not seem to work for me Aug 08 04:08:19 I love using PNGout. It's like buying things on clearance Aug 08 04:08:43 65% off Aug 08 04:38:02 hey does anyone out there know much about appending string to a session cookie? Aug 08 04:38:30 in Java you use + to append to a string Aug 08 04:38:51 wait are you using javascript to get the cookie ? Aug 08 04:39:00 http://pastie.org/4409931 Aug 08 04:39:39 basically in this piece of code i'm getting the cookie appending some string to it then trying to set the cookie Aug 08 04:39:41 ok so whats the problem Aug 08 04:39:44 ok Aug 08 04:39:46 with the new data Aug 08 04:39:58 but it does set with the new data Aug 08 04:40:01 read the docs for the CookieManager class Aug 08 04:40:05 doesnt* Aug 08 04:40:33 yeah i've seen examples that do it the same way as i've done it there Aug 08 04:44:59 hmmm not much luck there every example i can find does it in the same way, the api doc too Aug 08 04:51:38 Hello World Aug 08 04:56:03 So, I have a strange problem related to building. My colleague and I are working on an Android project using NDK. He was able to set up the project using the information provided here http://www.rbgrn.net/content/348-get-your-eclipse-integrated-ndk-on . I followed these instructions and did the same thing. However, when I attempt to build the project, as long as I don't edit any of the Aug 08 04:56:03 files, it builds and runs fine. However, the moment I attempt to edit the files and then build, I get an error saying that there are missing includes. The NDK part of the build goes fine - but the missing includes stop the build. I do have CDT installed. Was wondering if anyone could help me out here since I'm very new at this. Thank you very much. Aug 08 05:07:28 i update the URL under contact information for an app I published to the app store but when i go to the play store on the web, its still goes to the old address. Is there anything else I need to update ? Aug 08 05:09:37 who here is a registered android developer ? Aug 08 05:09:55 probably most of us Aug 08 05:10:47 i update the URL under contact information for one of my apps that I published to the app store but when I go to the play store on the web or phone, its still goes to the old address. Is there anything else I need to update ? Aug 08 05:11:15 No, sometimes it just takes a while to update. Aug 08 05:11:43 you'd think that something simple would update immediately Aug 08 05:12:44 Ha, yeah, I suppose. Aug 08 05:12:51 i am but this will be my first release, as soon as a figure out out to set this damn cookie! Aug 08 05:22:33 nexsoftware its been 20 minutes and the url for my web site hasn't changed on the play store Aug 08 05:22:58 what's the app? Aug 08 05:23:34 its a helper app for a streaming music web app Aug 08 05:24:34 link? Aug 08 05:32:39 it takes 21 minutes to change Aug 08 05:42:57 its not coincidence that 21 is half of 42 Aug 08 05:44:02 Repeat of my question from earlier: So, I have a strange problem related to building. My colleague and I are working on an Android project using NDK. He was able to set up the project using the information provided here http://www.rbgrn.net/content/348-get-your-eclipse-integrated-ndk-on . I followed these instructions and did the same thing. However, when I attempt to build the project, Aug 08 05:44:02 as long as I don't edit any of the files, it builds and runs fine. However, the moment I attempt to edit the files and then build, I get an error saying that there are missing includes. The NDK part of the build goes fine - but the missing includes stop the build. I do have CDT installed. Was wondering if anyone could help me out here since I'm very new at this. Thank you very much. Aug 08 05:47:17 p_l|debloating-o: you're the only one i know who twitters via their nick Aug 08 05:48:12 s/twitters/tweet/ Aug 08 05:48:37 my girlfriend calls it "twits" Aug 08 05:48:43 :) Aug 08 05:51:09 JakeWharton: have you used the fluffy location lib at all? Aug 08 05:51:20 no, we have our own internally Aug 08 05:51:50 Does anyone in here know the nickname "cagedwisdom"? Aug 08 05:51:53 I just tried it on ICS RAZR and it shows up my app as using 15% of the battery throughout the day even when I load my app once and use it for just a few secs. I have all the default settings (15 min broadcast) Aug 08 05:51:58 very weird Aug 08 05:52:30 Dude solicited me off of here, and trying to scam me in to free work. get a life bro Aug 08 05:52:32 I'm actually the founder of the channel believe it or not...well me and jsharkey. Aug 08 05:52:58 asking for source code you've written when you have no github profile is not scamming. Aug 08 05:53:31 wanting me to modify an open source project to fit his "startups needs" Aug 08 05:53:32 ok Aug 08 05:54:28 im sorry if you are insulted by our convo. writing an app that plays a noise that gets one star doesnt qualify you for a job with my company. Aug 08 05:54:59 I have yet to see any of your apps because you refuse to give me any links Aug 08 05:55:08 let alone a company website Aug 08 05:55:23 what apps? I dont have any presently on the play market Aug 08 05:55:28 i never claimed to have any Aug 08 05:56:19 Well I know a startup has a website Aug 08 05:56:44 Didn't you tell me that the server side was already complete? Aug 08 05:56:45 dlaroche: if you don't want to do it, just say no. Aug 08 05:56:57 I DID SAY NO!!!! Aug 08 05:57:00 there's no need to come in here and act up Aug 08 05:57:02 also that was a test, it hardly fits my needs. i said the job was about writing network heavy apps. if you cant write an android service what good are you to me Aug 08 05:57:07 it has nothing to do with this channel Aug 08 05:57:48 I was asking for any creditability for this guy. He chimed in Aug 08 06:00:16 for the record, the registered founders of this channel are morrildl, sanmehat and romainguy... Aug 08 06:00:32 Leeds: thank you. Aug 08 06:00:51 Leeds, it's been transferred. First I registered it. Then I transfered it to jsharkey, then he transferred it I assume to san and stuff. Aug 08 06:01:09 Originally we all hung out on #android and it got crazy noisy in there. Aug 08 06:01:57 but you don't have any apps?? LMAO Aug 08 06:02:16 and my logging for the channel, which goes back to 2009, doesn't show cagedwisdom being in here until April of this year Aug 08 06:02:33 Leeds: thank you again. just what I figured. Aug 08 06:02:34 lawyered Aug 08 06:02:58 it's quite possible that cagedwisdom was using a different nick before... that's just the facts I see... Aug 08 06:03:10 How about we don't flame in here Aug 08 06:03:13 Leeds, my previous nicks were EricInBNE and before that gambler. ...I just happen to be nostalgic about Arrested Development. Aug 08 06:03:36 cagedwisdom: great show Aug 08 06:03:54 haven't seen san in a loooong time Aug 08 06:03:56 He's good....should see our Skype convo Aug 08 06:04:24 or jsharkey for that matter Aug 08 06:04:48 Leeds is now our overlord Aug 08 06:05:36 people move on - or at least have less time to waste on IRC Aug 08 06:06:43 how does it work as far as the keystore ? Do you normally create a different one for each app that you export and upload to the play store ? Aug 08 06:06:43 what could possibly be better at wasting time or lowering IQ than irc ? Aug 08 06:07:00 devslash: no you don't have to Aug 08 06:07:17 I live rural so IRC is my only social time Aug 08 06:07:19 devslash: up to you... there are things you can do if you have multiple apps under one key - on the other hand, it makes it easier if you might want to pass on an app later, or sell it Aug 08 06:07:41 i used the same keystore for 2 different apps but it seems odd to me Aug 08 06:08:28 the package identifier for 1 of my apps is com.myappname.android where myappname is the actually name of my app. but I used the same keystone for a different app and it shows up with the same identifier in the play store Aug 08 06:09:06 then you've screwed up somewhere Aug 08 06:09:18 also, do you own myappname.com? Aug 08 06:09:26 no Aug 08 06:09:43 i thought it was used only to identify the specific app Aug 08 06:10:07 its best practice to write it under a domain you own Aug 08 06:10:10 then you shouldn't really use it - convention is to use a domain you own, because then you 'own' that namespace Aug 08 06:10:17 com.mydomain.appname Aug 08 06:10:18 like all my apps are under com.controllesenility.android.* Aug 08 06:10:25 o Aug 08 06:10:33 and mine are mostly under org.vmlinuz Aug 08 06:10:33 i don't really own a domain Aug 08 06:11:43 i do own a personal domain but i don't want it associated with my android account. Aug 08 06:12:17 then either buy another one, or use something which isn't a domain - there's nothing which says it has to be com.* - but if it is, you shouldn't use one you don't own Aug 08 06:12:21 devslash: if you plan on being professional about it then just purchase a domain name. they aren't that much Aug 08 06:12:27 you can use devslash.myapp if you really want Aug 08 06:13:54 does the structure under src have to following the same naming pattern Aug 08 06:14:01 my apps are all under com.apple.* Aug 08 06:14:20 src/devslash/appname/com ? Aug 08 06:14:29 JakeWharton: not com.starbucks.*? Aug 08 06:14:44 in all seriousness, using the same keystore for multiple apps gives you some cool affordances Aug 08 06:14:46 heh :) Aug 08 06:14:54 ;) Aug 08 06:14:56 is it safe to delete the gen folder Aug 08 06:14:59 yes Aug 08 06:15:28 JakeWharton: the main thing it stops you doing is breaking up your apps later - say you want to hand over to another dev, or sell the app, you have to give them your key Aug 08 06:15:46 true Aug 08 06:16:02 i just migrated all of our development apps to use the same shared user ID as well Aug 08 06:16:07 * Leeds to lunch Aug 08 06:16:24 Leeds: whats country are you in? Aug 08 06:16:26 so whats the best option ? same keystone or different ? Aug 08 06:16:59 QubeZ: have you seen GeoLoqi ? it reminded me of your app Aug 08 06:17:10 g00s: no, but searching Aug 08 06:17:24 its pretty old, actually. i read about it in a book about Mobile UX Aug 08 06:17:45 devslash: go separate Aug 08 06:18:18 g00s: it's got a 3.6 rating heh Aug 08 06:18:56 interesting nonetheless Aug 08 06:21:09 huh. I have a string i want to convert into an integer. i have a check to check its not null (if itemlist.get(i).getnumber() != null) and then total += Integer.parseInt(list.get(i).getnumber()); and this line is crashing for me with the following error: java.lang.numberformatexception: unable to parse 'null' as integer Aug 08 06:21:37 QubeZ: i thought there were some similarities with todomapr; or maybe not - thats why i brought it up Aug 08 06:21:47 why does this happen, even though i check for the null Aug 08 06:21:59 g00s: there are, lookslike a nice api too. I wonder how much money they are making Aug 08 06:22:29 eSatsu: why do you check for itemlist.get(i) then use list.get(i) ? Aug 08 06:22:52 er, typo Aug 08 06:23:00 both are the same Aug 08 06:23:22 (that is not the issue)\ Aug 08 06:24:20 eSatsu: i think for strings you need to use .equals(null) or .equals("null")... forgot which one Aug 08 06:24:45 neither Aug 08 06:25:19 it looks like "null" is the contents of your string Aug 08 06:26:16 oh, that makes sense, thanks Aug 08 06:26:28 so shouldn't it be if(!itemlist.get(i).getnumber().equals("null")) { total += .... } ? Aug 08 06:26:42 yeah i need to add a check for "null Aug 08 06:26:43 " Aug 08 06:26:46 not only null Aug 08 06:26:54 you should wrap this stuff in try/catch anyhow Aug 08 06:27:24 i disagree Aug 08 06:27:49 why? Aug 08 06:28:10 because that's a great way to hide actual bugs Aug 08 06:28:40 makes sense Aug 08 06:30:47 yeah, ive worked with a dev that put a try/catch in damn near every function Aug 08 06:30:55 and some of them never had the return value checked Aug 08 06:31:07 so enless you looked in the log, everything semed to work perfectly Aug 08 06:31:40 i prefer the model of putting the try/catch as far up the stack chain as posible Aug 08 06:32:05 near where the code becomes vital, where you actualy have enough context to make sense of what triggered the error Aug 08 06:45:35 clever: who was that dude? want to make sure i never work with them Aug 08 06:46:12 g00s: it was in php code Aug 08 06:46:48 php is like the proverbial try/catch of languages in the first place :P Aug 08 06:47:11 clever: oh ok, no point in trying to write good php code :P Aug 08 06:47:17 lol Aug 08 06:52:34 morning JakeWharton Aug 08 06:52:45 evening! Aug 08 07:01:23 <_genuser_> how do you guys store dates in sqlite DBs? Just as text (toString()) of java date functions? Or do you store mm dd yyyy individually in int fields? Aug 08 07:04:44 _genuser_: epoch time Aug 08 07:04:54 ms past 1970 jan 1 Aug 08 07:05:42 I store epic time Aug 08 07:05:57 you multiple everything by 1,000,000 to make it more epic Aug 08 07:06:39 but yeah, you should just store an int ideally Aug 08 07:10:40 JakeWharton: what about *9000? that should help confuse people trying to crack your dates too!! :P Aug 08 07:11:04 the output will just appear random Aug 08 07:11:47 sadly that would pass for encryption with some companies… Aug 08 07:12:38 id threaten to fire if anybody was caught doing that with sensitive info :P Aug 08 07:16:38 everyone knows that rot-13 is secure Aug 08 07:17:00 but if you want to make it really secure, double it up to rot-26 Aug 08 07:17:40 <_genuser_> g00s, JakeWharton thanks guys. I was thinking that storing DATE format would be cumbersome if toString()'d. Aug 08 07:17:53 and use another rot for every char :D (wouldnt that make it a vigenere?) Aug 08 07:18:02 <_genuser_> epoc time sounds better idea. Aug 08 07:18:39 _genuser_: just be careful about timezones Aug 08 07:18:56 make sure it's seconds since the epoch in GMT Aug 08 07:19:01 and make sure you parse it as such Aug 08 07:19:33 <_genuser_> JakeWharton: good point. hopefully it won't make a difference since it's a TODO list tracker for my phone. Aug 08 07:19:44 just don't travel! Aug 08 07:19:55 <_genuser_> JakeWharton: I know plenty are out there, but it's easier to learn new platforms writing a complete app. Aug 08 07:20:06 absolutely agree Aug 08 07:20:10 learn by doing Aug 08 07:20:11 <_genuser_> becuase it brings out useful use-cases such as taking into account timezones. Aug 08 07:20:14 <_genuser_> or don't travel, lol. Aug 08 07:21:37 <_genuser_> db dev is kinda going nicely since I found android-sdk folder has a sqlite3 provided. :) Aug 08 07:21:55 the iOS cal stuff lets you set a timezone for every event, so you can easily enter events from another timezone Aug 08 07:26:59 hei everyone. Aug 08 07:27:04 i'm developing a small game for Android devices and after the game finished the user has the option of restarting the game Aug 08 07:27:08 at which point i clear all the bitmaps and remove all the ImageViews they were in Aug 08 07:27:12 and then redraw the entire thing Aug 08 07:27:20 the problem is that for a second or so, the objects which hold the bitmaps dissapear Aug 08 07:27:37 i'd like to make the entire screen go dark for a second Aug 08 07:27:45 while i remove and then redraw everything Aug 08 07:27:51 any1 got a clue ? Aug 08 07:28:19 _genuser_: there was an old HN article on this a while back http://news.ycombinator.com/item?id=3969382 Aug 08 07:28:38 fucking timezones and dst … Aug 08 07:36:21 <_genuser_> g00s: thx for the article. reading... Aug 08 07:38:26 Hey, I have a square image I want to use as a background to my app. I want it to scale to the largest dimension and crop the rest. I am able to do this with an ImageView but that xml file sits in /layout and not /drawable so I can't actually use it as my background. Thoughts? Aug 08 07:42:36 just throwing my 2 cents ... have you tried the scaleType:fitXY or some other value for scaleType? Aug 08 07:43:29 I am using scaleType:centerCrop, which does the trick, but it doe snot work on drawables such as bitmap Aug 08 07:46:27 did you try asking on stackoverflow? Aug 08 07:46:30 dot com Aug 08 07:46:32 yes Aug 08 07:46:59 http://stackoverflow.com/questions/11856263/how-can-i-scale-clip-a-drawable-to-the-largest-axis Aug 08 07:47:27 dot co dot you kay Aug 08 07:51:08 Let me check when my System 76 laptop is getting delivered... Aug 08 08:13:20 hei guys... i've noticed some Android devices whcih don't have an SD card, they simulate it using a folder in the phone's memory Aug 08 08:13:36 does this feature exist on all android devices? Aug 08 08:13:56 or should i consider the fact that some devices don't have an SD card...and i should let the user know i can't store stuff Aug 08 08:13:57 ? Aug 08 08:14:23 Android devices have an Internal storage, and an External storage Aug 08 08:14:37 http://developer.android.com/guide/topics/data/data-storage.html Aug 08 08:14:50 More specifically: http://developer.android.com/guide/topics/data/data-storage.html#filesInternal Aug 08 08:18:25 well..i'm using SharedPreferences to store my data Aug 08 08:19:00 the cursor class has getint, getlong, but there no method called get boolean :( Aug 08 08:19:12 will that save it in the phone's memory automatically if there is no SD card? Aug 08 08:19:23 or should i call getint, since boolean is stored as 0 or 1? Aug 08 08:46:00 if i use layout_margin = "5dp" all over in my layouts, is there a way to factor this constant out? Aug 08 08:52:38 dimensions resource Aug 08 08:52:58 stork: ok, looking into it..\ Aug 08 08:53:12 stork: but yes, doh, obviously :D meh, sometimes i feel stupid :D Aug 08 08:53:44 Hello, I have a question about redraw an image view. I am going to implement an app that can do annotation on an image. So I use an image view and call invalidate when ever there is onTouchEvent. Using this approach, I realized that the performance is poor. Any suggestion to help to improve it??? Aug 08 08:55:06 edwinkcw: leave the image where it is, overlay your annotation on it (using a FrameLayout maybe), then composite the two if and when you want to do anything with the resulting image except view it? Aug 08 08:55:13 it happens :3 Aug 08 08:55:43 edwinkcw: not a solution, but I am in love with pngout right now. It optimizes your bitmaps. :) Aug 08 08:55:56 Ps I'm a ricer Aug 08 08:55:59 themirror: pngout? Aug 08 08:56:20 Leeds: but I still need to invalidate the overlay, right? Aug 08 08:56:39 you need to draw it, yes Aug 08 08:56:42 Yeah as an afterthought, just plugging for the tool i guess Aug 08 08:57:17 Leeds: ok, let me try it. Aug 08 09:16:40 Leeds: will openGl help for this part? Aug 08 09:16:54 nope, but a surfaceview might Aug 08 09:17:15 Hello guys, I want to add an ads bar in my app, but I don't want an arbitrary advertisement on my app. It should fit to purpose of the app. For example if I have an app that assists how to prepare food, I want ads like about blending machines, or pots or food. Not something totally different like buying a house. So is there a possibility to finetune the type of ads? Aug 08 09:17:16 well, it could, but I'd say it's overcomplicating things Aug 08 09:18:23 I also think it's better for the advertisers to reach the right people on the right time. Aug 08 09:18:56 Number5: about the only way you're going to do that, unless you've got massive ad volume, is to do something like handpick referral ads from Amazon Aug 08 09:20:07 Leeds, I'm not sure I understand, do you have an example? Aug 08 09:20:20 a link or something is good enough so I can read it Aug 08 09:20:23 what don't you understand? Aug 08 09:21:29 massive ad volume (why one should necessary have that) and that handpicking referal ads from amazon Aug 08 09:21:38 unless you're showing enough ads that you can sell them directly to advertisers, you're going to go through an ad network - which firstly don't have the granularity (or normally the variety) to let you choose ads down to that level, but also take into account other things like locale and language Aug 08 09:21:41 actually everything you said :P Aug 08 09:22:05 you know how amazon referrals work? Aug 08 09:22:35 Leeds, no I think amazon stuff is new to me, I know it only as an online shop Aug 08 09:22:51 ah, so you're an online marketing expert then... Aug 08 09:23:07 realistically, how many ads are you going to show? thousands? millions? Aug 08 09:23:44 no not at all, maybe I want to try to be one. But I think I can reach a million ;-) Aug 08 09:24:26 okay, I'll say it again Aug 08 09:24:27 But if I will added other languages it can be more :) Aug 08 09:24:49 unless you're going to show massive numbers of ads - millions, at least - you're going to be showing ads from an ad network Aug 08 09:24:59 you're not going to be sellings ads directly to advertisers Aug 08 09:25:10 hi Aug 08 09:25:30 which means you don't get to choose what ads are being shown - because you're not important or valuable enough for anyone to spend time or effort letting you do that Aug 08 09:25:56 Can somebody please explain how I can resize icons properly, eg. i have a 512x512 laucher icon and i want to resize it to 72x72, using photoshop. when i do the normal resize, the image always lookes bad Aug 08 09:25:57 ok, leeds, thank you very much. Aug 08 09:26:18 you can probably give the network keywords, and possibly block specific ads you don't want to show Aug 08 09:26:46 but *they* probably don't have enough ads - or a large enough variety of ads - to let everybody choose their own Aug 08 09:27:14 raywan: your only decent option is bicubic sharper Aug 08 09:27:30 Amazon referrals is simple - you sign up with Amazon as a referrer, then you can generate links to Amazon pages which will pay you a few % commission on any sales Aug 08 09:28:04 in which case you could pick 10 'food' related items, or categories, or whatever, and use those links as your ads Aug 08 09:28:28 themirror, reading the andriod icon design docs, how do they acheive resize clear proper icons at different sizes? do they remake the icon at each size Aug 08 09:28:31 does that make sense? Aug 08 09:28:40 is it possible, while debugging (in eclipse) to skip a breakpoint a given number of times? Aug 08 09:29:51 raywan: you could, but its a pain. Bicubic sharper resize sample in photoshop is all u can do with same image, and results are mostly negligible Aug 08 09:30:47 you may have to make a different one or redo your icon if u can't talk yourself out of it Aug 08 09:30:50 An_Ony_Moose, Easiest way would be to have a counter and the break point inside a conditional statement. 5 seconds of coding. Aug 08 09:32:11 Israfel: ah yes, I have a counter anyway. I just figured out how to make a breakpoint conditional. Thanks! Aug 08 09:33:43 themirror, have you used the psd icon templates before? Aug 08 09:34:34 raywan, still not there yet in my app, but seems straightforward why Aug 08 09:36:08 themirror, what am using, it has the same psd template for each density, just different size, i thought i could make my icon with the largest and resize, but it just does not look the same Aug 08 09:37:21 raywan: unfortunate, sorry. There's no easy way out of it sorry Aug 08 09:37:38 goodnight Aug 08 09:39:26 hi can someone please help im trying to update a map with markers using async task onPostexecute is not updating the ui thread Aug 08 09:56:26 #django Aug 08 10:04:30 Did someone see my message about Onpostexecute using asynctask i have been having difficulties trying to update a map with markers onPostexecute Aug 08 10:07:49 yeah Aug 08 10:07:58 it should be possible Aug 08 10:08:25 what are you doing? Aug 08 10:08:29 and what happens? Aug 08 10:20:47 lol, ticket submitted "It's a user error I think. The customer typed in asdfasdf on keyboard: don't to that." Aug 08 10:21:23 doInBackground is making a network call and returning JSON object which has location coordinates, onPostExecute is getting the longitude and the latitude from the JSON and "updating" the ui with the marker of the corresponding location Aug 08 10:21:52 right now its not updating Aug 08 10:22:29 how do i access my tablelayout via java? Aug 08 10:22:34 R.id.no_table_here Aug 08 10:24:16 Stokk1: i meant Aug 08 10:24:19 paste the code Aug 08 10:24:26 what have you done to debug it? Aug 08 10:24:56 do the coordinates change? does the mapview contain the new data? does draw-method see old or new coordinates? is it even called? Aug 08 10:26:04 ahhh, set an ID :) Aug 08 10:27:56 private class Nearbylocation extends AsyncTask { @Override protected JSONObject doInBackground(String... params) { try { String url = params[0]; // HTTP Client HttpClient client = new DefaultHttpClient(); HttpGet httpRequest = new HttpGet(url); httpRequest.setHeader("Accept", "application/json"); HttpResponse response = client.execute(httpRequest); Log.i(TAG, "response Aug 08 10:28:51 >pastebin Aug 08 10:29:06 holy... Aug 08 10:34:01 yuizy: the coordinates do change, the mapview does not contain the new data Aug 08 10:34:06 http://pastebin.com/RLJzrcWs Aug 08 10:34:21 so Aug 08 10:34:25 why does that happen? Aug 08 10:36:54 yuizy: The draw method is not called Aug 08 10:37:16 so Aug 08 10:37:59 you create an overlay everytime you add a new pin? Aug 08 10:42:26 yuizy: is that bad practice? Aug 08 10:42:44 yes Aug 08 10:42:47 well depends Aug 08 10:42:51 it doesn't matter Aug 08 10:43:00 just add more debug Aug 08 10:43:15 remove parts that don't matter Aug 08 10:43:22 like the asynctask Aug 08 10:43:27 call locale() manually Aug 08 10:44:42 i see you have commented out the "*1E6" part. why is that? Aug 08 10:46:16 when its not commented out i was unable to get the device location Aug 08 10:47:04 can you please explain when you say it depends Aug 08 10:47:20 and adding more debug Aug 08 10:47:22 it depends on what you do Aug 08 10:47:59 it doesn't matter as long as you're struggling at more basic issues Aug 08 10:48:06 i have a 4x4 table of buttons made via xml… i'm trying to dynamically add a table row with a new button on it… whenever i do this, i only get the first button from each row… any ideas? Aug 08 10:48:08 can paste Aug 08 10:48:43 My app needs to display and edit data provided by a remote web api, is using a ContentProvider and Loader's the recommended way of doing this? Aug 08 10:50:20 how do i force the action mode bar to show the "done" text for the done button? Aug 08 10:52:13 eXeC64: Loaders are the right tool to use yes :) Aug 08 10:52:32 ContentProviders aren't probably necessary Aug 08 10:53:54 Mavrik, So just do any asyncrhonous work I need to inside of the loader? Aug 08 10:54:26 I take it I'll need to tell the loaders when to reload data? Aug 08 10:57:47 http://pastebin.com/X3jMFvy3 Aug 08 10:58:14 this is a 4x4 grid of buttons… whenever i add the tablerow (table.addView(row)) it changes to a 1x5 grid Aug 08 10:58:20 any ideas where the other buttons are going? Aug 08 11:26:38 Is there anything in the SDK or other than that, that can be of any help to me in making a Graphic Novel? Aug 08 11:30:36 is it possible to broadcast an explict intent from a Service to a class so that only the receiving class gets this message? Aug 08 11:34:16 I have a TextView and a Button in a LinearLayout. I can see the space occupied by the button but the button itself is not visible. What am I doing wrong? Aug 08 11:34:55 !t start Aug 08 11:34:58 i mean hi Aug 08 11:43:16 what i have done i postet here http://pastecode.org/index.php/view/66329462 i dont understand why i did not get the intent, perhaps anyone? Aug 08 12:03:05 is there a particular reason for there being no Bitmap.Config.RGB_888? Aug 08 12:03:41 nuce: i speculate that the intent contrustor you're using isn't valid for broadcasting Aug 08 12:03:56 constructor Aug 08 12:04:08 ypu spelt gallery wrong Aug 08 12:04:12 that's probably the problem Aug 08 12:04:56 dalvik doesn't spell check class names at runtime ;) Aug 08 12:05:12 haha Aug 08 12:05:21 it doesn't matter if the class name is spelled incorrectly Aug 08 12:05:32 lol Aug 08 12:05:40 it does if you refer to it with the correct spelling elsewhere! :P Aug 08 12:05:52 that wouldn't compile Aug 08 12:06:19 oh right we're talking runtime Aug 08 12:06:31 my bad :D Aug 08 12:10:22 hi, anyone use android-maven-plugin for 4.1 ? is it needed use of SNAPSHOT version ? Where I can found com.google.android/android maven pom/jar for version 4.1.0 ? thanks in advance Aug 08 12:33:25 feature request for the next version of ADT: display colors not only as rgb or argb values in the graphical xml editor, but also as color :D Aug 08 12:34:47 tapas: b.android.com Aug 08 12:36:17 wongk: yeah.. Aug 08 12:40:17 taking a look at the ADT source.. Aug 08 12:40:22 that should be easy to add.. Aug 08 12:44:01 is there an irc channel dedicated to hacking the SDK itself> Aug 08 12:44:04 ? Aug 08 12:45:23 hi Aug 08 12:47:46 How can I prevent the back button from leading the user back to my login activity while the user is still logged in? The main activity provides a logout button, I'd like the back button to instead take the user to the home screen or another task instead. Aug 08 12:49:18 is it possible to display an imageview in the background, underneath th eother contents of a layout? Aug 08 12:51:26 ya Aug 08 12:52:42 eXeC64: can you bind the back button to do something else? Aug 08 12:53:22 If there's no particular reason to interfere with the activity stack, I guess you could just call finish() in your login activity. Aug 08 12:53:26 sponji, There most intuitive thing for the back button to do in this case is to return the user to the previous task Aug 08 12:54:03 HDroid, Would that be calling finish before starting the main activity? Aug 08 12:54:12 or immediately after? Aug 08 12:54:34 eXeC64: immediately after Aug 08 12:54:41 well there must be a way to bind the button, other apps are doing it some how. Either giving you a popup dialog box confirming yes/no to quit. etc.. Aug 08 12:55:55 HDroid, That works perfectly. Thank you. Aug 08 12:57:35 i also wonder: can i reference other colors in a color resource file? Aug 08 12:57:49 K17: set a background on your top level layout: http://developer.android.com/reference/android/view/View.html#attr_android:background Aug 08 12:58:13 hmm, seems to work fine Aug 08 12:59:43 is there a way to say that the app is not localized? Aug 08 12:59:47 i'm seeing all these languages listed Aug 08 12:59:52 and all i want is english Aug 08 13:03:41 When I create a Dialog, I give it the context (MainActivity.this). Can I somehow send a message from "onDismiss" to MainActivity? Aug 08 13:13:43 I was reading about java and got to abstract classes which need not be instantiated which means most android java classes are abstract? Aug 08 13:15:09 diki: an abstract class can not be instanciated, but you can extend it or call static methods. I am not sure that an android related chan is the best place to learn java Aug 08 13:15:44 olivier_b: android is pretty much java Aug 08 13:16:23 Omg nick spam Aug 08 13:16:33 someone needs help Aug 08 13:16:41 And a ban Aug 08 13:17:07 too Aug 08 13:17:26 i wonder how that happens Aug 08 13:17:36 What? Aug 08 13:17:48 those changes Aug 08 13:17:53 does he type that fast? Aug 08 13:17:58 Perhaps an enforcer was set Aug 08 13:21:26 <[emil]> Testing registration. Aug 08 13:21:33 diki: I'd recommend going to #java Aug 08 13:21:42 most android java classes are in fact NOT abstract Aug 08 13:21:48 if they don't have the "abstract" keyword, they are not abstract Aug 08 13:21:56 they may not have publicly visible constructors, but that's not the same thing. Aug 08 13:22:05 lov: but I am here because I want to develop for Android. Aug 08 13:22:16 ..... riiight, but you develop for Android IN JAVA. Aug 08 13:22:26 So having a good grasp on Java is a pretty big prerequisite for android development Aug 08 13:22:37 unless you're going a straight c/c++ route, in which case you need to know C AND Java. Aug 08 13:22:45 lov: I mostly plan to use jni. Aug 08 13:22:50 <[emil]> . Aug 08 13:23:14 that's fair, but you'll need to understand how to instanciate java classes and call java methods via JNI to get callbacks from the frameworks layer, etc Aug 08 13:24:02 By the way, are there any recent comparisons of running benchmark suites in both dalvik and C to try to estimate what the dalvik speed penalty is? Aug 08 13:24:07 Lol, I already built an app that uses jni to calculate something and display it within a text field as well as a button to generate a new string Aug 08 13:24:10 has anyone worked on measuring this recently? Aug 08 13:24:38 And this is without prior knowledge of java. Aug 08 13:25:04 diki: alright, best of luck then. Aug 08 13:25:31 alankila: with JIT the performance penalty might be minimal. Aug 08 13:25:47 lov: it is still some integer factor, most likely. I'm just wondering if it's 6, 5, 4 or 3 Aug 08 13:26:07 All I can say atm is that development for Android is 100 times easier than Symbian dev. Aug 08 13:26:10 for jvm it is 2, being very simplistic Aug 08 13:26:55 last time I took a very crude stab of measuring it, I got a value around 8, but that was in 2.2 time or when the JIT was very recent Aug 08 13:31:16 I should probably try to run some real algorithms like one fast integer-based FFT that I have in C. It should translate almost without syntax changes to java, so it might be a good candidate Aug 08 13:31:44 it's not normal java style, but it would give some kind of estimate of running integer-crunching algorithms in java instead of C Aug 08 13:32:36 alankila: if you're doing dramatic number crunching where performance is absolutely essential, you should probably just do it in C anyway since you can hand-tune it. Aug 08 13:33:29 nah... the key is to know what the penalty is to avoid bothering with C as much as possible Aug 08 13:33:47 I don't like C and think it holds computing back Aug 08 13:34:03 hop over to #smali and poke around. You might find someone helpful. Aug 08 13:34:32 alternately, ping that crazy russian guy that makes libgdx Aug 08 13:35:17 crazy russian guy Aug 08 13:35:18 nice lov Aug 08 13:35:33 what? Aug 08 13:35:54 thanks for the pointer. libgdx looks like fun, and I am developing a kind of respect for anything IT-related that says "russian". Those guys that gain world recognizion are especially formidable, whatever the reason. Aug 08 13:35:56 he is crazy like fox :> Aug 08 13:36:30 Is it possible to have my app resume when user navigates (in any browser) to say.. myapp://pin-required ? Right now I have defined in my manifest that a certain activity should launch, but I'd rather have the app resume in its current state.. possible? Aug 08 13:36:50 XeruX: look into tasks Aug 08 13:37:16 it's definitely possible. Aug 08 13:38:29 * alankila also switched to a russian-written web server recently. Because I got sick of dealing with apache. Aug 08 13:38:54 nginx is at healthy 15 % so clearly other people have also determined that apache is not for them Aug 08 13:39:48 lov: could you be any more specific? also, myapp://pin-required shoudn't open the same activity every time, but the last active activity. Aug 08 13:39:57 I got by with fraction of the configuration that apache takes, and got the correct http proxying model for backend web services that apache is practically unable to provide because apache is stupid Aug 08 13:41:12 150 threads? fuck that. nginx takes a look at the # of your cpu cores and says you need 4. And then saturates your cpu cores with that, if need be. Aug 08 13:41:40 more threads is always better Aug 08 13:41:43 threads are free Aug 08 13:42:05 that's why node.js is so fast Aug 08 13:43:55 what really kills me is that it was never possible with apache to do reverse proxying to backend properly. the idea is that backend processes are heavy and there are very few of them -- in my case exactly 4. So a frontend web server must accept a http request from user, wait until the entire request has arrived, then feed it as fast as possible to the backend, and then once backend gives a response, it must buffer it in entirety and free the backend fo Aug 08 13:43:56 XeruX: You'll want to use singleTask for the activities in your task stack that you want this to be valid for. Have whoever this intent filter is for start the relevant activity. Aug 08 13:44:03 the frontend then pipes the response back to client at rate the client can accept Aug 08 13:44:21 XeruX: read this: http://developer.android.com/guide/topics/manifest/activity-element.html#lmode Aug 08 13:44:48 this is a proper separation of frontend and backend and doesn't end up requiring that you must have 150 backend threads because apache has 150 frontend threads and likes to tie these 1:1 because nobody has ever done heavy backend processing with apache (evidently). Aug 08 13:45:17 apache sucks, the sky is blue, slashdot is wrong, etc .. nothing new here Aug 08 13:45:19 XeruX: read also http://developer.android.com/guide/components/tasks-and-back-stack.html Aug 08 13:45:27 oGMo: Android is dying, netcraft confirms it Aug 08 13:45:39 lol Aug 08 13:45:41 oGMo: yep, but it took about this long until there are viable alternatives. :-/ Aug 08 13:46:18 Can fragments contain other fragments? Aug 08 13:46:21 eXeC64: no Aug 08 13:46:24 yo dawg Aug 08 13:46:37 eXeC64: well, you can do it, but it probably won't work properly Aug 08 13:46:58 Okay, thanks. Aug 08 14:01:02 I am testing my app on my Transformer Prime. Apparently, even though my prime is 1280x800, it considers itself "mdpi" instead of "hdpi". Is there any way I can make my app properly use the hdpi drawables? Aug 08 14:01:04 grr... why do some functions use "Size" and some use "int width, int height" :-/ Aug 08 14:02:21 K17: no, your device is mdpi Aug 08 14:02:37 That's only completely infuriating :( Aug 08 14:02:43 using the hdpi drawables would be incorrect Aug 08 14:03:01 and most likely look ridiculous Aug 08 14:03:26 K17, are you perhaps confusing resolution with density? Aug 08 14:04:02 good morning gentlemen and ladies Aug 08 14:04:25 Are there any Android devices besides the G1 which have huge performance drops with 1024x1024 textures in OpenGL? Aug 08 14:04:30 I was informed that I should make my hdip 100% size, mdpi 75% and ldpi 50%. th emdpi drawables ar enot large enough to fit on my screen :\ Aug 08 14:04:58 K17, the ratios are well-defined, XHDP = 1.66666x HDP = 1.5x MDP = 1.333333x LDP Aug 08 14:06:14 aah... Aug 08 14:06:17 K17: http://developer.android.com/design/style/index.html Aug 08 14:06:22 who was the doubting thomas in here who said serialization of assets in android was stupid? Aug 08 14:06:36 cuz, my custom asset manager is blazing fast and optimal for memory Aug 08 14:06:49 Well, i fixed my current issue by switching my imageview to fill_parent, but i may have to go back and remake my textures Aug 08 14:07:04 kaneda^: congratulations Aug 08 14:07:10 Waynes, ty Aug 08 14:07:12 kaneda^: then submit a better one to AOSP :) Aug 08 14:07:26 blunden, this one isn't general enough for that Aug 08 14:07:48 then gerneralize it and submit that Aug 08 14:08:19 blunden, i could make an interface out of the asset manager and package it with the serializer Aug 08 14:08:31 meh, let others figure it out for themselves, it's a good exercise Aug 08 14:08:46 blunden, plus it only took 2-3 days including conception to implement Aug 08 14:09:17 Perhaps it is exhaustion, but how come a high res image woudl look worse on my 10" hd screen than an med res image? i woudl think that more pixels would look better with more pixels, regardless of density Aug 08 14:10:00 blunden, basically the asset manager has a list of transient objects and a catalog that has a stripped down version of taht list of objects, the asset manager gets serialized, and then each of the list of full objects gets serialized/deserialized on demand (with temp caching in each object using transient fields) Aug 08 14:10:18 I was just saying that if you feel that your implementation is better, why not help to optimize the android one? Aug 08 14:10:24 K17, if you're stretching a high res image beyond it's natural size then it doesnt matter what screen it's on does it? Aug 08 14:10:37 blunden, first i'd have to understand the android one :/ Aug 08 14:11:04 kaneda^: correct. but my screen is 1280x800 and it is using the mdpi drawables instead of the hdpi Aug 08 14:11:21 K17, in your manifest have you allowed the different screen sizes? Aug 08 14:11:27 K17: it's all about pixel density, not resolution Aug 08 14:11:42 blunden, they ARE linked Aug 08 14:11:53 when you publish an app to the play store does it get published immediately ? Aug 08 14:12:01 [16:03] K17, are you perhaps confusing resolution with density? Aug 08 14:12:01 devslash, yep, pretty much Aug 08 14:12:07 kaneda^: I don't think so :\ Aug 08 14:12:21 hmmm i can't find it when looking at the link with my developer id Aug 08 14:12:33 K17, Aug 08 14:12:44 does it matter that i changed the package identifier Aug 08 14:12:46 K17: the icon will have the same physical size (or close enough) on any device Aug 08 14:12:48 for that app Aug 08 14:12:49 can anyone help me run cyanogenmod in the android emulator? currently i get the blackscreen of death http://paste.ubuntu.com/1135446/ Aug 08 14:12:54 something like that should be in your manifest, but j0hnsm1th/blunden are right to ask, do you understand the difference between density/resolution? Aug 08 14:13:00 which means that if the pixel density is higher it has to be higher resolution Aug 08 14:13:03 blunden: yes, and i am asking why dpi is important. if i have a 10" hd screen but the dpi is lower than a 4" "normal" res screen, why woudl they both use the same drawables? wouldn't the screen with mor epixels look nice with images with more pixels? Aug 08 14:13:25 it's all about having them being the optimal size to easilty tab them Aug 08 14:13:42 kaneda^ does it matter that i changed the package identifier for the app ? Aug 08 14:13:53 devslash, i'm not sure, but i think it's a new app if you change the identifier Aug 08 14:13:59 K17: ---^ it's about the elements always being the same size Aug 08 14:14:04 com.example.foo != com.newexample.foo for instance Aug 08 14:14:13 kaneyes i reuploaded it with the new identifier Aug 08 14:14:17 and published it Aug 08 14:14:26 devslash, i'd look on the forums Aug 08 14:14:37 dammit Aug 08 14:14:39 K17: if you used hdpi or xhdpi drawables they would be huge on your screen Aug 08 14:14:57 pixel density doesn't necessarily mean higher resolution. a 2" 640x480 screen woudl have a much higher density than a 10" screen at 1280x960, yed the latter has 4x the resolution Aug 08 14:15:13 4x the SIZE, not the density Aug 08 14:15:16 do you understand? Aug 08 14:15:19 yes, i do Aug 08 14:15:22 you're actually diluting the quality at that size Aug 08 14:15:57 K17: and to make the icons have the same physical size (centimeters) they need different resolution for the drawables Aug 08 14:16:11 here, i have a small resolution example Aug 08 14:16:29 http://pastie.org/4412087 Aug 08 14:16:34 K17, that's a general example Aug 08 14:16:56 kaneda^ Aug 08 14:17:19 th eproblem i am having is my screen is 1280x800 (your example states xhdpi) but it is using the mdpi drawables Aug 08 14:17:28 so all my images are tiny Aug 08 14:17:37 K17, ok, did you add that line to your manifest as i suggested? Aug 08 14:17:57 i'm sorry, i did not see the line Aug 08 14:18:12 K17, Aug 08 14:18:24 yuo need something like this in your manifest Aug 08 14:18:30 I changed the package identifier for an app that I published to the app store and reuploaded it but now its now showing in the play store where I see all app by a developer (mine) Aug 08 14:18:31 K17: it should be mdpi Aug 08 14:20:00 blunden: I just can't understand why it woudl use the 100x100px image instead of the 160x160 image on a screen with such a large resolution, just because the device is wrongly preceived to be small due ot the lower dpi Aug 08 14:20:17 anyone know why ? Aug 08 14:20:37 K17, that line, did you add it? Aug 08 14:20:45 K17, it's possible you arent allowing the higher density Aug 08 14:20:49 kaneda^: i added the line and it didn't seem to change anything. Aug 08 14:21:07 K17, meh, then i'm not sure Aug 08 14:21:11 K17: look at this (notice how the icons are all pretty much the same size physically) http://www.taosoftware.co.jp/en/android/dpiinfo/ Aug 08 14:21:13 my project uses all of the correct assets Aug 08 14:21:31 brb Aug 08 14:21:47 who is a registered developer ? Aug 08 14:22:10 i imagine most of us Aug 08 14:22:18 i dont understand this Aug 08 14:22:28 my app doesn't appear to exist in the app store Aug 08 14:22:37 but the dev console is showing that its published Aug 08 14:23:42 blunden: But if my screen is huge, and it using the medium icon, then it is goign to be upscaling it to fit the icon grid, instead of using the high res icon withotu scaling, becaus eit is looking only at my (low) dpi instead of my (high) resolution Aug 08 14:24:48 K17: no, since the icon grid has that size your medium density device Aug 08 14:26:32 does java use the same order of precedence like C? Aug 08 14:26:44 K17, if you want the images to be bigger on your device, increase the size of the mdpi drawables, and increase all other drawables by the same factor. im pretty sure this should solve your problem. Aug 08 14:27:29 is ((double) foo.bar / foo.baz) == ((double) (foo.bar / foo.baz)) ? Aug 08 14:27:53 what are bar and baz Aug 08 14:27:53 or == ((double) foo.bar) / foo.baz ? Aug 08 14:28:06 lov: ok, so I've set activities to be singletasks, but because I've started using singletask, onActivityForResult won't work. This is starting to give me a headache Aug 08 14:28:08 canadiancow|work: ints Aug 08 14:28:14 then now Aug 08 14:28:34 will the cast precede or the division? Aug 08 14:28:36 (double) bar / baz == ((double) bar) / baz == ((double) bar / baz) Aug 08 14:28:47 but (double) (bar / baz) is different Aug 08 14:28:54 the division happens, you end up with an int, and then it is cast Aug 08 14:29:12 mdpi uses 32x32px icons. for simplicity's sake, we'll say xhdpi uses 64x64. my device has 8 rows across.. at 1280px, and enough margin between each icon for another full icon, that is enough space for 80px icons. yet it is upscaling the 32px icons instead of the 64px icons, making them more blurry than they ought to be Aug 08 14:29:19 K17: http://dl.dropbox.com/u/700765/dpi%20example.png Aug 08 14:29:21 canadiancow ah ok, thanks Aug 08 14:29:33 j0hnsm1th: th eissue isn't with the drawables, but with the way they are determined ot be used (in my opinion) Aug 08 14:29:54 K17: look at how the xhdpi icon I put there instead of the Camera icon is bigger than all the other icons Aug 08 14:30:29 K17: send me a screenshot Aug 08 14:30:48 K17, have a good read of: http://developer.android.com/guide/practices/screens_support.html Aug 08 14:30:55 K17, it should point you in the right direction. Aug 08 14:33:10 i don't know how to screenshot on my device :( i tused to be long-press recent apps, but after i installed aokp that went away Aug 08 14:33:16 (transformer prime) Aug 08 14:33:40 K17: what APIs are you building against, and what's the minimum? Aug 08 14:33:53 K17: if you have a computer with the Android SDK there you can plug it in and use the tool ddms Aug 08 14:33:57 minimum is 8, target is 16 Aug 08 14:34:16 it's int sdk/tools/ddms Aug 08 14:34:32 But your issue at the moment is with the Prime in particular? Aug 08 14:34:40 yes Aug 08 14:35:32 Have you tried using the large, xlarge size selectors instead of density ones? Aug 08 14:35:39 I'd say always build against the highest api level but also set the minimum to the lowest that makes sense Aug 08 14:35:58 Estel: those are deprecated Aug 08 14:36:28 blunden: yes, but there are plenty of tablets on < API13 Aug 08 14:36:58 my device is on 15, btw Aug 08 14:37:03 i found ddms Aug 08 14:37:24 transformer prime is not xhdpi Aug 08 14:37:33 K17: then select the device in the list and then Device -> Screenshot Aug 08 14:37:39 K17: but yeh, for tablet specific low density resources, using drawables-xlarge or drawables-sw600dp Aug 08 14:37:42 tf700 is xhdpi, iirc Aug 08 14:37:49 http://k17.me/dump/aokp.png Aug 08 14:37:55 but not tf200 Aug 08 14:40:01 It's only hdpi, iirc :p Aug 08 14:40:24 (tf700) Aug 08 14:40:41 220dpi apparently Aug 08 14:41:06 My icons are 72x72 in physical size, yet they ar eusin gthe 32x32 mdpi icons and upscaling, instead of using much larger icons Aug 08 14:41:29 That's cus your device is mdpi Aug 08 14:41:33 yes Aug 08 14:41:36 and that is my complaint Aug 08 14:41:46 has anyone here setup their project workspace/environment to include an android java code library for your reusable java code and then reuse a lot of code by including your library in other projects? Aug 08 14:41:53 using dpi instead of resolution to determine scale seems odd to me Aug 08 14:42:07 K17: but you can also use other modifiers to determine scale Aug 08 14:43:07 if i have a 10 inch screen at 1280x720, and a 52 inch screen of the same resolution, shoudl they not use the same resolution images? Aug 08 14:43:19 i have setup that kind of setup and was wondering if could delete all the extra stuff in my library project like res folders, manifest, assets, ect Aug 08 14:43:29 wouldn't making the 52 inch screen use even smalle rimages make the image look even worse? Aug 08 14:43:31 No, because you might want a completely different layout on them. Aug 08 14:43:59 You're assuming the layout is the same everywhere Aug 08 14:44:11 I guess I am, yeah. Aug 08 14:44:16 i.e. that phone layout is just scaled up to tablet size Aug 08 14:44:19 And up to tv size Aug 08 14:45:49 Perhaps the ability to toggle which your app woudl prefer, dpi or resolution would be a nice feature. my particular app has no use for dpi segregation, wherea i would much prefer to use resolution Aug 08 14:47:25 You don't have to use the qualifiers Aug 08 14:47:49 SimonVT, if you use relativelayout and have all different assets the layout hsould look roughly the same one very size screen no? Aug 08 14:47:51 Probably going to look horrible if you don't Aug 08 14:48:20 especially if you force an orientation Aug 08 14:48:21 Define "the same" Aug 08 14:48:31 SimonVT, all of the items appear the same relative to one another Aug 08 14:48:35 not necessary pixel for pixel, obviously Aug 08 14:48:43 necessarily Aug 08 14:48:47 It should definitely not look the same on a 10" device as it does on a 4" device Aug 08 14:49:21 ok, our app works against a webservice which has static links for downloads like http://foo.bar/media/foobar.pdf Aug 08 14:49:50 now, if i use the intent ACTION_VIEW, URI.parse(thatURL) android only offers browsers Aug 08 14:49:56 to complete the action Aug 08 14:50:10 is that expected? Aug 08 14:50:11 http://k17.me/dump/cr1.png Aug 08 14:50:14 http://k17.me/dump/cr2.png Aug 08 14:50:46 this is th eproblem i am having. they clearly do not look the same, my tf201 has way more empty space than my n1 Aug 08 14:51:33 K17: holy crap, that web server is slow :D Aug 08 14:51:50 it's sitting 5 feet from me, under a desk :P Aug 08 14:51:51 Er yeah, they're two different device sizes Aug 08 14:51:52 feels like 1995 all over again Aug 08 14:52:04 SimonVT, my understanding is that it WILL look roughly the same on the 10" devicea s it does on a 4" Aug 08 14:52:15 i fully expect to hear modem noises as i connect to AOL Aug 08 14:52:21 if all sizes are set dynamically, and assets exist for xhdpi, hdpi, etc Aug 08 14:52:22 those images are huge Aug 08 14:52:27 kaneda^: if it's made to do so, then sure. Aug 08 14:52:31 SimonVT: yes, which is why i have hdpi and mdpi drawables... yet it seems the larger screne is using the smaller images! Aug 08 14:52:38 Your understanding is wrong Aug 08 14:52:43 Estel, right, but it's natural to work on multiple screen sizes if you have the right assets and you've used relativelayout Aug 08 14:52:46 SimonVT, in waht way? Aug 08 14:52:49 Your assets should be the same physical size when viewed on screen Aug 08 14:52:58 that is my goal Aug 08 14:53:15 A 1" image is going to use a larger percentage of the screen on a 4" device compared to a 10" Aug 08 14:53:20 but the bigger screen is not showing th ebigger image to take up the same % of physical space Aug 08 14:53:25 it is using the smaller image Aug 08 14:53:31 No, physical size, as in inches Aug 08 14:53:34 centimeters Aug 08 14:53:34 i bet it does but the pixel density is higher or something Aug 08 14:53:36 Millimeters Aug 08 14:53:41 SimonVT, but your 1" image is only for the 4" device, you should have a 2.5" image for your 10" screen using the assets folders available Aug 08 14:53:48 http://developer.android.com/guide/practices/screens_support.html Aug 08 14:53:50 i once wrote a proportionalLayout wher eyou could specify the left top, bottom and right edges of child views in fractions of the total view size Aug 08 14:53:52 You need to read this Aug 08 14:53:52 SimonVT, then android decides if the screen is high density or low density, and puts in the appropriate image Aug 08 14:54:02 SimonVT, that's exactly where this info is coming frmo Aug 08 14:54:10 No Aug 08 14:54:10 kaneda^ exactly! but because my larger screen has a smaller dpi, it is using the smalle rimage, instead of the one i want! Aug 08 14:54:28 K17, then your larger screen has a low DPI, that sucks ;p Aug 08 14:54:34 they arent necessarily related Aug 08 14:54:42 http://developer.android.com/guide/practices/screens_support.html#density-independence Aug 08 14:54:43 Figure 3 Aug 08 14:54:44 so if you need some view to always take exactly 50% of the screen width and 30% of screen height -> no problemo :D Aug 08 14:55:07 K17: this is how an xhdpi icon looks on your tablet http://dl.dropbox.com/u/700765/dpi%20example%20tablet.png Aug 08 14:55:10 SimonVT, this is what i was saying :/ Aug 08 14:55:19 see how it because larger because of the low pixel density Aug 08 14:55:29 tapas: yes, but if it is using th emdpi asset, then the image will be scaled and blurry, whereas if it used the larger asset, it wouldn't have to scale Aug 08 14:55:37 "the system scales dp units as appropriate" ... "the system scales drawable resources to the appropriate size...based on current screen density" Aug 08 14:55:39 Look, dp units is not percentage Aug 08 14:55:46 160dp is going to be 1" on any device Aug 08 14:55:53 K17: you can still resolve different drawables for different densities Aug 08 14:56:02 It's not going to be 1" on one device, and 2" on another Aug 08 14:56:10 SimonVT, no, not tha exact Aug 08 14:56:12 but it will be relative Aug 08 14:56:48 tapas but the densities ar ewhat is making my large screne use the small image (it has a smaller density than my smaller screen) Aug 08 14:57:12 K17: do don't provide resources entirely dependent on densities! Aug 08 14:57:12 K17: if you have a a 1 x 1 cm square to fill up on a screen; the one with the higher pixel density needs an icon with a higher resolution Aug 08 14:57:26 and yes, dp ar enot very useful, i need to change my text scaling to use % Aug 08 14:57:47 A 160dp drawable is going to be 160px on a mdpi device, 240px on a hdpi device and 320px on a xhdpi device.. But it is going to be 1" physical sizes on any device, regardless of density or size Aug 08 14:57:47 while the smaller screen needs a lower resolution one Aug 08 14:57:59 If you want something to always fill a 1/4 of the screen, densities are not the tool for you Aug 08 14:58:03 K17: what SimonVT said Aug 08 14:58:10 it's really not hard to understand Aug 08 14:58:11 Smallest width resources are, probably. Aug 08 14:58:18 blunden but i am not looking to fill it by the physical size, i want to fill it by the physical % Aug 08 14:58:32 K17: yes, so use the tool for that. Aug 08 14:58:38 If you need %, the closest you're going to get is linearlayouts weight Aug 08 14:58:38 the intent is that you fit *more* content on the tablet screen... not a larger version of the same content Aug 08 14:58:39 SimonVT, i see what you're saying Aug 08 14:58:43 Densities are for physical size Aug 08 14:58:44 But remember, scaling is horrible Aug 08 14:58:58 The same exact layout is not going to look good on both a 4" device and a 10" device Aug 08 14:59:10 yah, unless you make resources on demand and resize dynamically Aug 08 14:59:18 i do that for the dynamic assets Aug 08 14:59:29 I'm not talking picture quality Aug 08 14:59:51 SimonVT, you're saying it'll just look tiny Aug 08 14:59:54 despite being the correct density Aug 08 15:00:14 i am facing same problem Aug 08 15:00:22 my app activity resolution 320x480 Aug 08 15:00:22 e.g. a line of text Aug 08 15:00:27 it's not really a problem, you just need to plan accordingly Aug 08 15:00:30 It'll look normal on a small device Aug 08 15:00:30 when i see it on higher resolution i want it to change accordingly ,what is best way to do it Aug 08 15:00:35 And huge on a large device Aug 08 15:00:42 why is showDialog(int) final? Aug 08 15:00:57 SimonVT, what if you're using font styles taht include large medium or small? won't it actually resize those appropriately? Aug 08 15:00:57 That's not going to give your users a very good experience Aug 08 15:01:10 Well, for my particular app, I don't really have much to place on the screen. logo, 3 lines of text and a play/stop button. it looks decent on my nexus one, but it looks silly on my prime because everything i tiny. a simple way to place views by % would work fo rme, maybe not everyone~ Aug 08 15:01:32 kaneda^: He's saying he wants it to look exactly the same on every device, percentage wise Aug 08 15:01:48 If you're using sp units, the text will also be the same physical size Aug 08 15:01:54 SimonVT, ah, well that's not reasonable Aug 08 15:02:07 SimonVT, oh, i didn't realize that Aug 08 15:02:32 i've just been getting acquainted with android for the last 3 weeks or so Aug 08 15:03:50 SimonVT, i cant wait to get a few devices to test on :) Aug 08 15:03:59 i should be getting 4-5 phones and a tablet soon Aug 08 15:03:59 kaneda^: Just remember, sp for fonts, dp for everything else Aug 08 15:04:03 SimonVT, i will, ty :) Aug 08 15:04:22 I went to buy an asus tf700.. Damn shop didn't have any Aug 08 15:04:29 never haerd of it Aug 08 15:04:29 So now I'm trying to device on where to order one Aug 08 15:04:41 SimonVT, what country are you in? Aug 08 15:04:42 decide Aug 08 15:04:54 ^ Aug 08 15:04:56 Denmark Aug 08 15:05:04 i love denmark! Aug 08 15:05:04 ah, i have good connections to hardware in the US Aug 08 15:05:31 ^_^ Aug 08 15:05:46 i've never been, but i'd love to visit Aug 08 15:05:49 I always thought it was probably cheaper to buy in the US and ship and pay import tax than buy in Denmark... Aug 08 15:05:56 my wife and i are already planning italy for next year's vacation Aug 08 15:06:08 Estel, if that's true i can find some great deals on all sorts of hardware in the US Aug 08 15:06:38 Estel: Maybe marginally Aug 08 15:06:41 why is showDialog(int) final? Aug 08 15:06:54 But the US don't offer 2 years warranty Aug 08 15:07:02 lapdis: Cus you don't need to override it Aug 08 15:07:07 Yeh, the margin is probably less than the value of hassle and time. Aug 08 15:07:11 You create your dialogs in onCreateDialog Aug 08 15:07:33 Estel: It's going to be a hassle if it breaks or something like that Aug 08 15:07:49 Estel: for phones it's usually cheaper to import from Germany Aug 08 15:08:11 as then you don't risk getting charged for VAT as it has alerady been paid Aug 08 15:08:29 already* Aug 08 15:08:35 mm, but as SimonVT says, still hassle if you need service or rma. Aug 08 15:08:52 yah, warranty these days is necessary Aug 08 15:08:56 everyone uses crap components Aug 08 15:09:01 Estel: within europe it's often less of a problem Aug 08 15:09:18 i remember a time when you'd have a hard time bustnig hardware in a computer Aug 08 15:09:21 as long as the model exists in your country as well Aug 08 15:09:31 Estel: I'd save $50 by ordering from the US Aug 08 15:09:38 hardly worth it Aug 08 15:11:23 $50 isnt worth it? Aug 08 15:11:25 hey SimonVT Aug 08 15:11:28 wana send me $50? :) Aug 08 15:12:36 No Aug 08 15:12:43 And hm, that's $50 if I exclude shipping Aug 08 15:12:47 That probably costs a bit as well Aug 08 15:13:28 Plus, as I said, if I had to rma it, I would have to ship back to the US (probably pay for that myself) Aug 08 15:13:39 And be stuck with whatever crappy warranty the manufacturer offers Aug 08 15:13:47 Import tax into the EU is like 20%? Aug 08 15:13:52 canadiancow|work, i'll take $50 Aug 08 15:13:56 i'll spend it on a nice dinner ;) Aug 08 15:14:11 SimonVT, 90 days parts and labor probably Aug 08 15:14:17 Estel: It's denmark, everything is expensive Aug 08 15:14:18 i spent like $50 on beer yestrerday Aug 08 15:14:19 ugh Aug 08 15:14:26 canadiancow|work, that's unhealthy ;p Aug 08 15:14:34 canadiancow|work, you're in TO right? Aug 08 15:14:40 25% sales tax + (whatever percent) import tax + $30 handling fee Aug 08 15:14:55 SimonVT, meh, i try to get free shipping through tigerdirect or newegg or whatnot Aug 08 15:15:12 yes kaneda^ Aug 08 15:15:23 canadiancow|work, cool, i'm your neighbor to the north east in montreal Aug 08 15:15:32 yes Aug 08 15:15:34 we've had this discussion Aug 08 15:15:35 :P Aug 08 15:15:40 ;p Aug 08 15:16:03 so do you guys also use java for the backend to web services? Aug 08 15:16:04 SimonVT: check the prices from germany... the shipping is usually pretty cheap and the VAT is much lower Aug 08 15:16:14 i'm using django/python for web services right now, but i've also written J2EE backends Aug 08 15:16:26 I'm getting this error when trying to install the ADT plugin, http://pastebin.com/627m67De Aug 08 15:16:36 any idea? Aug 08 15:16:50 Did you update your sdk? Aug 08 15:16:51 sicp, open up your SDK manager and install the android tools at the bottom Aug 08 15:17:05 blunden: Yeah, I can probably save a bit by ordering it from an EU country Aug 08 15:17:06 kaneda^: I don't think that's related. Aug 08 15:17:12 Buut, hassle :p Aug 08 15:17:17 lov, ah Aug 08 15:17:17 I installed the SDK from the website..how much more up-to-date can it be\ Aug 08 15:17:25 Not enough up to date Aug 08 15:17:25 sicp: update your copy of eclipse first via help -> check for updates Aug 08 15:17:28 heh Aug 08 15:17:30 It's missing a few point releases Aug 08 15:17:32 <3 ACRA Aug 08 15:17:40 SimonVT: I'd say either import it from a EU company or buy it in your own country Aug 08 15:17:46 no updates found for Eclipse Aug 08 15:17:50 hmm Aug 08 15:17:59 it sounds like there's a plugin that it needs, but I'm not sure which it is Aug 08 15:18:10 sicp, hmm indeed, check the SDK manager that comes with android Aug 08 15:18:12 doesn't it say in that error message? Aug 08 15:18:16 blunden: Yeah, buying it from my own country Aug 08 15:18:22 well I see the packagename Aug 08 15:18:26 but I don't know what that necessarily IS Aug 08 15:18:28 the SDK tools that I have is 20.0.1 Aug 08 15:18:33 https://www.google.com/search?q=org.eclipse.wst.sse.core&sugexp=chrome,mod=12&sourceid=chrome&ie=UTF-8 Aug 08 15:18:37 it needs 20.0.2, right? Aug 08 15:18:38 http://androidcommunity.com/forums/f4/missing-org-eclipse-wst-sse-core-0-0-0-while-installing-sdk-for-eclipse-3-5-a-28714/ Aug 08 15:18:44 sicp: yep Aug 08 15:18:50 how do I get that one?\ Aug 08 15:19:03 Has the SDK manager downloaded the lastest package list? Aug 08 15:19:06 hmm Aug 08 15:19:07 ah wait Aug 08 15:19:07 https://developers.google.com/eclipse/docs/faq?hl=es#wstinstallerror Aug 08 15:19:12 that might be helpful Aug 08 15:19:14 There should just be an update button Aug 08 15:20:36 there's no Indigo section in the link at developers.google Aug 08 15:20:45 extrapolate. Aug 08 15:20:47 ? Aug 08 15:20:50 it's the same Aug 08 15:21:11 sicp there's a 20.0.2? Aug 08 15:21:26 apparently Aug 08 15:22:36 alright so I've added the link in the Ganymede section..what do I need to get again?\ Aug 08 15:22:47 alright, thanks for the discussion and the help! time for sleep :V Aug 08 15:22:55 where do you see 20.0.2? Aug 08 15:23:03 In that error message above Aug 08 15:23:09 http://pastebin.com/627m67De canadiancow Aug 08 15:23:16 |work Aug 08 15:23:18 lol Aug 08 15:23:27 that comes up while trying to install the ADT plugin Aug 08 15:23:38 oh Aug 08 15:23:43 i see now Aug 08 15:23:56 in the SDK manager, my Android SDK Tools is rev. 20.0.1 Aug 08 15:24:07 yea thats what i was looking at Aug 08 15:24:08 it's referring to that one, it needs the 20.0.2 revision Aug 08 15:24:13 didnt realize we were talking about adt :) Aug 08 15:24:45 hey, i have a general question, why is the java heap for an applicatino so small on most devices? Aug 08 15:24:50 i've been reading that it's around 30MB-40MB Aug 08 15:25:31 I think it's legacy Aug 08 15:25:33 I'm thinking of the best way to check for network connection. I have this method: http://pastebin.com/qY9RDsy7 Can I simply call this method in an if statement before every network check? And then if it returns false, send the user to a splash activity? Aug 08 15:25:44 And keeps applications as better citizens Aug 08 15:26:11 hip2p: there was some Google boilerplate code for this, iirc Aug 08 15:26:16 kaneda^: Because mobile devices have limited memory, and your app is not the only one Aug 08 15:26:18 i dont think its "legacy" Aug 08 15:26:25 yea, what SimonVT said Aug 08 15:26:40 canadiancow|work: but the limit has remained pretty consistent since the Magic, hasn't it? Aug 08 15:26:42 If your app was allowed to use everything, all other apps would be thrown out of memory Aug 08 15:26:42 SimonVT, but that seems unreasonably small given how powerful mobile devices are becoming Aug 08 15:26:45 no Estel Aug 08 15:26:51 Longer load time when switching apps Aug 08 15:26:53 its gone from like 16MB to 64 or something Aug 08 15:26:54 SimonVT, true, but new devices had quad-core chips and such Aug 08 15:26:56 No background work, etc Aug 08 15:27:04 canadiancow|work, i thoguht it was even bigger Aug 08 15:27:10 canadiancow|work: ok, that's my bad memory I guess Aug 08 15:27:11 kaneda^: Heap is 64mb on newer devices Aug 08 15:27:39 SimonVT, hmm, i guess i have to wait a few more years before i can release some things ;p Aug 08 15:27:51 Estel do you know where I can find the boilerplate code for network check? I'm google searching and having no luck. Aug 08 15:28:18 Depending on what you're doing, you shouldn't really need more Aug 08 15:28:31 if you're doing it right Aug 08 15:28:36 hip2p: http://developer.android.com/training/monitoring-device-state/connectivity-monitoring.html has some more, but you're pretty much right Aug 08 15:28:36 SimonVT, our projects implement a gaming engine Aug 08 15:28:37 i mean go look at the gallery app Aug 08 15:28:42 so, memory usage is awlays high Aug 08 15:28:43 game engines dont need ram Aug 08 15:28:44 Estel great thanks Aug 08 15:28:48 O____O Aug 08 15:28:49 canadiancow|work, oh yes they do Aug 08 15:28:56 good game engines* Aug 08 15:28:59 heh Aug 08 15:29:02 canadiancow|work, all game engines ;p Aug 08 15:29:03 wtf are you doing that it's taking that much ram? Aug 08 15:29:08 Good game engines run in L2 cache Aug 08 15:29:09 heh, can't talk about it ;) Aug 08 15:29:17 technically speaking Aug 08 15:29:21 what part of it uses so much ram Aug 08 15:29:26 canadiancow|work, can't talk about it ;) Aug 08 15:29:30 the graphics use most ram, and they're buffered into the gpu Aug 08 15:29:31 I'm having a recursive problem, haha Aug 08 15:29:45 canadiancow|work, let's just say there's a lot of assets that need to be in memory Aug 08 15:29:57 in GPU* memory Aug 08 15:30:00 which does not count toward your limit Aug 08 15:30:04 canadiancow|work, it doesnt?? Aug 08 15:30:41 Other game developers seem to have figure out how to limit their ram usage :p Aug 08 15:30:50 SimonVT, heh, well i'm not making a game Aug 08 15:30:56 i said it USES a game engine Aug 08 15:31:11 repurposed for something much cooler Aug 08 15:31:58 Sounds like AR Aug 08 15:32:04 Estel, mebee ;) Aug 08 15:32:59 There's always largeheap on newer versions, but that's kind of a last resort Aug 08 15:33:07 fucker is telling me that there's no software at http://dl.google.com/eclipse/plugin/3.4 -- that's the link they provide in dev.google!.. Aug 08 15:33:29 SimonVT, yah, ideally everything i'm doing will fit within memory on phones w/ android 2.3.3+ and dual core chips Aug 08 15:33:39 so that goes back to late 2010 i believe Aug 08 15:33:55 Nexus S and later ish? Aug 08 15:34:10 On 2.3 you either have 24mb or 32mb iirc Aug 08 15:34:21 And no largeheap Aug 08 15:35:29 SimonVT, it will be possible to cause an OOM exception on taht size heap :\ Aug 08 15:35:38 but you'd have to really awnt to load ALLl the assets, which are loaded on demand Aug 08 15:35:47 [11:30:04] canadiancow|work, it doesnt?? Aug 08 15:35:52 no, gpu memory is separate Aug 08 15:35:58 so anything you load into there does not count Aug 08 15:36:03 but you need to get it into main ram first, and that counts Aug 08 15:36:09 but if you buffer it properly, you're fine Aug 08 15:36:14 [11:30:42] Other game developers seem to have figure out how to limit their ram usage :p Aug 08 15:36:17 canadiancow|work, i will definitely keep that in mind Aug 08 15:36:26 i can tell you which parts of the games i work on use ram Aug 08 15:36:28 unfortunately the game engine itself is a blackbox for me Aug 08 15:36:34 and its not the part that use the engine :P Aug 08 15:36:44 canadiancow|work, it's probably the 3d assets no? Aug 08 15:37:08 these arent 3d games Aug 08 15:37:12 but no, its not any part that touches the engine Aug 08 15:37:16 becuase that's virtually ram-free Aug 08 15:37:21 all the assets get shoved into the gpu Aug 08 15:38:01 canadiancow|work, right, right, so i guess the app assets for different densities are the heaviest Aug 08 15:38:12 i cant think of what else would take up memory Aug 08 15:38:26 well you never load them "for different densities" Aug 08 15:38:30 you only load one density Aug 08 15:38:37 and thats why you profile your stuff Aug 08 15:39:09 sure sure, for me the biggest part is storing thumbs for each object Aug 08 15:39:18 each object has two sizes of thumbnails that need to be persisted Aug 08 15:39:27 and there can be any number of thumbs Aug 08 15:41:42 so once you deserialize an object it comes with all of those byte[] that need to be decoded Aug 08 15:41:47 anyone with experience in cocos2d? Aug 08 15:42:40 ugh Aug 08 15:42:46 which one? -x? Aug 08 15:43:12 no ios Aug 08 15:43:17 So, I am probably doing something terribly wrong, but for the life of me I cannot figure out what.. Aug 08 15:43:21 o_O Aug 08 15:43:29 um. go ask in #iphonedev? Aug 08 15:43:30 I have a class that sets up a socket and receives data Aug 08 15:43:41 Untouchab1e: I hate it already. continue. Aug 08 15:43:45 :D:D Aug 08 15:43:49 lov: haha Aug 08 15:44:04 calling the function that receives data works fine when done from my ListActivity, but when from my service that runs in the background, it doesnt Aug 08 15:44:08 why is google spamming me aobut the nexus 7 Aug 08 15:44:23 that is, it works, but no data is returned from the function Aug 08 15:44:30 canadiancow: I'm asking but I think my problem is simple. I'm learning cocos2d and I want to create a thread that simple move a sprite left to right and viceversa forever. Aug 08 15:44:34 Ill illustrate Aug 08 15:44:39 Untouchab1e, have you looked at making a handler/asynctask? Aug 08 15:44:43 electronplusplus, go away Aug 08 15:44:48 this is not #general-dev or #ios-dev Aug 08 15:45:01 uh ok Aug 08 15:45:22 It's actually #fortran-dev Aug 08 15:45:29 one thing i dont get is why android doesnt have a better threading model for beginners? Aug 08 15:45:30 Basically: this is it Aug 08 15:45:31 http://bpaste.net/show/A4x4OiN2cZMnHj1Hq2BR/ Aug 08 15:45:43 if I put that code in my activity, I get nice network data back Aug 08 15:45:49 but in my service, all I get is "null" Aug 08 15:45:53 they could totally hide gui vs non-gui thraeding and let the user do whatever they wanted to thraeds they "own" Aug 08 15:46:12 kaneda^: and yeah, its running as a handler in the activity basically Aug 08 15:46:25 but I need to run this function regularly in the background too Aug 08 15:46:27 Untouchab1e: when are you trying to access it? Aug 08 15:46:43 Estel: well for now, when I click a button Aug 08 15:46:46 Are you reading the text variable synchronously? Aug 08 15:46:47 Code? Aug 08 15:47:06 Estel: hold on Aug 08 15:47:09 Untouchab1e, are you accessing the text variable while the handler/asynctask is stil running? Aug 08 15:47:12 or do yuo wait for callback? Aug 08 15:47:37 ugh, stupid voice calling thing on phone Aug 08 15:47:47 I tried saying "help" and it did "call frank blah on mobile" Aug 08 15:48:05 pfn, lol, "help", "calling 911 now" Aug 08 15:48:53 kaneda^: nope, the service doesnt use asynctask to to call this function, so no reason why that should be a problem Aug 08 15:49:14 Untouchab1e, again, if it's a background task and you're accessing this var int he foreground then you must wait for callback Aug 08 15:49:17 Untouchab1e: huh? That can still be a problem if you're using a service Aug 08 15:49:28 Estel: oh ok.. here is the code.. hold on Aug 08 15:50:05 Estel: here's the relevant code in the service: http://bpaste.net/show/WbIyzhoB6DVEZgL6eI4J/ Aug 08 15:50:38 Estel: and here is the function being called: http://bpaste.net/show/BnIR2EVXW90tD5KcUucK/ Aug 08 15:50:58 now I think you might be on to something, because the Toast message just says "Null".. which is what the return string is initially set to Aug 08 15:51:40 on activity load, where exactly do I put my network connection check? I put it at the beginning of onCreate, but I received errors. So then I put it a little bit lower below getting application context, but it still gives errors. Is there a certain place to put it that works best? Aug 08 15:51:57 Anywhere you use the network? Aug 08 15:52:08 ^ also, what errors? Aug 08 15:52:15 You might have connection when the app is opened, but not necessarily when the network is used Aug 08 15:52:29 I disabled data on my phone so I can test this Aug 08 15:52:32 I'll post the errors Aug 08 15:52:40 Hello how do i change the target version Aug 08 15:52:50 in eclipse android sdk Aug 08 15:52:59 Run it off the Ui thread Aug 08 15:53:26 In androidmanifest.xml Aug 08 15:53:39 Estel: any ideas what might be causing the issue? Aug 08 15:53:39 hello I want to change the target version Aug 08 15:53:52 the only choice I got is 4.2 and I want to target version to be 2.3.6 Aug 08 15:54:08 ia9371: no, you want the target to the 4.2 Aug 08 15:54:16 it wont work on my phone Aug 08 15:54:20 Ia9371 in the androidmanifest file Aug 08 15:54:27 Then the problem isn't the target. Aug 08 15:55:02 Your minsdkversion in manifest decides which version it'll run on Aug 08 15:55:03 but yeah well i dont have the version Aug 08 15:55:05 i need to download it Aug 08 15:55:05 Not your target Aug 08 15:55:25 how do I download more target versionS? Aug 08 15:55:33 In the sdk manager Aug 08 15:57:06 There's a button in the toolbar for ask manager Aug 08 15:57:30 *sdk Aug 08 15:57:39 Untouchab1e: not really, sorry. Aug 08 15:58:44 Estel: I managed to finally debug it properly Aug 08 15:58:56 for some reason it fails on: socket_multicast.receive(p); Aug 08 15:59:16 Estel: but Log.i("LocalService", "ERROR " + e.getMessage() ); just gave me ERROR: null Aug 08 15:59:19 so not sure why it fails Aug 08 16:08:16 have an headache! Aug 08 16:08:31 no thank you Aug 08 16:08:38 trying to make and xmlparser Aug 08 16:08:50 how can i get the return from asynctask? :) Aug 08 16:10:57 why make one? Aug 08 16:12:00 hey, i was wondering if anyone could tell me what libmediaplayerservice is Aug 08 16:12:27 it's right in the name Aug 08 16:12:31 what did you want to know about it? Aug 08 16:12:41 because I would like to read an xml file? :O Aug 08 16:13:09 fatpudding, i mean, why not use one that already exists Aug 08 16:13:11 jasta, is it an application that sits on top of audioflinger to play media files as a service or is it part of what makes audioflinger work Aug 08 16:13:26 is new AlertDialog.Builder(context).show() deprecated? Aug 08 16:15:29 kaneda^, trying to download the xml file, and have found out that i need to use AsyncTask to this without crashing? Aug 08 16:15:42 fatpudding, you should use asynctask/handler to do this, yes Aug 08 16:15:51 and want the downloaded xml file from Asycntask Aug 08 16:16:39 yes Aug 08 16:16:55 using this to start async, new parser.execute() ? Aug 08 16:16:57 have you seen the asynctask implementatino examples? they have onPostExecute(Object...) that can handle your XML after Aug 08 16:17:14 so the execute thread downloads the xml and passes it to post execute, which then processes it Aug 08 16:17:24 yah, where execute can also take object(s) Aug 08 16:18:02 i.e., String url = "http://fobar"; String params = "foo=bar&baz=bot"; parser.execute(url, params); Aug 08 16:18:28 then you have protected class Parser extends AsyncTask { onPostExecute(Object...) { ... } } Aug 08 16:18:35 or whatnot Aug 08 16:19:35 ah okey, will look in to that, sound a little more eff. Tnx :) Aug 08 16:21:54 you can make a parent class that extends AsyncTask taht contains the execute method for downloading anything from any url, then extend THAT class as an inner class to your activity or fragment and override onpostexecute to deal with whatever the specific return should be Aug 08 16:22:10 that's how i implemented it anyways ;p Aug 08 16:28:15 the last part is a little out of my league :p Aug 08 16:28:16 hello Aug 08 16:28:31 think a first would get something to work! :p Aug 08 16:30:52 i use adb pull to retrieve an sqlite db from the android device, but have no chance to access the copy: sqlite says it is corrupted. any quick hack to correctly copy the db? Aug 08 16:34:21 here's a weird one, when i changed a tablelayout to a linearlayout, upon loading the same textviews into the linearlayout the background of its parent wrapper disappears Aug 08 16:34:35 so i lose that surrounding background when i use a linearlayout Aug 08 16:34:37 lol Aug 08 16:35:57 anyone knwo why this might be? Aug 08 16:43:46 what kaneda^ ? Aug 08 16:43:57 http://pastie.org/private/82bwnx61cvwchboxjtdw8q <-- when adding textviews to the twitterTable the background disappears from its surrounding relativelayout, when adding tablerows to a tablelayout in its place the background is maintained Aug 08 16:44:17 seems like a bug Aug 08 16:44:56 well Aug 08 16:45:04 netsplit! Aug 08 16:45:18 Jug6ernaut, did you survive the split? Aug 08 16:45:19 you have a relative layout in a relative layout, this is bad Aug 08 16:45:34 Jug6ernaut, oh, i thought that was OK Aug 08 16:45:50 1 Aug 08 16:46:24 i could be wrong, but im fairly certain that is bad lol. I would try your layout without that or try testing out individual layout elements to see if that is causing the problem Aug 08 16:46:28 mikedg: 2 Aug 08 16:46:37 in sql what does limit x,y means Aug 08 16:46:43 Jug6ernaut, i can replace the linearlayout with a tablelayout and this works Aug 08 16:47:13 linearlayout is fine, its just nested relativelayouts Aug 08 16:47:36 Jug6ernaut, i can turn the outer one into a linearlayout w/o consequence i believe Aug 08 16:47:36 wp-developer: limits results from x to y Aug 08 16:47:52 Jug6ernaut what is x and y Aug 08 16:47:59 x=start Aug 08 16:48:03 wp-developer: so if you only wanted the first 10 it would be limit 0,10 Aug 08 16:48:05 y=end Aug 08 16:48:09 yep Aug 08 16:48:16 kaneda^: try it Aug 08 16:48:23 yep, i'll let ya know, ty Aug 08 16:48:41 np Aug 08 16:48:51 Jug6ernaut its showing 20 records for limit 10,19 Aug 08 16:49:28 wp-developer: i was wrong Aug 08 16:49:36 x = start point, y = how many to show Aug 08 16:49:51 I am having a tought time building curl with ssl for android. After a bit of pain on the mac I moved over to a linux box and most of the process just works compared to Mac. But even though i pass the --with-ssl to configure it says I need to supply it and is not using it. I assume I need to build opsnssl first? If so (I was succesful building opensssl on Mac) How to I tell curl where to... Aug 08 16:49:54 ...find it during the build. i am using the standalone toolchain method. Aug 08 16:50:01 Jug6ernaut, changing the outer relativelayout to a linearlayout has no effect, same problem w/ disappearing bg Aug 08 16:50:23 Jug6ernaut, i saw a post about scrollview and caching listviews that caused the bg to disappear on scroll Aug 08 16:50:29 Hello Aug 08 16:50:44 Jug6ernaut, perhaps i just need to set the bg at the end once it's done loading the text w/ a linearlayout Aug 08 16:51:04 maybe, but it should be required, can you take a screenshot? Aug 08 16:52:22 (quick question not at all related to android-dev!) 350z or g35? Aug 08 16:52:59 350z Aug 08 16:53:36 and thus it shall be Aug 08 16:54:11 Jug6ernaut, i dont know how to take a screen shot on this phone :| Aug 08 16:54:22 :| Aug 08 16:54:29 what os level Aug 08 16:54:41 * Jug6ernaut goes back and re-reads issue Aug 08 16:55:08 i guess i'll go find an app Aug 08 16:56:49 kaneda^: r u sure u need that linearlayout at all? or are you just using it for organization? Aug 08 16:57:01 Jug6ernaut, i'm using it for organization Aug 08 16:57:06 i can switch it to a tablelayout or a listview Aug 08 16:57:19 i havent tried listview yet Aug 08 16:58:58 kaneda^: i would try it without a layout there at all Aug 08 16:59:18 Jug6ernaut, but just inside a relative alyout i'll have to tell it what's above it programatically Aug 08 16:59:26 and that sucks Aug 08 17:01:44 kaneda^: yea i know :\ Aug 08 17:01:54 tablelayout it is ;) Aug 08 17:04:16 does the preview size affect performance when recording video? Aug 08 17:04:37 or rather, encoding performance... dropped frames etc. Aug 08 17:05:19 Jug6ernaut, ugh, the tablerow cuts off the text! Aug 08 17:05:24 :\ Aug 08 17:05:44 man, i am seriously becoming disenfranchised with gui programming in android Aug 08 17:06:06 Does anyone know _why_ my app icon appears smaller on my Jelly Bean phone without me doing anything to it? Aug 08 17:06:43 smaller than what? Aug 08 17:06:58 on a different phone? Aug 08 17:07:07 xhdpi hdpi me thinks Aug 08 17:07:16 yeah, that'd be my guess too Aug 08 17:07:16 kaneda^: GUI programming sucks :P Aug 08 17:07:26 at least in straight up java you have netbeans Aug 08 17:07:36 so even though swing sucks balls you have a gui builder Aug 08 17:08:02 Swing's awesome :p Aug 08 17:08:03 angelos: ericrichardson I have the xhdpi resource.. Aug 08 17:08:07 it just seems really weird. Aug 08 17:08:39 well, androids gui builder is A LOT better then it used to be, and getting better Aug 08 17:08:56 i dont mind using it anymore, a lot better then manually(java) coding ur UI's Aug 08 17:09:05 romainguy: working in swing is like pulling fingernails Aug 08 17:09:14 lol Aug 08 17:09:14 I disagree Aug 08 17:09:16 Jug6ernaut, i still find it unusable Aug 08 17:09:29 hwrd|work: I've had issues before with having an app icon in the base drawable folder, that sized it wrong on my GN Aug 08 17:09:29 Swing's default look is ugly but the toolkit itself is amazingly flexible and customizable Aug 08 17:09:50 romainguy: fine, but making everything look nice is the end goal of GUI programming, and to do that in swing is a pain Aug 08 17:09:59 kaneda^: meh :) Aug 08 17:10:12 that said, I wouldn't go with it today Aug 08 17:10:13 ericrichardson: yeah, that seems to be what's going on. Aug 08 17:10:21 i had to make a multi-panel, multi-threaded converter application Aug 08 17:10:22 * Jug6ernaut perfers backend > frontend any day Aug 08 17:10:25 and it had to work with java5 Aug 08 17:10:34 i somehow got eclipse to build and deploy an apk that had a compile error Aug 08 17:10:35 kaneda^: for what it's worth I worked briefly on the Swing team ;-) Aug 08 17:10:46 canadiancow|sad haha Aug 08 17:10:47 hwrd|work: So i'd take it out of that base one and just have them in the density specific ones Aug 08 17:10:48 romainguy: lol Aug 08 17:11:03 canadiancow|work, you can select "ignore compile warnings" and "ignore compile errors" Aug 08 17:11:07 i didnt though Aug 08 17:11:12 actually when Google offered me a job on Android my other choice was to join the Swing team again :) Aug 08 17:11:16 canadiancow|work, lol Aug 08 17:11:21 somehow I feel I made the right decision at the time Aug 08 17:11:27 romainguy: i'm envious ;p Aug 08 17:11:38 ericrichardson: I do have density specific ones -- it just seems to be reading it wrong. Whatever. Aug 08 17:11:40 romainguy: good choice imo :P Aug 08 17:12:08 i would have loved to work on android -_- Aug 08 17:12:09 hwrd|work: Yeah that same thing happened to me before. Not exactly sure why. Aug 08 17:12:35 kaneda^: you still can... Aug 08 17:12:40 kaneda^: you still can :P Aug 08 17:12:43 canadiancow|work, true, but google wouldnt hire me Aug 08 17:12:43 damn u canadiancow|work Aug 08 17:12:49 :D Aug 08 17:13:06 kaneda^: its something to work towards ;) Aug 08 17:13:34 Jug6ernaut, i got it to recreate the bug using tablelayout Aug 08 17:13:44 :\ Aug 08 17:13:48 Jug6ernaut, if you reset the width of the textview to the proper width, thereby making it wrap, it does the same thing as the linearlayout Aug 08 17:13:50 I'm installing my app from the Google Play market. In the app drawer it has the proper name. But in my shortcut it has my more formal name of my project in Eclipse ("Program_Android") Aug 08 17:14:05 Jug6ernaut, so i think it has to do with the width adjustment Aug 08 17:14:08 What am I missing? Aug 08 17:14:18 By shortcut I mean one auto created on the home screen Aug 08 17:14:53 does anyone know if a PinnedHeaderScrollView exists? Aug 08 17:14:56 nothing is auto-created Aug 08 17:15:07 the same functionality of the PinnedHeaderListView, just with custom Views as headers? Aug 08 17:15:13 (and in a ScrollView, of course) Aug 08 17:15:14 kaneda^: i need a screen shot or apk, i cant test anything on my current computer Aug 08 17:15:27 Jug6ernaut, cant send yuo either, unless i get a screen shot app for this phone Aug 08 17:15:37 Jug6ernaut: I have a Nexus 7...When I install an app, it puts a shortcut on my home screen I swear, lol Aug 08 17:15:44 * sebumd is new to android Aug 08 17:15:47 kaneda^, I have downloaded a xml! ;) Aug 08 17:15:53 fatpudding, good job Aug 08 17:15:54 Rockmaninoff: Why can't you just have a header view with a scollview below it again? Aug 08 17:16:07 i want multiple "headers" Aug 08 17:16:08 that pin Aug 08 17:16:16 sebumd: You can turn that off in the GPlay app. Aug 08 17:16:19 Jug6ernaut, basically there's a nice rounded square background while the feed is loading, then once it's all loaded and the scrollview resizes the background on my relativelayout disappears Aug 08 17:16:56 hwrd|work: In development how do I change the name of my app? The Icon has the correct name in the application list, but when I go to install or uninstall it says like the more formal name of the App Aug 08 17:17:33 hwrd|work: so my app is named "The Wall" and my formal name (of my project in eclipse, etc) is "TheWall_Android" Aug 08 17:17:38 that would be the Activity correct? Aug 08 17:17:43 android:name="blah" Aug 08 17:17:48 in your manifest Aug 08 17:17:52 ^ Aug 08 17:17:54 Rockmaninoff: Yeah, the activity I think.. Aug 08 17:18:03 Rock: I'll give it a try. Aug 08 17:18:09 hm, i may have misunderstood Aug 08 17:18:12 worth a shot though Aug 08 17:18:28 Woah what? The activity name should't have an effect on the shortcut name? Aug 08 17:18:38 It does for the launchging activity Aug 08 17:18:50 And the install/uninstall program name? Aug 08 17:18:51 Hence why Maps has like 4 icons with different names Aug 08 17:19:12 That makes sense, my Activity is the more formal name Aug 08 17:19:15 Oh! I understand the problem now. Aug 08 17:19:17 Touché! Aug 08 17:19:20 Is it easy to rename the Activity? Aug 08 17:19:25 Places, Maps, Nav, etc are just Activity names. Maps is the Application name Aug 08 17:19:31 name="Blahz" Aug 08 17:19:59 in my main .java file I have TheWall_AndroidActivity.java and public class TheWall_AndroidActivity{ Aug 08 17:20:05 Do I need to change those as well? Aug 08 17:20:09 No Aug 08 17:20:12 Ah, okay Aug 08 17:20:16 Just in your manifest Aug 08 17:20:17 Just in the manifest file Aug 08 17:20:22 K, TY. I'll give it a shot Aug 08 17:22:38 :| Aug 08 17:24:47 Jug6-away, i'm fairly certain it's because it isn't recalculating the gradient so it just goes completely transparent or something Aug 08 17:25:53 Jug6-away, setting the background after the fact has no effect :( Aug 08 17:31:18 ok, SO, using linearlayout + textview and resetting the bg works, but it fails with tablelayout Aug 08 17:31:25 lol, definitely some unexpected behavior here Aug 08 17:33:46 ok, update, updating the textview even before adding it to the parent view makes the bg disappear Aug 08 17:33:56 so, setting the padding, setting the width, etc, all make the bg disappear Aug 08 17:34:57 basically anything internal will do this, i'll try margin next Aug 08 17:39:53 ok, setting margins use layoutparams also makes the bg disappear Aug 08 17:40:02 i have no clue how to solve this problem :| Aug 08 17:40:24 code? Aug 08 17:43:59 zambo, http://pastie.org/private/4rrqn862o6k4s8xjljsza <-- xml Aug 08 17:44:21 then i programatically create textviews and add them to the linearlayout "twitterTable" Aug 08 17:45:39 if i try to set the width of the textview, set padding, or add margins using layoutparams, the background of the relativelayout wrapping it disappears Aug 08 17:47:10 Have you tried looking at it with show layout bounds/show surface updates on? (if you have a JB device) Aug 08 17:48:38 Hey guys, if I wanna make a collection of an undeterminate number of buttons, what should I store them in? Aug 08 17:48:56 id suggest a Collection Aug 08 17:48:59 since you said you want that Aug 08 17:49:08 or do you mean what ViewGroup Aug 08 17:49:11 Ah, so that's what it's called Aug 08 17:49:21 Nah, I think I need it code-wise Aug 08 17:49:29 Since the number depends on how many elements there are on a website Aug 08 17:49:31 well then it really depends what you're doing with them Aug 08 17:49:34 It makes a button for each with an image Aug 08 17:49:38 there are various Collcetion classes Aug 08 17:50:08 I'm not very familiar with Java, in C++ I'd use a vector Aug 08 17:50:09 @kaneda: also, have you tried taking off fillViewPort? Aug 08 17:50:25 zambo, i dont have a JB device Aug 08 17:50:59 zambo, it seems unlikely for this to be the issue Aug 08 17:51:08 agreed Aug 08 17:51:42 vector = ArrayList Aug 08 17:51:54 Thanks Aug 08 17:52:06 it's realy weird, the bg is THERE when the feed is loadnig, it disappears after i set the margins Aug 08 17:52:10 but a primitive array also sounds sufficient for your purpose Aug 08 17:52:12 and i can't RESET it either at that opint Aug 08 17:52:16 is there some kind of limit for gradients? Aug 08 17:52:25 since i have the bg defined as a rectangle w/ corners and a gradient Aug 08 17:52:52 I could probably work with a simple array too, but a list should be better Aug 08 17:55:26 blurgh splits Aug 08 17:55:29 keep it together freenode Aug 08 17:55:44 params.setMargins(0, 0, 0, 10); <-- this line alone does it Aug 08 17:55:56 i can isolate it down to this line if i use the layoutparams method Aug 08 17:56:11 and then u need to call set params Aug 08 17:56:36 yes, sometime later i do... Aug 08 17:58:37 i think it's some kind of height maximum Aug 08 17:58:48 if i set margin of -10 and it gets cut off it shows the bg Aug 08 18:03:10 bummer, Trello doesn't work on Froyo :( Aug 08 18:03:19 froyo :| Aug 08 18:03:29 ics is old enough :P Aug 08 18:03:35 why when i put a background on a button it acts differently on ics Aug 08 18:03:36 :/ Aug 08 18:04:06 it has a different behavior on older versions Aug 08 18:06:38 ok, so it's definitely an issue of height Aug 08 18:06:50 guys, there appears to be a maximum area that a shape can cover Aug 08 18:07:07 so it looks like i just need to display fewer tweets Aug 08 18:07:23 To handle a button purely in code and set its parent and position and things do I have to use AccesibilityNodeInfo? Aug 08 18:07:33 Purely in code as in no xml Aug 08 18:08:15 Button foo = new Button(context); foo.setOnClickListener(new OnClickListener() { ... }); parentView.addView(foo); Aug 08 18:08:42 Ah, I can add it to the parent, nice Aug 08 18:08:48 What am I supposed to use for context tho? Aug 08 18:08:57 this? Aug 08 18:09:05 or getBaseContext() Aug 08 18:09:10 RazielZ, if it's an activity, use "this" Aug 08 18:09:16 if it's a fragment use "getActivity()" Aug 08 18:09:27 Thanks! Aug 08 18:17:12 anyone else seen this? Aug 08 18:17:27 yes Aug 08 18:17:31 RazielZ: be careful though, if you are inside a fragment, getActivity() may return null depending where you call it Aug 08 18:17:43 depending on* Aug 08 18:18:06 I see Aug 08 18:18:11 siyb, a fragment must be attached to an activity in order to be shown Aug 08 18:18:17 getActivity() shoudlnt return null i think Aug 08 18:18:30 kaneda^: we had issues like that on OC Aug 08 18:18:34 strange Aug 08 18:18:58 i had issues where my bundle would be null or something of the like, i ended up packing all that into an intent Aug 08 18:19:11 right now i'm having a raelly weird issue where if a relativelayout is too tall the drawable background disappears Aug 08 18:19:13 any ideas why? Aug 08 18:21:00 Should pass resolved color instead of resource id here: getResources().getColor(android.R.color.black) Aug 08 18:21:01 wat Aug 08 18:21:37 oh Aug 08 18:21:42 the error message tells me waht it SHOULD be Aug 08 18:21:45 RazielZ: basically, you don't want to call a fragment method from the outside containing getActivity(), unless you are absolutly positive that it has already been attached Aug 08 18:22:15 Still gotta look into them, I'm just starting with Android stuff Aug 08 18:22:46 ah ok, if you are inside an activity there is no need to worry anyway ;) Aug 08 18:22:56 Yup, should be fine for now Aug 08 18:22:57 canadiancow|work, ever encounter a shape too large to have a drawable background? Aug 08 18:23:16 Also, is there any way to add downloaded files to resources? Aug 08 18:23:37 Like, downloaded by the app, to register them as @drawable or something. Aug 08 18:23:39 RazielZ: i still suggest that you take a look at fragments very soon, otherwise you might end up with unstructured long activities Aug 08 18:24:00 RazielZ, yes there is Aug 08 18:24:02 I'll look into it soon then Aug 08 18:25:13 kaneda^ wat Aug 08 18:25:21 i dont have any shapes bigger than my screen Aug 08 18:25:24 because that's... pointless Aug 08 18:25:31 canadiancow|work, if the height of my relative layout is too large the background disappears Aug 08 18:25:34 and it's ina scrollview silly Aug 08 18:25:50 it disappears? Aug 08 18:25:58 yah, the background drawable becomes transparent it looks like Aug 08 18:28:28 Also, I gotta remember to stop trying to findByViewID before onCreate >.> Aug 08 18:29:00 what method are you findViewById'ing in? Aug 08 18:29:14 The relative layout Aug 08 18:29:27 Of the activity that gets created in that class Aug 08 18:29:48 Obviously trying to find it before it's create crashed with a nullpointer error Aug 08 18:29:55 OOOOOOH. Aug 08 18:30:00 I have a button on the page. Aug 08 18:30:00 i agree with wongk on this Aug 08 18:30:05 Which means it works. Aug 08 18:30:08 where are you calling findViewById Aug 08 18:30:27 Well now I'm calling it after onCreate, because calling it before crashes Aug 08 18:30:28 because it should be in onCreate Aug 08 18:30:29 because "before oncreate" tends to mean "in the constructor", which is bad Aug 08 18:30:35 Yep Aug 08 18:30:52 It's in onCreate now Aug 08 18:31:01 after the super.onCreate Aug 08 18:31:57 And works properly Aug 08 18:32:22 But for some undeterminate reason there's a small white bar/part at the bottom of that page. Aug 08 18:32:36 Background not scaling properly maybe? Aug 08 18:32:40 Oh wait. Aug 08 18:32:46 doubt it Aug 08 18:32:51 It's wrapped in an scroll Aug 08 18:32:58 A scrollview* Aug 08 18:33:10 So I need a scrolling background for it, I guess. Aug 08 18:33:23 scrolling background? Aug 08 18:33:25 ... Aug 08 18:33:35 ...I dunno <.< Aug 08 18:33:51 It's not even scrolling right now. As in, it doesn't have anything to scroll for. Aug 08 18:46:27 hi, i am working on a project which is written as a launcher and it will be installed only on our devices. I have to connect wifi networks and I used "ACTION_WIFI_SETTINGS" intent. But in this menu user can use notification menu, and in this menu there are some setting. Device is rooted btw. How can I disable notification menu in wifi connection intent? If I cannot find a solution, i will have to develop my own wifi manager. Aug 08 18:48:33 huh? Aug 08 18:48:39 hey guys, ListView is creating a little white line at the bottom of my list. can someone tell me what it is? Aug 08 18:48:40 You're probably going to have to modify the settings app as well. Aug 08 18:49:11 there's no way to assume that 3rd party apps won't send an intent for ACTION_WIFI_SETTINGS as well Aug 08 18:50:07 I'm also not quite sure what the question is, though. Your problem is that the notification shade has an option for enabling wifi? You'll need to modify the notification layout in the frameworks in that case. Aug 08 18:50:11 maybe i need to put an empty item at the end? Aug 08 18:50:34 kingargon: not sure what you mean. There are several xml attributes you might want to try setting, however. Aug 08 18:50:57 its drving me frickin crazy! The list works fine but it draws a white horizontal line at the bottom of the last list Aug 08 18:51:14 even with a divider Aug 08 18:52:50 ive tried divider=#00000000 and height =0dip Aug 08 18:53:08 which works great for the rest of the items. but not the last one Aug 08 18:55:06 how to get link of app i uploaded on google app Aug 08 18:55:12 i have to wait? Aug 08 18:55:51 https://play.google.com/store/apps/details?id=your.package.name Aug 08 18:58:21 lov: what i need is, there will be no way to navigate to device settings, my app is full screen and when user slides from top to bottom nothing happens, but in the wifi configuration screen user can open notification menu, and there are some settings in this area. Aug 08 18:59:18 nigihayami: If you control the device firmware, you'll need to recompile the settings app so that the theme for the wifi settings is fullscreen. Aug 08 18:59:29 If you do not control the device firmware, there is little that you can do aside from making your own wifi settings screen. Aug 08 18:59:43 kingargon: code? Aug 08 19:00:19 Whyyy does setBackground say it needs API16? Aug 08 19:00:58 lov: thanks, I can also find wifi settings source code and turn it into activity. Do you know where can I find it? Aug 08 19:01:38 nigihayami: source.android.com Aug 08 19:02:12 ty Aug 08 19:05:38 ugh Aug 08 19:06:22 canadiancow|work, ugh Aug 08 19:07:18 Hmm Aug 08 19:07:29 I have this ImageButton but can't get an image on it. Aug 08 19:08:07 Drawable t1 = Drawable.createFromPath(Environment.getExternalStorageDirectory().toString()+"t1.png"); Aug 08 19:08:07 buttons.get(0).setImageDrawable(t1); Aug 08 19:08:17 Yes, t1.png is on the root of the sdcard Aug 08 19:13:15 I've got usb debugging enabled on my phone it was working and now its stopped. adb devices doesn't show any devices. I've restarted my phone and my computer Aug 08 19:13:25 kaneda^ i had more to say but my phone rang :P Aug 08 19:13:38 ;p Aug 08 19:13:55 heh, ot but adorable http://imgur.com/qeYIL Aug 08 19:14:28 horse: "dat ass" Aug 08 19:16:04 Waynes, i was thinking the same thing Aug 08 19:16:23 hey kaneda^ Aug 08 19:17:07 yo devslash Aug 08 19:17:32 for some reason usb debugging just stopped working Aug 08 19:17:49 restart your phone Aug 08 19:17:52 i did Aug 08 19:17:54 and my computer Aug 08 19:18:03 does logcat say "waiting for device" continuously? Aug 08 19:18:06 no Aug 08 19:18:10 what does it say? Aug 08 19:18:18 oh hang on its off now Aug 08 19:18:57 I'm going to reflash this rom before i restart Aug 08 19:19:17 ouch Aug 08 19:19:18 lol Aug 08 19:19:28 que ? Aug 08 19:27:17 i tried my app on the emu and a G2 and theres no line, but theres a line when i try it on a droid2 Aug 08 19:30:30 quick question, Im trying to send a hex string over a socket.. the sending works, however its sent as a ascii string, not hex.. Aug 08 19:31:03 whats the easiest way to something like 001FB222 being sent as just that? Aug 08 19:31:20 Lol. Aug 08 19:31:23 I found the problem guize! Aug 08 19:31:24 :P Aug 08 19:31:36 I/System.out(20614): /storage/sdcard0t1.png Aug 08 19:31:46 SOMEONE doesn't add a terminating / by himself Aug 08 19:31:47 tsk tsk Aug 08 19:35:49 http://developer.android.com/reference/android/graphics/Bitmap.html is "prepresenting" in the documentation for setPixels a typo of representing? Or what does prepresenting mean? Aug 08 19:36:33 yes, that's a typo Aug 08 19:36:40 An_Ony_Moose: I think it's a typo Aug 08 19:36:50 RazielZ: this is why you should use the File class Aug 08 19:37:03 RazielZ: File f = new File(Environment.getExternalStorage(), "t1.png"); Aug 08 19:37:20 Ah Aug 08 19:38:20 it's generally not good to places files willy nilly on the sd card root Aug 08 19:38:45 wongk lets be honest, its the worst :P Aug 08 19:39:07 it will send canadiancow|work into a fit of rage Aug 08 19:39:20 omfg Aug 08 19:39:21 dont do it Aug 08 19:39:25 xD Aug 08 19:39:46 y is it so hard to .getExternalFileDir()? Aug 08 19:40:26 lov: hm ok thanks :) Aug 08 19:40:40 lov is all knowing Aug 08 19:40:51 hellos Aug 08 19:40:57 * Jug6-away is all tired Aug 08 19:41:22 is there any way to bypass mmap's minimum address restriction, so that i could mmap 0x1000 (not interested in mmaping NULL, not looking for an exploit) Aug 08 19:41:29 seems the lowest address is 0x8000 Aug 08 19:42:27 NovaSt0rM: i think theres a thing in /proc/sys for that Aug 08 19:42:33 o rly? Aug 08 19:42:48 NovaSt0rM: /proc/sys/vm/mmap_min_addr Aug 08 19:42:56 that's unwritable unless you're root Aug 08 19:43:03 its set to ~64kb on my end Aug 08 19:43:15 of course, or the exploits could just turn the safety off Aug 08 19:43:26 but thats about the oblt way to lower it Aug 08 19:43:30 only* Aug 08 19:43:33 i'm not looking for an expoit, besides 64k is as arbitrary as 0x1000 Aug 08 19:43:47 just explaining why it needs root Aug 08 19:44:13 why do you need to mmap something at 0x1000, out of curiosity? Aug 08 19:44:16 i was hoping there was some way an app could say "I know what I'm doing, I don't want page zero, just page 1+, fscking give it to me" :) Aug 08 19:44:40 Jesus: writing an emulator Aug 08 19:45:07 i suppose the whole min_addr is there to protect against kernel exploits Aug 08 19:45:11 NovaSt0rM: what if you trap segfault, inspect the stack, and then emulate the instruction? Aug 08 19:45:25 oi Aug 08 19:45:33 map those pages to another region Aug 08 19:45:33 i suppose LDR/LDM are pretty simple instructions Aug 08 19:45:34 NovaSt0rM, not that you couldnt just load an exploit Aug 08 19:46:03 clever: that's an option .. would be so slow though Aug 08 19:46:03 NovaSt0rM: you would basicaly be implementing some swap at the userspace level, in a very in-efficient manner Aug 08 19:46:17 a swap for every access Aug 08 19:46:24 it wouldnt actualy be to disk Aug 08 19:46:32 just use some pages at a higher address Aug 08 19:46:44 it would still be hundreds, probably thousands of cycles per hit Aug 08 19:47:06 all depends on how much the app hits the lower pages Aug 08 19:47:14 yeah Aug 08 19:47:42 NovaSt0rM: do you really need to map or trace that address anyway? Aug 08 19:47:52 what are you emulating? Aug 08 19:48:13 p_l: an ARM app :/ Aug 08 19:48:31 i need to go @ 0x1000, no relocation possible Aug 08 19:48:37 i/it Aug 08 19:48:41 dynamic recompile Aug 08 19:48:48 setMinimumHeight(int) - is the int px, dp or something else? Aug 08 19:48:53 px Aug 08 19:49:00 Any way to make it dp? Aug 08 19:49:09 Hmm Aug 08 19:49:20 I think I can use a general xml for the buttons that they load when they create Aug 08 19:49:26 NovaSt0rM: manually relocate, then trap cases where relocation failed and dynamically patch Aug 08 19:49:26 And do that there, right? Aug 08 19:49:26 TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, VALUE_IN_DP, getResources().getDisplayMetrics()) Aug 08 19:49:35 Or I could do that Aug 08 19:49:55 p_l: yeah .. life would just be much easier if i could mmap the lower pages Aug 08 19:50:18 well, you can require root ;) Aug 08 19:50:40 that's evil :) Aug 08 19:50:59 i'm thinking a fault handler may be the way to go Aug 08 19:51:29 just something generic that will simulate the actual arm instruction process-wide Aug 08 19:52:28 so do and of you guys work on android? Aug 08 19:52:45 or at google? Aug 08 19:53:04 I work. Aug 08 19:53:17 on the haskell parts of android? :) Aug 08 19:54:00 Sweet dream. Aug 08 19:54:04 =) Aug 08 19:55:17 NovaSt0rM, look up at the top of the user list Aug 08 19:55:21 you will see someone who works at google :P Aug 08 19:55:35 if you're sorted by status :P Aug 08 19:56:22 ah :) Aug 08 19:56:30 stick around an you'll get to know the googlers Aug 08 19:57:26 and assorted celebrities. Aug 08 19:57:47 justin beiber drops by occasionally Aug 08 19:57:52 wongk: ... Aug 08 19:58:07 =D Aug 08 19:58:21 he's trying to break into the whole android dev thing eh Aug 08 19:58:24 music not working out for him Aug 08 19:58:48 nothing gets the hoes like android development Aug 08 19:59:11 Yep Aug 08 19:59:14 not android java dev, only ndk Aug 08 19:59:16 * NovaSt0rM ducks Aug 08 19:59:25 Today when I told my gf I made a button that does nothing, she was all over me. Aug 08 19:59:34 lol Aug 08 20:00:07 RazielZ: she was trying to see whether she could still press your buttons :P Aug 08 20:00:17 and that failed, of course Aug 08 20:00:18 :D Aug 08 20:00:38 ... mistook her for the garbage collector? Aug 08 20:00:50 * NovaSt0rM ducks again Aug 08 20:01:06 tough crowd Aug 08 20:01:08 * NovaSt0rM looks around Aug 08 20:01:13 I lold Aug 08 20:01:47 hmmm... tracing GC? ;) Aug 08 20:02:05 i see i've setup a downward spiral :P Aug 08 20:02:19 lol Aug 08 20:02:38 wongk: we are not yet discussing relationship advice, so the spiral has a lot more to go ;) Aug 08 20:05:46 .... Aug 08 20:05:58 I'm going to just +m this channel and never look back. Aug 08 20:06:26 oh, snap Aug 08 20:06:59 lov, some men just want to watch the world burn Aug 08 20:07:21 I'll keep you warm for the rest of your life, how about that Aug 08 20:07:33 ... Aug 08 20:07:46 * lov sets kaneda^ on fire Aug 08 20:08:27 i think that means i'm yuor whole world, which is sweet ;) Aug 08 20:09:27 is there an easy way to tell in my app if the device that the user is on is a phone vs tablet ? Aug 08 20:09:49 kaneda^: nvm Aug 08 20:09:53 devslash: "no" Aug 08 20:10:03 use layout-large, etc. Aug 08 20:10:19 i want to display a toast in a certain situation but only on phones Aug 08 20:10:34 see also http://developer.android.com/guide/practices/screens_support.html Aug 08 20:10:45 devslash: in what situation? Aug 08 20:10:49 you might want to just check for telephony Aug 08 20:12:06 i have a preference to set the orientation and if they don't select landscape i want to show a toast to tell them that landscape is best for this app but only on a phone because on a tablet it doest matter Aug 08 20:12:13 any API for screen size? Aug 08 20:12:18 physical dimensions? Aug 08 20:12:18 [16:07:46] * lov sets kaneda^ on fire Aug 08 20:12:22 i read that as lov sends kindle fire Aug 08 20:13:09 gettin warm in here ;p Aug 08 20:13:29 so take off... Aug 08 20:13:31 uh, you should just be able to query the Configuration Aug 08 20:13:32 * canadiancow|work dances **** ENDING LOGGING AT Wed Aug 08 20:13:49 2012 **** BEGIN LOGGING AT Wed Aug 08 20:14:16 2012 Aug 08 20:20:49 could someone explain why https://developers.google.com/maps/documentation/android/reference/com/google/android/maps/MapView.LayoutParams#BOTTOM is horizontal not vertical alignment? Aug 08 20:21:20 anyone ever seen location values like these? or know what could cause them? https://groups.google.com/d/topic/android-developers/lc2RVG6_WCc/discussion Aug 08 20:21:23 faulty gps modules? Aug 08 20:22:20 not sure how *'s or paren's are possible when location.getLat/getLon return doubles. Aug 08 20:23:44 or a bug in String.valueOf(double) Aug 08 20:25:45 "bug" Aug 08 20:26:40 Do I need to do anything else besides add menu items in onCreateOptionsMenu() to make the menu button show up in the toolbar at the bottom of the screen on ICS/JB devices? Aug 08 20:32:45 Ah. It was appearing in the title bar, which wasn't showing because I had a theme of NoTitleBar. Easier question.. How do I put it in the launcher bar instead? Aug 08 20:37:09 Do you know any 3d perspective listview that's open source? **** ENDING LOGGING AT Wed Aug 08 20:41:31 2012 **** BEGIN LOGGING AT Wed Aug 08 20:42:22 2012 Aug 08 21:05:14 Is there a way to access the service bound to immediately after calling bindService? My ServiceConnection' onServiceConnection doesn't seem to get called until after onStart (which calls bindservice) has finished. Aug 08 21:05:37 This is a problem because I need to access the service to determine whether or not to forward the user to another activity instead. Aug 08 21:05:56 no Aug 08 21:06:02 it's asynchronous Aug 08 21:07:05 eXeC64: is there a reason you can't forward the user in onServiceConnection? Aug 08 21:08:29 ryanm, I could do that yes. I just need to have a pointer to the activity in there for creating the intent. However, the "this" keyword points to the ServiceConnection instance, is there a nice way to access the Activity instance without just having a variable containing the reference? Aug 08 21:09:39 eXeC64: depends, how are you creating the serviceconnection? Aug 08 21:09:40 YourActivity.this Aug 08 21:10:04 If I have several Views which need to move from fixed locations (swap, basically)... does it make more sense to actually move that View, or just change the text? Aug 08 21:10:05 S3nsat10n's suggestion is most likely correct, assuming it's an inner class of YourActivity Aug 08 21:10:06 ryanm, "private ServiceConnection mConnection = new ServiceConnection() {" within the Activity class Aug 08 21:10:15 then yeah, what S3nsat10n said Aug 08 21:10:38 Thank you both of you then :) Aug 08 21:10:51 np Aug 08 21:23:58 What's the best way to handle a database-type app? Like, you have a list of stuff and each has different info. Would each be a different activity? Aug 08 21:37:15 hmm, some of my bitmaps are getting corrupted occassionally, how can i check for corruption? Aug 08 21:38:02 like, the bits change out from under you? Aug 08 21:38:12 How can I set the android emulator to allow network on the emulated devices? Aug 08 21:38:21 like, the bitmaps are scrambled after decoding Aug 08 21:38:27 but there's no decoding error Aug 08 21:38:30 Can't find a way to enable any kind of internet access on the emulator Aug 08 21:38:45 eXeC64, Android device manager Aug 08 21:39:30 kaneda^, I'm on that now, there's no tickbox and none of the properties I can add mention networking... unless it's the GSM thing Aug 08 21:39:37 ? add hardware Aug 08 21:39:44 it's at the bottom of the chooser after making a new device Aug 08 21:40:01 Yeah, I'm on that, lcd size, accelerometer etc. Aug 08 21:40:12 but no network/wifi or anything, closest thing is gsm modem Aug 08 21:40:16 but I'm not sure that is it Aug 08 21:40:16 ? Aug 08 21:47:17 To anyone using In App Billing: If you get IN_APP_NOTIFY via broadcast intent when your app is NOT loaded (like, for a refund, slow purchase, etc) - is the proper thing to start your app? (99% NDK in my case) Or cache the info for later? Aug 08 21:48:48 cache for later sounds reasonable Aug 08 21:50:07 hmm, is there a pre-built animation for scaling and moving simultaneously? Aug 08 21:50:22 i want to scale and move an image to the center of the screen on click Aug 08 21:50:29 my current animation looks kind of crappy :/ Aug 08 21:51:20 pfn: Hmm. Guess I could do that, .. just would need to make sure the user can't edit the orders.txt file or whatever I cheat the system with fake orders etc. Aug 08 21:51:26 android:interpolator="@android:anim/linear_interpolator" <-- something like this might do it? Aug 08 21:52:08 I launch a service from my BroadcastReceiver, and it needs to send data to the server. How do I wait for it to connect to the internet? Aug 08 21:53:01 my phone is not connected to the internet when idle Aug 08 21:53:12 so I need to give the service some time to connect Aug 08 21:53:46 I'm getting logcat error of 'Cant open file for reading' off of my app, but I don't have any such message. Anyone know what that is from? Aug 08 22:48:56 hi there, i used such a "ArrayAdapter adapter = new ArrayAdapter(this, android.R.layout.simple_list_item_1, android.R.id.text1, values);" beast, is there smth 'cooler' than a for loop that builds a list with a ton of layouting blocks? Aug 08 22:49:09 where "cooler" might be anything, say onclick+switch styled things e.g. *crosspost* Aug 08 22:49:22 tabakhase: you should ask in ##java Aug 08 22:49:24 (kidding :p) Aug 08 22:49:42 (re: you comment in #android) Aug 08 22:49:49 :P Aug 08 22:50:07 or google :P Aug 08 22:50:48 my android dev knowledge is kinda short yet, so no Idea Aug 08 22:51:01 but coming from java, I don't expect anything fancier or "cool" Aug 08 22:51:15 ive got 12h off experience for now^^ Aug 08 22:51:31 but got some cool forme stroing & managing some data in a sql already =) Aug 08 22:51:37 *-e Aug 08 22:51:39 you're still winning :P Aug 08 22:53:19 just some fancy welcome->checkSettings-(has)>login | -(hasNot)>form->login Aug 08 22:53:45 (login missing) maage settings & clear button, but god thing to gather some theory Aug 08 23:11:33 does anone bother installing apis and making their apps compatible for 3.1/3.2 (honeycomb)? Aug 08 23:19:45 tech1, how do you NOT make it compatible for HC? Aug 08 23:20:18 if i want my minSdkVersion to be 14, i probably wouldnt bother, but if you want to support mor ethan 15% of devices, you're going to end up supporting honeycomb Aug 08 23:29:20 Is there a way to have 2 methods of the sam ename, one targetting api level 16, the other targeting anything previous? I am getting deprecated warnings and, though they ar enot breaking my app, I'd like to resolve them. Aug 08 23:40:37 i see canadian. thanks... i thought no one used honeycomb because of ICS being so much more stable Aug 08 23:41:35 not all HC devices has gotten ICS yet, nor will get, I think Aug 08 23:43:09 I have an interactive array adapter that is a custom listview class. For some reason, when I create the adapter, it loops through the function getView 8 times. On the 9th and final loop, there is a different view id. So the first 8 are the same view. Any idea why it would loop through??? Here is the adapter code: http://pastebin.com/Y7rJL40N Aug 08 23:44:28 i keep getting these annoying login things asking me to sign into my account(motorola.. htc) while installing the sdk platforms. im trying with a fresh sdk and trying not to select the things which will make these annoying login boxes come up.. but i dont want to miss out on critical google stuff.. how can i tell which is which? for example 2.3.3(api 10) has the most stuff which i dont know is official or some weird u Aug 08 23:44:29 nnecessary thing i wont be able to install anyway if i dont have a htc/motorola account.. like "Real3D... ADMIRAL ATRX2" Aug 08 23:45:26 is there a list somewhere which shows which are the standard platform addons? i hate the idea of selecting things then the login box comes up and i press cancel and it dosnt install properly.. then i get a corrupted download file in my sdk Aug 08 23:45:27 Is there a way to attach extra data to a view other than extending that view? a bundle or something Aug 08 23:48:29 also my last sdk i installed everything and it was around 80k files and 2gb. and probably 50% of this stuff was 3rd party nonsense i never used Aug 08 23:51:38 hip2p, im not soo sure what you mean. but android will re-use views...you know that, right? Aug 08 23:52:30 so if youre displaying, for example, 5 items in a list of 20, and u scroll down, to show the 6th, and hide the 1st...android will actually re-use the 1st one to show the 6th. Aug 08 23:52:50 that's what View convertView is Aug 08 23:53:16 somewhat OT question: anyone know where I might be able to find hourly rates for an Android dev? Aug 08 23:53:27 trying to figure out what I should be charging for contract work. Aug 08 23:53:43 depends on how good you are Aug 08 23:54:04 I do primarily .net architecture and framework dev, but I tend to charge around 100/hr Aug 08 23:54:36 Yeah, I'm pretty good Aug 08 23:54:46 I'm not a genius or anything Aug 08 23:54:55 there are definitely better devs out there Aug 08 23:54:56 enneract: setTag/getTag Aug 08 23:55:17 but I'm not some hipster coder :P Aug 08 23:55:32 I was thinking the $100 range Aug 08 23:57:13 ron_frown: 100 what? we don't all have the same currency ;) Aug 08 23:57:36 i hate charging by the hour. Aug 08 23:57:42 personally i demand all payment in gum Aug 08 23:58:01 how do you people deal with learning curves? that is...learning stuff you shold have already known...or claimed you knew, etc? Aug 08 23:58:29 claimed you knew :P Aug 08 23:58:34 bad developer! Aug 08 23:58:49 nah like Aug 08 23:58:58 for example, im an android nooob. totally. Aug 08 23:59:11 so dont charge people Aug 08 23:59:25 im doing a contract for someone now, im billing them for 5 days...even though in reality it has taken me a lot longer because i have had to learn how to code it first. Aug 08 23:59:44 learn android, i mean ;) im an experienced coder Aug 08 23:59:54 sounds fair enough Aug 09 00:00:33 this is an extreme example, because clearly i was starting from scratch. but sometimes on other onctracts ive worked, i have not billed due to learning curves... Aug 09 00:00:53 i do that too sometimes when i need to learn something Aug 09 00:01:11 ...even though i often think i should. it's part of the job. nobobdy acn sit down and code straight for 8 hours without needing to look up / research / etc...IMO. Aug 09 00:02:05 yeh true most of the time Aug 09 00:02:20 i took this job on mostly as an excuse to learn android :P Aug 09 00:02:39 how did you get the job? Aug 09 00:02:52 yeah, i don't charge for learning Aug 09 00:03:06 how do i assign an id to a layout? i added one to the GUI editor but i can't reference it using findViewById Aug 09 00:03:15 juts an old colleague...he builds mobile apps thesedays...just word of mouth. he has tonnes of work. but he's more into IOS so he will give me android jobs. Aug 09 00:03:36 apparently. Aug 09 00:03:47 ahh cool Aug 09 00:03:50 you? Aug 09 00:04:07 there are far too many people out there who say "oh im an android expert", charge a client tens or hundreds of thousands of dollars for an app Aug 09 00:04:15 and tehn flood the play store with shitty apps Aug 09 00:04:22 that get millions of users because its for a huge company Aug 09 00:04:41 im working on my own stuff but i dont know many people in RL so i lurk around freelance nets/craigslist if i want to get hired Aug 09 00:05:05 tech1, and has that worked for you in terms of getting hired? im in ireland, and there is no shortage of techy work at all. Aug 09 00:05:25 but i want to work on my own terms/contracts/from home...so im giving this sort of thing a shot. Aug 09 00:05:46 its doable but it takes sending a lot of emails etc... for every online job posted, usually dozens of people apply for Aug 09 00:06:06 i want to publish my own stuff mainly anyway though Aug 09 00:06:12 what about that other site...elance, is it? that's where my pal got started. Aug 09 00:06:16 Zider 100usd Aug 09 00:06:21 yeh stuff like elance Aug 09 00:06:35 ron_frown: I'm glad it wasn't yen ;) Aug 09 00:06:54 said it's very competetive due to weaker currency country biddings...but has his foot in the door and now has too much work. Aug 09 00:07:17 tech1, what kinda stuff? to sell or just for fun? Aug 09 00:07:42 iv heard a lot of people say they get more clients when they charge more(because clients think they are better). not sure how true it is though Aug 09 00:07:52 to sell :) its how i plan to make a living Aug 09 00:08:15 im good with coming up with ideas so when i learn android programming better i think ill be able to make a living on it Aug 09 00:08:37 im good at programming but not coming up with ideas Aug 09 00:08:37 haha Aug 09 00:08:51 boing: I'm the opposite.. :P Aug 09 00:09:14 boing: I can do some basic PHP, but that's it, but I have a ton of ideas in the ol' coconut :/ Aug 09 00:09:36 i doubt ill get lucky and make the next angry birds. but if i can release a decent app every 2 months that sells a few thousand each... something like that Aug 09 00:09:56 and each one will get better Aug 09 00:10:05 almost everything has been done and done well :( Aug 09 00:10:34 'almost'.. yes.. :) Aug 09 00:10:35 i know that isnt that attitude to have...but...i find every idea i have, even the "i bet no-one has done this!" has Aug 09 00:10:41 yeh. i have ocd and micro manage everything so i think its a perfect setup for me Aug 09 00:10:42 yeah Aug 09 00:10:49 how do you decide if you store something in the app's private directory or in the shared storage? so what amount can or should i store at most in /data? Aug 09 00:10:52 im ocd'ish myself Aug 09 00:11:01 :) Aug 09 00:11:07 shouldn't that be alphabetical? CDO? :P Aug 09 00:11:50 for example on the galaxy nexus this is the same partition so it makes no difference from the size, but this is not the case for all devices Aug 09 00:25:44 How do I save the authToken into an account? I can get it, but I don't know where to save it. Aug 09 00:26:31 that's already handled by android Aug 09 00:28:14 So that's not the same token I get from a remote service? Aug 09 00:28:19 It's some internal thing Aug 09 00:28:37 the token is saved Aug 09 00:28:49 you got it through AccountManager, correct? Aug 09 00:29:15 No. I got it when I log in via REST. Aug 09 00:29:47 so you're not using AccountManager? Aug 09 00:30:07 I'm trying, I just don't know where to put the token. Aug 09 00:30:22 you have to acquire it through account manager Aug 09 00:30:41 So it's generated by the phone internally? Aug 09 00:31:02 it's gotten by the authenticator for your service Aug 09 00:31:09 which you will also have to write Aug 09 00:31:27 Yes, that's what I'm having trouble with. I don't know how to save it there. Aug 09 00:31:44 AccountManager should save it automatically Aug 09 00:31:53 How does it know where to get it? Aug 09 00:32:02 it gets it from your authenticator Aug 09 00:32:25 So how do I give it to the Authenticator? Aug 09 00:32:34 you'll have to google that Aug 09 00:33:03 I did, that's why I'm here :( Aug 09 00:33:52 http://developer.android.com/training/id-auth/custom_auth.html Aug 09 00:34:07 http://www.finalconcept.com.au/article/view/android-account-manager-step-by-step-1 Aug 09 00:34:46 google search string "accountmanager custom authenticator" Aug 09 00:36:42 wongk-home oh lol I found the solution in one of the comment in the second link that you gave me Aug 09 00:36:47 comments* Aug 09 00:37:11 manager.setAuthToken(account, tokenType, token); Aug 09 00:48:05 are the links on this page broken for anyone else? (terms flash for about a second?) https://play.google.com/about/play-terms.html Aug 09 01:07:10 hi, can anyone tell me what type of preference is being used in the "text message limit" screenshot here: https://developer.android.com/guide/topics/ui/settings.html Aug 09 01:08:51 doc -> I didn't click them all, but they seem to be working Aug 09 01:09:23 these makefiles can be both a nightmare and a blessing :S Aug 09 01:09:30 Is there an event I can attach to that fires before an Activity completes? I want to have a settings page that will auto save when the user clicks back. Aug 09 01:09:47 hmm, thanks Jeremyz, I'm getting the same behaviour on chrome and firefox (an old version of ff though) Aug 09 01:15:24 JeremyZ, you should do that in onPause() Aug 09 01:15:41 *Jeremyz Aug 09 01:16:23 thanks themirror Aug 09 01:20:27 CQN: just been digging through the source, seems it's custom to the MMS app, but an implementaiton of NumberPicker Aug 09 01:20:35 http://source-android.frandroid.com/packages/apps/Mms/src/com/android/mms/ui/NumberPickerDialog.java Aug 09 01:22:00 anyone here ever tried to make a game with a surface view and a canvas? I've got some questions about calculating pixels for the canvas draw methods and was hoping someone might offer some advice Aug 09 01:24:40 the game works well for both mine and my wife's phone, however, when we tried it on the droid4, HTC One X and a Droid3, it's scaling the canvas strangely. I grabbed the pixel density via getWindowManager().getDefaultDisplay().getMetrics(); and the funny thing is that all the devices have the same density but they display the game differently Aug 09 01:24:45 hey guys, does onActivityResult for the support-libs's fragments, actually work? I can't seem to get the callback. Aug 09 01:25:15 so... what can i try next to scale my canvas to the appropriate height and width? Aug 09 01:26:16 all devices return 1.5 density and 240 dpi, so i'm not sure why the screen is shrinking my game down on the HTC One X and the Droids Aug 09 01:27:03 Is there any way to make an HTTP request onPause() ? I can't do it in the current thread, and if I launch a new thread/runnable it won't fire because the activity pauses. Aug 09 01:27:17 farkerhaiku: not touched a surface personally, but is it to do with the soft keys? is that software back/home/apps bar included in the resolution but not usable space? Aug 09 01:28:36 Jeremyz: if this is for saving your preferences, you should probably save them local to your app and have a background sync service upload them Aug 09 01:29:25 They're updating their zip code to get weather conditions. I would like to show the updated conditions when they return to the main screen from the settings screen. Aug 09 01:30:53 Jeremyz: are you using the Preferences API? if you are, you should just be able to read the value in onStart()/onResume() in your main activity Aug 09 01:31:27 there's also http://developer.android.com/reference/java/util/prefs/PreferenceChangeEvent.html Aug 09 01:31:40 doc_savage: i don't believe so, but possibly. I'll check to see if there is some differnt values for xdpi and ydpi that I can use Aug 09 01:32:23 alright, that makes sense. I'll call the weather refresh in a new thread of my main activity Aug 09 01:32:59 farkerhaiku: that is a shot in the dark, I'd verify the height/widthPixels from your DisplayMetrics matches the display's actual resolution Aug 09 01:33:32 Jeremyz: that's the way I'd go, just in case: http://developer.android.com/reference/android/os/AsyncTask.html Aug 09 01:36:29 doc_savage: thanks a lot! Aug 09 01:36:44 np :) Aug 09 01:38:11 doc_savage: yup, that's it. heightPixels and widthPixels is where the only difference is. I'll have to do some more math i guess, thanks :) Aug 09 01:38:24 hehe yeah :) Aug 09 01:38:50 doc_savage: i'm creating a site browser and looking to include a font setting in my preferences Aug 09 01:38:56 would the numberpicker be the best choice? Aug 09 01:38:58 or should i use a slider? Aug 09 01:39:18 it's not like the results will be seen immediately, since the user will have to go back to the main screen, so i'm not sure a slider would be that useful Aug 09 01:39:56 farkerhaiku: doc_savage: i don't believe so, but possibly. I'll check to see if there is some differnt values for xdpi and ydpi that I can use << don't use these values Aug 09 01:41:23 CQN: I think you'd probably be better with a ListPreference, if you pull the source for it, there may be a ListAdapter behind there you can override getView() to set the font on the name ... I've not looked though Aug 09 01:42:59 doc_savage: alright, thanks again Aug 09 01:43:26 i guess i should just have 'small', 'med' and 'large' then Aug 09 01:43:31 and not integers Aug 09 01:43:58 ah, yes, sorry, I thought you meant font typeface setting, rather than size, yes, I'd do that then Aug 09 01:47:52 romainguy__: I should use heightPixels and widthPixels to figure out the proper scaling, correct? Also, big fan of your blog and photos :) Aug 09 01:48:01 no, use the density scale factor Aug 09 01:55:55 romainguy: I found one of your posts on the subject, but it didn't help me in this particular case as the density was the same on all devices (1.5). Aug 09 01:58:01 i'm dynamically making a table and rows that are a scrollview and horizontal scrollview… for some reason it won't scroll Aug 09 01:58:03 http://pastebin.com/z2XeWZ3J Aug 09 01:58:25 it puts a 4x4 grid of buttons on the screen, with a 5th column and row that it should allow me to scroll to **** ENDING LOGGING AT Thu Aug 09 02:59:59 2012