**** BEGIN LOGGING AT Fri Sep 28 02:59:56 2012 Sep 28 03:20:16 I'm stuck on a layout. I can't figure out how to do this: http://plainservers.com/temp/android_cell_example.png Sep 28 03:20:40 I'm trying tablelayout, but not having much success Sep 28 03:22:05 droiddude ude Sep 28 03:24:01 tablelayout will work you can have col spans etc Sep 28 03:24:07 but personally I hate colspans bigtime Sep 28 03:24:19 rather tablelayout Sep 28 03:24:40 i've tried with colspans Sep 28 03:24:57 but when I want to adjust the width of the cells in the top row, it gets crazy Sep 28 03:25:12 for instance I try to use layout_weight and layout_width = 0 Sep 28 03:25:23 but the rows below it don't conform like an html table would Sep 28 04:47:53 https://gist.github.com/3797970 this code forse closes and i don't understand why Sep 28 04:48:34 what's the stacktrace say ? Sep 28 04:50:28 bankai_: https://gist.github.com/3797980 Sep 28 04:50:51 nice, solved then :) Sep 28 04:51:15 danixn: what does the error message say? Sep 28 04:51:19 coz you read it... and did what it told you to do, right ? Sep 28 04:51:22 (read it to yourself) Sep 28 04:51:49 just added the permission Sep 28 04:52:01 i think that was the problem Sep 28 04:52:49 you mean, *exactly* what the error message said, that was the problem? :) Sep 28 04:52:56 yes Sep 28 04:53:04 on eclipse i couldn't read it Sep 28 04:53:11 who would've thunk it :) Sep 28 04:53:21 still a noob Sep 28 04:53:24 ah... eclipse Sep 28 04:53:39 logcat its terrible Sep 28 04:53:54 nothing wrong with logcat Sep 28 04:54:28 maybe i am using it wrong but it keeps scrolling Sep 28 04:54:48 scroll lock button Sep 28 04:54:50 at the very end Sep 28 04:54:50 turn off Scroll Lock Sep 28 04:55:43 oh great thanx Sep 28 04:56:18 ahh eclipse Sep 28 04:56:23 you weren't good while it didn't last Sep 28 04:56:42 finishing my first day w/ intellij Sep 28 04:56:53 so much better Sep 28 04:59:08 doogan: why? Sep 28 05:00:25 there's dolphins Sep 28 05:00:26 what is the purpose of the LOOKUP_KEY IN the contacts table? why can i just use the _ID? Sep 28 05:19:16 this drawable xml is causing an error. without the gradient tag, it works fine. why? https://gist.github.com/04b4d16e003a52743653 Sep 28 05:25:45 I have an app that depends on Python. I already have code that goes online, and downloads the relevant APK to the users device. However, they still need to manually open up the APK and install it themselves. How can I make it launch the installer for the APK from within my activity? Sep 28 05:26:43 send the url to the browser. Sep 28 05:26:53 BtbN: That's how the download is being don. Sep 28 05:26:56 done* Sep 28 05:27:15 then all the user has to do is to tap the download bar in his notification are. Sep 28 05:27:21 assuming they Sep 28 05:27:29 they've got third party sources enabled Sep 28 05:27:56 I'm hoping for a brain-dead simple solution - AKA, no download bar required. Sep 28 05:28:13 you can't force- or silent-install an apk as a regular app Sep 28 05:28:34 if you depend on python, why not bundle it? it's not big... Sep 28 05:28:42 Leeds: I'm willing to take whatever restrictions are necessary. Sep 28 05:29:09 Leeds: Not my project. The professor I do work for asked if I could try to close some tickets. I want my changes to be as small as possible. Sep 28 05:29:22 you can download it and start the install from your app, but the user will *always* have to manually approve the installation Sep 28 05:29:35 That's fine with me. Sep 28 05:29:44 I just want to be able to start the install from within the app. Sep 28 05:30:46 http://stackoverflow.com/search?q=android+install+apk Sep 28 05:30:52 lots of things to look at Sep 28 05:32:16 Leeds: Thanks. I had been googling. Apparently, limiting my search to SO would've been much more productive. Sep 28 05:32:53 I'm not sure if it technically still is this way, but SO *used* to be the 'official' Q&A site for Android Sep 28 05:33:11 in that they closed the android-beginners mailing list/google group and told everyone to go there instead... Sep 28 05:33:43 it seems to be less actively endorsed now, and of course the quality of the answers varies wildly, but it's probably the biggest knowledge base of Android development Sep 28 05:34:16 heh. And of course, Google has the benefits of having someone else do all the maintenance :) Sep 28 05:34:50 that too, although I suspect they fed some cash and/or other support to SO, at least at first Sep 28 05:36:31 http://developer.android.com/support.html doesn't mention SO anymore, and I'm pretty sure it used it Sep 28 05:37:34 Every Android bug, that I've become aware of for one reason or another, that is on code.google.com has never been fixed Sep 28 05:41:01 Ologn: New features are always more exciting than bug fixes and refactoring. At least from a marketing standpoint. Sep 28 05:44:29 maslen: that's why those "bugs' become features Sep 28 05:45:39 * maslen wonders if he can turn a bad architecture into a feature somehow ... Sep 28 05:46:06 That dependency graph makes a beautiful picture of the history of mankind walking across the earth - the lines are everywhere! Sep 28 05:54:20 Leeds: I'm trying to follow http://stackoverflow.com/questions/6813322/install-uninstall-apks-programmatically-packagemanager-vs-intents , (using intents) but when I do, I get a "No activity found to handle Intent" for "application/vnd.android.package-archive" , and it crashes. Sep 28 06:14:12 maslen: what are you trying to do it on? Sep 28 06:16:37 Leeds: Android emulator, v2.2 Sep 28 06:21:47 Leeds: If you have any ideas, please PM me, I'm heading to sleep. Sep 28 06:21:57 Thanks again though for your advice. Sep 28 06:53:23 Hi. if I use an override on onListItemClick for a ListActivity, when I click on an item I want the style to change, is this good approach: clicking on item changes the view background color; what I don't know is how to undo the color setting when a new item is being clicked ? Sep 28 07:00:09 Does every raw contant has its own data contant table? Sep 28 07:01:51 I took my first look on the master detail view template yesterday. Looked, googled for a couple of hours, changed some thing, but i just dont get if and how i could use different layout.xmls for the different items. Is this posible? Sep 28 07:52:02 Is it possible to remove the default shadow dropped by the actionbar? Sep 28 07:59:05 ok, did it Sep 28 08:07:00 hello all - is there an easy possiblity to reload (rebuild) a tab activity. I have a "clear history" and when pressen the content of the database is deleted but the presented history remains. Thx Sep 28 08:15:45 hey, guy is there a way to install android sdk packages on an offline ubuntu Sep 28 08:28:43 InsaneGene: What is an offline ubuntu? Sep 28 08:29:16 napster, upuntu with no internet connection Sep 28 08:29:27 ubuntu* Sep 28 08:30:39 Just copy the files Sep 28 08:30:40 InsaneGene: SDK packages are available for download as a tarball. You can download it using any other machine with an Internet connection. Sep 28 08:32:39 napster, I Don't have Ubuntu with Internet connection, I only have windows, is it possible to use the packages downloaded on windows Sep 28 08:33:23 InsaneGene: Yes, choose the one marked for Linux though. Sep 28 08:34:12 InsaneGene: Here you go : http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz Sep 28 09:04:09 is it possibe to make a button and set the textSize to be relative to the button size? so when the app runs on a big screen tablet and the button expands the button text also grows in relation... Sep 28 09:30:00 How can I use radio button in a DialogFragment and using the method onRadioButtonCLicked ? Sep 28 09:56:20 is there a way to change the screen size of the android emulator? to be the size of a tablet? Sep 28 09:56:57 socket: create an AVD with the screen size you want. IIRC you could specify it there. Sep 28 09:58:13 socket, or if you want to change an existing one: AVD>Edit>Skin Sep 28 09:58:34 thanks Sep 28 10:01:51 * Lachezar may be talking stupid and angry, so he apologises in advance! Sep 28 10:02:17 so stupid, so angry, so ... considerate Sep 28 10:03:17 Is it possible, that the Bluetooth Stack of a HTC Legend is broken in a peculiar way: when I read(bufer, offset, size), it seems that the stream ZERO-s out the whole buffer before reading! Sep 28 10:03:55 Is it possible to invoke the click explicitly on a menu item? Sep 28 10:04:16 Lachezar: hmm, that is not the contract for read() Sep 28 10:04:16 I was so frustrated, that inserted a check-sum calculation on the (rest of the) buffer before and after read()-ing. Before reading it has some non-zero check sum, after reading the sum is ALWAYS zero. Sep 28 10:04:23 so that the onOptionsItemSelected() will be triggered. Sep 28 10:04:31 Lachezar: it's easy enough to validate, you fill the buffer with some value, do the read, and validate your padding is still intact Sep 28 10:04:38 alankila: Dude! That's why I'm f**king angry! Sep 28 10:05:12 i have legend too :D Sep 28 10:05:16 also you can workaround by allocating a separate buffer, then System.arraycopy the result, then file bug at google Sep 28 10:05:25 alankila: I am o Sep 28 10:05:29 ARGHHHHH Sep 28 10:05:44 we've all been there Sep 28 10:06:02 when i get there. ill remember this conversation Sep 28 10:06:05 wait the phone does have bluetooth ? Sep 28 10:06:19 alankila: I am going to try your advice, but this 'defect' is only 'available' on a single model of Phone, so defect report would probably be for naught/ Sep 28 10:06:56 * Lachezar is shaking and missing keys on the keyboard... Sep 28 10:07:14 if that is the case, you workaround and move on. Sep 28 10:07:22 shit happens. Sep 28 10:07:34 Is it possible to invoke the click explicitly on a menu item, so that the onOptionsItemSelected() will be triggered? Sep 28 10:07:36 is there a way/an app which uses sensor data from a real device as input for a emulated device? Sep 28 10:07:52 Lachezar: and a 2.5-year-old phone at that... Sep 28 10:08:02 alankila: The problem is this is a library for Java (not Android). So I'll have to it generally, and (possibly) reduce performance everywhere... Sep 28 10:08:52 Leeds: That is NO excuse! likes old stuff (reduces TCO), so I'll be writing code for Android 2.1-update1 or a long time. Sep 28 10:09:13 napster: why not call the method manually? Sep 28 10:09:37 Lachezar: it'll be very hard - let's be honest, impossible - to get anyone to care about a bug in 2.1 Sep 28 10:10:06 Lachezar: Is that suggested really? Sep 28 10:10:42 Leeds: I am pretty sure that's true. Especially keeping in mind that HTC is notorious for not supporting devices that are not top-class newest... They need to sell (market) their new devices, and that's a serious leverage. Sep 28 10:10:44 is it okey to call onOptionsItemSelected() manually? Sep 28 10:10:51 Lachezar: if you are serious about the performance impact, you can test if there is this bug or not Sep 28 10:11:09 but I wouldn't worry about it if I were you. The data rate of bluetooth is so low that I doubt it's measurable in practice. Sep 28 10:11:34 alankila: I've tested: checksum before read: non-zero, checksum after read: zero. (check-summing only the non-read part of the buffer). Sep 28 10:11:36 something like < 100 kB/s, right? Or if you deal with A2DP profile, then I guess it's more than that, but only around double or something. Sep 28 10:12:01 alankila: Yes, but that's the point: the library uses BT on Android ONLY... Sep 28 10:12:36 alankila: Don't get me wrong... I'll work that around and keep struggling on, but... Argh! Sep 28 10:13:21 napster: Some methods may not be called manualy (lifecycle methods), others have no such attachments. Sep 28 10:13:34 ok Sep 28 10:14:05 napster: If you're worried: extract the workhorse code in a separate method, call that method from onOptionsItemSelected(), and also call it when you want to simulate selection. Sep 28 10:15:43 Lachezar: hmm, actually I need to pass the menu item as well, since I'm using an actionbar and I want to animate this particular item. Let me see how it goes with an explicit call to OnOptionsItemSelected() Sep 28 10:18:55 alankila: Work-around works... Now I need to test in on the other 6 models we're using. But at least now I feel... Better... :) Sep 28 10:29:52 Lachezar: why not just put the busted device in the market exclude list ? Sep 28 10:30:18 oh, you got it working heh Sep 28 10:34:25 g00s: No Market... : a closed-group of users, not public. I must make it work on the devices has. Sep 28 10:34:59 you just need to enter a higher price Sep 28 10:35:16 unless it's just your job Sep 28 10:35:29 then it doesn't matter how long it takes until they fire you. Sep 28 10:35:39 yeah, htc has been notoriously aweful about bluetooth in the past - dunno o=about now. Sep 28 10:35:55 in some cases, you simply will not get it to work Sep 28 10:36:08 HTC Desire, Thunderbolt Sep 28 10:36:24 I had one HTC device, that was enough for me. Sep 28 10:36:49 for what it's worth, is Capt'n Kirk happy about using devices which don't really have any software or hardware support from the vendor? Sep 28 10:37:02 seems like they are shifting back to windows phone; i think they started off with windows mobile anyhwo Sep 28 10:37:10 amazingly enough, I have bought 2 samsungs. One samsung would have sufficed without cyanogenmod, though Sep 28 10:37:16 how to clear Spans on EditText??? Sep 28 10:37:26 or Editable Sep 28 10:45:00 clearspan() and removing one by one not working correctly, throwing Exception Sep 28 10:45:21 after a while Sep 28 10:45:28 i hate that span shit Sep 28 10:45:44 * g00s rediscovers his live for FreeMind Sep 28 10:45:47 I hate the way it's been put in the damn XML Sep 28 10:45:48 *love Sep 28 10:46:34 android is not adjusted to the total work of Span Sep 28 10:46:40 not fully realized Sep 28 10:47:17 d*mn sh*t buggy Sep 28 10:48:42 when in editext "text" setted imagespan and insert in "te|xt" some symbols its resing :( Sep 28 10:48:59 any one know how to prevent this? Sep 28 10:49:01 it wouldnt be so bad, being buggy as it is, if google could push updates to everyone like apple can … Sep 28 10:49:14 but the combination of bugs and slow updates = train wreck Sep 28 10:49:47 is onActivityResult called before onStart ? Sep 28 10:50:14 flam_: heh. on my phone it is, if i recall Sep 28 10:50:41 but there was a bug in the docs, that made it sounds like it didn't Sep 28 10:50:56 even dh thought the docs were right, but android did it before onStart Sep 28 10:51:03 * when in editext "text" setted imagespan and insert in "te|xt" some symbols its resizing :( how to prevent this??? Sep 28 10:51:19 g00s Sep 28 10:51:52 "You will receive this call immediately before onResume() when your activity is re-starting." Sep 28 10:52:14 and how to clear spans on Editable(EditText)? Sep 28 10:54:04 so many people in the channel and no use Sep 28 10:55:54 cant find the google groups thread Sep 28 10:59:28 hi Sep 28 11:00:32 I'm trying to start an animation, but can only get it to fire once Sep 28 11:00:49 it's a new animation object every time but it will only fire the first time Sep 28 11:00:52 code: http://pastebin.com/NPfEHZTD Sep 28 11:04:13 Hi - how can I detect swipe events? Sep 28 11:04:35 I could implement it with a combination of ACTION_DOWN and ACTION_UP but there must be a better way? Sep 28 11:05:44 Bacta: http://bit.ly/QiYyld Sep 28 11:06:48 Anyone that actually knows what they're talking about? I heard this can be approached in a few different ways Sep 28 11:10:02 Bacta: Don't be so ungrateful of help, http://developer.android.com/reference/android/view/GestureDetector.html Sep 28 11:13:29 Will all motion events be delegated to this? I already detect ACTION_DOWN Sep 28 11:15:29 "The GestureDetector.OnGestureListener callback will notify users when a particular motion event has occurred. " Sep 28 11:16:02 now let's look at OnGestureListener: http://developer.android.com/reference/android/view/GestureDetector.OnGestureListener.html Sep 28 11:16:28 how about that, there's the gestures it supports wrapped nicely in methods Sep 28 11:18:04 I suggest you Read The Friendly Manual here =) Sep 28 11:18:30 Hi, does anyone got any how to use openssl-android as a SSL provider ? Sep 28 11:20:47 Bacta: You're welcome Sep 28 11:21:07 ;) Sep 28 11:21:54 alankila, goos: It's my pay-check job. And the product is not 'sold'. I work for an in-house development team. Sep 28 11:22:23 test, I'm visible ? Sep 28 11:25:37 Anyone get annoyed with adb when you have more than one emulator or device running, having to pass the serial number? Sep 28 11:26:01 especially more than one device (I know about -d and -e) Sep 28 11:26:01 no, where's the problem= Sep 28 11:27:10 can anyone please link to a page that shows possible responses from GCM when you pass it a message to send? cant seem to find it in the docs Sep 28 11:35:29 hmm. need to keep record of where int is basically how often string has been used. What's best way to sort so I could then get 10 most frequent strings? Is there suitable ready made collection or do I need to create my own? Sep 28 11:44:18 mrenouf: Use a Shell Variable to specify the ID of the device you want to communicate with: ANDROID_SERIAL. Sep 28 11:45:04 tneva82: SQLite. Table + Index Sep 28 12:03:52 hi, I was just wondering if Java 64-bit will work with Android SDK? I remember having a problem last time I tried some time ago. Sep 28 12:04:06 there's a new java language for 64 bit oss? Sep 28 12:04:38 http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html Sep 28 12:04:39 eindoofus: and you need 32 bit for the sdk on windows Sep 28 12:04:50 os x works fine whatever that runs Sep 28 12:05:18 eesh, so I can't use the Windows x64 version of Java then? Sep 28 12:06:18 why would that be? isn't os x lion 64 bit? Sep 28 12:16:36 how can I create app, which will convert text from photo to text? any ideas? tips? where search? Sep 28 12:16:39 hi* Sep 28 12:16:39 :D Sep 28 12:17:10 eindoofus: it just means that you need to install the 32-bit version of java Sep 28 12:24:18 hi Sep 28 12:24:22 konradb: OCR, but that's a *VERY* tall order. Sep 28 12:24:40 I need help with overriding of Fragment Sep 28 12:25:09 konradb: use opencv for android Sep 28 12:25:19 and search for pattern matching Sep 28 12:25:28 konradb: Seems there is some help: http://code.google.com/p/tesjeract/ Sep 28 12:25:36 but Sep 28 12:25:37 I think there is a sample in opencv reading text from table plates Sep 28 12:25:45 i am overriding the "OnCreateView" method, inflating a LinearLayout as root which has a ListView.... but when i use this Fragment-subclass, i get NPE Sep 28 12:25:58 of if it is very tall order, I wont do it D: Sep 28 12:26:00 but Lachezar's link looks nice too Sep 28 12:26:19 is it possible to send a plain text message through GCM, but receive a JSON response? Sep 28 12:26:44 Can anyone help me out with Fragment overriding issue???? Sep 28 12:26:56 hello??? Sep 28 12:27:13 Damn it! this room keeps so dead all the time! Sep 28 12:29:20 Clandestine: it's not dead Sep 28 12:29:28 but people are doing their job Sep 28 12:30:56 is there any sample code or library to create a multi item listview in android ? my listview consists of different layout items .. Sep 28 12:31:44 Clandestine: Not to mention, that the description of your issue is pretty vague... Did you look at th eline the NPE happens? Sep 28 12:32:22 chinmaya: d oyou have custom items or what ? Sep 28 12:32:27 Clandestine: Use pastebin to post the NPE. Sep 28 12:33:24 yes , something like settings listview in android ICS version 4.1.1 Sep 28 12:33:54 alankila: Just for the record: at the end I did the _smart_ thing, and created InputStream subclass, that wraps the Bluetooh InputStream and fixes the behaviour using a temporary buffer. And this way I need not touch the original library. Sep 28 12:33:55 gorudonu, ^ Sep 28 12:34:05 chinmaya: wait a sec Sep 28 12:34:09 I need to check Sep 28 12:34:17 AFAIK it's normal list with pics Sep 28 12:34:57 gorudonu, let me share a screenshot of my listitem Sep 28 12:35:04 k Sep 28 12:35:30 hi, is it possible to set PS1 on device permanently, not only per session, phone is not rooted? Sep 28 12:37:04 gorudonu, http://wstaw.org/w/1ntJ/ Sep 28 12:38:02 gorudonu, at the end of the list there is a item which has only text , like a more button Sep 28 12:39:06 a ok Sep 28 12:39:55 wait a sec Sep 28 12:39:57 I'm searching Sep 28 12:43:00 chinmaya: http://developer.android.com/design/building-blocks/lists.html Sep 28 12:45:50 so if you use listview and dividers you wont have this problem Sep 28 12:45:59 and use custom style to style the elements Sep 28 12:46:27 gorudonu, i have already created the list using baseadapter , but i am looking for a library to create easily this custom listview Sep 28 12:46:55 ah Sep 28 12:47:01 sorry for misunderstanding Sep 28 12:48:51 I don't know any library like that Sep 28 12:53:13 Hi there, how can I change the preferred network (2G/3G) directly from within an app? I gues it must have something to do with com.android.phone, as a standalone app, created with Tasker App Factory, whose only purpose it is to change the preferred network, uses the com.android.phone.CHANGE_NETWORK_MODE permission. Sep 28 12:53:28 *I guess Sep 28 12:57:41 can anyone share how to remove the gallery app from the emulator or is it not possible to remove it ? Sep 28 13:07:23 When would it be preferable to put code in surfaceCreated as opposed to the activity constructor? Sep 28 13:15:26 anyone knows if there's service in android for doing continuous monitoring of kernel/userspace events/states and defining logs/gpio/commands/leds actions based on results Sep 28 13:16:19 Hello there, where to find good android designers to help out on a project? Sep 28 13:17:03 caioketo: Learn to draw? Sep 28 13:18:55 So I've approached overriding ondraw on a drawable to draw a dynamically sized shape behind both a linear layout wrapping an edittext and an edit text on its own. Problem is, ondraw is hit over and over again with different canvas clip sizes (the first being the background, second and on being the cursor over and over again). Am I approaching a custom background drawable wrong? Is there a smarter way to draw c Sep 28 13:32:55 jero: there isn't until you build it! :D Sep 28 13:44:49 hello, if i only want to open app1 from app2 what can i do to hide the app1 launcher ? Sep 28 13:45:25 loin: don't include a launcher intent filter for any activiies Sep 28 13:45:59 wongk, what Sep 28 13:46:05 wongk, what's a launcher intent? Sep 28 13:46:15 intent filter Sep 28 13:46:27 you know what those are, gight? Sep 28 13:46:27 is it this? Sep 28 13:46:32 yes Sep 28 13:46:59 but there are some apps that don't have that Sep 28 13:46:59 yet still appear there Sep 28 13:47:11 i don't believe you :P Sep 28 13:48:52 truth is i am quite new at this Sep 28 13:49:19 loin: sorry, you're wrong. Sep 28 13:49:41 well, this is a perfect opportunity to learn about intents and intent filters Sep 28 13:49:41 lov, most likely, that's why i'm here Sep 28 13:49:41 if your filter doesn't have the MAIN action and the LAUNCHER category it won't show up in the launcher, period. Sep 28 13:49:57 loin: http://developer.android.com/guide/components/intents-filters.html Sep 28 13:49:58 read up :> Sep 28 13:50:08 will do lov thank you Sep 28 13:50:12 also thank you too wongk Sep 28 13:50:22 Is there any way to check if an asynctask instance is used once? Sep 28 13:50:37 add a member to track such info Sep 28 13:50:53 loin: fwiw, having an application with no activity is somewhat problematic; in ICS if the user force closes an application, it will stay closed and stopped until an activity in it is opened. Sep 28 13:52:35 lov, good thing i don't use ics :) Sep 28 13:52:40 lov, thanks for the info Sep 28 13:53:03 lov, even if a broadcast receiver is defined and triggered? Sep 28 13:53:11 lov, I thought that's only a first-use thing Sep 28 13:53:11 it sounds like the app has an activity, anyway, because it had the launcher intent filter Sep 28 13:53:11 lov: that's why I'm asking Sep 28 13:55:19 hi. what should I use to make the bucket of Microsoft's paint? Sep 28 13:55:35 i mean of course in coding Sep 28 13:56:10 Sicp, hi mate Sep 28 13:56:10 I hope you are my savior Sep 28 13:56:25 hi. what should I use to write the code of the bucket of Microsoft's paint? Sep 28 13:56:34 ... Sep 28 13:56:41 learn to code? Sep 28 13:56:57 pfn, don't be silly! Sep 28 13:56:59 pro tips: harassing new people joining the channel and repeating yourself before anyone has time to think about your question are not endearing traits Sep 28 13:57:00 heh! Sep 28 13:57:13 superlinux-hp: I recommend that you consult any textbook on graphics from around 1970 to 1990 because they'll likely give a simple algorithm to accomplish this. Sep 28 13:57:51 damn, and i have one from 1991 i owuld have given you, too Sep 28 13:58:04 but it's no good! ;) Sep 28 13:58:04 I said "around" :P Sep 28 13:58:26 =] Sep 28 13:58:27 pfn: I'm pretty sure that this is the case, yes. Sep 28 13:58:44 pfn: the idea is that you don't have a malicious or broken app listening to something like the wall clock broadcast intents, and constantly restarting itself. Sep 28 13:58:44 Hodapp, I found this. http://stackoverflow.com/questions/5765619/implementing-a-bucket-like-method-in-android. but the comments say that it'll make the application crashed Sep 28 13:58:44 pfn: activities are something user visible and (generally) user controlled Sep 28 13:59:18 I guess that's changed behavior Sep 28 13:59:23 09:57:19 < Hodapp> superlinux-hp: I recommend that you consult any textbook on graphics from around 1970 to 1990 because they'll likely give a simple algorithm to accomplish this. Sep 28 13:59:27 ^^ Sep 28 13:59:32 think through what you want to do, and then do it. Sep 28 13:59:38 no one is going to just do your work for you. Sep 28 14:00:03 your task is to find a region suitable for flood fill Sep 28 14:00:07 how you define boundries is up to you Sep 28 14:00:38 lov, i am NOT asking you to tell me the solution. I asked you what are the things I must use for graphics in the API? Sep 28 14:00:38 uh, the bitmap class probably? Sep 28 14:00:38 * lov shrugs Sep 28 14:00:41 for example.. I could not understand the Path class Sep 28 14:00:46 http://developer.android.com/reference/android/graphics/Bitmap.html Sep 28 14:00:56 http://developer.android.com/reference/android/graphics/Canvas.html Sep 28 14:01:08 what's it for.. can you tell me in plian words Sep 28 14:01:16 no. Sep 28 14:01:20 If I call setOnCreateContextMenuListener on the View returned by getView from my Adapter then the onItemClickListener doesn't get called. Any way to have both of these? Sep 28 14:01:24 I can encourage you to read the documentation Sep 28 14:01:32 because I don't have time to hold your hand through "what is a bitmap" Sep 28 14:01:32 Bitmap and Canvas are understandable to me by now Sep 28 14:02:33 superlinux-hp: http://en.wikipedia.org/wiki/Flood_fill Sep 28 14:02:33 do this. Sep 28 14:02:36 ok thanks Sep 28 14:03:01 i saw the link but i just skipped it.. thanks Sep 28 14:04:37 Traversing through the NotePad android example and I'm trying to understand how overriding onDraw on the edittext is possibly working- the code uses an empty Rect to specify the left and right bounds. Is what ever is drawn in OnDraw auto scaled? Sep 28 14:11:12 seabiscuit_1080, not auto-scaled Sep 28 14:12:08 I think I figured out part of my problem, actually- I think I need to capture the view size from onSizeChanged and use that instead of the canvas.clipbounds for sizing the background. Sep 28 14:29:28 Hi. Sep 28 14:29:37 How can I set the icons of (actionbar) tabs? Sep 28 14:32:10 hi, is this possible? http://stackoverflow.com/questions/12640938/android-tablelayout-span-element-accros-two-rows Sep 28 14:34:24 hmm, can I embed ddms in eclipse without installing adt? Sep 28 14:38:58 hi guys Sep 28 14:39:37 i have a webview with a banner ad view at the bottom of the webview Sep 28 14:40:05 on click of the webview i hide the view Sep 28 14:40:25 and after 3 secs it reappears Sep 28 14:40:48 the problem is that when it reappears it hides the bottom line of the webview Sep 28 14:41:05 how can resolve this issue? Sep 28 14:42:07 i wan't the webview to scroll up when the banner ad view reappears Sep 28 14:44:37 anyone ? Sep 28 14:49:02 i really wish my friggin GPS could get a lock Sep 28 14:50:05 wongk, do a barrel roll! Sep 28 14:52:28 ya know what really bugs me about developing in eclipse? Sep 28 14:52:48 if R.id.foo satisfies ANY foo in the application then it doesnt show an error, even if the current layout isnt inflated for this variable Sep 28 15:00:02 uh, ok? Sep 28 15:00:44 bear in mind that you can have different layouts for different configurations Sep 28 15:01:15 you can also call setLayoutView at different times in the activity (though it's usually a dumb idea) Sep 28 15:01:22 s/setLayoutView/setLayout/ Sep 28 15:01:43 runtime vs compile time will always get you Sep 28 15:01:50 Hi Sep 28 15:02:58 I have sherlock tabs. From Tab3 I call sherlockActivity. This activity deletes something from database and ends with .finish(), view returns to Tab3, but it does not refresh. How to get "on resume" of the certain tab? Sep 28 15:03:28 you need to requery your cursor and tell the listview to update (assuming tab 3 has a list from your database) Sep 28 15:03:56 pardon me, Tab3 is SherlockListActivity, I open member of the list, delete/rename it, and when it's done TAB3 should be recreated Sep 28 15:04:04 Balky: the tab is a Fragment, yes? Sep 28 15:04:19 Yes, tab is SherlockListFragment Sep 28 15:04:29 then you can override onResume Sep 28 15:05:25 I did that, but what happens is it does run, but not onResume but rather on "next" action after resume which looks ugly Sep 28 15:05:51 so it returns, looks like nothing happend, then I need to touch / swithc tab and return to tab3 to see it refreshed Sep 28 15:06:00 lov, why coudlnt it go backwards to the closest layout set, it follows other things of similar compleixty Sep 28 15:06:21 Balky: does the temporary activity never display anything on screen? Sep 28 15:07:06 no, screen looks like it was when I opened activity... Sep 28 15:07:09 so if I delete one entry Sep 28 15:07:14 then open second one Sep 28 15:07:21 it will refresh but to late Sep 28 15:08:15 Balky: perhaps an ever better way is to use startActivityForResult Sep 28 15:08:18 even Sep 28 15:08:44 lov, seems like it's pretty easy to go through the compilation process and just tag the last layout set, checking each findViewById against the currently inflated layout Sep 28 15:08:45 that way this code isn't executed every time the activity is resumed Sep 28 15:09:26 could be better... but I do not return anything actualy ... I do changes in DB Sep 28 15:09:52 Balky: doesn't matter Sep 28 15:09:53 I need to run a ROM in the SDK as an AVD. Is there a tool that can package the system directory into system.img so i can use that in my AVD? Sep 28 15:10:03 kaneda^: how do you determine what the last layout set was? Sep 28 15:10:21 lov, all gui operations happen on the same thread Sep 28 15:10:35 if(prefs.showFoo()) { setLayout(R.layout.foo); } else { setLayout(R.layout.bar); } Sep 28 15:10:40 against what shall I check here? Sep 28 15:10:42 do I check both? Sep 28 15:10:55 lov, yep Sep 28 15:10:59 wongk: will check Sep 28 15:11:17 lov, that would be the desired behavior Sep 28 15:11:25 kaneda^: alright, patches welcome then. Sep 28 15:11:38 if you feel you can solve this problem, I don't think anyone will stop you. Sep 28 15:12:16 lov, it's just an issue of dependency mapping, for every time a gui operation would set a layout, what are all calling functions Sep 28 15:12:31 i think you'll find that most of the time you'll be limited to a short list of possible layouts instead of the entire project Sep 28 15:13:21 Unfortunately, if you don't create a rigorous implementation for the linter, it's possible that it's going to squawk about a bunch of things that are actually fine, and people will just turn it off Sep 28 15:13:26 but again, feel free to implement this and submit it. Sep 28 15:13:46 pfn: ping Sep 28 15:15:14 hello, how can i set the default gps state? Sep 28 15:16:09 loin: uh, what? Sep 28 15:16:27 lov, i want to set up the default states for various services Sep 28 15:16:38 including gps, mobile networks, bluetooth Sep 28 15:16:51 er Sep 28 15:17:08 a) define "default states" Sep 28 15:17:08 but i'm not sure where those are set initially Sep 28 15:17:08 b) to what end Sep 28 15:17:31 lov, b) so that after i install the rom on my phone i don't have to manually set them Sep 28 15:17:48 a) on a fresh install the gps is enabled for instance, i want that disabled Sep 28 15:17:49 wait I what Sep 28 15:18:06 ... Sep 28 15:18:06 are you talking about the PREFERENCES? Sep 28 15:18:18 i don't know, am i? Sep 28 15:18:26 >_< Sep 28 15:18:46 if you're not even sure what you're talking about, consider not making roms. Sep 28 15:18:49 source.android.com Sep 28 15:18:53 dig around, figure out how things work. Sep 28 15:19:10 lov, i'm doing it for myself Sep 28 15:19:17 for example, "disabling" the gps in userspace is just setting the gps preference to false. Sep 28 15:19:21 you're not actually disabling the gps. Sep 28 15:19:35 Hm, I'm reading SimonVT commnet on StackOwerflow that it should work "When starting an Activity from a Fragment, you have to use Fragment#startActivityForResult(Bundle, int)." Sep 28 15:19:40 the GPS service listener will check that preference and will listen for preference state changes Sep 28 15:19:46 lov, well, i dont want it disabled, just set to false Sep 28 15:19:53 ok. Sep 28 15:19:56 where are those initial states defined Sep 28 15:20:01 so figure out where the preference lives, and set the default value to false. Sep 28 15:20:03 I don't get this Fragment# part ... this.startActivityForResult? Sep 28 15:20:05 hell if I know, go dig around. Sep 28 15:20:10 is my question, i guess Sep 28 15:21:05 Settings.Secure.isLocationProviderEnabled(res, LocationManager.GPS_PROVIDER); is a good start Sep 28 15:25:05 Right, so you should see where Settings.Secure gets its values. Sep 28 15:25:14 lov sup? Sep 28 15:25:31 pfn: pm Sep 28 15:25:35 fantastic, flash a new rom and it tells me my sim pin is wrong Sep 28 15:25:39 * wongk shakes fist Sep 28 15:25:43 hi guys Sep 28 15:26:58 while lauching the email intent the screen halts for a while and a view which i have set the visibility as gone, fades away and hides only after the intent chooser is launched Sep 28 15:27:03 why is this happening Sep 28 15:27:04 ? Sep 28 15:29:49 sunny_slls: Probably a slow device re-enumerating the intents which can handle email Sep 28 15:29:56 that's my guess anyhow Sep 28 15:30:37 dragorn: i have one more doubt Sep 28 15:31:06 dragorn: i have this webview followed by a banner ad view at the bottom Sep 28 15:31:35 dragorn: on touch of the webview i am hiding the banner ad view. but after 3 secs the banner ad view reappears Sep 28 15:31:47 and hides the last line of the webview Sep 28 15:31:48 When you create a Runnable and run it does it run on the current thread? And as such be able to interact with views? Sep 28 15:32:16 hmm, i have layout_gravity and gravity set to center within a linearlayout and it's children are not horizontally centered Sep 28 15:32:17 what do i do? Sep 28 15:32:26 jug6-note: it runs on whichever thread called .run() Sep 28 15:33:01 So if no specific thread was created Ital be the UI thread? Sep 28 15:34:22 yes Sep 28 15:34:43 :| Sep 28 15:34:53 dragorn: can you please explain your point on the email issue Sep 28 15:35:09 e.g.: onCreate(Bundle icicle) { new Runanble() { @Override public void run() { Log.d("testing", "Hey look at me, I'm on the UI thread!"); } }.run() } Sep 28 15:35:11 isn't layout_gravity="center" supposed to the wrapper centered w/ respect to its parent? Sep 28 15:36:05 supposed to set* Sep 28 15:36:33 it's width is fill_parent Sep 28 15:36:36 Evancharlton thx Sep 28 15:37:06 Hi, is there some solution like nine-patch but with background inside repeating not stretching? Sep 28 15:37:48 i think there's a repeat directive nostrzak Sep 28 15:37:51 did you look at the docs? Sep 28 15:38:39 sunny_slls: i hav eno idea about webviews. However if you launch an intent and then hide your activity, a very slow device could very well take a while to index who can receive that intent. While it's doing that it's either not, or is very slowly, handling your app trying to hide itself. Sep 28 15:39:02 kaneda^: the 9-patch repeat? I'm pretty sure there isn't but I'll check again if you say so Sep 28 15:39:09 i mean Sep 28 15:39:14 when you have a background drawable Sep 28 15:39:26 within the stack for your drawable bitmap i believe there's a repeat directive Sep 28 15:40:07 anyone know why my layout_gravity fails? Sep 28 15:40:12 it's making me a sad panda Sep 28 15:42:23 kaneda^: hwo ? Sep 28 15:42:30 try set width to 0 Sep 28 15:42:38 gorudonu, ooh, good call, let me try taht Sep 28 15:42:38 is it me or that AdMob documentation only talks about iOS? Sep 28 15:44:01 ok thanks dragorn Sep 28 15:45:20 gorudonu, taht disappeared the bar Sep 28 15:46:25 gorudonu, wtfm8 Sep 28 15:55:22 Why can't you use art from the Android device art generator in your feature graphic? "Do not use graphics created here in your 1024x500 feature image" Sep 28 15:58:04 kaneda^: hmm Sep 28 15:58:07 strange Sep 28 15:58:36 it should center the both elements Sep 28 15:59:41 gorudonu, it SHOULD, but as usual there are inconsistencies Sep 28 15:59:50 android design is what's keeping android devs back Sep 28 16:01:33 Hi everyone Sep 28 16:03:06 Hi everyone, can someone help me ? iam trying to show date and time picker dialog window after clicking on TextBox , can someone help me ? Sep 28 16:03:20 hmm Sep 28 16:03:45 WallnPall, what have you tried so far? Sep 28 16:04:40 well classic, creating dialog fragment in which is date picker komponent showed, but everithing was after i clicked a Button, but i tottaly dont know what to do to show it after cicking into textBox Sep 28 16:09:12 Have you tried using Google? Sep 28 16:12:27 Yeah, useActivityForResult helps :) Sep 28 16:15:22 hello .. I'm having a problem where AJAX requests in a webview are invoking the actual browser .. looking for ideas of why this could be happening Sep 28 16:15:32 when an app is installed to secure storage, is it possible for the app to obtain some storage-place id / hash that is unique to that installation? Sep 28 16:22:45 Ge0rG, generate a uuid that you store in shared prefs and then save your files in a different file? Sep 28 16:23:15 directory Sep 28 16:23:23 not quite what you want, I suppose Sep 28 16:23:24 * pfn shrugs Sep 28 16:23:32 pfn: I'm trying to make it harder to read out the app data from the phone... Sep 28 16:23:45 Ge0rG, that's not possible... particularly if the phone is rooted Sep 28 16:23:48 so I'd ideally use something which is only available to the app Sep 28 16:23:50 yeah, I know Sep 28 16:24:05 Ge0rG, use the KeyChain maybe, but that doesn't prevent a user from accessing the data still Sep 28 16:24:21 Ge0rG, use a combination of crypto keys Sep 28 16:24:31 i.e. encrypt data using a server-side key Sep 28 16:24:41 and pass the data to the server to decrypt it, and only keep it in memory Sep 28 16:24:54 of course, one could write an app that pretends to be your app and then get the data decrypted... Sep 28 16:25:35 Ge0rG, just use a trivial encryption scheme on all your data files Sep 28 16:25:39 Hi there, I am progamming a small softkeyboard. I would like to have unicode emojis on the keyboard. When I set \uD83D\uDE08 as label, the wrong unicode symbol is shown on the key. The unicode which is shown on the key is unicode char 65536 ( a quadrate). Could anybody help me? Sep 28 16:25:56 Ge0rG, make it a little more difficult, not impossible, but gslightly difficult Sep 28 16:26:42 Ge0rG, any cool scala android projects lately? Sep 28 16:27:39 hey, how do i get my device id on the android emulator? Sep 28 16:27:52 you don;t Sep 28 16:27:56 it gets you ;-) Sep 28 16:27:57 the same way as you would on a normal device Sep 28 16:27:58 so, still having a problem where AJAX requests in a webview are invoking the actual browser .. still clueless .. it seems that the webview is launching an intent ... http://pastie.org/4856497 Sep 28 16:28:02 ==pfn Sep 28 16:28:09 socket: it'll be null on the emulator, though Sep 28 16:29:08 evancharlton: im trying to add AdMob, it requires a test device id... sure it's null ? Sep 28 16:29:12 deleet, then you didn't make an ajax request... seems quite simple Sep 28 16:29:31 pfn: this is my javascript code: http://pastie.org/4856501 Sep 28 16:29:38 looks like an ajax request to me :( Sep 28 16:32:27 deleet, then you did something to the webview to break it Sep 28 16:32:51 socket: seems like you could verify that pretty easily. Sep 28 16:33:15 pfn: I'm not sure what that would be however Sep 28 16:35:24 can i open af_unix socket with java? apparently there is support but i get a runtime error while doing so: a2ii_ java.lang.UnsatisfiedLinkError: Native method not found: android.net.LocalSocketImpl.create_native:(Z)Ljava/io/FileDescriptor; Sep 28 16:35:46 reenignEesreveR, not on android Sep 28 16:35:51 why would you want a unix domain socket anyway Sep 28 16:35:57 nothing can access it... Sep 28 16:36:04 unless you have some native code, I suppose Sep 28 16:36:45 well ... its sorta porting a server written in java to android and it runs with root privileges by manually invoking the dalvik Sep 28 16:36:49 so i have some freedom here Sep 28 16:37:11 pfn: no idea what would cause this behavior? I don't even know where to look.. Sep 28 16:37:33 deleet, start with a web page and use an ajax request, then a simple webview with nothing else, etc. Sep 28 16:37:39 i.e. cut extra crap out of your app Sep 28 16:40:01 ok, will give it a try I guess .. there's a lot of crap in my app :D Sep 28 16:40:07 how hard is it to interface native code with java code on android? i.e. manually invoking functions of code written in C/CC++ ? Sep 28 16:40:20 reenignEesreveR: not too bad; the term you're looking for is JNI Sep 28 16:40:42 evancharlton, thanks Sep 28 16:42:58 evancharlton, quick question to save some googles: will the native code run in the same thread as the caller code or in a separate thread? (asking to evaluate overheads and sync issues) Sep 28 16:43:19 * same dalvik thead as the java caller code Sep 28 16:44:02 reenignEesreveR: hm, I'm not sure. I would assume so. Sep 28 16:44:09 lov: do you know the answer to that? Sep 28 16:49:28 Hello androiders.. I am a very new beginner in the android-dev world.. so new I hav'nt started yet.. so I am wondering if anyone has any good tips on where to start the journey? Sep 28 16:50:44 reenignEesreveR: I believe that it runs in the same thread. Sep 28 16:51:05 if you call from Javaland to native code and then back to javaland in the same thread, you need to keep track of your bookkeeping with regards to jni attach stuffs Sep 28 16:51:17 so any blocking all in native would block the jvm thread Sep 28 16:51:30 yes. Sep 28 16:51:32 well Sep 28 16:51:37 it would block the jvm thread that calls into native code Sep 28 16:51:53 so, if you're going to do something that blocks in native code, please don't do it on the UI thread :( Sep 28 16:51:53 yes, thats what i meant Sep 28 16:52:24 im porting a java daemon to android so it has no UI anyway :P Sep 28 16:52:33 oh yes it does. Sep 28 16:52:42 if you're forking zygote, you've got a main thread. Sep 28 16:52:53 it may not display any UI but it's still unwise to block it. Sep 28 16:53:13 if you're invoking dvm manually, I'm not really sure what happens. Sep 28 16:53:15 but uh Sep 28 16:53:21 just use common sense :P Sep 28 16:53:22 im not forking zygote as well .... simply because i dont know how to do that :P Sep 28 16:53:35 im manually invoking dalvik Sep 28 16:53:51 :) Sep 28 16:56:31 yeah, I have no idea what's going to happen if you manually invoke dalvik. Sep 28 16:56:33 actually Sep 28 16:56:38 why ARE you manually invoking dalvik? Sep 28 16:56:52 In the NDK, what is the difference between BUILD System and HOST System? Sep 28 16:57:23 to wit, why does your app need to run with root permissions? Sep 28 16:59:15 its a health monitoring tool written in java Sep 28 16:59:27 so it keeps looking around here n there Sep 28 16:59:54 on your system for different kind of anamolous behaviour Sep 28 17:00:07 im just trying to make it runnuing on android Sep 28 17:02:43 hi lov, i tried with a blank unity project but still crashes.. I was wondering.. do i need "android dependencies" because i had to remove that in order to fix build errors..? Sep 28 17:03:18 reenignEesreveR: probably won't do much without deep integration in OS Sep 28 17:12:26 BulleTime: probably. Sep 28 17:12:29 BulleTime: I really don't know. Sep 28 17:12:36 You also STILL have not defined "crashes" Sep 28 17:12:45 regardles Sep 28 17:12:52 I have NO IDEA WHATSOEVER HOW TO BUILD WITH UNITY Sep 28 17:12:58 Unity provides support for their products! Sep 28 17:13:04 may I recommend that you contact unity and ask for support? Sep 28 17:13:10 they may be able to support you MUCH more than I will. Sep 28 17:13:15 nothing, i test with a empty project Sep 28 17:13:42 but, its java build path > Libaries Sep 28 17:13:50 hi, a very quick question but we were told today by someone very senior that connecting a phone via usb to pc/laptop will create a vpn. Is this true? I've searched a bit and found nothing concrete. Essentially we need to be able to connect a phone to a local server and access a website on the pc via http using the phones browser. Wifi isnt an option Sep 28 17:14:00 BulleTime: http://udn.unity3d.com/ Sep 28 17:14:02 consider asking there Sep 28 17:14:11 BulleTime: http://unity3d.com/support/premium-support/ Sep 28 17:14:14 consider asking there Sep 28 17:14:17 I can't support unity Sep 28 17:14:22 and you still have not told us what the "crash" is Sep 28 17:14:23 ok np thanks Sep 28 17:14:29 as far as I can tell, NOTHING IS ACTUALLY CRASHING Sep 28 17:14:43 lbod: this is bullshit. Sep 28 17:14:44 well the app shuts down Sep 28 17:14:52 no. Sep 28 17:14:54 not sufficient. Sep 28 17:14:57 you need to explain in more detail. Sep 28 17:14:59 hey, is it possible to display an AdMob ad verticly? like the skyscraper design in adsens Sep 28 17:15:02 when you say "the app shuts down" Sep 28 17:15:09 do you mean that an activity displays for a short period and then finishes itself? Sep 28 17:15:21 or do you mean "a dialog appears that says 'sorry, an error occured'" Sep 28 17:15:26 if it's the latter, you crashed. Sep 28 17:15:29 If it's the former, you did not crash Sep 28 17:15:33 at least as far as android is concerned Sep 28 17:15:36 lbod: look into 'adb forward'. Sep 28 17:15:38 in which case you need to look for support elsewhere Sep 28 17:15:39 ok lov Sep 28 17:17:28 Hodapp: are you saying a vpn is created then over usb? this guy was convinced both iphone and android do this though the hosts file on the android phone should be updated Sep 28 17:17:37 just looking at forward now Sep 28 17:17:43 lbod: I think that this guy doesn't actually know what a VPN is. Sep 28 17:18:13 you can use adb forward to forward tcp ports, for example Sep 28 17:18:17 but that's not a VPN Sep 28 17:18:19 that's just port forwarding Sep 28 17:18:25 is there a reason that WIFI isn't an option? Sep 28 17:18:26 BulleTime: Why not go over to #Unity3D? Sep 28 17:18:34 lov: maybe it's me :) are you able to ping the device from your own pc? Sep 28 17:18:51 or are we talking about tcp via usb? Sep 28 17:19:04 lbod: neither Sep 28 17:19:08 lbod: we're talking about adb Sep 28 17:19:12 adb is the android debug bridge Sep 28 17:19:16 i know that Sep 28 17:19:18 you generally use it via usb Sep 28 17:19:21 you can use adb to forward ports Sep 28 17:19:31 hmm, im nit explaining well Sep 28 17:19:31 They send me to #android-dev inside unity Bryden Sep 28 17:19:40 BulleTime: well go the fuck back Sep 28 17:19:44 know what Sep 28 17:19:46 I'll go with you Sep 28 17:19:49 :) Sep 28 17:19:51 ok Sep 28 17:20:21 lov: we use phonegap.. part of the test process missing is being able to develop against an http server on our own pcs/laptop, we cant use wifi for security reasons but can use usb Sep 28 17:20:37 so, no adb in the equation here Sep 28 17:21:28 lbod: Err, VPNs are really what is out of the equation here. ADB is in the equation because you've really no other means of sanely passing something over USB. Sep 28 17:21:37 lbod: look into adb forward; that's what you need to use, and that's what your senior guy is probably talking about. Sep 28 17:22:00 whoever keeps talking about VPNs probably could use a clue-by-four upside the head. Sep 28 17:22:04 lov: it was an ibm guy Sep 28 17:22:15 lbod: that should be your first clue that he's full of it :) Sep 28 17:22:18 but.... why is adb important here? Sep 28 17:22:27 because adb is how you're communicating with the device. Sep 28 17:22:41 but we're not Sep 28 17:22:47 well, ok. Sep 28 17:22:47 right let me be clear, im not explaing well Sep 28 17:22:52 please. Sep 28 17:23:12 phonegap - standard web development.. we'd do say 70% of development using chrome as it's webkit Sep 28 17:23:33 ok, that's fine. Sep 28 17:23:45 but, hte proof is in the pudding, the android browser is whats important so we need to connect as per normal using http to our local servers Sep 28 17:23:50 ok. Sep 28 17:24:19 so, can i connect a device via usb and have the browser see the local machine? Sep 28 17:24:25 no. Sep 28 17:24:27 as compared to using wifi Sep 28 17:24:30 not without additional action. Sep 28 17:24:32 thats what i thought too Sep 28 17:24:37 ok, so. Sep 28 17:24:42 what further action? Sep 28 17:24:47 there are two things that can be done here Sep 28 17:24:55 1) enable tethering. This goes backwards from what you want here, however. Sep 28 17:25:00 2) use adb forward to perform port forwarding. Sep 28 17:25:43 lov: can u explain the process/design where adb comes in? do you mean using port forwarding in adb on the pc to forward tcp requests from usb? Sep 28 17:25:50 basically. Sep 28 17:25:52 so Sep 28 17:25:54 hmm Sep 28 17:25:57 interesting Sep 28 17:26:01 You need your browser, ON THE DEVICE, to hit port 8080 ON YOUR COMPUTER. Sep 28 17:26:02 Correct? Sep 28 17:26:04 this is your usecase? Sep 28 17:26:06 yeh Sep 28 17:26:08 right. Sep 28 17:26:17 and you can't just plug it into your network. Sep 28 17:26:23 and you can't use wifi (for whatever reason) Sep 28 17:26:31 wifi's basically disabled for security policies Sep 28 17:26:32 actually, hmm Sep 28 17:26:51 I know that adb forward can go from computer to device, I'm not sure if you can do it backwards come to think of it Sep 28 17:27:15 lov: I believe it's bidirectional. Sep 28 17:27:33 surely theres some ip reolution if thats the case? Sep 28 17:27:41 IP resolution...? Sep 28 17:27:44 yeh Sep 28 17:27:49 What do you mean? Sep 28 17:27:56 Hodapp: I'm not sure that it is. Sep 28 17:28:01 well, on a VPN :D same network whatever Sep 28 17:28:01 actually I'm not sure that this is possible. Sep 28 17:28:11 lbod: Stop talking about VPNs. Sep 28 17:28:15 haha Sep 28 17:28:16 see http://stackoverflow.com/questions/3880059/android-device-to-pcs-socket-connection Sep 28 17:28:51 actually Sep 28 17:28:52 http://stackoverflow.com/questions/10788811/how-can-i-initiate-an-android-to-pc-http-request-over-usb Sep 28 17:28:54 just having a read, looks interesting Sep 28 17:28:55 that has a potential solution Sep 28 17:28:59 it's not exactly great but it might work. Sep 28 17:29:49 i was sure this guy didnt understand what we were asking either, he said it was straightforward on iphone.. am sure he was thinking of wifi Sep 28 17:31:13 ill have a play with this, am wondering how successful it's been though Sep 28 17:31:44 ssh port forwarding doesnt sound great though Sep 28 17:32:17 Could someone help me with launching the installer from an APK from a given URI? I've been reading up on SO, and they all say to set the MIMEType to "application/vnd.android.package-archive" , but that causes it to crash on my 2.2 emulator Sep 28 17:32:35 lov: thanks Sep 28 17:49:53 Hi Sep 28 17:50:15 I want to use to dump call stack Sep 28 17:51:06 I add "#include " Sep 28 17:51:36 "android::CallStack stack; stack.update(); stack.dump("");" Sep 28 17:53:44 but when I use "make libv8" to build v8, I get undefined reference to `android::CallStack::CallStack()' Sep 28 17:54:09 'sup Sep 28 17:54:39 I think this is linking error Sep 28 18:01:11 this is fantastic... i need to flash a sense rom to get my GPS to work, but none of the sense ROMs recognize my sim pin Sep 28 18:02:04 i think you're in the wrong channel Sep 28 18:02:34 im just whining Sep 28 18:03:52 you're in the right channel then Sep 28 18:05:59 haha Sep 28 18:06:15 hello all! Sep 28 18:07:07 #android-whining Sep 28 18:07:12 I have a question about the compiling of the lastest i9000 kernel from samsung open sorces: Sep 28 18:07:28 Flurry, wrong channel -> #android-root Sep 28 18:07:35 ok Sep 28 18:07:43 * mrenouf|work *sigh* Sep 28 18:07:44 it's right past #android-whining Sep 28 18:12:29 hi all Sep 28 18:12:47 is it ok to ask question regarding NDK here Sep 28 18:13:40 wanted to know about the stdout of NDK Sep 28 18:14:27 like I have code which writes to stdout, can I read what the code wrote in NDK of course Sep 28 18:16:08 mrenouf, in android-root said me to go in android-dev!!! Sep 28 18:16:39 Flurry: you're not really going to get any help in here, unfortunately Sep 28 18:16:46 #android-root is really more that speed Sep 28 18:16:56 Flurry: I went through this about a month ago and I took lov's advice Sep 28 18:16:56 I mean you can try asking the question, but there's no guarantee that you'll get anything resembling help. Sep 28 18:17:02 join the google groups Sep 28 18:17:09 answer form android-root: Flurry, Might have better luck in #android-dev Sep 28 18:17:40 * lov shrugs Sep 28 18:17:50 android-root and android-dev can't help me with a kernel compiling!!!!!!????????? Sep 28 18:17:55 You're best bet is to either get involved in the mailing list Sep 28 18:18:07 14:17:11 < C0deMaver1ck> join the google groups Sep 28 18:18:14 thanks lov Sep 28 18:18:32 you're welcome Sep 28 18:19:28 Who can help me with and android kernel compiling? Sep 28 18:19:35 omfg Sep 28 18:19:47 hehe Sep 28 18:19:49 (11:18:07 AM) lov: 14:17:11 < C0deMaver1ck> join the google groups Sep 28 18:19:50 they keep coming Sep 28 18:20:29 Flurry: https://groups.google.com/forum/?fromgroups#!forum/android-building Sep 28 18:20:31 ^ there Sep 28 18:22:03 I'm reading Sep 28 18:24:44 C0deMaver1ck, nothing for me in those threads! Sep 28 18:25:10 you can ask a question there Sep 28 18:25:24 ok, who has op privleges? Sep 28 18:25:47 *privileges Sep 28 18:25:50 Anyone known why a zImage too large from compiling? I have added only the initramfs extracted from original zImage! Sep 28 18:26:14 ask on the google group. Sep 28 18:26:26 ok, thanks!! Sep 28 18:29:26 C0deMaver1ck: I have op privledges, why? Sep 28 18:29:36 Flurry is annoying, but not to "just gtfo" kick/ban level yet Sep 28 18:30:24 I know, I was just #android-whining Sep 28 18:42:26 How do games and other apps with many resources (specially drawables) manage them? Sep 28 18:42:33 Since you can't even have subfolders in drawables Sep 28 18:44:15 well, you kinda just answered your own question Sep 28 18:44:17 :) Sep 28 18:44:53 I did? Sep 28 18:46:02 you just stick em in the right directories Sep 28 18:46:11 RazielZ: prefixes? Sep 28 18:46:14 all your hdpi resources go in drawable-hdpi Sep 28 18:46:29 Yeah, but I mean, if you have, like, 400 drawables. Sep 28 18:46:42 How do you even dynamically access them if you can't build a string and access them by name? Sep 28 18:46:49 Since R.drawables.name is a int Sep 28 18:46:50 dont do that Sep 28 18:46:57 dynamic access is the worst Sep 28 18:47:09 ... Sep 28 18:47:31 Well it's necessary <.< Sep 28 18:47:31 there's a nick i havent seen in a while Sep 28 18:47:49 "by name"? Sep 28 18:47:54 it's never necessary Sep 28 18:48:13 wongk: what name? Sep 28 18:48:15 like, you want to supply "name" and have it find the string with ... for you? Sep 28 18:48:25 canadiancow: yours Sep 28 18:48:28 that is, find bythe *string* of hte name? Sep 28 18:48:29 ew. Sep 28 18:48:30 Well, I want to supply the name of the image, and have it load it from drawables. Sep 28 18:48:36 The name as opposed to the ID. Sep 28 18:48:39 supply from the user? Sep 28 18:48:45 as text? Sep 28 18:48:54 Uuuh Sep 28 18:49:00 wongk, really? Sep 28 18:49:04 im always around Sep 28 18:49:10 the last few weeks have been hectic with my move and all though Sep 28 18:49:16 seriously i am trying to grasp why you would ever need to start from a string rather than the resource ID Sep 28 18:49:18 if the image is in resources I'd imagine you'd want to present a picker, at which point you can derive the id Sep 28 18:49:27 ctate: it's never necessary Sep 28 18:49:28 yeah, my move is sunday - monday Sep 28 18:49:42 (and make or generate a list for the picker) Sep 28 18:49:47 ctate, because I don't want to write the ID for over 100 drawables manually? Sep 28 18:49:55 And have 100 ifs or switch or whatever? Sep 28 18:50:16 and you'd rahter write the string for over 100 drawables manually, because that's easier *why*? Sep 28 18:50:22 Since if I access them by name I can just do string = "image"+ ID Sep 28 18:50:27 in a for Sep 28 18:50:28 <.< Sep 28 18:50:42 ah, i see Sep 28 18:50:46 so yo uhave R.drawable.image0, .image1, ... Sep 28 18:50:48 ? Sep 28 18:50:53 Pretty much Sep 28 18:50:56 you could keep the ids in an array and iterate through them Sep 28 18:51:05 so, you can do that with reflection type crap Sep 28 18:51:05 you could use a resource array Sep 28 18:51:09 no stop Sep 28 18:51:11 or you can use a resource array Sep 28 18:51:11 all of you :( Sep 28 18:51:17 no reflection! Sep 28 18:51:35 or you can write a tool that reads the xml and emits the loop for you :) Sep 28 18:51:56 it's true that this is not really addressed by the APIs Sep 28 18:52:05 because frankly it's super rare that people have to iterate over their drawables Sep 28 18:52:21 http://developer.android.com/guide/topics/resources/more-resources.html#TypedArray Sep 28 18:52:24 mostly i'd suggest using an array resource that is the list of things to iterate over Sep 28 18:52:40 and you can build the array resource with an automated tool to make sure it's right Sep 28 18:53:47 Yeah, I think I'm better off just downloading the resources to SD card. Sep 28 18:54:47 what, it's gigabytes of resources? Sep 28 18:54:50 Since the API is clearly not made to manage a large number of resources, specially not ones that are supposed to be dynamic, from internal resources atleast Sep 28 18:54:52 No Sep 28 18:54:57 then why sd? Sep 28 18:55:00 Well Sep 28 18:55:02 Internal storage Sep 28 18:55:10 Same thing, just something that can be accessed by path Sep 28 18:55:24 the API is not made for managing large numbers of *drawables* Sep 28 18:55:36 at least, not in the way you are doing it Sep 28 18:55:59 Yeah, I assume you're supposed to stick, like, UI elements and stuff in drawables, not things like, well, that Sep 28 18:56:02 if they're packaged as assets, the Asset Manager's APIs are structured a bit differently Sep 28 18:56:46 (providing raw inputstream access to named assets) Sep 28 18:57:02 which depending on your use case might be much more what you want Sep 28 18:57:44 True Sep 28 18:58:09 Hmmm Sep 28 18:58:36 Is there a faster way to parse large-ish text files than using .indexOf? Taking into account the files aren't exactly meant to be parsed so I'm looking for specific things that are before the things I want and so on? Sep 28 18:59:45 regex Sep 28 19:00:10 Would regex actually be faster in a case like this? Since each thing I need to find is, well, specific and different, and there's about 20 of them Sep 28 19:00:14 hello Sep 28 19:00:16 what's "large-ish" Sep 28 19:00:21 Uuuuh Sep 28 19:00:25 1KB? 1MB? 1GB? Sep 28 19:00:43 Bout 75000 chars Sep 28 19:00:48 if you wrote one regex for all the "things", it would be much faster than running indexOf 20 times Sep 28 19:01:09 One regex for ALL the things? Sep 28 19:01:21 Didn't know I could do that Sep 28 19:01:30 * Hodapp looks curiously at all the cheap-ass Android devices on sites like DX Sep 28 19:01:37 you can do anything, if you believe Sep 28 19:01:38 I haven't used regex much. Or at all. Sep 28 19:01:42 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using that I can't zoom out using pinch to zoom, anybody knows the reason? Sep 28 19:02:12 Justification for the use of BufferedInputStream or BufferedOutputStream in Android? or some cases? Sep 28 19:02:46 bingles: it provides more abstractions than a plain InputStream? Sep 28 19:02:52 I can't find the app ive got on the play store in the play store... :/ Sep 28 19:02:53 or its atavism from times olds Java's? Sep 28 19:03:18 tomtiger11: it can take like an hour or so Sep 28 19:03:18 sampullman for what? Sep 28 19:03:21 hi Sep 28 19:03:24 bingels: because buffered i/os can be more efficient? Sep 28 19:04:01 romainguy_ yes its efficient, in example sockets, read/write files Sep 28 19:04:12 question about efficient Sep 28 19:04:19 is there any way of starting a service and keeping it running (without restarting it) after the activity has been destroyed? Sep 28 19:04:28 wongk: Right, Is there a link in the dev console once thats done? Sep 28 19:04:38 no Sep 28 19:05:06 So iv'e got to search the play store to find it? Sep 28 19:05:23 because in mobile OS (Android) it can use excess memory Sep 28 19:05:30 ttps://play.google.com/store/apps/details?id= Sep 28 19:05:35 with limited heap Sep 28 19:05:39 Is there a channel for regex newbies? Sep 28 19:05:40 id is the package name Sep 28 19:05:41 process's heap Sep 28 19:05:43 I need to lern le regex Sep 28 19:06:10 https://play.google.com/store/apps/details?id=com.tomtiger11.app Sep 28 19:06:20 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using it I can't zoom out anymore using pinch to zoom, anybody knows the reason? Sep 28 19:06:44 BufferedInputStream or BufferedOutputStream its efficient for mobile OS (Android)? Sep 28 19:06:51 well yes Sep 28 19:07:29 in some like this too - while (((l = is.read(b)) > 0)) os.write(b, 0, l); ? Sep 28 19:07:45 RazielZ: just find a regex reference Sep 28 19:07:51 MMmmmmmmmmmmk Sep 28 19:07:53 RazielZ: google is your friend, but the oracle docs are probably ok: http://docs.oracle.com/javase/tutorial/essential/regex/ Sep 28 19:08:02 BufferedInputStream is ; BufferedOutputStream os; Sep 28 19:08:20 when copying files Sep 28 19:08:23 It;s still more effective even if the order of the things I'm looking for is properly defined? so, each indexOf searches from the last one's index Sep 28 19:08:29 Not from the beginning of the file Sep 28 19:08:35 oh Sep 28 19:08:50 indexOf is probably ok, if it's a trivial pattern you're looking for Sep 28 19:09:00 is there a good rom based on the official jellybean for samsung s3 for sprint out yet? i'm thinking of getting one, but only if there's a good stable jellybean rom for it Sep 28 19:09:00 no, that would only require 1 linear scan through the string Sep 28 19:09:15 Well that's what I'm doing, but it's pretty damn slow :[ Sep 28 19:09:20 it can't get any more efficient than that Sep 28 19:09:35 that should be instantaneous based on the numbers you've given Sep 28 19:09:44 are you using indexOf("thing", fromIndex) ? Sep 28 19:09:59 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using it I can't zoom out anymore using pinch to zoom, anybody knows the reason? Sep 28 19:10:03 i = page.indexOf(">", page.indexOf("\"c", i + 1)); Sep 28 19:10:04 Stuff like that Sep 28 19:10:17 wongk: That gives a 404 changing the tomtiger11 for the appropriate thing Sep 28 19:10:17 that should be fast Sep 28 19:10:28 And getting substrings from them Sep 28 19:10:28 are you sure the indexOf is your bottleneck? Sep 28 19:10:35 tomtiger11: how long has it been? Sep 28 19:10:37 Mmmmnope Sep 28 19:10:47 How do I check my stuff for performance? Sep 28 19:10:58 BufferedInputStream(new FileInputStream(file),8192); its more efficient of simple new FileInputStream(file)? Sep 28 19:11:19 I never tested performance properly before Sep 28 19:11:19 well, getting the substring takes a linear scan. i'd still vote for regex in this case. you can find and grab the strings at the same time Sep 28 19:11:34 or BufferedInputStream(socket.getInputStream(),8192); vs socket.getInputStream()? Sep 28 19:12:01 ch.set1(Integer.parseInt(page.substring(i + 1, Sep 28 19:12:01 page.indexOf("<", i + 1)))); Sep 28 19:12:02 you can test performance using the profiling tools google provides Sep 28 19:12:06 Substrings look kinda like that. Sep 28 19:12:06 wongk: Half an hour, maybe Sep 28 19:12:15 tomtiger11: well there you go Sep 28 19:12:49 Well, some are strings, not parseint, others look for something else for the end, so on Sep 28 19:13:09 sampullman File System or Sockets IO can do unstable test with own caching mechanism Sep 28 19:13:27 profiling going to as.. Sep 28 19:13:52 i'd imagine the substring part is slowing you down. of you wrote one regex with 20 groups, the entire thing would take 1 scan, where your current method takes 1 + 20, or so Sep 28 19:14:33 bingels: i was talking to RazielZ, and referring to this: http://developer.android.com/tools/debugging/debugging-tracing.html Sep 28 19:16:26 Soo I have to make Debug, start it, then stop it, and then read the trace file? Sep 28 19:17:05 Ooor I can use DDMS Sep 28 19:17:25 used this.. Sep 28 19:21:09 RazielZ: you can import the debug class, then call startMethodTracing or something when you want the trace to start, then stopMethodTracing when you want to it stop Sep 28 19:21:24 so, start it before your app slows down, and stop it sometime after Sep 28 19:21:35 And the ddms view is gonna read it? Sep 28 19:22:01 Or, read from it Sep 28 19:22:08 you can use the traceview program Sep 28 19:22:26 sampullman on ddms panel exists button "Start/Stop methods profiling" Sep 28 19:23:27 bingels: i wasn't aware of that, but i personally prefer to have more precision when profiling Sep 28 19:24:55 With each update ADB and ADT i dont know that there is a new Sep 28 19:27:33 new BufferedInputStream(new ByteArrayInputStream(....)) - its good practice? Sep 28 19:27:56 i guess its more abstractioned Sep 28 19:28:26 would ask about this on ##java.. Sep 28 19:28:30 it's not a big deal if you're sure it's backed by a ByteArrayInputStream Sep 28 19:28:43 it's basically mandatory if it's backed by a stream pointed at a disk Sep 28 19:30:07 "a stream pointed at a disk" what this mean? ByteArrayInputStream its class wrapper of byte array Sep 28 19:30:21 right: it's a stream backed by a byte array in memory Sep 28 19:30:30 as opposed to a FileInputStream Sep 28 19:30:42 with any number of intervening wrappers Sep 28 19:31:07 it's slow and inefficient to do unbuffered reads from a disk Sep 28 19:31:15 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using it I can't zoom out anymore using pinch to zoom, anybody knows the reason? Sep 28 19:31:30 it's slow and MURDEROUSLY inefficient to do unbuffered writes to a disk :) Sep 28 19:31:50 ctate what about Sockets please? Sep 28 19:32:08 getInputStream() getOutputStream() Sep 28 19:32:38 the same? Sep 28 19:33:02 got an android question which isn't necessarily dev related. I just got done rooting and after the wipe i logged in to my google account and it started to redownload my apps, however at that point I pulled the battery to reboot in fastboot mode and it seems like now it wont retry to download the missing apps. is there a way I can force it to redownload them? Sep 28 19:33:17 bingels: it's just like calling unbuffered read() or write() on the socket Sep 28 19:33:21 it is often not ideal Sep 28 19:33:23 you lost me at 'rooting' Sep 28 19:33:50 psynor: wrong channel, and no, it won't retry Sep 28 19:34:08 you can *try* to force it, but it's a pain and may not work anyway :) Sep 28 19:34:13 ctate: what would be a good channel? Sep 28 19:34:14 adb shell bmgr list sets Sep 28 19:34:30 will tell you the set of available datasets for restore on the account you've set up with Sep 28 19:34:32 ctate: i wiped the data and cache for the google play app, but doesn't seem to make a difference Sep 28 19:34:43 the top one in the list is the one it will use for the setup-time restore Sep 28 19:34:47 clear data for the play store app Sep 28 19:34:57 ctate i cant understand you, for more efficint on socket must use Buffered* ? Sep 28 19:35:02 then copy the hexything from that top entry in the 'list sets' output Sep 28 19:36:18 Eninem - My name is! Sep 28 19:36:44 Whoops. Wrong Channel Sep 28 19:36:59 then run this: adb shell bmgr restore HEXYTHING com.google.vending Sep 28 19:37:29 ctate: when you say " then copy the hexything from that top entry in the 'list sets' output" I copy that, and then what do i do with it after that? Sep 28 19:37:39 psynor: i just said the command to use Sep 28 19:37:43 oh there you go, i asked too soon Sep 28 19:37:45 lol Sep 28 19:37:45 :) Sep 28 19:37:48 hi I am getting the same old problem " R can not be resolved " Sep 28 19:37:50 ctate: thanks Sep 28 19:37:56 I earlier I had faced the same problem Sep 28 19:38:08 and hence cross checked all the imports and xml files Sep 28 19:38:13 and names under /res Sep 28 19:38:13 bingels: in general, yes, it's more efficient to use a buffered reader, becuase then the raw read() operations on the socket will be in large blocks at a time Sep 28 19:38:36 occasionally this will not be what you want, but in those cases you'll know why and can proceed accordingly Sep 28 19:41:17 ctate thanks Sep 28 19:41:31 ctate: thanks from me also ;-) Sep 28 19:45:48 niteshnarayanlal: have you cleaned the project lately? Sep 28 19:46:20 I just cleaned the project without building automatically Sep 28 19:46:28 but still no sucess Sep 28 19:46:37 well, that was my only suggestion. Sep 28 19:46:38 sorry Sep 28 19:46:46 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using it I can't zoom out anymore using pinch to zoom, anybody knows the reason? Sep 28 19:46:58 i imagine stack overflow has the answer hidden somewhere, though Sep 28 19:47:04 sampullman, yeah sure np thanks :) Sep 28 19:47:10 I tried Sep 28 19:47:17 digging deeper Sep 28 19:48:48 -- what part of the android source is this id used? Sep 28 19:48:59 Not finding it in framework/services/policy Sep 28 19:55:55 huh. what OS rev are you looking at? Sep 28 20:02:41 lov, you are annoying! GTFO!!!!! Sep 28 20:03:30 oh he quit :( Sep 28 20:03:35 lov, lols Sep 28 20:03:41 got all dressed up for nothing ;) Sep 28 20:03:45 yeah seriously Sep 28 20:04:14 i'm a pixel pushin all day long Sep 28 20:04:19 * kaneda^ twiddles thumbs Sep 28 20:05:50 peace out... next time i get on here, i'll be living about 1200 miles southwest of my current location :P Sep 28 20:06:06 god speed Sep 28 20:06:35 Hi there, does anybody know how I can convert a number, like 128514 to an surrogate char? Sep 28 20:06:55 surrogate, does that means it bears another chars char baby? Sep 28 20:07:08 o_O Sep 28 20:07:31 not exactly baby... but surrogate is used to displays char bigger than 16 bit Sep 28 20:08:18 like the emoticons, those are in the unicode standard, but above 32000. Thats why a surrogate, two 16bit-chars are needed :D Sep 28 20:08:40 \uD83D\uDE01 for example is a smiley :) Sep 28 20:14:54 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using it I can't zoom out anymore using pinch to zoom, anybody knows the reason? Sep 28 20:22:28 i have a custom View that draws a number of children, and it's inside an ObservableScrollView Sep 28 20:22:38 everytime the user scrolls, I invalidate() and requestLayout() Sep 28 20:22:53 if the user scrolls quickly, it lags Sep 28 20:23:03 is there a better way to do this? Sep 28 20:24:10 ScrollView ? Sep 28 20:24:24 kaneda^: what do you mean? Sep 28 20:24:41 HorizonX1_SF, i'm just confused as to why you're invalidating Sep 28 20:24:43 i'm using a subclass ScrollView that lets me know when the user scrolls, so that I can recycle views Sep 28 20:24:51 oh..why? Sep 28 20:25:37 so the custom view is a 3-column GridView-type control that doesn't really have rows Sep 28 20:25:43 sort of like Pinterest style Sep 28 20:25:55 where the items can have different heights Sep 28 20:26:03 ok Sep 28 20:26:23 so when the user scrolls, i remove the non-visible items, and add more items to the layout Sep 28 20:26:29 and recycle the views Sep 28 20:27:03 i'm willing to admit that i might not have the best solution here Sep 28 20:27:06 gotcha, this makes sense Sep 28 20:27:52 so if it lags why dont you buffer it Sep 28 20:27:59 have the next 'page' of icons loaded before hand Sep 28 20:29:00 kaneda^: right, but how many can I really buffer? it's really only noticeable on flings Sep 28 20:29:32 i dunno Sep 28 20:32:40 hmm... funny, if I have a surrogate in the xml it isnt working with the in the manifest. If I remove it, the surrogate works. Why this behavior? Sep 28 20:35:43 protip: target the highest sdk level you're prepared to run on Sep 28 20:36:16 otherwise your app will look clunky and outdated on newer phones Sep 28 20:38:23 ^^ true story Sep 28 20:38:39 just set it to 999 Sep 28 20:38:48 then it will never look outdated! Sep 28 20:47:13 I have some problems with my app loosing state on screen orientation change, i do know that this is because the activity is restarted. I have however created unique ids for all my elements in the gui, am i wrong that this should be enough? Sep 28 20:47:51 oh wow Sep 28 20:48:05 I just noticed that in jellybean, Google Music doesn't mute itself when something else plays a notification sound Sep 28 20:48:21 * tnzr rejoice Sep 28 20:49:00 nenn3: http://developer.android.com/training/basics/activity-lifecycle/index.html Sep 28 20:50:09 hmm, eclipse 3.8.1 is out Sep 28 20:50:17 lov: awesome, hadn't found that one. many thanks! Sep 28 20:50:22 @ctate thanks for your answer. But I think you missunderstood me. The behavior is a complete different. If I set the sdk level it will not behave like i want it too. Which sdk will it chose if the sdk tag is missing in the manifest? Sep 28 20:51:18 faesi: the behavior is undefined, I think. It doesn't matter; you really ought to set a minSdk and targetSdk in all cases. Sep 28 20:51:55 faesi, if you're missing target, it uses your min Sep 28 20:52:11 or rather, most features are activated by the greater of the two Sep 28 20:52:36 but if your target is less than you min, you're doing it wrong Sep 28 20:53:35 faesi: See the documentation about this directly: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html Sep 28 20:53:47 also see the documentation in BUILD_CODES that specifies what changes occur at what API level Sep 28 20:54:14 Thanks for your answers :D Sep 28 20:55:07 With sdk 1 it works like i expected :D Sep 28 20:55:17 thats bad Sep 28 20:55:33 I am having problems querying the contacts provider. I was able to get the Contact and raw_contant but when i get to the data i don't understand what are generic columns Sep 28 20:55:56 @canadiancow why is target sdk1 bad? Sep 28 20:56:37 because you're saying that you haven't tested on anything higher than the original G1 with the firmware that it shipped with. Sep 28 20:56:41 Android has come pretty far in the last 5 years. Sep 28 20:57:00 as a result, ALL of the compatibility codepaths will be engaged, including ones you probably don't want Sep 28 20:57:15 If you're not sure what targetSdk to set, set it to the API level of the device you're primarily testing with Sep 28 20:57:33 would targetSdkVersion=1 letterbox everything to 320x480? Sep 28 20:57:43 haha it just might actually Sep 28 20:57:44 i know theres some compat thing if your target is less than 3 Sep 28 20:59:22 not to mention there are ZERO API Level 1 devices out there Sep 28 21:00:20 That is actually Android 1.0, which you /really/ don't want Sep 28 21:00:43 Thanks for your helpful answers :D I changed the targetAPI to 15. :) Sep 28 21:01:38 run remember to run lint to catch anything that you might want to avoid to keep compatible with your minSdk (which I recommend setting to at least 7) Sep 28 21:01:41 if not 8 Sep 28 21:02:56 I queried the contacts data table and i got a cursor with columns: data1 and data2. How do i access these 2? Sep 28 21:04:21 cursor.getString(0) or cursor.getString(1) Sep 28 21:05:47 jasta: ffmpeg 1.0 is out Sep 28 21:05:57 doogan: my app forces closes Sep 28 21:06:07 when i try getString Sep 28 21:06:20 most likely, 'cursor' is null Sep 28 21:06:21 I have now set the min to 7 and the target to 15 :D thanks a lot for your answers :) Sep 28 21:06:27 what's the crash look like in the log? Sep 28 21:07:47 what i don't understand. if i set the minsdk to 8, i get an exception. I don't understand why. Could you please help me? The discription on google for min sdk is : "An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attri Sep 28 21:08:44 faesi, you must share the full exception and stack trace for us to be able help you Sep 28 21:08:56 * ctate points to the imgur link in the channel topic Sep 28 21:09:29 faesi, stop being so vague Sep 28 21:09:40 flailing your arms and saying "exception exception" doesn't allow us to help :P Sep 28 21:10:02 doogan: caused by CursorIndexOutBoudException: index -1 requested, with a size of 1 Sep 28 21:11:11 danixn, you didn't cursor.moveToFirst() Sep 28 21:11:34 cursor always starts before the first row, which is row 0 Sep 28 21:13:06 mrenouf: so its start at -1? Sep 28 21:13:24 just do cursor.moveToFirst() Sep 28 21:13:33 or if you need more than one, cursor.moveToNext() in a while loop Sep 28 21:13:48 get the data you need, then cursor.close() Sep 28 21:14:15 it's not that it starts at row zero Sep 28 21:14:28 it's that until you call moveToNext(), it is *undefined* Sep 28 21:14:36 err, moveToFirst() Sep 28 21:14:45 ah k Sep 28 21:14:56 thanks a lot it was driving me crazy Sep 28 21:15:10 wow north korea developed an android tablet ;O Sep 28 21:15:33 the dear leader know how to code! Sep 28 21:15:58 if i am doing a data intensive query, should i put the query in a new thread? Sep 28 21:16:22 danixn: yes Sep 28 21:16:50 if you mean query, as in 'select', then use a loader. makes life easier. Sep 28 21:17:22 faesi: http://imgur.com/jacoj Sep 28 21:17:25 when i run my application on my 4.0.3 phone, it runs fine. but when i run it on a 2.2 emulator, it tells me, "unable to instantiate activity ComponentInfo ? ClassNotFoundException: package.MyActivity in loader?". what should i try to fix this? Sep 28 21:17:39 Call of Duty on Android only $1.79 Sep 28 21:17:41 https://play.google.com/store/apps/details?id=com.meroxdev.mw2codalexifan Sep 28 21:17:44 scant: looking at the full stacktrace Sep 28 21:17:46 g00s: ok thanks Sep 28 21:17:47 Or perhaps its a scam? Sep 28 21:17:57 scant: look for a "caused by" line further down Sep 28 21:18:09 I wanted to upload the project to github, but my client isn't working at the moment :( So, I uploaded it to dropbox :D https://www.dropbox.com/s/0k2azrl601qdjos/Emoji%20Keyboard.zip It's a Keyboard with one button. The Button text is \uD83D\uDE01 if the minsdk is set to 7 the button works, if set to 8 it doesnt :( Sep 28 21:18:21 faesi: that's not helpful. Sep 28 21:18:21 @lov, i hope source is ok too ;) Sep 28 21:18:31 faesi: pastebin your exception Sep 28 21:18:36 we really give no shits about your source code, period. Sep 28 21:18:47 we only care about it as a vehicle towards seeing what your exception references Sep 28 21:19:08 we WILL NOT compile your entire codebase just to try to reproduce some dinky error you're having Sep 28 21:19:15 especially when we can generally solve it by just looking at the error. Sep 28 21:19:26 hey guys, can you take look at my question? http://stackoverflow.com/questions/12629584/how-to-select-first-item-of-a-listview-by-default-that-is-populated-by-a-loader Sep 28 21:19:48 Also i am learning the Contacts Content Provider and i understand that its sepreated into three 3 tables Contacts, Raw_Contacs, and Data. In the Data table and i don't understand the generic data columns DATA1 to DATA15? Sep 28 21:20:02 how do they work? Sep 28 21:20:48 \insaneclownposse{fucking contacts provider}{how does it work?!?!} Sep 28 21:22:41 @lov http://pastebin.com/dpKb0jfd Sep 28 21:25:04 that smells like you aren't being sufficiently careful about text encodings Sep 28 21:25:06 ahaha nice sigsegv Sep 28 21:25:14 lov: it's dalvik calling abort Sep 28 21:25:23 * ctate | Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1) Sep 28 21:25:24 yeah I would call abort too if I were dalvik Sep 28 21:25:31 that's a special fault address Sep 28 21:26:31 basically, it's being told "okay, here is some utf-8 text" and it's all "nuh-uh!" Sep 28 21:27:00 ctate: thats going to be my new chat status :) Sep 28 21:27:01 and it bails Sep 28 21:27:12 "nuh-uh!" = bad? (sorry, not native speaker) Sep 28 21:27:15 in a curso how do i know when to use cursor.getString(columnIndex) or cursor.getInt(columnIndex)? Sep 28 21:27:27 it is telling you taht the text it is being asked to treat as though it is utf-8 is not, in fact, utf-8 Sep 28 21:27:27 "nuh-uh" = "no" Sep 28 21:27:46 you're reading this text out of your own xml files? Sep 28 21:28:18 * ctate | 09-28 23:20:36.915: W/dalvikvm(25539): JNI WARNING: input is not valid Modified UTF-8: illegal start byte 0xf0 Sep 28 21:28:23 Yep, and the text is a surrogate \uD83D\uDE01 Sep 28 21:28:33 well, you've got a 0xf0 in there somewhere Sep 28 21:29:14 is there a good example code for an app that needs to authenticate with a server, to then load a list of online users and their associated info? Sep 28 21:29:15 you also need to make sure how the text is actually being encoded when you build the app Sep 28 21:29:54 I've found: https://github.com/donnfelker/android-bootstrap , but I'm curious to know if there are others out there :) Sep 28 21:30:17 @ctate can I force to encode in utf-32? Sep 28 21:30:25 almost certainly not Sep 28 21:30:53 Android's native encoding is UTF-8 Sep 28 21:31:05 the java language's native encoding is UTF-16 i believe Sep 28 21:31:26 if you're working wiht other encodings you will need to do the conversions yourself, i suspect Sep 28 21:31:38 @ctate ok :( I can't find 0xf0 in this surrogate char.... the utf-32 value is 1F60 and there's no 0xf0 in it Sep 28 21:31:53 jep, java is utf-16 Sep 28 21:31:56 that is why i said you need to look into how your data is actually being represented Sep 28 21:34:16 sorry for the noob question, how can I check how the data is actually being represented? Sep 28 21:34:42 that's, um, a good question Sep 28 21:34:57 maybe your file encoding in which the content is delivered ? Sep 28 21:35:23 *noob answer :P Sep 28 21:36:16 file encoding utf-8 without bom Sep 28 21:36:37 g00s: ohhh Sep 28 21:37:06 anyone know if https://github.com/donnfelker/android-bootstrap is actually pretty well written and if there are other apps like that out there ? Sep 28 21:42:46 thanks for your help. I will try to replace the utf-32 char with a long value and try to convert the long to an surrogate char in the code :D thanks a log :D Sep 28 21:44:51 :/ i really need help: http://stackoverflow.com/questions/12629584/how-to-select-first-item-of-a-listview-by-default-that-is-populated-by-a-loader Sep 28 21:46:19 java rap: http://www.youtube.com/watch?v=b-Cr0EWwaTk Sep 28 21:55:50 EvilPenguin: sweet Sep 28 21:56:03 im in a hardcore nerd mood Sep 28 21:56:05 looking for everything Sep 28 21:58:07 :P Sep 28 21:58:33 i'm looking for android auth examples with my own server Sep 28 21:58:54 *the proper way sorta examples. Sep 28 22:07:49 Using a grid view, how can you change the background color of individual cells? Any links to documentation would be nice. Sep 28 22:10:04 lol, Sprint upgrades the Moto XPRT to GingerBread :P Sep 28 22:23:19 i want to detect a long press on a menu item. how can i do this? Sep 28 22:45:51 is there a good menu design that will work on both 2.2 and 4.x? Sep 28 22:48:08 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using it I can't zoom out anymore using pinch to zoom, anybody knows the reason? Sep 28 22:49:49 I'm trying to use the v7 gridlayout backwards-compatability support, but I get this error at runtime: "java.lang.NoClassDefFoundError: android.support.v7.gridlayout.R$dimen". Google says something about using an apklib rather than a simple jar file, but I can't seem to find any documentation about what I need to do to solve this issue. Sep 28 22:51:53 scant: build your app around action bars rather than "menus" per se, and use a compatibility tool such as ActionBarSherlock Sep 28 22:52:28 I can't make up my mind: textAppearanceSmall or textAppearanceMedium for some body text? Sep 28 22:58:51 Estel: whichever one looks better Sep 28 22:59:19 That's what I can't make up my mind :( Sep 28 23:02:25 Ahh, screw deciding, I'll just set it to 16sp Sep 28 23:09:21 I wish android had a better way to easily set physical dimension-sized fonts consistently Sep 28 23:10:15 The dp/sp stuff only works in the arbitrarily fixed quanta that android decides Sep 28 23:10:38 so if th escreen density isn't one of these quanta, the fonts come out a bit too small or too large Sep 28 23:11:29 personally think the best "natural dimension" to use would be the angle subtended by one pixel at the most common reading distance Sep 28 23:11:47 otherwise, have to once again do something different for a mobile device and a tablet, etc Sep 28 23:13:07 in principle, vibration and contrast might come into it too Sep 28 23:13:16 but, that way lies madness Sep 28 23:14:32 the issue I see is that once devices like (say) tv's start running android for real, this dp/sp stuff makes even less sense Sep 28 23:15:19 Something like the number of pixels in (say) a 1 second angle at the most common viewing distance would be a more useful way to consistently set sizes Sep 28 23:15:36 without getting too far into other more esoteric ideas... Sep 28 23:16:00 using 16dp for a tv would almost certainly be goofy Sep 28 23:18:27 viewer tracking may be a requirement for some sorts of 3 d TV Sep 28 23:18:45 heh Sep 28 23:18:47 so you can actually know where the user is, Sep 28 23:19:09 and maybe even have configurable per user eyesight Sep 28 23:19:44 That's an intruiging idea; but personally I just want a more modest solution. It's roughly like deciding on the size of a font to use for a billboard verus a business card Sep 28 23:20:11 as the types of devices start to proliferate, text-sizes won't easily adapt to just something like dp Sep 28 23:22:34 and yeah Sep 28 23:22:50 the above is probably not generally applicable Sep 28 23:23:35 but raises the question of what should you do if you know with a high degree of certainty that the user can't see a certain screen element Sep 28 23:33:34 I'm using webView.loadUrl("javascript:(function() { "document.getElementsByTagName('body')[0].style.zoom='myvalue'; })()"); the problem is that after using it I can't zoom out anymore using pinch to zoom, anybody knows the reason? Sep 28 23:35:56 somebody answer him, he's been doing this for hours Sep 28 23:38:04 In the NDK, what is the difference between BUILD System and HOST System? Sep 28 23:40:33 lol, sorry sampullman :P Sep 28 23:40:35 MyWay: not sure; but just to ask the obvious dumb question -- on the device you are testing, is multi-touch enabled? Sep 28 23:40:50 yes kbs, infact it's working before doing that statement Sep 28 23:41:06 after I use pinch-to-zoom I execute this Sep 28 23:41:06 MyWay: ah, ok. no ideas from my then, i'm afraid. Sep 28 23:41:11 and then I can't zoom out :( Sep 28 23:41:44 it seems like if I use zoom function, the value becomes the new minimum scale value Sep 28 23:46:03 interesting. Out of curiosity, does the style.zoom value change on the html element as you pinch zoom? Sep 28 23:58:01 no, it's changed when the the users finished loading the new link Sep 28 23:58:21 in the current page, I use the pinch to zoom and to preserve user preference, I reload this value in the new page Sep 28 23:58:33 but then the user cannot zoom out anymore! Sep 29 00:02:13 MyWay: gotcha. curiosity satiated, but no useful ideas on my end :-) Sep 29 00:02:25 eheh, thank you anyway :P Sep 29 00:21:23 can i specify the output build directory when invoking ndk-build? Sep 29 01:17:23 hi what's a good book to begin to learn android from? Sep 29 01:22:58 http://developer.android.com/training/index.html Sep 29 01:24:49 thx Sep 29 01:47:23 Hey guys, need a quick help with a code Sep 29 01:48:06 How can I call this function private static class BackgroundJob extends MonitoredActivity.LifeCycleAdapter implements Runnable { Sep 29 01:49:20 what function? Sep 29 02:02:48 i have compiled an ndk jni .so library. how do i load it from my dalvik program? or where should i place the library in the system? Sep 29 02:05:04 "/libs" Sep 29 02:11:40 hmmm..... Sep 29 02:11:52 or the other option is to try to system.load with full path Sep 29 02:12:12 in that case im getting "Cannot load library: load_segments[906]: 2918 failed to map segment from 'myLib.so' " Sep 29 02:12:24 have i compiled incorrectly or am i trying to load incorrectly? Sep 29 02:15:13 Hi all! Sep 29 02:17:56 I just uploaded a new version of my apk and suddenly it claims to require "Native platforms: ruby". I am not using Android NDK, but I have recently added a new jar to my libs directory. Sep 29 02:18:01 Any idea what this may be? Sep 29 02:19:49 romainguy: Any idea what is happening here? Sep 29 02:20:01 erm... and which jar was that? Sep 29 02:20:22 Leeds: dx.jar Sep 29 02:20:50 useful answer, dude... Sep 29 02:21:12 lol Sep 29 02:21:13 lol Sep 29 02:21:36 when in doubt Sep 29 02:21:38 clean project Sep 29 02:22:09 Leeds: Not sure what you are saying. Sep 29 02:22:20 dx.jar could possibly be worst answer ever Sep 29 02:22:32 Why? Sep 29 02:22:35 donV: you added a jar, and something broke... presumably that means that something in that jar file broke your build... Sep 29 02:22:54 telling us the filename of the jar doesn't in any useful way enable us to analyse what might have caused the breakage Sep 29 02:23:14 OK. What might cause the apk to filter by "Native platform" ? Sep 29 02:23:17 telling us "it's a library used for FOO and BAR, which I got from foobar.com", on the other hand, might let us help you Sep 29 02:26:11 It is a library for translating JVM byte code to Dalvik byte code which I got from the platform-tools/lib directory of the Android SDK. Sep 29 02:26:20 I thought it was well known. Sep 29 02:26:39 ... Sep 29 02:26:40 .. Sep 29 02:26:40 . Sep 29 02:28:34 most app developers never have a need to do in-app translation of bytecode... why do you? Sep 29 02:28:57 sounds like hackery Sep 29 02:29:23 I can explain why I need it. Will my motives change why the apk is being filtered by native platform? Sep 29 02:30:15 dx.jar relies on native code Sep 29 02:30:19 it sounds like Sep 29 02:30:39 Thank you. Sep 29 02:30:57 The native platform the apk is filtered by is "ruby". Sep 29 02:31:39 The apk in question is org.ruboto.core which is indeed Ruby related, but I know of nothing that should specify this in the apk. Sep 29 02:35:31 The inclusion of dx.jar may be a red herring (or not). There are many other changes. I am trying to isolate what triggers an apk to filter by native platforms. Sep 29 02:43:26 romainguy_: Thanks for the response. Are you certain dx.jar relies on native code? It is after all plain conversion with simple file access. Sep 29 02:43:35 no I am not Sep 29 02:43:48 donV: it would be trivial to figure that out. Sep 29 02:43:49 but maybe you ruboto thing relies on native code Sep 29 02:45:24 for some reason, the ruboto package in the market is incompatible with *all* my devices Sep 29 02:45:58 Version 0.4.7 should be compatible with all devices. It is a common platform package. Sep 29 02:46:29 also, you've been raising bugs against ruboto for months, so presumably you actually know *what it is* Sep 29 02:46:51 meh, unhelpful people Sep 29 02:47:29 Are you talking about me? Sep 29 02:47:43 and no, it's incompatible with all my devices - why would I say it was if it wasn't? Sep 29 02:48:26 In the NDK, what is the difference between BUILD System and HOST System? Sep 29 02:48:27 Leeds: Thanks for looking into this. What version of the package do you see? Sep 29 02:48:43 0.4.8, but I don't care enough to pursue it Sep 29 02:49:24 Leeds: The problem I describe is exactly what you see. The package is not compatible with any devices, while it should be compatible with all. Sep 29 02:50:16 okay, you really need to learn how to explain your issues to people, if you want them to help - because it *really* wasn't clear what you were asking, or what you were having trouble with Sep 29 02:50:45 Leeds: My apologies. I will try harder. Sep 29 02:51:06 Is it clear now? Should I explain more? Sep 29 02:51:23 reasonably clear, but someone else would have to help Sep 29 02:52:43 jasta: How can I figure out if dx.jar or other code relies on native code? Sep 29 02:55:00 okay, I'll say one more thing before walking away... Sep 29 02:55:44 donV: you're building and packaging a Ruby-for-Android package, which has somehow ended up depending on a native platform called 'ruby' - yet you think this is caused by you including a generic (but internal) package from the Android tools in your package? Sep 29 02:56:04 isn't it *far* more likely that something from your ruby package has got confused somewhere with a native platform? Sep 29 02:57:14 I agree. As I mentioned, the jar is only one of many changes. Sep 29 02:57:55 The question is: What will indicate that a package should be filtered by native platform "ruby" ? **** ENDING LOGGING AT Sat Sep 29 02:59:57 2012