**** BEGIN LOGGING AT Mon Oct 08 02:59:58 2012 Oct 08 03:00:18 switch(v.getId()){ case R.id.button1: break; Oct 08 03:00:27 techdigy, you can do that as well Oct 08 03:00:56 its sometimes good to share handlers if there are many items which should all do very similar things Oct 08 03:01:05 ohh. I se Oct 08 03:01:32 so one OnClickHandler could be set on 20 different buttons, and you can use v.getId() to identify which button was clicked Oct 08 03:01:47 another questino. There is a setContentView in the oncreate. Can I put another in the same class? Oct 08 03:01:55 less code that writing 20 OnClickListeners Oct 08 03:02:17 setContentView will set or replace the root of your view hierarchy Oct 08 03:02:34 you normally dont call it more than once, and it should be called in onCreate Oct 08 03:03:39 is it a good habit to make a new class for every setcontentview? Oct 08 03:04:35 a new... class? I dont follow Oct 08 03:05:32 a new java class in my src folder Oct 08 03:05:36 If it's conceptually a different activity to the user, then it should be part of a new Activity Oct 08 03:06:04 it all depends on your intent Oct 08 03:10:00 mrenouf: thanks for the help! Oct 08 03:11:04 jeppy: just use the LocalActivityGroup hack Oct 08 03:11:35 ewww Oct 08 03:12:09 still way better than FragmentActivity from MapActivity Oct 08 03:12:16 *extending Oct 08 03:12:58 alright guys bedtime Oct 08 03:12:59 peace Oct 08 03:14:09 i just stopped worrying and learned to love full screen maps and preferences on all platforms ;) Oct 08 03:14:14 mrenouf: yeah I classify it as the least-bad solution Oct 08 03:14:32 we use it in our app and it works wonders though Oct 08 03:14:34 totally seamless Oct 08 03:14:54 Anyone know how to do a sqlite selection where I'm specifying one column but with multiple OR like criteria? (I am asking in sqlite but it's quieter than the edge of space in there) Oct 08 03:15:43 lasserix: you saw this, right ? http://www.sqlite.org/lang_select.html :P Oct 08 03:16:39 There's nothing about using like on that page, but thanks. Oct 08 03:16:49 JakeWharton, is that basically putting a MapActivity in a tab? Oct 08 03:17:34 sort of, it keeps two activities running at once essentially Oct 08 03:17:57 it's super lame, super gross, and it sucks that you have to do this, but it works well and reliably Oct 08 03:20:24 lasserix: so 'WHERE foo LIKE '%zzz%' OR foo LIKE '%yyy%' does not work ? Oct 08 03:20:52 lasserix: what goos said... select bar from tabel where foo=1 and zed=2 Oct 08 03:21:00 tabel? christ. table. Oct 08 03:21:22 your where clause is decoupled from your select columns Oct 08 03:22:01 Ahh thanks guys, that was it Oct 08 03:22:17 where clause decoupled exactly what I was looking to hear thanks Oct 08 03:29:48 hm. can someone explain to me how its possible my parents can check a NON-gmail account (ie. bob@notgmail.com) in gmail ? and more surprisingly (for me) is why when i login to the domain @notgmail and look into the "bob" email inbox (via cpanel).. its completely empty (while it has lots of email when checking via gmail).. Oct 08 03:30:49 someone can, but not in this channel Oct 08 03:31:28 well i like to ask questions in channels with lots of smart ppl. it sometimes works better that way ; ) Oct 08 03:31:39 not for the smart ppl Oct 08 03:33:33 gutano: all developers are happy to give all comers tech support for all apps Oct 08 03:33:45 :O Oct 08 03:33:49 not cool Oct 08 03:34:04 thumbee: are you a developer? Oct 08 03:34:11 Android app developer Oct 08 03:34:50 Leeds: i will. just not yet Oct 08 03:35:22 then you'll be welcome back here at that point... Oct 08 03:36:09 Leeds: are you a douche? you are welcome back to this world when u arent one. Oct 08 03:36:17 yup, I'm a douche Oct 08 03:37:11 "Chavez wins re-election' surprise surprise ! Oct 08 03:37:20 halp! my computer screen is blue with a bunch of cryptic white letters on it. what do i do? Oct 08 03:37:33 jeppy: smash it ! Oct 08 03:37:43 fuel and fire! Oct 08 03:45:37 so are the photography apps like hipstamatic and instagram working on raw files from the camera, or jpgs ? Oct 08 03:45:59 i'm guessing jpgs Oct 08 03:46:13 is there even an API for raw data? Oct 08 03:46:16 instagram isn't exactly an app that cares about high quality Oct 08 03:46:40 leslie: i agree, but also stuff like snapseed Oct 08 03:47:12 I'm sure the apps are working on jpgs - but one of the touted features of HTC's image processing chip in their newer phones is that it allows (presumably just the native camera app) to work on the raw image Oct 08 03:47:49 Leeds: interesting, thx Oct 08 03:49:13 i thought it was really hard to adjust white balance from jpg, that seems like a basic operation Oct 08 03:59:06 Hey all.. anyone have any experience working with jsoup on Android?.. Oct 08 03:59:58 I though all was well and good, and had been testing on 2.3.3, but on 2.1 I keep getting HttpStatusExceptions with a status of -1 -.- Oct 08 04:00:44 could you skip 2.1? Oct 08 04:01:02 Well, that's what I was thinking.. But I feel it's a tad rude ;) Oct 08 04:02:00 I'm downlading more recent avd images to test on later versions.. I guess if it works on > 2.3.3 I can deal :/ Oct 08 04:02:18 I dunno, 2.1 is nearly 3 years old now Oct 08 04:03:21 But do all users really know or care?.. The only reason i noticed is that I tried to test on my housemates phone, which is when all the problems started :/ Oct 08 04:03:53 about how old it is? Google says 2.1 is on 3.4% of phones Oct 08 04:04:17 yeah, i would have min=2.2 now, maybe even 2.3 by the holidays Oct 08 04:04:19 Hmm, I guess it's pretty safe then.. Oct 08 04:04:51 And i guess it seem to make sense.. If we keep supporting older versions it'll end up like the whole IE thinkg all over again -.- Oct 08 04:05:02 s/thinkg/thing/ Oct 08 04:08:01 yeah we need to follow good balance of updating to new os, stopping supporting old oses, and turnover rate bewteen both Oct 08 04:08:22 for example if theres new os (with sigificant changes) each 6 months, good luck getting new apps/programs for it Oct 08 04:09:07 lol, too bad i'm one of those still on froyo :/ Oct 08 04:09:20 g00s: yeah, but you're waiting for WP8 Oct 08 04:09:22 im on gingerboard. cleangb for epic Oct 08 04:10:24 nah, properly done applications, unless you have a big upset like Win8, tend to have less issues with new OS versions Oct 08 04:10:44 g00s: the camera does give raw data Oct 08 04:10:52 p_l: orly Oct 08 04:11:02 but not raw in the sense of photography raw Oct 08 04:11:11 YUV bitmap, iirc Oct 08 04:11:11 hard boiled ? Oct 08 04:11:51 p_l: yeah makes sense as android is pretty damn good (like linux in general) on old app support Oct 08 04:12:03 g00s: photography raw would require new API, and new camera drivers... and apropriate support from camera chip Oct 08 04:12:24 p_l: yeah, raw is kinda general term Oct 08 04:12:25 XXCoder: "modern" linux distro are actually pretty shitty in backwards compatibility Oct 08 04:12:44 yeah I heard about some desktop manager and breaking back supports Oct 08 04:12:53 was it gnome or unity? Oct 08 04:13:30 backwards compat chart: IBM z ,IBM i > Windows > VMS > commercial unices > linux Oct 08 04:13:49 XXCoder: if it was only that... Oct 08 04:14:01 oh well. :( Oct 08 04:14:09 what about Unix? Oct 08 04:14:36 p_l: Fun fact, I was the first person outside of IBM to run linux on Z. (well, 390, then) Oct 08 04:14:47 the usual reasons old apps don't work on newer versions in case of windows is that the overall quality of applications forms Satan's bedrock Oct 08 04:14:55 p_l: their lawyers wouldn't let them distribute the code at the time so they said to us "hey, host this stuff for us" Oct 08 04:15:05 dragorn: haha Oct 08 04:15:34 p_l: hm, just reading about YUV, it seems like its just a colorspace. is there any way to get data from the camera w/o noise and such algorithms applied ? Oct 08 04:15:49 p_l: yeah so many old windows programs needs insecurity of old windows Oct 08 04:16:51 g00s: what you get is unmodified (mostly) bitmap in at least YUV colorspace (GB added requirement for RGB, iirc). However, the reason you won't get "raw CCD" data, as used in professional photography, is because every single chip is different Oct 08 04:17:29 i guess it would be cool if the API could give you a DNG file Oct 08 04:17:38 p_l: and yeah, z compat stuff is backwards compatible for a LONG time, with a few major divergences Oct 08 04:17:47 g00s: hw in most devices isn't capable of producing the necessary data Oct 08 04:18:17 p_l: some time after the G3 processor series they dropped direct emulation of the 370 hardware and broke a few things, mostly weird-ass guest OSes under VM like MUSIC Oct 08 04:18:24 I wonder if its good idea to create new disto, one that obeys rules so even 1980s compiled programs work Oct 08 04:18:38 p_l: somewhere in the g3/g5 jump around 99/2000 Oct 08 04:18:56 dragorn: I bet the market for MUSIC wasn't big ;) Oct 08 04:19:08 p_l: Not so much. Where I worked, it was :P Oct 08 04:19:09 XXCoder: well, 1980s wouldn't be possible without emulation Oct 08 04:19:12 dragorn: haha Oct 08 04:19:23 true such ancient systems lol Oct 08 04:19:45 when did linux start anyway Oct 08 04:20:31 I know places running iirc Burroughs, and of course IBM AACS, z/TPF (KLM/AF recentl made a new system on it), I think some CICS as well Oct 08 04:20:35 XXCoder: 1991 Oct 08 04:20:44 Honestly tho linux doesn't break much release to release unless you're doing deep shit Oct 08 04:20:54 heh all way to 90s then ;) thought it was started in 1985 something. Oct 08 04:20:56 p_l: we had a 3000 drop tokenring campus until 02 or 03 Oct 08 04:21:19 p_l: The only IBM stuff I didn't have to deal with was as/400 Oct 08 04:22:31 p_l: we had a 390, a g1, a g3, a g5, a z/900, a z/9... (not all at once but usually 2 overlapping), mostly running MVS, had some cics systems on there, and a crap-ton of z linux stuff wedged in there which we didn't have the cycles or ram for Oct 08 04:22:31 p_l: they guy who designed the 555 just passed away :( Oct 08 04:22:39 yeah heard that Oct 08 04:22:56 the 555 was my gateway drug into electronics Oct 08 04:22:56 legends dying Oct 08 04:23:20 never was much into electronics (besides from basic stuff like lights) but yeah Oct 08 04:23:23 p_l: I had the touch of death, I found more bugs in ibm dasd and z/vm than anyone wanted me to ;P Oct 08 04:24:10 p_l: the best one offlined 20TB of dasd (both ess units / sharks), and 2 mainframes, during business hours. So badly the phone home feature died and it couldn't do a clean shutdown of the disks, either. Oct 08 04:24:55 somehow i have this horrible vision of them trying to run android on z now Oct 08 04:25:00 because that's the sort of awful thing they'd do Oct 08 04:25:04 speaking of old stuff Oct 08 04:25:13 dragorn: ... I bow to you Oct 08 04:25:49 heh im not that old man. oldest computer I built was 386 sx 33 mhz, none of that math coprocessor crao Oct 08 04:25:49 p_l: if you know what flash copy is... you cant' do that between 2 sharks. :P z/vm didn't know this. cause them both to eat it, and when that's where swap and nucleus lives, the world is a cold, sad place. Oct 08 04:25:55 i remember reading the schematics for the prime mainframe we had at the govt office Oct 08 04:26:03 it had some weird 59 bit address bus or something Oct 08 04:26:12 weird Oct 08 04:26:18 hrm, can the OS pause my activity when it's still active on the screen? I'm trying to do something that requires user interaction for about a minute, and it seems like i get paused in the middle of it (for a very short period of time), I want to stop what I'm doing it the user backgrounds what I'm doing (hits back or something), so right now I reset on pause...and that seems to not work...am I doing it wrong? Oct 08 04:26:28 yes Oct 08 04:26:33 e.g., phone call Oct 08 04:26:39 you can get paused at any point Oct 08 04:26:52 i found a guy online running a BBS on an apple II theo ther day. has a server conntected to internet with 7 dial up modems, an old phone-switch from a telecom company, and 7 more modems connected to the apple, so it can support 7 simultaneous users Oct 08 04:27:34 you telnet in, hit the server, it dials over one of its modems, switch connects it to a modem on the apple, n you're in. type something in and a few seconsds later you get the echo Oct 08 04:27:41 JakeWharton, yea, but in that case the phone app goes to the front and my application isn't at the front anymore, is there something else I should use to differentiate between the two? Oct 08 04:29:54 speakingcode do you have a website? Oct 08 04:30:03 For this guy? Oct 08 04:30:05 edman007: no, and you should treat them exactly the same Oct 08 04:30:21 the user could simply lock the screen too Oct 08 04:30:27 or the display times out Oct 08 04:32:15 yeah pause is pausse, regardless of cause Oct 08 04:32:44 it can happen at any time and you should assume you've left the building when it does.. more so onStop() Oct 08 04:33:15 JakeWharton, yea, but I want to know when that happens Oct 08 04:33:22 I have a question about camera with overlaid image. I have a surface view, I am going to put an image on top of it. So, after capture, I only crop the picture that is visible. The problem is that, I don't know how to do it. Any suggestion? Oct 08 04:33:55 it seems like onPause() gets called when you rotate the screen, and I want to differiante between a pause from rotating vs a pause from getting a phone call or something Oct 08 04:34:13 the activity is recreated on configuration changes Oct 08 04:34:14 onStart()/onStop() maybe? Oct 08 04:34:21 you can check isConfigChanging or something Oct 08 04:34:24 JakeWharton, during a rotate? Oct 08 04:34:51 yes, but you still should not handle it any differently Oct 08 04:37:01 JakeWharton, well I want to know if I got an onPause() because they flipped the phone upsidedown (and my activity immediatly resumed) vs they got a call and forgot about my application (when they come back to my application I don't want to assume that they put the phone upside down) Oct 08 04:37:23 what's your use case for that? Oct 08 04:39:20 I'm trying to do a fine calibrate on the accelerometers (determine scale factor error on each axis, it's noticeably wrong)...this involves flipping the phone around for a minute or two, if they navigate away from the app the accelerometer data isn't valid anymore and I want to restart, if they flip the phone, like I asked, then it is valid, however both actions seem to cause an onPause() Oct 08 04:44:13 Hi, I am new to android app development. I am following this link for android learning http://www.vogella.com/articles/Android/article.html. I am having problem with "Emulator via telnet". I can connect to telnet using "telnet localhost 5037", but whatever I try to run (say, power status full) it returns "Connection closed by foreign host" and quits by itself. What might be the problem. Oct 08 04:48:46 interesting Oct 08 04:49:15 What's the best way to handle querying a database on using keywords from an edittext's text change watcher? with a runnable and a delay / interrupt or something? Oct 08 04:49:38 lasserix: the loaders support throttling Oct 08 04:49:45 in fact, thats one of the examples ;) Oct 08 04:49:55 Could you elaborate a little? Oct 08 04:50:02 yeah: look at the example Oct 08 04:50:13 It --is-- working as is, but I'm just doing it raw with the loader Oct 08 04:50:25 Sorry, which example? Oct 08 04:50:44 (I am not using the search widget api stuff) Oct 08 04:50:57 LoaderThrottle Oct 08 04:51:07 its right here! http://developer.android.com/guide/components/loaders.html Oct 08 04:51:40 Hmm Oct 08 04:52:03 well, the link for LoaderThrottle is broken, heh. but you get the idea Oct 08 04:52:18 if i wanted my android client to update information on a mysql database (on a webserver) using php, would i have to make use of forms? Oct 08 04:52:23 So wrap the query / selection in an async loader you mean? Oct 08 04:52:57 panegyric: do you know the difference between HTTP and HTML? Oct 08 04:52:59 Thanks! Oct 08 04:53:14 yeah... Oct 08 04:53:24 why, do i not? Oct 08 04:53:37 what is the difference? Oct 08 04:53:46 hypter text markup language Oct 08 04:53:50 one ends in p and the other ends in l? Oct 08 04:53:52 http is a protocol Oct 08 04:53:55 panegyric, no, you don't, you can just send a POST straight to your PHP script, the HTML forms just define what you need to POST, but you already know that so you don't need HTML forms Oct 08 04:54:33 thanks edman007 Oct 08 04:54:38 and the socratic method fails again Oct 08 04:56:00 its tough to get help on here sometimes, i'm doing a semseter project for school, and my core curriculum is based on C++ (with no networking stuff at all) ..its tough finding anwwers online that are not scattered, or even having the right terminology to phrase the questions Oct 08 04:56:28 so Leeds.. i really think he was being more helpful Oct 08 04:56:39 by answering my question...as counterproductive as that sounds Oct 08 04:56:41 panegyric: no, he was giving you an answer, not being more helpful Oct 08 04:56:57 more helpful would be helping you learn how to solve these simple problems yourself Oct 08 04:57:09 and how's that Oct 08 04:57:45 by trying to lead you to the point where you realise yourself that forms are part of html, and you're just doing data transfer over http without html being involved Oct 08 04:58:00 or more generally, by trying to teach you how to think stuff out without having to ask every time Oct 08 04:58:19 but that's okay, I can stop trying to help you now Oct 08 04:58:59 when you dont have the background on the basics its tough Oct 08 04:59:12 this isn't the appropriate place to learn the basics Oct 08 04:59:51 maybe not on this topic Oct 08 05:00:03 but in anycase Oct 08 05:00:09 he gave me an answer Oct 08 05:05:46 -facepalm- connection re-scripted, but having a C# server-side error getting the remote ip Oct 08 05:06:12 RemoteEndPoint is returning the routers IP Oct 08 05:08:22 its fucking hard writing an app to be used holding the phone with one hand only Oct 08 05:09:03 the thumb-able area is only like 3" max Oct 08 05:09:45 lol, it's not THAT hard... Oct 08 05:09:47 psh, i can reach the whole screen with one hand Oct 08 05:09:52 amateurs Oct 08 05:09:56 what's hard, is making it designed for left handers ;) Oct 08 05:10:04 I balance my galaxy note on my fingertips and can do the whole screen Oct 08 05:10:16 hehe Oct 08 05:10:28 Komak57: agreed Oct 08 05:10:50 in my sketching app (kinda designed for galaxy note) I did a "disable back button" toolbar item Oct 08 05:11:02 it's very easy to rest your hand RIGHT there when using the s-pen Oct 08 05:11:12 then forgot about left handers who probably need the menu button disabled Oct 08 05:11:14 oh well Oct 08 05:15:58 Ahh I should leave all my logs in the code so in the future I can tell how smoothing the coding is going with the frequency of curse words appear that appear in the log strings ;p Oct 08 05:19:37 Does a service have a context? Oct 08 05:20:09 a Service *is* a Context Oct 08 05:21:14 So why an I getting an NPE? Oct 08 05:21:27 because you lied when you were a kid Oct 08 05:21:38 or because there's a Muslim in the White House Oct 08 05:21:49 or because... today is Monday Oct 08 05:22:04 lots of possible reasons, all of which could apply given the lack of (small-c) context to the question Oct 08 05:22:42 not monday here yet ;) Oct 08 05:22:58 XXCoder: then you are in the wrong place. QES Oct 08 05:23:00 QED! Oct 08 05:23:16 you just are jelious of lack of monday here :P Oct 08 05:23:29 aniasis: what I'm trying to say is... pastebin code and stacktrace Oct 08 05:24:08 XXCoder: I'm quite happy that it's already lunchtime, and I have much less Monday in front of me than you do Oct 08 05:24:20 lol nice counteragrument Oct 08 05:25:06 presumably aniasis doesn't want help, so I'm going to get lunch - toodles! Oct 08 05:25:13 later Oct 08 05:27:22 if i want to show information about a single database row, how do i best do this and keep in sync with the database? use a cursor and the contentprovider notification? is there any simpler way to do this? i want to be notified when the part of the database that is relevant to my query changes Oct 08 05:30:16 Has anyone's LogCat filter just deleted in Eclipse? Oct 08 05:30:29 Plus my ADB just keeps fucking up Oct 08 05:31:15 app and server all cleaned up ^.^ connecting externally, as well as 3G. Sounds like I'm only a short ways away from having this functionally ready for the next phases XD Oct 08 05:31:24 totally time to sleep though >_> Oct 08 05:33:17 thank you guys for all your input ^.^ Oct 08 05:36:13 how do i use a simpleCursorAdapter without a list-view? Oct 08 05:38:56 will intent.ACTION_VIEW w/ a url to an audiofile launch a media player? Oct 08 05:56:47 some cool resources here http://techcrunch.com/2012/10/07/5-ways-to-manage-app-development-on-the-android-platform-without-going-nuts/ Oct 08 05:57:01 never heard of critercism or apptentive Oct 08 05:57:13 halo all Oct 08 06:01:26 newbie here Oct 08 06:03:46 hi Oct 08 06:04:04 @maxagaz hi Oct 08 06:06:05 in my layout, I need to have: one LinearLayout (width: 40%), one other LinearLayout (width: 40%) and an ImageView (width: 20%), how should I do it ? Oct 08 06:07:24 I can't manage to get this proportion Oct 08 06:12:31 can i do something like String s = R.string.str; ? Oct 08 06:13:23 no, you need to fetch it Oct 08 06:13:37 sorry about that Oct 08 06:13:47 socket: http://developer.android.com/guide/topics/resources/accessing-resources.html Oct 08 06:13:48 my question is pretty simple Oct 08 06:14:24 thanks Leeds Oct 08 06:14:39 I'm missing a library to run my project Oct 08 06:14:48 and I can't seem to add it using Eclipse Oct 08 06:15:00 The library path is the same as the project path Oct 08 06:15:52 I've tried almost every option described in the add library section Oct 08 06:15:56 but none is working Oct 08 06:16:56 Since anyone with a rooted phone can pull my database in the assessts folder, I want to encrypt it. I realize there's no garuntee for it not to be gotten, so my question is once the application is running and the database decrypted, can it pulled from the phone during run time? Oct 08 06:22:00 h2 has built in encryption Oct 08 06:22:09 h2? Oct 08 06:22:21 dunno how the android port of that has been going though Oct 08 06:22:30 h2 database Oct 08 06:22:34 ahh hmm Oct 08 06:23:00 yeah I either was going to encrypt the whole db or just the strings and decrypt them as I need them but I imagine that'll make my cursoradapters real sluggish Oct 08 06:23:01 i thnk it uses the regular jdbc driver; they were working on a "android" db api Oct 08 06:23:40 thanks for that lead tho Oct 08 06:24:23 actually, h2 is pretty awesome Oct 08 06:25:21 I only realized I should probably do this other day so someone can't download it turn around and make a website or something, but is the process encrypt before adding to the project, then decrypt on application launch? Oct 08 06:25:37 and does the decrypted database live in the heap or something? Oct 08 06:25:47 *sorry I'm fairly in the dark Oct 08 06:26:08 never tried this with sqlite, sorry Oct 08 06:26:19 np thanks again for pointing out h2 Oct 08 06:27:09 hey if i want google maps in a fragment, how do i go about mixing a fragment activity with a maps activity? Oct 08 06:28:58 does anyone remember if they mentioned a forthcoming solution to that at 2012 i/o? elegant solution, that is Oct 08 06:29:08 i thought they said they were working on it Oct 08 06:30:45 The last thing preventing me from building my project: The import android.graphics.SurfaceTexture cannot be resolved Oct 08 06:30:49 how do i set a thme for dialog fragments? am I being simple, or is there no XML way to do this Oct 08 06:31:09 All the other Android imports work just fine. How is this one different? Oct 08 06:32:48 dokma: what API level are you building for? Oct 08 06:32:57 I tried 2.2 and 2.3.3 Oct 08 06:33:37 SurfaceTexture is API 11 Oct 08 06:33:49 i.e. 3.X+ Oct 08 06:33:54 ohhh... how did you find this out? Oct 08 06:34:15 you go to the appropriate page in the docs and read the thing which says "Since: API Level 11" Oct 08 06:34:27 read. the. fucking. manual. Oct 08 06:35:10 Leeds: well that's why I asked, so I can do it my self. You don't have to pretend you're perfect. We all know you are. Oct 08 06:35:39 I'm pretty close to perfect... but I genuinely don't understand why so many people are unable to look up the simplest things in the docs Oct 08 06:36:04 maybee because I started this a few days ago and know close to nothing Oct 08 06:36:35 and that stops you from using the search engine on d.android.com? is it locked until you've been registered for a week or something? Oct 08 06:36:53 Leeds: he do need to know where resources is. :) Oct 08 06:36:56 "Know close to nothing" also means I don't know what to look for or where Oct 08 06:37:06 thus the: "how did you find this out" Oct 08 06:37:15 so I can learn the elementaries and not ask the next time Oct 08 06:37:58 and yes, when I selected the 3.0 API now it builds without any errors... Oct 08 06:38:09 so thank you Oct 08 06:38:26 android api level 3? Oct 08 06:38:33 yes Oct 08 06:38:46 isnt lower the #, older version it is? Oct 08 06:38:56 Android 3 is API 11 Oct 08 06:39:08 http://developer.android.com/guide/topics/manifest/uses-sdk-element.html Oct 08 06:39:11 aha android 3 not android api 3 :P Oct 08 06:39:12 oh look, more docs Oct 08 06:40:30 ok, thanks Oct 08 06:41:05 dokma: seriously, the single most useful skill you need is the ability to read the docs... Oct 08 06:41:10 the thing you see Leeds is that when you are a total newbie it sometimes takes a few hours to figure out one very basic thing on your own Oct 08 06:41:28 in these cases this thing called "asking the more experience in a polite manner" comes in handy Oct 08 06:41:46 thus IRC, whoa... such a surprise Oct 08 06:42:11 so now I can read the docs cause I know what to look for Oct 08 07:01:25 When is onTextChanged start parameter ever not 0? Oct 08 07:02:56 any suggestion for a simple orm solution for android ? Oct 08 07:04:13 hello, I have an image with a hole, then I want to show the camera preview within the hole. How can I make this layout? I also want to capture that camera preview as well. Oct 08 07:09:27 edwinkcw: did you try a FrameLayout ? Oct 08 07:10:21 "Huawei and ZTE pose national security risk according to US Congressional report" , heh Oct 08 07:10:39 codebutler: but the problem is that how can I crop the final image? Oct 08 07:10:54 oh, I see Oct 08 07:11:25 I need to know the position and the size of the hole, but it maybe enlarge or shrink depending on the screen size Oct 08 07:13:44 it may be possible to "screenshot" the view http://androidfragments.blogspot.com/2012/02/in-app-screenshots.html I am not sure how the camera preview is composited though... Oct 08 07:14:05 ... alternatively if you draw the circle yourself, you should be able to use the same path as a mask later on ... Oct 08 07:19:18 during runtime the app crashes on System.loadLibrary("mixed_sample") Oct 08 07:20:02 I do have ./libs/armeabi-v7a/libmixed_sample.so Oct 08 07:20:11 and it does end up in the apk Oct 08 07:20:27 so it should be found when the device tries to run the app Oct 08 07:20:36 am I missing something obvious again? Oct 08 07:22:13 best tuts for nubcakes? Oct 08 07:22:21 * kv1 isnt mirin any in the topic =( Oct 08 07:23:47 books Oct 08 07:24:09 books srsly? Oct 08 07:24:30 well for peopel coming with background in other languages Oct 08 07:24:32 sure, the bets resource to bring background knowledge to you Oct 08 07:24:54 even more when you have no experience in programming whatsoever Oct 08 07:24:54 *best Oct 08 07:25:21 Then you will need a more wholistic approach to android and to learning what it is, how it functions and what you can do to program apps Oct 08 07:25:40 any short books theb =p lol ? Oct 08 07:25:45 then* Oct 08 07:26:34 you cant learn android and try to head for the shortest way possible, if you have no background knowledge Oct 08 07:27:14 i come from iOS dev, and php, js Oct 08 07:27:27 what kind of background knowledge is necessary though? Oct 08 07:27:47 as in, the operating system in general? Oct 08 07:28:09 java most of all, but iOS development helps with understanding how mobile devices work and basically all mobile devices share some ground principles for applications Oct 08 07:30:19 ah ok Oct 08 07:30:32 what are some of the books you recommend then? Oct 08 07:30:57 If you have the possibility I recommend learning java before learning android Oct 08 07:31:05 you can skip most of java though if you're willing to use the NDK with C/C++ Oct 08 07:31:34 depends on the type of app though. some things are not easy from native code Oct 08 07:31:47 (yet) Oct 08 07:31:48 i'd rather use java thought because most of the stack overflow questions pertain to java development on the sdk lol Oct 08 07:32:03 though* Oct 08 07:32:15 any good books for java? Oct 08 07:32:18 eh Oct 08 07:32:26 wait I'll find the amazon link to the one I like Oct 08 07:32:27 not java, but the adndoird sdk specifically Oct 08 07:32:37 oh thx so much ! Oct 08 07:33:18 if you wait a few days there'll be the second edition of http://www.amazon.com/Programming-Android-Generation-Mobile-Devices/dp/1449316646/ref=sr_1_2?ie=UTF8&qid=1349681560&sr=8-2&keywords=Programming+Android Oct 08 07:33:28 if you need to start today, take the first one. its not bad either Oct 08 07:33:50 just start with the tutorials / setting up the build env Oct 08 07:33:52 It starts by brushing up the java skills you need for android development and then advances into programming android stuff Oct 08 07:34:14 kv1: the best way is to simply make a few simple projects, code them all up Oct 08 07:34:41 are the official android tuts the best then? Oct 08 07:34:52 ill get the book Oct 08 07:34:54 I found it hard to grasp new concepts (especially ones so big as android) without background knowledge on how stuff works Oct 08 07:34:59 yeah there are kv1 Oct 08 07:35:05 from the android team directly Oct 08 07:35:10 ah ok Oct 08 07:35:13 well Oct 08 07:35:16 example stuff that is Oct 08 07:35:20 which you can program Oct 08 07:35:56 https://developer.android.com/training/basics/firstapp/index.html Oct 08 07:36:03 maybe thats a good start for you Oct 08 07:36:21 <[deXter]> DashCC, How would you compare that book with Professional Android Development from Wrox? Oct 08 07:36:46 havent read the one from Wrox Oct 08 07:36:50 <[deXter]> ah Oct 08 07:36:53 :/ Oct 08 07:38:09 thx a lot guys! Oct 08 07:38:17 (and gals) Oct 08 07:42:05 Still the app crashes on System.loadLibrary("mixed_sample") Oct 08 07:42:21 can't figure out how to make the app find the library in the libs folder.... Oct 08 07:42:30 is there something I need to do in eclipse? Oct 08 07:44:14 dokma: did you invoke ndk-build? Oct 08 07:44:23 yes Oct 08 07:44:36 eclipse invokes it every time I build the project Oct 08 07:45:19 and the mentioned library libmixed_sample.so ends up in the libs/armeabi-v7a/ folder Oct 08 07:45:31 but during the runtime the app cannot load it.... Oct 08 07:49:14 dokma: does your library have other dependencies? Oct 08 07:49:55 hmm... not sure... it's tutorial-4-mixed from opencv Oct 08 07:50:10 heller: any way to see this? Oct 08 07:50:47 dokma: do you have a link to that? Oct 08 07:51:11 it is found in opencv source tree Oct 08 07:51:24 just download the opencv package Oct 08 07:51:38 i don't want to ... Oct 08 07:52:03 dokma: please paste your Android.mk and your java code that loads the libraries Oct 08 07:52:36 the code is System.loadLibrary("mixed_sample"); Oct 08 07:53:35 Android.mk: http://pastebin.com/8rQ5bWkW Oct 08 07:54:12 this is what happens: http://pastebin.com/eJxJBkue Oct 08 07:55:22 10-08 09:41:21.536: E/AndroidRuntime(2673): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1318]: 133 cannot locate '__gcc_personality_v0'... Oct 08 07:55:40 ahhhh... Oct 08 07:55:46 so there is another library Oct 08 07:55:52 you probably need to add some kind of different c++ library Oct 08 07:56:33 I'm on it! Oct 08 07:56:36 thank you! Oct 08 07:57:00 dokma: APP_STL:=gnustl_static APP_CPPFLAGS:=-frtti -fexceptions in your Application.mk Oct 08 07:57:25 heller: what about it? Oct 08 07:57:33 you need to have that. Oct 08 07:57:57 heller: does it matter where I put it? Oct 08 07:58:23 in your Application.mk Oct 08 07:59:18 it's already there Oct 08 07:59:29 and APP_ABI := armeabi-v7a Oct 08 08:22:36 sigh. I wish there was a way to publish an app via Play to rooted phones only Oct 08 08:22:42 hi there! need some help to capture a package delete event in a BroadcastReceiver implementation Oct 08 08:29:43 Ge0rG, you can just say your app requires root, and if anyone without it installs it, well, it's their problem Oct 08 08:33:34 I find it VERY hard to find headers ("import foo.bar.baz.blap.blop.....AdapterView"). They are typically not in the documentation :( Oct 08 08:35:05 is there a system in this? I need the spinner onitemchangedlistener, but it is appearently not part of android.widget.Spinner :$ Oct 08 08:35:13 and where is AdaptorView??? Oct 08 08:41:07 alund: look below the header in the docs: AdapterView extends ViewGroup, below that Oct 08 08:41:12 http://developer.android.com/reference/android/widget/AdapterView.html Oct 08 08:44:43 hi. is there any special code that has to be done/written to make the application a paid version? Oct 08 08:48:03 superlinux-hp, no Oct 08 08:48:31 lut4rp, so i just post that project package and that's it Oct 08 08:48:35 isn't? Oct 08 08:49:04 superlinux-hp, yes. Paid or not is decided on the Play Store console. Oct 08 08:49:16 Of course, you need to reside in one of the supported merchant countries. Oct 08 08:49:26 ah ok Oct 08 08:49:38 lut4rp, thanks Oct 08 08:49:49 np Oct 08 08:51:42 Hi, I have problem with my emulator. I want to play hls stream but can't see video while playing only audio on emulator. On real device both work fine. any suggestions? Oct 08 08:55:27 doc_savage: ty :) Oct 08 08:55:32 alund, what are you writing in? Oct 08 08:55:56 alex_PP: java/english/eclipse/denmark Oct 08 08:56:14 try Adapt then pres ctrl+space Oct 08 08:56:24 iy should auto complete the class name and add the imports for you Oct 08 08:56:26 i'm just not very experienced with java Oct 08 08:56:32 *it Oct 08 08:56:37 *press Oct 08 08:58:46 about xml, why is it layout_width but paddingRight?? why _ in one case and uppercase in the other? Oct 08 08:58:49 or, ctrl+shift+o to organise your imports for you and ask about any ambiguous ones Oct 08 08:58:54 can i do something like a debug statement that will show up in eclipse? Oct 08 08:59:26 ecraven, the layout_ params change depending on the parent Oct 08 08:59:47 alund, like Log.d(tag, message); Oct 08 08:59:48 ? Oct 08 09:00:55 alex_PP: sounds right :) Oct 08 09:02:20 but what would the tag thingy be? Oct 08 09:03:59 hm, and i probably need to import Log from somewhere? Oct 08 09:05:00 this is weird. string in resource folders string.xml file is not found via getString(R.string...) eventhough xml file complains no errors Oct 08 09:05:13 tneva82: clean project! Oct 08 09:05:52 alund, tag can be anything Oct 08 09:07:09 a string? "mytag", "mymessage"? Oct 08 09:07:13 yeah Oct 08 09:07:20 ty :) Oct 08 09:07:31 then you can see them in the Logcat view in eclipse Oct 08 09:07:51 and filter by the tag, as loads of crap comes out in there Oct 08 09:10:46 Hi, I am new to android. I am creating an app, the main activity has a button, on clicking that button it will start a new activity. But while I deploy the app I see there are two icons for the two activities. I want the icon only for the main app. Oct 08 09:11:16 really ;_; no one can give me tips on having google maps in fragments ;_; Oct 08 09:14:24 #join java Oct 08 09:18:28 Well this is a java question, but maybe someone knows... how can i get the intersection of the elements of the arrays in an ArrayList object? Oct 08 09:19:17 lasserix you want subset of two arrays? Oct 08 09:19:34 umm yeah Oct 08 09:20:20 ie mInts.get(1) wil have the array { 1, 2, 3} and mInts(2) will have the array {1, 2} and I want an array that contains {1,2} Oct 08 09:22:25 copied the same project into a new project . then, i renamed the new project package using refactor in eclipse. the manifest was updated , then the main activity stopped running. it says class not found , although it's there. what should i do? Oct 08 09:26:24 lasserix: here's a simple method Oct 08 09:26:43 start with your 'result' array as the first array in mInts Oct 08 09:27:14 lasserix here you go http://stackoverflow.com/questions/5283047/intersection-union-of-arraylists-in-java Oct 08 09:27:29 advance to the next array in mInts, and remove from 'result' any element not in the next mInts array Oct 08 09:27:31 repeat Oct 08 09:28:03 yeah I am kinda doing that now let me see if it works Oct 08 09:28:06 thanks both of you Oct 08 09:28:29 dark_element: that's for shallow lists, his issue is slightly more complicated Oct 08 09:28:50 hehe Oct 08 09:29:17 lasserix is list of objects? Oct 08 09:29:19 or maps? Oct 08 09:29:23 arrays Oct 08 09:29:29 ahh k Oct 08 09:29:35 arrays of ints Oct 08 09:29:53 sampullman yeah basically i convert the first arraylist array into a arraylist int, then use a for loop to convert subsequent arrays in the arraylist to arraylist ints and use retain all Oct 08 09:30:00 *or in the process thereof Oct 08 09:30:43 sampullman hmm i don't see how lasserix problem is not same as the so link Oct 08 09:30:51 sampullman lasserix missing something here? Oct 08 09:31:26 I'm starting off with an ArrayList of arrays Oct 08 09:32:06 so I have to iterate over an original arraylist of arrays not just arraylist of some objects, ie through the array elements themselves, not just the arrays Oct 08 09:32:22 *in the list Oct 08 09:32:23 here's a naive, simple way to do it Oct 08 09:32:25 http://pastebin.com/Gbxx32cK Oct 08 09:33:19 dark_element: it's a more general case of the answer on so Oct 08 09:33:33 sampullman ahh that's concise thanks! Oct 08 09:33:38 sampullman checking your solution makes it clear Oct 08 09:33:56 not only can I use this but it is good example for future coding thanks again Oct 08 09:34:26 lasserix: if it's a performance sensitive part of your code you might want a more efficient solution Oct 08 09:34:55 also, note that it will break if mInts is empty Oct 08 09:35:19 mInts is supposed to be of type ArrayList right? Oct 08 09:35:42 that's what you said, right? Oct 08 09:35:46 yeah Oct 08 09:35:48 my code assumes it is, yes Oct 08 09:36:00 okay just haven't used arraylists much yet, thanks Oct 08 09:37:37 Can you give me a hint on how to make it more efficient? Oct 08 09:38:11 Ironically this is right in the heart of the slowest part of my code (cursor querying on like x% statements ;p ) Oct 08 09:38:40 that's a decent interview question, actually Oct 08 09:38:49 hehe Oct 08 09:39:11 cool itll give me something to consider while I'm idling Oct 08 09:39:24 I'm developing a P2P app, but I need to run the networking on a different thread Oct 08 09:39:37 and AsyncTask isn't meant to do long-standing operations Oct 08 09:39:41 the inefficiency stems from having to create a new arraylist for each array in mInts Oct 08 09:39:57 ahh yeah Oct 08 09:40:06 I should probably take a break been at it for almost 10 hours now Oct 08 09:40:06 is it considered bad to have a Thread with a while(!shutdown) ? Oct 08 09:40:16 a better way would be to initialize result as a Set (HashSet, probably) Oct 08 09:40:55 could someone tell me whats the difference between the same classes that are in the andoird.app and android.support.v4.app packages Oct 08 09:41:26 hmm ill have to run some benchmarks for the fun of it and see what I can come up with, thanks again sampullman Oct 08 09:41:34 balls2thewall: the support package can be packaged witht he application and distributed to devices that do not have them Oct 08 09:41:44 the android.app stuff must be in the system to begin with Oct 08 09:42:00 belgianguy: what do you mean "bad" Oct 08 09:42:12 ic, ty Oct 08 09:42:29 sampullman: as in not the way it should be done Oct 08 09:42:39 or resource intensive Oct 08 09:43:37 most tutorials focus on AsyncTask, but those are not applicable in P2P, where each peer has to listen for new messages Oct 08 09:43:51 it's no more resource intensive than an AsyncTask with a while(!shutdown) in the doInBackground method Oct 08 09:44:20 an asynctask is just a thread with some abstractions Oct 08 09:44:44 ah, so it's not forbidden to do long running tasks in AsyncTask? Oct 08 09:45:02 belgianguy: service Oct 08 09:45:34 ^ Oct 08 09:45:45 it's not forbidden, but it's bad practice Oct 08 09:46:05 what if your app gets killed? etc.. Oct 08 09:46:34 true, that might cause issues Oct 08 09:47:53 oh hey sampullman is there something else I need to add to the constructor? it says ArrayList result = new ArrayList(mInts.get())); is undefined since int != int[] Oct 08 09:48:15 mInts.get(0), right? Oct 08 09:48:29 yeah Oct 08 09:49:15 i didn't test the code, but i thought you could instantiate an arraylist from an array Oct 08 09:49:41 do: new ArrayList(Arrays.asList(mInts.get(0))) Oct 08 09:49:44 there is probably some way, just checking i wasn't mistypign Oct 08 09:51:55 hi all Oct 08 09:52:08 anyone around to help me out with something? Oct 08 09:53:08 RichardS: don't ask to ask... how can anyone know if they can help unless they know what you need help with? Oct 08 09:53:13 hi Oct 08 09:53:15 sorry :) Oct 08 09:53:29 :D Oct 08 09:53:46 ask RichardS ... Oct 08 09:54:36 ok here goes, I want to create a view which has an image which can be drawn on. once the user raises his finger the path drawn must be made into its own object which can be touched again and given a value (so if you draw a shape, the shape gets turned into something you can touch and not just part of the edited bitmap) if that makes sense Oct 08 09:55:11 and i have no idea about how to make the object, i dont even have an idea what type it should be? PathDrawable? ShapeDrawable? Oct 08 09:55:29 I suspect it should be an array of pointer locations... Oct 08 09:55:39 yeh i have that Oct 08 09:55:49 i have an array of paths Oct 08 09:56:13 which gets added to every touchdown or touchmove Oct 08 09:56:38 but how do i turn that array into an object and place it at the same position it was at when drawn Oct 08 10:00:45 RichardS: I guess you have an imageview and then maybe a surfaceview on top of it which is transparent and captures the touches, turns them into something it knows how to draw as overlay. Once completed, I guess you stop collecting new points and instead adjust the position of that layer on screen Oct 08 10:01:30 I have an imageview then a custom canvas i made (which holds an x y grid) Oct 08 10:01:41 the canvas grid takes the touch input Oct 08 10:02:10 but my issue is this, what kind of object do i make from the point array? Oct 08 10:02:38 a Path, perhaps, if I remember correctly. Oct 08 10:02:50 I should have it in one project, lemme look Oct 08 10:03:18 cool thanks, but i didnt think a pth could be touched afterwards? Oct 08 10:03:25 it had to have a paint applied to it Oct 08 10:03:31 for it to become anything substantial Oct 08 10:03:54 I have no idea what you mean. Path can't be touched, it's a programmatic construct for drawing line segments or such Oct 08 10:04:03 exactly Oct 08 10:04:07 i have that bit down Oct 08 10:04:15 i now need something i can touch "from" the path Oct 08 10:04:19 you're getting too mixed up with your own data and Android's graphical types Oct 08 10:04:35 yeah I think you are asking how to move the Path later Oct 08 10:04:44 which is what lead me hear to talk to people about it Leeds :) Oct 08 10:04:48 well you need to determine if the touch lands close to any existing Path and move it, I guess Oct 08 10:05:03 alankila thats one option yes, but at the moment i want to be able to touch the painted path and assign it a value Oct 08 10:05:16 the statement as you describe it means nothing to me. Oct 08 10:05:36 you probably want to make a class which describes the user-drawn path Oct 08 10:05:54 it has things like offsetX, offsetY, maybe Paint, then of course the coordinate array, perhaps just a List Oct 08 10:05:54 yes, this is what i meant when i said i need an object Oct 08 10:06:33 and method like "isTouchedAt(int x, int y)" which calculates if the touch lands close to the path described by the List Oct 08 10:07:10 when you draw you iterate over all such objects and just draw them in sequence, move to offsetX, offsetY, then canvas.drawPath(path), etc. Oct 08 10:07:27 this sound anything like what you might need? Oct 08 10:07:44 a little, although i'm still a little confused about it Oct 08 10:09:15 I think ill try and create that class and see if I can get it to work like you say Oct 08 10:09:17 thanks :) Oct 08 10:10:02 yeah the idea is that when isTouchedAt(x, y) returns true, then you decide that the touch that begins was intended to move the path, and you just change the offsetX/offsetY values to move the path underneath the finger Oct 08 10:11:21 if user moves finger left by 20 pixels, offsetX will decrease by 20. Then if user raises finger and puts it down again, the isTouchedAt must of course notice the new offset it has, to determine if that finger lands on the new position of the Path. I don't think this is a fully clean design, or even very efficient, but I guess it's sort of workable Oct 08 10:11:32 I'm not wanting to move it though Oct 08 10:11:49 really? I thought that is what you wanted. What is the purpose of the touch sensitivity then? Oct 08 10:11:53 I just want to detect if its touched, then i have a dialog to asign it a value Oct 08 10:12:01 what is the meaning of the value? Oct 08 10:12:06 the pain value Oct 08 10:12:11 pain value? Oct 08 10:12:13 its a clinical tool Oct 08 10:12:17 Oh. Oct 08 10:12:23 the user draws on a representation of themself Oct 08 10:12:27 where the pain is Oct 08 10:12:33 as in "tell me where it hurts"? Oct 08 10:12:34 then clicks the area and gives it a value Oct 08 10:12:38 yeh Oct 08 10:12:42 ok, so scratch the talk about offsetX/offsetY, then. You don't need that. You still need the isTouchedAt in some form. Oct 08 10:13:24 there are multiple ways to try to approach the problem. You will probably get dense point arrays when you track the movement so you don't need to treat the point array as sort of line segment array, you can just calculate if the finger is close to any of the control points for this. Oct 08 10:14:48 I'm not sure you want to assign the whole path some pain value though Oct 08 10:15:04 I mean, what if user draws a simpistic representation of the whole body in one path? Oct 08 10:15:11 presumably just for a segment of the path Oct 08 10:15:15 nono Oct 08 10:15:15 or is the body predrawn and user is simply asked to circle regions or something? Oct 08 10:15:26 they have in image of a body, or a body part Oct 08 10:15:32 then they draw on it Oct 08 10:15:37 so i have a back ground imageview Oct 08 10:15:42 and an overlay canvas Oct 08 10:15:45 okay, so they draw the pained region only. Good. Oct 08 10:15:55 which im still working on getting to scale but thats another issue ;D Oct 08 10:16:04 correct, read only Oct 08 10:16:43 I think the talk here still assumes that users are competent enough to draw it in one single path. It's the only thing I worry about. Oct 08 10:17:13 so I could have something like a commit button Oct 08 10:17:16 maybe the paths should be closed, or users must be required to make the first and last point of the path land close by for the software to accept the path, or something. *shrug* Oct 08 10:17:25 when pressed commits this drawn "area" as a pain area Oct 08 10:18:20 yeah it might be nice idea: "mark a pain area (with as many touches as you need)", "press button to indicate subjective pain level", if multiple different pain areas, then do this for each of them. You change paint color each time user commits. Oct 08 10:18:25 ok now i fixed it and it works almost fine after renaming the project and package. but i found that there is a class giving me a null pointer exception Oct 08 10:19:21 this activity class used to work before renaming. i have not touched the code by any means. so what should i do? Oct 08 10:19:24 I still think people wouldn't be able to give exact information like "on my left shoulder I have pain 2, but then 5 cm underneath that pain 3." To describe it is a kind of challenge. Possible, but it's hard to think of the optimal UI. Oct 08 10:19:42 so, getting back to my origional problem. I need to make a class (which extends nothing) and holds a List(Int[]) of all the points? Oct 08 10:20:10 alankila: yeh, i've been having problems with it, but the physios im working with assure me that the patiants can use something like this Oct 08 10:20:18 if users could be relied to draw everything in a single stroke, it would be possible to treat the path with a paint value, but I don't think they can. So I really think it has to have modes: mark pain area, give pain value, mark another pain area, etc. Oct 08 10:21:08 RichardS: the List is a possibility. Feel free to make List if you care, with just two values inside each Coordinate Oct 08 10:22:34 RichardS: it would also be possible to calculate the average coordinate of the path user drew, and draw a kind of line that connects it to a label, lay it out such that it's clearly separate from the user drawing and make it clickable Oct 08 10:22:43 ok I think i get it now :) Oct 08 10:22:48 i think! Oct 08 10:23:10 it would also be possible to classify the drawings such that if they overlap they don't get treated separately, which allows user to draw pained region in multiple strokes. Oct 08 10:24:39 but then dont you have to calculate paint size? in that the points may not overlap but if the paint size is 15 then they paint may Oct 08 10:25:10 RichardS: don't allow user to control paint size, and just use a constant for determining overlap, or simply use some tool to calculate intersection of infinitely thin lines. Oct 08 10:26:52 I imagine I'd try to use a Set to determine overlap. Just give it some granularity like a hash bucket for every 10x10 pixel on the screen (for paint size of 10 pixels) and then put all the points in the two drawings in the buckets and if any fall in the same buckets, determine that they overlapped. Might work. Lazy as hell. Oct 08 10:27:00 if they cant control the pen size i may have them have to draw a circle Oct 08 10:28:22 is there real value for allowing user to control the stroke width? Oct 08 10:28:37 if they are meant to indicate an area, there's an argument for closing whatever path they draw Oct 08 10:29:20 but then again if they draw something like C-shaped curve indicating that the pain is on such a curve, it might be an error to close it. IDK. I'm running out of ideas and can't really decide one way or other Oct 08 10:29:42 hey how to get current date and time formated so that it follows 2012-10-08 09:52:42.254637+03 format? Oct 08 10:29:54 well the origional idea was to let the user control pen size as in real life with the paper version (the user has 3 choices , small, med and large and then shades in the area which what they wish) Oct 08 10:30:01 tneva82: use SimpleDateFormat Oct 08 10:30:04 alankila: my problem entirely :) Oct 08 10:30:18 I think ill stick with the simple path for now Oct 08 10:30:29 tneva82: the format is something like yyyy-MM-dd HH:mm:ss.SSSSZZ but I'm not sure of the SSS and ZZ parts, sadly, you have to solve them yourself Oct 08 10:30:32 then see how it works in trials Oct 08 10:30:52 tneva82: also the limit of resolution of java timestamps is milliseconds, so you don't get 6 numbers here, just 3 Oct 08 10:31:09 but thanks :) you've been a huge help. gonna lurk for a bit Oct 08 10:32:15 RichardS: yeah the reality is that we can't really decide from sitting on our chairs what the users will find easiest to use Oct 08 10:32:36 yeps Oct 08 10:32:48 and you have to cater to the technologically illiterate people who have never used computer and aren't even familiar with touch usage. They might just tap to indicate a pain region, their hands might shake, etc. Oct 08 10:33:52 UI should assume very, very little about the capabilities of the user in a medical setting. Oct 08 10:33:55 yeh ive already got a clear screen, and weve gotten a pen for the tablet also to try to keep it as close to the analoge version as possible Oct 08 10:36:17 in any case I'd look into merging overlapping paths, and I'd draw with fairly thin paint, and not close the path, and try to be smart about when user indicates the pain level. It's going to be interpreted by humans anyway so it doesn't need to be computer readable with all the paths connected correctly. Oct 08 10:37:19 and there might be an argument for closing the path if the start and end points are very close relative to the total bounding box of the drawing. Oct 08 10:37:34 thanks :) i'll keep that in mind Oct 08 10:37:36 they wont be Oct 08 10:37:36 that indicates that user probably drew an area, so you might want to consider trying to detect this case. Oct 08 10:37:51 the images are large, and even the zoomed in ones have a white border Oct 08 10:38:03 ah i see what you mean Oct 08 10:38:28 so something like if end point < 10px away from start point : join Oct 08 10:39:02 something like that. I'd use % of the start-end point distance relative to the total size of the drawing Oct 08 10:39:15 but that might be over-engineering it Oct 08 10:39:41 yeh i want something simple to start Oct 08 10:40:22 the bounding box would in fact be the diagonal length of the box, that's a single value Oct 08 10:43:41 please someone help me. after renaming the package everything works fine but one activity is not. i get this : 10-08 12:31:14.765: W/ResourceType(18951): No package identifier when getting value for resource number 0x00000000 . Oct 08 10:44:09 i think there is somethung in mypackage.R Oct 08 10:46:00 try to clean your project Oct 08 10:49:02 suggestion for a good ORM for android ? Oct 08 10:49:23 ormlite.com Oct 08 10:49:48 free ? Oct 08 10:50:32 I wonder if ormlite can be combined with simple xml for direct conversion from webservice to local storage Oct 08 10:50:38 I wonder how lite it is. A little bit of dynamic programming allows you to map objects to sql inserts and to fetch object by a select * and store all the columns in object properties whose names match Oct 08 10:50:54 it's not a whole lot of code, although it won't be pretty Oct 08 10:51:03 bummer. damn gps/network location feature seems to be VERY dependant on where you are in just whether you can get any sort of location data Oct 08 10:51:17 My phone's been looking either network or gps location for 5 minutes without fix :-/ Oct 08 10:51:35 I've sort of thought that I'd like to personally use such "ORMLite" even on full java side, because the java ORM solutions are all so damnably heavy and sort of unreliable Oct 08 10:53:07 for instance hibernate, which is used a lot, is really pissing me off with the fact that it refuses (apparently) to generate the INSERT statements when objects are being persisted, instead deferring them until transaction commit or some such, which can happen far away from the lines that actually had the mistake. Oct 08 10:53:10 https://www.activeandroid.com/ Oct 08 10:53:19 that seems good but it is not free Oct 08 10:53:51 there's some flushmode stuff with hibernate proper that works, but when using it with JPA which is otherwise attractive, the ALWAYS flushmode is lost. Oct 08 10:54:43 I guess the only way to get something that acts like you want is to do it yourself. :-/ Oct 08 10:55:52 i didnt try hibernate, but found ibatis to be intuitive because it was less magical Oct 08 10:56:12 but they are slightly different, actually you could use both in the same project Oct 08 10:56:30 probably used ibatis because i was dealing with a legacy db Oct 08 10:56:35 Why does textwatcher return weird stuff on space bar? Oct 08 10:56:53 tagrudev: also, you can look at db4o for android Oct 08 10:57:27 i have a question related to debugging code in eclipse. i notice that in one of my methods with multiple return statements, more than one return is executed when calling the method. what is up with that? Oct 08 10:57:28 i have a tendency to just 'when in rome, do as the romans do' … and subject myself to the pain of the android db / cp apis Oct 08 10:57:52 vavirta, i did.. it did not work either Oct 08 10:57:58 wtf is wrong with View.PRESSED_ENABLED_STATE_SET? Even the javadoc is screwed up. Oct 08 10:57:58 http://developer.android.com/reference/android/view/View.html#PRESSED_ENABLED_STATE_SET Oct 08 10:58:17 sorry, it is View.PRESSED_STATE_SET that is weird Oct 08 10:58:29 I will try to get rid of hibernate eventually. I am displeased with it, although I say that it is possible to make it work with fairly small amounts of effort Oct 08 10:58:36 g00s, well I am more familiar with ActiveRecord pattern but I guess I would have to go with 'when in rome, do as the romans do' pattern too Oct 08 10:58:43 logically PRESSED_STATE_SET should exist, and it is linked to from the javadoc, but it does not exist. Oct 08 10:59:12 tagrudev: i do wonder, with something like ormlite, how much extra garbage is generated Oct 08 11:00:18 g00s, I don't have any experience with ORMs for android so I am more like asking for an advice :) on what would be a good option for newbies Oct 08 11:01:10 Why does textwatcher on an edittext return reverse of the count after you enter a space? Oct 08 11:01:40 heh, there is a new abs release - 4.2.0 Oct 08 11:02:54 i still haven't used it yet though; was still kinda holding out to see what google's was going to look like Oct 08 11:07:28 Why does textwatcher fire twice when you input a space? Oct 08 11:13:05 hello all. is there any way to disable optimization of the bytecode when building from eclipse? Oct 08 11:13:15 the debugger interprets these optimizations wrong and it gets frustrating to debug Oct 08 11:17:12 alankila: you still around? Oct 08 11:19:02 how does this look for a path class>> http://pastebin.com/AJGBKTKg Oct 08 11:49:33 what is the best way to notify a cursor-based ListView about a content change besides of using a ContentProvider? Oct 08 11:55:54 anyone ever seen this before Oct 08 11:55:54 10-08 13:55:02.970: E/InputQueue-JNI(19221): channel '42213f78 richard.aau.painChart/richard.aau.painChart.Main (client)' ~ Publisher closed input channel or an error occurred. events=0x8 Oct 08 11:56:06 I get it and then my screen kinda crashes and resets back to the lock screen Oct 08 11:57:12 Hi! Is it possible to use calculated columns in contacts provider or in resulting cursor? Oct 08 12:07:50 Hey everyone, i need advice, what I need to know to intergrate Google Maps into my android app ? i am now reading about that i have to make sure to check properly the license e.tc. of using google maps in my app. can you tell me what should i be aware of ? or when i want them just to get location, i should not be afraidd of some lawyers mounted on bears with crossbows shooting after me while... Oct 08 12:07:52 ...i will be stunned by a wizard from portugali :P ? Oct 08 12:21:19 mhm... should I try to integrate ormlite, sqlciper and simple-xml into one single project? thats going to explode probably... Oct 08 12:27:31 is there a way to disable swiping in a viewpager? Oct 08 12:51:16 hello Oct 08 12:51:32 it looks like that I had bad references to the package name. it name was explicitly used in sted of Context.getPackageName() Oct 08 12:52:58 i have this situation - im designing sip-asteriks-voip app - i have a phone call happening, and another phone call is incoming, i should be able to add it to the existing phone call and make a conference, similarily - i should also pay attention to ending of calls - how should i approach this issue - patterns, design? any book, resouce on this? Oct 08 12:56:29 DO NOT USE THE PACKAGE NAME EXPLICITLY NO MATTER WHAT. YOU MIGHT NEED TO RENAME YOUR PROJECT Oct 08 12:57:06 superlinux-hp: OKAY, IF IT KEEPS YOU HAPPY. Oct 08 13:03:32 Hello, have question on limitation based on manifest, who can help me? It's about the ARMv7 phones Oct 08 13:03:36 Ankhwatcher, it will keep everybody happy Oct 08 13:17:27 can anyone tell me why only one "point" is added to my Arraylist in the following code >> http://pastebin.com/LRnM3NJK Oct 08 13:17:45 shouldnt it be that every time the user triggers a motion event, a new pont is added?? Oct 08 13:19:19 you're trying to add it when the motion event is pressed, and each point it moves along, but not released? Oct 08 13:19:50 You're error is re-declaring points every time an onTouch event is triggerred Oct 08 13:19:54 I just remembered why I came in here. Do I need to specify in my Database queries that I don't want any null rows, or will that be handled automatically? Oct 08 13:19:54 make it global >_> Oct 08 13:20:13 trying now :) Oct 08 13:20:46 Komak57 yes, on release i need to do something else Oct 08 13:21:24 Well Ankhwatcher, you can code it yourself to keep fields you don't want null filled, or add it in the database as a NOT NULL to prevent such errors. Oct 08 13:21:28 Komak57: made points global but still getting the same (only 1 point added) Oct 08 13:21:47 lemme see RichardS Oct 08 13:21:54 kk one moment please Oct 08 13:22:43 ah, fixed it :) Oct 08 13:23:01 moved the constructer global and added a points.clear() to the touchUp Oct 08 13:23:06 thanks Komak57 Oct 08 13:23:09 http://pastebin.com/vzzr6Zct Oct 08 13:23:22 Komak57: my create statement specifies "text not null", will that make sure that every line returned by a query will have text in that column? Oct 08 13:23:26 i tried that first but it didnt work Oct 08 13:23:49 when i moved ArrayList points = new ArrayList(); global and added the clear() it worked Oct 08 13:24:56 is anyone aware of a where clause length limit in android's database code? Oct 08 13:24:58 if your database specifies an entry as "NOT NULL", and you try to add an item with that field null, you will get an error, which can then be handled and messaged to the user. depends on exactly what you want to do really... Oct 08 13:28:35 Komak57: I'm using db.remove to remove items which are unwanted, I just want to make sure that won't screw up my database calls. I think I'm over-thinking this. Oct 08 13:34:32 finally is called even when there is return in try block, right? Oct 08 13:35:53 Ankhwatcher: it will ensure that no one is able to insert nulls in to that column Oct 08 13:35:59 if you try, an exception will be thrown. Oct 08 13:38:39 fnord`: cool Oct 08 13:39:13 Hiya, I've created an android application that collects gps locations from LocationManager, using the requestLocationUpdates and a LocationListener. This has worked perfectly for quite some time, but now the application quits whenever I try to multitask it. That is it does not keep running ( through the pending locationUpdates ), though it did at some time. So the question is now, what should my Oct 08 13:39:15 strategy be for gathering these updates in the background, is it a service I'm looking for? or what should my attack startegy for this issue be? Oct 08 13:39:34 Also sorry if I stated a horrible question, googling and thinking didn't help me .P Oct 08 13:41:10 RandomSort: A background service is a better way to do that. If you rely on your entire activity remaining loaded, that wouldn't always work as Android will kill your activity when it runs out of memory Oct 08 13:49:35 is it possible to use a CursorLoader without implementing the whole ContentResolver/Provider API? Oct 08 13:49:38 cthulhu2: thank you for you reply. I had the feeling I would be going that way. Oct 08 13:50:54 Do you perchance have any resources or pointers to where to start, with the services, Is it enough that I start the service with startService() and then bind to it, does that prevent it from being terminated along with my UI process? Oct 08 13:52:48 starting the service, will ensure it runs independently from your UI process. Oct 08 13:53:05 okay, thank you for your help! Oct 08 13:53:20 RandomSort: :) If you are collecting fine positioning data very often, it could be a battery hog. Oct 08 13:54:12 cthulhu2: I know, it's unfortunately a requirement from my boss :P Oct 08 13:55:13 more often these days I'm getting happier and happier with my iOS port of the same application, it just seems easier to work with.. Whether it's because I've taken some stupid design decisions on android remains to be seen though Oct 08 13:55:17 RandomSort: you should use a foreground service if you want to have higher reliability. it will force a permanent statusbar notification as well, showing the user what is going on Oct 08 13:55:33 Oooh, nifty, great tip Ge0rG Oct 08 13:55:57 * Ge0rG happens to have an OSS geo-location app out there... http://aprsdroid.org/ - but don't try to copy&paste, its all Scala code Oct 08 13:56:11 RandomSort, I'd put money on that ;-) Oct 08 13:56:52 Ge0rG, how's the Scala experience for Android these days? Oct 08 13:57:04 :) Oct 08 13:58:11 meh. so many examples of using CursorLoader with a content provider, but making it run without one is actually even more complicated Oct 08 13:58:53 mrenouf|work: I haven't done any serious coding in the last months, so the last state I can talk about is from early 2012, documented at http://aprsdroid.org/two-years/ Oct 08 14:13:12 are startService intents guaranteed to be delivered in order to the started service? Oct 08 14:34:19 Which is a better approach; creating separate activities for logged in and anonymous user or 1 activity and handle what to show to the user in code ? Oct 08 14:34:37 probably the latter. Oct 08 14:36:16 meh. you can't use android:onClick in menus... Oct 08 14:39:00 Will Cursor#moveToPrevious() move to the old previous element when the backend behind the Cursor gets modified (for instance the previous element gets removed)? Oct 08 14:40:34 Can anyone recommend me a container to hold my objects which will makes them easy to sort? Oct 08 14:40:35 lov: are you sure ? Oct 08 14:40:37 Or is the state in this case not known, so using ContentObservers is a must-do? Oct 08 14:42:30 CVirus: let me consult my Big Book Of Things That CVirus Should Probably Determine For Himself But Won't Oct 08 14:42:34 * lov flips through Oct 08 14:42:58 yes, it's probably smartest to handle it that way, unless of course your flow is dramatically different for anonymous users in a way that it really makes sense to have two completely separate activities Oct 08 14:43:09 lov: hmm Oct 08 14:43:11 Sadly, my book is silent on what your use cases actually are. Oct 08 14:43:54 lov: Thanks anyways. Oct 08 14:44:52 screw it, I'm going with the always popular ArrayList Oct 08 14:45:03 10:40:40 < Ankhwatcher> Can anyone recommend me a container to hold my objects which will makes them easy to sort? Oct 08 14:45:11 "Hey guys, can you pick a data structure for me at random?" Oct 08 14:45:53 http://developer.android.com/reference/java/util/SortedSet.html ? Oct 08 14:46:02 http://developer.android.com/reference/java/util/SortedMap.html ? Oct 08 14:46:20 without knowing what you're actually doing with said container or objects, you're not going to get a good answer. Oct 08 14:46:59 lov: I'm just sorting them based on a value stored within. Oct 08 14:47:32 thanks for the links Oct 08 14:48:13 yeah, but what's your use case? Do you need to worry about algorithmic complexity whatsoever? Oct 08 14:48:19 Is n ever going to be over like 5? Oct 08 14:49:23 n being number of objects? yes Oct 08 14:49:48 Do you need to worry about access time? insertion time? resizing time? etc. Oct 08 14:49:51 My objects are locations with an attached float, distance to user Oct 08 14:50:27 http://developer.android.com/reference/java/util/TreeMap.html Oct 08 14:50:29 ? Oct 08 14:53:46 I haven't used maps yet, so this is a little confusing to me. I'll figure it out. Oct 08 14:53:57 hmm, is WiFi Off when screen is inactive a user-only setting? Oct 08 14:54:10 or can an App prevent the phone/screen from going to sleep? Oct 08 14:54:36 belgianguy: look into Wakelocks and WifiLocks Oct 08 14:55:08 lov: ouch, I looked into Wakelocks once, looked quite hard Oct 08 14:55:23 but thanks :) Oct 08 14:55:26 I think you're thinking of hello.jpg Oct 08 14:55:28 if you think WakeLocks are hard, you're not going to have much fun with programming. Oct 08 14:56:54 wakelocks in android have a really horrible documentation... Oct 08 14:57:02 no, they really don't... Oct 08 14:57:10 what, exactly, are you confused about? Oct 08 14:57:34 Ge0rG, try the SCORM specifications for documentation; nothing is quite that awful Oct 08 14:57:40 I didn't really look into it deeply, but I remember at the time being confused about what was going on Oct 08 14:58:01 perhaps I'm mistaken Oct 08 14:58:07 it took me roundabout five attempts of reading the javadocs carefully before I understood how they are supposed to work. the different lock types still confuse me Oct 08 14:58:16 it's pretty simple. Oct 08 14:58:30 a partial wakelock keeps the processor on, but doesn't affect the screen. Oct 08 14:58:37 all of the other locks keep the screen on, but can be overridden by the user. Oct 08 14:58:45 If you must keep the device alive, use a partial wakelock. Oct 08 14:59:01 If you want the screen to stay on but don't care if the user overrides it with the power button, use a full wakelock. Oct 08 14:59:16 If you want the screen to stay on but you need to keep doing things in the background if they turn the screen off, use both. Oct 08 14:59:23 I really do not see how these semantics map to "full" and "partial" Oct 08 14:59:29 well too bad. Oct 08 14:59:32 them's the breaks. Oct 08 14:59:41 just look at the lookup table. Oct 08 14:59:45 lov: I've just realised how much time you just saved me. Thanks! Oct 08 15:00:06 Also copy/pasting that somewhere :p Oct 08 15:00:15 Ankhwatcher: depending on how large your map of locations gets, you might want to consider using buckets so that you don't have a map of 100,000 items. Oct 08 15:01:00 I dunno, the user manually adds them. I doubt anyone would add more than a couple of hundred. Oct 08 15:02:57 Ankhwatcher / lov - what i did for a high-point-count map display is extract the min/max coordinates of the map and filter the sql where clause by them to only get the ones in view, not sure if that helps any in this situation... It wouldn't help you if someone zooms out too much and shows everything, that's for sure. Oct 08 15:03:21 hmm, I just have a simple game planned, I don't know if I'm "entitled" to request a lock on WiFI :/ Oct 08 15:03:26 belgianguy: sure you are. Oct 08 15:03:40 are you performing a download over wifi? Oct 08 15:03:55 acquire a lock to make sure that the device doesn't decide to turn off the wifi to save power. Oct 08 15:03:56 no, atm it's a heartbeat from a P2P node Oct 08 15:04:03 * lov shrugs Oct 08 15:04:10 if you can fallback to cell connectivity, then don't request it. Oct 08 15:06:28 hmm, dunno if I can fallback on cell data, I was thinking of making it WiFi only at first Oct 08 15:06:50 as data prices aren't cheap around here :p Oct 08 15:07:06 Hey all. Oct 08 15:08:24 belgianguy: keeping wifi awake the entire time you're playing the game is probably bad - but keeping the wifi awake because they're playing 2 player is probably required anyhow, so I say go for it Oct 08 15:08:44 belgianguy: tune it to only hold it on when you're doing multiplayer and no-one will likely complain Oct 08 15:08:56 Just wondering - I have an app that creates events in the calendar, and sometimes reminders (at users discretion).. If I were to then remove the event, would the reminders be handled (removed) appropriately, or should I also keep track of these and remove them as well as the event? Oct 08 15:09:02 dragorn: ah, good, then I'll do it that way Oct 08 15:09:24 belgianguy: i'm sure SOMEONE will whine in comments, b/c that's what ppl on the internet do, but, meh :P Oct 08 15:09:36 lol, true Oct 08 15:15:49 puppen i assume removing the event removes the associated reminder, test it to be sure. should be simple to test that one Oct 08 15:23:17 How to check if there's cell connection available (not network, but simple operator connectivity)? Oct 08 15:23:48 ConnectivityManager Oct 08 15:25:00 evancharlton: TYPE_MOBILE? Oct 08 15:25:14 seems likely Oct 08 15:28:18 meh. is there really no elegant way to notify the UI of sqlite changes, except for manually catching broadcasts or implementing a contentprovider? Oct 08 15:39:14 <[diecast]> is there a way for me to get a specific android os for emulation. i need to work with the Motorola Razr running gingerbread 2.3.5 - http://www.gsmarena.com/motorola_razr_xt910-4273.php Oct 08 15:39:26 <[diecast]> it has a bug i can't replicate with the generic android sdk images Oct 08 15:39:53 [diecast]: no. you'd need to get a razr and put that on it Oct 08 15:40:10 [diecast]: (which you can do with sbf if you search around on forums you should be able to find the image, you'd need to get the phone hw tho) Oct 08 15:40:46 <[diecast]> so if i have the image i can't necessarily emulate it Oct 08 15:41:00 afaik you can't easily get an emulator to run something tweaked for specific real hw. Your best bet if you really want to try is to try to get the image, extract the sbf format (semi documented) Oct 08 15:41:11 and turn it into a disk image and see what happens Oct 08 15:41:32 I can tell you the moto images are pretty weirdly organized though Oct 08 15:44:39 public class 'a' stripped of unavailable super class 'b' Oct 08 15:44:45 what in hell does that mean Oct 08 15:53:56 DAGr8: we have no fucking clue. Please provide more information, or just do a google search. Oct 08 15:54:01 I'm assuming that you have A extends B Oct 08 15:54:10 except that B doesn't actually exist as far as your classloader knows Oct 08 15:54:23 e.g. you're referencing a class in a jar but that jar isn't part of your build Oct 08 15:54:29 one sec Oct 08 15:54:35 or you're trying to subclass a class that doesn't exist in the API you're running on Oct 08 15:55:01 http://pastie.org/5019397 Oct 08 15:55:16 yes what you just said makes sense Oct 08 15:55:35 DroidDoc took 26 sec. to write docs to out/target/common/docs/api-stubs Oct 08 15:55:44 but if i do make update-api Oct 08 15:55:49 it gives me the same exact error Oct 08 15:55:52 im building jelly bean Oct 08 15:57:44 why are you running update-api? Oct 08 15:57:51 partial wakelock + wifilock didn't work, dim lock + wifi lock seems to keep it alive though Oct 08 15:58:08 uh Oct 08 15:58:10 define "alive" Oct 08 15:58:17 use adb shell dumpsys power to look at the power states Oct 08 15:58:25 partial wakelocks DO NOT keep the screen on. Oct 08 15:58:29 they only keep the processor on Oct 08 15:58:34 evancharlton ? did you type this before I typed my last line ? Oct 08 15:58:41 hey. is there a cpu / ram usage tool i can use when testing my app? Oct 08 15:58:46 it responds to the server, and I want the screen to stay on as well Oct 08 15:59:02 then hold both a partial and a full bright wakelock or something Oct 08 15:59:03 How to check if there's cell connection available (not network, but simple operator connectivity)? Oct 08 15:59:14 nahhh: TelephonyManager should have something Oct 08 16:00:31 Perhaps if network operator is null then i can assume it's offline? Oct 08 16:01:35 blob4000: android 4 has a bunch of monitoring stuff built in under the appdev menu Oct 08 16:04:04 nahhh: actually, use http://developer.android.com/reference/android/net/ConnectivityManager.html Oct 08 16:04:41 actually, hmm. Oct 08 16:08:18 cheers thanks dragorn Oct 08 16:18:35 is -lssl ok to be placed in Android.mk file ? ? Oct 08 17:06:40 Anyone know how to get a long click to register with a scroll view? I set the listener and set long clickable to true but It doesnt seem to work Oct 08 17:07:13 The scrollview is set to match parent size (size of screen) Oct 08 17:13:50 while using the android:onClick how would I get the android:text from that view? Oct 08 17:14:17 onClick(View v) <-- the argument is the view that was clicked. Cast it to a TextView and call getText() Oct 08 17:14:26 thank you. Oct 08 17:14:30 np Oct 08 17:15:08 well since its a Button Oct 08 17:15:11 would It not be a textview Oct 08 17:15:12 and a button? Oct 08 17:15:15 (Button)? Oct 08 17:15:33 you know that Button inherits from TextView? Oct 08 17:15:43 right, right, makes sense. Oct 08 17:19:27 why in the starting-activity tutorial, getActionBar().setDisplayHomeAsUpEnabled(true); theres doesn't have this line Oct 08 17:19:34 but when I create it, it wont work without this line? Oct 08 17:20:35 DarkGhost`: gonna have to be a lot more specific Oct 08 17:21:10 ehh curiousity killed the cat, it works so I'll just live with it lol Oct 08 17:21:35 I don't even know what you asked, but okay Oct 08 17:21:40 glad to hear you got it working Oct 08 17:24:44 how am I suppose to get better at these error exceptions, it says nullPointerException trying to start this activity Oct 08 17:24:47 but there is no error in eclispe :O Oct 08 17:25:03 where does 'it' say nullpointerexception? Oct 08 17:25:14 in logcat Oct 08 17:25:35 and you can't find it in your code? Oct 08 17:25:38 Intent intent = new Intent(this, AddtoInput.class); I'm getting this is nullPointer? Oct 08 17:26:07 in log cat it says 11 more Oct 08 17:26:10 how do I view those 11 molre? Oct 08 17:26:41 Above the "caused by" line Oct 08 17:27:18 I doubt there's a NPE on that line Oct 08 17:27:54 well I guess this is the NPE: editText.setText(message); Oct 08 17:28:00 String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE); Oct 08 17:28:33 So editText is null Oct 08 17:29:06 EditText editText = (EditText) findViewById(R.id.calcInput); // is it becuase R.id.calcInput is in MainActivity and I'm trying to access it from different activity? Oct 08 17:29:23 ._. Oct 08 17:29:38 DarkGhost`: findViewById references views in the layout that you have inflated for THIS activity. Oct 08 17:30:05 ^ using setContentView() Oct 08 17:30:18 (And no, you do not need to find views in another activity) Oct 08 17:30:23 oh, so that makes sense Oct 08 17:30:31 because calcInput isnt it this activity. Oct 08 17:30:32 so how would Oct 08 17:30:37 i acess a different view through R. Oct 08 17:30:38 it is not in that layout Oct 08 17:30:49 layout = xml -> you inflate this in your activity Oct 08 17:30:55 DarkGhost`: you reference the layout that you inflated Oct 08 17:30:56 not other layouts. Oct 08 17:31:06 lets say I inflate activity_1 and ' Oct 08 17:31:09 no Oct 08 17:31:10 lets not. Oct 08 17:31:12 I want to access activity_2 Oct 08 17:31:17 .xml Oct 08 17:31:18 dont call it activity_1 call it layout_1 Oct 08 17:31:32 DarkGhost`: you don't inflate activities. Oct 08 17:31:40 You start activities, the activities inflate layouts. Oct 08 17:31:43 I know, I'm just saying activity_2.xml Oct 08 17:31:48 yes, yes I know Oct 08 17:31:49 ._. Oct 08 17:31:59 ugh Oct 08 17:32:01 please don't name your activities activity_1, activity_2, etc. Oct 08 17:32:02 If you need to find a view in activity1 from activity2, you're doing it wrong Oct 08 17:32:06 can I just do r.layout.layout_name.id.calcInput Oct 08 17:32:12 no Oct 08 17:32:14 christ Oct 08 17:32:26 in short: your onCreate has a .setContentView(R.layout.my_layout) then you do findContentView(R.id.something_in_my_layout) Oct 08 17:32:27 DarkGhost`: if you're trying to pass some information back from activity2, consider using startActivityForResult Oct 08 17:32:47 ugh ignore what i said i need sleep Oct 08 17:33:04 okay Oct 08 17:33:05 thank you guys Oct 08 17:33:24 so I'm starting an activity for wrong reasons Oct 08 17:34:07 DarkGhost` the thing is that a layout contains objects (like a textview or button) but android uses a trick to reference these, using integers as ids Oct 08 17:34:19 R.id.something is an integer Oct 08 17:34:59 okay, is there an editText method append? Oct 08 17:35:24 Is there one in the manual? Oct 08 17:35:26 i assume you mean that you want to add text to the edittext Oct 08 17:35:32 append Oct 08 17:35:35 to the text already in there Oct 08 17:35:45 it's not in the manual. therfore there is not one. Oct 08 17:36:06 one way would be to get the string that's in it, and add text, and set it again Oct 08 17:36:11 okay, so I'm going to do setText(bla.getText()+"new") Oct 08 17:36:13 is that bad practice? Oct 08 17:36:13 I would discourage you from manipulating your text inside the EditText, it should mirror some data structure where the actual manipulation is performed. Oct 08 17:36:26 DarkGhost` it's not what you want to worry about now Oct 08 17:36:44 lol okay. Oct 08 17:36:49 Another way is to use the append method Oct 08 17:36:53 !!! Oct 08 17:36:56 ... Oct 08 17:36:57 I just asked if there was one!!! Oct 08 17:36:59 wf? Oct 08 17:37:04 haha Oct 08 17:37:10 hey darkghost Oct 08 17:37:13 there's this website Oct 08 17:37:15 d.android.com Oct 08 17:37:19 if you go there you can type in the name of a class Oct 08 17:37:23 and it will search for it Oct 08 17:37:25 and then show you documentation Oct 08 17:37:26 http://developer.android.com/reference/android/widget/EditText.html <-- find it Oct 08 17:37:27 You should've just looked in the javadoc Oct 08 17:37:28 it's pretty fucking stellar Oct 08 17:37:36 you should give it a shot sometime Oct 08 17:37:36 lol Oct 08 17:37:47 there is an append Oct 08 17:37:49 no kidding Oct 08 17:38:00 See, by asking me instead of the manual you got the wrong answer. Oct 08 17:38:16 n00bs Oct 08 17:38:21 fun, this Oct 08 17:38:26 but i'd rather watch dexter Oct 08 17:48:35 i'm pretty sure i'm getting a job offer today around 5-6 :) Oct 08 17:48:46 very hard to sit still Oct 08 17:49:15 also since I am slightly pessimistic, even though I have 4-5 voicemails suggesting otherwise...I am still nervous that it might not go as planned. Oct 08 17:49:27 fnord`: in which case, beers are on you tonight Oct 08 17:49:59 ha Oct 08 17:50:00 Leeds: if you come to boston then sure :D Oct 08 17:50:17 last time I was in Boston I *lost* my job Oct 08 17:50:28 (also, the only time - but still...) Oct 08 17:50:43 so basically Boston is at a 100% failure rate for you Oct 08 17:51:38 yeah Oct 08 17:51:55 also, spend the evening of Feb 14th wandering around in the ice and snow, alone... Oct 08 17:52:04 :( Oct 08 17:52:14 :< Oct 08 17:52:32 i lived here my whole life and spent many days working lousy minimum wage jobs in the snow and got dumped and all that Oct 08 17:52:37 i feel you man Oct 08 17:53:04 winter is pretty brutal here. Oct 08 17:53:08 fortunately, I'm now reasonably well-employed, happily non-single, and living a few miles north of the tropics :D Oct 08 17:53:16 I'mma assume you're talking about a place, bc I just signed in and thought you've been living in #android-dev your whole live Oct 08 17:53:21 *life Oct 08 17:53:21 where's that? Oct 08 17:53:29 Hong Kong... Oct 08 17:53:35 oh, cool Oct 08 17:53:51 what's it take to move to hong kong? Oct 08 17:53:59 plane ticket and suitcases... Oct 08 17:54:05 all inclusive eh? Oct 08 17:54:34 and a visa, assuming you're not Chinese from a family with roots here, or married to someone with a visa or residency... Oct 08 17:55:14 yeah that's what I was referring to ;). visas don't grow on trees Oct 08 17:56:20 if you can get a decent job offer, the visa is often pretty much a rubber-stamp... I've got a more complex visa, which allows me to freelance, but took a load of paperwork and about 9 months to process Oct 08 17:56:31 anyway, offtopic and almost bedtime :) Oct 08 17:57:27 happy to discuss elsewhere, if you're interested in details... but in the meantime, good luck with your call Oct 08 17:57:34 see ya Oct 08 17:57:34 thanks Oct 08 18:05:21 I need to have a tabbed view inside my activity. I need the tab stuff to occupy the bottom half of the screen. the top half is for a text area. What is the best way to implement such a functionality? (right now I use a linear layout to hold the tab buttons and a viewFlipper to hold the contents. Then add the content to it through code) Oct 08 18:07:14 I don't want to use tabhost and do all its complex management :) Oct 08 18:08:35 I am finding using the suggested Accelorometer and Magnetic over the depreciated OrientationSensor giving poor results even with filtering. Any one has experienced this Oct 08 18:09:27 the sensors found in a typical android device are not exactly top of the line. Oct 08 18:09:54 what are you trying to do? Oct 08 18:11:25 I have opengl objects placed around so based on orientation I want to rotate them. Initially I used OrientationSensor which was fine except in landscape it was breaking. So I had to use Accelorometer etc. and even with some filtering the objects are shaky Oct 08 18:15:36 i'm running a zombie 5k in october and want to get google glass Oct 08 18:15:42 who the heck do i have to talk to to make that happen Oct 08 18:15:45 only half-kidding Oct 08 18:17:15 isn't my app supposed to quit if i press the back button? :$ Oct 08 18:17:23 no. Oct 08 18:17:26 It depends whether you've opened any activities. Oct 08 18:17:30 you generally don't "quit" your app in Android Oct 08 18:17:40 you may finish the activity Oct 08 18:17:44 but your app isn't necessarily done Oct 08 18:17:49 and this is fine; this is what is supposed to happen. Oct 08 18:17:54 You may have services in the background, etc. Oct 08 18:19:16 right. so i need an exit function in a menu :) Oct 08 18:23:48 alund: http://www.youtube.com/watch?v=WrjwaqZfjIY Oct 08 18:25:52 alund: what are you trying to do? Oct 08 18:33:24 app is runing but not funktional . logcat gives me: Unable to start service Intent { cmp=com.snakefreak.hansaradio/.streamService (has extras) }: not found anyone has a tip for me? Oct 08 18:33:48 is it declared in your Android manifest file? Oct 08 18:39:02 doogan thats my manifest http://pastebin.com/LwGcrg73 Oct 08 18:40:11 you need to declare your service in the manifest as well Oct 08 18:40:26 ... and do something about that formatting Oct 08 18:41:00 ok thats my first app using services only done hello world's before ;-) Oct 08 18:42:35 no worries just make sure to declare all the app's main components in the manifest Oct 08 18:43:13 and btw typically java classes use upper camel casing as a naming convention Oct 08 18:43:56 dennistlg, i'm still building my 2nd app. It deals with services, threads, sockets, etc. One thing I've noticed is that, if a process in that service is running past kill (like a thread), the service will persistantly recreate itself. Oct 08 18:45:47 ok will read a bit about manifest file to know how to declare a service Oct 08 18:46:44 Komak57 you mean the app called the service is killed the service is run without main class? Oct 08 18:48:15 ehh, more complicated... the app Activity creates the service. the service creates a thread. the user kills the activity, the service runs independantly. the user kills the service (thread still looping), the service dies, the recreates itself. the user kills the thread, then kills the service, the service stays dead. Oct 08 19:02:35 dude...where's the docs for ContactsContract.. Oct 08 19:03:10 there's only the..code docs Oct 08 19:04:10 http://developer.android.com/reference/android/provider/ContactsContract.html ? Oct 08 19:05:27 I meant something like this, http://developer.android.com/reference/android/app/Service.html Oct 08 19:05:32 this is at length and very descriptive Oct 08 19:05:54 I don't get half of the fields I'm using in the ContactsContract and/or which is group/contact Oct 08 19:06:11 hmm if I make a userlist with buttons to add and remove users should those add and remove screens be seperate activities? I'd like to keep the back-button functionality but I'm afraid it's a bad practice to make an activity for such a small piece of functionality Oct 08 19:10:12 Anyone know how to get a long click to register with a scroll view? I set the listener and set long clickable to true but It doesnt seem to work Oct 08 19:11:23 MrCartel, I have a feeling the scroll view's long-click is overriding. You'd need to find a way to bypass? Oct 08 19:11:54 Komak57: hmm, I guess longclick is used for the scroll? Oct 08 19:12:17 I would have to catch it and determine if the user is scrolling or not? Oct 08 19:13:30 maybe you guys all saw tis already http://android-developers.blogspot.com/2012/10/building-quality-tablet-apps.html Oct 08 19:13:32 Komak57 thanks for the info Oct 08 19:23:14 ladies Oct 08 19:24:07 ron_frown, I think you're looking for #ios Oct 08 19:25:36 heh Oct 08 19:26:15 i hear the app submission wait time for ios is approaching 28 days or something Oct 08 19:26:20 poor devs :( Oct 08 19:26:33 haha Oct 08 19:26:35 eff em Oct 08 19:31:27 retomeier: thx for the blog posting on tablet optimization; i would like to tablet optimize my app but i haven't been able to afford any of those devices yet. I was hoping to rely on the emu, but my app requires bluetooth functionality and the emu does not support that yet. which brings me to my point - i wish google was more transparent with 'expected arrival times' when they announce things Oct 08 19:31:37 whether this goes for being able to respond to play comments (announced at i/o 2012), BT support in the emu (announced like 6 mos ago) Oct 08 19:32:08 i think these are not strategtic to business and more transparency is warranted. even if the status updates are some point in the cone of uncertainty (3-4 mos) . it makes it much more difficult to develop when you can't plan Oct 08 19:32:48 a bit of fiddling should make BT support in EMU possible *now*, though Oct 08 19:33:23 another example would be the actionbar announced at i/o 2012; yes i realize i can use abs but it would be prudent for me to evaluate the pros and cons of both approaches, i would think Oct 08 19:34:03 I dont know why they didnt just add that actionbar OR abs as a part of support lib and be done with it Oct 08 19:34:20 I mean seeing as you cant really build a remotely portable app these days without support lib Oct 08 19:35:46 ron_frown: yeah, thats kinda what i am wondering. not familiar with their plans - i would think that either (1) it will be a separate extra available in the sdk manager like analytics or something or (2) its becomes part of the compat lib. if (2), since I'm already using the compat lib, i would probably just go with that since i have it by default Oct 08 19:36:13 btw, abs 4.2.0 is out Oct 08 19:36:28 I dont know how people do dev for the platform itself... seems like if you are avg joe like myself (not a google partner) you are CONSTANTLY chasing a moving target Oct 08 19:36:49 by the time you get the source thats current and not buggy, partners are already releasing devices with the next latest Oct 08 19:36:58 i'm an average joe and i find it very difficult to plan for Oct 08 19:37:08 heh. a user complains on g-play that my app crashes his htc phone when the background service is running. how am I supposed to debug _that_? Oct 08 19:37:25 I am just extremely frustrated that my ICS builds seem to cause hardware freezes in the middle of the night... Oct 08 19:37:55 and my JB build tends to cause random ass appl crashes (that immediately just dump you to launcher) no errors on screen Oct 08 19:38:03 at a MUCH higher frequency Oct 08 19:38:11 i guess what i'm getting to, is that there are probably some strategic things google needs to keep secret for competitive advantage; but features of the emu or next compat lib release date do not fit in that category Oct 08 19:38:14 aosp is 4.0.99999.99999.9999.9999999 for me Oct 08 19:38:15 wtf/ Oct 08 19:39:03 ron_frown: faulty hardware? :P Oct 08 19:39:09 nope Oct 08 19:39:20 and the linux kernel side of things should be pretty fucking solid as well Oct 08 19:39:40 romain said the jb bugs were already reported and fixed, but they havent done a code drop for it Oct 08 19:39:48 and no eta whatsoever Oct 08 19:39:54 which is fair Oct 08 19:40:26 ETAs are overrated Oct 08 19:40:35 it is "free" and they are under no obligation to go out of their way to help... its just hard to keep shit up to date Oct 08 19:40:37 which reminds me, I should re-evaluate CM10 on the g-nexus Oct 08 19:40:48 gives me an all new view on the "fragmentation problem" Oct 08 19:41:54 I now believe its solely that targeting such a broad hardware set, having at least 2 layers of code, and trying to get stable releases out with some customers needing special attention Oct 08 19:42:00 no surprise shit takes so long to update Oct 08 19:42:10 hmm if I make a userlist with buttons to add and remove users should those add and remove screens be seperate activities? I'd like to keep the back-button functionality but I'm afraid it's a bad practice to make an activity for such a small piece of functionality Oct 08 19:42:17 Is http://actionbarsherlock.com/ displaying some weird 404 page for you guys too? Oct 08 19:42:37 no Oct 08 19:42:49 Mikevin: it depends on how much stuff you need in the add/remove things. I'd go with AlertDialogs probably Oct 08 19:43:35 Mikevin: I'm using AlertDialog with a custom view in my jabber client for adding contacts: https://lh3.ggpht.com/iFsH5pk1phO22YgPm4KGP7ubZ-NO-H8lL1l0xJr2FGwTTduHIK2GmS4-LWuhf4h99A Oct 08 19:43:43 Ge0rG are those customizable enough? Oct 08 19:44:17 Mikevin: have a look at the screenshot above Oct 08 19:45:00 Ge0rG Ah that looks nice. How about removing people from a list? maybe a list and searchbar are a bit too much for a AltertDialog? Oct 08 19:45:33 Mikevin: long-press on the user, then popup a yes/no dialog Oct 08 19:46:35 Ge0rG: just a comment on your htc/service problem; it seems that htc has done some more substantial modifications to android governing hen processes are killed (its much more agressive than normal). think about some possible edge cases where your service is getting killed because the process is, and maybe - who knows - in that process or the process of starting up again Oct 08 19:46:41 Ge0rG ah right, like widgets. Thanks a lot =) Oct 08 19:47:00 Ge0rG is there a general rule about making activities/screen though? Oct 08 19:47:06 Ge0rG: With ABS, you could associate the long-press with a button on the actionbae. Advantage being that multi-select can be handled more gracefully. Oct 08 19:47:15 Ge0rG: but this was for the htx one X and that generation Oct 08 19:47:34 cthulhu2: indeed, yeah Oct 08 19:47:49 g00s: no amount of service killing should reboot the phone, IMHO Oct 08 19:47:58 oh, yuck Oct 08 19:48:16 i remember being able to reboot the phone with a malformed notification in 2.2 Oct 08 19:48:33 but that was long ago, and i think fixed Oct 08 19:48:41 "crashes phone been debugging this off and on all week I find it ok as long as the app is in the foreground and the screen is active......if the phone display goes off or the app is in the background for more than 30 seconds it crashes my phone (htc desire android 2.3) and the phone reboots." <- of course, Ge0rG is at fault. Oct 08 19:49:21 well, it seems like a better comment than usual "it sucks, 0 stars" Oct 08 19:49:31 got a bunch of these too Oct 08 19:49:46 it can't be that bad though, I am always getting at least one star Oct 08 19:49:53 Ge0rG: have you tried bugsense or crittercism? little expensive, but maybe helpful Oct 08 19:50:31 g00s: how ist that supposed to fix phone crashes? Oct 08 19:51:21 Ge0rG: better error reporting in your code might help you diagnose ;) Oct 08 19:51:48 I always wondered. How does error reporting work on android. If an activity has died, does it somehow get access to your old stacktrace on re-launch? Oct 08 19:52:16 cthulhu2: you can register an exception handler, store your exception and load it on the next start Oct 08 19:52:22 i wish there was some api my app could talk to play to, to say some type of error has occurred (and not that it was just a total tits up crash) Oct 08 19:52:31 so this shows up in my dev console Oct 08 19:53:14 * Ge0rG was using com.nullwire.trace for an app before the functionality was added to g-play Oct 08 19:53:46 Ge0rG: Ahh.. so it is your own app that does the sending of the exception details to server? or is there a Google API to do that? Oct 08 19:54:37 cthulhu2: no API, google play automatically asks the user to submit a report if your app crashes Oct 08 19:54:50 cthulhu2: nullwire is making a HTTP POST Oct 08 19:55:00 which I process in php Oct 08 19:55:04 is there a timer class available in android (or java)? Oct 08 19:55:10 alund: yes Oct 08 19:55:12 alund: I believe it's called Timer. Oct 08 19:55:39 alund: you should go for AlarmManager if the timing is important to you Oct 08 19:55:52 the Timer class is not guaranteed to call you in time Oct 08 19:56:14 Ge0rG: sounds wrong. i want to execode a function in a defined interval, cah it do that? Oct 08 19:56:47 I usually use a different thread and thread.Sleep, for timed executions Oct 08 19:57:07 alund: how important is the interval to you? Oct 08 19:57:27 Ge0rG: very Oct 08 19:57:30 I've been using ScheduledThreadPoolExecutor with a pool size of 1 for that Oct 08 19:57:42 alund: then AlarmManager is the way to go Oct 08 19:57:56 i foudn a Timer class example, and used that, but it is very misbehaved Oct 08 19:58:03 so i try alarmmanager... :) Oct 08 19:58:08 you can not rely on any timers in android when the screen is off Oct 08 19:58:18 except for AlarmManager, which will eat the battery Oct 08 19:58:37 Ge0rG: sets a wakelock? Oct 08 19:58:45 cthulhu2: thats even worse Oct 08 19:58:47 eating battery is fine, given i want to rely on it :) Oct 08 19:58:55 *wakka*wakka*wakka* Oct 08 19:58:56 yum, batteries Oct 08 19:59:17 later, i figure out how to make sure the app exits when it should Oct 08 20:00:27 g00s: I hear you. I often wish we could be more specific as well, but schedules and timelines change so frequently that there's a risk that we'll miss the expected arrival time, and then that can be even worse :( Oct 08 20:00:47 retomeier: thanks for taking my feedback into consideration Oct 08 20:01:00 Can someone tell me what I would call this layout? Oct 08 20:01:02 https://lh4.ggpht.com/DtFKNQ741o-h5wf_OAHAl6CoQE1wa1wFq90eqXktVx1KAbkPndXlvz3jmDM4Dch1USA Oct 08 20:01:19 (thanks for listening) Oct 08 20:01:50 cthulhu2: tableview? Oct 08 20:01:50 That doesn't seem like it was made with ABS. The top thingy isn't a tab-layout. Oct 08 20:02:20 viewpagerinidcator maybe? Oct 08 20:03:58 you could always pull the app out and see if you can get the xml and see how they laid it out, if you're really dedicated. The manifest gets turned into a binary but I think the layouts stay xml? (or I'm remembering something entirely wrong) Oct 08 20:04:22 I can't seem to implement the viewpagerindicator thing right (as done on that screencap). So, I might go with ABS's fragments + tabs + viewpager, with the tab-heights small. Looks almost the same :) Oct 08 20:04:30 dragorn: why bother with that? Oct 08 20:04:33 Just use HierarchyViewer Oct 08 20:04:51 the layouts do get turned to binary moosh, but that doesn't mean you can't introspect :> Oct 08 20:04:52 lov: I have a very good reason: I didn't know that existed ;P Oct 08 20:15:04 alarmmanager says to use Handler for what I do Oct 08 20:15:07 no examples Oct 08 20:16:47 anyone have any tips as to why getFragmentManager() might be returning null? Oct 08 20:17:13 alund: Handler#postDelayed(Runnable,long) Oct 08 20:17:27 tnzr: thats one of those … i would look at the code Oct 08 20:17:27 it's being called from within an ActionBar Sherlock SherlockFragment Oct 08 20:17:30 tnzr: perhaps because you should be calling getSupportFragmentManager()? Oct 08 20:17:45 tnzr: 4.1.0 or 4.2.0 ? Oct 08 20:17:55 maybe try the newer one if you havent Oct 08 20:18:06 ok cool, I'll try both of those suggestions :) Oct 08 20:18:13 evancharlton: isn't postDelayed susceptible to the same device sleeping problems? Oct 08 20:18:13 thanks Oct 08 20:21:14 Ge0rG: I don't know what his problem is, but will Handler#removeCallbacks(Runnable) fix it? Oct 08 20:21:15 evancharlton: i found a class on the internet that does something like that, but it does not appear to work well. the controls fail, and it is difficult to understand if it runs or not Oct 08 20:21:42 it has start and stop methods, but i think something is wrong with it Oct 08 20:22:06 any other language i wrote code in comes with such functionality :\ Oct 08 20:22:52 alund: basically, all timing code is screwed because nothing gets executed when the cpu sleeps Oct 08 20:23:11 Here's This Week in Android Development for those of you interested in what we broadcast in Android Developers Live last week, what's we've got coming up this week, and other Android news: http://www.youtube.com/watch?v=gWjrmotI0g8 Oct 08 20:26:00 Ge0rG: maybe so, but there are dozens of egg clocks and timers around, working just fine. they must be using some sort of timer, each and every one of them.. Oct 08 20:26:03 g00s: do you actually do work for a living? Oct 08 20:26:08 or just fart around on irc all day long Oct 08 20:26:27 ron_frown: i dont have a boss or landlord ;) Oct 08 20:26:53 but g00s does have a published android app :) Oct 08 20:27:08 fnord`: :) Oct 08 20:28:33 actually right ow i am finishing up my reading of 'Mobile Frontier" http://uxmag.com/articles/excerpt-from-the-new-book-the-mobile-frontier Oct 08 20:28:59 cool Oct 08 20:30:40 g00s: self employed? Oct 08 20:30:49 you could say that ;) Oct 08 20:31:06 uhh ok Oct 08 20:31:22 does that mean you are a pimp or something? Oct 08 20:31:34 ron_frown: lol wut Oct 08 20:31:55 ... Oct 08 20:32:54 smiley makes me wonder what you do for cash Oct 08 20:33:02 sounds.... questionable =) Oct 08 20:33:32 uh Oct 08 20:33:36 what the fuck? Oct 08 20:33:42 please don't be creepy ron_frown Oct 08 20:33:43 ron_frown: i would wonder why this is on topic or any of your business Oct 08 20:35:19 appearently, nothing at all is reliable... Oct 08 20:36:12 alund: I missed your original question; what are you trying to do? Oct 08 20:37:12 evancharlton: i am trying to find out how to create a timer-like function Oct 08 20:37:28 fnord`: I contribute plenty here Oct 08 20:37:44 alund: you mean like android.widget.Chronometer? Oct 08 20:37:46 like running a callback with an interval, startable and stoppable Oct 08 20:38:09 not like any android widget Oct 08 20:38:19 like running a method with an interval... Oct 08 20:38:20 alund: er, like a kitchen timer? like "beep in five minutes."? Oct 08 20:38:59 interval means repeat in equal periods Oct 08 20:39:16 what are your time intervals? minutes? hours? days? seconds? Oct 08 20:39:21 maybe "beep every 5 minutes" if i have to adapt to what you suggest Oct 08 20:39:28 evancharlton: does it matter? Oct 08 20:39:44 but if it does, max one second Oct 08 20:39:44 alund: yes Oct 08 20:39:55 you should tell him how much error can be tolerated Oct 08 20:40:00 alund: and do you want this to happen even if your app isn't in the foreground? Oct 08 20:40:02 Hey guys, I've noticed that when my app first starts, scrolling chugs as the heap grows a few times. Is there any way to tell the heap to grow to a certain point all at once or is it just one of those things you have to live with? Oct 08 20:40:24 evancharlton: for now, while in the foreground is fine. Oct 08 20:41:28 alund: then use a Handler Oct 08 20:41:45 can you point me to a working example of that? Oct 08 20:41:47 when your Runnable fires, have it reschedule itself with postDelayed Oct 08 20:42:16 ew Oct 08 20:42:16 Handler.postDelayed (Runnable r, long delayMillis) Oct 08 20:42:31 make sure you actually calculate the delay needed if you do that Oct 08 20:42:33 final Handler h = new Handler(); h.postDelayed(new Runnable() { public void run() { h.postDelayed(this, 1000); } }, 1000); Oct 08 20:42:50 and don't just assume it's 1 second from now, since your app could have slept longer than anticipated... Oct 08 20:42:50 zinx: meh Oct 08 20:42:55 :P Oct 08 20:43:00 I doubt he's building a real-time system on this Oct 08 20:43:04 if so, lolwut Oct 08 20:43:35 it's still handy to have it beep at the same amount of seconds after the minute.. Oct 08 20:43:47 it's not going to be precise in any case Oct 08 20:43:48 I think i will delete the crap instead :( Oct 08 20:43:54 due to loading/playing the sound having random delay Oct 08 20:44:14 but there's no reason to make it have drift too :/ Oct 08 20:44:57 Precision lies with AlarmManager Oct 08 20:50:22 fnord` / g00s: what if you're in a SherlockFragment and getSherlockActivity() is returning null? Oct 08 20:56:15 if i use a viewflipper will it change the content view/ Oct 08 20:56:21 in the same activity. Oct 08 20:56:22 ? Oct 08 20:57:49 no Oct 08 20:58:38 blaaah. silly Android-powered camera only uses its HDMI for reviewing old pictures, not for any other display purpose. Lame. Oct 08 21:11:40 snap. I'm having a problem with my code. I have implemented a onclicklistner in the oncreate for my activity and i have a set of buttons when clicked that i want to open a new layout. Can I do this or do i have to open a new acitivity/ Oct 08 21:11:41 Do I have to do this in a new activity or can i use the one its in. Oct 08 21:11:41 techdigy: if you want to change the layout, I would strongly recommend that you start a new activity Oct 08 21:11:41 or look into fragments Oct 08 21:11:41 alright sounds great lov Oct 08 21:11:41 if you're thinking about calling setContentView more than once in your activity, you should take a long hard look at what you're doing and why. Oct 08 21:11:43 do fragments have their own lifecycle? Oct 08 21:11:43 or are they embeded in the apps lifecycle? Oct 08 21:19:11 So, I was very careful to back up my personal keystore to several different computers Oct 08 21:19:24 but, I haven't used it for 3 months and now I have forgotten the password. Oct 08 21:19:41 Trying to brute it, but it may not be worth it since my only published app was in need of major overhaul anyway Oct 08 21:19:55 just did some work on it :| meh Oct 08 21:21:09 hello people Oct 08 21:22:58 I have a ScrollView with a bunch of Views in it , for some reason after I do some scrolling even items which were not shown report that in fact they were via method isShown() ! why ? Oct 08 21:24:46 psiche: what do you mea? Oct 08 21:25:32 i mean why does isShown() return true if I can't see that View on the screen of my phone ? :) Oct 08 21:27:43 maybe its your phone Oct 08 21:27:44 ? Oct 08 21:27:56 try it in the emulator with diffrent api verisions Oct 08 21:27:59 it google nexus Oct 08 21:28:52 also another thing thats bugging me is that I'm trying to download some stuff from a webservice but in 9 of 10 times i get a SocketTimeoutException Oct 08 21:30:32 here is my code : http://pastebin.com/av741uSu Oct 08 21:30:41 thats weird. i was looking up what fragments were and it happend to be the answer to what i was wondering how to do Oct 08 21:32:30 psiche: I don't know about that to complex. Oct 08 21:32:49 if you find looking things up in the documentation to be weird, then that's not a good sign Oct 08 21:38:38 well, that's it. goodbye old keystore. Oct 08 21:39:09 * fnord` refactored his apps package name. was a good opportunity anyway, as I was embarrassed I didn't go by the java style guidelines (pkg name should be all lowercase0 Oct 08 21:40:45 why can't things work as stated in the documentation ? Oct 08 21:41:58 1. language is ambiguous 2. docs can be out of date 3. often non-native english speakers write them Oct 08 21:43:19 psiche: isShown() doesn't mean visible on screen Oct 08 21:43:37 the "visibility" mentioned by the documentation refers to getVisibility() Oct 08 21:43:54 isShown() returns true if getVisibility() == View.VISIBLE for the View and all its parents Oct 08 21:43:56 hi; can i rename the package name in AndroidManifest.xml; without having to rename the package name for my main activity and application java classes? Oct 08 21:44:01 but the view can be off screen Oct 08 21:44:12 romainguy thanks! Oct 08 21:44:27 the doc is indeed ambiguous if you're not familiar with the Android framework Oct 08 21:44:36 (as a framework engineer I find it very clear unfortunately ;-) Oct 08 21:44:40 but then again the documentation could be more specific or written in a more clear way Oct 08 21:44:44 I'll ask the guy who wrote it to make it clearer Oct 08 21:44:48 I agree Oct 08 21:44:57 psiche: please file documentation bugs on http://b.android.com/ Oct 08 21:45:12 nice, thanks for the link as well Oct 08 21:48:14 and what about the SocketTimeoutException ? Oct 08 21:56:44 JakeWharton, Re: ScopedBus, why not just have Fragments grab the Bus singleton and register/unregister themselves? Oct 08 21:58:14 JakeWharton, I assume you use ScopedBus to register other things in the activity? I guess that's useful for other objects that aren't contexts. Oct 08 22:01:00 anyone knows a tool to edit res/layout/.xml files? (mean not a text editor) ;-) Oct 08 22:03:11 whats a good free txting app? i need a way to txt/recieve txts from my tablet, also one that i DONT need to tie to my phone, that just uses its own server or something to txt (as my phone is off atm, cuz its done with, and im waiting to see the new nexus phone(s) at the end of the yr before i get a new one) Oct 08 22:03:27 this channel is really for discussing development Oct 08 22:03:29 try #android Oct 08 22:03:42 dennistlg, Eclipse with ADT Oct 08 22:08:44 Eclipse is only windows right? Oct 08 22:08:51 need linux software Oct 08 22:08:58 O.o Oct 08 22:09:05 dennistlg: Eclipse works on linux and mac and several other unices Oct 08 22:09:19 ok thats good Oct 08 22:09:24 (it needs whichever lib is used for SWT backend + Java) Oct 08 22:09:29 s this the right way to do an intent? Intent whattoknowfirst = new Intent(com.baahhahha) Oct 08 22:09:42 techdigy: no Oct 08 22:09:48 though I recommend IntelliJ, which is iirc nearly-pure java and also runs on all the important platforms Oct 08 22:09:56 its hard to edit layout files with a text editor compile edit again to fix things and so on. Oct 08 22:11:10 eclipse has both rendering of layouts and visual designer, intellij has rendering (preview) Oct 08 22:12:12 have used netbeans to write my java code Oct 08 22:12:53 wait would this work.... i = new Intent(this, whatyouneedtolearnfirst.class); --> login.class with var startActivity(i); Oct 08 22:13:09 why don't you try it? Oct 08 22:13:21 sampullman: true... will do Oct 08 22:13:54 techdigy: this isn't really a "how do I android?" channel Oct 08 22:14:10 techdigy, please upper case your class names Oct 08 22:14:34 mrenouf|work: Forgot about that :D evancharlton: my appologies Oct 08 22:14:37 evancharlton: functionally, it seems like it is Oct 08 22:14:49 evancharlton, why do you say that Oct 08 22:15:31 p_l, on Linux, I do NOT recommend IntelliJ Oct 08 22:15:58 has worked great for me on debian.. Oct 08 22:16:31 I mean.. it works yeah. I just can't get past the non-native look and feel, and the fonts. don't get me started. Oct 08 22:17:24 Also Eclipse will always be generally more up to date with Android tooling as it's being developed by Google. The bits are ported into other IDEs but it takes time. Oct 08 22:17:25 [03:08:49pm] dennistlg: Eclipse is only windows right? Oct 08 22:17:33 works on all things Oct 08 22:17:37 its a great tool heh Oct 08 22:18:08 ok think i will give it a try tomorrow Oct 08 22:18:10 it doesn't work in my usual setup Oct 08 22:18:13 :) Oct 08 22:24:51 mrenouf|work: Eclipse is also slow. Slow enough that IntelliJ smoked it on my machine Oct 08 22:28:51 fast enough for me. 90% of the time is think time for me. Oct 08 22:29:31 It may depend on the machine, and maybe with fast enough systems the difference is negligable. But good point, Eclipse probably doesn't work well on old/slow machines without a ton of ram. Oct 08 22:29:50 but try both, and choose. Oct 08 22:30:01 mrenouf|work: if it was the *only* program running... it would be usable. as it happens, it's not, so I can't for example look up some docs/whatever without visible slow response Oct 08 22:30:17 (that's on 4G machine with C2D 1.8, too) Oct 08 22:30:45 * dennistlg has a machine with more than enought power to compile things fast ;-) Oct 08 22:30:47 I use 3.8 btw. I think 4.2 brings an ugly performance hit to the UI rendering with it's fancy new CSS layout. Oct 08 22:31:08 * Jug6ernaut hands dennistlg a cookie Oct 08 22:31:09 4.2 actually feels faster than 3.7 Oct 08 22:31:11 mrenouf|work: because it's boiler plate! Oct 08 22:31:21 4.2...has been weird fo rme Oct 08 22:31:23 for me* Oct 08 22:31:30 thanks jug6ernaut Oct 08 22:31:37 ;) Oct 08 22:31:54 mrenouf|work: we haven't seen any problems with activity and fragment base-clases doing this reg/unreg dance Oct 08 22:32:01 plus when combined with producers it works great Oct 08 22:32:24 JakeWharton, and you recommend onPause/onResume over stop/start ? Oct 08 22:32:39 Any suggestion as to how to draw a white border around my apps main activity view? Fairly new here, and still learning java... Oct 08 22:32:57 good night guys Oct 08 22:33:41 qkzoo1978, add android:padding="25dp" to your activity layout's top-level element Oct 08 22:34:04 lol Oct 08 22:34:07 :padding Oct 08 22:34:29 shows the tongue-out emoticon for me Oct 08 22:34:45 Ya... Oct 08 22:35:05 oh. I was like... why you laughin? got a simpler idea? Oct 08 22:35:11 <- xchat Oct 08 22:35:11 lol Oct 08 22:35:16 anyone here looked into the soft keyboard API/sample? Oct 08 22:36:54 mrenouf|work: yes. that allows you always interact with the UI (most notably, fragments) in an @Subscribe method Oct 08 22:37:21 if the orientation is changing and an HTTP callback comes in between onPause and onResume any resulting fragment transaction will throw an exception Oct 08 22:37:48 but by using the ScopedBus, the value will presumably be captured somewhere and then @Produce'd to your @Subscriber on the subsequent onResume Oct 08 22:38:30 JakeWharton, yep, I've hit that... cool. will do. Oct 08 22:40:07 Anyone have problems with latest ADT preview? Oct 08 22:40:30 I keep getting "Unable to execute dex: Java heap space". Oct 08 22:40:51 may I need to feed eclipse more ram Oct 08 22:43:16 mrenouf|work it shouldn't actually error out with default RAM settings ... Oct 08 22:43:52 yeah, I just confirmed it's not running out of main heap, it must be something related to running dex. Oct 08 22:59:57 can you use a PreferenceFragment outside of a PreferenceActivity? Oct 08 23:02:52 hey im looking at meminfo, and i notice after navigating around a bit, and I notice, under Objects. O jave "ViewRootImpl: 3" does that mean I'm leaking some window refrences? Oct 08 23:02:58 or activity refrences? Oct 08 23:03:28 does anybody know how to use EDGE motion event flags? they don't seem to trigger when i check for them Oct 08 23:11:18 ultra, looks like engineers on the group recommend not using this; instead to check when your coordinates are near the edge Oct 08 23:11:21 http://groups.google.com/group/android-developers/browse_thread/thread/64d8e9cdb93178d3 Oct 08 23:13:07 Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); Oct 08 23:13:09 int width = display.getWidth(); Oct 08 23:13:16 etc. Oct 08 23:13:21 thanks for checking on it.. the problem is that when ACTION_UP is detected as the finger is dragged off screen, the coordinate could be high if the finger is dragged quickly Oct 08 23:14:49 yeah, it sounds less than ideal Oct 08 23:15:28 I guess that would mean you'd have to look at more than one event Oct 08 23:15:44 I haven't written code like this, I'm just guessing here Oct 08 23:16:40 more than one event? Oct 08 23:16:47 or more than one event type Oct 08 23:16:48 ? Oct 08 23:17:05 well, I mean if you're worried about getting confused from the quick drag Oct 08 23:17:11 you could look at pervious events to see where the finger was moving Oct 08 23:17:27 presumably you'd see evidence that the finger is speeding up Oct 08 23:17:30 at any rate Oct 08 23:17:35 as I said, I haven't tried all of this Oct 08 23:17:44 ok Oct 08 23:20:18 in android 3.0+, is it possible to disable the navigation buttons? or at least, make it so they have to be double tapped to prevent accidental usage Oct 08 23:24:43 finally it worked can someone explain why Intent(this, Whatyouneedtolearn.class); worked instead Intent("com.techdigy.Whatyouneedtoknow"); Oct 08 23:24:48 ultra-: no Oct 08 23:25:08 disappointing.. at least i'll figure out how to turn them into dots like media apps do Oct 08 23:25:20 ultra-: it's called "light outs" mode Oct 08 23:25:24 er lights out Oct 08 23:25:26 ah ok Oct 08 23:25:31 hehe light outs Oct 08 23:25:47 techdigy, they both work, but you would have had to declair the action string in your manifest for the first to work Oct 08 23:26:07 hi, i have clock widget, which is update by ALARM_SERVICE, i want in my widget have information if screen is on or off, but i don't know how :( Oct 08 23:26:27 i want don't update widget when screen is off Oct 08 23:27:41 is there a standard way for making menus that are always visible, eg the same menu always at the top of every screen. i can only find tutorials on making menus for the hard button and pop ups when you press an item Oct 08 23:27:41 gutano: I see I did that it didnt work it might have been a misspelling. Another question.. Im using a switch incase to get the view id of the button and then it would change the activity baised off that ... the casses are like case R.id.button1: ... would I still need to make a new button and referer it to the id and then do a button.setOnClickListener(this) in the on create? Oct 08 23:28:02 mfratczak: just use RTC instead of RTC_WAKEUP and it won't wake up the device Oct 08 23:29:45 has anyone had any luck reading multiple keycodes from a Keyboard XML file? Oct 08 23:29:48 evancharlton, i use: alarmManager.setRepeating(AlarmManager.RTC, calendar.getTimeInMillis(), 1000,createClockTickIntent(context)); but when i screen off, i see my debug that widget is update every second, Oct 08 23:30:06 argh.. my app is essentially a grid of buttons… everything for motion events is overridden and i do it all manually, but when the finger is dragged off-screen, there's no way to differentiate between that and ACTION_UP Oct 08 23:30:07 according to the docs, you're supposed to put in multiple comma-separated codes to android:codes Oct 08 23:30:25 myabe don't work becouse i have USB plug in? or normal don't work too ? Oct 08 23:30:45 which then in theory get passed into keyCodes on onKey in the OnKeyboardActionListener Oct 08 23:30:50 but nothing seems to end up in there Oct 08 23:30:59 it just blanks out when you put multiple keycodes in Oct 08 23:32:59 techdigy, I'm not sure I follow your question exactly... you can use a common OnClickListener, that is fine, but switch/case don't work well with resourceID's for cases (use if/else comparison).. specifics are googleable.. Oct 08 23:33:32 techdigy, and yes you would need to assign the listener to both all buttons using this listener Oct 08 23:34:14 gutano: even when im not refering to the set up name of the button but the id? Oct 08 23:34:58 techdigy, wherever it fails to compile or run ; ) Oct 08 23:35:29 techdigy, do it how you think it should be, and if it fails, you have a lead on the what (maybe not the why0 Oct 08 23:36:31 techdigy, gl, I gotta take my kid to the docs, has an ear infection or something =( Oct 08 23:36:54 yeah. I think it does. Thanks gutano for your help! I 'm learning more everday thanks to everyone on this channnel. Hope your kid gets better. Oct 08 23:42:12 is there a way to force android to update the finger position read at a given time? Oct 08 23:43:43 how so? Oct 08 23:45:20 ? Oct 08 23:53:56 OT: silly bash question: I'm trying to send JSON to a service using "am startservice". Anyone know how to pass a parameter containing double-quotes without having to \" escape every single one? Oct 08 23:54:15 use a single quote as the delimiter? Oct 08 23:54:20 (not sure if that works. worth a shot though) Oct 08 23:54:26 of the json? Oct 08 23:54:48 I tried quoting the string with single-quote, but shell at all the double quotes Oct 08 23:54:49 either Oct 08 23:56:24 same either way :-( Oct 08 23:56:27 no quotes Oct 08 23:56:53 I wonder if it's the combo between running on bash, then'adb shell am' Oct 08 23:57:48 yeah, that was it. if I "adb shell" first, then paste in the "am startservice" it works and doesn't lose my quoting Oct 09 00:01:43 mrenouf|work: where did you read about ScopedBus? Oct 09 00:12:11 JakeWharton, Comments of http://corner.squareup.com/2012/07/otto.html Oct 09 00:13:03 Ah, yes. I need to move that into the example project or something so it's more discoverable. Oct 09 00:13:46 So my use case is using Bus as the backchannel from a Service which performs searchs in the background. Oct 09 00:15:13 I'd been using binding/localservice technique to both send requests, but to be notified of results I had a bunch of associated Callables Oct 09 00:15:37 and the bindService->getCallable->addListener->onSuccess callback chain was just getting out of hand Oct 09 00:16:58 Hello, how much does limiting projection to just columns needed speed up queries? Oct 09 00:17:28 lasserix: depends on how much data you're throwing away Oct 09 00:17:44 if you're pulling out a 1MB blob and just ignoring it, well, that could be quite a bit Oct 09 00:18:11 Ahh that makes sense thanks Oct 09 00:18:17 what are people's thoughts on READ_PHONE_STATE permission? I personally avoid installing apps that require it unless i trust that app 100%, but how common is that? Do "normal" users get scared off installing an app if it requires READ_PHONE_STATE? Oct 09 00:18:18 Just some strings Oct 09 00:18:32 spifff: no, normal people don't care Oct 09 00:18:40 lasserix: also, your cursorwindow is less likely to need to be refilled if you are judicious about only selecting data you need; and cursor window refills cause jank Oct 09 00:18:51 you could have STEAL_CREDIT_CARD_INFO any they would install it Oct 09 00:19:08 lol Oct 09 00:19:17 Ahh I see thanks Oct 09 00:19:41 how about YOU_WILL_DIE_IF_YOU_INSTALL_THIS Oct 09 00:19:48 or FBI_ARREST_YOU Oct 09 00:20:09 my all time favorite is actually: android.permission.BRICK Oct 09 00:20:20 it's real, but unused (I think) Oct 09 00:20:28 JakeWharton: haha Oct 09 00:20:39 FBI_arrest_you is internet permission Oct 09 00:21:02 it blows my mind that there is no desperate 'ads' permission, Oct 09 00:21:03 of course adding the permission in an update means it will prompt people to re-accept... Oct 09 00:21:44 and that any programming with as has the abilities it needs to wake up at 3am, and start scanning your network Oct 09 00:22:03 with ads Oct 09 00:33:22 I was thinking it might cause people to use the update more. The ones who ignore updates will continue to ignore. The ones who actually check "auto update" will see the update prompt, and read the update description, see what new stuff you added and maybe actually use it more. Oct 09 00:33:56 alright down to the last 5% to be done! Oct 09 00:37:39 I want to create a 2 column layout, with one column of fixed width (say 50dip), similar to how the 500px app looks. What should my base layout container be? I'm having trouble to get this to work. Oct 09 00:38:48 anyone in here very familair with sysdump meminfo Oct 09 00:39:12 Having an issue adding a ViewPager to my custom dialog: [Error] 10-08 20:37:19.439: E/AndroidRuntime(21681): java.lang.IllegalArgumentException: No view found for id 0x7f090003 for fragment MyActivity{4052db30 #0 id=0x7f090003 android:switcher:2131296259:0} [R.java] public static final int dlg_Content=0x7f090003; Oct 09 00:40:23 mdkess, try a LinearLayout (horizontal) then add a LinearLayout(vertical) with width "50dp" and another LinearLayout(vertical) with width "fill_parent" Oct 09 00:42:25 very specifically, it seems to trip on this line: ViewPager dlg_Content = (ViewPager) dialog.findViewById(R.id.dlg_Content);dlg_Content.setAdapter(mPagerAdapter); Oct 09 00:42:41 without said line, it boots fine (without the pager of course) Oct 09 00:43:02 Komak57, I tried that, but it seems that the left linear layout (the not 50dp one) just fills the entire parent view, pushing the fixed width one off screen. Oct 09 00:43:11 mdkess if one column is 50dp and the other should fill the rest of the screen use linearlayout horizontal set width of column 1 to 50dp and set width of column to to 0dp but add layout_weight=1 Oct 09 00:43:29 the second column will fill the rest of the screen via the weight, setting width=0dp is an optimization Oct 09 00:44:13 lasserix, ah, that did the trick. Oct 09 00:44:19 Found the problem with making a setcontent view on top of another one when a button is clicked.. you cant use the back button to go back Oct 09 00:44:30 Thanks both of you Oct 09 00:44:34 techdigy sounds like you should be using fragments Oct 09 00:44:44 np goodluck Oct 09 00:45:17 lasserix: I looked into it i couldn't really find out what your talking about... is this it? http://developer.android.com/guide/components/fragments.html Oct 09 00:45:32 techdigy, you could always intercept the back button? Oct 09 00:45:39 what's the diff between spacingWidth and spacingWidthUniform in a gridview? Oct 09 00:46:05 yeah basically if you are having to call set content view you are probably needing to logically divide the interface into different portions, formally you'd do this by launching seperate activities but now with fragments you can just load the new fragment Oct 09 00:46:17 anyone have any idea why my code works with Activity views, but not my custom dialog? Oct 09 00:46:19 and the back functionality will be automatically handled, Oct 09 00:46:35 Komak57: would that be like onBackPressed() Oct 09 00:46:41 Komak57 i dont know but I get the feeling somewhere you should prefix some call with getAcitivity() Oct 09 00:47:29 techdigy: it's bad design to have to call setcontentview more than once per activity, Oct 09 00:48:31 lasserix, not if he doesn't want to load a new activity process. Oct 09 00:48:52 techdigy, I would say that's one route to go. Never tried it, but that's what I'd look into? Oct 09 00:49:02 lasserix: Yeah I'm going to end up making another activity. Do your guys' manifest files have too many activities Oct 09 00:49:29 techdigy, alternatively, if this is the base activity, you can catch it on the onDestroy? Oct 09 00:49:47 techdigy just use fragments: http://neilgoodman.net/2012/01/29/working-with-fragments-on-android-part-1/ Oct 09 00:49:51 that should get you started Oct 09 00:50:31 Komak57: I'm trying to make it all in one activity. I know it isn't a good idea I just wanted to have an idea of if it would work good or not. Oct 09 00:50:48 lasserix: thanks for giving me the reference I'm looking into it as we speak Oct 09 00:50:54 basically you call set contentview once with just a framelayout, that framelayout gets replaced by a fragment which is it's own kind of unit of interface Oct 09 00:51:58 lasserix, any idea why I can't get the fragments to load in my custom dialog view? Oct 09 00:52:19 somewhere in your referencing the dialogue you have to prefix the call with getAcitivity since you are using fragments? Oct 09 00:52:39 ie it's looking in the fragment but the dialog lives in the activity, that's just a guess though Oct 09 00:52:53 *an educated guess from back when i had similar dialog finding views problems Oct 09 00:53:52 It's rather raw... no getActivity calls Oct 09 00:54:01 lasserix: sounds good. If I click on the physical back button will it take me back to the old layout? And how would it look on small devices? I think I might run into a problem... I never knew why i decided to devlop for 2.1 up Oct 09 00:54:38 haha i do the same thing techdigy, but yeah it'll handle that plus you can use the automatical screen size resolver to specify different layouts Oct 09 00:55:13 ie if you have two fragments that each take up their own screen on a phone, you can easily place them side by side on a tablet using fragments Oct 09 00:55:48 *automatical screen size resolver, i just mean specifying the layout folder conditions ie layout-large layout-port etc etc Oct 09 00:56:12 komak57 dunno otherwise maybe if you can post some code Oct 09 00:56:37 lasserix: lol. sounds great! I would love my app to look more tablet freidnly anyways. And just to confirm it would work on my api verision or will I have to change it to something else? Oct 09 00:57:22 lasserix: http://codepad.org/UWGPXllg Oct 09 00:57:29 you'll have to use the support library Oct 09 00:57:51 support lib v4 is installd Oct 09 00:59:20 I moved the fragment adder to post-show to see if it would fix the error. No change? Oct 09 01:00:29 are you putting a viewpager inside a dialog? Oct 09 01:00:41 JakeWharton, you've used Otto from services right? Any tips on that? Oct 09 01:01:28 Did someone have an issue with NFC tags being read as empty when they're not empty then when you read them again they show up as non-empty and show their data? Oct 09 01:01:32 techdigy make sure you read the official developer stuff on how to communicate stuff from your fragment to your activity (ie so you can cross talk among fragments) using the interface listener Oct 09 01:03:01 in some of my operations, an empty tag triggers an update action of some sort that can possibly erase the data... and when it's not empty and misread, I'm running into doing this falsly. Is there any way around that unreliability hit of the readers(I'm assuming)? Oct 09 01:05:00 komak57 dunno looks like it should work :/ Oct 09 01:05:30 I mean if you can find the button why not the view pager? unless an id reference is off or something Oct 09 01:05:37 lasserix, it does fine in an Activity of it's own... but it seems to crap itself running it in my dialog? Oct 09 01:06:29 Sometimes I feel so confused. I just learned all this 2 months ago from basic experiance. Oct 09 01:06:40 *experience Oct 09 01:06:55 ^^^ there we go... I told you I'm confused ahhahaha Oct 09 01:06:57 techdigy: it gets better, espicially when you get it working, it'll make your life easier Oct 09 01:07:14 lasserix, yeah, that was my first idea, hence I looked in the R.java. Even tried cleaning the project. It's all very weird >_> This would handle really unique if I can get it working Oct 09 01:08:06 yeah I kind of see what you are doing, cool design, might implement for my help menu Oct 09 01:08:27 Actually, I almost want to make this my entire activity XD Oct 09 01:09:16 i would try to add another view pager in your xml dialog layout and see if you can find that Oct 09 01:09:43 i mean since you can find the dlg_close button i don't know why you should be able to find a viewpager Oct 09 01:10:55 mrenouf|away: should work fine. i dont use otto; but my own port of guava eventbus. Oct 09 01:11:55 lasserix, it finds it just fine. commenting out dlg_Content.setAdapter(mPagerAdapter); and the app launches just fine. Error with: java.lang.IllegalArgumentException: No view found for id 0x7f090003 for fragment MyActivity Oct 09 01:14:16 I know many of you people here might be google lovers and I am too but how do you publish your apps on other platforms? Oct 09 01:17:02 i dont :) Oct 09 01:18:18 canadiancow: did you see that cool new robot that milks cows w/o any human intervention at all ? Oct 09 01:18:37 its great, because it also feeds you guys too Oct 09 01:19:04 but the radiocollar ids you, so you cant keep going up to it for more feed Oct 09 01:20:50 um Oct 09 01:20:55 you know g00s Oct 09 01:20:59 im not ACTUALLY a cow Oct 09 01:21:06 you arent ? Oct 09 01:22:42 techdigy: best to know all the platforms and make the pick on best fit. that said, android is nice that it allows you to iterate concepts quickly because there is no submission queue Oct 09 01:23:28 i was reading earlier, the ios queue is roughly 28 days now - but i thought it was actually more complicated in that your wait can get longer if you submit too many updates Oct 09 01:24:29 Robotic milking machines have been around for a few decades now. Oct 09 01:24:31 Just sayin'. Oct 09 01:24:38 Cow walks in and it's all automatic. Oct 09 01:24:57 At this point, they even customize the amount and type of feed on an individual level. Oct 09 01:25:15 yeah,thats what i was reading about Oct 09 01:25:33 g00s: thats pretty sad Oct 09 01:25:34 they tailor the feed to each cow, and alert the farmer if a cow hasn't come to get any, etc Oct 09 01:25:55 do you guys develop first hand for other os? like iOS and Windows phone ? BB? Oct 09 01:26:05 mrenouf|work: no, we only have one service and it run on the main thread Oct 09 01:26:37 techdigy: I once looked into iOS developement, but that time has passed (the startup died, that is) Oct 09 01:26:46 where is the edit text widget? Oct 09 01:27:18 panegyric: try the documentation search function ;) Oct 09 01:27:41 just tell me Oct 09 01:27:44 i cant find it Oct 09 01:27:49 i used it before Oct 09 01:27:58 you're lazy Oct 09 01:28:04 man why are you guys ass holes in here Oct 09 01:28:10 u must feel like a man Oct 09 01:28:12 fucking idiot Oct 09 01:28:24 hehe Oct 09 01:28:45 you must have a small cock Oct 09 01:28:54 its the only possible explanation Oct 09 01:28:58 does your love life suffer? Oct 09 01:28:58 you must be off your meds Oct 09 01:29:04 do you even have a love life? Oct 09 01:29:16 g00s: /ignore to the rescue :) Oct 09 01:29:22 uh oh we got a steve jobes in here Oct 09 01:30:21 panegyric: you keep asking questions that are very easily searchable. its not a one time thing, its a behavioral pattern Oct 09 01:30:32 antipattern :) Oct 09 01:31:48 i cant find it ok Oct 09 01:31:57 would i be asking if i could find it Oct 09 01:32:00 i keep telling you this Oct 09 01:32:12 http://www.google.com/search?q=edittext&rlz=1C1CHFX_enUS448US448&oq=edittext&sugexp=chrome,mod=0&sourceid=chrome&ie=UTF-8 Oct 09 01:32:18 1st result Oct 09 01:33:09 panegyric doesn't even need to try to troll Oct 09 01:33:17 gj Oct 09 01:33:21 * gutano applause Oct 09 01:33:58 panegyric: Keep it polite please Oct 09 01:34:33 Anyone use encrypted sqlite database in app here? Oct 09 01:34:38 i try but people here are really counterproductive to ppl like me trying to get answers Oct 09 01:34:51 maybe if you didnt call them a fucking idiot... Oct 09 01:34:53 (ex g00s) Oct 09 01:34:56 panegryic: http://www.google.com/search?q=edittext&rlz=1C1CHFX_enUS448US448&oq=edittext&sugexp=chrome,mod=0&sourceid=chrome&ie=UTF-8 Oct 09 01:35:06 it's the first result Oct 09 01:35:15 * Komak57 stabs his app Oct 09 01:35:18 this is NOT working Oct 09 01:35:19 common ettiquete for these types of channels is to atleast appear to have made some effort to help yourself before asking Oct 09 01:35:19 canadiancow i didnt say that until just a few minutes ago Oct 09 01:35:27 panegyric: Your question *was* lazy and your reaction was inappropriate Oct 09 01:35:33 +1 Oct 09 01:35:42 panegyric: People are very helpful around here and help is never a guarantee Oct 09 01:35:56 panegyric: Everybody is doing it on their spare time so try to be understanding Oct 09 01:36:05 ok thanks romainguy Oct 09 01:36:13 komak57 although it sucks i'd just make a blank fragment activity with JUST the viewpager and see if you can get it working Oct 09 01:36:18 ill just block him, he keeps doing it Oct 09 01:36:28 wasting my time Oct 09 01:36:28 panegyric: And to answer your question, it's android.widget.EditText Oct 09 01:36:35 i know that romain guy Oct 09 01:36:42 but im trying to find it from the visual editor Oct 09 01:36:50 the "palette" Oct 09 01:37:04 Ah, cannot help you there, I don't use it myself Oct 09 01:37:07 do they compartmentalize editText and TextView Oct 09 01:37:19 oh ok Oct 09 01:37:19 you' Oct 09 01:37:26 d probably find it under "Text Fields" Oct 09 01:37:49 also your question was ambigious at first i had no idea what you were really asking Oct 09 01:37:51 it's there but how about editText Oct 09 01:38:00 they dont distinguish on the palette itslef Oct 09 01:38:02 ? Oct 09 01:38:05 It should Oct 09 01:38:08 Let me check Oct 09 01:38:30 all the textfields come with the attributes for the kind of text input you are requesting Oct 09 01:38:41 you can add anyone and remove those attributes to get a barebones et Oct 09 01:39:07 panegyric: They are in the Text Fields category Oct 09 01:39:17 Any one of them is an EditText Oct 09 01:39:26 But you're probably looking for "Plain Text" Oct 09 01:39:59 lasserix, commenting out the fragments.add lines and it boots fine >_> Oct 09 01:40:54 sooo, the issue is the context of mPagerAdapters elements? Oct 09 01:41:23 ahh that kinda makes sense Oct 09 01:42:51 how about the textview then? Oct 09 01:45:26 Hm, the docs I'm reading (http://developer.android.com/tools/device.html#setting-up) appear to be slightly out of date. Do I still need to set up a udev rule (devleoping on xubuntu 11.4) Oct 09 01:46:53 lasserix, any idea what I would change the context to? Oct 09 01:49:36 you add them in the activity not the dialog is all i can think of Oct 09 01:49:46 then pass that to the pager adapter? Oct 09 01:49:56 or use getActivity().add Oct 09 01:52:18 puff i didnt have to set anything up on 12.04 Oct 09 01:54:41 p_l: yeah... Im going to focus on android... Sorry I was in the shower btw Oct 09 01:54:51 good night guys Oct 09 01:57:17 <[fields]> I'm installing an Android PhoneGap Plugin. I don't usually do Java code but I've managed to resolve the errors I was getting and am left with an error of: R cannot be resolved to a variable, can anyone help me with this? Oct 09 01:57:48 canadiancow: Cool. Oct 09 01:59:04 is there any way to swap too fragments without showing the fragment underneath ? Oct 09 01:59:05 [fields]: import that (try eclipse hover assist). choose yours, not android.R Oct 09 01:59:07 *two Oct 09 02:01:06 <[fields]> g00s: any idea where mine may be defined? Oct 09 02:01:28 it would be in yourPackage.R Oct 09 02:02:00 i mean, unless you see the gen/ dir is missing and it hasn't been generated Oct 09 02:02:11 (like, you have an error in an xml file) Oct 09 02:02:32 but i dont know anything about phonegap Oct 09 02:12:26 lasserix, yeah, no... I don't think I'll be able to use a fragment based ViewPager in my custom Dialog box. I'll just have to find some other view that I would like. Oct 09 02:18:45 Komak57 I might use that scheme to setup my help menu so if i can get it working ill let you know Oct 09 02:22:43 does any of the android apps use the 'press & tap' gesture (one finger presses, the next finger taps while the first finger is down) Oct 09 02:22:47 *do Oct 09 02:23:43 Hi all, I really need some help. I am stck with the extreme noise caused by AcceloroMeter, MagneticField for week now. The OpenGL objects I render are shaky even when I don't move my device. I have tried different filters like low pass still not mch difference. Oct 09 02:29:59 cool http://www.lukew.com/ff/entry.asp?1071 Oct 09 02:30:11 gesture reference Oct 09 02:33:35 Why would I get an invalid URI type if I have it properly set up (that is, I added another one using identical setup to a previous, changing the proper variables)? Oct 09 02:37:11 shiet Oct 09 02:37:15 missed my odroidx today =( Oct 09 02:37:34 your what? Oct 09 02:38:08 android on the chart http://news.dice.com/2012/10/08/it-job-skills-in-demand/ Oct 09 02:38:34 http://liliputing.com/2012/07/hardkernel-odroid-x-129-android-developer-board-with-quad-core-cpu.html Oct 09 02:38:45 weird list isn't android also software development? Oct 09 02:42:14 quad exynos 4412 processors BIATCH Oct 09 02:44:48 lasserix: heh, yeah O.o Oct 09 02:46:12 so i'm working on a 3d game for android. am i screwing myself over by setting my target to 1.5?:p Oct 09 02:46:22 hes Oct 09 02:46:23 is there a maximum number of uris? Oct 09 02:46:24 yes Oct 09 02:46:35 I dont think there are any 1.5 devices out anymore Oct 09 02:46:41 my G1 xD Oct 09 02:46:53 you should target the latest SDK Oct 09 02:46:57 but even that's on froyo most of the time Oct 09 02:46:59 set your min to whatever you want Oct 09 02:47:07 you should also compile with the latest SDK Oct 09 02:47:34 hmmm, what's the argument for "android create project" to do that? Oct 09 02:47:50 i don't know, just change your project.properties and AndroidManifest.xml Oct 09 02:48:08 alright Oct 09 02:49:37 thank you Oct 09 02:53:33 i assume "android:versionName="1.0" means that 1.0 is the minimum? Oct 09 02:55:24 that's your app version, you want an element inside manifest... Oct 09 02:55:29 like.. Oct 09 02:56:29 gutano: thank you very much Oct 09 02:56:40 np =D Oct 09 02:56:49 fucking breaks, always forget them cause me all kinds of trouble Oct 09 02:57:39 eugh, switches are nasty Oct 09 02:57:54 yeah i've heard you want to use if / elses for obsfucation too **** ENDING LOGGING AT Tue Oct 09 02:59:59 2012