Multi-process applications and Android Market

by Marco Nelissen » Fri, 06 Mar 2009 07:03:56 GMT


Sponsored Links
 You can put everything in the same package, and make the service runs
in a different process by specifying the "android:process" attribute
for the service in your manifest.





--~--~---------~--~----~------------~-------~--~----~



Multi-process applications and Android Market

by Marco Nelissen » Fri, 06 Mar 2009 07:05:44 GMT


 I should have read further... :)
So you already tried that, but can't debug it? That seems weird. Why
can't you just attach the debugger to the other process? What happens
when you try?






--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Multi-process applications and Android Market

by Dianne Hackborn » Fri, 06 Mar 2009 07:12:05 GMT


 Yeah you can directly attach adb to any process and debug it.  You can also
have your process call Debug.waitForDebugger() if there is a place you want
to block for the debugger to attach.

Splitting an app into multiple .apks just to have it run in two processes is
very much not the model we encourage.








-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Multi-process applications and Android Market

by Dianne Hackborn » Fri, 06 Mar 2009 10:44:44 GMT


 eah Eclipse is hard to figure out.  Basically you can go into the Eclipse
run menu for starting the debugger ("Open Debug Dialog..." on and the
"Remote Java Application" category on mine, your version may be different),
to have it attach to a socket. So in ddms, click on the process you want to
debug, which will forward it to port 8700, and then in the eclipse dialog
select host as "localhost" and port as "8700" to attach a debugger to it.

On Thu, Mar 5, 2009 at 5:16 PM, Mike Collins <mike.d.coll...@gmail.com>wrote:



--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support. All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. NoClassDefFoundError for gdata CalendarService class



As a peer to assets/, bin/, gen/, res/, and src/.

Now, it is conceivable that Eclipse handles things differently. I don't
use Eclipse, and from the command line, just dropping the dependent JARs
in libs/ is all you need. My recommendation to my students is that they
put their dependent JARs in libs/ plus add them to the Eclipse build path.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 

2. NoClassDefFoundError for gdata CalendarService class

I'm writing an android 2.1 application that writes an entry to my
Google calendar. The relevant part of my application code looks like
this:

        void addCalendarEntry(String googleUser, String password)
        throws Exception {

                URL postURL =
                    new URL("http://www.google.com/calendar/feeds/" +
googleUser +
                             "/private/full");

                CalendarService myService =
                    new CalendarService("myCompany-exampleApp-1.0");


This code compiles with no errors, using Eclipse on MacOS, using
external jar files from the Google gdata project:
gdata/java/lib/gdata-calendar-2.0.jar
gdata/java/lib/gdata-calendar-meta-2.0.jar

I export the application through Eclipse to generate the .apk file
which I install on my N-1 phone. However the application cannot find
the CalendarService class, giving me the following runtime error:

W/dalvikvm(11552): threadid=3: thread exiting with uncaught exception
(group=0x4001b180)
E/AndroidRuntime(11552): Uncaught handler: thread main exiting due to
uncaught exception
E/AndroidRuntime(11552): java.lang.NoClassDefFoundError:
com.google.gdata.client.calendar.CalendarService
E/AndroidRuntime(11552):        at
org.mbari.satellite.PassSummaryActivity.addCalendarEntry(PassSummaryActivity.java:
206)

When developing other android applications the "external jar files"
always seem to be cross-compiled and packed into the apk file - so I
do not understand why the app cannot find the CalendarService class.
Anyone have any ideas?

Thanks,
Tom

-- 

3. Ask s/w backup app

4. AppWidgetProvider and setTypeface

5. Application losing SharedPreferences and Sqlite database on Droid

6. Issues with Listener, "back" button, and onDestroy().

7. need help handset ke lock