public override async void Init(object obj = null)
        {
            await App.Configuration.InitialAsync(this);

            _model = new AudioPlayerViewModel()
            {
                Root = (RootPage)obj,
                DisplaySortByListAction = DisplaySortByList
            };
            _model.SetActivityResource(false, true);
            BindingContext = _model;
            await _model.GetFilesAsync();
        }
Example #2
0
        private async void Init(object obj)
        {
            await App.Configuration.InitialAsync(this);

            _model = new AudioPlayerViewModel()
            {
                Root = (RootPage)obj,
                DisplaySortByListAction = DisplaySortByList
            };
            BindingContext = _model;
            if (await _devicePermissionServices.RequestDeviceKeepWakePermission())
            {
                _model.IsPermissionGranted = true;
            }
            await _model.GetFilesAsync();
        }