wallpaper

Wallpaper change event

谁都会走 提交于 2019-12-04 14:47:48
Can I get a wallpaper changed event in a broadcast receiver? I need to detect if the user changed the wall paper. How could I do it? What I am doing is this: I have an app that changes wallpaper automaticly. If the user changes it manually using a different aplication I would like to notice it and ask the users if he/she wants to add that new wallpaper to the list in my application There is only a broadcast for when a wallpaper image changes: http://developer.android.com/reference/android/content/Intent.html#ACTION_WALLPAPER_CHANGED To do what you want, you will need to have more logic to use

How do I restart this wallpaper engine after settings have been updated?

南楼画角 提交于 2019-12-04 13:59:14
问题 I'm creating a live wallpaper and I'm using this tutorial as a starting point: http://code.tutsplus.com/tutorials/create-a-live-wallpaper-on-android-using-an-animated-gif--cms-23088 I'm trying to add a settings menu to let the user choose one of four backgrounds. I have everything working using SharedPreferences . The only problem is that the wallpaper does not update after the setting is changed in the settings menu. If you restart the app, the background will be updated with the last

Get color from wallpaper? - Android

浪子不回头ぞ 提交于 2019-12-04 12:22:05
How can I find the (Average) color of the current wallpaper and set that color to a layout on my widget? An example of what I'm trying to do: This is a setting on AccuWeather: Naveed Akhtar First you have to get current wallpaper and convert it to bitmap like final WallpaperManager wallpaperManager = WallpaperManager.getInstance(this); final Drawable wallpaperDrawable = wallpaperManager.getDrawable(); Bitmap bitmap = ((BitmapDrawable)wallpaperDrawable).getBitmap(); After that use this link to get dominant color of an image. You can use WallpaperManager.getWallpaperColors that was added in API

Notification when desktop wallpaper changes?

与世无争的帅哥 提交于 2019-12-04 10:57:19
is there any kind of notification available for when the desktop wallpaper is changed? Thanks! [[NSDistributedNotificationCenter defaultCenter] addObserver:target selector:@selector(desktopImageChanged:) name:@"com.apple.desktop" object:@"BackgroundChanged"]; should to the job 来源: https://stackoverflow.com/questions/5673045/notification-when-desktop-wallpaper-changes

Cropping Picture on Droid X sets resulting image as wallpaper

荒凉一梦 提交于 2019-12-04 10:51:29
I'm running into an issue with my program when trying to crop an image selected by the user from their gallery. The issue so far only appears when running on a Droid X, as running on the original moto Droid works fine. Basically the issue occurs as the cropping intent is being run. Once the user crops the photo and clicks the save button, it replaces the wallpaper on the main screen with the cropped image that was saved! It does not do this on the moto droid, or emulators. Below is the code for cropping and saving the picture to the SD card: @Override public void onActivityResult(int

live wallpaper with images

别说谁变了你拦得住时间么 提交于 2019-12-04 09:43:07
问题 (sorry for my Englih is not so good... hope you will understand me) My friend is a really good drawer. I would like to help him to be know as a good drawer by making him a live wallpaper animated with his drawings. I would like him to draw few frames and use these frames to make a live wallpaper by displaying them one after the other. I'm struggling so much to display one picture then wait a bit and display the next one. I'm quite sure that I can't succeed to do it because I don't use the

Avoid a wallpaper to stretch across 5 screens

不问归期 提交于 2019-12-04 08:46:02
问题 I've been facing a problem. How do I set a wallpaper in Android, without stretching it across 5 home screens. To be clear, I have a resource images with resolution 320x480px and when I set it as wallpaper in Android, it gets stretched across 5 screens, but I want it to show up only in 1 screen (or the same image in all screens), got it? I'm not interested in using a livewallpaper. 回答1: Only way to have an app do that is using a live wallpaper. There are two types of wallpaper, static and live

why does this code lock my files?

左心房为你撑大大i 提交于 2019-12-04 08:37:54
Ive narrowed down to this method but i don't understand why its locking the file. I believe you could use something like using( something) { //do stuff here } But im not sure that would A) solve the issue or B) be the correct way if it did. any ideas? [DllImport("user32.dll", CharSet = CharSet.Auto)]private static extern Int32 SystemParametersInfo(UInt32 action, UInt32 uParam, String vParam, UInt32 winIni); private static readonly UInt32 SPI_SETDESKWALLPAPER = 0x14; private static readonly UInt32 SPIF_UPDATEINIFILE = 0x01; private static readonly UInt32 SPIF_SENDWININICHANGE = 0x02; private

Getting all system wallpapers

白昼怎懂夜的黑 提交于 2019-12-04 03:35:23
Is there a way to programatically get all the android system wallpapers? I know how to get the current one, via WallpaperManager , and then save it to disk. But I want to know if there is a way to access all the pictures that act as system wallpaper included with the O.S. Thomas All the wallpapers are located in the launcher app. As the name of the launcher and its resources may vary accross devices, there is no way to create a reliable way to do this. On stock Android the wallpapers are located in Launcher2.apk:res/drawable- somedpi . On my devices they were in the drawable-hdpi folder, but

Prevent Live Wallpaper orientation change when an application is opened and orientation is changed?

情到浓时终转凉″ 提交于 2019-12-04 02:53:07
I'm having an orientation issue with a Live Wallpaper that I wrote. Basically the canvas will rotate depending on the application opened above it. I tested this and realized that the onSurfaceChanged() method is firing when I return to the home screen from a previously opened application who's orientation was changed. I suppose a better question would be, why does my Live Wallpaper Surface Change when an application is opened and it's orientation changed? Is there a way to prevent my Live Wallpaper orientation from ever changing? Thanks, hope that makes sense? You can handle screen orientation