2017-08-03 13 views

答えて

0
public interface ISystemSettings 
{ 
    void OpenApplicationDetailsSettings(); 
} 

のiOS

[assembly: Dependency(typeof(SystemSettings))] 
public class SystemSettings : ISystemSettings 
{ 
    public void OpenApplicationDetailsSettings() 
    { 
     var ApplicationUrl = new NSUrl(UIApplication.OpenSettingsUrlString); 
     UIApplication.SharedApplication.OpenUrl(ApplicationUrl); 
    } 
} 

アンドロイド

[assembly: Dependency(typeof(SystemSettings))] 
public class SystemSettings : ISystemSettings 
{ 
    public void OpenApplicationDetailsSettings() 
    { 
     Forms.Context.StartActivity(new Intent(
      Android.Provider.Settings.ActionApplicationDetailsSettings, 
      Android.Net.Uri.Parse("package:" + Android.App.Application.Context.PackageName))); 
    } 
} 
関連する問題