i try to have the name of a service with reflector...
B4X:
Dim r As Reflector
Dim sServiceName As String
r.Target = r.RunStaticMethod("android.app.getWallpaperInfo", "getInstance", Array As Object(r.GetContext), Array As String("android.content.Context"))
sServiceName = r.RunMethod("getServiceName")
Msgbox(sServiceName,"")
WallpaperManager wpm = (WallpaperManager) getSystemService(WALLPAPER_SERVICE);
WallpaperInfo info = wpm.getWallpaperInfo();
if (info != null && info.getComponent().equals(new ComponentName(this, getClass()))) {
Log.d(TAG, "We're already running");
// Still might be a preview, but the user is already running your LWP.
} else {
Log.d(TAG, "We're not running, this should be a preview");
// Should definitely be a preview.
}
Dim r,t As Reflector
r.Target = r.RunStaticMethod ("android.app.WallpaperManager", "getInstance", Array As Object(r.GetContext), Array As String("android.content.Context"))
How to change this java :
WallpaperInfo info = wpm.getWallpaperInfo();
in basic4android ?
r.RunMethod("getWallpaperInfo")
i hate weekend cause Erel doesn't save my code
Must be very occupied with the new version 2.5
Need a java converter to Basic4android program or need to clone Erel... is there a great genitician here