I have a service with an following constructor:
public ShimmerService(Context context, Handler handler) {
mHandler = handler;
}
I want
You should not construct services (or activities, or broadcast receivers) explicitly. The Android system does that internally. The proper way to construct a service is via startService()
with an intent; feel free to add extra parameters to that intent.
EDIT: or bindService()
. Then you have options - either build a custom interface with AIDL, or use raw transact()
.