Identifying Live Wallpapers

bloxa69

Active Member
Licensed User
Longtime User
When I check from my app the current wallpaper running on device, for all my wallpapers made with B4A I get:

anywheresoftware.b4a.objects.WallpaperInternalService

And it looks like it's not possible to change it as it's hardcoded(?) in the Live Wallpaper library. Is there any way to identify different made with B4A LWPs running on the same device?

Just in case the code for checking current LWP from B4A (may help somebody):

B4X:
   Dim r As Reflector
    Dim LWPinfo As String
    r.Target = r.RunStaticMethod("android.app.WallpaperManager", "getInstance", Array As Object(r.GetContext), Array As String("android.content.Context"))
    LWPinfo = r.RunMethod("getWallpaperInfo")
    Log(LWPinfo)
 

bloxa69

Active Member
Licensed User
Longtime User
Thanks Erel,
but I get null for settings. Here is the code from wallpaper.xml (I guess you meant that part?)

<?xml version="1.0" encoding="utf-8"?>
<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
android:thumbnail="@drawable/icon2"
android:settingsActivity="com.mycomp.myLWP.myPrefs"

/>

Output from my log:

B4X:
ServiceName: WallpaperInfo{anywheresoftware.b4a.objects.WallpaperInternalService, settings: null}
 
Upvote 0

bloxa69

Active Member
Licensed User
Longtime User
Erel, I double checked it, and now it works, i get full package name plus prefs activity name in the settings portion, and I didn't change anything. Maybe it was some strange temporary glitch, or I was getting data from the old install somehow.
Thank you for advice.
 
Upvote 0
Top