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. My appwidget broken Donut when keyboard slide out/in

I developed an appwidget and published on market, it works very well
on Cupcake. but after I upgrade my OS to Donut.Everytime when I slide
out/in keyboard, I will got an error:

The process android.process.acore has stopped unexpected.Please try
again.

I have to click "force close", and wait about 3 seconds to get the
home screen. It seems my appwidget cause this error, because after I
uninstall the appwidget, the error also gone. One of my user reported
to me the same problem, he was sure it's my appwidget's problem,
because he erase all application and install one by one to test which
application cause the error, he found after he installed my appwidget,
the error occured again.

It's very strange,I checked Donut documents, seems the appwidget api
have no change.I don't know what happend when keyboard slide out/in,
does any body know why this happen?

below is the log capture from DDMS when the error occured.


10-20 22:50:28.503: DEBUG/AndroidRuntime(764): Shutting down VM

10-20 22:50:28.503: WARN/dalvikvm(764): threadid=3: thread exiting
with uncaught exception (group=0x4001da28)

10-20 22:50:28.523: ERROR/AndroidRuntime(764): Uncaught handler:
thread main exiting due to uncaught exception

10-20 22:50:28.703: ERROR/AndroidRuntime(764):
java.lang.ClassCastException: android.view.AbsSavedState$1

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.launcher.Workspace.onRestoreInstanceState(Workspace.java:
903)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.view.View.dispatchRestoreInstanceState(View.java:5689)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1121)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1125)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:
1125)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.view.View.restoreHierarchyState(View.java:5668)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.internal.policy.impl.PhoneWindow.restoreHierarchyState
(PhoneWindow.java:1506)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.app.Activity.onRestoreInstanceState(Activity.java:833)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.launcher.Launcher.finishBindDesktopItems(Launcher.java:
1508)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.launcher.Launcher.bindItems(Launcher.java:1472)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.launcher.Launcher.access$2400(Launcher.java:90)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.launcher.Launcher$DesktopBinder.handleMessage
(Launcher.java:2225)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.os.Handler.dispatchMessage(Handler.java:99)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.os.Looper.loop(Looper.java:123)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
android.app.ActivityThread.main(ActivityThread.java:4203)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
java.lang.reflect.Method.invokeNative(Native Method)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
java.lang.reflect.Method.invoke(Method.java:521)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:791)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)

10-20 22:50:28.703: ERROR/AndroidRuntime(764):     at
dalvik.system.NativeStart.main(Native Method)

10-20 22:50:28.713: INFO/Process(81): Sending signal. PID: 764 SIG: 3

10-20 22:50:28.713: INFO/dalvikvm(764): threadid=7: reacting to signal
3

10-20 22:50:28.963: INFO/dalvikvm(764): Wrote stack trace to '/data/
anr/traces.txt'

10-20 22:50:29.313: INFO/DumpStateReceiver(81): Added state dump to 1
crashes

10-20 22:50:31.003: DEBUG/dalvikvm(81): GC freed 10815 objects /
597576 bytes in 274ms
--~--~---------~--~----~------------~-------~--~----~

2. Google Streetview for 2.0 emulator, to test invocation through an Intent

My apps invoke Google Streetview through an Intent (as document here:
http://developer.android.com/intl/zh-TW/guide/appendix/g-app-intents.html).
Right now I am testing things out for Android 2.0. In the absence of a
physical device, this is through emulator testing only, for now.
I noticed the Google apps, which are needed to test the above, are
missing in  2.0. I did some poking around but couldn't find a source
to install those on the emulator (I am aware there's been some
commotion around that aspect of Android...). So I tried the Cyanogen
(sp?) route, pull Street.apk off a 1.6 device and then adb install it
in the emulator. That didn't work... Street.apk is reported as already
existing, and I cannot replace it ("failure").
BTW: I cross checked this method against Maps.apk, and that went
through OK.

Anybody got an idea how to properly install street view on the 2.0
emulator? (Did I fundamentally miss something here?)

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

3. Eclais SDK is out, but STILL no Arabic support in Android

4. Turn copy protection from on to off on market app?

5. Run ARM application on Qualcomm 3G

6. Slashdot: Android / Windows 7 Dual Boot Netbook Disappoints

7. Using TransitionDrawable to make a transition with 3 elements