예제 #1
0
            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);
            }
예제 #2
0
 static public ServiceConnection <ServiceType> Bind(Activity activity, Android.Content.Bind bindFlags = Android.Content.Bind.AutoCreate)
 {
     return(Bind(activity, null, bindFlags));
 }