android-wallpaper

Storage permission issue for my wallpaper app in android marshmallow

被刻印的时光 ゝ 提交于 2020-01-17 07:17:32
问题 Even after adding storage permission to my app I am unable to set wallpaper or download wallpaper (one function of my app) Its like wallpaper setting app. and unable to share the wallpaper. Here is my piece of code which I did. Please have a look on my code and tell me what's wrong with it. If there is any solution plz explain me clearly step-by-step (I am New to android) AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res

Accessing WallpaperManager in Android 8.1

前提是你 提交于 2020-01-05 02:39:05
问题 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 wallpaperManager = WallpaperManager.getInstance(this); Drawable wallpaperDrawable = wallpaperManager.getDrawable(); ImageView imageView = findViewById(R.id.background); imageView.setImageDrawable

Set Wallpaper with bitmap avoid crop and set fit center

。_饼干妹妹 提交于 2019-12-24 03:15:04
问题 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 can use Bitmap.createBitmap, but my try was failed over and over. I have no idea that I should use only WallPaperManager or both Bitmap.createBitmp Too. static Bitmap createBitmap(Bitmap source, int

Unable to set picture as. “No appps can perform this action”

假装没事ソ 提交于 2019-12-24 01:06:58
问题 I am trying to give users an option to set image as wallpaper/whatsapp dp like this. But I'm stuck with this code Uri sendUri = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.a_day_without_thinking_mobile); Intent intent = new Intent(Intent.ACTION_ATTACH_DATA); intent.setDataAndType(sendUri, "image/jpg"); intent.putExtra("mimeType", "image/jpg"); startActivity(Intent.createChooser(intent,"Set As")); It shows a dialog that no apps can perform this action. I also tried to

Setting wallpaper instantly with setbitmap() android

痞子三分冷 提交于 2019-12-14 04:10:00
问题 I have been searching for an answer to my problem, but cant seem to find a right answer. I am trying to use tasker to set a background on my phone everytime a song changes. I got everything working, but setbitmap does not set wallpaper instantly. I have to interact with the phone in some way to get it to update ( open a folder, touch the screen etc). Is there a way to force an update after setbitmap has been called? Edit: Im using setStream now. Here is a short video showing what im trying to

How to set wallpaper of image getting from url in android

痴心易碎 提交于 2019-12-13 05:01:50
问题 From below code I am able to get the image on imageview from server using URL of that image. Now I want to set as wallpaper of that image. Please provide solution.... so that I will be able to set wallpaper without downloading the image in my phone. onCreate() method { image = (ImageView) findViewById(R.id.image); new DownloadImage().execute(URL); } private class DownloadImage extends AsyncTask<String, Void, Bitmap> { @Override protected void onPreExecute() { super.onPreExecute(); // Create a

Why I get defected image from ImageCropper( android wallpaper app)?

倖福魔咒の 提交于 2019-12-13 02:23:39
问题 I am making android wallpaper app. At the start, I didn't use imagecropper and background image for android was very perfect. Then I wanted to add ImageCropper function and I noticed the problem: Image that I got from ImageCropper was very defected and bad quality. I am sure that the problem is here: (Performcrop method(starts activity for result)) public void performCrop(Uri picUri, Bitmap qq){ try { utils = new Utils(getApplicationContext()); int height, width; Display display =

BroadcastReceiver for WALLPAPER_CHANGED calls onReceive() multiple times : Android

半世苍凉 提交于 2019-12-12 09:33:49
问题 I have a BroadcastReceiver and declared it like this: <receiver android:name="com.services.Receiver" android:enabled="true" android:exported="true" > <intent-filter android:priority="999" > <action android:name="android.intent.action.WALLPAPER_CHANGED" /> </intent-filter> </receiver> 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()

How I can change my asyncTask into service?

浪子不回头ぞ 提交于 2019-12-12 01:24:08
问题 How is it possible to change my asyncTask into service because everytime i close the app or the restart the device my aysncTask not working . I have aysnc that sends Post request to php server and i got back an image on every request so i putted setting option to the user he can choose to the picture of wallpaper to change on every 1,5,10,..... min but like i said i want to be service so when the user choose the timing to change the wallpaper and closes (destroy) the application the server

android Scrollable wallpaper on screen's phone programmatically

拟墨画扇 提交于 2019-12-11 23:35:31
问题 I am developing a wallpaper application in Android and i am finding a right way to set scrollable wallpaper for my app. Now, my code can set wallpaper from bitmap but it was cropped to fit with one page and just stayed only on one page (i have 5 pages in home screen). That means the content in each page can scroll through the wallpaper but the wallpaper was not scroll. I want to set a scrollable wallpaper. I tried some codes from internet but they did not help. Do you guys have any idea?