Android: No Activity found to handle Intent error? How it will resolve

Add the below to your manifest: <activity android:name=”.AppPreferenceActivity” android:label=”@string/app_name”> <intent-filter> <action android:name=”com.scytec.datamobile.vd.gui.android.AppPreferenceActivity” /> <category android:name=”android.intent.category.DEFAULT” /> </intent-filter> </activity>

Java: java.util.Preferences Failing

Unfortunately most of the answers you got here are wrong … at least slightly. In the sense that the symptom is being treated, not the cause. Let’s recap. Java Preferences has two “trees”: the user tree and the system tree. You can write your own backend to Java Preferences (called a backing store) but few … Read more

Maintaining a common set of Eclipse preferences

You could of course export/import those settings. The other approach is to enable project specific settings for some settings. We have a very small Git repository with those kind of files: .settings/org.eclipse.jdt.core.prefs (compiler problem settings and formatter rules) .settings/org.eclipse.jdt.ui.pref (cleanup rules, common code templates) The common settings are just copied/merged in each projects .settings directory, … Read more

Java Swing save and load workspace/settings

In this case, the obvious solution, java.util.prefs.Preferences, is probably the correct one. RCPrefs from this game is a simple example that demonstrates saving a variety of data types, including enum. The exact implementation is highly dependent on the application. While tedious, it needn’t be especially complex. For expedience, the example uses static methods; frame and … Read more

Android Preferences: How to load the default values when the user hasn’t used the preferences-screen?

this question is similar to mine: initialize-preferences-from-xml-in-main-activity Just use this code in onCreate method: PreferenceManager.setDefaultValues(this, R.xml.preference, false); It will load your preferences from XML, and last parameter (readAgain) will guarantee that user preferences won’t be overwritten. That means setting the readAgain argument to false means this will only set the default values if this method … Read more

Cocoa – Notification on NSUserDefaults value change?

Spent all day looking for the answer, only to find it 10 minutes after asking the question… Came across a solution through Key-Value-Observing: [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@”values.MyPreference” options:NSKeyValueObservingOptionNew context:NULL]; Or, more simply (per comment below): [[NSUserDefaults standardUserDefaults] addObserver:self forKeyPath:@”MyPreference” options:NSKeyValueObservingOptionNew context:NULL];