Questions tagged [android-wallpaper]

1

votes
0

answer
26

Views

Is it possible to query apps for their wallpapers?

There are apps that offer their own wallpapers, such as Nova Launcher, and Google's Wallpapers: My question is simple: Is it possible to query such apps for their wallpapers (images and maybe more information) ? If so, how? Is there anything special on those apps, that made it possible to find thei...
android developer
1

votes
0

answer
152

Views

How to automatically change wallpaper after every 30 seconds using JobScheduler?

I am creating application where there is an option of checkbox allowing user to change wallpaper automatically after 30 seconds. I am using JobScheduler and have passed arraylist of images by serializing them to JsonArray and then to String and passed it using PersistanceBundle: JsonArray result = (...
RahulS
1

votes
0

answer
517

Views

Set LockScreen Wallpaper Programmatically Android

I am building a wallpaper application using unsplash api. I have fetched the images and displayed in the app. I have a button which shows a dialog to set as home screen (works fine) or lock screen wallpaper. The problem here occurs when I try to set the lock screen wallpaper, it doesn't change the i...
Andromeda
1

votes
0

answer
33

Views

No package identifier when getting value for resource number 0x00000002

I am trying to retrieve current lock screen wallpaper but my app crashes. Drawable drawable = WallpaperManager.getInstance(MainActivity.this).getDrawable(); getDrawable(WallpaperManager.FLAG_LOCK); I am getting this error. No package identifier when getting value for resource number 0x00000002
Waheed Abbas
1

votes
0

answer
27

Views

Wallpaper manager crashes when image is loaded with transition

I use Glide to load the image from URL and set it as wallpaper, however when transitions are applied to glide the image loads with the transition but when the image is set as wallpaper the app crashes (when loaded without transition everything works fine) java.lang.ClassCastException: android.graphi...
Frisky Coder
1

votes
0

answer
58

Views

Why MediaSession not changing the lock screen background (may be Bitmap size problem: read for more info)?

I am stuck in this problem from last 6 days after deep research through media session I found this important line Album artwork for display on the lock screen. The image is a bitmap with a maximum size of 320x320dp (if larger, it's scaled down). Now, Here is my code of media session and Notificatio...
Vipul Chauhan
1

votes
2

answer
534

Views

how to getDrawingCache() with wallpaper

My application is a launcher, now I need a bitmap of current view. Launcher's view can be retrived by getDrawingCache(), like following Bitmap bitmap = Bitmap.createBitmap(screen_w, screen_h, Config.ARGB_8888 ); View decorview = getWindow().getDecorView(); decorview.setDrawingCacheEnabled(tr...
RoFF
1

votes
1

answer
1.4k

Views

how to get current wallpaper information in android?

I want to retrieve info about current Wallpaper like its name, path, etc. Is this possible, and if so, how can I do it? I am currently calling WallpaperManager in service at some part of my code. Does android provide any inbuilt function or method for this?
Mayur R. Amipara
1

votes
2

answer
416

Views

Calculate time thread android

I'm using a thread to set an image as background and in this thread i have a dialog. The dialog starts and should be close when the wallpaper will be set. This is the code so far setWallbtn.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { final ProgressDialog myPd_r...
End.Game
1

votes
2

answer
514

Views

Android get wallpaper name

I am developing an Android app for our company which sets the wallpaper to a specific company wallpaper every time the phone is booted. It would be preferable to check to see if the wallpaper has been changed rather than running the code to change the wallpaper. Is there any way to get identifying...
Jonathan Twite
1

votes
1

answer
445

Views

Wallpaper app crashing on clicking set button

I have been trying to make a wallpaper app. When we click on a specific image from the gallery, it opens a new activity as below, where the image is displayed in full size and there is a button to set it as the wallpaper. I am using Glide library to load the pictures from the url. Please tell me how...
Abhriya Roy
1

votes
1

answer
26

Views

Wallpaper not scaled to the device's display

I want to set the image as wallpaper of the device by clicking on a button, I set the click listener (setWall) but the image is not scaled to the device's display. imageBrought = getIntent().getExtras().getString('appMomentImage'); Glide.with(getApplicationContext()).load(imageBrought).don...
Nicco
1

votes
1

answer
266

Views

In Android 8 (Oreo) Intent Chooser is not working to set WallPaper

I'm using following code snippet to set wallpaper. In all version lower than Android 8 (Oreo) it shows a picker to choose lock screen or home screen or both etc. But in Android 8 it directly sets the wallpaper at Home screen without any confirmation. Is anything updated in Oreo or it is issue with t...
Usman Rana
1

votes
2

answer
92

Views

How do I change wallpaper periodically using WorkManager?

I am trying to change the wallpaper of Android, in some periodic interval. I used WorkManager to run a worker, that downloads the wallpaper in the background and sets it. As long as the app is running, the wallpaper is changed. When I close the wallpaper, it stops. I am using PeriodcWork in Workman...
This Guy Codes
1

votes
2

answer
65

Views

Detect if background wallpaper is too light or too dark

I would like to change my textviews color when the wallpaper chosen by the user is too light or too dark acting basically as the latest launchers that for instance if it is set a white wallpaper, change all the textviews to a dark color but I dont know how to detect that. Help. Thanks in advance.
Luca
1

votes
1

answer
1.2k

Views

Set Wallpaper with bitmap avoid crop and set fit center

I'm trying to make a Wallpaper Application. And I had big trouble during set wallpaper with bitmap. I try to figure out answer for a week. I want to set Bitmap in to wallpaper like avoid crop scaleType:fit_center(align center vertical, aspect ratio) How can I make it? P.S. And I found that maybe I c...
HoJunLee
1

votes
1

answer
1.5k

Views

I cannot change Android wallpaper using WallpaperManager

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 v...
mcpolo
1

votes
2

answer
1.4k

Views

Android set wallpaper of home screen with centering the image

I wrote a simple application that sets the wallpaper on the device. I can't achieve one effect. I wish the picture automatically centrated horizontally. This means that the center of the image was on the most central desktop of Luncher app. The picture at the bottom shows how it looks now: Effect th...
Piotr Suchanek
1

votes
1

answer
485

Views

How to set color resource as a wallpaper in android?

I want to set a solid color as a wallpaper in android, but when I click on the button, the app unfortunately stops. Here is my code: protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Button btn = (Button) findViewById(R.i...
MD Danish Ansari
1

votes
1

answer
279

Views

On Image selected , set as wallpaper

I am new to Android development. For learning purpose, I used an app from github. This app consists of a wallpaper, which changes when the user swipes. I want to know, if there is a way that, on longpress on that image, the user can set that image as the wallpaper for the device (with crop option)....
cod
17

votes
3

answer
914

Views

BroadcastReceiver for WALLPAPER_CHANGED calls onReceive() multiple times : Android

I have a BroadcastReceiver and declared it like this: and the receiver is: @Override public void onReceive(final Context context, final Intent intent) { change_wallpepar.myPrefs = context.getSharedPreferences('myPrefs', Context.MODE_PRIVATE); new Handler().postDelayed(new Runnable() { @Override pub...
Mayur R. Amipara
6

votes
4

answer
2.6k

Views

What does it mean for a method to be deprecated, and how can I resolve resulting errors?

Why do I get a deprecation error on the line containing setWallpaper(bmp), and how can I resolve it? Error: The method setWallpaper(Bitmap) from the type Context is deprecated switch(v.getId()){ case R.id.bSetWallpaper: try { getApplicationContext().setWallpaper(bmp); } catch (IOException e) { // TO...
TAM
4

votes
1

answer
196

Views

One launcher icon for multiple Live Wallpapers

I'm currently working on the rollout process of my upcoming live wallpapers. I currently have one live wallpaper in the Google Play store that comes with no launcher whatsoever. The settings can only be adjusted in the native live wallpaper settings. For the future I am planning to create an additio...
Al0x
2

votes
0

answer
81

Views

How to access systems live wallpaper in my own launcher

When I am calling the service it is not opening the live wallpaper selector. Here is my code for selection the live wallpaper : public class LiveWallpaper extends WallpaperService { @Override public Engine onCreateEngine() { return new WallpaperEngine(); } private class WallpaperEngine extends Engi...
Anamika Chavan
2

votes
0

answer
852

Views

Programmatically setting wallpaper on lock screen for Samsung TouchWiz devices?

I have built an app that changes users wallpaper on a timer. I use the standard WallpaperManager.setWallpaper function, and things work great on AOSP-based devices. However, on some OEM platforms like TouchWiz, it doesn't work for the lock screen (it only sets the launcher wallpaper). Is it possible...
RealCasually
2

votes
0

answer
92

Views

How to check if user has seen the wallpaper set by my app

I am working on an app which checks device time and set a wallpaper based on the time of the device. To state the challenge : It's 11'o clock and a wallpaper X is set by my app running in the background. At that very instance, user was playing a game and did not notice the change. Now, it's 11:15 a...
Shubham A.
2

votes
2

answer
565

Views

Get all live wallpapers from device

I'm trying to develop android app And I want to allow user to choose background of app from live wallpapers. Now, How I can get Live Wallpapers from device? I want to get all live wallpapers from device, Can I do it?
2

votes
1

answer
162

Views

Avoid Wallpaper being Stretch on Some Devices

Hello There I am totally new to Android Dev. and learning it to my own. I am learning to setup a home screen wallpaper, and I have been facing a problem that my wallpaper being stretch on some devices (not all). The problem is strange, when I set the wallpaper from my app, closes my app and come to...
Java Nerd
2

votes
1

answer
622

Views

how to set wallpaper fixed and scrollable same like OGQ Backgrounds HD App do's in android

I wants to set wallpaper fixed and scrollable. This is link to the OGQ Backgrounds HD App. https://play.google.com/store/apps/details?id=com.ogqcorp.bgh That app screen shots attached here, The same way i wants to do any how. please suggest any library or reflection class code, hacking or any other...
Mitul Varmora
2

votes
1

answer
168

Views

Intent extra on WallpaperManager's broadcast receiver

I'm building a wallpaper application. I have a button which sets the wallpaper. What I would like to do is to check if the wallpaper is downloaded, if yes set the wallpaper - if not, download and set the wallpaper. I check if a file with an ID (e.g. 26748.jpg) exists, if yes I successfully set the w...
dynamitem
2

votes
0

answer
246

Views

Android live wallpaper in Opengl ES 2.0 and preference management

I'm writing a Opengl ES 2.0 live wallpaper for Android starting from article found here. In the code of the article to apply preference changes, you need to restart wallpaper (as wrote in section 4. Viewing the new live wallpaper). I want to bypass this limitation: i want to switch from preference...
xcesco
2

votes
0

answer
71

Views

Check if the device supports scrolling wallpapers programmatically

Some launchers do not support scrolling wallpapers. Is there a way to check this programmatically? I've checked WallpaperManager and I cannot find a reference to this. Thanks
Fhl
2

votes
1

answer
1.2k

Views

Android Set Lock Screen Wallpaper

According to Android Developers I must have API > 24 to set the locked screen wallpaper and I only have 23. However, both the Photos and Pandora apps set my lock screen wallpaper Can anyone help me do one of the following? Set the lockscreen like Pandora? Send an intent to the photos app to set the...
SeaRoth
1

votes
2

answer
1.2k

Views

Android setWallpaper deprecated

I want to create an Application that allows me to set my phone's wallpaper, but i have a problem with : getApplicationContext().setWallpaper(bm). It says that setWallpaper is deprecated and i should use another method, but i have no idea what method to use. This is my code so far: package com.exampl...
Maveloff
2

votes
1

answer
431

Views

Accessing WallpaperManager in Android 8.1

I'm building a launcher and need to access the user's current background wallpaper but every time I launch the app I get the warning W/WallpaperManager: No permission to access wallpaper, suppressing exception to avoid crashing legacy app. in the logs. Here is the code I'm using: WallpaperManager wa...
Epicality
1

votes
1

answer
4.1k

Views

Set image as wallpaper from url

I want to create an app which allows the user set an image as wallpaper by clicking a button. This image would be located in an url, and the setting of wallpaper is performed via AsyncTask. I've followed the steps as shown in this video: https://www.youtube.com/watch?v=JeA8Z8dtD10 but it doesn't wor...
Isaías
3

votes
2

answer
872

Views

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

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 Sh...
Kevin Bright
2

votes
2

answer
96

Views

How to set a wallpaper as the homescreen full screen

I have a wallpaper with optimum size to my phone: myWallpaper And I want set it as the homescreen by: WallpaperManager myWallpaperManager = WallpaperManager.getInstance(this); String imageFilePath = myWallpaperPath; Bitmap myBitmap = BitmapFactory.decodeFile(imageFilePath); if (myBitmap != null) { t...
mh m
5

votes
2

answer
1.5k

Views

How to getCropAndSetWallpaperIntent(Uri imageUri) to work?

So, there are two questions that are the same as this( How to use getCropAndSetWallpaperIntent method in WallpaperManager? AND How to use getCropAndSetWallpaperIntent? ), but there are no answers to both of them. In hope of an answer I'm asking this - how to get this method to work. http://developer...
2

votes
1

answer
500

Views

Passing the image to the default wallpaper Application through intent

We are trying to set the downloaded image (and stored inside galley under our own folder) as wallpaper using our application, and its working using the below code. public void Set_Current_wallpaper() { File f = new File(mCurrentWallpaperPath); // mCurrentWallpaperPath is Our folder inside gallery Ur...
unitedartinc

View additional questions