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. Best practice for sharing a SQLiteCursor from one Activity to another?

In one activity I build a cursor which is used to populate a ListView.

I want a secondary activity to be able to step through the cursor
entries. What's the best way to do this (bearing in mind cursor
lifecycle).

I don't care if the the system kills and restarts the secondary
activity since in that case the stepping through entries functionality
could be temporarily automatically disabled.

-- 

2. incoming or outgoing call event

Hii friends

i m trying to write a code when any one call me on my android phone after
disconnecting call i want to send  call information on any Sever.
There is any callback function in android to handle that type of situation.
yaa how can achive this in android.

i can access call log but i want that happens just after incoming call or
outgoing call disconnect.

can any  one help me .

thank you

with regrads
bhavesh

-- 

3. WTHelp spica ga bisa root

4. no such table: SFAndroid_PacoteVisita

5. *#*#4636#*#* >>> testing screen

6. Graphic Designer looking for some android fun

7. Chickenstrip #1 v 1.1