i went ahead and used
Recaf on the original LiveWallpaper jar file, there i removed the check on "isService" and my App works again
old:
public static void Initialize(String EventName, boolean TouchEventsEnabled, BA ba) {
if (ba.sharedProcessBA == null || !ba.sharedProcessBA.isService) {
throw new RuntimeException("LWManager can only be added to a service.");
}
acceptTouch = TouchEventsEnabled;
LWManager.ba = ba;
eventName = EventName.toLowerCase(BA.cul);
}
new:
public static void Initialize(String EventName, boolean TouchEventsEnabled, BA ba) {
if (ba.sharedProcessBA == null) {
throw new RuntimeException("LWManager can only be added to a service.");
}
acceptTouch = TouchEventsEnabled;
LWManager.ba = ba;
eventName = EventName.toLowerCase(BA.cul);
}
Further i needed to add android:exported="false" to service in manifest for it to work on latest android:
AddApplicationText(
<!-- ******** Add the internal service declaration - you can change android:label ******* -->
<service
android:label="Engine Wallpaper"
android:exported="false"
android:name="anywheresoftware.b4a.objects.WallpaperInternalService"
android:permission="android.permission.BIND_WALLPAPER">
<intent-filter>
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data android:name="android.service.wallpaper" android:resource="@xml/wallpaper" />
</service>
<!-- End of internal service declaration -->
)
Just that this feels wrong to me, or is this a valid method to make the old lib working?
Also so far i have not spend much time on testing this, but it seems to work on 2 devices here...