Set Wallpaper under Android N

139 views
Skip to first unread message

Peter Bongé

unread,
May 24, 2016, 5:14:58 PM5/24/16
to Tasker
With Android N it will be possible to set different wallpapers for the home screen and the lock screen. If you set a wallpaper you can decide to set it for the one, the other or for both.

It would be nice if the "Set Wallpaper" function would get options for this. At the moment it just sets the wallpaper of the home screen.

Pent

unread,
May 25, 2016, 4:00:49 AM5/25/16
to Tasker
I will be implementing this as soon as I have a device and if it works OK. I can't test on the
emulator because it crashes when you press the 'power button'.

Pent

agung deppe

unread,
May 25, 2016, 4:44:26 AM5/25/16
to Tasker
this feature is also available in android 6.0 marshmallow...
can't wait to be implemented in the next tasker update. also if possible can set/choose from live wallpaper too..it would be great.
thanks.

Pent

unread,
May 25, 2016, 8:27:53 AM5/25/16
to Tasker



this feature is also available in android 6.0 marshmallow...

It's not in the docs or the SDK.

Pent

Peter Bongé

unread,
Jun 22, 2016, 2:28:23 PM6/22/16
to Tasker
This shouldn't be very complex. Just setting the right flag(s):

I would really like to test it for you ;-)

Regards,
Peter Bonge

Juergen Gruen

unread,
Jun 23, 2016, 6:40:20 AM6/23/16
to Tasker
Hi,

till then, you can use your own implementation:
Test (88)
<Start>
A1: Anchor
A2: Java Function [ Return:bitmap Class Or Object:BitmapFactory Function:decodeFile
{Bitmap} (String) Param:/storage/sdcard0/Pictures/myWallpaper.jpg ]
A3: Java Function [ Return:wpm Class Or Object:WallpaperManager Function:getInstance
{WallpaperManager} (Context) Param:CONTEXT ]
A4: Java Function [ Return: Class Or Object:wpm Function:setBitmap
{} (Bitmap) Param:bitmap Param: null Param: false Param:2]

Juergen.

Pent

unread,
Jun 23, 2016, 7:07:56 AM6/23/16
to Tasker
It's not complex, but I prefer to enable the code when I have a device to test on
since I couldn't test it with the emulator.

Pent

Peter Bongé

unread,
Jun 23, 2016, 8:03:40 AM6/23/16
to Tasker
That seems to work really great! Thanks! I've already searched a lot for this solution.

The Anchor at the beginning (A1) is a little bit confusing, but it works fine without.

And if other people are trying this solution: With the last parameter (Param:2) you can decide which wallpaper should be changed:
1 = home screen
2 = lock screen
3 = both

Peter Bongé

unread,
Jun 23, 2016, 8:09:14 AM6/23/16
to Tasker
OK. And meanwhile I also understand why the power button crash is a problem for testing this... ;-)

At least we now have a workaround.

Juergen Gruen

unread,
Jun 23, 2016, 1:04:25 PM6/23/16
to Tasker


The Anchor at the beginning (A1) is a little bit confusing, but it works fine without.

Sorry, this is my - usually - empty google groups test task. But a task without action is not valid, so i have the anchor at the beginning...
Reply all
Reply to author
Forward
0 new messages