**** BEGIN LOGGING AT Fri Dec 12 02:59:57 2008 Dec 12 03:00:07 snappy: what is your listview id in the xml file? Dec 12 03:00:34 @+id/android:list Dec 12 03:00:50 ok Dec 12 03:01:24 oh hmm Dec 12 03:01:31 try @id/android:list Dec 12 03:01:44 yea Dec 12 03:01:46 erm, sorry Dec 12 03:01:57 @android:id/list ? Dec 12 03:02:00 I don't remember Dec 12 03:02:31 android:id/list Dec 12 03:02:35 @android:id/list Dec 12 03:02:47 that's what it should be Dec 12 03:04:19 In the solution file for the notepad tutorial, they use @+id/list Dec 12 03:04:31 er: @+id/android:list Dec 12 03:04:52 rename it to what i gave you and try it Dec 12 03:04:57 but i tried it without the +, and the onContextListItem listener isn't firing. Dec 12 03:05:00 ok Dec 12 03:05:12 android:id/list? Dec 12 03:05:47 also when do you have an unregister call in your code at the beginning of the filldata? Dec 12 03:07:51 Well I had the register in onCreate() earlier and the context menus weren't showing up. So I moved the registered to the end of fillData, and I figure I should unregister the old listview. Dec 12 03:07:58 It changes everytime fillData() is run. Dec 12 03:10:17 that's not really the way to do it Dec 12 03:10:24 have you looked at the docs? Dec 12 03:10:51 Which ones? I've seen the api doc for registerForContextMenu Dec 12 03:13:10 sorry, I'm a little behind--what's the point of the un/register? Dec 12 03:13:31 he's using it to update the context menu. Dec 12 03:13:35 there's a method for that Dec 12 03:14:27 Wait, I'm using it to register for the listview which is part of ListActivity. Dec 12 03:15:13 the unregister call he asked about Dec 12 03:16:17 oh. Dec 12 03:25:07 *sigh* this is frustrating. It seems no matter what I do, I can only get the context menu to work when the menu item id is 0. But then the list item id is nonsense. Dec 12 03:25:44 is this your first android app? Dec 12 03:26:26 Yeah Dec 12 03:26:39 (i'm just extending the one from the tutorial) Dec 12 03:26:44 are you new to java? Dec 12 03:26:48 No Dec 12 03:27:20 have you read through the docs? Dec 12 03:27:21 But I'm relatively new to UI programming. Dec 12 03:27:32 The tutorial docs, yes. Dec 12 03:27:39 no the api docs Dec 12 03:27:47 I've been through them quite a few times. Dec 12 03:27:48 read the api docs for ListViews Dec 12 03:27:52 ok Dec 12 03:28:21 er, the ListActivity Dec 12 03:38:47 I'm not sure what I'm looking for. The only discrepency I can find is the code I have used But i don't know why they did that. Dec 12 04:37:09 I created an intent with ACTION_SEND and populated EXTRA_SUBJECT and EXTRA_TEXT and set type to message/rfc822. However it says no application can perform this action when I start teh activity. Dec 12 04:37:17 How do I fire the email client? Dec 12 04:39:01 um, i think you need a mailto Dec 12 04:39:19 look at the manifest file for the email app Dec 12 04:43:50 has anyone successfully attached an activity to android.action.DIAL via intent-filter ? Dec 12 04:44:07 android.intent.action.DIAL* Dec 12 04:44:23 and what is the thread-safe alternative to android.net.Uri.Builder ? Dec 12 05:00:07 Ugh, if I use a mailto, e.g. sendIntent.setData(Uri.parse("mailto:")), it does actually end up launching email client, but the subject and body doesn't get set (even though i do: sendIntent.putExtra(Intent.EXTRA_SUBJECT, subject); sendIntent.putExtra(Intent.EXTRA_TEXT, body);) Dec 12 05:03:22 ah hm, mailto only works with ACTION_SENDTO which is expected, but I can't seem to get the email activity to fire up on ACTION_SEND after setting subject/body and type. Dec 12 05:26:51 can anyone help me out with attaching to an existing intent? Dec 12 05:54:07 well that's a pain in the arse, had to rape & paste context menu code from one of the android apps that comes with the source. Dec 12 07:28:42 what happened to NotificationManager.getDefault() ? Dec 12 07:29:40 and getSystemService Dec 12 07:52:49 where is android.app.NotificationManager.notifyWithText ?? Dec 12 07:58:04 Is the code from source.android.com bleeding edge? It seems last time the email app was updated was in october. Dec 12 07:59:45 hm n/m read the roadmap page. Dec 12 13:00:34 is there a way to access the logcat stuff without setting up eclipse? Dec 12 13:05:26 from the terminal ? Dec 12 13:05:35 (on your device) Dec 12 13:05:41 If you have it installed Dec 12 13:06:17 i got it nevermind Dec 12 13:06:19 adb logcat Dec 12 13:06:38 trying to solve a users problem Dec 12 13:07:57 you do any research into emails? Dec 12 13:08:28 email? for the missed calls app ? Dec 12 13:08:41 yup Dec 12 13:08:50 Well I have looked into it but cant find anything regarding incoming calls :( Dec 12 13:08:56 i keep getting that requested Dec 12 13:09:02 and i know its all undocumented Dec 12 13:09:07 but there has to be something! Dec 12 13:09:11 I can see a broadcast that gets fired Dec 12 13:09:17 when you get an incoming mail Dec 12 13:09:23 but I cant catch it Dec 12 13:09:35 every receiver works fine. Just this broadcast does nothing Dec 12 13:10:21 ACTION_PROVIDER_CHANGED Dec 12 13:10:31 this one gets fired by the gmail app Dec 12 13:10:51 incoming calls or incoming emails? Dec 12 13:10:58 Notify me if you got something. I'm also searching Dec 12 13:11:00 emails Dec 12 13:11:00 blah nevermind Dec 12 13:11:03 gotcha Dec 12 13:11:25 The documentation is pretty bad Dec 12 13:11:37 I have to look into the source code. Dec 12 13:12:02 they dont want people using this stuff lol Dec 12 13:12:08 yeah i know :) Dec 12 13:12:08 how do I access the logcat content on the device? (want to send an error report to myself after my app should crash) Dec 12 13:12:56 you could always carry a laptop around Dec 12 13:13:06 last week one o fmy apps crashed while i was on the way home from work Dec 12 13:13:12 i pulled out my laptop and hooked it up at a stop light Dec 12 13:13:13 lol Dec 12 13:16:04 i had to send about 2 dozen emails telling my users to disable the normal notification Dec 12 13:16:16 even though i had it in the notes htat pop up immediately when you styart my app Dec 12 13:16:23 and someone else posted a comment saying to do that Dec 12 13:25:14 The biggest problem is the 325 character description Dec 12 13:25:17 in the market Dec 12 13:25:38 You cant describe anything there. :/ I'm always running out of characters Dec 12 13:25:49 and responding to the comments isnt possible as well :( Dec 12 13:26:53 yeah, those are my 2 main gripes Dec 12 13:27:43 I'm impressed with ohw many comments you got so quick Dec 12 13:27:44 bravo Dec 12 13:32:45 anno: do you want the code to make it so you cant clear the missed call notification? Dec 12 13:33:46 notif.flags = notif.flags | Notification.FLAG_NO_CLEAR; Dec 12 13:35:05 blau-MikeDG: ahh nice Dec 12 16:47:58 Could someone tell me what could be wrong with this ContentObserver: http://paste.pocoo.org/show/95060/ Dec 12 18:21:06 anyone good with Toast? Dec 12 18:21:15 whatcha wanna do? Dec 12 18:21:44 I'm trying to call makeText from a receiver that happens when an incoming call rings Dec 12 18:21:49 but it throws NPE Dec 12 18:21:54 a receiver? Dec 12 18:21:58 npe? Dec 12 18:22:01 null Dec 12 18:22:01 duh Dec 12 18:22:23 I forget what it's called but Dec 12 18:22:39 I have a method that gets run when the phone rings Dec 12 18:22:44 a method from my activity Dec 12 18:22:51 phonestatelistener Dec 12 18:22:54 yea Dec 12 18:22:55 that's it Dec 12 18:23:16 but calling Toast.makeText there throws NPE while doing it from inside my activity works fine Dec 12 18:23:21 are you using makText Dec 12 18:23:34 can you run that from a receiver? Dec 12 18:23:52 I don't know :/ Dec 12 18:23:54 you need a context Dec 12 18:23:57 yea Dec 12 18:23:59 Toast.makeText(this, "Stopped dgAway Service", Toast.LENGTH_SHORT).show(); Dec 12 18:24:01 yea I think that's the problem Dec 12 18:24:08 is with context Dec 12 18:24:11 are you passing this first? Dec 12 18:24:17 or a context? Dec 12 18:24:26 check the error logs Dec 12 18:24:32 i bet theres another error shortly before the npe Dec 12 18:24:50 I think it's getBaseContext() or something like that Dec 12 18:24:58 not in front of the code right now Dec 12 18:25:08 but that's what I was passing Dec 12 18:25:45 the only error it showed was inside of makeText's init Dec 12 18:25:53 hmm Dec 12 18:25:55 and just that it was NPE Dec 12 18:26:12 the line before that in the trace was my makeText call Dec 12 18:26:27 im testing.... i just happened to be working on a receiver myself Dec 12 18:26:34 cool Dec 12 18:27:32 works for me Dec 12 18:27:41 passing what context? Dec 12 18:27:44 yes Dec 12 18:27:54 passing the context from the onReceive call Dec 12 18:28:23 toast worked fine for me Dec 12 18:28:32 theres a context parameter to onreceive Dec 12 18:28:37 just pass that Dec 12 18:28:59 hang on let me pull up my code, cause I don't remember seeing that Dec 12 18:29:24 what blau-MikeDG said... i did the same thing Dec 12 18:34:25 ok Dec 12 18:34:37 PhoneStateListener doesn't seem to have onReceive Dec 12 18:34:50 I'm using onCallStateChanged Dec 12 18:34:56 which doesn't have a context passed to it Dec 12 18:35:57 huh? Dec 12 18:37:04 I don't know :/ lol Dec 12 18:37:16 I can't login to get to my code right now Dec 12 18:37:48 a receiver should always implement the onReceive Dec 12 18:37:59 at least a BroadcastReceiver should Dec 12 18:38:39 it's not a broadcastreceiver though Dec 12 18:38:55 oh its the phonestatelistener durrr Dec 12 18:38:57 sorry Dec 12 18:39:01 i lost track :) Dec 12 18:39:35 the phonestatelistener constructor gets a context Dec 12 18:39:52 use that one to toast Dec 12 18:41:35 hmm Dec 12 18:41:41 I'm looking at the doc for PhoneStateListener Dec 12 18:41:46 the constructor is blank Dec 12 18:41:57 just says public PhoneStateListener() Dec 12 18:43:44 oh umm make one that accepts a context :) Dec 12 18:43:56 i have liek 5 diff convos going on at once and im "working" Dec 12 18:44:01 lol Dec 12 18:45:22 don't know that I can do that hehe Dec 12 18:45:47 blau-MikeDG: whats your question? i just popped in... Dec 12 18:45:59 jasta: im helping bp Dec 12 18:46:14 but im a little unreliable cause i got so much stuff happening at once Dec 12 18:47:44 ok then, so bparker06, what's your question? :) Dec 12 18:50:56 I need to know how to get a context to pass to Toast.makeText while I'm inside PhoneStateListener.onCallStateChanged Dec 12 18:51:31 what context was your phone state listener registered? Dec 12 18:51:36 service, activity? Dec 12 18:52:23 activity Dec 12 18:53:18 bparker, my suggestion is make a constructor that takes a Context Dec 12 18:53:24 pass the activities context to it Dec 12 18:53:26 and use that Dec 12 18:53:51 ah Dec 12 18:54:10 so just make the phone state listener non-static and use the reference Dec 12 18:54:38 argh Dec 12 18:54:39 but make sure you call TelephoneManager#listen(listener, LISTEN_NONE) so you dont leak it Dec 12 18:54:47 I don't quite understand :/ Dec 12 18:54:53 jasta, leak it? Dec 12 18:54:53 still new to java/android Dec 12 18:54:55 bparker06: hang on, ill link you something Dec 12 18:54:59 it gets killed eventually Dec 12 18:56:01 at least in my experience Dec 12 18:56:05 http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html -- read about inner classes Dec 12 18:56:35 blau-MikeDG: you must unregister your listener in onDestroy or you will leak the activity until your process dies. because you have used an inner class Dec 12 18:56:47 this has nothing to do with android, everything to do with java. Dec 12 18:57:27 oh ok until the process dies Dec 12 18:57:44 (which can take a long time) Dec 12 18:57:51 where does the innerclass come from? Dec 12 18:58:01 you made it, i imagine. Dec 12 18:58:20 please just read what i pasted to you. ask questions after you finish reading. Dec 12 18:58:57 i read it, i understand Dec 12 18:59:07 are you syaing phonestatelisteners have to be inner classes? Dec 12 18:59:16 then you would know that with an inner class, you have a reference to the outer class. Dec 12 18:59:30 the outer class is an Activity, which is a Context. thus, you have a reference to a context. Dec 12 19:01:09 ok Dec 12 19:03:00 if you don't use a nested class you would have to pass the context. but i recommend that you do. Dec 12 19:03:08 that you do use a nested class* Dec 12 19:06:29 any existing methods to match up a number with a contact? Dec 12 19:51:38 any ideas on when the next android release will be? Dec 12 19:58:58 jasta: Do you know something about this problem: http://groups.google.com/group/android-developers/browse_thread/thread/aa4379f27c12316d Dec 12 20:04:47 no clue, havent seen anything like that before Dec 12 20:05:03 i would try analyzing the stack trace and the android source to see if you can find something obvious though Dec 12 20:40:42 hey i think i lost my root Dec 12 20:40:45 could someone help me Dec 12 20:40:55 i got a warranty replacement Dec 12 20:40:57 it had rc29 Dec 12 20:41:06 i went through the wiki at android-dls.com Dec 12 20:41:10 just like i did on my last one Dec 12 20:41:18 and i had root yesterday but i install that shell app Dec 12 20:41:30 and today i couldnt get terminal emu to to work and my wifi wouldnt work Dec 12 20:41:41 so i reboot and did alt-s again Dec 12 20:42:04 it made term emu work and wifi work, but now i cant get root Dec 12 20:49:43 oh noes :< Dec 12 21:03:15 yea no shit Dec 12 21:03:20 i want to throw things Dec 12 21:05:02 by the way, this is #android-dev. youre in the wrong place :) Dec 12 21:05:33 yes wrong channel! Dec 12 21:06:37 yea well i asked in #android Dec 12 21:06:39 they lold Dec 12 21:06:41 awsome help Dec 12 21:10:20 just because they dont help you doesn't mean we will. Dec 12 21:11:08 dude, you modified your phone :) Dec 12 21:11:13 its a risk Dec 12 21:40:16 * CardinalFang grumbles, "oh, that's fun. 'java.lang.VerifyError'." Dec 12 21:40:47 CardinalFang: pastebin it if you need an interpreter Dec 12 21:42:43 Thanks, I can manage it, I think. I'll just bisect until it goes away. I'm somewhat new to Java and its *ahem* quirks. Dec 12 21:45:05 I'm looking for anyone who'd be will to test a pre-alpha soft keyboard, just for some initial feedback before I press on with refining it. Dec 12 21:45:57 CardinalFang: java is not an especially quirky language. perhaps these are YOUR quirks. ;) Dec 12 21:46:15 tomgibara: do you know that google is publishing one? Dec 12 21:46:45 jasta: Yes, no doubt it will blow mine out of the water :) But this was already begun Dec 12 21:47:55 Is there an action defined for getting to the Call Log ? Dec 12 21:48:01 Its a very interesting challenge actually, given the constraints that apply, I can't wait to see what Google's engineers come up with. Dec 12 21:49:20 anno^da_: I don't think so. I think that activity is internal to the dialer app Dec 12 21:49:21 jasta, indeed, it's probably me. That VerifyError is quirky, *I* say. My other languages definitely have their quirks. 'call-cc' in Scheme, one-item tuple syntax in Python, pretty much everything in C.... Dec 12 21:49:44 if you can show us some more info im sure we can help Dec 12 21:50:35 tomgibara: thank you. Can we track the launch of the Contacts app? Dec 12 21:53:28 anno^da_: Again only guessing, but probably not unless you were looking to replace the activity by registering a suitable intent filter. Dec 12 21:54:22 tomgibara: Yeah ok. I thought that after looking through all the groups and docs. Dec 12 21:56:23 jasta: Incidentally, I think that the encumbent keyboard components (especially the dictionary) may enjoy a considerable advantage over anything that can be supplied by external developers. Dec 12 21:56:56 """ [apply] trouble processing:\n [apply] class name (com/example/x/Klass$DefinedEnum) does not match path (com/example/x/Klass$definedEnum.class)""" Dec 12 21:57:08 "d" versus "D"? Dec 12 21:58:52 Maybe some of that anonymous magic is broken, but it's probably me. hrm. Dec 12 22:02:30 ... well, defining an enum with a capital letter ain't legal, it seems. Dec 12 22:04:09 The class name and the file name must match (case sensitive). Dec 12 22:21:04 can the sqlite3 command be run on a device? Dec 12 22:23:05 no... Dec 12 22:23:13 or rather, it doesnt exist on the stock g1 Dec 12 22:23:16 youd need root to add it Dec 12 22:23:45 that is annying Dec 12 22:23:53 annoying Dec 12 22:23:55 you can, however, adb pull and then fiddle Dec 12 22:24:05 that'll work Dec 12 22:24:15 and of course even adb push it back Dec 12 22:24:22 neat Dec 12 22:24:39 i'm already on rc30, so i'm not going to bother with root Dec 12 22:24:46 pulling should work, thanks **** ENDING LOGGING AT Sat Dec 13 03:00:03 2008