I've tried the following code on my samsung note5 with android 6.0, but I get a warning said no such method :
B4X:
Dim r As Reflector
r.Target = r.RunStaticMethod("android.app.WallpaperManager", "getInstance", Array As Object(r.GetContext), Array As String("android.content.Context"))
r.RunMethod4("setBitmap", Array As Object(Bmp, rc, True, 2), Array As String("android.graphics.Bitmap", "android.graphics.Rect", "java.lang.boolean", "java.lang.int"))
What's wrong with this code? And is there other way to set the lock screen background?
Thanks!
Dim wallpaper As JavaObject
Dim context As JavaObject
context.InitializeContext
wallpaper = wallpaper.InitializeStatic("android.app.WallpaperManager").RunMethod("getInstance", Array(context))
wallpaper.RunMethod("setBitmap", Array(your bitmap here))