has leaked service connection in activity that was originally bound here

by mawei1981 » Wed, 29 Apr 2009 16:25:47 GMT


Sponsored Links
 hen I bind service when activity on create:




04-29 16:20:27.797: ERROR/ActivityThread(11629): Activity
com.maweis.ToggleSilentActivity has leaked ServiceConnection
com.maweis.togglesilentactivit...@434fffa0 that was originally bound
here
04-29 16:20:27.797: ERROR/ActivityThread(11629):
android.app.ServiceConnectionLeaked: Activity
com.maweis.ToggleSilentActivity has leaked ServiceConnection
com.maweis.togglesilentactivit...@434fffa0 that was originally bound
here
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ActivityThread$PackageInfo$ServiceDispatcher.<init>
(ActivityThread.java:886)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ActivityThread$PackageInfo.getServiceDispatcher
(ActivityThread.java:781)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ApplicationContext.bindService(ApplicationContext.java:
820)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.content.ContextWrapper.bindService(ContextWrapper.java:307)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
com.maweis.ToggleSilentActivity.onCreate(ToggleSilentActivity.java:
153)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
1123)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2231)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2284)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.os.Handler.dispatchMessage(Handler.java:99)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.os.Looper.loop(Looper.java:123)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
android.app.ActivityThread.main(ActivityThread.java:3948)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
java.lang.reflect.Method.invokeNative(Native Method)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
java.lang.reflect.Method.invoke(Method.java:521)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:782)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
04-29 16:20:27.797: ERROR/ActivityThread(11629): at
dalvik.system.NativeStart.main(Native Method)




code:

private ToggleSilentService serviceBinder;

private ServiceConnection mConnection = new ServiceConnection() {
public void onServiceConnected(ComponentName className, IBinder
service) {
serviceBinder = ((ToggleSilentService.MyBinder) service)
.getService();
}

public void onServiceDisconnected(ComponentName className) {
serviceBinder = null;
}
};

@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
mSensorManager = (SensorManager) getSystemService
(Context.SENSOR_SERVICE);



Other Threads

1. to be certified Android in Tunisia

Hi,
are there certification organism for android in Tunisia

-- 

2. Displaying an application inside a layout

Hello,
I would like to know if it's possible to display an activity inside a
layout of my activity.
For example I would like to display the Phone application inside a
layout of my activity.
Thanks

-- 

3. how to achieve multiple screen sizes in android 1.5

4. How to translate the accelerometer values from the device coordinates to the world coordinates?

5. GpsNetInitiatedHandler?

6. Samsung launches the new Samsung phone Samsung Wave S8500 Wave

7. Http transfer-encoding chunked with gzip