**** BEGIN LOGGING AT Tue Feb 03 02:59:57 2009 Feb 03 03:40:12 trying to run a sample app. got the following http://pastebin.com/df64435a, and no LogCat output for the currently running emulator, this is the second time i got this, i thought the first time it's cause of the application, but now , don't know what's wrong, i hope if anyone can help with that. Feb 03 03:41:40 i asked here before and they said it's cause of my slow machine, but i want to mention that things were working correctly maybe as i think before upgrading to sdk version 1.0 r2 Feb 03 03:42:39 that's wacky; that looks almost like you've got a mismatch between adb and the version of Android that you're running, or something Feb 03 03:42:53 (i'm specifically looking at the usage output (!) of the 'am' command in there, repeating over and over) Feb 03 03:44:56 Does the same happen when the emu is already up and running? Feb 03 03:45:40 ctate, windows PATH environment var. has E:\android-sdk-windows-1.0_r2\tools, as inside eclipse ->window->preferences->Android->SDK location is pointing always to E:\android-sdk-windows-1.0_r2, and as i think adb usage is from the one in the PATH var. Feb 03 03:45:46 oh, nvm. Looks like it was up for a couple minutes before you launched. Feb 03 03:45:46 f00bar80: do you have any logcat output at all from the emulator? Feb 03 03:45:56 can you run the emulator from the command line successfully? Feb 03 03:46:13 ctate, logcat is empty Feb 03 03:46:38 f00bar80: it's empty when it's run from Eclipse? Feb 03 03:47:06 ctate, yes Feb 03 03:47:09 i don't know what logcat arguments the Eclipse plugin uses when it launches the emulator. can you run it successfully from a command line? if you can try, use the command line argument: -logcat "*:v" Feb 03 03:47:17 ctate, i'm trying to run it from the command line Feb 03 03:48:22 ctate, things seems to be working logCat shows http://pastebin.com/d28359587 Feb 03 03:48:36 correct me if i'm wrong Feb 03 03:49:57 ctate, any comment / Feb 03 03:50:09 f00bar80: okay, yeah, that looks good. let it run until it gets past the boot animation to the Lock or Home screens. Feb 03 03:58:22 ctate, still starting , is it normail for it to take all this time to startup / Feb 03 03:59:14 the first time it runs it takes much longer Feb 03 03:59:26 and it uses LOTS of cpu Feb 03 03:59:55 ctate, "first time" ? Feb 03 04:05:39 ctate, it's 15 minutes till now :) Feb 03 04:06:29 You need a faster machine, my friend. That, or something is wrong. Feb 03 04:08:38 rsteckler, faster ? i'm on PIV with 1G of RAM Feb 03 04:09:13 The emu takes ~20 seconds to startup here. Feb 03 04:09:20 rsteckler, and again i'm confirming this wasn't the case before upgrading to version 1.0_r2 Feb 03 04:09:40 It sounds like something's wrong. I defer to the expert (ctate), but I would consider a reinstall Feb 03 04:09:41 rsteckler, here <-= ? Feb 03 04:10:08 macbook pro (2.something ghz, 4gb) Feb 03 04:12:02 http://pastebin.com/da79bdc8 <- as i think trying to load library but don't what's wrong Feb 03 04:12:15 know* Feb 03 04:17:36 ctate, must i wait more than that ??? i think it's clear that's there's something wrong, can you suggest what's wrong or do you want to me to pastebin all logCat's output or ... ???? Feb 03 04:22:36 ctate, are you there ? Feb 03 04:23:03 f00bar80: here, sorry Feb 03 04:23:15 when it gets to that output, it just loops on that forever and makes no progress? Feb 03 04:24:40 ctate, here's the LogCat http://pastebin.com/d5c507ac7 Feb 03 04:28:53 this looks very strange to me Feb 03 04:28:59 this is running from the command line? Feb 03 04:29:25 # Feb 03 04:29:26 02-03 05:59:42.263: INFO/jdwp(315): received file descriptor 13 from ADB Feb 03 04:29:26 # Feb 03 04:29:26 02-03 05:59:51.764: INFO/jdwp(321): received file descriptor 13 from ADB Feb 03 04:29:42 that surprises me greatly if this is running from the command line, not from Eclipse Feb 03 04:30:07 ctate, yes i typed emulator then hit enter, got "bind: no such file or directory" and then the emulator window appeared Feb 03 04:31:07 it looks like there's something messed up with your install, or soemthing. i'm not familiar with the SDK's environment, but what you can see here is that hte runtime starts going, then eventually something winds up killing the entire android runtime process, at which point everything is toast Feb 03 04:31:39 ctate, what do you suggest ? Feb 03 04:32:00 i have no idea. blow away the SDK package and re-install it? i dunno. Feb 03 04:32:06 this is way outside my knowlege, sorry. Feb 03 04:33:17 also note that it took 12 minutes just to get to the point where things started to look abnormal Feb 03 04:33:41 that's how slow your machine is for running the emulator. :( Feb 03 04:34:11 # Feb 03 04:34:11 02-03 05:47:15.904: DEBUG/AndroidRuntime(22): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<< Feb 03 04:34:58 # Feb 03 04:34:58 02-03 05:52:41.383: DEBUG/ActivityManager(86): Start running! Feb 03 04:35:02 etc Feb 03 04:36:02 oh! Feb 03 04:36:06 what might be happening... Feb 03 04:36:11 and this is not good news for you... :( Feb 03 04:36:31 is that it's possible your machine is so slow that various essential system components are ANRing during boot Feb 03 04:37:10 when synchronous broadcasts etc are delivered, the recipient has only 5 seconds to respond, real time, or it's declared a bad citizen Feb 03 04:37:22 and if something fails to keep up repeatedly, it's killed Feb 03 04:37:40 ctate, is there a way to check the installed application on this emulator using adb or something maybe an installed application is causing that Feb 03 04:37:41 if that thing is running in the system process, that means the whole system process gets killed, i.e. the whole Android framework runtime. Feb 03 04:38:04 i see a few ANR reports in the log you pastebinned. that's quite possible, i'm afraid. Feb 03 04:38:30 ctate, no way to check for the installed apps / Feb 03 04:38:42 i dunno, f00bar80 Feb 03 04:39:38 but i'm starting to suspect that the issue is the speed of your computer. Feb 03 04:39:45 unfortunately i have to run now, sorry Feb 03 13:52:22 Can i use any other DB engine with Android other than SQLite ? Feb 03 13:53:25 It depends what you mean with "can I"... you can implement a content provider with anything you want as a back-end, and you can use an database engine written in the java programming language. Feb 03 13:54:49 jbq, some more details ? Feb 03 13:54:59 details about what? Feb 03 13:55:38 jbq, what do you mean by content provider with anything as a backend Feb 03 13:56:26 the content provider API is really just an API that passes strings, contentvalues, cursors and parcelfiledescriptors around. It happens to be designed to be easy to use with a SQLite back-end, but that's not a requirement. Feb 03 14:01:00 jbq, k for example in a client/server chat application, if there's a DB for any kind of data validation, manipulation ...etc , this DB should be on the Server End and it could be whatever Mysql, sqlite.. any ?, as this server is written in the java language and can use jdbc ..etc , or there could be other scenarion ? Feb 03 14:01:12 jbq, *scenario Feb 03 14:02:33 Well, relying on a server-side DB will result in a poor user experience as the data won't be accessible when the device has no connectivity. Feb 03 14:03:26 jbq, so what do you suggest ? Feb 03 14:03:47 I don't know what you're trying to achieve - you're asking some very generic questions :o Feb 03 14:04:44 jbq, any IM client has poor user experience when used offline ;) Feb 03 14:05:17 tauno: well, if you lose connectivity for a few seconds (the "tunnel" effect), you don't want e.g. to lose what you're typing. Feb 03 14:05:43 jbq, a client application trying to login using login info, then retreive contacts status, contact list, ..etc all of that is from the server, Feb 03 14:06:44 jbq, client side typing has nothing to do with server side DB.. or it seems we are talking about different things here :) Anyway - sorry that I jumped randomply into your discussion :) Feb 03 14:07:24 tauno, some more details Feb 03 14:07:47 all right, sounds to me like you're trying to implement an IM system, right? Feb 03 14:08:05 jbq, yes Feb 03 14:09:19 w00t, my Android blog just got picked up by Make magazine Feb 03 14:09:52 f00bar80, why are you storing anything on the device itself? (other than in-memory stuff like chats/contactlist that you received from the server) Feb 03 14:10:22 f00bar80, I mean - for what do you need the DB for on the device? Feb 03 14:10:36 ok. here's my suggestion at a very high level: in a nutshell, run the entire IM protocol (with permanent storage, e.g. archiving) on a server. And sync that server with the client to display the actual UI. I assume that's the direction you're going into. Feb 03 14:10:56 Now the server-side stuff can be implemented with just about anything you want. Feb 03 14:12:04 On the client side I'd recommend storing cached data in a content provider (as a first approach, using SQLite as the back-end storage), with an ad-hoc synchronization protocol between the client and the server. Feb 03 14:13:17 I'd only move away from SQLite as the back-end for the content provider if you have a good reason to believe that you have a better alternative, but by default I'd assume that it's good enough. Feb 03 14:15:09 Anyway, that's just a high-level view, of course, but hopefully that matches what you had in mind. Feb 03 14:16:22 Sorry, I've got to go (need to get ready to go to work). ttyl. Feb 03 14:16:24 ..if you ever need persistent storage on the device at all - and that's rarely the case (eg you won't have more than a few hundred Kb worth of stuff anyway and that will fit nicely into the 16MB app heap :) (chat messages/contact data etc)) Feb 03 14:17:22 tauno, some more clarification ?? Feb 03 14:17:55 tauno, regarding storing anything on the device itself? (other than in-memory stuff like chats/contactlist that you received from the server) Feb 03 14:18:56 I mean - once you get the chat messages from the server, why do you need to keep them in a DB on the device? Feb 03 14:19:31 ..you can of course - I'm just curious :) Feb 03 14:20:08 tauno, i want to retrieve stored data as contact list not messages Feb 03 14:22:16 ok, contactlist then - if you just use the contactlist data in the same application that retrieved the data from the server in the first place, then you can just use the data directly (eg store it in a Contactlist object or something). If you want to enable access to this data to other apps, then yes, use a contentprovider Feb 03 14:22:47 anyway - I don't know what I'm talking about :P Feb 03 14:24:46 tauno, isn't it better to store things on db other than in an object , as a type of keeping my application logic light ? Feb 03 14:26:09 tauno, also what do you mean by ".if you ever need persistent storage on the device at all - and that's rarely the case (eg you won't have more than a few hundred Kb worth of stuff anyway and that will fit nicely into the 16MB app heap :) (chat messages/contact data etc))" Feb 03 14:27:18 depends on what you are doing with the data IMO. If you need to access the contactlist data often, then retrieving it from a DB every time seems like a waste of time. It would be more efficient if you'd just get the data from the netwrok -> store it in objects -> access the objects directly if needed. Feb 03 14:28:03 depends on the use case, really :/ Feb 03 14:33:29 tauno, k something else suppose i want to give the option to sms one of the contactlist in case he's offline, do you have any suggestions on this may work or be implemented ? Feb 03 14:52:28 f00bar80, you want to let the user send an sms to a offline contact? Feb 03 14:55:30 tauno, yes Feb 03 15:06:49 tauno, any comment Feb 03 15:17:45 anyone know where i can view the layout xml files for the messaging app? Feb 03 16:04:18 hey Feb 03 16:04:57 * Tony-BA walks around Feb 03 16:07:12 hmm quiet bunch Feb 03 16:56:56 in a client/server chat application suppose i want to give the option to sms one of the contactlist in case he's offline, do you have any suggestions on how this may work or be implemented ? Feb 03 17:06:44 any comment ? Feb 03 17:43:25 nobody there ? Feb 03 17:43:33 or is my question not clear ? Feb 03 17:45:49 not sure, would that use an intent? Feb 03 17:46:29 use SmsManager Feb 03 17:46:36 .sendTextMessage() Feb 03 19:43:06 zhobbs, more info, i'm not asking about the functions , i'm asking about the logic ? Feb 03 19:43:49 f00bar80: simple, if (friend.online) {sendIm()} else { sendSMS() } Feb 03 19:43:54 duh Feb 03 19:46:25 zhobbs, details on sendSMS ?? ??? Feb 03 19:47:38 SmsManager.sendTextMessage() I think Feb 03 20:11:21 is there anyway to get information from the Manifest in your app? For example, attributes from your tag? Feb 03 20:26:10 maybe from PackageManager and PackageInfo Feb 03 20:26:20 PackageInfo Feb 03 20:48:08 morgan: thanks Feb 03 21:03:42 zhobbs, no comment ? Feb 03 21:04:25 f00bar80: I'm lost... Feb 03 22:18:00 Does someone know the URI for the calendar content provider ? Feb 03 22:20:02 ok: content://calendar/events/ Feb 03 22:23:49 * jasta pokes romainguy Feb 03 22:24:58 so, imagine that i have multiple APKs which all depend on each other... Feb 03 22:25:13 jasta: good luck with that Feb 03 22:25:16 multiple actual java projects, in fact... Feb 03 22:25:18 ==fadden Feb 03 22:25:31 (also, define "depend on") Feb 03 22:25:32 what is a good strategy for sharing interfaces and constants between them, such as intent extras, uris, actions, etc? Feb 03 22:25:39 without sharing all of the code? Feb 03 22:25:50 jasta: I've been wondering that also....... Feb 03 22:25:54 fadden: it's what Google does. how's it working out for you guys? Feb 03 22:26:09 zhobbs: Eclipse seems to be very crude. Project dependencies are way too aggressive. Feb 03 22:26:41 jasta: when your dependencies are all in the bootstrap class path, it works great Feb 03 22:26:48 maybe it makes sense to create a separate project that just is for interfacing components Feb 03 22:26:56 With uses-library it works out pretty well when things only go one direction. Feb 03 22:26:59 and/or when everything links with Intent.java Feb 03 22:27:25 fadden: you realize, of course, that im in the same position as Google :) Feb 03 22:27:55 jasta: you mean, you can check stuff into framework.jar and change APIs on a whim? :-) Feb 03 22:28:00 yup. Feb 03 22:28:04 :) Feb 03 22:28:09 So... what's the problem then? Feb 03 22:28:42 i don't want to trample on the framework just because i can Feb 03 22:28:44 that makes no sense Feb 03 22:29:02 so really my question is more of a general Java architecture one Feb 03 22:29:23 I believe our current answer to "java shared libs" is the uses-library keyword. Feb 03 22:29:42 i dont think thats relevant... Feb 03 22:29:50 because i dont care if the code is duplicated from one project to another Feb 03 22:29:54 instead of truly shared Feb 03 22:30:00 im just looking at importing constants basically Feb 03 22:30:03 If you want to go commando, you can build separate DEX files, load them with DexClassLoader, and take care of installing them in some common area. Feb 03 22:30:18 because of course i have lots of different interconnected components. services, providers, activities, etc from different APKs Feb 03 22:30:20 But now you're probably stuck with doing a lot of reflection calls. Feb 03 22:30:38 but i like putting, for instance, the providers intents in one class or interface in the project that defines them Feb 03 22:30:42 but use those constants elsewhere Feb 03 22:30:54 im not interested in any runtime sharing Feb 03 22:31:18 So this is a build question really. Feb 03 22:32:12 jasta: welcome to Java. there is no good solution for sharing constant definitions that does not boil down to essentially the Intents.java model, which is "build the constants into a lib, and everything uses-lib on that" Feb 03 22:32:35 JAVA_SRCS += ../../common/ugly/arrrgh/Constants.java Feb 03 22:32:42 or that, yeah Feb 03 22:35:54 in a client/server chat application suppose i want to give the option to sms one of the contactlist in case he's offline, do you have any suggestions on how this may work or be implemented ? Feb 03 22:41:31 ctate: well tahts stupid :( Feb 03 22:41:44 there are a lot of things about Java that are a big step back from the way things used ot be done. sigh. Feb 03 22:54:45 jasta: whats a good way to communicate a string variable from one activity to another? activity A gets a value over HTTP, and i want to save it for activity B to retrieve later. sqlitedb seems overkill Feb 03 22:55:15 (i cant use the data field of an intent) Feb 03 22:55:47 extras? Feb 03 22:56:19 why can't you use an intent? Feb 03 22:56:48 SharedPreferences ? Feb 03 23:00:07 activity A gets the string value, then launches a browser. the browser sees a url of my-app:///goback, and the browser sends an intent to start activity B with data of "my-app:///goback", so the string needs to be kept somewhere else. Feb 03 23:00:27 this is the OAUTH dance. heh. Feb 03 23:05:04 there's always Binder IPC :) Feb 03 23:05:15 (if you don't want to use Intents) Feb 03 23:15:55 donpdonp: do you want to see my code? Feb 03 23:16:39 i've got OAuth request + access key response in one activity, and i use the preferences to store the access key Feb 03 23:20:52 digitalspaghetti: yeah preferences is one way. if the code is open source, id like to see it. Feb 03 23:21:24 digitalspaghetti: what OAUTH server is your app talking to? Feb 03 23:27:05 Brightkite Feb 03 23:27:20 2 secs, i'll post my accessor and request activities Feb 03 23:29:45 http://paste.ifies.org/312 is my accessor Feb 03 23:30:04 http://paste.ifies.org/313 is my request Feb 03 23:30:27 line 63, you can see i save the requested access key in the shared preferences Feb 03 23:30:58 digitalspaghetti: thanks. Feb 03 23:31:01 http://paste.ifies.org/314 is an example of how i call it Feb 03 23:31:35 i get the auth key from the preferences, then make a new BrightkiteAccessor object, passing the key Feb 03 23:31:49 i can then use it to do .getMessage and .postMessage requests Feb 03 23:32:46 thats some nice looking java Feb 03 23:32:58 i'm probably going to create a tutorial on it this weekend for Learning Android Feb 03 23:33:39 digitalspaghetti: this is my tutorial: http://donpark.org/blog/2009/01/24/android-client-side-oauth Feb 03 23:33:43 i try my best for a java newbie Feb 03 23:33:50 yea, i saw it on twitter :) Feb 03 23:33:53 digitalspaghetti: apparently we think alike :) Feb 03 23:34:23 i'm still having real issues with posting files though Feb 03 23:34:28 it's something i need to revisit Feb 03 23:35:04 one thing i notice different is you have String callbackUrl = "icecondor-android-app:///"; Feb 03 23:35:19 can i ask why you do that? Feb 03 23:35:31 digitalspaghetti: so the browser can launch the android app. Feb 03 23:35:38 digitalspaghetti: if thats what you're asking. Feb 03 23:35:51 ahh, so you invoke the browser for the oauth login bit? Feb 03 23:36:06 digitalspaghetti: yes. that lets the user login with an openid Feb 03 23:36:19 i used an embedded view instead Feb 03 23:36:31 yeah somewhere it says thats not recommended Feb 03 23:36:42 because an embedded viewer doesnt have the phishing protections etc of a full browser Feb 03 23:36:47 probably, and it would cut down on code Feb 03 23:37:19 ahh, no i remember - thats why - Brightkite doesn't have a oauth page for mobile Feb 03 23:37:38 and it autodetects the android as webkit, and throws you to the mobile page Feb 03 23:37:45 i knew there was a reason why i had to Feb 03 23:37:59 ah Feb 03 23:38:34 if you do webView.getSettings().setUserAgent(1); Feb 03 23:38:47 that sets the browser as a desktop, i think it reports as mozilla Feb 03 23:39:15 ha Feb 03 23:39:36 0 actually reports as an iPhone :) Feb 03 23:39:42 and 2 is android Feb 03 23:39:46 lol Feb 03 23:41:00 digitalspaghetti: your code pasties are using a COBOL pastebin. what are you trying to say? :) Feb 03 23:41:23 Java is the new COBOL Feb 03 23:44:30 no, #cobol is an IRC channel I hang about on, on another network Feb 03 23:44:38 nothing to actually do with COBOL :) Feb 04 00:29:39 trying to publish a test app the apk-upload page tells me: The icon path specified by the manifest is not in the apk. Feb 04 00:30:21 i can deploy the app to my phone and the icon show up Feb 04 00:31:24 nevermind Feb 04 01:19:49 anyone have examples of using the |where| parameter for contentResolver.query()? Feb 04 01:22:12 dietricha: http://android.git.kernel.org/?p=platform/packages/providers/DownloadProvider.git;a=blob;f=src/com/android/providers/downloads/DownloadNotification.java;h=9f54190e9997700a97a25bad89f21735763a8872;hb=master#l123 Feb 04 01:23:01 jbq: thanks sir! Feb 04 01:23:07 (or ma'am) Feb 04 01:23:13 lol. sir :) Feb 04 01:25:02 jbq: any examples of using selectionArgs? Feb 04 01:25:18 in your example, you manually bind the params Feb 04 01:25:26 Not in my code, but I know there's some somewhere. Feb 04 01:25:34 ok Feb 04 01:25:41 (yeah, my provider doesn't support binding parameters) Feb 04 01:47:09 I'm trying to sign up for the market and am getting a 404 when I accept the distribution agreement... is there any alternative? Feb 04 02:11:35 marklar: i got the same, but then when i went back to the market homepage, it said i was accepted Feb 04 02:11:42 * dietricha shrugs Feb 04 02:22:18 dietricha: k, thanks I'll try again I guess **** ENDING LOGGING AT Wed Feb 04 02:59:58 2009