android-wallpaper

How to getCropAndSetWallpaperIntent(Uri imageUri) to work?

…衆ロ難τιáo~ 提交于 2019-11-30 21:33:26
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.android.com/reference/android/app/WallpaperManager.html#getCropAndSetWallpaperIntent(android.net.Uri) that doesn't help my brains. And this doesn't work WallpaperManager wallpaperManager = WallpaperManager.getInstance(MainActivity.this); Uri uri = Uri.parse("android.resource://lv.revo

How to getCropAndSetWallpaperIntent(Uri imageUri) to work?

一个人想着一个人 提交于 2019-11-30 17:16:05
问题 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.android.com/reference/android/app/WallpaperManager.html#getCropAndSetWallpaperIntent(android.net.Uri) that doesn't help my brains. And this doesn't work WallpaperManager wallpaperManager =

Set image as wallpaper from url

丶灬走出姿态 提交于 2019-11-30 09:07:13
问题 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 work for me. The app shows the button, but when I click it anything happens. Here is the code: package com.example.myapplication4; import android.app.Activity; import android.app.ProgressDialog;

How to get android lock screen wallpaper?

为君一笑 提交于 2019-11-30 05:18:58
问题 I use the code below to retrieve the android lock screen wallpaper on an android 8.1 phone: WallpaperManager manager = WallpaperManager.getInstance(getActivity()); ParcelFileDescriptor pfd = manager.getWallpaperFile(WallpaperManager.FLAG_LOCK); if (pfd == null) // pfd is always null for FLAG_LOCK, why? return; Bitmap lockScreenWallpaper = BitmapFactory.decodeFileDescriptor(pfd.getFileDescriptor()); // ... I have granted the READ_EXTERNAL_STORAGE permission and set a lock screen wallpaper

Set image as wallpaper from url

假如想象 提交于 2019-11-29 12:50:31
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 work for me. The app shows the button, but when I click it anything happens. Here is the code: package com.example.myapplication4; import android.app.Activity; import android.app.ProgressDialog; import android.app.WallpaperManager; import android.graphics.Bitmap; import android.graphics.BitmapFactory;