**** BEGIN LOGGING AT Sat Nov 24 02:59:59 2012 Nov 24 03:01:06 is there some debuggingapi for emulating touches on the screen inside another app? i would like to test my app automated... Nov 24 03:03:44 anyone know how suitable photoshop elements is for icons? i hear a lot of designers use illustrator / ps (full version) but the elements one is … actually affordable Nov 24 03:07:26 it's less about the tools and more about how you use them. Nov 24 03:08:15 Syzygy: elements is on discount today so, for the first time i can afford it. i dont know enough about it, so i have to ask :) Nov 24 03:08:36 i have pixelmator but hate the documentation Nov 24 03:08:48 pse actually has books and things Nov 24 03:08:53 Compare the featureset of Photoshop Elements to those of, say, Paint.NET. It's not a nice comparison. Nov 24 03:09:22 yeah, I'm pretty sure that you would be pretty well off with something like Paint.NET or Gimp as well Nov 24 03:09:26 ok. yeah, i'm on max so its probably pixelmator vs pse Nov 24 03:09:33 *mac Nov 24 03:09:40 i avoid the gimp as much as possible Nov 24 03:10:03 i use inkscape, but it too is buggy as hell and they haven't had a release in forever Nov 24 03:10:11 i very porrly run project Nov 24 03:10:16 yeah gimp is lacking in design... Nov 24 03:10:42 the newer gimp improved some Nov 24 03:10:49 I can only hope. Nov 24 03:11:30 the old one required xquarts and had weird focusing problems between palletes Nov 24 03:11:42 anyway, I'm sure there are demos somewhere, you'll have to decide for yourself if it's what you want. Nov 24 03:12:13 yeah, sale end in 4 hours, not enough time . hmm Nov 24 03:13:43 anyone know if pse can handle the icon templates that google provides ? Nov 24 03:13:52 i guess i could try that, hopefully someone knows Nov 24 03:14:01 that's strange... just looked the price for photoshop up and this shop i found sells it for 25€ Nov 24 03:14:57 yeah, i dont get it … amazon sells it too and may offer some discount. i can see for boxed; but for a digital d/l not sure why anyone wouldnt just go get it from adobe directly Nov 24 03:15:26 Because it's ridiculously expensive. Nov 24 03:18:20 oh, it's a "media pack" whatever that's supposed to be Nov 24 03:20:18 can someone explain MotionEvents PointerId and PointerIndex to me? Nov 24 03:21:37 ah wait, i think i get it. Nov 24 03:27:33 So what I'm trying to do is: Nov 24 03:28:09 I'm making a game that's controlled with a virtual gamepad, meaning leftside is used for motion and right side is used for actions Nov 24 03:28:59 my thumbstick is supposed to appear anywhere the user clicks on the left side of the screen, so I need to check for the ACTION_DOWN event, right? Nov 24 03:29:51 but how do I specify the Id or index for getAction()? Nov 24 03:45:35 I don't get motion events D: Nov 24 03:45:56 Syzygy: Is your View focusable? Nov 24 03:47:01 I guess surfacesviews are focusable Nov 24 03:47:13 it's the only thing there in any case Nov 24 03:47:18 as it's a canvas game Nov 24 03:47:25 although I might switch to openGL Nov 24 03:47:30 what is the newest "stable" branch of Jelly Bean? Not the tagged 4.2_r1 and not master, the branch in the middle Nov 24 03:51:43 kamoricks, I'm not sure if SurfaceViews are focusable by default, but it's the only thing on screen. Nov 24 03:52:07 infact, the only thing in the activity. Nov 24 03:52:44 Syzygy: Well, if they're not, they won't recieve touch events. Nov 24 03:53:25 then yes, it's definitely focusable. I meant I don't get MotionEvents as in I don't understand them. Nov 24 03:53:36 or rather, how to handle several of them. Nov 24 03:54:08 it would be easier for me if it were like an array of individual events Nov 24 03:54:26 but that doesn't seem to be the case Nov 24 03:55:12 Syzygy: There's a set of pointers. You're given the index. I don't see what's hard. Nov 24 03:56:57 Well, I was pretty confused by the constants returned by getAction() and getActionDown() but I think i just understood Nov 24 04:01:38 is action_down also an action_pointer_down or do I need to handle both seperately? Nov 24 04:01:53 I guess I can just do a switch without a break though Nov 24 04:05:12 Syzygy: It's a bitmask. You check as such: if(getActionMasked() & ACTION_DOWN == ACTION_DOWN) { /* it's a down event */ } Nov 24 04:07:25 http://pastebin.com/3psNs3X2 is this also valid? Nov 24 04:08:26 I guess it has t obe Nov 24 04:08:29 *to be Nov 24 04:13:06 Syzygy: It really doesn't. Nov 24 04:13:27 Syzygy: A bitmask can have bits set other than the ones you care about. Since switch only checks for equality, it'll break in obvious ways. Nov 24 04:13:48 Syzygy: Also, use the constant. Nov 24 04:14:12 ah i get it. Nov 24 04:20:05 so what I want is : if((e.getActionMasked() & (e.ACTION_DOWN | e.ACTION_POINTER_DOWN)) == (e.ACTION_DOWN | e.ACTION_POINTER_DOWN)) right? Nov 24 04:22:06 Syzygy: Yes. Nov 24 04:22:19 well, thanks for the help, that has been eyeopening. Nov 24 04:42:59 So someone just recommended that I should make all my methods and variables public for my game so I won't waste function calls with getters and setters due to the limited resources available on mobile devices. Nov 24 04:43:21 They must've done a lot of JME. Nov 24 04:43:31 possibly Nov 24 05:16:59 if((e.getActionMasked() & (e.ACTION_DOWN | e.ACTION_POINTER_DOWN)) == (e.ACTION_DOWN | e.ACTION_POINTER_DOWN)) Nov 24 05:17:08 somehow the action down event doesn't trigger this if Nov 24 05:17:45 can someone help me understand why? Nov 24 05:19:57 Can anyone explain to me the design decision of putting things in these stupid boxes? like the to: field in an email message or a text message Nov 24 05:20:36 easy way to tell if the text segment has been recognized as a valid address Nov 24 05:24:52 Syzygy: that doesn't make any sense Nov 24 05:25:34 email address validation of any kind is stupid, and usually not correct according to the RFCs Nov 24 05:25:35 Syzygy: getAction returns a masked int, meaning you need to do the bitmask stuff to decode it. but getActionMask takes care of that for you. so just if (e.getActionMasked() == MotionEvent.ACTION_DOWN || e.getActionMasked() == MotionEvent.ACTION_POINTER_DOWN will work. but the reason your if statement doesn't work is because it'd only match both ACTION_DOWN and ACTION_POINTER_DOWN, not just one of them. seeing that it != 0 would work Nov 24 05:25:47 kevinb, thanks, already fixed it Nov 24 05:25:59 np Nov 24 05:28:48 qmr, people tend to get insecure if they don't get a response when entering addresses by hand. like: "abc@efg.com,bsdf@asd.com" will this be considered one single address by this thing or as two? do I need to seperate it with , or with ;? Nov 24 05:29:03 those are all questions that might pop up in some non-tech users head Nov 24 05:29:38 by using the brackets you give visual feedback ala "yes, we're not stupid, we recognized it correctly" Nov 24 05:29:52 or rather, the boxes Nov 24 05:33:29 Syzygy: CSV is pretty commonly accepted forever. but fine, I'll pay along. how do you edit this crap after it is in a box? Nov 24 05:34:04 I am trying to edit a phone number. I tap it, it gets unboxed. I move cursor to start of the number. enter a digit. IT GOES BACK IN A BOX. tap, no more box. move cursor. enter digit. IT'S A BOX AGAIN. !?????????????? Nov 24 05:34:31 yeah correcting typos in general is pretty annoying in java. Nov 24 05:34:50 *android Nov 24 05:44:57 uhm, how come that the target rectangle of my bitmap changes size when I drag it around? new Rect (posX-50, posY-50, posX+50, posX+50) Nov 24 05:45:50 posX+50, posX+50) Nov 24 05:46:00 second one should be posY Nov 24 05:46:08 oh Nov 24 05:46:43 thanks, I probably should sleep by now instead of programming :( Nov 24 05:46:49 :P Nov 24 05:47:19 god damn, adobe sucks balls "We're sorry, but a system error occurred. To complete your purchase immediately, please call Adobe Phone Sales at (800) 585-0774 to place your order, or try Adobe.com again later" Nov 24 05:48:17 lame. Nov 24 05:48:45 <[deXter]> What are you trying to purchase? Nov 24 05:49:11 lr4. its $99 today Nov 24 05:50:32 To anyone using IntelliJ IDEA - how do I import a library project (ViewPagerIndicator in my case) such that I can reference the source of it? I have the module added, but I keep getting "com.viewpagerindicator.Foo" does not exist. Nov 24 05:52:35 uhm... ACTION_DOWN and ACTION_POINTER_DOWN are triggered constantly as long as there's a touch happening? Nov 24 05:52:57 I thought it was only for the initial touch at the start Nov 24 05:56:29 is there a simple way that I can only trigger my method at a fresh touch? Nov 24 05:58:56 i mean, introducing a boolean that locks the method until the UP event has been called would be reasonably simple, but I still hope that there's something like FRESH_ACTION_DOWN Nov 24 05:59:27 ACTION_DOWN and ACTION_POINTER_DOWN only happen once per time you actually touch down. ACTION_MOVE happens constantly Nov 24 05:59:48 then it's time I paste my code again Nov 24 06:00:30 http://pastebin.com/rSNxrb2d Nov 24 06:00:47 mhmm... Log code proves it... code 1 appears only once, then 2 consistantly until 4 (up) Nov 24 06:01:28 so right now I spawn a circle around the position of the touch, this shouldn't move when I drag it around but it does Nov 24 06:01:51 and when I lift my finger it despawns, that's working as intended Nov 24 06:01:53 So if you're working on a joystick like you want, create the pad on-down, then track it with on-move Nov 24 06:02:03 that's my plan, yes Nov 24 06:02:10 add a deadzone to prevent accidental movement, yada yada Nov 24 06:02:35 well, it shouldn't move with the code i have right now Nov 24 06:02:56 lemme take a look Nov 24 06:03:14 stop, immediately XD Nov 24 06:03:20 line 3, terrible planning Nov 24 06:03:36 decide the action first... switch(e.getActionIndex) Nov 24 06:04:15 makes for terrible code structure though, imho Nov 24 06:04:59 I would like to group my buttons together, "button A does this, this, this, button b does this" Nov 24 06:05:03 ACTION_DOWN: if clicked on left side, save coordinates as joystick, label as joystick etcetc break; Nov 24 06:05:23 you're suggesting "this is done by button A, button B, this is done by button A" Nov 24 06:06:56 Is there a fault in the way I'm doing it? Nov 24 06:08:43 Actually, I will probably introduce an input handler that registers and deregisters input active areas Nov 24 06:08:53 so I can load in menues for example Nov 24 06:11:44 http://pastebin.com/zsvK5b1u Nov 24 06:11:47 pseudo example Nov 24 06:12:03 clean enough for ya? Nov 24 06:12:48 I don't even see the difference to what I'm doing tbh Nov 24 06:13:19 you handle the raw elements, then run a function that depicts all of your game handling... seperates it better for reading Nov 24 06:14:15 oh, you mean I should switch line 3 and 4 around? Nov 24 06:14:26 you're right, I don't even know why it's like that in the first place... Nov 24 06:14:55 Just think of it this way... Nov 24 06:15:16 how many useless if-then statements are you crossing before you figure out where your code is Nov 24 06:15:30 3 Nov 24 06:15:35 or rather, 0 Nov 24 06:15:57 0 useless ones Nov 24 06:16:06 first line, if my pointer is on the left. for a joystick, thats not bad. what happens if i'm pressing A Nov 24 06:16:25 SENSOR_ACCELEROMETER and SENSOR_ORIENTATION can both detect the tilt? I am trying to understand the use of the 6 values Acceleration x,y,z and orientaton x,y,z... Seem like the Y value has the same meaning in both SENSOR_ACCELEROMETER and SENSOR_ORIENTATION just a different range? Nov 24 06:16:51 meh, not what you're looking for anyways, lemme see what i can find for the actual error Nov 24 06:16:55 have a feeling its on line 7 Nov 24 06:20:13 event.getAction() == MotionEvent.ACTION_DOWN Nov 24 06:22:01 http://stackoverflow.com/questions/7545591/motionevent-issues Nov 24 06:22:06 there, all your source snippet needs Nov 24 06:29:23 that get you up and running Syzygy? Nov 24 06:29:45 I decided to implement a proper input handling system Nov 24 06:30:03 basically collisionboxes for buttons Nov 24 06:30:20 -blinks- Nov 24 06:30:47 ATTACK THE A BUTTON TO CONTINUE?!? Nov 24 06:32:00 something like that Nov 24 06:32:28 "That wasn't hard enough you pansy, hit it harder!" XD Nov 24 06:33:17 k i think i figured my answer, ACCELEROMETER just tell the screen point toward what axis, sky,ground,vertical upside down or not,horizontal upside down or not which is different from the ORIENTATION Nov 24 06:34:40 oh fun, sounds affect the sensor because of the magnet in the speaker >.> Nov 24 06:36:04 uhm.... I think I'm gonna name a class Disableable Nov 24 06:37:32 XD Nov 24 06:38:09 I should make a public static void fixUserError() {} Nov 24 06:38:42 It's either that or making my InputRegions extend my entity class Nov 24 06:38:52 which would also make sense to some degree i guess Nov 24 06:41:12 I have this cat... it likes my keyboard... I'll come home some days and have to surf through my code for errors it's made > 3> Nov 24 06:51:04 that's a lazy excuse Nov 24 06:51:10 lol... Nov 24 06:51:31 not my fault he deleted a 2 on a line that still made it valid > 3> Nov 24 06:51:38 String Type = c.getString(c2.getColumnIndex("ct")); Nov 24 06:52:27 oh well, time to read up on how to scan cache first, then load the image... see if that speeds up the process any... Nov 24 06:52:46 3.5 seconds for 20 mms is a little excessive loading time Nov 24 07:32:32 hello Nov 24 07:59:27 if i get this error in vold: Volume sdcard state changing -1 (Initializing) -> 0 (No-Media) Nov 24 07:59:31 what does this mean Nov 24 08:01:02 rsv, means the sdcard cant be read, possibly because it has been ejected Nov 24 08:01:19 or unmounted Nov 24 08:01:23 Mechdave: but normal mount works Nov 24 08:01:40 Mechdave: if i mount the sdcard using mount command it works Nov 24 08:02:13 Mechdave: the purpose of vold is to detect and mount it. isnt it? Nov 24 08:03:52 so while vold can't mount, you can still mount it with the command without touching anything... fun Nov 24 08:04:59 i am trying to find out what could be the issue Nov 24 08:07:05 ladies Nov 24 08:11:36 Mechdave: anywhere i should look Nov 24 08:15:17 anyone here messed with orms/object persistence frameworks etc? Nov 24 08:15:44 rsv = rsv4? Nov 24 08:16:10 rsv != rsv4 Nov 24 08:16:23 unfortunate Nov 24 08:18:08 rsv, I have always just used the fstab to automount stuff on boot, if not I use the graphical system and make sure I have the correct permissions set up under users to mount and unmount volumes. Nov 24 08:18:40 rsv, Oops, sorry wrong room :( Nov 24 08:18:50 Thiught I was in #ubuntu :( Nov 24 08:21:09 rsv, Are you trying to mount an ext4 partition? Nov 24 08:21:22 no, vfat Nov 24 08:22:24 rsv, This any good--> http://stackoverflow.com/questions/7014306/mount-second-partition-on-android-device-with-vold Nov 24 08:27:05 rsv, The other option is to look up the vold.c source ad read it to se how it works Nov 24 08:27:23 Mechdave: yeah! Nov 24 08:32:33 rsv, Sorry I can't be much more help as I have never played with it until now :) Nov 24 08:33:18 rsv, This is specific to x86 android but it may be helpful --> http://www.android-x86.org/documents/sdcardhowto Nov 24 08:38:30 also this is all #android-root material Nov 24 08:40:48 ron_frown, Yes you are correct :) Nov 24 08:54:41 hum if i need to have a socket open on android... to send gps data each 30 seconds... should i open the connection and close the connection... or keep it open 24/7 while it run and deal with disconnection? which one would consume least bandwith? Nov 24 08:58:17 while app is on eg, a gps app Nov 24 09:00:25 NeDra, I would probably open and close it. Having a socket open all the time could affect battery life badly. Or just keep it open while the app is running in foreground. If the user backgrounds it then stop the data Nov 24 09:00:44 hi. in the project properties, the list of build targets are gone.. so how can i get it back? Nov 24 09:00:52 anyone in the Norway/Oslo area that wants to sell me an Android 2.3 phone? :) Nov 24 09:01:47 superlinux-hp, Have you deleted or uninstalled the Android SDK? Nov 24 09:04:23 Mechdave, nope! Nov 24 09:04:49 i just killed -9 java to kill eclipse cos it freezed Nov 24 09:06:05 Mechdave: converting a phone into a permanent 24/7 gps plugged Nov 24 09:06:20 battery not the issue, it more the monthly bandwith Nov 24 09:06:48 making this: http://poolhem.se/gps-tracker/ Nov 24 09:14:34 Mechdave, so? what should i do? i am looking also in stackoverflow website Nov 24 09:27:44 superlinux-hp, for a start confirm with the android docs that your SDK is installed correctly. Also make sure your ADT is installed correctly (I am assuming you are using eclipse) Nov 24 09:28:47 Mechdave, all the tools are correctly setup. i told you i killed eclipse.. and then problems started to show up Nov 24 09:28:58 i used to work fine Nov 24 09:32:44 superlinux-hp, Maybe look at your local eclipse configuration then. Sometimes it screws up settings there Nov 24 09:33:54 Mechdave, is netbeans any better than eclipse? Nov 24 09:34:14 superlinux-hp, not for android imo Nov 24 09:34:20 cos i think it's more stable Nov 24 09:34:21 superlinux-hp, I have never used it. Always used eclipse for my development Nov 24 09:34:32 me too always on eclipse Nov 24 09:35:05 the next most common ide mentioned in here is probably intellij Nov 24 09:37:15 i've only ever used eclipse for android dev, but i used netbeans for DEVSjava Nov 24 09:53:40 Mechdave, i found the solution Nov 24 09:54:07 superlinux-hp, what was it? Nov 24 09:54:08 i just renamed the configuration folder of eclipse Nov 24 09:54:27 superlinux-hp, Yeah that would do it :) Nov 24 09:54:47 you know in Linux each user has the folder ".eclipse" ? Nov 24 09:55:09 the dot folders, the hidden ones? Nov 24 09:56:16 so i just renamed the folder and then it i closed eclipse, then i think it re-created the ".eclipse" Nov 24 09:57:01 no it did not recreate it Nov 24 09:57:21 but anyways the configurations are back Nov 24 10:23:50 Is it possible to have a softkeys in system menu. enabled it but i see on the right side of my screen. is it possible to have it at the bottom Nov 24 10:26:18 hi all, I have a custom view inside a ScrollView and I set the size of my view initially by overriding onMeasure() - how do I change the size later on when I want to increase the size of my view? Nov 24 10:30:58 ah, I think I found it - need to call requestLayout() on the view Nov 24 10:34:24 hey folks, i've got a simple function that opens an the market app using an intent, it works fine when i call it from my activity class. current im trying to call the function from a dialog fragment using a listener. that doesnt work, im guessing something is wrong with the context. any idea? Nov 24 11:27:36 is there a way to get the height of an EditText immediately after I create it, instead of having to wait for deferred rendering? Nov 24 11:28:27 I want to create a vertical list of EditText views positioned as if I had one EditText view with a bunch of newlines in it. Nov 24 11:37:33 augustl: so why don't you just put a bunch of edittexts in a vertical linearlayout? Nov 24 11:43:05 this is so strange, what I'm facing here. I am writing a simple widget whose main purpose is to open a web browser when a user clicks on its image, and go to the configuration activity when a user clicks on its config button Nov 24 11:43:59 the config activity is popped up upon adding the widget, by virtue of adding "android:configure="com.example.test_widget.Configure"" to the widget.xml, I get there and there's an edittext and a Submit button, the edittext receives the new URL, but the keyboard isn't popping out Nov 24 11:44:08 I get the icon of a keyboard in my notification area, but no keyboard Nov 24 11:44:19 I wait a while, it force closes Nov 24 11:54:14 alankila: I don't know how many I need to add Nov 24 11:54:19 as in, define "bunch" :) Nov 24 11:56:34 I want it to fill the screen Nov 24 12:01:08 alriiiiight, so my keyboard is not popping up ANYWHERE! Nov 24 12:01:10 hah Nov 24 12:11:57 anybody have any experiance with saving and loading images from diskCache? would it be too slow if i need to load an image every 90ms? Nov 24 12:55:25 man it really irritates me that there is an entire industry built around making music on iPhones and STILL android doesn't take audio latency seriously Nov 24 12:55:47 audio latency? Nov 24 12:55:57 the delay between when you hit a key and you hear the note Nov 24 12:56:04 yeah Nov 24 12:56:10 happens with my volume keys Nov 24 12:56:20 there's like a 1/4 second delay Nov 24 12:56:37 also the noise it makes is the least pleasant noise I've heard a computer make in 3 years Nov 24 12:56:45 like a CMOS beep or something Nov 24 12:56:47 I just got a nexus7 tablet and the delay is worse than my old incredible 2 Nov 24 12:56:51 BROP Nov 24 12:56:54 BROP BROP Nov 24 12:56:57 BROP! Nov 24 12:57:11 sounds like it's broken or some shit Nov 24 12:57:41 well that probably has to do with requiring a broadcast receiver when you press the button and other things possibly being triggered by it as well Nov 24 12:57:43 but what I mean is Nov 24 12:57:49 youc an write raw pcm data to the audiotrack Nov 24 12:57:55 and it still doesn't play immediately Nov 24 12:58:01 it is like 20ms behind, minimum Nov 24 12:58:04 more like 100ms on the n7 Nov 24 12:58:32 and from what I hear, using the ndk won't help much Nov 24 12:59:02 the thing is, there is no reason why it couldn't work better if it was remotely on their list of priorities. the hardware is fine. Nov 24 13:11:43 root66: out of curiousity, are you talking about pure audio latency, or also touch screen input latency? Nov 24 13:15:49 root66, are you using mediaplayer, soundpool or audiotrack (since i get you don't use jni/ndk)? Nov 24 13:16:55 oops just backlogged, audiotrack. what is the minimum buffer size in byte returned from audiotrack? Nov 24 13:21:03 i've got 4800 bytes here, which is at 44khz around 54ms of latency (not counting the ui) Nov 24 13:21:13 audio latency is one area where iOS beats Android by a large margin, and that's not going to change anytime soon. Nov 24 13:21:15 the thing is, there is no reason why it couldn't work better if it was remotely on their list of priorities. the hardware is fine. <- the hardware is not fine from what i heard Nov 24 13:21:32 some DAC are even resampling to 48Khz whatever the samplerate you choosed Nov 24 13:22:14 also take a look at some review about N7 and the poor quality it gives (around 1% of distorsion), however for the masses it's more than enough for them to listen their mp3 Nov 24 13:22:55 Also using ndk or opengl ES can provide you a better latency. Nov 24 13:23:02 s/better/lower/ Nov 24 13:24:53 there is a known bug concerning audiotrack in stream mode not playing immediatly at first .play() and a workaround too (see stackoverflow) Nov 24 13:36:35 hello guys Nov 24 13:37:52 hi Nov 24 13:41:33 E/GraphicsJNI(921): VM won't let us allocate 75240 bytes Nov 24 13:41:39 well thats sad Nov 24 13:41:42 0.07 MB Nov 24 13:43:52 arrnas, did you try with android:largeHeap="true" in your manifest (in ? Nov 24 14:03:40 Hello, is it safe to assume that my market address would be: market://details?id=com.package.name Nov 24 14:05:04 http://developer.android.com/distribute/googleplay/promote/linking.html Nov 24 14:06:16 thanks Leeds Nov 24 14:18:10 adq: nope, that didn't help Nov 24 14:19:30 ;( Nov 24 14:34:17 I'm having a problem with Swype keyboard Nov 24 14:35:01 whenever I want to enter something in my edittext and I press on the edittext, the Swype keyboard doesn't come up and the app crashes Nov 24 14:35:20 whenever I switch to Samsung keyboard as the default, it's fine Nov 24 14:35:43 consider asking in #android since it might be more active Nov 24 14:36:03 what device and os? Nov 24 14:36:55 S3, ICS Nov 24 14:37:07 do you use textwatcher on edittext? Nov 24 14:37:17 Swype works fine for all my other apps, been using it for ages, plus it works on the edittexts of all the other apps that I've developed/tested Nov 24 14:37:24 not this time, no Nov 24 14:37:37 but in another app that I was working on just 2 days ago, I did use textwatcher and it worked just fine Nov 24 14:37:50 hmm can you give logcat? Nov 24 14:38:33 Logcat has been silent since yesterday about this app Nov 24 14:38:37 let me just restart eclipse Nov 24 14:38:41 ok Nov 24 14:44:35 hmmmm, now it works? Nov 24 14:44:41 I changed nothing Nov 24 14:44:50 yeah it happens :) Nov 24 14:45:10 when it is something that suspicious that worked before.. i love to blame eclipse for it.. Nov 24 14:45:13 :) Nov 24 14:45:38 do you have any experience with widgets? Nov 24 14:45:56 not much, i created some small widgets but nothing much Nov 24 14:47:17 you created a widget with a configuration button? Nov 24 14:47:23 is that what you just said? Nov 24 14:47:25 great then! Nov 24 14:47:26 lol Nov 24 14:47:42 right! lol Nov 24 15:08:06 any suggestions for making a setSingleLine(false) advance focus when pressing enter, instead of inserting a newline? Similar to how subject fields work in the e-mail app. Nov 24 15:08:46 from reading the source code, I can see that this behaviour is supported, but only by flagging TYPE_TEXT_VARIATION_EMAIL_ADDRESS or TYPE_TEXT_VARIATION_EMAIL_SUBJECT. Seems like something that isn't very semantic future proof. Nov 24 15:15:28 is android-contrib a good target for discussing a possible patch fixing the issue I just outlined? Nov 24 15:18:56 try, augustl Nov 24 15:19:37 Hey Guys Nov 24 15:28:29 Hello world! Nov 24 15:29:01 word Nov 24 15:29:03 *world* : Hi Nov 24 15:32:20 anybody knows a good tutorial about how to stylize a listfragment? Nov 24 15:35:23 Sicp: just did :) Nov 24 15:41:38 does a KeyEvent contain the EditText view that dispatched the event in the first place? Nov 24 16:05:16 I need some bluetooth help :/ Nov 24 16:05:44 my other receivers work fine, but the one for BluetoothAdapter.ACTION_CONNECTION_STATE_CHANGED never fires Nov 24 16:06:34 it is definitely registered, right along with the working ones Nov 24 16:08:36 logcat shows 11-24 11:07:51.401: INFO/BtOppRfcommListener(31810): Accepted connectoin from 64:A7:69:C5:9A:B6 Nov 24 16:08:39 typo and all Nov 24 16:09:00 should that not trigger ACTION_CONNECTION_STATE_CHANGED? Nov 24 16:09:24 and if not, how do I trigger an event to happen when a connection is accepted? Nov 24 16:13:18 maybe you need android.permission.BLUETOOTH in the manifest? Nov 24 16:13:56 that and BLUETOOTH MANAGER maybe Nov 24 16:14:02 or BLUETOOTH ADMIN Nov 24 16:14:08 yeah Nov 24 16:14:27 i hate bluetooth! :D Nov 24 16:14:49 I have both regular and admin permissions already Nov 24 16:14:55 and it would tell me if that was the problem Nov 24 16:15:02 somewhere out there there is a n00b who added every single permission to their manifest to get around bugs Nov 24 16:15:13 everybody does Nov 24 16:15:13 root66: don't count on the system telling you about that if it is a problem Nov 24 16:15:23 god damnit, they are in there ok? Nov 24 16:15:24 sometimes it does, sometimes it doesn't Nov 24 16:15:34 calm down man Nov 24 16:15:35 hey, don't act like I car Nov 24 16:15:42 have fun bro Nov 24 16:16:42 i'll put my money on typo exists somewhere in project. Nov 24 16:17:14 haha, ok Nov 24 16:24:22 it turns out that it doesn't use the action value like most of the other received info. It uses the intent's BluetoothAdapter.EXTRA_CONNECTION_STATE extra Nov 24 16:24:50 what API level are you on? Nov 24 16:24:56 10 Nov 24 16:25:05 ah, ACTION_CONNECTION_STATE_CHANGED is >11 Nov 24 16:25:21 >= that is Nov 24 16:26:29 * adq thinks he is on root66 ignore list ;( Nov 24 16:28:49 tragic Nov 24 16:31:06 drama Nov 24 16:33:36 let's make a reality show of it Nov 24 16:43:44 adq: sorry, just read everything you said Nov 24 16:44:41 I am writing the sound to audiotrack and then lighting up the key I hit. the lighting up comes after the writing to audiotrack, yet the sound is clearly way after I hit the key Nov 24 16:45:02 so the touchscreen os only slightly responsible Nov 24 16:45:21 *is Nov 24 16:46:40 Hello. Please, I have an IntentService which is processing its request on the background. What happens when I close the main activity (and the application) which is bound to the service and start it aggain before the service manages to finish? Will be the new instance of the main activity bound to the old instance of the service or an another, new instance of the service will be created? Should I use separate process for the Nov 24 16:46:42 service for such case? Nov 24 16:47:48 blackhex: read up on what OnStartCommand returns Nov 24 16:47:57 I think there you can define what happens in such an event Nov 24 16:48:16 hey, I just ran this, and this is crazy..but here's my Logcat http://pastie.org/5428174 , so help me maybe Nov 24 16:48:32 but in case of a ForceClose, I don't know whether a service can persist Nov 24 16:48:43 if it ran on the main thread, it probably died Nov 24 16:48:53 if it had its own thread, it still might live Nov 24 16:50:17 worst case scenario, the service died, and the live thread revived it Nov 24 16:50:31 belgianguy: thanks, I'll read more about it. My question could also be reformulated to: Will application process survive if I close the main activity and open it aggain while the background service is running all the time? Nov 24 16:50:49 *or meanwhile Nov 24 16:52:12 belgianguy: I suppose that services generally run on main thread, in case of Intent service, it has its own thread for Intent processing but the core of the service still should run on the main thread, IIRC. Nov 24 16:52:45 Only onHandleIntent is in a seperate thread Nov 24 16:52:58 SimonVT: exactly what I ment Nov 24 16:53:29 blackhex, depends on how you build the service. You can open it with or without persistance. Typically, a service will survive in the background after the application is destroyed. Nov 24 16:53:36 Hi all... Does anyone know where the new Bluetooth stack lives in AOSP? Nov 24 16:53:42 SimonVT: but I suppose that when the application is close another Intent service with another separate thread is created (while the old processing thread is still running) Nov 24 16:54:35 Komak57: ok, how can I achive that the service will be persistent and different instances of the application will always be connected to the only instance of it? run it in separate process? Nov 24 16:56:09 You wouldn't usually use an IntentService for this Nov 24 16:56:15 Since it calls stopSelf once onHandleIntent returns Nov 24 16:57:07 bindService(new Intent(this, ActivityService.class), mConnection, Context.BIND_AUTO_CREATE) Nov 24 16:57:28 SimonVT: that is not a problem, service can be terminated afther the intent is processed, the problem is that the intent processing could take a while in which the gui can be destroyed and created aggain. Nov 24 16:58:07 or, simply create a never-ending thread in your service XD Nov 24 16:58:19 SimonVT: And I can't start another instance of the service while the old instance is still running Nov 24 16:59:00 bindService() returns a boolean based on its success or failure... Nov 24 17:00:51 adq: the touchscreen latency is noticeably worse on the n7, I am seeing, compared to my incredible 2 Nov 24 17:01:22 Komak57: and how is that relevant? Nov 24 17:01:27 root66, are you by chance loading the string between the on-click and on-play? Nov 24 17:03:21 loading the string? Nov 24 17:03:22 blackhex, you can create exit commands in the service, which is always an important in safely killing your app Nov 24 17:04:06 root66, i thought you were trying to load a sound.. Nov 24 17:06:55 oh, nope. it's just doing 9 equations to get the oscillator positions and writing values to the buffer as bytes Nov 24 17:07:04 Komak57: I think you does not understand my point. I know how to make service to survive main activity destroy and finish its work. I just dont know how to bind to the service that is still running (and finishing its work) from another instance of the main activity when opened aggain (or wait until it is closed before I start its another instance). Nov 24 17:08:01 blackhex, public static boolean running; Nov 24 17:08:32 in any while loops, toss in (... && running) Nov 24 17:08:54 your activity could do Service.running = false; when you wanted to kill it Nov 24 17:09:56 in threads, you can do if (!running) return; Nov 24 17:10:04 Komak57: I'm not sure about it but as far as I'm trying it the new main activity is running in another process than the old service and thus it is creating another instance of the service so I can't check any running flag because I'd be checking running flag of another instance of the service which is naturally false. Nov 24 17:11:28 what should i google for to find out what i have to hook into to execute code when the screen orientation changes from vertical to horizontal (or vice versa)? Nov 24 17:11:33 i'm using API level 8 Nov 24 17:13:02 meltingwax: onConfigurationChanged? Nov 24 17:13:49 blackhex, static service commands should work while bound or not.. Nov 24 17:14:31 as long as the service is running, a static function can help you close it down. Nov 24 17:15:19 I am writing the sound to audiotrack and then lighting up the key I hit. the lighting up comes after the writing to audiotrack, yet the sound is clearly way after I hit the key <- there are ways to have a good sync between sound event & ui even with threads. You can use .setPlaybackPositionUpdateListener (but need to be calibrated) or simply via static field (because it's really fast, avoid getter) coupled with onDraw per example and another thr Nov 24 17:15:19 ead Nov 24 17:15:23 thread* lol Nov 24 17:15:24 Komak57: OK, to explain it further: Imagine that the service is occupying Bluetooth socket while processing its jobs. When I close the main acitvity, it takes some time util the job is done and the BT socket released. When I open the application aggain, the main activity is (probably) created in another process aggain but the service from the original process is still running. Now I need to wait unitl the old service is closed Nov 24 17:15:26 before I open the new instance of it or bind and use the old intance. Nov 24 17:17:02 hello, i'm having trouble with the android emulator, i'm getting '[2012-11-24 15:04:45 - Emulator] NAND: could not write file /tmp/android-bfv/emulator-OXu6Up, No space left on device'. any suggestions about how to solve this? Nov 24 17:17:49 blackhex, I understand. I had the same issue with holding a socket open and trying to receive data (blocking action). Nov 24 17:18:22 Komak57: ok, than I don't understand what are you trying to explain me Nov 24 17:19:03 i think im misunderstanding what you want to do... you WANT the service to die, or you want to keep it alive and simply re-bind to it? Nov 24 17:19:45 Komak57: re-binding to it would be gread, but I can live with waiting unit it's terminated (the socket is closed) and starting it aggain after Nov 24 17:21:47 Komak57: now my code works that the service is finishing its work until its done while the new application instance is trying to create another instance of the service which can't create the socket because BT is supoorting only one connection at the time Nov 24 17:23:05 bfig: just guessing: is your /tmp folder writable and has any space left? do your emulator have SD card large enought mouted Nov 24 17:23:26 you can 'try' stopService(intent); and see if it kills it manually, or have 3 states... 'alive' 'processing' and 'killing'. keep it alive between uses, process rather than bind, and kill when you don't want it running anymore? Nov 24 17:23:37 blackhex, what is a large enough card? is 256 mb fine? Nov 24 17:23:50 bfig: should be Nov 24 17:23:57 also, how can i make sure /tmp is writable and has space left? Nov 24 17:24:34 Komak57: stopService() is keeping the service running or at least its processing thread Nov 24 17:25:15 Komak57: but startService() in another application instance is creating another instance of the service Nov 24 17:26:09 bfig: this is only relevant if you are developping on Linux, I'm not sure if this path refer to emulator's filesystem or host machine filesystem Nov 24 17:26:46 blackhex, and this i suppose is a problem because you can re-start the app before it's done dieing? Nov 24 17:27:00 I suppose that's better than my zombie service XD Nov 24 17:27:08 kill it and it just keeps coming back XD Nov 24 17:27:09 blackhex, this is linux development of course Nov 24 17:27:20 Komak57: yes, this is the problem when application is closed and started aggain by user quickly Nov 24 17:27:27 this refers to file system, i have a /tmp/android-bfv/ folder Nov 24 17:28:02 bfig: then df -h tells you free space on your filesystems and ls -al /tmp will tell you the permissions Nov 24 17:29:43 Komak57: that's why I was asking if runnin the service in it own process would work for this case, I haven't used this before Nov 24 17:30:05 blackhex, create a public static boolean running; turn it to true onStartCommand() and false onDestroy() Nov 24 17:30:46 this would allow you to determine if the service is alive or not Nov 24 17:30:55 Komak57: I'll try it, but I think I'll get value of this flag from another frame stack of another process - thus false Nov 24 17:32:06 http://stackoverflow.com/questions/600207/android-check-if-a-service-is-running Nov 24 17:33:00 Komak57: yes I was trying that too, this seems to work, but still does not tell me how to bind to the old instance instead of creating the new one Nov 24 17:33:33 blackhex, it seems i have only 57 mb free in /tmp... i don't understand how tmp is full :| Nov 24 17:34:19 bfig: than this will be the cause of the error Nov 24 17:37:09 your unbind should only fail if the service isn't alive, or already bound. If you closed your activity, it's no longer bound? Nov 24 17:37:11 i removed .Trash-1000 and it liberated 1 GB :| Nov 24 17:37:19 let's see if it works now Nov 24 17:37:27 yeah! :D Nov 24 17:37:32 thanks for the help Nov 24 17:38:54 Komak57: when the old application main activity is destroyed it is cleanly unbound from the service, when the new application main activity is created it is bound to a new instance of the activity, while at least processing thread of the old service is still running Nov 24 17:40:03 so you created yet another service? how? you should only be able to start one instance of each service.. Nov 24 17:41:17 Komak57: really? I'm not sure about that, I don't know how to check it, I only know that the processing thread of the old service is running while the new processing thread of the new service is created Nov 24 17:41:45 startService(intent) returns null on success, and !null on failure Nov 24 17:42:27 Komak57: can you confirm that if you close an application (while its services are running) and start it aggain both will be running in the same process with the same memory frame? Nov 24 17:43:03 After quite a bit of Googling, I've been pulling my hair out on this one. Google's documentation for their google-api-java-client is *terrible*, and none of the sample apps show anything related to Google Docs. Some of them are old and reference packages that don't even exist. Nov 24 17:43:09 Can someone point me to some sample code that shows how to read a GDocs Spreadsheet? Nov 24 17:43:14 That's all I want to do. Read a few records out of a public spreadsheet. Nov 24 17:43:48 Komak57: but startService does not fail in any case of mine Nov 24 17:44:12 Komak57: ok, you gave me some material to think about, I'll do some tests and then report to some SO thread or create a new one. Thank you a lot for your help. Nov 24 17:45:52 if (startService(intent) != null) Log.w("TAG","intent already started"); else Log.w("TAG","intent newly created"); Nov 24 17:48:17 Komak57: and what would that tell me? Nov 24 17:49:36 it's rather pointless... just tells you if the service has been created from your current activity, or a previous one Nov 24 17:49:45 Komak57: if you call serveral startService() for IntentServices the Intents are stacked to the queue and processed sequentially in the processing thread Nov 24 17:50:29 Komak57: really? not sure about that, but I'll try Nov 24 17:50:29 ugh, the xperia t9 keyboard is a PITA to deal with, it seems to be implemented in a very hacky way when it comes to key events. Impossible to get a "enter" key event for example. Nov 24 17:51:12 I wonder if it's t9's in general, or just the one on the xperia tipo Nov 24 17:51:50 -tries reading up on it- Nov 24 17:56:36 Nevermind, the new bluetooth stack is called "Bluedroid". Nov 24 17:57:30 is it a diff stack or bluez renamed Nov 24 18:04:03 does android use java SE or java ME? Nov 24 18:05:27 bfig: it's basically own implementation of Java mostly compatible with SE but not all standard libraries are supported Nov 24 18:05:47 ok, nice Nov 24 18:07:44 Question - I'm trying to capture an NDEF_DISCOVERED intent, but while I see the intent in the logs, I'm not getting it in my app. This is my AndroidManifest.xml: http://pastebin.com/GMQJBNty - what am I doing wrong? The goal is to be able to launch the application by scanning an NFC tag (for now I'm happy with just the read event launching, eventually it'll be based on the content of the tag, but for now I don't care). Nov 24 18:08:33 mdkess: have your registered broadcast receiver? Nov 24 18:09:18 Ah, no. Nov 24 18:10:41 mdkess: http://developer.android.com/reference/android/content/BroadcastReceiver.html Nov 24 18:12:30 how do I make a multi line EditText with a "done" button, in other words it removes focus and doesn't actually insert a newline? Nov 24 18:16:23 android:imeOptions="actionDone" in your xml layout, and input.setOnEditorActionListener() to listen, then btn.performClick(); to execute the button action Nov 24 18:17:11 Komak57: My guess was apparently wrong, new instance of the application's main activity IS running in the same process so the problem is elsewhere... Nov 24 18:17:45 Komak57: so this essentially allows me to have my own code get executed when return is clicked? Nov 24 18:18:51 augustl, that method would let you set the default button (pressed when you hit enter rather than a return line). though you could add your own code in the button, or before the button is clicked, or in place of the button? Nov 24 18:19:06 blackhex, again, if a thread is running while the service is being killed, it will come back like a zombie with its head cut off... Nov 24 18:19:09 Komak57: how do I add my own code for that button? Nov 24 18:19:30 Komak57: yeah, that's probably the case, checking that... Nov 24 18:20:47 augustl: android:onClick="ButtonClick" in the xml layout, and public void ButtonClick(View v) { /* your code here */ } Nov 24 18:21:12 Komak57: in the XML layout for what? Nov 24 18:21:41 ah, I should say, I meant the done button on the keyboard itself :) Nov 24 18:21:43 not a button I created myself Nov 24 18:22:06 the imeOption controls that button Nov 24 18:22:25 so instead of bnt.performClick(); you would just use your own code Nov 24 18:22:38 I did call setImeOptions(EditorInfo.IME_ACTION_DONE); on my EditText, it doesn't get a done button Nov 24 18:22:49 also not quite following you on how to make my own code execute when I click done/return/... Nov 24 18:24:21 the setImeOptions() will send the action to the OnEditorActionListener Nov 24 18:24:38 where actionId == your action Nov 24 18:24:57 Komak57: hmm the process ID and thread ID of the service "old" processing thread and the "new" processing thread are the same... Nov 24 18:25:52 blackhex, so your service never actually dies. Which means your thread never lets the service die... Nov 24 18:26:16 Komak57: yeah thats good news Nov 24 18:26:22 and ultimately means that your service is like my zombie service XD it will NEVER die Nov 24 18:26:32 even if you lop off its head, it comes right back Nov 24 18:26:42 -evil laughter- Nov 24 18:26:52 Komak57: No it means that it will be terminated after the job is done by stopSelf() Nov 24 18:27:15 Komak57: but it will survive the quick close and reopen of the application Nov 24 18:27:26 nah, just carefully plan in some kill triggers... if (hasterminationcommand) { cleanup(); return; } Nov 24 18:27:54 Komak57: which is good, now i just must to find why the bluetooth socket fails to create Nov 24 18:28:18 XD Nov 24 18:28:38 love socket errors =.= Nov 24 18:29:43 Komak57: there are other threads that handles non-blocking disconnection so they may be buggy Nov 24 18:30:42 Komak57: but that's my problem, thank you aggain for help Nov 24 18:31:03 best of luck :P i gotta try to find some clear-cut image caching solutions for my project so i can speed it up Nov 24 18:31:09 hi, I have a custom view within a ScrollView - how can I determine which part of my view is currently being shown to the user? Nov 24 18:32:10 Komak57: I was doing that too, the cashing worked fine but there was problem with displaying that images in list view, I can share you the code though? Nov 24 18:32:34 best of luck on that XD best option i have for ya is making a custom scrollview to encorporate onScrollChanged and find out where each of the child elements are etcetc Nov 24 18:32:51 that would be a life saver Nov 24 18:33:15 right now im showing the images fine, but loading the 640x480 and similar images every flippin time into memory is getting taxing XDD Nov 24 18:39:54 marsilainen, getScrollTop Nov 24 18:40:23 marsilainen, and compare that with view.getTop Nov 24 18:42:07 sorry, getScrollY() Nov 24 18:42:15 call that on the scrollView Nov 24 18:47:19 mrenouf: ah, ok, thanks Nov 24 18:56:20 hmmm, ok, so from within my custom view how can I get hold of the ScrollView that it is contained in? Nov 24 19:00:24 ah got it: ((ScrollView)getParent()).getScrollX() Nov 24 19:16:51 ok... next issue - setScrollX() requires API 14 or higher - what should I be using instead? Nov 24 19:21:35 ah, maybe I should use scrollTo() instead? Nov 24 19:22:57 hey! can i put an application to listen on a port for a external connection? Nov 24 19:25:24 snagnever: sure Nov 24 19:27:38 blackhex thx! actually, what i'm trying to accomplish is something like push messages. i've tried the Urban Airship and PushWoosh but with no success Nov 24 19:27:48 do you know the Chrome to Phone application? Nov 24 19:29:58 snagnever: what's wrong about http://developer.android.com/guide/google/gcm/index.html Nov 24 19:30:44 yes, that's what im reading now. actually i'm completely new to android development, we are in a hackathon here trying to develop the app =] Nov 24 19:30:50 thx ;]] Nov 24 19:40:30 Android noob here... does anyone know how to properly include a jar into an intellij project? It seems to add the files, but it's not letting me import any of the packages. :/ Nov 24 19:41:29 in project dependencies you need to select new library and use Jar Directories type Nov 24 19:41:32 hi Nov 24 19:41:45 i'm looking for a free way to program .NET for Android Nov 24 19:41:47 and you need to add it to lib directory Nov 24 19:41:52 is that possible? Nov 24 19:42:02 AuroraX: it is possible i guess, but useless! Nov 24 19:42:17 C# is very similar to java, so better use java which is native Nov 24 19:42:31 mbarisa: "Choose category for selected files" Nov 24 19:42:39 mbarisa: not useless, i have a DLL where i dont have its source code, and i need to use it to in Android Nov 24 19:42:42 I'm trying to include the google-api-java-client, for what it's worth. Nov 24 19:43:06 mbarisa: the other alernative is to go assembly and dismantle the dll Nov 24 19:43:11 Zarathu: what intellij version do you have? Nov 24 19:43:18 mbarisa: 11 Nov 24 19:43:21 11.1 Nov 24 19:43:57 file -> Project Structure -> module -> dependencies -> add -> project library -> attach jar Nov 24 19:44:16 Zarathu: ctrl+shift+alt+s Nov 24 19:44:42 mbarisa: I saw that stack overflow post :) Nov 24 19:45:01 AuroraX: Zarathu i tried on my intellij that just now, and it works for me.. Nov 24 19:45:01 My issue is that they're very clearly being included, but "import com.google.api" isn't resolving Nov 24 19:45:21 try to close and open intellij, it may help Nov 24 19:45:33 mbarisa: http://cl.ly/image/3E0w3k222N0f Nov 24 19:46:09 mbarisa: ? Nov 24 19:46:25 sorry.. was not for you Nov 24 19:46:36 AuroraX: i have a friend that wrote some stuff in C# for android Nov 24 19:46:56 AuroraX: have you googled it? :) Nov 24 19:47:12 mbarisa: alot, i just found references to mono for android Nov 24 19:47:15 something like this: http://blong.com/Articles/CSharpMonoDroid/MonoDroid.htm Nov 24 19:47:21 what is wrong with mono? Nov 24 19:47:26 nothing Nov 24 19:47:30 you want Visual Studio? Nov 24 19:47:48 its not full .net but in most other ways its better Nov 24 19:47:58 ron_frown: :DDDDD Nov 24 19:48:02 mbarisa: isn't that non-free? Nov 24 19:48:16 too bad jetbrains discontinued there .net ide Nov 24 19:48:23 mbarisa: http://xamarin.com/monoforandroid Nov 24 19:48:44 mbarisa: is that monodroid and this monoforandroid the samething? Nov 24 19:49:01 yeah Nov 24 19:49:38 you can use VisualStudio i guess which is great, and much better then IntelliJ and Eclipse combined :D Nov 24 19:50:14 mbarisa: "The trial version is fully functional other than being restricted to only working with the Android emulator; you cannot deploy to a physical device. Either way, the installation is straightforward:" Nov 24 19:52:34 Whatever, fuck it. I extracted the jars and added all of the source files into my src directory. Nov 24 19:52:43 Wasted time is wasted. Nov 24 19:53:47 extracted jar usually does not result in source Nov 24 19:53:51 neeevermind Nov 24 19:54:19 ron_frown: :D Nov 24 20:03:56 p_l: there ? Nov 24 20:38:27 hi, I'm trying to get some experience to put on my resume for java and someone in the java channel recommended that I write tests for github projects. I was just wondering whether tests are also used in the realm of android, and if so, is it typically junit? Nov 24 20:38:45 yes, old junit Nov 24 20:38:51 (3.x) Nov 24 20:39:41 i'm curious, why the old? Nov 24 20:39:46 i'm not sure Nov 24 20:40:15 do you know if the syntax is much different between 3 and 4? Nov 24 20:40:56 there may be some differences with annotations, etc. junit 4.11 just came out which has even more stuff Nov 24 20:41:09 (like better support for ordering tests) Nov 24 20:41:56 eindoofus: but i dont really understand the logic of that advice anyhow Nov 24 20:42:42 what do you mean? Nov 24 20:43:07 find some problem that occurs in your life, which can be solved by an app. this should be motivating and at a level which is not too difficult. then write your app, using methods of deliberate practice Nov 24 20:43:21 study examples of good java code, write, make mistakes, get feedback Nov 24 20:43:27 rinse and repeat Nov 24 20:46:03 it started with a discussion on how to get something to put on my resume. I was talking to some ruby on rails guys and they had the opprotunity to work with a client project and build from that. I on the other hand am going the Java route and there really aren't any small java projects out there for fledgling developers. Nov 24 20:46:33 all the small businesses go the php/ruby on rails route Nov 24 20:47:55 g00s: so in the java channel the guy recommended that I get experience by writing tests Nov 24 20:49:13 'putting things on your resume' is putting the cart before the horse. it doesn't sounds like intrinsic motivation. real intrinsic motivation will propel you through the difficult and frustrating parts of learning java Nov 24 20:49:39 do what you love; you will begin to love what you are great at too. its cyclical Nov 24 20:49:55 the biproduct of that then is a product that can go on guthub and be publicly viewable Nov 24 20:50:48 I'd go with Ruby on Rails but I'm learning stuff like this: http://www.cdm.depaul.edu/academics/pages/courseinfo.aspx?Subject=CSC&CatalogNbr=435 which is only usefull in areas like Java. Nov 24 20:51:11 I don't want my degree to go to waste. I might as well take advantage of what I'm learning. Nov 24 20:52:19 distributed systems doesnt have any more to do with java than ruby; you can use both for that Nov 24 20:52:54 how could it be used in the ruby world. I'm a newb to this Nov 24 20:52:58 so are you saying - that you have taken this course, and you want to demonstrate profieciency with the concepts here using java then ? Nov 24 20:54:22 i'm about to start it Nov 24 20:54:41 and I know that the class projects involve client/server java programs Nov 24 20:55:09 hi, does anyone know why ListView does not get any pressed state? Nov 24 20:55:42 I have tried to setSelector(android.R.drawable.list_selector_background) with no success Nov 24 20:56:03 sounds good. then maybe the problems discussed in class will hatch some other project that is more embellished than the demonstration type things in the curriculum. Nov 24 20:56:12 and you can run with that Nov 24 20:57:18 g00s: can of that knowledge be used in the android world? Nov 24 20:57:54 sure. you may use something like vert.x possibly in your app's service to communicate with other phones over wifi network for example Nov 24 20:58:56 g00s: could that carry over to the internet? maybe a turn-based game between phones? or is that something different? Nov 24 21:00:03 possibly, latency might be too great Nov 24 21:01:00 g00s: is there anyway to apply such knowledge in the ruby on rails world for anything practical? Nov 24 21:01:01 i doubt your prof will care over transport; unless he wants you to deal with some other extreme of latency and loss Nov 24 21:01:50 hmm, cant talk abou RoR. i'm not a web app guy Nov 24 21:03:48 g00s: think I'll just take the class and see what ideas I get out of it. Nov 24 21:04:10 sounds good Nov 24 21:04:24 g00s: thanks for you help Nov 24 21:04:28 bye Nov 24 21:04:30 np Nov 24 21:16:50 Hey there! Nov 24 21:18:00 I want to add a currency selection to my preference activity. How can I make a preference show a dialog with a scrollable list of all available currencies? Nov 24 21:18:39 Also, when directly connecting the shared preference to the preference activity, how can I verify the input data before it gets persisted? Nov 24 21:18:55 hi, does anyone know why ListView does not get any pressed state? I have tried to setSelector(android.R.drawable.list_selector_background) with no success Nov 24 21:20:22 For example, I set the money total input type to ""numberDecimal", but when the user chooses Yen as his currency, the amount of money must not contain any decimals. Nov 24 21:23:10 RedNifre: I think you want to look into InputFilter Nov 24 21:23:21 this might help: http://stackoverflow.com/questions/3349121/how-do-i-use-inputfilter-to-limit-characters-in-an-edittext-in-android Nov 24 21:23:46 Thank you, that one looks perfect. Nov 24 21:24:03 I'd also like to withdraw my other question since I already found the answer on d.android.com :) Nov 24 21:25:16 any idea why this doesn't make my keyboard show a "done" button? It's just a plain return icon. http://pastie.org/5429067 Nov 24 21:25:42 Maybe you use a keyboard that doesn't have a "done" button included? Nov 24 21:26:13 RedNifre: I do, other apps show done buttons Nov 24 21:27:10 I'm not sure, but why is it in "Unfocus"? I would have expected that you set the keyboard stuff in "Focus"? Hm. Nov 24 21:27:18 it has a "Go" button on my browser (Chrome) for example, and IME_ACTION_GO also doesn't work Nov 24 21:27:29 RedNifre: the class name you mean? Nov 24 21:27:31 that's just my name Nov 24 21:28:01 the name means "when enter is clicked, don't insert a newline" Nov 24 21:28:04 I haven't achieved that though Nov 24 21:29:50 doesn't matter if it's single or multi line either Nov 24 21:29:57 I'm missing something here. I have a ViewGroup with two ListViews children. In this ViewGroup I've overridden dispatchTouchEvent. I place a pointer on the first ListView, and start scrolling. Pointer index and id is 0. I keep the first pointer down, and place one on the second ListView and start scrolling. The down event is from pointer index/id 1, move events are from pointer id/index 0, and the Nov 24 21:29:57 up event is from pointer index/id 1. Nov 24 21:30:20 Also, why don't my ViewGroup get a chance to handle the secondary pointer? Even if it's not over the view currently handling the first pointer Nov 24 21:30:22 oh nbm, it _does_ matter if it's single or multi line. Thanks for rubberducking, now I got something to google for :) Nov 24 21:33:17 Hm, there's no ACTION_POINTER_MOVE.. That might have something to do with it Nov 24 21:34:17 Gnnnh, why is the islandic ISK currency missing on Android? (at least in the emulator) Nov 24 21:43:10 hi, does anyone know why ListView does not get any pressed state? I have tried to setSelector(android.R.drawable.list_selector_background) with no success Nov 24 21:45:50 hello I get a problem sending an adb command from my debian http://pastebin.com/jFNDk99x Nov 24 21:46:20 port 5037 is not occupied Nov 24 21:48:04 is there a "BetterEditText" or "BetterTextView" project around? :) Nov 24 21:52:03 the setSingleLine stuff is not granular enough.. It does both "auto height" and "insert newline on enter", I need just the first part Nov 24 21:56:42 you could take the source code and modify it Nov 24 21:57:57 g00s: なに? Nov 24 21:58:22 p_l: cool stuff http://www.nytimes.com/2012/11/24/science/scientists-see-advances-in-deep-learning-a-part-of-artificial-intelligence.html?pagewanted=1&_r=0 Nov 24 21:58:40 i was going to ask you if you were familiar with the newer techniques they used ... Nov 24 21:58:56 but i found the researcher's page and he has all the pdfs of his research right there Nov 24 21:59:15 nice stuff Nov 24 21:59:22 I'm not that familiar with bleeding edge Nov 24 21:59:26 maybe if I went for PhD Nov 24 21:59:56 i played around with NNs in high school, but thought for a long time they fell out of favor and have not done anything since Nov 24 22:00:27 nah, it's more like symbolic ai kinda-died Nov 24 22:01:34 seemed like svms were eating away at the typical problems used with ANNs Nov 24 22:02:06 depends what you actually want Nov 24 22:02:14 the amount of research in anns plummeted in the 90s Nov 24 22:02:15 SVM seems good at recognition work Nov 24 22:02:19 actually 80s too Nov 24 22:02:34 it was 80s, thanks to Minsky's perceptron book Nov 24 22:02:42 which partly fueled AI Winter Nov 24 22:02:43 :) Nov 24 22:03:48 90s was when "Artificial Intelligence" became a bad word outside of gamedev Nov 24 22:04:24 better not point out significance of that drools-.jar as AI etc. ;) Nov 24 22:04:40 never used drools / jess Nov 24 22:04:58 jess had weird licensing at the time Nov 24 22:05:00 Drools is Greenspun's 10th law done with Prolog Nov 24 22:05:11 heh Nov 24 22:05:22 and Jess is descendant of classic OPS5 stuff, i.e. expert systems Nov 24 22:10:27 apparently "data mining" is the new "artificial intelligence" Nov 24 22:10:52 flodin: "machine learning" (data mining is its subset) was one of the "weasel words" of AI community to get grants Nov 24 22:11:01 after the AI Winter Nov 24 22:11:07 well, some of it Nov 24 22:11:13 not all data mining counts, afaik Nov 24 22:11:19 in the 90s i recall data mining meaning something else, it was about functionality to navigate your database and follow foreign keys Nov 24 22:11:34 you would "drill down" into a value to find records it references Nov 24 22:12:52 flodin: that's the other side of data mining, where it was about connecting good-old human analysis to the complex OLAP data Nov 24 22:14:41 g00s: http://en.wikipedia.org/wiki/Deep_learning Nov 24 22:14:49 flodin: yeah Nov 24 22:15:04 http://www.scholarpedia.org/article/Deep_belief_networks Nov 24 22:15:12 sounds like it's about feeding the output of one neural net as the feature set for another neural net Nov 24 22:15:23 i feel stupid reading that Nov 24 22:15:48 hinton's class on coursera https://www.coursera.org/course/neuralnets Nov 24 22:16:04 but you'll become smarter if you do read it Nov 24 22:16:17 yeah, i find this very interesting Nov 24 22:16:24 I'd love to join one of the online classes, but... I feel so wasted after going through the day job that I can't Nov 24 22:17:52 yeah, willpower gets used up Nov 24 22:18:03 hello I get a problem sending an adb command from my debian http://pastebin.com/jFNDk99x Nov 24 22:19:05 my list items come from a database and are uniquelly identified by an id of type long. onItemSelected however has parameter of String... how do i get my long id to the onItemSelected method? Nov 24 22:21:36 hey! i want to make a service that stays on background making a HTTP request from times to times and throws an Intent depending on the data received. how would be the best way to do that? Nov 24 22:23:54 adq: re, "good sync"... I could sync the audio and visual, but the goal is to jst reduce the delay on teh audio as much as android is capable of. I have heard conflicting reports ranging from 16ms to 100+ms Nov 24 22:24:11 16 would be absolutely fine Nov 24 22:24:25 astran: are you sure you're not already running an adb server? Nov 24 22:24:48 astran: try kill-server first Nov 24 22:25:08 I think I might be getting pretty close to 20 or less, but after you mentioned the touchscreen latency I did some comparisons and found that the Nexus7 is sorely behiond even year-old devices Nov 24 22:25:12 *behind Nov 24 22:26:11 sure, no adb on ps aux | greb adb Nov 24 22:26:30 I always kil server also Nov 24 22:27:29 I make touchscreen latency under 50ms, based on the sound Nov 24 22:35:47 root66: i'm on ubuntu and never had that problem Nov 24 22:36:00 s/root66/astran Nov 24 22:42:23 heh, http://ludalex.soupwhale.com/n4checker/ Nov 24 22:42:53 flodin que veux tu dire par s/root66 ? Nov 24 22:44:06 are there APIs to show/hide the keyboard without TextViews? Nov 24 22:45:36 similar to the first responder API on IOS Nov 24 22:47:20 want to implement my own TextView due to some severe limitations Nov 24 22:48:21 augustl: I am almost certain that you can manually invoke it opening or closing Nov 24 22:48:37 I had to do it in one of the first projects I worked on but it was so long ago I don't remember what I ended up doing Nov 24 22:49:23 I had a text field that captured non-alphanumerical input and didn't want the keyboard being shown Nov 24 22:50:15 browsing through APIs, so far I haven't found anything Nov 24 22:50:59 I *think* I had to hack it by having a non visible field take focus Nov 24 22:51:19 non visible view rather Nov 24 22:51:22 a button or something Nov 24 22:51:45 InputMethodManager seems to be it Nov 24 22:51:52 InputMethodManager im = (InputMethodManager)getContext().getSystemService(Context.INPUT_METHOD_SERVICE); etc Nov 24 22:52:16 that sounds more legitimate than whatever I did Nov 24 22:52:44 :D Nov 24 22:52:54 now to figure out how to make it show a "Done" button etc.. Nov 24 22:53:28 I like the fact that everything in android so far is composed. Some things like the TextView could use some more composition for flexibility, but at least I can manually show keyboard, manually render text, etc Nov 24 22:54:22 seems like input methods (IME) is a completely separate thing as well, this bodes well :) Nov 24 23:15:28 Updated the sdk, now eclipse pretends it has never heard of android. How can I fix eclipse? Nov 24 23:16:05 eclipse doesn't find any views. Why the hell is eclipse so fragile? Nov 24 23:19:59 rm -rf eclispe/ Nov 24 23:23:16 <\monster\> hmm so I see Cursor.requery() is deprecated ..what's the proper way to update a cursor backed listview? Build a new adapter intance with new cursor? Nov 24 23:23:30 <\monster\> instance Nov 24 23:23:32 Query a new cursor, swap it Nov 24 23:27:47 <\monster\> so I don't have to experiment, how do you swap the cursor? Just overwrite existing one in the adapter and then..? Nov 24 23:29:26 CursorAdapter#changeCursor Nov 24 23:29:49 Or yeah, just change out the cursor instance in your adapter Nov 24 23:33:16 <\monster\> nice works Nov 24 23:33:17 <\monster\> thnx Nov 24 23:34:27 how can i call a findViewById() from a Service? Nov 24 23:36:43 <\monster\> you probably want to ask your activity to do that Nov 24 23:49:25 hi, not sure what i'm looking for - i need my app to do something when the phone rings? it's a home automation app and one of the things it does is lower the music volume. i'd like to lower the volume when the phone rings Nov 24 23:49:59 hjf: I expect there is a broadcast intent for that Nov 24 23:59:08 adq: re, "good sync"... I could sync the audio and visual, but the goal is to jst reduce the delay on teh audio as much as android is capable of. I have heard conflicting reports ranging from 16ms to 100+ms <--- you cannot go below the minimum buffer size (in bytes) given/returned by a method from AudioTrack Nov 24 23:59:30 this buffer size, depending your sample rate is equivalent to a latency in ms (with a trivial formula) Nov 24 23:59:55 but there are secret tricks to go lower :D Nov 25 00:00:19 not related with using ndk or opengl es where you can also go lower Nov 25 00:01:12 best i got on few devices from min buffer returned from audiotrack is 4800bytes (~54ms) as i said before Nov 25 00:01:40 but i did not try on recent devices and new OS (where i have read claim they improved a bit the latency) Nov 25 00:02:29 below 30ms is really find for most ears Nov 25 00:02:35 s/find/fine* Nov 25 00:04:40 the main problem (for me) is to feed audiotrack fast enough Nov 25 00:05:06 Hi! Nov 25 00:05:09 and this is really limiting ;( i cannot do all the dsp effects i would like Nov 25 00:05:19 Im trying to add items to a spinner, the same way I would do in HTML Nov 25 00:05:24 allowing me to define the ID Nov 25 00:05:30 but it seems that the android spinner doesnt allow me to define the id Nov 25 00:05:36 i have a sqlite table with "id" and "title", and i want to add all those to a spinner Nov 25 00:05:40 but the ids on the table arent correctly "numbered" , they may be 3 , 5,6, 8, etc Nov 25 00:05:44 how could i do this on a spinner ? or what is the correct way to do it Nov 25 00:11:21 fALSO: what does "correctly numbered" mean and why is it needed for a spinner? Nov 25 00:15:20 When using HTTPS connections, do I need to verify the certificate myself or does the Android platform somehow help me with that? Nov 25 00:16:10 yh Nov 25 00:16:28 sorry, ignore that Nov 25 00:18:38 kakazza: android will do it, but be aware that with httpclient, it is possible for you to mess things up in the configuration of the httpclient object. Nov 25 00:18:59 Mess up how? Nov 25 00:19:13 well, for example, it is entirely possible to install an ssl factory that ignores certs. Nov 25 00:19:15 Except maybe setting it to trust all certificates, including self signed. Nov 25 00:19:24 separately, but related, read this: http://android-developers.blogspot.com/2011/09/androids-http-clients.html Nov 25 00:19:40 I pretty much use the default settings. Nov 25 00:20:04 then you will be fine. you can verify this easily, as well, by pointing your code at a host you know to have a bogus or self signed cert Nov 25 00:20:11 Will do, thanks. I guess the only thing I _could_ do, to 'harden' the app would be to only trust the cert of the server? Nov 25 00:20:58 that is silly imo. Nov 25 00:21:09 it prevents you from upgrading your server's cert :) Nov 25 00:21:42 True. Thanks Nov 25 00:22:02 also, you should be advised that SSL doesn't protect any secrets you embed in your app Nov 25 00:22:14 it only protects your users from being the target of man-in-the-middle attacks Nov 25 00:22:27 I know. This is not for transfering credentials at all. It's an image upload over https. Nov 25 00:22:56 The data inside the app is not sensitive data. Nov 25 00:23:39 Otherwise I'd have to either put it somewhere safe (there's that sandboxed .data directory, right?) or encrypt it. Nov 25 00:23:39 well in general if you don't have sensitive data, then you don't want SSL. however, i may disagree with you that any image coming from the user's camera is somehow not sensitive :) Nov 25 00:24:26 kakazza: you need to remember that you have 3 entities at play in any secure system. the client, your server, and everyone in between. Nov 25 00:24:35 focus on who you are trying to protect, and from what ;) Nov 25 00:25:01 Trying to protect everyone else from the client ;p Nov 25 00:26:26 uhm? Nov 25 00:27:50 Kidding. Nov 25 00:29:34 can't be too sure what misconceptions folk have around here Nov 25 01:10:45 can anyone help me out - http://pastebin.com/g6NMAWJX Nov 25 01:11:23 line 52 - the variable this doesnt seem to work inside that spinner listener Nov 25 01:11:40 anyone willing to point me to the correct way to do it Nov 25 01:13:16 i want to populate a listview when the item of the spinner is changed Nov 25 01:26:21 <\monster\> fALSO: because this refrences the parent object ..you are inside AdapterView.OnItemSelectedListener Nov 25 01:26:50 <\monster\> try MainActivity.this Nov 25 01:40:26 anyone know anything that can just make persistence of objects a bit more pleasant with sqlite Nov 25 01:45:07 ron_frown: do you mean object graphs? Nov 25 01:45:18 not necessarily Nov 25 01:45:33 objects containing primitives are pretty easy to store Nov 25 01:45:46 I know how to write sql I just would prefer reducing work in mapping the object properties manually Nov 25 01:46:33 it shouldn't be too hard to abstract that mapping Nov 25 01:49:26 well I could knock out an ORM in no time, but I was hoping there was something super light weight in existence Nov 25 01:50:24 and if there is no need for reinventing the wheel Nov 25 01:50:25 the better Nov 25 01:59:51 Hey! i want a service that starts whenever the phone is connected to the internet. what's the right path to accomplish that? Nov 25 02:00:23 capture the broadcast intent for internet access Nov 25 02:01:12 if that isn't broadcast, then start a lightweight service on boot which listens to it. I suspect you can capture enough broadcast state change (cell/wifi), if there isn't an explicit networkmanager intent Nov 25 02:01:44 NetworkManager is where you want to start looking. Nov 25 02:03:20 ron_frown dragorn thanks! the idea is to make background service that from times to times connects to a REST server to look for data. We were going to use the GCM for that, but the network here blocks some ports Nov 25 02:03:29 we are in a hackathon Nov 25 02:03:43 If you already have a service active then it's really easy Nov 25 02:04:07 If you're trying to get initiated from an unknown run state, then you may have trouble finding broadcasts which start you up. You may not - I've always gotten there from a wifi state change Nov 25 02:05:10 dragorn actually i'm having some problems with the service. i thought that by setting the manifest it would start automatically Nov 25 02:05:14 but i dont think it is happening Nov 25 02:05:25 ive never developed for android before :S Nov 25 02:05:38 you can start on boot (permission + manifest flag) Nov 25 02:05:54 you can also start on broadcast event (manifest filter) Nov 25 02:06:10 can i do both? Nov 25 02:07:13 yes Nov 25 02:08:39 great =] Nov 25 02:08:44 this is what i have currently done https://gist.github.com/9635ebc5091891acbee5 **** ENDING LOGGING AT Sun Nov 25 02:59:59 2012