**** BEGIN LOGGING AT Fri Feb 13 02:59:57 2009 Feb 13 06:38:25 I have an ActivityGroup question with relation to key events, I put onKeyDown overrides in the child activities, but for some reason they don't receive the keys (and I don't have any key listeners in the activiitygroup....I also tried putting in the key listeners in the activitygroup to no avail Feb 13 06:38:36 is there anything special I need to do? Feb 13 07:25:56 ok, I figured it out Feb 13 07:26:11 difficult to find examples on it :) Feb 13 07:26:21 actually, didn't find anything Feb 13 10:42:16 hi di hi. how can I programmatically paint the background of my applications activities? i see i should use themes, but i'm not sure how to specify a drawable implemented in code rather than a static image **** BEGIN LOGGING AT Fri Feb 13 12:02:41 2009 Feb 13 12:30:48 Hello guys. Feb 13 12:39:21 hello anno^da_ :) Feb 13 12:59:22 i try again in case new people are here: what's the best way to get imeem-style nice patterened backgrounds? i can't see a way to programmatically draw them via the theming system, so either i have to ship a big-ass resolution specific bitmap (weak), or have code in every activity to trigger the programmatic drawing Feb 13 12:59:35 what I really want is to implement my own Drawable class, and then have the XML refer to that. but i'm not sure if it's possible Feb 13 13:00:51 imeem? what's that? :) Feb 13 13:00:59 * tauno goes off to the Market Feb 13 13:03:15 music application Feb 13 13:03:37 it's very nicely done. i want to make my app as nice as that :-) but i am not sure where it gets this nice grey pattern from. i remember seeing it in early SDK builds. i guess it was removed for performance reasons Feb 13 13:07:42 I guess they just use a 9patch and set it as the theme background and then use this theme - everything nicely done from xml Feb 13 13:08:03 ah no.. it's some strange pattern there Feb 13 13:08:21 that can't be done using 9patch I guess Feb 13 13:10:40 don't think so Feb 13 13:10:44 also they have nice fading at the edges Feb 13 13:10:51 so it's either drawn in software or a big image Feb 13 13:11:57 it doesnt have the fadin in portrait mode Feb 13 13:12:18 a repeating bitmap then if it's not a 9patch Feb 13 13:12:34 this can also be done in pure xml and then set as the theme for all activities :) Feb 13 13:12:44 ..or maybe not Feb 13 13:13:42 hmm Feb 13 13:13:57 i wonder if you can combine them Feb 13 13:14:01 like, have a repeating image for the stripes Feb 13 13:14:06 then a 9-patch to do the fading edges Feb 13 13:14:11 seems complicated though Feb 13 13:15:06 i could just draw the background in software, i guess Feb 13 13:16:40 I wouldn't do that :) Feb 13 13:17:03 why not ? it'd at least be portable across devices Feb 13 13:18:10 because I'm lazy lately and doing it from XML seems much better ;) Feb 13 13:21:00 yeah, only if it's possible though :-) Feb 13 13:21:07 i am not even sure what i want it to look like yet Feb 13 13:21:14 i just know that black is too boring. we must raise the bar! :) Feb 13 13:56:28 huh Feb 13 13:56:33 gradientdrawables are only semi documented Feb 13 13:58:11 ..as are most of the fancy xml things Feb 13 13:58:19 like and etc.. Feb 13 13:58:40 or I'm just blind and havent seen these things in the docs Feb 13 13:59:18 yeah Feb 13 13:59:19 hmm Feb 13 18:04:18 so quick question, why do activity groups, not by default, allow the sub-activites to handle onKey events if the parent activity doesn't implement any onKey events? Feb 13 18:08:36 romainguy: I was thinking about that talk yesterday and had a chance to get some sleep...essentially, the reason I submitted it is because with what I was doing, which Android isn't built for, it had a lot of performance issues, and if I were still doing it that way, and the underlying implementation changes, what I was doing would be rendered useless. That's why I was suggesting a changeView function, so if for some reason it wasn't optimized, the Feb 13 18:09:05 Essentially, I was making the selected view in a list a different view than the rest of them Feb 13 18:09:36 I was probably doing things all wrong, I'll research it further to clarify Feb 13 18:11:49 but, essentially, listviews aren't meant for it :) Feb 13 18:26:18 morrildl: nice interpretation Feb 13 18:26:28 kRutOn: ;) Feb 13 18:26:59 I'll just hang out with my friend Karl M. next week. Feb 13 18:28:02 Karl Malone? Feb 13 18:28:54 more beard Feb 13 18:29:23 In Soviet Russia, Android develops you! Feb 13 18:29:25 need help please. i try about 3 days to get the size of package programatically like settings->application noway, no help from mailing-list. Feb 13 18:30:29 : ( Feb 13 18:30:44 Have you tried looking at the source for Settings -> Application 's activity? Feb 13 18:32:09 yes, i tried. but dont understand Feb 13 18:32:12 settings -> applications use getpackageSizeInfo and implements IPackageInstallObserver.Stub Feb 13 18:32:20 but IPackageInstallObserver.Stub was removed in 1.0 Feb 13 18:33:35 Are you sure that it's not just marked @Hidden ? Feb 13 18:35:14 dont now. wait please. i take a look. ApplicationSettings.java <- this one get the applist Feb 13 18:36:44 from PackageManager.java: Feb 13 18:36:45 * @hide Feb 13 18:36:46 */ Feb 13 18:36:46 public abstract void getPackageSizeInfo(String packageName, Feb 13 18:36:46 IPackageStatsObserver observer); Feb 13 18:36:55 is it @hidden? Feb 13 18:38:36 well it says @hide Feb 13 18:38:39 so you can't call it Feb 13 18:39:42 also, its no way to get disk usage of an installed package programatically? Feb 13 18:39:59 no idea Feb 13 18:40:34 goddamnit google search Feb 13 18:40:38 I want to search for "@hide" Feb 13 18:40:40 not "hide" Feb 13 18:40:46 why won't you let me do a literal search Feb 13 18:40:52 I'm not making a typo Feb 13 18:40:56 yes, this was a mistake Feb 13 18:41:08 PackageStats should not have been public in the API, since there is no method to actually create one Feb 13 18:41:25 There is no way to do this, currently. Feb 13 18:41:41 The system uses internal (non-supported) APIs to do this Feb 13 18:42:49 thank you. i estimate something like this, but was not sure Feb 13 18:43:23 PackageStats is public, but pretty useless Feb 13 18:49:32 zx128: yes exactly :( Feb 13 18:50:08 file bugs/feature requests Feb 13 19:00:15 I just deleted a jpg off my phone using Astro. The picture still shows up in Pictures app, both thumbnail and picture, but trying to get details of the file crashes Pictures. How/Why is this happening? Feb 13 19:00:39 the pictures app needs to rescan the sdcard and notice the picture disappeared Feb 13 19:00:46 * vol checks his BOFH excuses calendar Feb 13 19:00:53 rip in the space time continuum due to solar flares Feb 13 19:00:53 Sounds like there are 2 issues: astro didn't notify the system that it had deleted a picture, and the picture app should deal with that situation. Feb 13 19:01:16 the picture app relies on specific notifications and/or sdcard removed/inserted events Feb 13 19:01:35 romainguy, MediaScanner only scans certain files. How can I tell it to scan the whole card? Feb 13 19:03:41 Also, feature request, have a way to have MediaScanner skip certain directories Feb 13 19:03:51 our app has about 1000 support files in the form of pngs Feb 13 19:05:12 vol, agreed. I have an app with about that many as well. Had to put them all in a zip file. Feb 13 19:05:22 vol: Also, feature request, have a way to have MediaScanner skip certain directories << you can Feb 13 19:05:30 name the directory .something Feb 13 19:05:37 or put an empty .nomedia file inside Feb 13 19:05:45 cf code.google.com/p/shelves Feb 13 19:06:15 interesting Feb 13 19:09:03 does MediaScanner scan the SD card on an ACTION_MEDIA_MOUNTED intent/ Feb 13 19:09:05 ? Feb 13 19:09:20 yes Feb 13 19:09:24 thank you Feb 13 19:19:12 romainguy: you are some sort of terrible genius Feb 13 19:19:25 I would have thought that MediaScanner would still try and look through "hidden" dirs Feb 13 19:19:39 we don't do everything wrong :) Feb 13 19:19:50 I like the .nomedia approach Feb 13 19:19:54 so that the user can see the files on the sdcard Feb 13 19:20:32 * vol investigates Feb 13 19:21:32 windows explorer, I hate you forever. Feb 13 19:21:37 lol Feb 13 19:21:37 .skin is SO a file name Feb 13 19:24:22 argh. Feb 13 19:24:28 Doesn't seem to affect what Music sees Feb 13 19:24:37 and Pictures took too long, so I cancelled. Feb 13 19:33:43 Hi everyone, does anyone know if it's possible to have something like a ListView, but scrolling horizontally instead of vertically? Feb 13 19:34:48 I shouldn't have to explicity call getLocalActivityManager().getCurrentActivity().onKeyDown(keyCode, event) in an activity group if I want to have the child process the key event, right? Feb 13 19:35:50 it's called Gallery lazerdye Feb 13 19:37:04 when I do call it, it runs, but the screen doesn't update with the changes Feb 13 19:39:19 romainguy, thanks that might do it! Feb 13 19:43:25 and if I don't call it, the child never gets the onKeyDown event Feb 13 19:44:15 explicitly invalidating the view fails as well Feb 13 19:46:37 Rawr! Feb 13 19:46:50 method_mediaplayer_setOnCompletionListener = env->GetMethodID(jclass_mediaplayer, "setOnCompletionListener", "(Landroid/media/MediaPlayer.OnCompletionListener)V"); Feb 13 19:47:03 tried MediaPlayer.OnCompletionListener, and MediaPlayer/OnCompletionListener, and both fail Feb 13 19:47:12 what am I missing : ( Feb 13 19:53:03 romainguy: quick question about loading images/etc into a list view after scrolling stops Feb 13 19:54:07 romainguy: what I do is if it is flinging don't load images, and if flinging is done, load the images Feb 13 19:55:00 ok Feb 13 19:55:31 romainguy: sorry, I'm trying to think of the best way to say Feb 13 19:55:33 *it Feb 13 19:57:56 romainguy: nevermind, someone changed my code in a commit and broke it... Feb 13 19:57:59 *sigh* Feb 13 19:59:47 they changed it so onScroll, they were updating the views, and it kept repeating infinately Feb 13 20:00:04 until I flung it (and my code would properly handle it) Feb 13 20:00:14 *infinitely Feb 13 20:02:02 anyways, has anyone had experience working with ActivityGroups and passing key events to the children activities? Feb 13 20:03:48 I'm trying to modify the child view on a key event, but for some reason the view never updates when the key event is received by the child Feb 13 20:05:00 I've tried invalidating the view in both the child activity and the parent, and it still doesn't work Feb 13 20:05:21 I just want to know if it is supposed to work or not, so I know if I should keep trying to fix it Feb 13 20:23:46 romainguy, you still here? Feb 13 20:23:54 depends :) Feb 13 20:24:50 sending Intent.ACTION_MEDIA_MOUNTED doesn't appear to be working for me Feb 13 20:25:34 hot Feb 13 20:25:52 If I call "stop" on a MediaPlayer, will the OnCompletionListener be called? Feb 13 20:27:44 am I not sending it right? Feb 13 20:27:48 sendBroadcast( new Intent(Intent.ACTION_MEDIA_MOUNTED) ); Feb 13 20:31:14 andrewoid: Why do you want to send an intent that you've mounted some media? Are you even allowed to do that? Feb 13 20:34:38 files on the sd card have been changed/removed and I need the Pictures (and other apps) to reflect those change Feb 13 20:34:41 *changes Feb 13 20:35:14 the MediaScanner api only has the ability to add files to the media store, not delete them Feb 13 20:35:55 aha. Feb 13 20:36:17 it's a terrible idea to call ACTION_MEDIA_MOUNTED, but I don't see another way around getting it to rescan directories Feb 13 20:42:09 figured itout Feb 13 20:42:12 *it out Feb 13 20:42:51 The intent is way more complicated than I thought Feb 13 20:43:00 "Broadcast Action: External media is present and mounted at its mount point. The path to the mount point for the removed media is contained in the Intent.mData field. The Intent contains an extra with name "read-only" and Boolean value to indicate if the media was mounted read only." from the javadoc Feb 13 22:34:43 another busy day in android-dev ;) Feb 13 22:37:44 jt436: thats what happens when i take the day off from coding android :P Feb 13 22:38:11 ahhh I see Feb 13 22:38:38 i don't spam the channel with stupid questions Feb 13 22:38:45 like how do i get the context of an application Feb 13 22:39:21 http://groups.google.com/group/android-beginners/browse_thread/thread/6246740e2a2229f0/a53d556efa45645f?lnk=raot Feb 13 22:39:25 how do I get AppContext ? Feb 13 22:40:00 Everything I try doesn't work Feb 13 22:48:26 AppContext.getInstance().getContext()? Feb 13 22:48:44 yeah where does AppContext come from? Feb 13 22:48:51 it's a class Feb 13 22:49:02 ah wait Feb 13 22:49:03 not public Feb 13 22:49:30 not public .. Feb 13 22:49:48 well get the application object then Feb 13 22:50:48 ive tried i keep getting static errors Feb 13 22:51:29 here is decently formatted code: http://pastebin.com/d1d0c751f Feb 13 22:51:51 ... Feb 13 22:51:54 aren't you passing in a context? Feb 13 22:52:06 oh, you don't want that one I guess? Feb 13 22:52:12 "Cannot make a static reference to the non-static method getApplicationContext() from the type ContextWrapper" Feb 13 22:52:27 get the Application then Feb 13 22:52:36 just call getApplication() in yrou Activity Feb 13 22:53:16 and the Application is a Context Feb 13 22:53:24 vol: yeah i havent even gotten it to compile yet, there is a context i guess i have to pass in and a context a reference staticly Feb 13 22:53:27 hmmm Feb 13 22:53:43 call getApplication() Feb 13 22:53:46 can i not use the passed in context as the AppContext? what is the difference Feb 13 22:54:01 call getApplication(), it is a Context Feb 13 22:54:31 hi Feb 13 22:54:31 AppContext = getApplication(); ? Feb 13 22:55:24 the application IS a Context Feb 13 22:55:29 that's all you need Feb 13 22:55:31 forget about AppContext Feb 13 22:55:33 seriously Feb 13 22:57:35 man im so turned around, so where do i get the content resolver from? Feb 13 22:58:00 Cannot make a static reference to the non-static method getApplication() from the type Activity Feb 13 22:59:33 ? Feb 13 22:59:43 don't call it statically then Feb 13 22:59:46 seriously Feb 13 23:00:06 Defensive cat is Defensive Feb 13 23:00:45 lol Feb 13 23:00:56 okay ill give it a try Feb 13 23:02:16 ive got a defensive cat on my lap Feb 13 23:02:43 what is the permission i need for airplane mode? Feb 13 23:06:12 ACCESS_WIFI_STATE and ACCESS_NETWORK_STATE? Feb 13 23:06:58 oh WRITE_SETTINGS Feb 13 23:06:59 :P Feb 13 23:07:53 sweet it works Feb 13 23:07:55 thanks again guys Feb 13 23:08:12 jt436: hope that helped the quiet :P Feb 13 23:08:58 I disappeared, thought you were asking a rhetorical question ;) Feb 13 23:33:31 hey, I have some AI task management software that I want to communicate with Android Feb 13 23:33:54 how can I communicate between processes on my computer and the android, also, how do I test it with the sdk? Feb 13 23:34:29 Does anyone know why an application would die if I don't put "super.onResume()" in the first line of the onResume() method for a MapActivity? I thought the java compiler does include it anyway.. :-/ Feb 13 23:35:01 keny: you have to do it for onCreate(), onStart() and onResume() Feb 13 23:35:35 herriojr, thats strange.. thanks :) Feb 13 23:35:37 must I resort to IPC through text messages or is there a better solution? Feb 13 23:35:52 aindilis: how are you connecting? Feb 13 23:35:57 via usb? Feb 13 23:36:07 well that's what I don't know, no I want it to be available anywhere Feb 13 23:36:20 so, you need to set up a static IP address for you computer Feb 13 23:36:25 well I have that Feb 13 23:36:27 now the other end Feb 13 23:36:45 does each phone come with a static IP or does it get an annonymous and I can ssh tunnel? Feb 13 23:36:49 just communicate over http, tcp, etc. Feb 13 23:37:00 no, they don't have static IPs Feb 13 23:37:02 how do I reach the phone? by an ssh tunnel from the phone Feb 13 23:37:27 if you want to send something to them, you have to send via SMS, and if you don't want the user to see it, you have to send via port-directed sms Feb 13 23:37:50 okay. I assume there are processing hooks from the incoming sms. is there ssh on the phone? Feb 13 23:38:09 okay I think I understand well enough now Feb 13 23:38:15 thanks :) Feb 13 23:38:19 np ;) Feb 14 01:43:37 Do managed activities have a bug where they leak the dialog window, or am I doing something wrong? Feb 14 01:44:15 I'm calling showDialog(int), and implemented onCreateDialog which returns a ProgressDialog. When I'm all done, I call dismissDialog(int) Feb 14 01:44:49 If I rotate the screen twice while the progress dialog is up, it leaks the window, and the progress dialog is never dismissed. Feb 14 02:25:24 rsteckler, do you have your code somewhere? Feb 14 02:25:35 Heh, I just got my code to reboot the g1 too :D Feb 14 02:25:57 yea, but I'm tearing it apart at the moment to figure out what exactly is going on. Feb 14 02:26:16 macpod: Nice. Undocumented feature =) Feb 14 02:26:42 yep, sig11 will do that :) Feb 14 02:28:23 I'm really happy I found Bitmap's recycle function too. It's been a good week :) **** ENDING LOGGING AT Sat Feb 14 02:59:57 2009