**** BEGIN LOGGING AT Sun Nov 09 02:59:57 2008 Nov 09 04:15:16 is there a way to get a unique identifier from the android system on the handset? Nov 09 04:27:12 is there a way to access resources (such as arrays) from the code? with strings you can use getString(int resid).. Nov 09 04:31:34 got it: getResources().getStringArray(int resid) Nov 09 13:36:38 wonder what ID ArrayAdapter getItemId(int position) returns.. Nov 09 13:37:06 as there is no add(Object item, long ID) (sadly) Nov 09 18:59:31 tauno: the id is simply the position of the item Nov 09 19:06:22 if i have multiple activities in my applications are the shared preferences the same throughout the app or does each activity have its own prefs? Nov 09 19:07:30 they're the same, hence the name "shared" preferences Nov 09 19:07:37 :) just checking Nov 09 21:02:09 anyone around? Nov 09 21:59:50 romainguy_ ping Nov 09 22:20:25 anyone dealt with SharedPreferences at all? Nov 09 22:27:40 i have Nov 09 22:28:17 hey jasta Nov 09 22:28:24 it's basically just an abstraction of key/value pairs stored to disk. supports multiple dictionaries though so thats nice Nov 09 22:28:29 sup :) Nov 09 22:28:43 man, #android is nothing but talk about getting and keeping root anymore. kind of annoying. Nov 09 22:28:50 yea, very annoying Nov 09 22:28:58 wake me up when we can flash the damn thing. id ont care until then :) Nov 09 22:29:03 :) Nov 09 22:29:18 can sharedpreferences be used between activities in a single app? Nov 09 22:29:26 yes Nov 09 22:29:30 i was told yes, but it doesn't seem to work Nov 09 22:29:37 thats actually why theyre called SharedPreferences :) Nov 09 22:30:00 it definitely will work. the email app, for instance, makes extensive use of this Nov 09 22:30:03 i figured as much, but the activity that saved off the preferences can read them but the other activity can't Nov 09 22:30:11 did you commit()? Nov 09 22:30:11 which mode do you use? Nov 09 22:30:14 yes Nov 09 22:30:40 i typically use MODE_PRIVATE Nov 09 22:30:51 hm, that's what i have it set to Nov 09 22:30:51 but the mode just specifies unix permissions Nov 09 22:30:58 yea for the file right? Nov 09 22:31:03 yeah Nov 09 22:31:07 well, try this Nov 09 22:31:27 try committing the changes and then adb shell cat prefs_file | xxd and see if the setting was written to disk Nov 09 22:33:33 its there Nov 09 22:33:42 in an xml file with the activity name Nov 09 22:33:56 erm Nov 09 22:34:09 that's probably not right :) Nov 09 22:34:11 sharedPrefs/AccountSetup.xml in my case Nov 09 22:34:16 shared_prefs* Nov 09 22:34:29 does the other activity access it as name "AccountSetup"? Nov 09 22:34:58 SharedPreferences supports multiple dictionaries, so in this case you've made one called AccountSetup. you'd have to access it by that name everywhere. Nov 09 22:35:47 oh ok, so call getPreferenes( "AccountSetup", MODE_PRIVATE ) Nov 09 22:35:54 specify the file? Nov 09 22:36:05 i dont have the docs pulled up but yeah that looks right Nov 09 22:36:15 even on debug mode you can't see any of that on the device Nov 09 22:36:16 the name parameter refers to the particular dictionary you want Nov 09 22:36:26 i had to pull it up in the emulator Nov 09 22:36:26 generally, most apps would only have one dictionary, global to the whole app Nov 09 22:36:30 yea Nov 09 22:36:38 i'll do that Nov 09 22:38:45 how's the mail app coming along? Nov 09 22:38:56 actually, im packing up a version for external testing right now Nov 09 22:39:01 nice Nov 09 22:39:09 how does the mail app store passwords? Nov 09 22:39:20 not sure, let me check Nov 09 22:41:28 *ugh* Nov 09 22:41:35 looks like plain text as part of the intent uri Nov 09 22:41:43 ouch Nov 09 22:42:36 hey btw, i confirmed that you do not need READ_PHONE_STATE permission in order to detect incoming calls Nov 09 22:42:40 or outgoing calls, actually Nov 09 22:43:01 i'm guessing... bug? Nov 09 22:43:06 probably Nov 09 22:43:12 but its documented to behave this way Nov 09 22:43:16 so who knows Nov 09 22:46:10 i'm working on irc for android Nov 09 22:46:26 i currently am using connectbot and its working pretty good hehe Nov 09 22:46:37 but yeah, a native client would probably be best. i'm just so lazy i dont want to set up a bounce Nov 09 22:46:49 i've got it running pretty fast Nov 09 22:48:14 hmm, RSSReader in the android source tree? Nov 09 22:48:36 oh its a sample Nov 09 22:49:44 :) Nov 09 22:51:12 do you want to try out the email apk? Nov 09 22:52:02 sure Nov 09 22:52:08 alright, ill post it Nov 09 22:52:25 its a good idea to clear out your accounts in the existing email app first Nov 09 22:52:28 and load them all into the new one Nov 09 22:52:33 cool Nov 09 23:01:50 hmm, cute. im not getting data at my house at the moment Nov 09 23:02:13 also, ive been having this big issue with the radio lately where it will just stop transmitting downstream Nov 09 23:02:19 i have to go airplane mode and then back to get it to work Nov 09 23:03:13 yea? Nov 09 23:03:30 i haven't had too many issues with it... 3G goes bonkers every once in a while Nov 09 23:03:40 it started happening yesterday Nov 09 23:03:44 but it was an issue all day long Nov 09 23:03:58 embarrassingly, it happened when i was showing someone my app Nov 09 23:04:02 and it just magically stopped working Nov 09 23:04:05 despite 3G service Nov 09 23:04:09 then i tried the browser, wouldnt work Nov 09 23:04:44 damn Nov 09 23:05:57 http://jasta.dyndns.org/android/Exmail.apk Nov 09 23:06:10 cool Nov 09 23:06:51 the biggest missing feature right now is that it doesnt intelligently recover broken connections Nov 09 23:06:54 which is an issue if you use wifi Nov 09 23:07:11 because wifi disables 2G/3G when it turns out, then it turns off when the phone sleeps Nov 09 23:07:20 yea Nov 09 23:07:21 so basically in this case, you won't get push e-mail for about 2 minutes each time this happens Nov 09 23:07:53 but i dont even turn on wifi, so in that case its not an issue at all really Nov 09 23:08:05 except when you lose data service, it won't be doing push for about 2 minutes Nov 09 23:09:01 cool, installed successful Nov 09 23:10:39 it also detects read/unread changes in real time, and deleted messages Nov 09 23:11:10 sweet Nov 09 23:12:17 yeah works pretty good i think. Nov 09 23:12:22 go ahead and try it for a few days or something Nov 09 23:12:52 i dont think its too aggressive on battery right now either. it does a keep alive every 2 minutes, which simply sends DONE, then IDLE to the server Nov 09 23:12:56 like 20 bytes or so exchanged. Nov 09 23:13:55 cool Nov 09 23:14:39 jasta: that can be expensive in that it can be waking up the radio and CPU Nov 09 23:15:22 romainguy__: yeah, but it must be exactly what gtalk does Nov 09 23:15:38 maybe my timing is off, but afaik they can't have any other more clever trick than this Nov 09 23:15:53 if I remember correctly, I think Gtalk does something every 15 minutes Nov 09 23:16:15 also, the server has special support for this, so maybe they have a special way to help the connection stay alive on their side Nov 09 23:16:20 i doubt that. in my tests, the carrier network performed an orderly shutdown after 10 minutes of inactivity Nov 09 23:16:47 romainguy__: well, the only other way to do it still requires the cpu wakes up. Nov 09 23:16:56 you could have the server send keep alives to the client (rather than the other way around) Nov 09 23:17:05 but it doesnt much matter in practice, since both methods wake the cpu. Nov 09 23:19:02 where is some good docs to start android programming with "no knowledge of java" Nov 09 23:19:42 romainguy__: jason originally tried to get clearance to give me this information, but i believe he failed Nov 09 23:19:56 what information? what Gtalk does? Nov 09 23:20:02 still, i have knowledge of how other platforms do it, and it the ideal solution still drains battery Nov 09 23:20:11 -it Nov 09 23:20:18 yeah, how gtalk does it Nov 09 23:20:24 all I know is that a great deal of work went into Gtalk both on client and server to do this efficiently Nov 09 23:20:43 but what they do exactly I don't know Nov 09 23:20:43 i believe that, but im certain its all just tweaking Nov 09 23:20:55 if you think so :0 Nov 09 23:21:06 anyway, I'm not surprised you can't get this information Nov 09 23:21:07 the only other way to do it properly is to have the carrier's cooperation to eliminate their idle timeouts. Nov 09 23:21:22 and, at least for AT&T, that is impossible to get. Nov 09 23:21:28 t-mobile is likely the same Nov 09 23:21:49 why would you be surprised? this isnt a trade secret unique to google Nov 09 23:21:59 nor is it an algorithm they own, came up with, etc. Nov 09 23:26:27 then you have a naive way of how a company like Google works Nov 09 23:26:47 go try to ask someone from legal if a random developer from outside can get info about internal stuff Nov 09 23:27:00 even it's nothing innovative, etc. Nov 09 23:27:05 that's just how it is Nov 09 23:27:46 well, it doesnt much matter, since i know how this is solved on other platforms Nov 09 23:28:25 and it is done using an application layer keep alive on an interval particular to the carrier network, which does invariably require that the cpu wakes and the data radio transmits Nov 09 23:29:17 anyone know any good links not on android really but on understanding mobile telephony? -- such as all the concepts that go into understanding the technology behind it Nov 09 23:33:18 jasta: have you seen the video I sent you a link for btw? Nov 09 23:34:23 romainguy: know any articles on understanding the process behind mobile telephony? Nov 09 23:34:28 nope Nov 09 23:34:35 you already asked :) Nov 09 23:34:42 haha true Nov 09 23:34:49 know you Andoird SDK? Nov 09 23:35:02 (is that proper phrasing? "knowing the Android SDK" ) Nov 09 23:37:57 romainguy__: yeah, but im not so sure that this is the right strategy for my app Nov 09 23:38:15 might not be Nov 09 23:38:21 i like seeing the artists as i scroll, its helpful along with the name to detect who it is youre looking at Nov 09 23:38:29 I agree Nov 09 23:38:35 and the performance of my app flinging even very fast is not actually bad Nov 09 23:38:38 but in my experience is slows down scrolling considerably Nov 09 23:38:50 that depends, after all, on many things Nov 09 23:38:56 especially the size of the thumbnails Nov 09 23:38:56 the performance using the fastscrollview appears bad, but upon closer inspection that is because it doesnt scroll smoothly Nov 09 23:39:10 I don't take that into account Nov 09 23:39:23 if a fling appears to stutter, I consider performance bad Nov 09 23:39:43 (and loading tons of images usually causes GCs, which in turn cause stuttering) Nov 09 23:46:51 well, i would like to implement something like you have for performance reasons Nov 09 23:47:06 but im just not sure i like the trade-off Nov 09 23:47:22 i will probably implement it just to so i can compare Nov 09 23:48:00 but im pretty happy with the performance just by using a bitmap cache. i have the advantage of lots of entries in the list not having artwork so i can use the cache to load those very quickly Nov 09 23:49:18 romainguy__: do you think i should commit my "jitter" fix to FastScrollView even though the widget is in transition? it might just force the maintainer to realize that there is an issue with the current implementation in large lists Nov 10 00:05:49 the Gallery has a view intent correct? Nov 10 00:06:14 what gallery? Nov 10 00:06:25 the image gallery Nov 10 00:06:34 you mean the pictures app? Nov 10 00:06:38 yea Nov 10 00:06:43 oh i dunno, im sure it would Nov 10 00:06:54 manifest says it does Nov 10 00:06:57 google was really good about making their apps respond meaningfully to obvious intents Nov 10 00:07:57 i noticed... i'm probably not calling the intent properly Nov 10 00:08:30 * jasta starts ogg/wma/flac support in Five... Nov 10 00:08:37 :) flac **** ENDING LOGGING AT Mon Nov 10 02:59:57 2008