wallpaper

How to exclude devices with lower GPU in Android? [duplicate]

最后都变了- 提交于 2019-12-08 14:10:52
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: How to exlude all the devices which have low GPU in Android Manifest? Yesterday, I created a live wallpaper for Android and tried it in my Droid X, Galaxy S, and Fascinate. And I noticed that it runs smootly in Galaxy S and Fasciante but not in Droid X which has lower GPU. So far I can only eliminate a specific devices which has normal-xlarge screen using the code below. But it does not specifically tell whether

Set Image Wallaper of ViewPager in Universal Image Loader UIL

一笑奈何 提交于 2019-12-08 09:56:43
I am Using Nostra Universal Image Loader plugin, I would like to be able to see the currently image on the ViewPager as the Phone Wallpaper. My code below can set the wallpaper, but its not he currently image thats is displaying on the ViewPager, it will be a image before or a image after, and sometimes a ramdom image of the Sting Array. public class ImagePagerFragment extends Fragment { public static final String TAG = ImagePagerFragment.class.getSimpleName(); VarController vc; public static final int INDEX = 2; public String[] imageUrls; DisplayImageOptions options; ImageView imageView;

I cannot change Android wallpaper using WallpaperManager

泄露秘密 提交于 2019-12-08 07:53:28
问题 I am trying to change Android wallpaper using code. I am using the WallpaperManager class, but with no prevail. I used a .png image in the /drawable directory. I am getting an error that says, "Expected resource of type raw". When I run the application(when that method runs), it crashes. I must be victim of a really stupid mistake. The method changeWallpaper() is run after the user taps a button. Here is my code: public void changeWallpaper(View view) { try{ WallpaperManager wallpaperManager

Set wallpaper from ViewPager

ぐ巨炮叔叔 提交于 2019-12-08 07:50:45
问题 I have a ViewPager in which I change images with swype. Now I want to make button which will set current image that user is seeing as wallpaper. How to implement onPageSelected or something similar that will do the job? Code: package com.example.app; import java.io.IOException; import android.app.Activity; import android.app.WallpaperManager; import android.content.Context; import android.os.Bundle; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import

How to set wallpaper permanently in android

扶醉桌前 提交于 2019-12-08 07:21:40
问题 I am creating app to set image as wallpaper. I am using following code to fix image in every screen. The code is working fine. Image fit properly. But I have one problem if I play any game and then back to home screen or I restart my device then size of wallpaper zoom. I want to stop this. I want image size fit as it is on first time when I set wallpaper from my android app. Here's Code- @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);

How to add a wallpaper-gallery to an Android application

时间秒杀一切 提交于 2019-12-08 06:09:21
问题 I have noticed that some Android applications adds a new Wallpaper-gallery to the "Wallpaper-chooser". I am currently building a theme for Android and I would like to add some wallpapers with this feature. How is it done? 回答1: Figured out, that I have to write the code myself. Found the code in the Home-sample in the SDK 来源: https://stackoverflow.com/questions/4346698/how-to-add-a-wallpaper-gallery-to-an-android-application

Change wallpaper in Python for user while being system

瘦欲@ 提交于 2019-12-08 02:49:53
问题 what I am trying to do is change the desktop wallpaper in windows. To do that, I use the following code: import ctypes import Image pathToBmp = "PATH TO BMP FILE" SPI_SETDESKWALLPAPER = 20 ctypes.windll.user32.SystemParametersInfoA(SPI_SETDESKWALLPAPER, 0, pathToBmp , 0) this works when I run the .py file, this works when I convert it using py2exe and run the exe under the current user, but when I run the exe as SYSTEM, the current user background does not change. This ofcourse was to be

Showing Live Wallpaper in a 1.6 target app by detecting if it's a 2.1 device?

六月ゝ 毕业季﹏ 提交于 2019-12-07 19:28:25
问题 We're building an Android app with target SDK 1.6, so it will run on 1.6 devices and higher. We'd like to support Live Wallpapers, which we know is 2.1+ only. Is there a way to build one app with 1.6 SDK as the target, but detect if the device it's running on is 2.1, and only in that scenario call the live wallpaper API. We're trying to avoid having to build a separate 1.6 and 2.1 versions, and would like to be able to support Live Wallpapers for only 2.1 devices. So to be clear- 1 app, that

Set Image as wallpaper using Intent

て烟熏妆下的殇ゞ 提交于 2019-12-07 18:52:05
问题 I am using the following code to set the wallpaper from an image in a drawable: Intent setAsIntent = new Intent(); setAsIntent.setDataAndType(uri, "image/*"); setAsIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); setAsIntent.setAction("android.intent.action.ATTACH_DATA"); Intent chooserIntent = Intent.createChooser( setAsIntent, "set as"); But when startActivity, it only shows a message: No apps can perform this action 回答1: I did discover a workaround: Intent intent = new Intent(Intent

How to use getCropAndSetWallpaperIntent?

巧了我就是萌 提交于 2019-12-07 18:04:51
问题 I tried to use getCropAndSetWallpaperIntent method but I got an error. Here is my code : Uri uri = Uri.parse("content://" + getFilesDir() + "/"+ image.path); ContentResolver contentResolver = getContentResolver(); contentResolver.getType(uri); // Type is null Intent intent = wallpaperManager.getCropAndSetWallpaperIntent(uri); intent.setType("image/*"); startActivityForResult(intent, 42); Here is what I got in my logs : java.lang.IllegalArgumentException: Cannot use passed URI to set wallpaper