[android-developers] Re: Singleton in different service which share same process

2009-03-25 Thread Jove
got the some clues, if I add com.example.base into BOOTCLASSPATH , it resolved. but every process will map my jar, does we have better solution? On Mar 26, 11:45 am, Jove wrote: > Maps of my process, it's strange. com.example.base.jar is mapped > twice. :( > > 41036000-41037000 r--s 1

[android-developers] Re: Singleton in different service which share same process

2009-03-25 Thread Jove
Maps of my process, it's strange. com.example.base.jar is mapped twice. :( 41036000-41037000 r--s 1f:00 291/system/framework/ com.example.base.jar 41037000-41038000 r--s 1f:01 780/data/dalvik-cache/ sys...@framework@com.example.base@classes.dex 41038000-41040

[android-developers] Re: Singleton in different service which share same process

2009-03-25 Thread Jove
Hi, I didn't get what you mean. Could you explain more? I build system.img and sdk myself, so I can add my com.example.base.jar into system.img. Thanks, Jove On Mar 26, 3:14 am, Dianne Hackborn wrote: > You can't currently make your own library in the SDK, so the questions > should be on a

[android-developers] Re: Singleton in different service which share same process

2009-03-25 Thread Jove
I create my JAR myself same with "android.test.runner" or "com.android.im.plugin" Briefly speaking, I add line "include $(BUILD_JAVA_LIBRARY" in Android.mk under directory "com.example.base" to create com.example.base.jar, Then I modify framework/base/data/etc/platform.xml to include my jar

[android-developers] Re: Singleton in different service which share same process

2009-03-25 Thread Jove
I create my JAR myself same with "android.test.runner" or "com.android.im.plugin" Briefly speaking, I add line "include $(BUILD_JAVA_LIBRARY" in my "com.example.base" to create com.example.base, Then I modify framework/base/data/etc/platform.xml to include my jar in system.img. My example applica

[android-developers] Re: Singleton in different service which share same process

2009-03-25 Thread Dianne Hackborn
You can't currently make your own library in the SDK, so the questions should be on android-platform. On Wed, Mar 25, 2009 at 11:14 AM, Mark Murphy wrote: > > Jove wrote: > > Hi guys, > > I meet an issue. > > I have two services, both of them lies in separate apk, which run > > in same p

[android-developers] Re: Singleton in different service which share same process

2009-03-25 Thread Mark Murphy
Jove wrote: > Hi guys, > I meet an issue. > I have two services, both of them lies in separate apk, which run > in same process. The two service share same jar file by > method. The jar file implement a class, say "test", is a singleton. > But I found that two instance of test is creat