live-wallpaper

Android Live Wallpaper Animation

自作多情 提交于 2019-12-10 11:39:56
问题 What's the best way to display an animation as a live wallpaper? Right now I have a gif split into 11 pngs (one per frame) and then I just am doing public Bitmap frame0; ArrayList<Bitmap> frameArray = new ArrayList<Bitmap>(); frame0 = BitmapFactory.decodeResource(getResources(), R.drawable.nyancat0); frame0 = Bitmap.createScaledBitmap(frame0, minWidth, minHeight, true); frameArray.add(frame0); Then I just use a For Loop to loop through the frames and draw them on a canvas canvas.drawBitmap

How to make Animated Android Live Wallpaper? [closed]

﹥>﹥吖頭↗ 提交于 2019-12-09 04:15:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . Can anyone suggest me of any step by step tutorials on how to make and Android LiveWallpaper. I am not able to find any good tutorials and I am sort of new to this. 回答1: Take a look at this article from Vogella: http://www.vogella.de/articles/AndroidLiveWallpaper/article.html Start at: 2. Android Wallpaper

VideoView in a live wallpaper?

元气小坏坏 提交于 2019-12-08 15:28:39
问题 As per other questions android-video-as-a-live-wallpaper, is the only way to play a video in a live wallpaper is to decode it yourself? 回答1: Just use MediaPlayer instead of VideoView and use MediaPlayer.setSurface instead of MediaPlayer.setDisplay. If you use setDisplay the MediaPlayer trys to tell the SurfaceHolder to keep the screen on which isn't allowed for LiveWallpapers and will throw an error. I use WebM/vpx8 video but this should work with whatever MediaPlayer supports (just put the

Android Livewallpaper settings fail to load from 'configure…' menu

杀马特。学长 韩版系。学妹 提交于 2019-12-08 14:20:25
I am unable to load the live wallpaper preferences from 'Wallpaper>Configure...'. The preferences load fine when i click the settings button from within the Livewallpaper menu. Here are some screen shots to better explain the error: Error Log The manifest file is as follows: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.RrD" android:versionCode="1" android:versionName="1.0"> <uses-sdk android:minSdkVersion="8" /> <uses-feature android:name="android.software.live_wallpaper" /> <uses-permission android:name=

LVL licensing in a Live Wallpaper?

时光总嘲笑我的痴心妄想 提交于 2019-12-08 12:05:48
问题 Has anybody had success integrating the Licensing Verification Library (LVL) with a Live Wallpaper? If it were just running an Activity, it'd be crystal clear to just extend my Activity from the Licensing Activity, which in turn extends Activity. But Live Wallpapers are a Service, and I'm not sure how the two are intended to interact. I'm using code derived from this: http://www.droidforums.net/forum/android-app-developers/69899-market-license-easy-implementation-protect-your-apps.html which

Android Live Wallpaper touch events

陌路散爱 提交于 2019-12-08 01:43:11
问题 I've just started with Android, I'm making a simple Live wallpaper. I'm testing it on a 2.1 emulator. The trouble is while it works in the preview screen before you choose "Set Wallpaper" the touch events don't appear to register on the screen once you've selected it as a wallpaper. Do I need to state anything in the manifest about touch events or so to get it to work? Little bit confused why it would work in one and not the other. public void handleTouchEvent(MotionEvent event) { if(event

Live Wallpaper and extended background

大兔子大兔子 提交于 2019-12-07 17:31:53
问题 I'm trying to create a live wallpaper with an animation always centered in the current homescreen page, without loosing the extended background. What I'm doing right now is to draw my custom background bitmap, then draw some text on it. This is my drawframe method: final SurfaceHolder holder = getSurfaceHolder(); Canvas canvas = null; try { canvas = holder.lockCanvas(); if (canvas != null) { if(mBackgroundBitmap != null) { canvas.drawBitmap(mBackgroundBitmap, 0, 0, null); } else { canvas

Getting error at WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER

萝らか妹 提交于 2019-12-07 04:26:46
问题 I'm creating my fist Live wallpaper by following this tutorial. But i'm getting error can not be resolved or is not a field on these two lines WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT while trying to achive this Intent intent = new Intent( WallpaperManager.ACTION_CHANGE_LIVE_WALLPAPER); intent.putExtra(WallpaperManager.EXTRA_LIVE_WALLPAPER_COMPONENT, new ComponentName(this, LiveWallService.class)); And compiler provides these suggessions:

android.media.audiofx.Visualizer throwing exception every other time

ぃ、小莉子 提交于 2019-12-07 02:21:32
问题 I'm making a Live Wallpaper for Android 2.3.3 and it used the Visualizer class. I've already got a working version of my Visualizer program working as a stand alone but when I place the code into a Live Wallpaper service, my problem begins. The following code is where the error exists: // Called in my Engine extension's constructor public void setupVisualizer() { mBytes = null; mVisualizer = new Visualizer(0); // EDIT mVisualizer.setEnabled(false); // This fixes the issue // END EDIT

Moving Circle on Live Wallpaper

妖精的绣舞 提交于 2019-12-06 15:31:23
I have to draw a circle in live wallpaper when it touches the boundary the direction of drawing gets reversed (something like in zigzag format). The problem is i am able to draw circle in this format. But: How to remove the previously drawn circle so that only single circle (dot) is visible at a time. When i redraw the bitmap it starts flickering why this happens? Code is as follows: Thread to draw circle: {animRunnable = new Runnable() { public void run() { if (!isRightEndReached && moveCircleX < 320) { moveCircleX++; moveCircleY++; } else if (isRightEndReached) { moveCircleX--; moveCircleY++