**** BEGIN LOGGING AT Fri Aug 24 03:00:04 2012 Aug 24 03:01:41 does anyone have hanging with friends installed on their device? Aug 24 03:01:58 no Aug 24 03:02:10 thanks SimonVT Aug 24 03:02:12 appreciate it Aug 24 03:02:18 You're welcome Aug 24 03:04:10 I don't either, canadiancow Aug 24 03:04:20 I suppose I -could- Aug 24 03:06:17 no i need the old version Aug 24 03:06:25 not the update we just released Aug 24 03:06:35 so i need someone who already had it :P Aug 24 03:07:30 checkout the repo as it were when you released it, rebuild :p Aug 24 03:24:30 wow, a sane time picker widget http://phandroid.com/2012/08/23/timer-is-a-beautiful-holo-themed-app-thats-both-elegant-and-functional-video/ Aug 24 03:26:45 zomg.. screen prefs back in the menu bar! Aug 24 03:26:54 oops :p Aug 24 03:56:01 So I am trying to set the arguments for a constructor with a fragment and following the instructions on this page: http://developer.android.com/reference/android/app/Fragment.html however it seems like when they use args.putInt() there are only puts for primitive types, is there a way to pass a class like LocationManager into a fragment in the constructor? Aug 24 04:07:08 the args is a Bundle, so if it can go in a Bundle, it can go int here Aug 24 04:07:35 you can put Serializable objects in a bundle Aug 24 04:08:09 but why would you want to put LocationManager into it? That doesn't make sense Aug 24 04:08:15 just get the location manager from the fragment Aug 24 04:08:24 i thought they advise against serilalizable objects in bundles Aug 24 04:08:39 hmm, i guess I could do that Aug 24 04:09:51 is that going to be a problem if I have multiple fragments that all need access to the locationManager/ Aug 24 04:09:52 ? Aug 24 04:10:00 No Aug 24 04:10:03 why would it? Aug 24 04:10:28 idk, perhapse if it reinitializes the gps each time you get the object or something, kinda new to the API Aug 24 04:11:26 anyway, thanks for pointing that out Aug 24 04:19:32 I'm looking at the documentation for the Intent constructors ... it doesn't make it very clear what the various constructors are intended to do Aug 24 04:19:38 no pun intended ... doubly so ;p Aug 24 04:20:54 http://developer.android.com/reference/android/content/Intent.html Aug 24 04:20:54 hmm, i was about to complement you on a good pun but in that case... Aug 24 04:21:04 lol Aug 24 04:21:16 http://developer.android.com/reference/android/content/Intent.html#Intent() as well Aug 24 04:21:26 Already reading that Aug 24 04:21:52 seems to be pretty clear about what they do Aug 24 04:22:26 I'm still pretty new to android terminology. terms like "action", "uri", etc are a bit ... nebulous to me Aug 24 04:24:15 uri isn't an Android term... Aug 24 04:24:19 http://developer.android.com/guide/components/fundamentals.html Aug 24 04:24:40 http://developer.android.com/guide/components/intents-filters.html Aug 24 04:25:44 Leeds: certainly not, but how often when learning a new language, or API have you found a term someone overloaded for their own purposes and it turned out their use of the term was only similar to what you expected Aug 24 04:26:01 how has Android changed the term URI? Aug 24 04:26:07 I didn't say it did Aug 24 04:26:18 no, you just implied Aug 24 04:27:16 mmm, not really. Aug 24 04:27:31 kinda did Aug 24 04:27:46 I don't know what to expect; making assumptions usually gets me more confused Aug 24 04:28:30 for example, I assumed an Intent was like a thread when I started learning about Android, based on how I saw someone use an Activity in their code. Aug 24 04:29:09 http://en.wikipedia.org/wiki/Uniform_resource_identifier Aug 24 04:30:12 ftc: so, we could be talking about a web address, a package name, a filesystem path, in windows maybe a registry path ... see my point? Aug 24 04:30:46 phantal: I'm interested to know how http://developer.android.com/training/basics/intents/index.html led you to believe that an Intent was like a thread Aug 24 04:30:55 yep, that was more directed at t0mless Aug 24 04:31:17 Leeds: It didn't, I read someone's code and made a bad assumption Aug 24 04:31:22 er nvm i am getting people mixed up here i think Aug 24 04:31:29 By saying you made an assumption is supposed to make me think you weren't implying you made an assumption? Aug 24 04:31:32 and you know what they say about assumptions... Aug 24 04:31:46 Leeds: you're making my point, you know Aug 24 04:31:55 nope, I'm making my point Aug 24 04:32:16 that point being "don't assume until you've read the docs" Aug 24 04:32:18 Anyway, the API guides on d.android.com are probably a better plan for learning Aug 24 04:32:29 t0mless: no doubt Aug 24 04:38:53 anyone know how to make the zoom buttons a webview appear when it loads, only seem to appear when u pan? Aug 24 04:46:43 if you have a view that has it's visibility:gone how do you measure it's height before making it visible? Aug 24 04:48:03 make its visibility as invisible and have it layout/measure the view? Aug 24 04:48:13 then make it visible Aug 24 05:28:34 t0mless: i can't because it expands the scrollable view to far :( Aug 24 06:02:43 hello people Aug 24 06:02:59 i am facing an issue while starting an email intent Aug 24 06:03:45 actually i have a view which is a webview with a button on the side which on click launches the email intent and opens email in the email client Aug 24 06:04:38 on sending/discarding the message when i come back to the activity having the webview, the webview kind of scrolls to the top Aug 24 06:05:32 suprisingly this doesn't happen when when i dismiss the soft keyboard before i send/discard the mail Aug 24 06:08:24 any idea how can i resolve this ? Aug 24 06:32:59 *crickets* Aug 24 06:33:34 *crick crick crick* Aug 24 06:34:24 *moo* Aug 24 06:35:04 :O Aug 24 06:36:32 I realized after the fact that my message would've had a great impact if my nick were representative of a cow, perhaps from Canada. A Canadian cow, if you will. Aug 24 06:36:44 greater* Aug 24 06:39:48 hey EddieRingle|MBP Aug 24 06:40:00 hi Aug 24 06:40:35 i am facing an issue with the webview scroll stuff Aug 24 06:40:40 actually i have a view which is a webview with a button on the side which on click launches the email intent and opens email in the email client Aug 24 06:40:50 on sending/discarding the message when i come back to the activity having the webview, the webview kind of scrolls to the top Aug 24 06:41:08 suprisingly this doesn't happen when when i dismiss the soft keyboard before i send/discard the mail Aug 24 06:41:23 any idea why this is happening and how can i resolve this Aug 24 06:42:18 I don't think I can quite visualize what you're trying to do Aug 24 06:42:32 ok Aug 24 06:43:24 consider there is an activity with a view having gallery at the top followed by a webview below it and a button launching an email Intent at the side of the webview Aug 24 06:43:46 does the email intent share the contents of the webview? Aug 24 06:43:48 like an image? Aug 24 06:43:56 yes it does Aug 24 06:43:59 ok Aug 24 06:44:18 any reason why you're not employing the Action Bar and using the ShareActionProvider? Aug 24 06:45:26 I have to do it like that way only Aug 24 06:45:44 that's the requirement for me Aug 24 06:45:53 ok Aug 24 06:45:55 because there are other button too Aug 24 06:46:07 is the webview always containing an image? Aug 24 06:46:19 no the webview doens't contain any image Aug 24 06:46:29 just html content Aug 24 06:47:01 and your issue is that upon returning from sending the email it resets to the original scroll position? Aug 24 06:47:10 correct Aug 24 06:47:28 the webview scrolls up and i can't see the gallery Aug 24 06:48:12 moreover this happens when i don't discard the keyboard before sending/discard the email in the email client Aug 24 06:48:31 if i don't discard it remains the same and the webview doesn't scrolls up Aug 24 06:49:00 the gallery is part of the webview? Aug 24 06:49:17 nope gallery is outside webview Aug 24 06:49:37 these both views are inside a scrollview Aug 24 06:50:11 you shouldn't have a webview inside a scrollview Aug 24 06:51:03 EddieRingle|MBP: why ? Aug 24 06:51:06 that's probably your issue Aug 24 06:51:33 but then normally i won't be able to scroll manually which is a general requirement for me Aug 24 06:51:49 what do you mean scroll manually? Aug 24 06:54:19 i mean that i when i scroll the webview it should scroll along with the gallery Aug 24 06:54:25 means the gallery should scroll also Aug 24 06:55:18 hi I have existing java project and I want to add android project as subproject under it. The thing is the business logic is separate module which I want to use between webapp and android project. Aug 24 06:55:35 EddieRingle|MBP: looks like its due to hardwareacceleration Aug 24 06:55:52 sunny_slls: that sounds like some odd behavior they're asking of you Aug 24 06:56:13 if this sounds good idea then following maven archtype docs at this should I execute the commands under my parent app dir ....http://stand.spree.de/wiki_details_maven_archetypes Aug 24 06:57:00 EddieRingle|MBP: nope didn't work out Aug 24 06:57:06 will the quick-start example command create a subproject or module to say under my parent ? Aug 24 06:57:18 the hardwareacceleration doesn't affect anything Aug 24 06:58:53 sunny_slls: does selecting an item in the gallery update the content of the webview? Aug 24 07:00:12 my existing project is j2ee and I want to make it now android app so am thinking to add the android project as maven module project Aug 24 07:00:13 EddieRingle|MBP: no it doesn't Aug 24 07:01:42 sunny_slls: this app sounds odd Aug 24 07:01:54 EddieRingle|MBP: ok leave that Aug 24 07:02:22 EddieRingle|MBP: suppose i click on the webview in the landscape mode , for the first time it scrolls up Aug 24 07:02:36 this happens only in the landscape mode Aug 24 07:02:54 and only the first time when you click on the webview Aug 24 07:03:13 probably the first time the WebView gains focus Aug 24 07:03:26 just like when you return from the email intent Aug 24 07:04:02 anyone here successfully use any of the BT heart rate monitors with your own app ? Aug 24 07:09:30 i have the makings of a simple tcp client, and i've figured out how to receive messages from the server and put them into a handler… how do i put messages into the handler from the main thread and retrieve them in the server thread? Aug 24 07:20:36 I am trying to get position information for while I am inside a building from a phone and use it to show exact location on a floor map. how can I do this with android(other solutions welcome to)? Aug 24 07:31:02 todun: not easily. there has been some research in this area, not sure what solutions exist Aug 24 07:31:23 okay thanks. Aug 24 07:39:52 what is the most sensitive sensor information android phones can provide? Aug 24 07:43:22 I still want to use ADT for layouts and such, but holy F@#$% Eclipse pisses me off. Any way to use something similar in intelliJ? Aug 24 07:50:04 Blou_Aap use eclipse solely for the layout builder ;) Aug 24 07:54:12 Switching off autobuild seems to speed up things a bit Aug 24 08:01:30 hm, how do I add a progressbar loader to the sherlockactionbar from a fragment Aug 24 08:27:22 can someone look at my tcp client? it connects, but receives one message and disconnects Aug 24 08:27:24 http://pastebin.com/RmF6tVet Aug 24 08:34:19 hmm, how to change the background color of a radiobutton without messing up its arrangement? Aug 24 08:43:22 hello Aug 24 08:43:23 all Aug 24 08:44:05 hi Aug 24 08:44:16 imagespan showing two images Aug 24 08:44:26 do you know anything about tcp clients? Aug 24 08:44:27 but span setted once Aug 24 08:44:31 yes Aug 24 08:45:26 hi Aug 24 08:45:40 how disable showing TWO images by ImageSpan in TextView? Aug 24 08:46:13 i have a linear layout with 5 ImageButton. The weightSum set for the lineasrLayoyt is 6. Each button has a weight set to 1 except was which has 2. So shouldn't that one be double the size of the rest? Aug 24 08:46:19 can you tell me why this disconnects after it receives its first message from the server? http://pastebin.com/RmF6tVet Aug 24 08:49:09 er, why does calling requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); create a progress circle immediately without calling setProgressBarIndeterminateVisibility(true); Aug 24 08:49:26 and calling setProgressBarIndeterminateVisibility(false); wont make it go off Aug 24 08:49:33 ultra- try without while (!reader.ready()) {} Aug 24 08:49:46 how will it loop? Aug 24 08:50:02 readLine Aug 24 08:50:20 !=null Aug 24 08:51:16 while (reader.readLine() != null)? something like that? Aug 24 08:51:24 yes Aug 24 08:51:59 how disable showing TWO images by ImageSpan(Bitmap) in TextView? Aug 24 08:53:46 just to be clear, change while (!reader.ready()) {} to while (reader.readLine() != null) {}? Aug 24 08:54:27 no its must be big loop Aug 24 08:54:32 u just want read the file? no need contents? Aug 24 08:54:49 ok Aug 24 08:54:51 what Exception throws? Aug 24 08:54:53 i'll try Aug 24 08:55:06 btw lets try google; u will see unlimited example for read a stream correctly Aug 24 08:55:58 how disable showing TWO images by ImageSpan(Bitmap) in TextView? Aug 24 08:56:06 ixc you know? Aug 24 08:57:47 bingels: that works, but i get every other msg Aug 24 08:57:47 sry, no Aug 24 08:58:18 http://pastebin.com/4Pmd6MGb Aug 24 09:00:32 works? great Aug 24 09:01:04 and what the new problem? Aug 24 09:01:07 well it works for every other message Aug 24 09:01:14 if i send 2, i get 1 Aug 24 09:01:16 send 2 more, i get 1 Aug 24 09:01:31 send messages yes? Aug 24 09:02:21 it's cause you are reading a line in your while() while((mahString = reader.readLine())!=null){.. bundle.putString("show_msg", mahString); ..} Aug 24 09:02:36 ah! Aug 24 09:02:58 public class TCPClient extends Thread and Handler without Looper its strange Aug 24 09:03:24 Handler gotted only 1 message? Aug 24 09:03:35 yeah Aug 24 09:03:40 hi Aug 24 09:03:49 canvs says the readline int he while loop is eating one of my lines Aug 24 09:04:02 so i think i need something else to make the loop persis Aug 24 09:04:05 persist Aug 24 09:04:10 perhaps just while true Aug 24 09:04:45 on http://pastebin.com/4Pmd6MGb wrong code Aug 24 09:05:28 String mess while ((mess=reader.readLine() )!= null) { bundle.putString("show_msg", mess); Aug 24 09:05:36 replace Aug 24 09:05:52 i think i'm screwing up my sockets b/c it doesn't want to connect again sometimes after i load my app Aug 24 09:05:56 probably b/c i'm not closing anything Aug 24 09:06:08 ok thanks Aug 24 09:06:44 how disable showing TWO images by ImageSpan(Bitmap) in TextView? Aug 24 09:07:01 i wish i could help you, i haven't done anything with that yet Aug 24 09:07:03 *how disable showing TWO images by once ImageSpan(Bitmap) in TextView? Aug 24 09:07:07 i've only been android programming two weeks Aug 24 09:07:08 sorry my bad english Aug 24 09:11:37 so weird Aug 24 09:11:38 while ((message_string = reader.readLine()) != null) { Aug 24 09:11:43 Sorry for the long description of my issue, I just wanted to be accuarate Aug 24 09:11:44 :) Aug 24 09:11:57 thanks in advance Aug 24 09:12:03 that makes the server refuse the connection, but while (reader.readLine() != null) accepts the connection Aug 24 09:12:46 ultra you maked client or server? Aug 24 09:12:54 client Aug 24 09:13:02 the server i'm connecting to is netcat, just to test this out Aug 24 09:14:18 you forgot call openStream(); Aug 24 09:14:27 only getInputStream Aug 24 09:15:09 oops sorry it was for Url Aug 24 09:16:19 openStream from where? Aug 24 09:16:46 no its was mistake Aug 24 09:16:49 ok Aug 24 09:17:34 this is what i have at the moment: http://pastebin.com/uYkqtZKr Aug 24 09:17:46 try read from main stream byte by byte Aug 24 09:18:03 and merge by return carret symbols Aug 24 09:18:06 strings Aug 24 09:19:33 any idea ? please Aug 24 09:20:25 firstdeveloper: i don't see any description of your problem Aug 24 09:20:27 just 'hi' Aug 24 09:20:39 and then an apology Aug 24 09:20:56 ultra-: thanks Aug 24 09:21:11 chances are i can't help (new), but i will if i can Aug 24 09:21:45 ultra-: ha ok ;) Aug 24 09:22:13 http://stackoverflow.com/questions/12106413/progressbar-circle-in-sherlockactionbar-using-fragments Aug 24 09:23:00 how disable showing TWO images by ImageSpan(Bitmap) in TextView? Aug 24 09:26:05 bingles i got it :) Aug 24 09:26:52 while (true) { message_string = reader.readLine(); if (message_string != null) {do code} message_string = null; Aug 24 09:27:12 yessss! Aug 24 09:29:27 O.o Aug 24 09:29:38 hmmm, when are static members of an activity reinitialized.. Aug 24 09:29:55 reinitialized ? Aug 24 09:31:07 they are initialized when the classloader encounters it Aug 24 09:31:11 g00s: well, if a static member of an activity class is initialized to null by way of the declaration.. Aug 24 09:31:29 any idea about my issue ? Aug 24 09:31:45 g00s: if an app is fully exited and then restarted i guess the class loader will encounter it? Aug 24 09:32:00 if the process is killed Aug 24 09:32:06 which may not happen, since they are cached Aug 24 09:32:16 oh ok, good to know Aug 24 09:33:07 Hello guys, a relatively simple question. If an AsyncTask object finished executing a task, can I restart the long processing task again by calling execute()? Aug 24 09:33:22 they can only be used once Aug 24 09:33:32 i think the docs say this :) Aug 24 09:33:51 the reason why, is because internally they use a FutureTask, which can only be used once Aug 24 09:33:55 so I have to call every time new MyAsyncTask to perform a new exectution? Aug 24 09:34:14 well, that doesn't sound very good Aug 24 09:34:34 maybe use a HandlerThread instead ? Aug 24 09:34:36 g00s, why, it can only be executed once as you said? Aug 24 09:34:36 or something Aug 24 09:35:28 Number5: did you read the docs ? Aug 24 09:35:39 "The task can be executed only once (an exception will be thrown if a second execution is attempted.)" Aug 24 09:36:03 g00s, I need it to copy a file, which takes about 3 sec., that makes my UI hang. So using AsyncTask seems to be a good way, it's just I have to create a new object for a new exectution. It happens when the user takes a photo. Aug 24 09:36:38 g00s, yes I understand, so a new AsyncTask object needs to be created to execute another one, right? Aug 24 09:36:54 yes Aug 24 09:37:04 g00s, well thank you ;-) Aug 24 09:37:34 ;) Aug 24 09:37:50 ? Aug 24 09:38:03 help please :) Aug 24 09:38:18 bingels are you still here? Aug 24 09:40:31 firstdeveloper, if you need help, than ask a question... Aug 24 09:41:22 Number5: I had already ask :) Aug 24 09:41:34 Number5: thanks in advance Aug 24 09:41:43 ultra- yes Aug 24 09:41:51 Ok, I just got in, so can't read your message Aug 24 09:41:53 sorry, disregard Aug 24 09:42:51 how disable showing TWO images by ImageSpan(Bitmap) in TextView? Aug 24 09:45:24 hi Aug 24 09:46:34 im trying to install a .img file to my microsd (recovery mod) so i can install a ROM to my phone..but after it writes to the sdcard, it seems to write it way to fast, and after that my sdcard wont mount so i can put the files into it Aug 24 09:47:22 Number5: any idea dude ? Aug 24 09:47:58 im on peppermint OS Three linux..but i have been trying it on my windows laptop with WinImage, and they both do the same thing Aug 24 09:48:43 firstdeveloper, you posted your question after I joined this channel, so couldn't read it (unless there is a way in irc to fetch messages before I got in). Aug 24 09:48:54 I mean before, not after Aug 24 09:49:14 even if I post it now ? Aug 24 09:49:24 when i modded my nook, it actually took like 30 mins to write clockwork mod .img to my microsd card. This time, it's copying it so fast, that it's not working Aug 24 09:49:30 post it again Aug 24 09:49:55 Number5: you received it? Aug 24 09:50:18 Number5: I have an activity (A) containing a viewpager with a fragmentAdapter. The adapter should serve a fragment (a form template), this fragment has a button and an editText. When I click on the button, I should start another activity(B) for result. Aug 24 09:50:29 Number5: On the Activty (B) I get user input and back to the activity (A) with what the user enter. But when I override the 'onActivityResult' on the fragment an try to fill my editText, the editText is 'null' while I did the 'findViewById' in the 'onViewCreated' Aug 24 09:50:30 im trying to put a ICS on my LG-P999 G2X, and i got one designed for it Aug 24 09:50:32 ok Aug 24 09:50:35 I see Aug 24 09:50:54 Number5: ok cool I sent it in two part 'cause it was too large before ;-) Aug 24 09:53:51 guys firstdeveloper , Number5 Aug 24 09:54:10 how disable showing TWO images by ImageSpan(Bitmap) in TextView? Aug 24 09:54:15 firstdeveloper, maybe you should postdelay a handler, cause starting another activity, will destroy the current activity. When rebuilding the activity, the UI is finished after onStart(), if onActivityResult is before onStart(), the UI is not finished UI hence EditText is null. Aug 24 09:54:29 bingels: yep, you asked a question? Aug 24 09:54:54 hm yes now Aug 24 09:54:58 so postdelay with handler with a delay of 1000 ms may solve the issue. Aug 24 09:55:24 in the handler you fill in the EditText Aug 24 09:55:59 Number5: ok thanks I will try this ;-). thanks Aug 24 09:56:14 Also trigger invalidate() of the view, that might help too. Let me know if it worked ;-) Aug 24 09:56:42 may need to use a flag other than Spanned.SPAN_EXCLUSIVE_EXCLUSIVE? Aug 24 09:57:15 bingels: ImageSpan doesn't exist in textView Aug 24 09:57:32 bingels, I haven't used ImageSpan() so I can't help you with that, sorry. Maybe someone else can helpe you. Aug 24 09:57:33 are you sure, I'd checked the documentation Aug 24 09:57:34 when settings text Aug 24 09:57:44 with ImageSpan Aug 24 09:57:53 ha ok Aug 24 09:58:03 you need to set a text on an image Span right? Aug 24 09:58:17 i seted text with imagespan Aug 24 09:58:24 but i see two images Aug 24 09:58:51 ha ok Aug 24 09:59:06 but the imageSpan contains just on image right? Aug 24 09:59:50 yes Aug 24 09:59:52 when the image is large and more in line width Aug 24 10:00:01 i see TWO images Aug 24 10:00:36 and when ImageSpan setted text more one symbols Aug 24 10:01:09 Hello world Aug 24 10:01:11 i guess its android's bug Aug 24 10:02:32 firstdeveloper you know answer? Aug 24 10:02:43 no sorry Aug 24 10:02:56 bingels: can you send me the pasteBin of your code Aug 24 10:03:07 Just the part where you do the stuff Aug 24 10:03:39 Hello World Aug 24 10:03:48 https://www.sqlite.org/apple-and-sqlite.gif Aug 24 10:03:56 Hello World Aug 24 10:04:27 SpannableString text=new SpannableString("somebigimage"); Aug 24 10:04:46 text.setSpan(somebigBitmapImage, 0, text.size(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); Aug 24 10:04:49 that code Aug 24 10:04:52 ok Aug 24 10:04:56 i'm checking Aug 24 10:05:18 textView have small width Aug 24 10:05:42 smaller image width Aug 24 10:05:49 *image's width Aug 24 10:07:18 anyone good with writing .img files for clockwork mod to a micro sd? Aug 24 10:08:35 bingels: sorry but I can't help. I think you should switch FLAG set as the 3rd params of your SpannableString Aug 24 10:09:15 bingels: I'm like Number5, is the fisrt I used it ;). sorry Aug 24 10:09:51 Is there any suggestion how it could be flags? Aug 24 10:10:15 best android irc client that works nicely with znc ? any opinions? Aug 24 10:11:21 try yaaic Aug 24 10:11:48 how disable showing TWO images by ImageSpan(Bitmap) in TextView? Aug 24 10:12:54 bluesceada you know? Aug 24 10:13:13 hm sorry this is -dev ... maybe not ok to ask here :> Aug 24 10:13:22 and no i didnt test any so far Aug 24 10:13:53 what other channels of Android development all knows? Aug 24 10:14:15 this was not a development question, so i probably asked an offtopic question Aug 24 10:14:25 bingels: try to read this. It could help i think http://blog.stylingandroid.com/archives/177 Aug 24 10:14:50 thank you Aug 24 10:15:12 i hate it when time is wasted on a single problem Aug 24 10:15:19 for me this is all the time since i'm just starting this Aug 24 10:17:57 firstdeveloper Spannable.SPAN_INCLUSIVE_INCLUSIVE not helped to me Aug 24 10:17:59 Welcome to Android :) Aug 24 10:18:12 http://developer.android.com/reference/android/text/Spanned.html Aug 24 10:18:30 Or welcome to Android :) pick whichever is appropriate Aug 24 10:19:03 Eh welcome to Java, I meant to say. Aug 24 10:21:52 bingels: I'm a little lost cause you talk about textView and I see 'SpannableString' in your code :(. Please sent the complete part of code. use 'pastebin' Aug 24 10:21:57 How disable showing TWO images by one ImageSpan'ed(Bitmap) text in TextView? Aug 24 10:22:24 textView.setText(SpannableString); Aug 24 10:24:29 I'm trying to implement the following in my code --> http://stackoverflow.com/questions/3470693/android-get-location-or-prompt-to-enable-location-service-if-disabled/3470757#3470757. I have everything setup exactly as is given in the answer by DougW. However, I have the (his) OnClick method in a class called NativeHost and the actual LocationListener locationListener = new LocationListener() Aug 24 10:24:29 bit in another class called MainActivity. A snippet of my code is here ---> http://collabedit.com/bdyss. I'm getting an error on Line # 50 saying 'the method gpsLocationReceived' is undefined. What am I missing? Thank you. Aug 24 10:25:34 aLearner, imports? Aug 24 10:26:43 aLearner: I commented in the file. Aug 24 10:26:51 (Trying out the interesting collabedit idea) Aug 24 10:27:02 rking: Thank you very much. I replied there too. Aug 24 10:27:22 EPG: Maybe not. I did try to organize imports automatically. Aug 24 10:27:24 bingels : did you send the link of the pasteBin code ? Aug 24 10:27:39 rking: collabedit is a cool idea. :-) Aug 24 10:30:01 http://pastebin.com/gkCjBCuw Aug 24 10:30:06 firstdeveloper Aug 24 10:30:36 ok thanks Aug 24 10:31:18 http://pastebin.com/pR9XJqC0 Aug 24 10:31:30 size() != lenght() Aug 24 10:31:55 i tested it only android 2.2 Aug 24 10:32:05 *on Aug 24 10:32:47 bingels: give me the return of text.size() Aug 24 10:33:33 http://pastebin.com/pR9XJqC0 right code Aug 24 10:34:06 its lenght of string Aug 24 10:35:34 ok Aug 24 10:40:46 hello! Aug 24 10:40:48 anyone here having experience with the viewpager class? Aug 24 10:40:51 firstdeveloper you here? Aug 24 10:41:08 How disable showing TWO images by one ImageSpan'ed(Bitmap) text in TextView? Aug 24 10:43:57 rking: Thanks for all your help :-) Aug 24 10:44:15 bingels: try this Aug 24 10:44:25 aLearner: Meh. I was weak. Sorry I'm tired. =( Aug 24 10:44:44 bingels: http://pastebin.com/N2m5zQdT Aug 24 10:44:50 i am having a horizontal viewpager for scrolling, now i want to make a vertical gesture for a few of the views. Whats the best approach to do this? Detect it in the view itself? Aug 24 10:45:24 Use a gesture controller Aug 24 10:46:13 bingels : i didn't test it. But tell me whether it work or not :). Try with all the flag to see the behavour Aug 24 10:46:46 Now just out of interest, is this channel filled with noobs that join when they get a problem... or? Aug 24 10:47:39 Alec: Sorry, I think I explained myself badly Aug 24 10:47:51 hmm, so if an activity is restarted due a config change, will it get its onPAuse() called with isFinishing() == true? Aug 24 10:48:06 i have a pair of handlers (Handler()) for messages to/from my thread… i understand how to send messages out of my thread, but i'm not sure how to retrieve messages going into the thread, from within the thread Aug 24 10:48:51 tapas: no, it'll be destroyed and started again with the new config added on startup Aug 24 10:48:55 i have the vertical gesture recognition going not a problem, I just not sure if its the proper way to allowing the view upwards to show a secondary view Aug 24 10:49:22 same if you rotate the device, unless it is told to catch these events it'll be destroyed and started without knowledge of them Aug 24 10:49:28 firstdeveloper i tried Aug 24 10:49:33 Alec: i;m trying to determine whether my activity gets stopped due to a config change.. Aug 24 10:49:42 [with rotation you can get the oreintation on the onCreate function, it still restarts] Aug 24 10:49:50 hmm Aug 24 10:49:54 tapas: catch the config events and destroy manually? Aug 24 10:50:18 check for the presence of the keyboard or oreintation (you'd have to store it in your bundle) Aug 24 10:50:37 mcscroogey: still not sure what you mean sorry Aug 24 10:50:51 mcscroogey: i'm not sure if this helps, but i have a class extending scrollview, with a horizontal scrollview as the parent… i was able to get control of both by onInterceptTouchEvent and handling things from there, returning true/false depending on the situation Aug 24 10:50:56 Alec: thanks.. Aug 24 10:51:45 i ended up with a view that scrolls in any direction at once, and 'snaps' in place to a grid Aug 24 10:51:52 tapas: Youn could always use a service as a back end, a nice binded one.... Aug 24 10:52:58 tapas: given the app is simple there's no reason why you couldn't use a static class of some sort to store data, a static variable is a 'global variable' effectivly which is 'global' to the entire process (not thread, one activity is destroyed and restarted in the same process, might be a different thread) Aug 24 10:54:02 ultra-: yeah, thats what I experimenting with atm :) Aug 24 10:54:32 mcscroogey: I can't help you with this sorry Aug 24 10:54:47 Alec: yeah i finally went with using a static variable and onStart and onPause Aug 24 10:54:56 i intercepted from the parent, controlled the child and chose whether or not i wanted to pass to the child (return true/false) Aug 24 10:55:04 good luck, i'm off to work Aug 24 10:55:18 been ages i did android dev work :) Aug 24 10:55:21 tapas: remember to make it thread safe though Aug 24 10:55:23 but its fun Aug 24 10:55:32 stick the word volatile before the variable at least Aug 24 10:55:54 Alec: the static variable itelf is only accessed from the UI thread.. Aug 24 10:56:01 Number5 : your solution doesn't work, I tried it. I think that when the FragmentAdapter instanciate the fragment to populate the viewpager, it do it just one time Aug 24 10:56:02 its so long ago I even got NetworkOnMainException at the beginning :P Aug 24 10:56:08 Alec: so i'm good. there's two asynctasks that share some state though.. that one is volatile Aug 24 10:56:21 tapas: that's not true, a static variable's location is known at compile time and doesn't change at all Aug 24 10:56:44 firstdeveloper: uhm, i think it gets created every time Aug 24 10:56:54 Alec: what's not true? Aug 24 10:57:02 so any time it is referenced, it just references the same thing - if you then change what the static variable references all uses of that variable change too? Aug 24 10:57:13 it's like a C ** that's 'global' Aug 24 10:57:32 11:56 < tapas> Alec: the static variable itelf is only accessed from the UI thread.. Aug 24 10:57:35 firstdeveloper, I'm sorry I'm busy a bit, try other guys and it would be useful if you could paste your code too. But I'm busy, sorry. Aug 24 10:57:56 Alec: in my case there's no part of any asynctask's doInBackground that accesses my static variable Aug 24 10:57:57 Number5: ok thanks anyway dude ;-) Aug 24 10:58:03 you're welcom Aug 24 10:58:14 tis bullshit, if any thread wonders over accessing that.... ALSO and this is the big one, what if the new main thread is coming into existence while the old one is being destroyed Aug 24 10:58:21 isn't that exactly what you're trying to detect? Aug 24 10:58:46 Alec: oh, we have a misunderstanding here :D Aug 24 10:58:56 Yay :D Aug 24 10:59:23 Alec: the detection part was misguided on my part.. it's much better in my case to not try to detect it, but rather use the normal lifecycle methods.. Aug 24 10:59:41 Alec: the activity does keep some state in a static variable across recreations though.. Aug 24 10:59:50 Alec: that was the source of our misunderstanding i guess Aug 24 10:59:56 Alec: thanks for your insights though :D Aug 24 11:00:27 firstdeveloper: what are you trying to do? :D Aug 24 11:00:31 But again.... there's not just one main thread Aug 24 11:00:55 it is perfectly posible you could get an onPause event - the first step AFTER the replacement is occupying the screen Aug 24 11:01:20 as i think when you swipe through a viewpager it will instantiate the fragments/view each time Aug 24 11:01:25 and again, there's not just one main thread, the main thread is just the same thread per activity. Aug 24 11:01:26 mcscroogey: I have an activity A containing a viewPager with its FragmentAdapter Aug 24 11:02:00 Alec: hmm, i have to digest that piece of info.. Aug 24 11:02:17 Alec: but it is guaranteed to be the same thread if it's the same activity in the same app? Aug 24 11:02:31 No that's how android can re-create so fast Aug 24 11:02:33 mcscroogey: I agree but, my fragment start an activity for result, and need the data back to change its editText Aug 24 11:02:33 firstdeveloper: me too Aug 24 11:02:57 it doesn't wait for one to finish tapas and then start the new activity, it starts the activity in a new thread and destorys the old in whatever thread that was created in Aug 24 11:02:57 firstdeveloper: aah, maybe block the scrolling until you get the result back? Aug 24 11:03:41 mcscroogey: it nothing about the scroll dude ;-). It like my activity display my first fragment Aug 24 11:04:01 mcscroogey: an my fragment contains an editText in its layout inflated Aug 24 11:04:01 tapas: you will get the same main thread thoughout one activity's lifecycle - the one that created the activity will be the one that destroys it - but if that activity dies or a new one is viewed that starts in a different thread Aug 24 11:04:55 firstdeveloper: yes, so whats the problem? sounds common stuff :) Aug 24 11:05:10 [ tapas or may start in a different thread, it depends if the destroying thread finishes before another becomes available, if it destroys really quickly, it may be the same thread, but this is not guaranteed, or even common, it's just to save resources for activities that display something then die, this is why writing files doesn't fuck everything up] Aug 24 11:05:18 mcscroogey: when i clicked a button in the fragment, it start an activity for result. When the user return a value, i get it in the onActivityResult method Aug 24 11:05:59 mcscroogey: when I try editText.setText(user_text) , the editText is null. Aug 24 11:06:10 mcscroogey: and the app crashed :(' Aug 24 11:06:40 BRB guys Aug 24 11:06:52 firstdeveloper: hmm Aug 24 11:07:07 tapas: PM me if you have something you want to ask, I'm going AFK and I don't read the backlog in big chats like this Aug 24 11:07:20 maybe use findViewById to grab it? Aug 24 11:07:29 on what ? Aug 24 11:07:43 to make sure it still exists, your editText :P Aug 24 11:08:08 indeed, try catch anyone? Aug 24 11:08:09 mcscroogey: I no longer exist, that why i found it weird Aug 24 11:08:31 *strange Aug 24 11:09:01 in the onViewCreated of my fragment, i made this Aug 24 11:09:12 you dont change screen orientation in the meantime :+ ? Aug 24 11:09:25 no Aug 24 11:09:52 mcscroogey: probably I do something wrong, but what ? I don't know :( Aug 24 11:11:10 how do you call startActivityWithResult? Aug 24 11:12:22 not with getActivty().startActivityWithResult() or something? Aug 24 11:12:37 I use Aug 24 11:12:48 getActivty().startActivityWithResult() Aug 24 11:13:08 try it withut the getActivity() Aug 24 11:13:12 if you want to update it in the fragment Aug 24 11:14:46 mcscroogey: but should I use the onActivtyResult in the Fragment or in the activity ? Aug 24 11:15:21 yeah, in the fragment Aug 24 11:15:49 mcscroogey: ok the application doesn't crashed, a good point already Aug 24 11:15:52 you click on the button in the fragment which then calls startActivityWithResult() to ask some input and then it goes back to the fragment and here you want to update a text, right? Aug 24 11:16:16 sorry need to get into android again after 3years of doing nothing Aug 24 11:16:17 mcscroogey: yes Aug 24 11:16:55 mcscroogey: don't worry you have the level dude :) Aug 24 11:22:50 mcscroogey: DUUUUUDDDDEEEEEE YYYYYOOOUUUUU RRROOOCCCCKKKKK !!!!!!!!!!!!!!!!!!!!!!!!!!! Aug 24 11:23:00 mcscroogey: It works fine ;-) Aug 24 11:24:03 +1 for mcscroogey Aug 24 11:35:48 :) Aug 24 11:36:05 great to hear it works! Aug 24 11:36:51 mcscroogey: thanks to you "maestro" :) Aug 24 11:41:50 Hello! Aug 24 11:41:56 I have this code Aug 24 11:42:01 mButton = (ImageButton)(findViewById(R.id.simpleButton)); Aug 24 11:42:02 if(!mButton.requestFocus()) Aug 24 11:42:02 Toast.makeText(getContext(), "not set focus", Toast.LENGTH_SHORT); Aug 24 11:42:07 Why ImageButton object not focused? Aug 24 11:43:04 DCOsanve: missing toast.show() Aug 24 11:43:22 Oh, yes Aug 24 11:43:44 But I need set focus on ImageButton Aug 24 11:46:25 How to do it? Aug 24 11:47:14 mButton.setFocusableInTouchMode(true); mButton.requestFocus() ? Aug 24 11:47:36 oh and maybe mButton.setFocusable(true) :+ Aug 24 11:48:20 I defined focusable="true" and focusableInTouchMode="true" in xml Aug 24 11:48:21 oh yeah it should be after you call show() on the toast Aug 24 11:48:33 the requestFocus()-call Aug 24 11:51:58 yes Aug 24 12:10:39 How to disable showing TWO images in TextView by setting text with one ImageSpan? Aug 24 12:25:48 the majority of android devices are 2.3.*, right? im wondering whether to support pre-3.0 for an app im making for someone. the app will not, or should not, run on small screen devices. or low-density devices. so my question is, are the majority of 2.3.* devices old, small, now crappy phones...or do we have many devices with large-ish, crisp screens, running 2.3.*? Im an Android noob by Aug 24 12:25:48 the way. Aug 24 12:26:29 in general, make it for the lowest version you need the API for Aug 24 12:26:48 also, 3.0 devices come in all shapes and sizes, being 3.0 doesn't mean it's high density or large screen Aug 24 12:27:21 a lot of tablets are mdpi, a lot of phone are hdpi Aug 24 12:28:09 zinx: well i can make it for 2.3 or 2.2, but if i have a good reason to, i would prefer to stick to post-3.0 APIs. Aug 24 12:29:09 most tablet run 3.0 plus Aug 24 12:29:15 boing: well, it all depends on how you define a small/crappy phone Aug 24 12:29:19 i guess my question is: how many large screened devices (that is, iphone sized or greater) would be running 2.3.*? Aug 24 12:29:21 the kindle fire, the most popular tablet, run 2.3 Aug 24 12:29:29 which APIs do you need from Honeycomb+? Aug 24 12:29:32 wongk: thanks Aug 24 12:29:58 zinx: im not sure, i just know that supporting pre-3.0 caused me some pain in the past (well, in my previous and first android project) Aug 24 12:30:16 this is a game...a simple game. Aug 24 12:30:20 it might help if you browse developer.android.com's API reference Aug 24 12:30:35 yeah i have a good bit already. Aug 24 12:30:50 i think wongk answered my question tho...it's going to have to run on kindle, so... Aug 24 12:30:51 i'm not aware of any added APIs that a game would need to use Aug 24 12:31:01 cheers Aug 24 12:31:13 the fire might even run froyo Aug 24 12:31:24 i just know it's 2.x Aug 24 12:31:26 cool Aug 24 12:39:35 How to disable showing TWO images in TextView by setting text with one ImageSpan? Aug 24 12:44:16 my client has a google map they adjust the siz eusing css so you pass screne dimensions and its supposed to return a map the exactsize of the screen, this works on pc browse ri tried 100x100 works fine, but on android if i pass the real screensize it comes back with a map way too big, anyone got any ideas? Aug 24 12:44:37 if i pass 320x460 it seems to fill nexus one screen but then its too small on bigger phones Aug 24 12:46:55 any recommendation of an android open source directory of apps? Aug 24 12:47:19 github :P Aug 24 12:47:40 i wouldn't use the term "directory" though Aug 24 12:50:06 How to disable showing TWO images in TextView by setting text with one ImageSpan? Aug 24 13:02:50 how do u force xml to open in thegui editor Aug 24 13:02:54 its opening in some other thing Aug 24 13:03:34 ah got it Aug 24 13:11:09 anyone know how to make the canvas.drawCircle() method more crispy clean? Aug 24 13:11:12 looks funky Aug 24 13:11:36 asd Aug 24 13:11:46 netsplit ftl Aug 24 13:17:15 How to disable showing TWO images in TextView by setting text with one ImageSpan? Aug 24 13:19:19 Bear10: use antialiasing? Aug 24 13:19:23 I have no idea what you mean by "crispy clean" Aug 24 13:19:36 krispy kreme? mmmm Aug 24 13:19:47 kream.. whatever Aug 24 13:20:37 hi I have tablelayout with fill_parent and I add rows. my third row is having 2 listviews. they are taking up all of vertical space and not showing following rows. Aug 24 13:20:38 I think it's kreme Aug 24 13:20:42 lol Aug 24 13:20:49 lov, well i mean it looks jagged Aug 24 13:20:59 turn on antialiasing in your Paint. Aug 24 13:21:22 before you ask "how?" I invite you to look at the documentation for the Paint class Aug 24 13:22:03 gotcha Aug 24 13:24:59 http://pastebin.com/fV1U8jV2 is my main.xml and here is the web form that I am trying to mimic http://imagebin.org/225101 Aug 24 13:26:17 mms_: just use a relativelayout Aug 24 13:26:22 use table layouts for tabular data Aug 24 13:26:53 lov: I thought the alignment would have helped...may be not..let me try relativelayout then Aug 24 13:26:55 thanks Aug 24 13:29:56 How to disable showing TWO images in TextView by setting text with one ImageSpan? Aug 24 13:37:29 mms_: you can align layouts using a relative layout. Aug 24 13:39:09 lov: http://pastebin.com/x8aYf17x here is my attempt and things do not quite look at desired...the list view is taking all space Aug 24 13:41:00 I merely put all components and then worked adding those layout attribute of rightOf below etc. Aug 24 13:42:56 hello Aug 24 13:43:19 this is so weird my interface only updates once i tap the tab once Aug 24 13:43:22 whats that about Aug 24 13:43:38 your interface is lazy Aug 24 13:44:14 How to disable showing TWO images in TextView by setting text with one ImageSpan? Aug 24 13:44:39 gaz`: try on monday, it will have the whole week end to rest :) Aug 24 13:44:51 haha Aug 24 13:45:10 its weird Aug 24 13:45:15 how do i "repaint" heh Aug 24 13:45:17 where to download emulator for android application testing ? Aug 24 13:45:30 developer.android.com Aug 24 13:45:57 I have not added to almost each component both below and rightof attributes but still list takes all space Aug 24 13:46:20 bingels: I am downloading the SDK size 67mb ,does it include the emulator ? Aug 24 13:46:23 yes. Aug 24 13:46:27 well not quite Aug 24 13:46:37 the SDK is a wrapper; you'll have to install more content once you install it. Aug 24 13:46:40 Read the install instructions! Aug 24 13:46:43 They will explain how to do this. Aug 24 13:46:47 rtfm Aug 24 13:46:49 you must download apis Aug 24 13:46:54 You'll need to download emulator images for each target you want to use on the emulator. Aug 24 13:48:57 I just want to install apk files in pc , any other way to do that ? any apk pc installer Aug 24 13:48:57 ? Aug 24 13:49:14 n Aug 24 13:49:16 *no Aug 24 13:49:16 apk? Aug 24 13:49:18 wait Aug 24 13:49:20 & arm or intel system image Aug 24 13:49:21 does your PC run android? Aug 24 13:49:22 huh Aug 24 13:49:23 what are you trying to DO? Aug 24 13:49:34 are you trying to actually do app development? Aug 24 13:49:41 just install apk on android device? Aug 24 13:50:05 You can install apk to android-emulator Aug 24 13:50:29 double click on it \o/ Aug 24 13:50:41 How to disable showing TWO images in TextView by setting text with one ImageSpan? Aug 24 13:51:00 bingels: I don't really understand what you're asking. Aug 24 13:51:18 I have loads of aok files in my pc around 10gb , i want to delete them , but they are renamed in short so I dont know which is what file, so I have to know its name before deleting , thats why Aug 24 13:51:26 i see two images in textview but text setted only ONE ImageSpan Aug 24 13:51:31 why do you have 10GB of APK files? Aug 24 13:51:37 isohunt? :) Aug 24 13:51:38 we're not going to help you with piracy. Aug 24 13:51:40 get out. Aug 24 13:51:53 no Aug 24 13:51:56 its not pirated Aug 24 13:52:04 i didnt downloaded it Aug 24 13:52:10 I am not pirate :-( Aug 24 13:52:17 AARRRRRGGGG! Aug 24 13:52:21 OK. Please explain, fully, what's going on? Aug 24 13:52:26 why do you have that wooden leg then? and that parrot on your shoulder? Aug 24 13:52:28 If you're not a developer, why do you have 10GB of apps? Aug 24 13:52:41 what apps are these? Aug 24 13:53:00 you can use aapt dump badging filename.apk to see metadata about the file that might be simple than installing them Aug 24 13:53:16 Arhhh ? Aug 24 13:53:23 understand my question? Aug 24 13:53:39 bingels: I have no idea what you're asking. Aug 24 13:54:06 APK is just special zip, maybe you can create script to sniff for example AndroidManifest for package name Aug 24 13:54:09 ? Aug 24 13:54:10 you cant understand me or you dont know answer?? Aug 24 13:54:17 bingels: I do not understand you Aug 24 13:54:32 vavirta: why? he/she can just use aapt dump Aug 24 13:54:45 lov use google translater Aug 24 13:55:10 bingels: no, you use google translator Aug 24 13:55:21 What does the word ImageSpan translate to in your language? Aug 24 13:55:24 aah, lov you are correct Aug 24 13:55:30 Some kind of burrito? Aug 24 13:55:31 I've never heard of aapt, thanks for the tip! Aug 24 13:55:52 bingels: your question does not make sense, at all. Please try explaining more fully. Aug 24 13:56:05 ImageSpan its Android class Aug 24 13:56:10 yes, I understand that. Aug 24 13:56:23 bingels: your question is ambiguous. It is too short. I do not have enough information to solve it. Aug 24 13:56:31 At least we've narrowed this discussion to Android. Aug 24 13:56:37 o/ Aug 24 13:56:44 Jonathan_Eyre: so it's not about burritos? Aug 24 13:56:53 some kind of burger then? Aug 24 13:56:58 mmm burgers Aug 24 13:57:22 * Hodapp rolls eyes Aug 24 13:57:25 Jonathan_Eyre: for that I am delighted. Aug 24 13:57:42 i need see Only ONE image not TWO Aug 24 13:57:48 bingels: maybe you can show some code, that would help for understanding your problem Aug 24 13:58:15 to understand your problem...* Aug 24 13:58:23 basic friday... Aug 24 14:00:29 http://pastebin.com/52UgbdfX Aug 24 14:01:07 sorry Aug 24 14:01:11 its wrong code Aug 24 14:01:13 wait pls Aug 24 14:01:21 :D Aug 24 14:01:32 i cant understand why this google map coems up bigger than i request Aug 24 14:01:39 "Yes, the new native FB app performs well better. But was the slowness HTML5's fault? I don't think so." ahhhhh some people... Aug 24 14:01:43 to fill n1 screen i have to use 320x460 Aug 24 14:01:45 very weird Aug 24 14:02:05 CallumTaylor: where did you read that? Aug 24 14:02:10 tweet Aug 24 14:02:17 https://twitter.com/robhawkes/status/238998011546574848 Aug 24 14:02:18 Heh :D Aug 24 14:02:22 doesn't surprise me, he works for zynga Aug 24 14:02:35 http://pastebin.com/CPgspnzi Aug 24 14:02:53 nice response callum hehe Aug 24 14:03:22 I think that the backup on my tablet is corrupted. Is there any way to remove it entirely, so that it does not show up as an option in fastboot? Aug 24 14:03:26 sorry bingels, don't know anser for that Aug 24 14:03:28 vavirta Aug 24 14:03:29 god people who delude themselves in thinking web apps are good piss me off so much Aug 24 14:03:33 answer* Aug 24 14:03:41 yeh Aug 24 14:03:57 Web apps have their purpose. Aug 24 14:04:00 CallumTaylor: They have uses. Aug 24 14:04:07 One of our clients said once "The native apps aren't 'the thing' anymore. Now everybody is using html5" Aug 24 14:04:10 yeah, right Aug 24 14:04:18 but to say that web views aren't the cause of slow apps is rediculous Aug 24 14:04:27 thats like the pope saying condoms cause AIDs Aug 24 14:04:36 .... Aug 24 14:04:45 A mix of Native and Non-Native content is important on a Mobile Device. Aug 24 14:05:06 I don't have anything against webview Aug 24 14:05:11 I'm going to spend the next fifteen minutes of my life figuring out that simile. Aug 24 14:05:12 NDK faster java code Aug 24 14:05:25 me neither, but i know thet they're slower than native code Aug 24 14:05:39 people who say that web views arnt the cause of slow apps annoy me Aug 24 14:05:47 but whole app made with html5 (with phonegap etc.) is not the right solution Aug 24 14:05:49 i have issues against webview :P Aug 24 14:05:50 in my opinion Aug 24 14:05:58 I got that. It's the pope thing that threw me off. Aug 24 14:06:00 http://burghley.weatherbys.spriing.co.uk/2012/locate/?width=480&height=800 <-- this should fill a nexus one screen, but its much bigger any ideas? Aug 24 14:06:10 the pope actually said that Aug 24 14:06:23 he said "the use of condoms help people contract aids" Aug 24 14:06:31 greetings everyone Aug 24 14:06:39 http://pastebin.com/CPgspnzi you know why i see TWO images but must one? Aug 24 14:06:42 hi Aug 24 14:06:43 anyone know of a good way to implement a sort of incremental slider? Aug 24 14:06:44 For example, I have a feed which contains html-structured text. When I want to show it, webview is the smartest choice Aug 24 14:07:18 i.e, i want to overlay an alpha layer over something, and i want a slider on the bottom of the screen that slides through 10 levels, which will alter the alpha value of the overlay Aug 24 14:07:32 http://pastebin.com/t2rTXiiv Aug 24 14:08:36 ITS ANDROID'S BUG Aug 24 14:08:38 Webview for simple pages where text is dominant is perfect. Aug 24 14:08:47 ANDROID HAVE BUG Aug 24 14:09:11 lol Aug 24 14:09:46 Jonathan_Eyre: "The pope did not suggest using condoms as birth control, which is banned by the Roman Catholic Church, and said condoms are not a "real or moral solution" to the AIDS crisis." http://www.azcentral.com/arizonarepublic/news/articles/2010/11/25/20101125pope-condoms1125.html Aug 24 14:09:54 android is perfect, there's no way it has any software defects Aug 24 14:10:11 android and bugs? those two words don't go together right Aug 24 14:10:12 trying to launch an activity from an apk file, like here: http://pastebin.com/vMPNr5ca I have the error 'There is a problem parsing the package'. Any counsel? Aug 24 14:10:23 when I start email app with ACTION_SEND, is there a way to know if user sent the email or discard or 'save as draft'? Aug 24 14:11:40 ANDROID HAVE BUG --- http://pastebin.com/t2rTXiiv I see TWO Images but must one!? Aug 24 14:12:09 ITS BUG Aug 24 14:12:11 **opariti that can be many things in your application. Aug 24 14:12:18 bingels: if you really think that there's a bug in android, post on b.android.com Aug 24 14:12:27 odds are, you're just doing it wrong, however. Aug 24 14:12:50 ErEricTh3Red: I've heard ... how could I drill down? Aug 24 14:13:37 no, it's a bug. You can not argue with me Aug 24 14:13:42 ITS BIG BUG Aug 24 14:13:51 bingels: then post it on b.android.com Aug 24 14:14:00 I can't fix android for you. Aug 24 14:14:06 rofl Aug 24 14:14:23 i to lazy to sign up to code google Aug 24 14:14:39 but it's fact Aug 24 14:14:43 android buggest Aug 24 14:15:02 there's no bugs on android Aug 24 14:15:02 lolbbqwtf buggy it are! Aug 24 14:15:10 you wrong its bug Aug 24 14:15:25 android is just one big bug! Aug 24 14:15:28 http://pastebin.com/Wx7LG2Hs .... I am using relative layout and the two text views under the spinner are not showing in right place... Aug 24 14:15:29 java slow Aug 24 14:15:33 EricTh3Red: I download an apk file in data/data/app_name/files/here folder and I just use it in the targetFilePath variable Aug 24 14:15:47 java eat my battery Aug 24 14:15:54 lov: even relative layout is bit not working as expected..can you take look ? Aug 24 14:16:02 java om nom nom alcaline Aug 24 14:16:12 bingels: be productive or get out. Aug 24 14:16:41 you know some tools for optimise(refactoring) java code? Aug 24 14:17:25 ok lov Aug 24 14:17:39 lov(e) Aug 24 14:17:41 <3 Aug 24 14:17:52 but you can not deny the fact that Android have BUG Aug 24 14:18:00 small but Bug Aug 24 14:18:12 we deny all accusations of any bugs in android Aug 24 14:18:21 there's no bugs on Android Aug 24 14:18:25 you must open your eyes Aug 24 14:18:28 bingels: if there is a bug, go to b.android.com and report it Aug 24 14:18:34 my eyes are wide shut! Aug 24 14:18:37 bingels: do not just shout "BUG ! BUG ! IS BUG!" Aug 24 14:18:39 maybe it is a bug! Aug 24 14:18:41 congratulations! Aug 24 14:18:43 You have found one! Aug 24 14:18:49 no its sad Aug 24 14:18:50 i want a cookie Aug 24 14:18:51 I honestly do not care enough to look at your stacktrace or try it myself Aug 24 14:18:56 guess what: android has a lot of bugs. Aug 24 14:19:03 report it on b.android.com Aug 24 14:19:08 and then shut up about it Aug 24 14:19:09 blasphemy! Aug 24 14:19:49 no Aug 24 14:20:04 how they update oldest android OS Aug 24 14:20:07 like 2.1 Aug 24 14:20:08 better to whinge Aug 24 14:20:10 and do nothing Aug 24 14:20:25 don't develop for 2.1, or build your own workaround Aug 24 14:20:33 You can't only blame the OS as the manufacturer of device introduce Bugs as well. Aug 24 14:20:41 >:( Aug 24 14:21:17 nice Aug 24 14:21:31 hello all Aug 24 14:21:34 hi! Aug 24 14:21:42 i have problem Aug 24 14:21:59 http://pastebin.com/t2rTXiiv i see TWO Images, but must one Aug 24 14:22:05 its Bug or what? Aug 24 14:22:11 Android has lots of bugs. Doesn't make it particularly special, it's not worse than other technologies with a similar levels of complexity and maturity. Aug 24 14:22:20 bingels: has anyone reported it on b.android.com? Aug 24 14:22:51 noo Aug 24 14:23:01 you can be first Aug 24 14:23:08 no, YOU can be first. Aug 24 14:23:12 we are not your servents. Aug 24 14:23:20 no i have'nt google account Aug 24 14:23:29 make one; it takes 5 seconds. Aug 24 14:23:46 grr Aug 24 14:23:54 woof Aug 24 14:23:55 hate stuff u simply cant find an answer for Aug 24 14:23:56 an android developers w/o a google account, i call BS Aug 24 14:24:07 bingels: do you think maybe someone SHOULD report it on b.android.com? Aug 24 14:24:08 BS ? Aug 24 14:24:14 bullshit Aug 24 14:24:19 bingels: how is google going to know there is a bug if no one tells them? Aug 24 14:24:19 the worst is when you find someone with the same problem, and they never reply a solution, and the thread is 5 years old Aug 24 14:24:26 pls somebody report about this problem Aug 24 14:24:27 yeh Aug 24 14:24:33 they reply "oh fixed it now!!" Aug 24 14:24:44 yeah, there's a special place in hell for those people Aug 24 14:24:48 An adroid dev without a google account is like a teenager without a facebook account Aug 24 14:24:49 CallumTaylor: i had one like that in wxWidgets (when it was still wxWindows), it's now over 10 years old I think Aug 24 14:24:55 lol Aug 24 14:24:56 CallumTaylor: the best part? I provided a patch. Aug 24 14:25:01 EricTh3Red: lol Aug 24 14:25:11 CallumTaylor: it was a very simple straightforward patch with no side effects. Aug 24 14:25:24 good job Aug 24 14:25:37 how much google sale Sales account? Aug 24 14:25:41 aye what is this symbols called: < > Aug 24 14:25:49 aye what is this symbols called: < > Aug 24 14:25:50 DJ_Kally: less than, greater than Aug 24 14:25:53 If you are developing android support the creator get a google account. Aug 24 14:25:53 DJ_Kally: the alligator Aug 24 14:26:11 o.0 wtf wierd name Aug 24 14:26:14 CallumTaylor: honestly I feel if I find a bug in android, I'll just be stuck working around it, because it's a 2 year (or never) fix time for it to get to phones Aug 24 14:26:20 http://xkcd.com/979/ Aug 24 14:26:29 :O >-/===\--- Aug 24 14:26:54 lov Aug 24 14:26:59 CallumTaylor: lol Aug 24 14:27:20 lov Aug 24 14:27:32 you can inform people about this threat? Aug 24 14:27:36 i predict a ban Aug 24 14:27:51 bingels: no, you are the only one who has reproduced it thusfar, and no one else has the time to do the same Aug 24 14:27:55 bingels: you need to report it yourself Aug 24 14:28:05 bingels: if you want it to get fixed Aug 24 14:28:28 "/set topic : http://pastebin.com/t2rTXiiv i see TWO Images, but must one. Aug 24 14:28:45 lol Aug 24 14:28:56 lol Aug 24 14:29:34 trying to launch an activity from an apk file, like here: http://pastebin.com/vMPNr5ca I have the error 'There is a problem parsing the package'. Aug 24 14:29:37 god i hioe tihs app gets released Aug 24 14:29:44 cant be arsed with any more! Aug 24 14:29:47 hope* Aug 24 14:29:48 god I hope you learn to spell Aug 24 14:29:54 hehe Aug 24 14:29:56 or type :) Aug 24 14:41:04 okay, how do I go about killing an application on Android while debugging? Aug 24 14:42:51 settings -> applications -> app -> force stop Aug 24 14:44:58 oh might have a new app, nice Aug 24 14:45:08 java.lang.RuntimeException: Unable to instantiate application com.zynga.hanging.HangingApplication: java.lang.ClassNotFoundException: com.zynga.hanging.HangingApplication in loader dalvik.system.PathClassLoader[/data/app/com.zynga.hanging-2.apk] Aug 24 14:45:09 like Aug 24 14:45:10 how Aug 24 14:46:51 how do I go about detecting than an app has been sent to the background? Aug 24 14:47:09 Hodapp: onPause, onResume, see activity lifecycle Aug 24 14:47:54 alternatively onstop/onstart if that fits it better Aug 24 14:47:56 PS, apps don't get sent to the background, activities do Aug 24 14:48:49 wongk: I beg to differ. Technically android classifies the application that is showing things as a foreground one, and gives it a larger share of the cpu too through cgroups Aug 24 14:49:03 so there is at least a process-level granularity to being in foreground or background now Aug 24 14:49:13 it might be higher than that, I'm not sure Aug 24 14:49:53 you can discover this if you have for instance expensive sound synthesizer that runs just fine if it's in foreground but immediately begins to stutter if sent in background, because it only has claim to 10 % of the cpu in that state Aug 24 14:50:22 all this was done probably to improve application responsiveness, but imho it was a mistake Aug 24 14:50:27 i like how people ask questions in the "submit crash" box Aug 24 14:50:29 as if i can reply there Aug 24 14:51:39 * hoangtran always got disconnected after sending a question to this room Aug 24 14:51:40 questions like "how i use it?!1" Aug 24 14:51:49 it seems that there's no way, I've read some SO threads, like this http://stackoverflow.com/questions/5976329/android-e-mail-sending-verification Aug 24 14:52:26 "what r the possibilities thanks could be wrong with it???" Aug 24 14:52:56 canadiancow: impressive statement. Somewhere there is a person with likely IQ of 70 using your application. Aug 24 14:53:03 Sounds like a reasonable question to me Aug 24 14:53:04 no Aug 24 14:53:05 like Aug 24 14:53:08 there was a paragraph before that Aug 24 14:53:12 with great grammar Aug 24 14:53:15 and described what he was doing Aug 24 14:53:19 then he finished it with that Aug 24 14:54:24 I know that error boxes are difficult for people to understand. I saw all sorts of "please help, I need urgently" written into application error boxes at my old company Aug 24 14:54:35 then they leave no contact information after statement like that Aug 24 14:54:40 so I can't help even if I wanted. Aug 24 14:58:32 although it's only the general public that has this sort of people. As a rule when we had a narrowed down user group, there was not a single person like that. At least you know what sort of complexity you can expect random people to be able to handle. Aug 24 15:02:47 i wish google let you sort errors by version Aug 24 15:02:53 like if it didnt happen in version X or higher, fuck off Aug 24 15:05:57 java.lang.NoSuchMethodError: pingSupplicant Aug 24 15:05:57 at android.util.SparseBooleanArray.get(SparseBooleanArray.java:53) Aug 24 15:06:33 canadiancow u breaking stuff again? Aug 24 15:06:41 i dont even Aug 24 15:07:08 lol Aug 24 15:07:47 canadiancow: you must be looking at invalid proguard symbol mapping? Aug 24 15:08:07 no Aug 24 15:08:11 what Aug 24 15:08:17 proguard doenst obfuscate that Aug 24 15:08:36 because it's in android namespace? Aug 24 15:08:44 in that case I give up, I have no idea how that could have occurred. Aug 24 15:10:50 Looks like only WifiManager/WifiService could be it Aug 24 15:15:54 www.fileformat.info/info/unicode/char/1f4a9/index.htm Aug 24 15:27:20 java.lang.NoSuchMethodError: 鉀?鉀v鉀䩉 Aug 24 15:27:20 at android.widget.TextView.onMeasure(TextView.java:5291) Aug 24 15:27:49 sounds like crazy hacked up chinese versions of android Aug 24 15:30:50 canadiancow: that is an awesome method name. Aug 24 15:40:04 that's like php Aug 24 15:40:06 Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM Aug 24 15:41:13 Aug 24 15:41:27 Aug 24 15:41:39 . Aug 24 16:05:13 aww yea Aug 24 16:05:20 our 18.33MB is only a 5.88MB download if you have the previous version Aug 24 16:05:22 play store ftw Aug 24 16:05:53 hi i have a Play Store question: how can i update an app from another publisher account? Aug 24 16:06:00 for example, if i distrubted an app as Rockmaninoff Aug 24 16:06:15 then wanted to update that same app but from another publishing account (Publisher X), assuming i have the same keystore and password, etc. Aug 24 16:06:34 can developers "share" apps to another developer to allow for updating? Aug 24 16:07:35 no Aug 24 16:07:49 so we're just SOL in that case? Aug 24 16:08:04 it's kind of a weird situation, so i'm sure it doesn't come up often Aug 24 16:08:06 darn Aug 24 16:09:24 it would be a massive security flaw if that were possible Aug 24 16:10:14 how would that be a security flaw? it would be similar to PassPack password sharing... Aug 24 16:12:51 actually it looks like it's totally feasible: http://support.google.com/googleplay/android-developer/bin/answer.py?hl=en&answer=139626 Aug 24 16:13:33 that's transferring, not sharing Aug 24 16:15:57 How does that invite user thing work, can you only invite users without dev accounts? Aug 24 16:18:37 yeah fair Aug 24 16:18:38 damn Aug 24 16:18:57 still, at least a solution exists Aug 24 16:49:39 Hi Aug 24 16:49:55 I have a problem with Overlays in google maps Aug 24 16:50:00 I cannot get them to show, no matter what Aug 24 16:50:02 MapScreen.java - https://gist.github.com/3452782 OverlayManager.java - https://gist.github.com/3452789 Aug 24 16:50:17 MapScreen is the activity, and OverlayManager is the overlay creator Aug 24 16:50:25 There are no errors, but I don't get any overlays Aug 24 16:50:37 howdy Aug 24 16:50:39 And I don't get "Log.i("INFO", "Added overlay!");" in the output Aug 24 16:51:51 I have used the example from https://developers.google.com/maps/documentation/android/hello-mapview Aug 24 16:57:17 It's as if addOverlay isn't being called Aug 24 16:57:31 But I call it in MapScreen.java Aug 24 17:00:09 I just realised I have to @Override it Aug 24 17:00:14 But now it gives me a new error Aug 24 17:00:21 The method addOverlay(OverlayItem) of type OverlayManager must override or implement a supertype method Aug 24 17:00:29 Any ideas on that one? Aug 24 17:00:36 I have my compliance set to 1.6 Aug 24 17:07:36 anyone know why SparseBooleanArray and SparseIntArray don't extend SparseArray? Aug 24 17:10:45 seems like they're needlessly duplicating functionality by not extending and overriding Aug 24 17:12:14 also curious why they didn't create SparseStringArray since SparseArray is broken Aug 24 17:14:39 S3nsat10n: you can't use primitives with generics Aug 24 17:14:55 autoboxing is cheap but not free Aug 24 17:15:04 ah yes, thanks...I knew I was missing something Aug 24 17:15:13 it's early :) Aug 24 17:15:26 in Eclipse, anyone know how to zoom out on the DDMS method profile results screen? Aug 24 17:15:57 double clicking on the top left part of it seems to work Aug 24 17:16:07 over the top of the text Aug 24 17:16:50 wow thanks, that's had me stumped Aug 24 17:22:26 So no idea what's causing my markers to not appear on the overlay? Aug 24 17:28:00 is there a simple way to install the android plugin for eclipse where I can just give eclipse a link and it does all the rest? Aug 24 17:29:46 yes? Aug 24 17:29:52 Did you actually read the instructions for the ADT? Aug 24 17:30:13 yeah, but i guess I'll have to reread Aug 24 17:31:01 see http://developer.android.com/sdk/installing/installing-adt.html Aug 24 17:32:44 is there a specific dev branch for lint? Aug 24 17:34:28 well, seems like it still need to install all the other jazz Aug 24 17:38:20 correct; adt is just a plugin for eclipse. Aug 24 17:38:33 you still need the SDK, and you still need to install api targets when you install the SDK. Aug 24 17:38:45 After you install the ADT, you can manage the api targets, emus, etc via the ADT. Aug 24 17:47:50 hello, whay technique to use to display less information on a ListView, and show more information when onListItemClick? i have this class: http://pastebin.ca/2197913 and this view: http://pastebin.ca/2197914 Aug 24 17:48:27 line 172 shows the technique to create an adapter to populate de ListView Aug 24 17:55:46 is there a limitation to download an apk file in the sd card for execution, or I can download it in what is returned by getFilesDir() and then execute? Aug 24 17:58:39 i've figured out how to update my main thread from another thread, but how do i send data into another thread from my main? Aug 24 18:03:14 im using an special adapter to populate ListView, how to pass the whole object used for the adapter to a new view using an intent? i need to show complete information on this new view Aug 24 18:07:07 how can i pass an object to a view, like pressing an item on ListView and pass a complete obejct to show more information in the new Activituy Aug 24 18:16:57 ultra- Aug 24 18:25:15 balr0g: You put it in the intent extras, which is a bundle -> http://developer.android.com/reference/android/os/Bundle.html Aug 24 18:25:45 S3nsat10n, can i use Extras to send whole objet, or just Strings? Aug 24 18:25:46 if it can't be put in a bundle, you would just send some sort of identifier that would allow you to reconstruct or re-retrieve it on the other side. Aug 24 18:25:54 anything that can go in a bundle Aug 24 18:25:57 can be sent Aug 24 18:26:17 or send json Aug 24 18:26:30 and rebuild the object with Gson Aug 24 18:27:44 I am using a tabhost and viewpager to create swipeable tabs (like the Play Store) However, they are large, and if I choose a smaller font, it just leaves a large space above the text. How can I reduce this space? Aug 24 18:28:22 yeah you can strnigify the object as a json string and rebuild it, if you just need field values. if you need a handler on the same object there are other ways. look into static singleton pattern Aug 24 18:29:38 json ftw Aug 24 18:30:02 yup, <3 json Aug 24 18:31:36 S3nsat10n, EddieRingle|MBP, tks for response, will read and try sometnings... Aug 24 18:33:19 balachmar you will need to manually resize tabs in code Aug 24 18:33:52 speakingcode: seriously? That is ugly, I would really like to keep everything in xml Aug 24 18:34:30 afaik there is no way to adjust the tab views in xml Aug 24 18:34:37 but it's easy andclean to do it in code Aug 24 18:36:20 check your PM for links Aug 24 18:37:20 @speakingcode thanks, but I have already been able to change the font size through xml, I really think/hope that I can do something similar for the tab space/margin... Will read your links first though Aug 24 18:38:05 tab height cannot be done in xml, unless it's changed in recent versons Aug 24 18:39:11 but, doing it through code is simple Aug 24 18:43:15 @speakingcode: combining some ideas from the web, I have been able to do it, by using a custom tabwidget Aug 24 18:43:26 thanks for the help! Aug 24 18:44:01 np Aug 24 18:45:34 i'm using abs and I have an activity with indeterminate progress requested, I use the abs Window class for the constant, inheriting from SherlockActivity and using setSupportIndeterminateProgress methods and still i can't get the circle to go away, it stays there ( didn't even activate it ) any ideas? Aug 24 18:46:08 err, what is abs? Aug 24 18:47:17 actionbarscherlock Aug 24 18:47:18 action bar sherlock Aug 24 18:47:43 oh ok Aug 24 18:48:19 setProgressBarIndeterminateVisibility(false); Aug 24 18:48:30 that what I do wongk-home :) Aug 24 18:48:37 it works here :P Aug 24 18:49:31 wongk-home, you actually need to do setSupportProgress... i read online :) Aug 24 18:49:35 but same effect anyway Aug 24 18:49:45 those are two very different calls Aug 24 18:49:55 i know one is abs other not Aug 24 18:53:23 how can getActivity() in a fragment return null if you're calling it from an onClick method Aug 24 18:53:29 like... it has to be on screen Aug 24 18:53:30 so.... how can it not be attached Aug 24 18:53:49 magic Aug 24 18:53:52 me again, with the swipeable tabs. The tabs in play store slide along with the content. always showing only three tabs, is that difficult to achieve? Aug 24 18:55:24 balachmar: check out viewpagerindicator Aug 24 18:55:51 EddiRingle|MBP will do Aug 24 18:56:04 so those are no tabs then... Aug 24 18:56:33 They're tabs.. They're just not tabhost or actionbar tabs Aug 24 18:57:26 And I see they are not default Android stuff. That is a pity, I kind of thought because Google did it, they would use standard Android API Aug 24 18:57:48 I think they're in the support library, sorta Aug 24 18:58:54 sorta... Aug 24 19:00:53 ooh, you mean the PagerTabStrip Aug 24 19:01:27 okay. Aug 24 19:02:08 I would like to stick to the default Android behaviour as much as possible... Aug 24 19:02:28 Hi ? Aug 24 19:03:04 Hi ! (sorry, didn't know if it worked) Aug 24 19:03:43 lol Aug 24 19:04:17 canadiancow: i'm reading about an organization called OHCOW :) Aug 24 19:04:51 lol Aug 24 19:04:53 sounds shady Aug 24 19:04:57 that's what she said ;) Aug 24 19:05:03 ohhhh! Aug 24 19:05:25 that was not a good twss Aug 24 19:05:54 yes it was Aug 24 19:06:06 "sounds shady" has no innuendo Aug 24 19:06:09 does Java have any constant keyword for the current class? I'm doing something like... static String blah = FooClassName.class.getSimpleName() Aug 24 19:06:17 as a class variable of FooClassName Aug 24 19:06:25 this.class.... Aug 24 19:06:38 what? Aug 24 19:06:41 the twss was for OHCOW Aug 24 19:06:59 oooo Aug 24 19:07:05 oops :-X Aug 24 19:07:08 'this' doesn't work for definitions of class variables Aug 24 19:07:19 Hodapp, if it's not static, you can do getClass() Aug 24 19:07:42 It's static. Aug 24 19:07:43 this.getClass() ? Aug 24 19:08:08 oh its in a static method Aug 24 19:08:12 so no instance for this Aug 24 19:08:14 uh Aug 24 19:08:16 MyClass.class Aug 24 19:08:22 alternately, myClassInstance.getClass() Aug 24 19:08:31 the more you know! Aug 24 19:08:32 ^^^ Aug 24 19:08:33 * lov shoots a rainbow Aug 24 19:08:46 my eye! Aug 24 19:08:50 lov: I'm seeing if there's some way I can do this where I avoid repeating the class name. Aug 24 19:08:52 * lov winks Aug 24 19:08:54 It's minor, really. Aug 24 19:09:16 I'm not really sure what you want. Aug 24 19:09:41 I'm tempted to say "no" Aug 24 19:09:49 why avoid using the class name? Aug 24 19:09:58 that seems paradoxical Aug 24 19:10:04 How is that paradoxical? Aug 24 19:11:09 because you want to get a field on something without identifyign that something Aug 24 19:12:04 It's identified by context, the same way a class variable or instance variable would be. Aug 24 19:13:12 in this case wouldn't the context be the class name? Aug 24 19:13:41 speakingcode: No, the context is _the fact that it's inside of the class_. Aug 24 19:14:19 hey, is there a tutorial on how to link the android sdk to the android platform build that I do via my git checkout? Aug 24 19:14:30 this.getClass() or Class.class theres your options Aug 24 19:15:49 How will Class.class help me? Aug 24 19:16:03 Yeah I'm a little confused here Aug 24 19:16:13 Hodapp: as far as I know, your only choice for a static context is to use the actual class name Aug 24 19:16:18 does Java have any constant keyword for the current class? Aug 24 19:16:29 yes, it does. it's CurrentClass.class Aug 24 19:16:30 getClass()?..... Aug 24 19:17:12 how about this, hodapp what are you trying to do anyway? Aug 24 19:18:17 speakingcode: That's not a constant keyword, the way 'this' is; it varies based on class. Aug 24 19:18:42 ok but look Aug 24 19:18:50 when you are writign code in some class file Aug 24 19:18:55 you know what fiel you're writing in Aug 24 19:19:04 hi Aug 24 19:19:10 hey ultra- Aug 24 19:19:28 rootlicker here. sorry i didn't get back to you the other night. saw you mention something a little earlier about passing data o threads Aug 24 19:19:30 i figured out how to send information out of a thread into the main using a handler, but how do i send something into the thread? Aug 24 19:19:35 hey Aug 24 19:19:38 i got that thing to work Aug 24 19:19:51 objects are shared across threads Aug 24 19:20:10 dragging a finger around… you have to do it from the parent if it's not android 3 or higher b/c motionwhatevercompat is for mouse cursors and such Aug 24 19:20:20 ah Aug 24 19:20:53 yeah i can make a bundle and use handler.sendmessage from inside the thread Aug 24 19:20:58 i don't know how that works in the other way, tho Aug 24 19:21:09 you might not need to Aug 24 19:21:56 "Apple is predicted to drop the price of an existing iPhone to $200 unsubsidized in 2013, accelerating share gains for its smartphone platform in emerging markets." :O Aug 24 19:22:12 all threads in the same process have the same access to objects Aug 24 19:22:17 as if I am going to buy one when it's cheaper Aug 24 19:22:18 Did 4.1 change the way you handle onConfigurationChanged? Aug 24 19:22:18 $200, unsubsidized? Aug 24 19:22:18 no thanks Aug 24 19:22:26 I'd buy one just to play around with stuff Aug 24 19:22:31 On 4.0 my app rotates, on 4.1 it doesn't Aug 24 19:22:41 Hodapp: I'm a little confused about what your use case is here. Aug 24 19:22:53 Either you're looking at an instance, or you're not. Aug 24 19:22:54 speakingcode i think i tried updating a variable externally and reading if not null on a loop in the thread and it didn't work, but i'm going to try again b/c it was very early this morning Aug 24 19:22:54 lov: my guess is turning the phone Aug 24 19:23:07 If you're looking at an instance, you can just use getClass(). Easy peasy. Aug 24 19:23:14 ultra- i'd have to know a little more Aug 24 19:23:16 orientation is included in android:configChanges for the activity Aug 24 19:23:16 richcolins: nothing rotated in my n7 until i toggld something Aug 24 19:23:18 If you're not looking at an instance, you don't know what the subclass WILL be. Aug 24 19:23:23 all you know is what the class IS. Aug 24 19:23:23 ultra-: In settings? Aug 24 19:23:33 unfortunately i'm short on time right now, i'll have to play with it later Aug 24 19:23:34 lov: Static code by definition is not looking at an instance, but it is looking at a specific class. Aug 24 19:23:40 right. Aug 24 19:23:43 yes, next to the settings button in the notification slider Aug 24 19:23:48 but ClassName.class doesn't work because it's the classname Aug 24 19:23:57 i'm not sure if an app can override it, but none i tried did unless it was already set up as landscape Aug 24 19:23:59 or rather doesn't work for your purposes Aug 24 19:24:09 which is confusing because I'm not sure why this isn't adequate Aug 24 19:24:15 is it just that you feel that it's too verbose? Aug 24 19:24:27 if that's the case, there's not much you can do Aug 24 19:24:27 lov: I said "It's minor, really." for a reason - I was seeing if Java had a counterpart to 'this' that referred to class rather than instance. Aug 24 19:24:41 no, not really. Aug 24 19:24:48 lov: That's all I was asking. Aug 24 19:24:51 the class name refet to a class Aug 24 19:24:53 richcollins: can you set it to stay as landscape? Aug 24 19:25:01 refers* Aug 24 19:25:07 ultra-: I can' t find the setting :-/ Aug 24 19:25:07 there's no need to have a special identifier Aug 24 19:25:17 speakingcode: That's not a counterpart to 'this' if it varies based on context. Aug 24 19:25:17 for rotation Aug 24 19:25:27 i mean non-rotating, but statically as landscape Aug 24 19:25:27 there's no need for a counterpart Aug 24 19:25:28 DEVICE -> Display doesn't have it Aug 24 19:25:34 this identifies an instance, an objec Aug 24 19:25:40 classes are identified by the class Aug 24 19:25:46 ultra-: I'd like it to rotate not stay static in landscape Aug 24 19:25:53 Right now its static in portrait Aug 24 19:25:53 i'm thinking it might not override the system with rotating Aug 24 19:26:01 class SomeClass { SomeClass mysomeclass = new SomeClass() } Aug 24 19:26:05 I don't need to override it Aug 24 19:26:07 no app did unless it was one forced to landscape Aug 24 19:26:10 I just need it to rotate Aug 24 19:26:25 why would you need ThisClass mysomeclass = new ThisClass it doesn't make sene Aug 24 19:26:39 For instance Chrome doesn't rotate either Aug 24 19:26:44 yeah i'm not sure you'll be able to unless the user allows it Aug 24 19:26:50 by toggling that setting Aug 24 19:26:50 ultra-: Seriously? WTF were they thinking Aug 24 19:27:02 speakingcode: If it doesn't make sense to you, then just quit talking about it. Aug 24 19:27:16 at what point would you need to refer to a class without knowing the class? when you have objects that could be different classes in a polymorphic usage, this you use .getClass() on the objects Aug 24 19:27:17 they were thinking they want to encourage the n7 to be used in portrait… the home screen doesn't rotate even if you change that setting Aug 24 19:27:33 but apps will Aug 24 19:27:40 no, it'sn ot that it doesn't make sense _to me_, it's that it doesn't make sense, period Aug 24 19:28:01 speakingcode: You are not the arbiter of what does and does not make sense. Aug 24 19:28:07 getting meta. Aug 24 19:28:18 ultra-: OK but where is the setting? I don't see it in the settings app Aug 24 19:28:21 correct. logic is. so don't worry about if it makes sense to me or not. worry about if its logical, which it isn't Aug 24 19:28:28 i changed it in the notification slider Aug 24 19:28:32 ...so no one has linked the eclipse ide to a copy of the android source they build? Aug 24 19:28:32 ah ok Aug 24 19:28:34 speakingcode: You are also not the arbiter of whether it is logical or not. Aug 24 19:28:38 there's an icon/button for it next to the settings button Aug 24 19:28:52 at least they made it fast to get at Aug 24 19:29:06 ultra-: I see thanks Aug 24 19:29:14 speakingcode: Plenty of other language designers have found that keywords that change meaning based on context are quite logical and make plenty of sense. That's not what I'm here to ask, so I don't know why you're discussing it. Aug 24 19:29:18 Hodapp, correct, logic is. logic is a filed of proven axioms and derivitive assertions. if p then q, ~q -> ~p Aug 24 19:29:28 no problem Aug 24 19:29:31 ultra- There is also an icon for the settings app -- I thought you meant to tap that to go to settings ... Aug 24 19:29:39 ah, nope Aug 24 19:29:49 oh we're going into 'somebody is wrong on the internets' territory Aug 24 19:29:53 yeah Aug 24 19:29:57 * lov gets popcorn Aug 24 19:30:00 speakingcode: Axioms actually aren't proven. By definition. Aug 24 19:30:07 but be warned, i'm new at this… maybe there's a way to trigger it via code… i'm telling you from an end-user standpoint, that's what i had to do to make any app rotate Aug 24 19:30:31 i always have to add the disclaimer "but i don't know jack" :) Aug 24 19:30:35 true, axioms are assumed and the assertions are derived from them via proof Aug 24 19:30:45 speakingcode: None of this is relevant though. Aug 24 19:30:57 bbl, back to work Aug 24 19:31:12 at any rate, there is no need to access a static class name by a general keyword. in a static context, you reference a static method or field via the class name Aug 24 19:31:35 speakingcode: You are not the arbiter of what there is and is not a "need" for. Aug 24 19:31:37 so there is no point at which you would not have the class name to access the class object of a class Aug 24 19:31:53 and i didn't make the decision Aug 24 19:32:56 no shit i'm not the arbiter. a need indicates an absolute necessity. there is no absolute necessity to access a class object without the identify of the class in a static context. go read the design documentation o njava if you don't believe me Aug 24 19:33:43 speakingcode: I really don't think profanity is necessary when I ask whether or not Java has a particular construct that parallels what some other languages have. Aug 24 19:33:45 when yuo call a static method on a class, how do you do it? SomeClass.method() which implies that you know the handle of the class upon which you are calling it Aug 24 19:34:19 profanity is never necessary but chosen when repeatedly told i'm not the arbitrator of irrelevant matters when you don't like the answer given Aug 24 19:34:29 speakingcode: Design documentation doesn't determine whether or not there is a 'need' for something. It offers, at best, a rationale behind a design, but this basically never represents an absolute necessity of any sort, nor a formal proof or deduction. Aug 24 19:34:45 well, as lov said, explain your use case Aug 24 19:35:06 lov, have any popcorn to share? Aug 24 19:35:31 all you have said is getting the class object in a static context. static context means you are calling directly on the class handle, is there any other way? so how would you not have the class handle? so how is there is a need for accessing it another way? Aug 24 19:36:02 Show me an example of calling a method or accessing a field in a static context without knowing the class upon which you call it and i will retract my statement Aug 24 19:36:16 speakingcode: I honestly don't know what you are getting so worked up about. Aug 24 19:37:02 i'm not worked up in the least Aug 24 19:37:17 one can argue without emotional reaction Aug 24 19:38:05 speakingcode: Just chill out. It's not worth getting bent out of shape over. Aug 24 19:38:09 ..so that's a no to the linking of the android sdk to your own android platform build? Aug 24 19:38:49 .... don't come with an irrelevent argument, then revert to personal jabs about my manner as if you have any insight into what it is Aug 24 19:39:14 speakingcode: Seriously. Chill out. Aug 24 19:39:35 you asked a question. we gave you an answer. you have since argued the design of the language, the nature of logic, and other useless stuff. go bark up another tree, people are here to find reasonable solutions Aug 24 19:40:05 Ladies and gentlemen, the fight is over. Aug 24 19:40:07 It's a tie. Aug 24 19:40:12 The rematch can take place somewhere else Aug 24 19:40:14 * lov rings a bell Aug 24 19:40:39 #android-fightclub Aug 24 19:40:40 seriously though just /msg each other or kiss or something Aug 24 19:40:41 Is there a tutorial on how to link the android sdk (eclipse) to the android platform build that I do via my git checkout? Aug 24 19:40:54 lov: It's cool. He'll chill out now. Aug 24 19:41:00 dude Aug 24 19:41:27 SimonVT: the first rule is... Aug 24 19:42:00 quit trolling buddy Aug 24 19:42:33 Potentially silly question, but I can't for the life of me remember the proper term for this - I'm looking for the process (so I can google it) on how to add an account to the "accounts" section under settings, so i can let users manage credentials and other settings via there. Aug 24 19:42:45 info: A new version of repo is available Aug 24 19:42:50 how do i upgrade repo? Aug 24 19:43:55 Do you mean accountmanager? Aug 24 19:44:13 maybe Aug 24 19:44:17 ill check that out SimonVT, thanks Aug 24 19:44:41 yuup! thats it. thanks. Aug 24 19:45:09 this is honestly the first I've realized that Android allowed multiple users besides 'root'. Aug 24 19:45:50 I was under the impression that "permissions" are just various linux users with limited capabilities running different aspects of your app Aug 24 19:45:50 ? Aug 24 19:46:42 Hodapp: oh yes, multi user support is apparently coming. Aug 24 19:46:51 lov: apparently? Aug 24 19:46:59 hmmd Aug 24 19:47:12 hlfshell: i thought that every android app ran in its own linux username to begin with? Aug 24 19:47:26 Hodapp: a lot of multi user support has been getting quietly added to AOSP Aug 24 19:47:33 there's a good article on this on the blagoblags Aug 24 19:47:56 clever: that sounds more right than my understanding. it makes more sense. Aug 24 19:48:11 clever: I just ran 'ps' inside an ADB shell and I'm fairly sure you're right. Aug 24 19:48:31 clever: it does Aug 24 19:48:39 Hodapp: i believe it was done to prevent inter-app data leakage Aug 24 19:48:40 it's one of the security models Aug 24 19:48:54 just not sure how you would add multi-user to things, a second linux account for every app? Aug 24 19:49:03 well, uh Aug 24 19:49:16 possibly? Aug 24 19:49:51 lov: have you this blagoblagging article handy? Aug 24 19:49:57 a base user per person, who runs app as the app's user. Data stores that only allow that base user to access, even if they're running via another user. result: apps end up creating multiple data stores, accessible to only one at a time? Aug 24 19:50:02 you wouldn't necessarily have to, as long as you can effectively make User A unable to point to User B's data Aug 24 19:50:09 It would probably have to re-map application data directories to a per-system user structure Aug 24 19:50:19 ^^ Aug 24 19:50:58 Hodapp: this isn't it: http://www.itechpost.com/articles/4060/20120821/multiple-user-accounts-android-jelly-bean-active.htm Aug 24 19:51:08 then... why... did... Aug 24 19:51:33 Hodapp: http://www.androidpolice.com/2012/07/30/multiple-user-accounts-are-coming-miles-of-code-is-already-in-aosp-and-some-of-it-is-quietly-working-on-devices-right-now/ Aug 24 19:51:36 there we go Aug 24 19:51:42 oh, good practices recommendation (if it won't summon another flame war): For a method like onCreate, what is the proper way of handling a fatal error there since I can't exactly throw exceptions? Aug 24 19:51:49 I posted that first link to show that's it's almost here Aug 24 19:52:12 Hodapp: depends on how fatal the error is. Aug 24 19:52:32 If your activity can stick around, display an uncancelable dialog that finishes the activity when it's done Aug 24 19:52:44 otherwise, start a new activity just to show some error information and finish this one immediately Aug 24 19:52:50 'application is too screwed to do anything useful except tell you it's screwed' sort of fatal Aug 24 19:52:51 or, just don't catch the exception; let the user see the force close Aug 24 19:53:17 mind you, you can theme activities to look like dialogs Aug 24 19:53:28 you can also make activities transparent, and then display a dialog in that transparent activity Aug 24 19:54:12 But when onCreate has a signature which is already defined, how can I throw exceptions from it? Aug 24 19:56:03 get what I'm asking? It's public void onCreate(Bundle savedInstanceState), not onCreate(...) throws WhateverException Aug 24 20:00:06 Hodapp: any exception you throw in onCreate is going to crash the app Aug 24 20:00:28 I'm suggesting that one strategy is to not even try to cope; just let the app crash. Aug 24 20:00:36 However, if you don't want to do that, then you should do the other approaches Aug 24 20:03:34 okay.. I hope my nick is registered. Aug 24 20:03:49 jedix: does nickserv say it is? Aug 24 20:04:07 lov: What I'm not getting is how I go about even letting an exception through when the method doesn't declare that it throws any. Aug 24 20:04:22 yes, but no one in this channel recognized me speaking before.. thanks! Aug 24 20:04:35 I was wondering if I'd have to part/join Aug 24 20:05:15 Hodapp: RuntimeExceptions don't need to be declared. Aug 24 20:05:26 ahh, okay Aug 24 20:05:37 You can also modify the signature of oncreate; it can throw something if you say it does. Aug 24 20:05:42 it's not classy but it's possible. Aug 24 20:06:05 I didn't realize that was possible; I thought that would make it cease to extend/implement what it is supposed to. Aug 24 20:07:19 at the present it's possible, though I suspect it's an error. Aug 24 20:07:35 the real hodapp does not appear to be standing up Aug 24 20:07:37 Anyway, you could always wrap your declarable exception with a runtimeexception of some kind Aug 24 20:07:41 dispraekailo: bah? Aug 24 20:07:52 I repeat, the real hodapp does not appear to be standing up Aug 24 20:08:19 <- the real Hodapp is standing here Aug 24 20:08:36 lov: this is true. Aug 24 20:08:50 ;3 Aug 24 20:10:28 I don't know what that emoticon means... Aug 24 20:10:45 :3 is the "aww" emoticon Aug 24 20:10:52 ;3 must involve winking? Aug 24 20:10:56 yes Aug 24 20:13:10 Are there any known bugs with requestLayout in 4.1? This code is called many times but always sizes the video to be the minimum width that it was called with Aug 24 20:13:11 https://gist.github.com/dc49838d393da5f13f3d Aug 24 20:13:36 i.e if I call params.width = 400; videoView.requestLayout(); then later I call params.width = 800; videoView.requestLayout(); Aug 24 20:13:40 It stays at 400 Aug 24 20:13:43 but only on 4.1 Aug 24 20:16:36 is there any advantage to populating Views in onStart() instead of onCreate()? Aug 24 20:17:02 looking at another dev's code and he does it consistently, unfortunately he's not around to ask Aug 24 20:18:44 Sure, if you change your data after onStop and before onStart Aug 24 20:19:05 ah forceLayout worked Aug 24 20:21:28 huh, do most apps in Android log things? I'm seeing plenty of other log messages there when I plug in the tablet than just what I'm developing Aug 24 20:21:46 that would have been helpful before I threw one of my tablets out a 3rd story window, whoops. Aug 24 20:32:06 "The Friday App Clinic" is pretty cool, never seen it before. Stream is here http://www.youtube.com/watch?v=CP4EdBpRanc Aug 24 20:33:44 Rockmaninoff if you do it in onStart() it willreoccur whenever the activity is made visible again after another view covers it. this may be undesired behaviour ni some cases Aug 24 20:34:48 mgj, good recommendation. Checking it out now. Aug 24 20:47:44 "The newest version of Google Maps currently causes a conflict with the HTC Sensation" Aug 24 20:47:54 even google has a tough time testing on all the phones :P Aug 24 20:48:09 tbh it usually comes down to "oems done fucked shit up again" Aug 24 20:48:31 yeah, they can do more extensive mods than i thought Aug 24 20:49:31 Hi guys, I have a question about bluetooth (I'm a big newbie in Java and obviously in Android developement). So, I did an application that activate my bluetooth when it starts, which it does pretty good, now what I'm trying to do is when I press a button, it scans for paired devices or even new ones (depends on which is simpler), though I can't figure out how to do that, I tried to figure Aug 24 20:49:31 it out by myself by reading the BluetoothChat sample or even the source of custom apps, but the scripts were too complicated and I'd like it simple, even if I have to hard code the Mac adress or whatever it needs to connect through Rfcomm to another device which would be an arduino UNO. (Another thing, I'm not a native english speaker, so I apologize for my syntax, and mistakes), Thanks Aug 24 20:49:31 in advance Aug 24 20:49:52 Sorry for the long post by the way Aug 24 20:50:00 J--On: you can scan with the BluetoothManager iirc Aug 24 20:51:02 "NASA Preparing Mini-Satellites To Send Into Space Powered By The Nexus One and Nexus S" holy crap, i thought something like this would have to be radiation hardened Aug 24 20:51:10 hmm by going in the settings ? Aug 24 20:51:47 As I would do to connect it with my computer, or another cell Aug 24 20:52:04 J--On: have you read this yet: http://developer.android.com/guide/topics/connectivity/bluetooth.html Aug 24 20:52:17 Yes, i did Aug 24 20:52:50 Oh my bad no Aug 24 20:53:00 It's what I was looking for Aug 24 20:53:34 I used it to the first part, but wasn't able to find it again, yes I know I'm a bit dumb Aug 24 20:53:44 for the first part* Aug 24 20:57:40 is there a way to set a callback on the default activity? I'm writing a lib and I need to have my function called when the app starts. Aug 24 20:58:21 hadees: consider subclassing Application Aug 24 20:58:35 or require people using your library to call the function Aug 24 20:59:24 those are the best options? I was trying to make it just a drop in and they wouldn't have to change their code. Aug 24 20:59:56 I'm not really sure what you want. Aug 24 21:00:03 Your client needs to call your classes somehow Aug 24 21:00:19 if your class isn't even referenced, you can't even use a static constructor Aug 24 21:00:20 Evening guys. I really need some help with a somewhat simple problem. I have a string containing html, and I simply want to get the text from a certain div (which also has an id). Any easy way to do it? Been searching online in vein. Can't make anything to work right :( Aug 24 21:00:36 ioannis: xml parser Aug 24 21:00:47 ioannis: html parser Aug 24 21:00:53 ioannis: chicken parser Aug 24 21:01:01 noob parser plz Aug 24 21:01:07 * maraz waits for someone to say regexp Aug 24 21:01:25 ioannis: i've had good luck with beautiful souop Aug 24 21:01:29 I wouldn't be asking this if I wanted 2 word answers :/ Aug 24 21:01:41 http://www.crummy.com/software/BeautifulSoup/ Aug 24 21:01:55 you wouldn't need to be asking for more if you took those two words and went all google-fu on them. Aug 24 21:02:09 maraz sorry I've been looking for 3 hours Aug 24 21:02:12 Beautiful soup requires python though. Aug 24 21:02:14 I've tried various examples Aug 24 21:02:27 regex, htmlcleaner Aug 24 21:02:30 lov: he didn't specify a language Aug 24 21:02:33 I simply can't make it work Aug 24 21:02:36 regex does not a html parser make Aug 24 21:02:40 * lov stares at polloscanfly Aug 24 21:02:44 * lov stares at the channel Aug 24 21:02:48 * lov stares at polloscanfly again Aug 24 21:02:59 maraz heard that before Aug 24 21:03:04 lov: http://code.google.com/p/python-for-android/ Aug 24 21:03:06 ioannis: use an xml pull parser like ksoap, and parse your content. Aug 24 21:03:15 lov: :-) Aug 24 21:03:19 you just need one div, you know the id Aug 24 21:03:20 ? Aug 24 21:03:21 interesting. Aug 24 21:03:30 but I don't get the reason why. The only thing i need is
THIS IS WHAT I WANT
Aug 24 21:03:40 because it is the only robust way of doing so Aug 24 21:03:47 speakingcode YES Aug 24 21:03:49 lov: even if that weren't the case… NDK allows C, C++, regular sdk has Java Aug 24 21:03:59 how about fbetween("
","
") Aug 24 21:04:03 polloscanfly: and none of those are python :P Aug 24 21:04:20 speakingcode, let me see? I didn't know that existed :/ Aug 24 21:04:23 speakingcode: is it inclusive or exclusive? you could be grabbing the rest of the *file* with that. Aug 24 21:04:29 lov, i'm just new to android development but our client wants the integration so I'm to figure out the most painless way for them to use our service. Aug 24 21:04:45 lov: we are just tracking installs Aug 24 21:04:47 fbetween Aug 24 21:05:07 that's like a common type of string function. it's simple to impelement. he needs a piece of a string, not a full out parser Aug 24 21:05:27 hadees: you've got to have whoever is using your library call some sort of entry method on your library as the first thing. Aug 24 21:05:29 *sigh* okay Aug 24 21:05:36 speakingcode, fbetween? why can't I find that? Aug 24 21:05:46 OH HEY GUYS ANDROID LOGS STUFF SO I THREW MY TABLET OUT THE WINDOW Aug 24 21:06:01 oh hi canadiancow Aug 24 21:06:16 hi lov Aug 24 21:06:29 alrighty then :P Aug 24 21:06:58 ioannis: let me put it this way: you already have structured content, why would you want to parse it as non-structured content? Aug 24 21:07:16 even if it is just the contents of a div Aug 24 21:07:17 maraz all I want is the content of a certain div. Aug 24 21:07:20 implement it ioannis. write a function called fbetween that takes three params. a string and two substrings. use the java string operations to yank the stuff in between the two substrings, return null or empty string if it doesn't find it. put it in your utils library and keep it with you for life Aug 24 21:07:31 ... Aug 24 21:08:01 why would you waste the cycles to parse when all yuo need is a simple substring operation Aug 24 21:08:20 so when he has
lorem ipsum
dolor sit amet
is he going to get "lorem ipsum" or "lorem ipsum
dolor sit amet" ? Aug 24 21:08:25 overkill. and doing it the simple way is reusbale in other contexts with different strings Aug 24 21:08:40 that's up to how he implements it Aug 24 21:08:44 indeed it is Aug 24 21:08:54 but you're assuming the format of the file never changes Aug 24 21:08:59 it doesn't Aug 24 21:09:03 lucky you Aug 24 21:09:06 maraz: better yet,
lorem ipsum
, will he get "
lorem ipsum
" ? Aug 24 21:09:07 the only thing that could change is inside that f@cking div Aug 24 21:09:07 lov, i figured they would have to include the library, i just wasn't sure if there was a callback i could use. So i think the best way then might be to just have them call my lib function in their default Activity onCreate right? Aug 24 21:09:17 typically i would think inbetween the first occurance of subtring 1 and first occurance of substring 2 Aug 24 21:09:30 best would be the Application onCreate, but if your client will have discipline then Activity onCreate is fine. Aug 24 21:09:53 speakingcode first occurance of string 2 AFTER the first occurance of the first :) Aug 24 21:10:15 lov: well what ever onCreate, i'm not sure what they are using but i shouldn't really have to worry about that. Aug 24 21:10:16 if he has nested divs and needs to deal with the structure then yes he will need to parse Aug 24 21:10:26 speakingcode I'll try it you way. If I can't make it, I'll come back and haunt you. Aug 24 21:10:29 your* Aug 24 21:10:42 ioannis: where are the contents of the div coming from? Aug 24 21:10:45 somebody was asking about indoors location yesterday; if they are still here , http://www.bgr.com/2012/08/23/in-location-alliance-announced-indoor-location-service/ Aug 24 21:11:48 maraz it's an html page that responds to a POST Aug 24 21:11:59 almost nothing changes but this message. Aug 24 21:12:05 the div has the same id always. Aug 24 21:12:29 is the html page a part of your site or someone else's? Aug 24 21:13:20 someone else's , and I'm pretty sure I know what you'll say next Aug 24 21:13:31 maraz makes a good point.... Aug 24 21:13:52 if you don't control the data source, you may be better with a more robust approach indeed Aug 24 21:14:00 guys don't sweat it. Aug 24 21:14:08 this is a simple app for my personal use Aug 24 21:14:16 it posts at a web page and gets the response Aug 24 21:14:27 nothing fancy, and not for ever. Aug 24 21:14:31 login script? :) Aug 24 21:14:39 it's only for a couple of days Aug 24 21:15:13 maraz not exactly it's a public listing of army enrolment :P Aug 24 21:15:21 you just enter your ID number / name Aug 24 21:15:22 right Aug 24 21:15:28 and you get your enrollment Aug 24 21:15:53 so anyway, i made this widget that reloads the content by posting the data Aug 24 21:16:06 so i could check by tapping it in my home screen, if my enrollment is up Aug 24 21:16:32 anyways, afk gonna go and do it the "zen" way ;) as speakingcode suggested. Aug 24 21:18:17 i didn't mean to steer him in a bad place Aug 24 21:26:36 <`teh1> hey there Aug 24 21:27:41 <`teh1> anyone know why my pattern match isnt working? https://gist.github.com/e36339bd113c74755c28 Aug 24 21:28:04 <`teh1> i realize that regex is not a solution for "parsing xml", i just want to pull out that one thing and this is the quickest way ;] Aug 24 21:28:34 try http://www.rubular.com/ Aug 24 21:28:46 <`teh1> hm ok Aug 24 21:29:19 <`teh1> oh darn Aug 24 21:31:09 <`teh1> g00s it works there Aug 24 21:31:17 <`teh1> but not in java O.o Aug 24 21:35:12 ms vs rim, i have a bad feeling about rim :| http://www.theverge.com/2012/8/24/3240860/windows-phone-vs-blackberry-10-market-share Aug 24 21:36:02 any easy way to check out my string on a widget? (write to file? to log?) I want to double check Aug 24 21:37:12 Log.i("something", string); Aug 24 21:37:37 typically the first param is a tag for whatever activity or service, etc. where it is Aug 24 21:38:18 hmf for some strange reason eclipse won't update my app on the phone :( Aug 24 21:38:20 you can view the log in logcat in eclipse if the device is connected Aug 24 21:38:55 is it giving you an error? sometimes the thing will get testy, you might have to reconnect the device or restart eclipse (or kill n restart adb server) Aug 24 21:39:43 <`teh1> ioannis: was the app previously installed via eclipse? Aug 24 21:39:49 <`teh1> or google play? Aug 24 21:40:05 <`teh1> or downloaded from internet? Aug 24 21:40:09 eclipse Aug 24 21:40:17 <`teh1> whats Console saying Aug 24 21:40:24 it's already installed no need Aug 24 21:40:30 <`teh1> then it's up to date :] Aug 24 21:40:34 no its not Aug 24 21:40:38 it never is Aug 24 21:40:45 it always says it is, but it isnt Aug 24 21:40:54 an eclipse restart works, only once though :( Aug 24 21:41:09 <`teh1> reinstall eclipse? Aug 24 21:41:13 <`teh1> you can do a force uninstall Aug 24 21:41:13 lol Aug 24 21:41:23 yeah remove the app then it will do it Aug 24 21:41:26 <`teh1> Settings->Applications-> Aug 24 21:41:32 I did it, and it happened again :/ Aug 24 21:41:53 i'll restart everything in a bit Aug 24 21:41:56 <`teh1> keeping in mind that dragging the icon to trash from the main screen doesnt actually delete it Aug 24 21:41:58 just to be sure Aug 24 21:42:00 sometimes eclipse will bitch at me about it, i will add an empty space at the bottom of one file, save it, then delete space n save it, and it iwll work Aug 24 21:42:14 `teh1 yeah, i didn't do that. Aug 24 21:42:22 `teh1 settings ... apps Aug 24 21:42:29 <`teh1> speakingcode: me to but that doesnt sound like the issue since it happens no matter what change he makes Aug 24 21:42:35 that'll force a rebuild so it will think it's a new version. sounds like it may be something else in your case tho Aug 24 21:42:37 yeah Aug 24 21:42:47 <`teh1> sounds to me like it changes arent being recorded correctly Aug 24 21:43:06 nod, or something iffy on the device maybe Aug 24 21:43:08 <`teh1> sounds to me like its never rebuilding Aug 24 21:43:17 <`teh1> ioannis: have you cleaned the project? Aug 24 21:44:16 <`teh1> g00s im retarded. i forgot to call m.find() Aug 24 21:44:25 :) Aug 24 21:44:41 the good news is that you only lost maybe a few hours to your regex; it could have been much worse Aug 24 21:44:50 :P Aug 24 21:44:55 <`teh1> lol yeah, though actually it was only about 15 mins Aug 24 21:45:01 <`teh1> 20 Aug 24 21:45:06 yeah i have had issues with the auto rebuild of several kinds. Aug 24 21:45:10 speakingcode propably Aug 24 21:45:13 speakingcode device. Aug 24 21:45:24 <`teh1> you have cleaned the project right? Aug 24 21:45:30 yup Aug 24 21:45:36 i'm restarting phone Aug 24 21:45:45 <`teh1> excuse the swag im tryna tone it down Aug 24 21:48:20 i'm starting to doubt the x64 version of eclipse Aug 24 21:50:17 you're not using juno are you? Aug 24 21:51:12 speakingcode yeah :/ Aug 24 21:51:19 i just got "Could not find Widget.apk!" Aug 24 21:51:23 after cleaning Aug 24 21:51:25 wtf? Aug 24 21:51:40 IIRC i read a few weeks ago (like three at most) that ADT does not support juno Aug 24 21:51:48 it does Aug 24 21:51:53 but i use 3.8 anyhow Aug 24 21:51:53 terribly? Aug 24 21:52:00 Eclipse sucks, its slow as ... wish IntelliJ IDEA had the same support for Android as Eclipse does with the ADT plugin Aug 24 21:52:40 i don't find eclipse to be slow.. it is slow if yuo install every environment and plugin on one instance of eclipse, but i keep a separate copy for each thing. Aug 24 21:53:05 eh.. they why make plugins available then... if plugins make it so slow.. Aug 24 21:53:08 *then Aug 24 21:53:22 umm..to add functionality? :-x Aug 24 21:53:26 I'm trying to show my app's profile in the Play store through an iframe but it doesn't show up ... is there a public link I can use? Aug 24 21:54:18 yeah search it on the playstore and use that one Aug 24 21:54:28 I guess i have to redownload ADT if I change my copy of eclipse right? Aug 24 21:54:54 yeah you will have to redownload adt but not sdk, etc Aug 24 21:55:22 might be able to copy the adt plugin folder or something but probably easier n safer to just redownload Aug 24 21:55:35 let's see.. Aug 24 21:57:14 speakingcode, that's the url I'm using but it won't show up through an iframe Aug 24 21:57:39 ah. pretty sure that can be blocked, perhaps google has Aug 24 22:01:22 ok imported to 3.8 , now it says n established connection was aborted by the software in your host machine Aug 24 22:01:22 java.io.IOException: An established connection was aborted by the software in your host machine Aug 24 22:02:10 eeek Aug 24 22:02:19 hello all Aug 24 22:02:24 has anyone had this before? Google Play does not accept apks signed with the debug certificate. Create a new certificate that is valid for at least 50 years. Aug 24 22:02:31 yeah Aug 24 22:02:41 calvinchan, you need to export a signed APK Aug 24 22:03:05 How to increase microphone's gain volume? using AudioRecord Aug 24 22:03:13 when you run your app from eclipse to test it, it builds an apk with a temporary debug key, which cannot be instaleld on devices or sent to play store Aug 24 22:04:22 you will need to create a keystore and add a key into it, with a new key that is valid for at least 50 years, then sign your apk with it Aug 24 22:05:10 Do the chinese tablets have a different driver for ADB then the US ones? Aug 24 22:05:26 "which cannot be instaleld on devices" .. oO Aug 24 22:05:58 i think you can install unsigned apks to rooted devices Aug 24 22:06:00 not sure Aug 24 22:06:20 speakingcode: when I get to export signed apk Aug 24 22:06:28 it prompts me for creating keystone Aug 24 22:06:32 what is a keystone? Aug 24 22:06:41 keystore* Aug 24 22:06:46 keystore Aug 24 22:06:48 yes Aug 24 22:06:58 it's a file that is password protected, that holds your key files, which are also password protected files Aug 24 22:07:10 key files = api? Aug 24 22:07:12 apk? Aug 24 22:07:14 no Aug 24 22:07:25 it's a file that signs your apk with a unique key Aug 24 22:07:33 http://developer.android.com/tools/publishing/app-signing.html Aug 24 22:07:49 so is it like creating a username and password for my apk? Aug 24 22:07:58 DO NOT FORGET THE PASSWORD OR LOSE THE FILE. once you sign and upload an apk to the market, you canot add any other apk with the same package name unless it is signed by the same keyfile Aug 24 22:08:20 An apk needs to be signed before users can install it. Play store requires the certificate to be valid for at least 50 years, whereas debug keys are only valid for a year Aug 24 22:08:22 read: if you lose it, you're screwed and can't update your app, ever Aug 24 22:08:25 it's creating a unique signature to prove that later versions are the same Aug 24 22:09:11 SimonVT can debug signed apks be installed onto other devices? like through adb install? was unable to do that when trying before. was curious how eclipse is able to push it onto a device to test tho Aug 24 22:09:19 Yes Aug 24 22:09:25 hmm Aug 24 22:09:34 been a while, maybe i jsut don't recall correctly Aug 24 22:09:37 oil, thanks! Aug 24 22:09:49 debug cert is just an autogenerated key that's valid for a year Aug 24 22:09:53 Android doesn't care Aug 24 22:09:55 Play store does Aug 24 22:10:53 hmm. maybe when i encountered that, the device had a prior version installed on it which was already signed.. i dunno, was more than a year ago.. maybe it was just a plain unsigned apk, not the debug one Aug 24 22:11:15 Maybe Aug 24 22:11:26 Android requires that the certificates match when updating an app Aug 24 22:11:37 nod Aug 24 22:11:58 first thing i would have done thn is just uninstall the prior.. maybe it was unsigned then, not debug key Aug 24 22:12:08 shrug. any ole way Aug 24 22:18:51 Guys, I'm facing whole new problem, could someone explain me hwo to get http://pastie.org/4582924 the last part of the code to go on the List View or something like that on another layout ? Dunno if it's even possible, I guess but.. I checked on the Android Developer site, but can't find anything that would help me Aug 24 22:19:06 speakingcode got it. my solution is this: http://pastebin.ca/2197930 Aug 24 22:19:20 (the get name & address part) Aug 24 22:19:36 now I need to get it to show up properly, because it's in Greek and it shows up weird. UTF8 probs i guess... Aug 24 22:19:43 How to increase microphone's gain volume? using AudioRecord Aug 24 22:24:04 speakingcode: after I created the keystone it still says I can't upload the api because it's signed with the debug certificate Aug 24 22:26:14 keystore* Aug 24 22:26:23 you have to sign the apk after you create the keystore Aug 24 22:26:40 make the keystore, then make a key within it, with an expiration of 50 years or more Aug 24 22:26:49 yes, have done Aug 24 22:26:57 if you're using eclipse, right click on your project folder and go to Android -> export signed APK file Aug 24 22:27:18 the select your keystore and file and sign it, and upload _that_ file. i gotta go, goood luck Aug 24 22:27:31 thanks Aug 24 22:28:47 when initialized new AudioTrack(AudioManager.STREAM_VOICE_CALL... why microphone gain volume of AudioRecord 'ed data is gonned down? Aug 24 22:29:14 how to prevent this Aug 24 22:33:51 No one ? Aug 24 22:39:07 how do I pass data between fragments? Aug 24 22:41:34 claims are.. Aug 24 22:42:43 Mine ? Aug 24 22:44:33 hmm from 0 to a widget that polls data and shows'em , in 4 hours. I learned little though :( Aug 24 22:44:43 android tools can be a bit frustrating Aug 24 22:48:58 thanks for all guys. have a nice day/night Aug 24 22:49:17 Good Night ! Aug 24 23:07:07 "Jury awards Apple $1,051,855,000 in Samsung patent dispute ruling" what a load of crap Aug 24 23:11:44 Well I kinda agree with this verdict Aug 24 23:11:55 yeah, i'm not sure why you think it's a "load of crap" Aug 24 23:12:01 it's a matter of law Aug 24 23:12:05 regardless of personal feelings Aug 24 23:14:03 its a load of crap because the patent system is being gamed by the likes of apple, IV, and many of the patents apple files are bullshit anyhow Aug 24 23:14:42 IV? Aug 24 23:14:44 they copy android when they see it fit, like the newer notifications Aug 24 23:14:48 Intellectual Ventures Aug 24 23:14:50 Not that bullshit it seems Aug 24 23:15:05 why didn't you include motorola or google in that list? Aug 24 23:15:19 a patent on pinch and zoom is bullshit. what if somebody patented the right mouse click ? Aug 24 23:15:29 It's patented Aug 24 23:15:33 xerox (PARC) has a lot of patents like that Aug 24 23:15:37 they're just not enforcing them Aug 24 23:15:51 Having a patent doesn't mean you can use it to attack your opponents Aug 24 23:15:57 Justice can invalidate any patent Aug 24 23:16:01 on the contrary it does Aug 24 23:16:07 whether you'll win or not is a different question Aug 24 23:16:20 Yeah, that was my point ^^ Aug 24 23:16:43 ah, i just wanted to point out that the real 'attack' for, especially smaller, companies is having to spend millions defending a claim Aug 24 23:16:47 regardless of legitimacy to some degree Aug 24 23:18:30 Well 1 billion isn't that huge for Samsung Aug 24 23:21:20 its between 0.7 and 1.2% of samsung electronics' total value, depending on how you calculate that Aug 24 23:21:55 That's still not pleasant. Aug 24 23:21:57 Pr3: Having a patent really _does_ mean you can use it to attack your opponents. It doesn't matter if the patent's not even valid - the amount of money to fight it successfully can be too much for nearly any company compared to settling. Aug 24 23:22:08 yeah, that was my point Aug 24 23:22:51 J--On: indeed, i was suggesting it was substantial Aug 24 23:25:56 http://forums.macrumors.com/showpost.php?p=15445800&postcount=1080 Aug 24 23:26:13 before anyone goes claiming that samsung doesn't copy stuff blindly :P Aug 24 23:28:05 i think even google told samsung at least one of their models looked to apple-ish Aug 24 23:28:10 haha, tophyr_ :/ Aug 24 23:28:56 we have had our contact at Market^W Play tell us that our app looked too iPhone-ish Aug 24 23:29:05 it's definitely a thing Aug 24 23:29:17 too iphone-ish? Aug 24 23:29:23 yeah, particular buttons inside the app Aug 24 23:29:32 using too many iOS design elements Aug 24 23:29:33 it's a native app, but some of the assets, didn't look "Android" Aug 24 23:29:35 right Aug 24 23:29:35 we've heard that feedback as well Aug 24 23:29:42 and we use a slide-out, like facebook Aug 24 23:29:49 there were some aspects of that as well Aug 24 23:30:14 google is very, very conscious of wanting to differentiate itself from ios Aug 24 23:30:19 our app is centered around each member of family using it, so we try to strike a balance between unified experience and using platform-specific behaviors Aug 24 23:30:21 its not easy Aug 24 23:33:00 Anyone know if there's an autocompletion bundle for text mate that handles Android completion? Aug 24 23:33:39 tophyr_: they do that my mimicking windows 95 l&f Aug 24 23:33:40 :P Aug 24 23:34:26 * tophyr_ shrug Aug 24 23:34:38 Metro's mimicing AOL 1996 l/f Aug 24 23:34:50 the 90's are back, baby Aug 24 23:40:50 <`teh1> OK weird problem Aug 24 23:41:14 <`teh1> my project wont compile R, though there are no problems shown other than the ones that come with a nonexistent R Aug 24 23:41:30 <`teh1> it was fine until i project->clean Aug 24 23:41:41 <`teh1> have restarded Aug 24 23:41:44 <`teh1> d= t Aug 24 23:42:32 import R; Aug 24 23:43:45 could someone explain me hwo to get http://pastie.org/4582924 the last part of the code to go on the List View or something like that on another layout ? Dunno if it's even possible, I guess but.. I checked on the Android Developer site, but can't find anything that would help me. Thanks in advance :D I know I already posted it, but since I didn't get any answer, I retry, Hope you don't Aug 24 23:43:45 mind Aug 24 23:44:00 <`teh1> arleslie: that breaks it farther :P Aug 24 23:44:19 <`teh1> you arent supposed to directly import that, also it doesnt exist because it is not being compiled Aug 24 23:44:21 <`teh1> no idea why Aug 24 23:45:11 you can't just import R >_> Aug 24 23:45:29 <`teh1> ^exactly Aug 24 23:45:41 you have to use the full class name of the R file Aug 24 23:46:06 <`teh1> now back to the actual problem at hand, after a Project->Clean my R file wont compile anymore (so it just isnt there) Aug 24 23:46:14 <`teh1> because of that i am getting a bunch of these errors... Aug 24 23:46:27 <`teh1> http://cl.ly/image/0Y2r162M0P1w Aug 24 23:46:33 <`teh1> but no errors other than that Aug 24 23:46:54 So lots of xml errors Aug 24 23:47:02 No wonder R doesn't compile Aug 24 23:47:24 <`teh1> those are there because R doesnt exist so it cant find @drawables Aug 24 23:47:41 don't think that's how it works Aug 24 23:47:49 what's the full error message? Aug 24 23:47:54 <`teh1> delete your R and tell me that :P Aug 24 23:48:18 <`teh1> http://cl.ly/image/0i072z011v1Q Aug 24 23:48:24 R.java was removed! Recreating R.java! Aug 24 23:48:35 I think the SDK is too smart for me Aug 24 23:48:39 <`teh1> hah Aug 24 23:48:44 <`teh1> ok try this Aug 24 23:48:51 <`teh1> put some invalid xml somewhere Aug 24 23:48:54 <`teh1> then delete R.drawable Aug 24 23:49:07 have you tried not having invalid XML? Aug 24 23:49:17 <`teh1> you will see a million xml and java errors, and 1 error that pertains to the actual problem ( the malformed xml you just created ) Aug 24 23:49:31 <`teh1> however i do not have that 1 error like i normally do, nor have i changed any xml since last running on the phone Aug 24 23:49:35 <`teh1> all i did was project->clean Aug 24 23:49:58 `teh1: tried reimporting the project into eclipse? Aug 24 23:50:03 <`teh1> wat Aug 24 23:50:04 maybe it's confused.. Aug 24 23:50:09 <`teh1> O.o ok i guess i can try hat Aug 24 23:50:11 <`teh1> that Aug 24 23:50:12 also clean the project if you haven't Aug 24 23:50:33 sometimes it gets a bit confused Aug 24 23:50:40 yep Aug 24 23:51:47 <`teh1> ryanm: i just said like 5 times that the problem originated from me doing Project->Clean Aug 24 23:52:12 clean doesn't always do a perfect job Aug 24 23:52:18 try rm -rf bin/ Aug 24 23:52:24 <`teh1> reimporting didnt fix… sec Aug 24 23:52:39 Recheck those xml errors Aug 24 23:52:40 <`teh1> dont want to delete my manifest :P Aug 24 23:52:43 Or, do an ant build Aug 24 23:52:49 That'll tell you where the issue is Aug 24 23:53:04 <`teh1> oh clever, how do i do that? :P Aug 24 23:53:04 and gen/ Aug 24 23:53:11 <`teh1> already deleted gen Aug 24 23:53:12 your manifest isn't in bin/ Aug 24 23:53:23 shouldn't be, at least :p Aug 24 23:53:25 `teh1: sorry, I'm at work and not reading scrollback in too much detail Aug 24 23:53:31 <`teh1> all good Aug 24 23:59:50 <`teh1> SimonVT: it's just giving me "R does not exist" java errors then aborting the build Aug 25 00:00:16 ant? Aug 25 00:00:26 <`teh1> tophyr_: a copy of it is, realized and emptied bin Aug 25 00:00:31 <`teh1> btw Aug 25 00:00:32 <`teh1> manifest Aug 25 00:00:38 <`teh1> uh yeah SimonVT Aug 25 00:01:21 <`teh1> ThumbListItem.java:80: package R does not exist Aug 25 00:01:29 <`teh1> same errors it gives in Eclipse, just less of them Aug 25 00:01:56 <`teh1> eclipse continues and shows all of the java errors like that and all of the xml errors (caused by no R file) as i mentioned above Aug 25 00:03:38 <`teh1> there are no layout xml errors, only drawable xml errors Aug 25 00:03:50 It'll give you errors when it parses your resources Aug 25 00:03:55 As in, when it generates R Aug 25 00:04:39 <`teh1> yeah Aug 25 00:05:32 Yeah, so fix those errors Aug 25 00:05:45 ant should tell you the file and line Aug 25 00:06:31 <`teh1> SimonVT: i told you already, the error is ThumbListItem.java:80: package R does not exist Aug 25 00:06:53 <`teh1> thats me doing R.drawable.drawable_name Aug 25 00:07:11 Is ThumbListItem in the same package as R? Aug 25 00:07:16 <`teh1> actually R.id. Aug 25 00:07:20 <`teh1> yes Aug 25 00:07:41 <`teh1> http://cl.ly/image/101Q010I463z Aug 25 00:08:06 <`teh1> ThumbListItem is actually COMThumbListItem, just didnt copy the whole thing Aug 25 00:10:21 I don't know, pastebin the ant output Aug 25 00:11:09 And ant clean first Aug 25 00:12:46 <`teh1> SimonVT: https://gist.github.com/c23a43aef5a1af645c2a Aug 25 00:16:06 <`teh1> see what im saaayin? Aug 25 00:19:00 And R doesn't exist? Aug 25 00:19:10 <`teh1> currect because it wont compile :P Aug 25 00:19:40 R is generated before your classes are compiled Aug 25 00:19:50 <`teh1> OK Aug 25 00:19:54 <`teh1> it wont generate them Aug 25 00:19:56 <`teh1> then* Aug 25 00:20:10 It'll fail to generate it if there are errors in your resources Aug 25 00:20:19 But then it'll never get to compiling your classes Aug 25 00:20:22 <`teh1> yes, bit there are no problems Aug 25 00:22:03 <`teh1> SimonVT: https://gist.github.com/620a877a40a50fe0fa32 Aug 25 00:22:12 <`teh1> those are all the problems according to eclipse Aug 25 00:22:36 okay wtf Aug 25 00:22:38 whew Aug 25 00:22:42 that was annoying >.< Aug 25 00:22:48 hi Aug 25 00:22:52 <`teh1> hi Aug 25 00:23:12 I'm just curious about ui development on android Aug 25 00:23:18 not the coding, the graphical part Aug 25 00:23:29 <`teh1> such as Aug 25 00:24:07 not sure really. never done anything like it before, was curious and wanted to see what was up Aug 25 00:24:26 <`teh1> you just plop some xml together and hope it does what you want :P Aug 25 00:24:31 lol Aug 25 00:24:35 <`teh1> protip: dont use the visual editor Aug 25 00:24:37 so no custom icons or graphics? Aug 25 00:24:48 <`teh1> sure you can customize just about everything Aug 25 00:24:58 thats what i wanna help someone do Aug 25 00:25:10 <`teh1> you wanna help someone do it instead of doing it yourself? Aug 25 00:25:40 dude i'm doing good with my wordpress shit. i'm 100% all in on the design/marketing/advertising tip now and have not coded in YEARS Aug 25 00:25:47 Well, most your ant output is missing in that gist before.. I don't know if it's not complaining Aug 25 00:25:56 All I can get from those errors are that you are missing some drawables Aug 25 00:26:06 <`teh1> SimonVT: huh? that was the entire ant output :P Aug 25 00:26:27 <`teh1> well, except for this... Aug 25 00:26:45 ant debug gave you that? Aug 25 00:26:52 <`teh1> oh debug Aug 25 00:27:38 <`teh1> target "debug" does not exist in this project Aug 25 00:27:44 <`teh1> ummm Aug 25 00:27:46 <`teh1> lol Aug 25 00:29:10 <`teh1> there we go Aug 25 00:31:38 <`teh1> SimonVT: PM'd you full output. Aug 25 00:34:27 <`teh1> i will be back in 15 mins Aug 25 00:34:38 <`teh1> if you could check it out meanwhile i would appreciate Aug 25 00:37:05 I don't even.. Where'd you get that build.xml? Aug 25 00:37:32 Try and delete it, then android update project Aug 25 00:37:53 That it doesn't find the debug target means something is wrong Aug 25 00:45:50 does a looper actually loop between Looper.prepare() and Looper.loop() or is that just the way they named it? Aug 25 00:46:14 as in, could i put repeating tcp client code in there as well as receive my handler messages? Aug 25 00:46:30 No, it doesn't Aug 25 00:46:54 It waits at Looper.loop() for you to post messages to the handler attacher to the looper Aug 25 00:47:12 Those messages are then executed on that thread Aug 25 00:47:34 ok thanks Aug 25 00:48:13 i don't know how i can put looping server code in there then Aug 25 00:48:22 while true.... Aug 25 00:48:49 Looper and Handler is just a message queue Aug 25 00:48:55 It doesn't loop over the same code Aug 25 00:48:59 right Aug 25 00:49:41 so how could i also put in code that is repeatedly checking a server? Aug 25 00:50:00 if it's waiting at .loop(), it's going to sit there so it can't execute anything after that Aug 25 00:50:22 the whole point is to pass messages into a tcp client thread Aug 25 00:54:51 As I said, a Looper is used in conjunction with a Handler for posting messages to be executed on a Thread.. How you process those messages are up to you Aug 25 00:55:37 i got a working looper and i'm understanding how it works Aug 25 00:55:57 but if in that thread i also have a while true checking a server repeatedly for messages, i don't know how i can use that while there's a looper in the thread Aug 25 00:56:10 You can't Aug 25 00:56:32 And I don't think you want to continuously query a server Aug 25 00:56:35 That sounds wasteful Aug 25 00:56:57 so if you had a tcp client repeately checking a server for info, and wanted to slip in an instruction to the client to send a message, how would you do it? Aug 25 00:57:20 well it's a realtime app communicating with a server, timing is critical Aug 25 00:57:23 well that's a difficult premise to put myself in Aug 25 00:57:49 why are you polling the server? Aug 25 00:57:59 if the server is going to repeatedly send updates to the client,the client has to repeately poll it, right? Aug 25 00:58:12 no? Aug 25 00:58:24 Could use GCM Aug 25 00:58:30 i would recommend reading some stuff on tcp before you go down this road, especially if its time-sensitive Aug 25 00:58:47 SimonVT: he said 'timing is critical' Aug 25 00:59:06 oh well Aug 25 00:59:58 ultra-: you could look at how IMAP IDLE works for an example of this pattern Aug 25 01:00:50 ok i'll look it up Aug 25 01:01:12 the gist is though.. you connect the socket, put it in the background.. wake up on receive Aug 25 01:01:21 send a heartbeat every now and then to make sure the socket is still in good shape Aug 25 01:01:49 and use different events (like connection state broadcasts, so forth, in the case of android) to do additional heartbeats Aug 25 01:01:51 see that's how i hoped it would work Aug 25 01:02:10 when you do a heartbeat, if it fails, re-establish the connection Aug 25 01:02:22 so you avoid the overhead and stuff of connecting a socket each time Aug 25 01:02:36 you can't rely on tcp keepalive on mobile devices unfortunately, the carriers do not reliably forward it Aug 25 01:02:53 so you'll want to do your own heartbeat message Aug 25 01:04:06 is it like this? http://pastebin.com/urw7GAxu Aug 25 01:04:29 actually i think this is just repeatedly polling Aug 25 01:04:58 10x/sec Aug 25 01:06:03 ultra-: is this going to be a long-running task? like say, in the background indefinitely? Aug 25 01:06:12 this runs as long as the app runs Aug 25 01:06:17 the app does nothing without it Aug 25 01:06:26 so only when the app is in the foreground then? Aug 25 01:06:31 yes Aug 25 01:06:31 or background too? Aug 25 01:06:40 only in the foreground Aug 25 01:06:47 if the app isn't active, the client doesn't need to run Aug 25 01:07:02 ok then mh` solution is likely a good one then Aug 25 01:08:13 how should i go about searching for example code? Aug 25 01:08:53 'java tcp heartbeat' on google maybe Aug 25 01:09:17 anything imap refers to a java impa library specifically Aug 25 01:09:22 well i mean for the entire server Aug 25 01:09:39 i imagine you open a socket in a thread, and there's a command like recv() in python that waits Aug 25 01:10:09 you don't need imap, that was just an example of somethign that uses this pattern Aug 25 01:10:30 right, but i don't know how else to search for this pattern… or what type of client it is Aug 25 01:11:21 ultra-: mr6 I haven't read the chat log far, but imap idle: http://devtcg.blogspot.co.uk/2009/01/push-services-implementing-persistent.html Aug 25 01:11:34 tcp push client Aug 25 01:11:39 is sufficient description of the pattern Aug 25 01:11:44 ok thanks Aug 25 01:11:47 ha, there you go Aug 25 01:11:49 and they even reference imap idle Aug 25 01:11:52 it's like i wrote the internet Aug 25 01:12:18 doc_savage: nice find Aug 25 01:12:48 I believe it's actually jasta's work (he hangs out here) Aug 25 01:13:06 oh yeah i recognized the 'posted by' Aug 25 01:13:16 where is the best place to collaborate with an android app developer to do free graphic work Aug 25 01:13:17 mh`: you might be old enough, eh? Aug 25 01:14:38 there are several corrections to points in that blog comments btw Aug 25 01:14:49 tldr Aug 25 01:15:00 regarding partial_wakelocks and onDestroy Aug 25 01:15:05 not related to tcp Aug 25 01:15:37 this might be overkill as i don't need to receive any information if the app isn't visible Aug 25 01:15:41 doc_savage: *eyebrow raised* Aug 25 01:16:19 sorry, just crediting what I think is your post on long-lived TCP connections :) Aug 25 01:16:19 this app is music oriented and it'll keep getting updates from a server about what's going on inside a sequencer Aug 25 01:16:30 mr6: keep in mind that blog was written around 1.1 days. Aug 25 01:16:48 ultra-: that particular post is about long-running processes but you could certainly still use it just stop the service on bacground Aug 25 01:16:51 ultra- over the internet or lan? Aug 25 01:16:57 we are now here on 4.1, so yeah, i bet there are some bogus things there Aug 25 01:17:00 lan, always Aug 25 01:17:03 oh Aug 25 01:17:08 jasta: certainly, just pointing out there were good comments Aug 25 01:17:08 the meat of it is still the same, though Aug 25 01:17:45 jasta: who is this 'we' that's on 4.1 ;/ Aug 25 01:18:26 doc_savage: indeed, it's me :) Aug 25 01:18:40 jasta: i want an android client that consistently receives messages from a server (10x/sec or more)…is this the kind of thing you'd use? or a polling client? Aug 25 01:18:51 merh :( Aug 25 01:18:53 ultra- Aug 25 01:18:55 i'm reviving that blog as we speak, actually. haven't written in ages, about to post some crap documenting some absurd HTTP keep-alive defaults iOS uses. Aug 25 01:19:03 does this only need to work when your app is in the foreground Aug 25 01:19:05 on the screen Aug 25 01:19:09 yes Aug 25 01:19:12 ultra-: uhh, if you poll 10x a second you're just smoking something. Aug 25 01:19:33 i don't care what happens if the app isn't visible, it'll grab new info when it is Aug 25 01:19:33 ok, and you realize that the latency in android's audio subsystem is enough to make most people give up on sequencer-based stuff.. and you're going to try adding wifi to that, right? Aug 25 01:19:43 also, 10 RTT's per sec is _HARD_ to guarantee on a mobile device. you're going to get behind very fast. Aug 25 01:19:48 no no android doesn't do any audio Aug 25 01:19:50 if you don't care, then you want UDP. Aug 25 01:19:51 yea its just flat out not going to work Aug 25 01:19:58 jasta: ah, cool, well, thanks :) I use your plogcat script and also found your supporting multiple droids post useful too Aug 25 01:20:05 udp is definitely the right answer since this is LAN-only Aug 25 01:20:15 you might have mentioned that when i added caveats about mobile networks a few minutes ago Aug 25 01:20:45 i'm sorry i'm on little sleep, trying to stay awake to put my schedule back in order Aug 25 01:20:51 doc_savage: thanks. i love how google's made these pathetic attempts to make logcat formatting useful/pretty in the ADT but it still sucks so hard compared to plogcat ;) Aug 25 01:21:16 <`teh1> SimonVT: dont spose you took a look? Aug 25 01:21:19 i will look into udp then… i'm glad to know if i'm barking up the wrong tree Aug 25 01:21:19 ultra-: how sensitive to latency is this? Aug 25 01:21:29 like from the time the server emits a message Aug 25 01:21:36 until you can act on it inside your app Aug 25 01:21:38 20 ms wouldn't be so bad Aug 25 01:21:40 oh ok Aug 25 01:21:45 jasta: yeah - plogcat is king :) Aug 25 01:21:47 thats more than sufficient, provided you have decent connectivity Aug 25 01:21:51 less would be great Aug 25 01:21:54 well Aug 25 01:21:58 if your wifi is pinging 3-5ms Aug 25 01:22:07 you can probably get inside 5-9 Aug 25 01:22:11 realistically Aug 25 01:22:27 that's perfect… people don't notice much under 30ms for audio Aug 25 01:22:28 does the client need to send messages back to the server? Aug 25 01:22:37 `teh1: Something's wrong with your build.xml or something Aug 25 01:22:38 and does the server need to know if the client received particular messages? Aug 25 01:22:42 link for plogcat? probably better than my standar logcat -vtime | ack script Aug 25 01:22:44 You don't have the debug target.. Aug 25 01:22:49 yeah, that's how i came about this…i just learend to use handlers and loopers and realized a looper will block tcp polling Aug 25 01:22:54 <`teh1> SimonVT: build.xml didnt exist before creating it so i could do an ant build Aug 25 01:22:59 <`teh1> it was created using eclipse's export Aug 25 01:23:10 Ok Aug 25 01:23:11 delete that Aug 25 01:23:13 ultra-: it's supposed to Aug 25 01:23:15 android update project Aug 25 01:23:16 thats how tcp works Aug 25 01:23:16 <`teh1> SimonVT: ant -debug i did Aug 25 01:23:18 no the server doesn't need to know, it'll send updates of the same data repeatedly, if something is missed, it'll send new stuff ms later Aug 25 01:23:29 ultra-: you put the socket.receive() in its own thread.. and it blocks until it receives more data Aug 25 01:23:31 debug != -debug Aug 25 01:23:34 then it runs that event handler Aug 25 01:23:38 <`teh1> ok Aug 25 01:23:39 then it goes back to waiting for more Aug 25 01:23:43 <`teh1> "android update project"? Aug 25 01:23:45 yeah, and looper.loop() blocks as well, so it wouldn't work Aug 25 01:23:51 thats what threads are Aug 25 01:24:08 but i'm onto udp now… which means i'm starting from scratch… no problem tho, i've learned a few things Aug 25 01:24:24 <`teh1> ah it's in tools Aug 25 01:24:27 udp will be much simpler but you didnt answer my questions a minute ago :) Aug 25 01:24:38 does the client need to send messages back to the server? and does the server need to know if the client received particular messages? Aug 25 01:25:02 the client does send in messages, yes… not nearly as often as the server sends messages… the server won't care if they're received Aug 25 01:25:08 ok Aug 25 01:25:16 what if the client gets a couple messages out of order? Aug 25 01:25:23 is that catastrophic? Aug 25 01:25:32 or if the client dropped a single message Aug 25 01:25:36 can it handle that? Aug 25 01:25:39 just moving onto the next one Aug 25 01:25:44 wouldn't matter a bit Aug 25 01:25:45 but Aug 25 01:25:51 the client's outbound messages are important Aug 25 01:25:54 then udp is exactly what you want Aug 25 01:26:00 then i would perhaps do two connections Aug 25 01:26:07 a tcp connection to the server from the client Aug 25 01:26:17 and then do udp packets for the frequent messages Aug 25 01:26:22 this is how multiplayer games work Aug 25 01:26:32 that makes a lot of sense Aug 25 01:26:39 so tcp automatically resends dropped messages? Aug 25 01:26:42 yes Aug 25 01:26:44 and udp does not Aug 25 01:26:50 gotcha Aug 25 01:26:51 because you don't have a way of knowing if a udp packet arrived or not Aug 25 01:26:55 i've read up on all this but i'm rusty Aug 25 01:27:01 <`teh1> SimonVT: ok did that then "ant debug" and it spouted out a few other things, such as the API level and "checking for dependencies", "creating output dirs", but then build failed with no errors :P Aug 25 01:27:03 but with tcp there is a stateful connection, tcp sequence numbers (serially ordered), etc Aug 25 01:27:08 and it handles all of that under the hood for you Aug 25 01:27:11 yeah, missing an inbound message to the client wouldn't matter Aug 25 01:27:13 but with udp, you send a message to an IP and a port number Aug 25 01:27:14 and its gone Aug 25 01:27:21 and because of that Aug 25 01:27:29 its _possible_ (though unlikely) for packets to arrive out of order Aug 25 01:27:30 if i was able to send 10 a second and it missed 1-2, no big deal Aug 25 01:27:33 and definitely possible for you to drop some Aug 25 01:27:38 yeah it wouldnt be nearly that many on decent wifi Aug 25 01:27:38 that's no problem either Aug 25 01:27:41 like <1% Aug 25 01:27:45 then cool Aug 25 01:27:47 oh that's no problem at all Aug 25 01:27:48 do a tcp connection to the server Aug 25 01:27:54 hi everyone Aug 25 01:28:00 jasta: ah i see now, proclogcat is yours, looks very useful. there's a 'plogcat' on github that I was looking at that is...less useful. Aug 25 01:28:01 handle the 'control messages' or whatever that the cleint needs to send to the server on tcp Aug 25 01:28:09 then your constant 'stream messages' lets call them go over udp Aug 25 01:28:21 great, i will do this Aug 25 01:28:33 there is a *ton* of good reading on how the older (but still very good) multiplayer game engines work Aug 25 01:28:34 <`teh1> oh wait gimmie a sec Aug 25 01:28:35 perhaps i'll have something hobbling along by the end of the weekend… i'm only a couple weeks into android programming Aug 25 01:28:37 like quake, unreal, etc Aug 25 01:29:03 it would be exactly like that… in quake if a message was missed, it would update the player's location to the next message Aug 25 01:29:08 the user wouldn't notice in my situation Aug 25 01:29:11 yup Aug 25 01:29:21 so i would recommend trying to implement this simple model just referring to the docs you need, but then if you find yourself wondering if there's a better way to do something/optimize things/so forth Aug 25 01:29:28 google for those papers and look at how they modeled things Aug 25 01:29:50 the only other thing that i think you need to consider is how you'll "pack" your messages going over udp Aug 25 01:30:00 that's easy Aug 25 01:30:02 it needs to be something that is small, but fast to parse Aug 25 01:30:04 mr6: shame on him. his first commit is apr 5, 2011. proclogcat was born apr 13, 2010. he clearly didn't do a google search before he named that thing. Aug 25 01:30:08 a message will be maybe 2-10 integers Aug 25 01:30:19 cool Aug 25 01:30:22 http://msgpack.org/ Aug 25 01:30:25 take a look here Aug 25 01:30:25 <`teh1> waaaat Aug 25 01:30:28 i just need to send flags… what i'm controlling, where it is. Aug 25 01:30:38 ok Aug 25 01:30:55 that's a works-out-of-the-box thing for serializing messages to go over the network Aug 25 01:30:56 mh`: errm, no, here: http://code.google.com/p/protobuf/ Aug 25 01:31:02 oh, the client will need to request some info once in a great while, and getting it is important but not timing critical Aug 25 01:31:02 jasta: no u Aug 25 01:31:14 ultra-: what language is your server code in? Aug 25 01:31:25 ultra-: that's fine, this is only for your udp stuff Aug 25 01:31:31 the tcp stuff is infrequent so its not nearly as important Aug 25 01:31:32 well it'll be python, for now i'm testing against netcat Aug 25 01:31:41 jasta ^ and there you have why i didn't recommend protobuf Aug 25 01:31:44 its terribly slow in python Aug 25 01:31:49 msgpack is an order of magnitude faster to deserialize Aug 25 01:31:58 (thrift is almost as bad) Aug 25 01:32:03 is that like serialization of Message Aug 25 01:32:04 ? Aug 25 01:32:07 <`teh1> SimonVT: https://gist.github.com/bcaffc80f1b15c82ad5a Aug 25 01:32:08 yes Aug 25 01:32:22 i probably won't even need to do that… really, 3 integers would cover a message Aug 25 01:32:34 cool, then just pack them into a binary format and do it back Aug 25 01:32:35 im kind of surprised google hasnt fixed that yet Aug 25 01:32:39 jasta: really? Aug 25 01:32:40 10x sec Aug 25 01:32:40 python is a first class language in google, isn't it? Aug 25 01:32:46 jasta: never used chrome, i take it Aug 25 01:32:53 `teh1: So you're missing a lot of drawables, just like eclipse told you Aug 25 01:33:06 jasta: but in all seriousness, yeah Aug 25 01:33:09 it is odd Aug 25 01:33:10 <`teh1> O_O the fuck Aug 25 01:33:17 google does use python and python's creator works for them Aug 25 01:33:23 as of last year, at least Aug 25 01:33:45 i mean, if it was some silly piece of crap like ocaml or whatever i wouldn't be shocked. but google uses python _a lot_, and google services all use protobuf. all of them. Aug 25 01:33:57 yeah, i'm right there with you Aug 25 01:34:11 has anyone been working with Shopify on Android? Aug 25 01:34:26 I mean developing for Shopify Aug 25 01:34:32 :) Aug 25 01:34:37 jasta: msgpack to protobuf is apples to oranges though Aug 25 01:34:43 protobuf is statically typed structs on the wire Aug 25 01:34:46 msgpack is akin to json Aug 25 01:35:10 <`teh1> whatever ill deal with it later Aug 25 01:35:12 really the only thing that's mature that i can think of to compare to protobuf is thrift Aug 25 01:35:13 <`teh1> thanks for help Aug 25 01:35:21 and thrift is still considerably faster in both java and python, than protobuf Aug 25 01:35:23 (but ugly as sin) Aug 25 01:36:08 http://www.eishay.com/2008/11/protobuf-with-option-optimize-for-speed.html Aug 25 01:36:15 http://2.bp.blogspot.com/_O9TJAb-LjDE/SSMBfmIuNaI/AAAAAAAAAQw/wkYPWbd1Ujs/s1600/Picture+6.png Aug 25 01:36:42 so, say i want to get the sensitive tcp information from the server that needs to be guarenteed… would i have a thread going where i send a request and poll repeatedly until it's received, then shut off the polling loop? Aug 25 01:36:44 thrifts objects are considerably larger, i'm sure that tradeoff is not coincidental Aug 25 01:36:49 guaranteed Aug 25 01:37:01 ultra-: no, you don't have to poll at all like that Aug 25 01:37:10 instead of doing while (true) { beat the socket.receive to death } Aug 25 01:37:11 you just do Aug 25 01:37:22 so there's a method to make the socket wait for something Aug 25 01:37:29 while (socket.receive) { /* this blocks until socket receives something, then runs this block _once_, then blocks again */ } Aug 25 01:37:38 yes.. the receive method does that by default :) Aug 25 01:37:51 ok thanks Aug 25 01:37:53 this is inherent to how blocking tcp sockets work Aug 25 01:38:00 yup Aug 25 01:38:07 i think i can actually do this :) Aug 25 01:38:16 i believe! Aug 25 01:38:33 bbl Aug 25 01:39:13 ok one more q Aug 25 01:39:19 lol, np Aug 25 01:39:48 i should use a looper that waits for a msg to come in, then use that msg (in handleMessage) to trigger the tcp send request, then socket.receive? Aug 25 01:40:03 to actually pass the request into the thread Aug 25 01:40:18 so you're saying that sometimes the client needs to respond to one of the incoming udp messages by sending a message down the existing tcp connection? Aug 25 01:40:54 i dont think i understand the flow you're trying to achieve Aug 25 01:40:58 no… say i want to receive some 'title's… text strings… this happens at startup or if they change in the server, which is physically done by the user Aug 25 01:41:05 okay Aug 25 01:41:08 but you said the tcp send request Aug 25 01:41:18 yeah the client will say 'give me the titles' Aug 25 01:41:22 okay Aug 25 01:41:25 so Aug 25 01:41:29 you have two separate threads going Aug 25 01:41:51 one for your udp messages (the ones that are like 10x/sec) Aug 25 01:41:58 and one for tcp socket handling Aug 25 01:42:17 i would recommend that you respond to the tcp commands that the client sends, on tcp.. not over on udp Aug 25 01:42:26 that way you can have the client issue the command and simply wait for a reply Aug 25 01:42:30 yes Aug 25 01:42:31 it will also simplify your handling code Aug 25 01:42:38 so what you have to do is Aug 25 01:42:43 in your tcp receive code Aug 25 01:42:58 write to the socket, then receive again Aug 25 01:43:07 so since you're already looping on receive Aug 25 01:43:26 you want to write to the socket, and just keep looping on receive still Aug 25 01:43:30 ok Aug 25 01:43:31 but Aug 25 01:43:32 so write to it from outside the loop Aug 25 01:43:48 to actually get data from the main thread to tell the client to trigger a request, i'll use the looper object and a handler? Aug 25 01:44:18 i dunno what the 'looper object' is, sorry Aug 25 01:44:21 ah ok Aug 25 01:44:32 but since you're basically creating your own protocol here, you'll want to include some sort of 'magic number' or something on each message coming from and going to the server on the tcp side Aug 25 01:44:36 for the type of message it is Aug 25 01:44:43 like 01 = request_titles Aug 25 01:44:44 it's a means of getting data from one thread to another… it works like the client receive, where it'll wait for a command from another thread and then trigger something Aug 25 01:44:46 02 = response_titles Aug 25 01:44:47 so forth Aug 25 01:44:52 ah ok Aug 25 01:44:57 yep, constants Aug 25 01:45:00 right Aug 25 01:45:07 but the point being, use those so you know what it is you're getting back Aug 25 01:45:11 flags, with data right behind them Aug 25 01:45:19 ok Aug 25 01:45:20 since the loop on thats doing while (socket.receive) won't know that you sent a request Aug 25 01:45:25 since it came from another part of your app Aug 25 01:45:27 make sense? Aug 25 01:45:36 so it has to know what this data it just got is Aug 25 01:45:39 and what to do with it Aug 25 01:45:43 when i receive, i'm going to act on it conditionally anyway (based on the flag/constant) so it wouldn't matter if something was out of order Aug 25 01:45:50 so you can use a switch or some other construct to hand off the data from the socket you just received Aug 25 01:45:56 to a method that can handle it accordingly Aug 25 01:45:59 right Aug 25 01:46:00 yup Aug 25 01:46:01 precisely Aug 25 01:46:02 sweet Aug 25 01:46:10 ok bbl, thanks again Aug 25 01:46:12 np Aug 25 01:49:44 My SDK manager doesn't show any options for installing Level 5 or 6 -- I have 4 and 7 but nothing inbetween Aug 25 01:49:53 API Level 5 or 6** Aug 25 01:51:13 ClassicallyGeek: that's because you're not looking at obsolete api's Aug 25 01:51:44 thanks! Aug 25 01:51:58 which is a hint as to the status of API 5 and 6 Aug 25 01:52:16 lol I just wanted to test against them for completeness Aug 25 01:53:56 that's like making sure your code works on windows 95 Aug 25 01:54:08 just in case anyone were to install it on something they found in grandma's basement :p Aug 25 01:54:20 not really, because 1.6 is older than api 5 or 6 =/ Aug 25 01:54:57 well if I say I have a minsdk level of 4 I think I should test 5 and 6 just to confirm those people won't have a big issue Aug 25 01:55:00 uhoh Aug 25 01:55:11 they're not suported ClassicallyGeek Aug 25 01:55:18 which means you won't find a device with them in use Aug 25 01:55:21 http://developer.android.com/about/dashboards/index.html Aug 25 01:55:32 according to google there are 0 devices on 5 and 6 ;) Aug 25 01:55:43 there are still devices in the world with them, but really very few Aug 25 01:56:04 well yeah ;P Aug 25 01:56:19 but you'd have to do some serious trying to even get an apiLevel 5/6 build out of the aosp tree Aug 25 01:56:35 nice to see ics taking up a good chunk of the pie Aug 25 01:57:36 my phone's runnin jigglyboobs Aug 25 01:57:51 mine will be, soon as i finish compiling it Aug 25 01:57:58 same here, but I'm about to go back to ics =/ Aug 25 01:58:04 having data issues it seems Aug 25 01:58:18 or sprint gets around to releasing JB for crespo4g.. but i imagine i could build JB *on* my crespo4g before that happens Aug 25 01:59:04 well google dropped all of the drivers for crespo4g right? Aug 25 01:59:27 yep Aug 25 01:59:31 able to build it from aosp Aug 25 01:59:34 which is what i'm doing now Aug 25 01:59:36 ya that's what I thought Aug 25 01:59:38 just takes forever Aug 25 01:59:55 only takes me 40 mins for a clean aosp build of ics, haven't built jellybean yet =/ Aug 25 02:00:59 i've been building for about two hours now Aug 25 02:01:23 not a very fast build machine setup tho Aug 25 02:03:23 which device is crespo4g Aug 25 02:03:35 (on sprint) Aug 25 02:03:42 ah nexus s 4g Aug 25 02:03:51 mh`: is it bad to leave .receive() open? in case the server wants to send something via tcp/ip Aug 25 02:03:57 no, thats fine Aug 25 02:04:02 even in the background, really Aug 25 02:04:05 but yes, totally normal Aug 25 02:04:15 opening a new tcp connection is time consuming Aug 25 02:04:21 you really dont want to close it unless you're sure you're done Aug 25 02:04:21 so i still might do that in a while true loop Aug 25 02:04:26 ok Aug 25 02:04:27 mh`: hehe, tell that to apple ;) Aug 25 02:04:36 jasta: heh Aug 25 02:04:49 does ios require you to keep reopening a connection? Aug 25 02:05:01 i'm currently writing a post about Apple's NSURLConnection that closes all HTTP and HTTPS connections after 12s of inactivity. Aug 25 02:05:12 i have a mac but i'll be damned if i ever use an ios device Aug 25 02:05:15 i don't think iOS supports real backgrounded apps Aug 25 02:05:27 so iOS apps create these ludicrous numbers of new connections, HTTPS being especially harmful. Aug 25 02:05:28 define 'real' Aug 25 02:05:35 'real' as in the app is actually running. Aug 25 02:05:45 jasta: you were witness to the last hour in here, and you really can't imagine why apple disallows most background stuff? Aug 25 02:05:46 pretty sure it does push notifications which the OS handles, at most Aug 25 02:05:49 i bought an iphone for my girlfriend, but that's because she doesn't know anything about tech stuff Aug 25 02:05:58 mh`: it's not a question of what they allow int he background Aug 25 02:06:08 apps are frequently in the foreground for more than 12 seconds, too. Aug 25 02:06:09 oh, i didn't see your latter line, sorry Aug 25 02:06:16 was switching to laptop Aug 25 02:06:19 and, apps move between foreground and background state quite a bit, too. Aug 25 02:06:20 thats bizarre Aug 25 02:06:22 its not configurable? Aug 25 02:06:26 mh`: it is not. Aug 25 02:07:07 mh`: i'm publishing a blog post on it shortly. just trying to figure out how to produce a nice video showing the user implication side-by-side Aug 25 02:07:20 it's easy to demonstrate that android's behaviour creates a much, much more responsive user experience when using web services Aug 25 02:07:53 harder to prove, but easy to reason that the android defaults also are much less resource intensive on the network and battery intensive on the device Aug 25 02:08:05 this brings me back to where i started… to get a command to send tcp data into the thread i need to use a looper, which is blocking… but to wait for a random tcp message the server might send, i need socket.receive(), which is also blocking Aug 25 02:08:32 jasta: platform bias is always a good way to frame^Wruin an interesting technical blog post :) Aug 25 02:09:22 there's plenty of limitations on iOS worth highlighting that aren't subjective decisions like this one Aug 25 02:09:35 what happens when you try to connect two instances of the same client to a server? Aug 25 02:09:42 two threads Aug 25 02:09:59 ultra-: the world as you know it end- nm that's a different thing. Aug 25 02:10:09 mh`: well it's hard to present the argument as being detrimental to the user experience if you can't show an experience that isn't. Aug 25 02:10:18 i don't want to be responsible for that Aug 25 02:10:30 the only way around this would be to create an app on ios that in one flow used nsurlconnection and in another something like asihttprequest Aug 25 02:10:45 jasta: fair point.. but depends on who your audience is, i guess Aug 25 02:10:46 but, then it fails to prove that the behaviour is systemic. nearly every app on the market has this problem. Aug 25 02:10:54 mh`: ultimately, i want apple to fix this. Aug 25 02:11:39 i dont know the ios api.. when you use NSURLConnection there's no access to the underlying socket object? Aug 25 02:11:47 i also wanted to be able to show a case that could be proven easily with resources a reviewer might already have Aug 25 02:11:58 mh`: no, it's exactly like HttpURLConnection Aug 25 02:12:06 np i don't know that class either Aug 25 02:12:25 well, that class is part of Java itself, and the official recommendation of Google so you should :) Aug 25 02:12:42 but regardless, it's basically the worst name class paradigm imaginable. it has nothing to do with connections. Aug 25 02:13:08 it's just about making simple HTTP requests, the connection and keepalive logic is encapsulated in a layer you don't see. Aug 25 02:13:30 jasta: i don't really do android either, i'm just visiting Aug 25 02:13:30 :P Aug 25 02:13:42 both httpurlconnection and apache's httpclient (also in android of course) have the default of letting the server decide the keep alive length. greedily waiting as long as the server will permit. Aug 25 02:13:55 right Aug 25 02:14:02 apple takes the opposite approach, client-intiiated shutdown in all cases at 12s Aug 25 02:14:06 interesting Aug 25 02:14:25 the reason i was going to compare the two was to basically say "hey look, a reasonable default does this. a not reasonable default lags for 1000ms." Aug 25 02:14:41 the comparison was only to illustrate the user experience "knock" visually Aug 25 02:14:47 do they manipulate sockets in that way too? Aug 25 02:14:53 or let them operate properly Aug 25 02:15:15 i have only studied HTTP behaviour with NSURLConnection. i expect that the problem is isolated here. Aug 25 02:15:33 however i will say that i have observed this same behaviour in the browser app Aug 25 02:15:37 and omg does that make it slow Aug 25 02:15:55 freaking hundreds of connections flying around just going to facebook.com and browsing around a bit Aug 25 02:16:10 i have a link for you somewhere about the impact of not using keepalive on https on mobile clients Aug 25 02:16:14 (cuz of the higher latency than traditional clients) Aug 25 02:16:16 because of all the CDN caching and multi-connection request optimization going on it's basically timing out at least 1 connection every 12s and re-opening another Aug 25 02:16:17 i'll find it in a minute, eating Aug 25 02:16:19 you can cite it Aug 25 02:16:28 id love to Aug 25 02:16:33 so far my strongest cite is: Aug 25 02:16:45 http://www.semicomplete.com/blog/geekery/ssl-latency.html Aug 25 02:17:03 basically a set of timings showing why keep alive means something more for https Aug 25 02:17:30 yeah thats a good one Aug 25 02:17:32 seen it before Aug 25 02:18:06 i can give you some actual data if you want for average latency on a few million mobile users Aug 25 02:18:21 but you can't disclose the source if you're using it for this (i dont want to draw apple's ire) Aug 25 02:18:24 :) Aug 25 02:18:34 like knowing their actual RTT Aug 25 02:18:37 if i can't disclose the source i'd rather not use it :) Aug 25 02:18:40 so you can factor that into the formulas in that link Aug 25 02:18:42 but it would interest me none-the-less Aug 25 02:18:46 i can disclose it to you Aug 25 02:18:50 i just dont want you to publish it as all Aug 25 02:18:57 like "hey companyX gave me these numbers to show how broken ios is!" Aug 25 02:18:59 plzno Aug 25 02:19:06 hehe, sure. Aug 25 02:19:15 although if you're willing to trust some random guy you met on irc, maybe you have issues :) Aug 25 02:19:25 shrug, i saw your article above Aug 25 02:19:39 i'll tweet angrily about you, or something Aug 25 02:19:39 :P Aug 25 02:20:13 well, im not trying to dissuade you from sharing data with me :) Aug 25 02:20:32 brb, i actually have to finish a release right now. hehe, curse you irc Aug 25 02:20:41 heh Aug 25 02:20:56 i somehow lost the afternoon to showing ultra- sockets :) Aug 25 02:21:06 :) Aug 25 02:21:36 HTTP is really annoying with round-trips... Aug 25 02:22:10 better hope SPDY gets traction then :) Aug 25 02:22:40 google will put their full weight behind it! i have faith Aug 25 02:22:47 jasta: well, it's about time. It's been what, ~17 years now? Aug 25 02:22:50 sorry i tried to get to the end of that without sound sarcastic Aug 25 02:23:02 there's one scary detail of SPDY that i feel compelled to mention: it _requires_ SSL Aug 25 02:23:15 compared to HTTP, it's actually a bit slower ;) Aug 25 02:23:41 jasta: depends if you compare *1* HTTP request with something bigger Aug 25 02:23:52 and no, parallelization of requests doesn Aug 25 02:24:09 't help if you're on mobile network, or if bufferbloat raises its ugly head Aug 25 02:24:43 most of the time you care about latency on a mobile device its for _one_ request Aug 25 02:24:47 an api response Aug 25 02:25:15 mh`: unless you're browsing a web page, or getting assets, etc. Aug 25 02:25:23 sorry, good point, i meant inside a mobile app Aug 25 02:25:24 or having to deal with 3xx redirects Aug 25 02:25:36 and one that isn't facebook Aug 25 02:25:36 :P Aug 25 02:25:51 or maybe you do a HEAD first to check for update then GET Aug 25 02:26:01 i wouldnt do that on mobile Aug 25 02:26:07 or on a platform that knows how to do keep alive :) Aug 25 02:26:10 or maybe you simply use internet over a mobile phone Aug 25 02:26:10 the RTT loss would outweight the transfer time on files of sane sizes.. Aug 25 02:26:29 yeah, again, was talking about mobile apps only Aug 25 02:26:31 misspoke :) Aug 25 02:26:31 no, seriously, bbl, im going to close the irc window to focus. Aug 25 02:26:37 jasta: lol, wait Aug 25 02:26:43 was grabbing these numbers for you Aug 25 02:26:46 waiting on AWS Aug 25 02:26:49 mh`: don't forget that mobile networks drop packets like crazy, to the point of being the one place where it pays to cheat TCP a'la bufferbloat (except intelligently) Aug 25 02:27:06 yeah, fair points Aug 25 02:27:13 i actually have some data on that but too hard to get at Aug 25 02:27:31 teclo (i met some of their guys) has good data. Mainly because they sell a product to mitigate that to networks :D Aug 25 02:27:42 nice, thats interesting Aug 25 02:27:52 ours is just from our api calls from our app -> AWS Aug 25 02:28:15 mh`: privmsg them please :) Aug 25 02:28:19 with the code socket = Socket(….), should i be able to print a connection confirmation immediately after that? Aug 25 02:28:26 like, if that doesn't raise an exception, it's connected? Aug 25 02:28:27 they fake ACK responses from clients and resend the failed packets optimistically to mobile device, unless it fails badly then it RSTs the connection Aug 25 02:28:31 mh`: p.s. close the window to mean doesn't close the session, ill still be here Aug 25 02:28:44 jasta: does too! Aug 25 02:28:48 i assumed you were irc'ing from ios ;) Aug 25 02:28:59 p_l: whoa Aug 25 02:29:03 p_l: what carriers use that Aug 25 02:29:18 if you're able to say Aug 25 02:29:22 i'd never heard of teclo before Aug 25 02:29:51 p_l: that type of device in the middle would explain some of the strange tcp behaviors i see Aug 25 02:30:05 mh`: I know certainly only of "Play" brand in Poland (company is called P4, afaik). I know that one guy from Vodafone UK might been pitching it internally because of how it would solve their problems Aug 25 02:30:13 mh`: what kinds? Aug 25 02:30:21 or why i see shockingly better tcp performance (in terms of syn-ack-first attempt) from some carriers over others Aug 25 02:30:32 but the actual 'gut feeling' of using those devices feels the same Aug 25 02:31:07 p_l: stuff like tcp keepalives not making it (but only sometimes!), in controlled conditions Aug 25 02:31:26 when the device still has good connectivity, no pl Aug 25 02:31:35 hmm, what else Aug 25 02:31:36 window scaling Aug 25 02:31:36 mh`: well, take into account that mobile networks are dropping packets like crazy even with good connectivity Aug 25 02:31:52 window scaling going up in a way that doesn't seem in-keeping with the droppy-ness of the link Aug 25 02:31:56 teclo's "proxy" is hiding this effect from "external" IP networks Aug 25 02:32:02 right Aug 25 02:32:04 interesting stuf Aug 25 02:32:06 +f Aug 25 02:32:20 but not worth spending much brainpower on since the carriers all have terrible IP connectivity quality, like you're pointing out Aug 25 02:32:50 mh`: tx window going up despite link being known to be dropping would be the behaviour teclo's device exhibits Aug 25 02:33:09 p_l: i'm only talking about stateside carriers, too, which means this is more widespread than either of us knew Aug 25 02:33:12 Aug 25 02:33:20 http://teclo.net/products/sambal/ <--- exact product Aug 25 02:33:45 they had some pretty nifty graphs of how TCP connectivity goes crazy in presence of wild skews from mobile networks Aug 25 02:34:11 yea Aug 25 02:34:11 afaik they send employees with various phones to various places and take measures :) Aug 25 02:34:51 yea, not much other way to get this data Aug 25 02:34:58 other than buy it, perhaps Aug 25 02:35:26 mh`: yeah, but getting it out of netops would be an... interesting exercise of persuasion Aug 25 02:35:46 dataInputStream = new DataInputStream(socket.getInputStream()); and then String input = dataInputStream.readUTF();? Aug 25 02:35:53 i'm able to send data to netcat, but nothing when i reply Aug 25 02:36:19 mh`: now, if only the carriers didn't break shit like blocking anything other than HTTP... Aug 25 02:36:31 yeah verizon doesn't let me use irc Aug 25 02:36:38 p_l: i just send stuff over 443 Aug 25 02:36:41 i thought unlimited meant unlimited, guess not Aug 25 02:36:43 works fine Aug 25 02:37:20 mh`: till you want ot use UDP :) Aug 25 02:37:44 and remember, HTTP client might be running over a proxy (quite common) Aug 25 02:38:42 ffas Aug 25 02:38:55 im assuming vol isnt here Aug 25 02:38:58 that cunt Aug 25 02:39:01 lolo Aug 25 02:39:08 im sick of his attitude Aug 25 02:39:12 u there vol Aug 25 02:39:18 u gonna abuse me before i speak? Aug 25 02:39:26 get a life basically Aug 25 02:39:44 sick of that idiot Aug 25 02:39:54 why he has ops i do not know Aug 25 02:40:01 usually powercrazykunts dont get it Aug 25 02:40:21 he kissed the right ass somehwere Aug 25 02:40:35 vols a KUNT Aug 25 02:40:39 nah hes def not here Aug 25 02:40:43 id be long gone Aug 25 02:40:52 but my point still stands Aug 25 02:40:57 power crazy Aug 25 02:41:19 i guess romain gave him it Aug 25 02:41:26 just stay away if ur a f00l Aug 25 02:41:29 v0l is one Aug 25 02:41:56 vo Aug 25 02:42:01 vol Aug 25 02:42:16 ok pitiful f00l is sasleep Aug 25 02:42:49 i hate ops Aug 25 02:43:12 anyone ave nay questuions Aug 25 02:43:20 bewfore the night f00ls reaaprer Aug 25 02:44:22 hi Aug 25 02:48:04 http://zipmeme.com/uploads/generated/g1338964568942672395.jpg **** ENDING LOGGING AT Sat Aug 25 03:00:04 2012