bloxa69 Active Member Licensed User Longtime User Feb 14, 2013 #1 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): Code: Copy 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)
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): Code: Copy 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)
Erel B4X founder Staff member Licensed User Longtime User Feb 14, 2013 #2 The class returned is the internal wallpaper service. You cannot change it. However the info also contains the settings class which you can control by adding a settings activity in the wallpaper manifest. Upvote 0
The class returned is the internal wallpaper service. You cannot change it. However the info also contains the settings class which you can control by adding a settings activity in the wallpaper manifest.
bloxa69 Active Member Licensed User Longtime User Feb 16, 2013 #3 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" /> Click to expand... Output from my log: Code: Copy ServiceName: WallpaperInfo{anywheresoftware.b4a.objects.WallpaperInternalService, settings: null} Upvote 0
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" /> Click to expand... Output from my log: Code: Copy ServiceName: WallpaperInfo{anywheresoftware.b4a.objects.WallpaperInternalService, settings: null}
Erel B4X founder Staff member Licensed User Longtime User Feb 17, 2013 #4 Yes, this is what I meant. Do you see the settings activity when you choose the wallpaper (you should see a "Settings" button)? Upvote 0
Yes, this is what I meant. Do you see the settings activity when you choose the wallpaper (you should see a "Settings" button)?
bloxa69 Active Member Licensed User Longtime User Feb 17, 2013 #5 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
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.