How to manage installation from Unknown Sources in Android Oreo?

For starters, your application needs to declare a targetSdkVersion of 26 (API level of Android Oreo) or higher in your build.gradle or AndroidManifest.xml for all this to work. Then on to answer the questions above: How to check whether I’m allowed to request a package install? You can check this using getPackageManager().canRequestPackageInstalls() anywhere in your … Read more

How to open Visual Studio Code’s ‘settings.json’ file?

To open the User settings: Open the command palette (either with F1 or Ctrl+Shift+P) Type “open settings” You are presented with a few optionsĀ¹, choose Open User Settings (JSON) This image was taken in the VS Code online editor Which, from the manual and depending on platform, is one of: Windows %APPDATA%\Code\User\settings.jsonĀ² macOS $HOME/Library/Application\ Support/Code/User/settings.json … Read more

How to write to the main exe’s .config userSettings section?

After some research I came up with this solution. It is a bit low level, but still goes through the .NET configuration API without having to manually parse the .config file. static void SaveUserSettingDefault(string clientSectionName, string settingName, object settingValue) { System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); // find section group ConfigurationSectionGroup group = config.SectionGroups[@”userSettings”]; if (group == … Read more

How to load a separate Application Settings file dynamically and merge with current settings?

Well, this works: using System; using System.Configuration; using System.IO; using System.Linq; using System.Xml.Linq; using System.Xml.XPath; public static class SettingsIO { internal static void Import(string settingsFilePath) { if (!File.Exists(settingsFilePath)) { throw new FileNotFoundException(); } var appSettings = Properties.Settings.Default; try { var config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.PerUserRoamingAndLocal); string appSettingsXmlName = Properties.Settings.Default.Context[“GroupName”].ToString(); // returns “MyApplication.Properties.Settings”; // Open settings file … Read more

Registry vs. INI file for storing user configurable application settings [closed]

Pros of config file: Easy to do. Don’t need to know any Windows API calls. You just need to know the file I/O interface of your programming language. Portable. If you port your application to another OS, you don’t need to change your settings format. User-editable. The user can edit the config file outside of … Read more

How do I edit Visual Studio’s mouse shortcuts?

From my topic. Plugin that attaches Navigate back/forward to the mouse buttons: Mouse Navigation The last version (2.2.0) is working fine. Some clarifying: Visual Studio (2012) separates the normal navigation from “click to go” navigation. Normal navigation: mouse click anywhere in code editor, tab change also. Click to go navigation: Go to definition, search result … Read more

Properties.Settings.Default.Save(); -> Where is that file

On My Windows XP machine, the settings are saved in a file called user.config somewhere under either C:\Documents and Settings\<UserName>\Application Data\ or C:\Documents and Settings\<UserName>\Local Settings\Application Data\ Update: On Windows Vista and later, the locations have changed to C:\Users\<UserName>\AppData\Roaming\ and C:\Users\<UserName>\AppData\Local\