public override void OnCreate() { InitList(); InitPlayer(); prefs = new ServiceSharedPref(this); RepeatSharedPrefs repPref = new RepeatSharedPrefs(this); RepeatMethod repMethod = repPref.GetMethod(); ChangeLoopback(repMethod.ToString()); if (Build.VERSION.SdkInt >= BuildVersionCodes.O) { var notificationManager = GetSystemService(Context.NotificationService) as NotificationManager; NotificationChannel chan = new NotificationChannel("com.PapIndustries.PapMediaPlayerService", "NotChannel", NotificationImportance.Max) { LightColor = Color.Blue, LockscreenVisibility = NotificationVisibility.Public }; notificationManager.CreateNotificationChannel(chan); } SetNotificationBar(); RegisterReceivers(); if (notify != null) { StartForeground(SERVICE_ID, notify); } base.OnCreate(); }
public void SetMethod(RepeatMethod repeat) { using (ISharedPreferencesEditor editor = @Context.GetSharedPreferences(RepeatConf, FileCreationMode.Private).Edit()) { editor.PutInt(RepeatAttr, (int)repeat); editor.Apply(); editor.Commit(); } }
public RepeatMethodEventArgs(RepeatMethod RMethod) { newRMethod = RMethod; }
/// <summary> /// Creates a new instance of ViewPlayManager /// </summary> /// <param name="viewMethod">View Method style</param> /// <param name="RepMethod">Repeat Method style</param> public ViewPlayManager(ViewMethods viewMethod, RepeatMethod RepMethod) { viewm = viewMethod; rep = RepMethod; }
/// <summary> /// Creates a new instance of ViewPlayManager with specified RepeatMethod and default ViewMethod /// Default Value: ViewMethod -> AllTracks /// </summary> /// <param name="RepMethod">Repeat Method style</param> public ViewPlayManager(RepeatMethod RepMethod) : this(ViewMethods.AllTracks, RepMethod) { }