Android shared preferences not saving

From the documentation: Create a new Editor for these preferences, through which you can make modifications to the data in the preferences and atomically commit those changes back to the SharedPreferences object. Since that’s a new Editor instance, your code should be more like this: preferences = getApplicationContext().getSharedPreferences(PREFERENCES_NAME, 0); SharedPreferences.Editor editor = preferences.edit(); editor.putString(SETTINGS_BACKGROUND_IMAGE, “okok”); … Read more

Change desktop wallpaper using code in .NET

Here’s a class yanked from an app I wrote a year or two ago: public sealed class Wallpaper { Wallpaper() { } const int SPI_SETDESKWALLPAPER = 20; const int SPIF_UPDATEINIFILE = 0x01; const int SPIF_SENDWININICHANGE = 0x02; [DllImport(“user32.dll”, CharSet = CharSet.Auto)] static extern int SystemParametersInfo(int uAction, int uParam, string lpvParam, int fuWinIni); public enum Style … Read more

How to convert a Drawable to a Bitmap?

This piece of code helps. Bitmap icon = BitmapFactory.decodeResource(context.getResources(), R.drawable.icon_resource); Here a version where the image gets downloaded. String name = c.getString(str_url); URL url_value = new URL(name); ImageView profile = (ImageView)v.findViewById(R.id.vdo_icon); if (profile != null) { Bitmap mIcon1 = BitmapFactory.decodeStream(url_value.openConnection().getInputStream()); profile.setImageBitmap(mIcon1); }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)