static public ServiceConnection <ServiceType> Bind(Activity activity, IServiceConnection <ServiceType> altConnection, Android.Content.Bind bindFlags = Android.Content.Bind.AutoCreate) { Intent intent = new Intent(activity, typeof(ServiceType)); var realConnection = new ServiceConnection <ServiceType>(activity, altConnection); activity.BindService(intent, realConnection, bindFlags); return(realConnection); }
static public ServiceConnection <ServiceType> Bind(Activity activity, Android.Content.Bind bindFlags = Android.Content.Bind.AutoCreate) { return(Bind(activity, null, bindFlags)); }