Italian Salvare picture come screen del phone

ivanomonti

Expert
Licensed User
Longtime User
Ciao ragazzi, come posso salvare una picture come sfondo del telefono!!!
 

ivanomonti

Expert
Licensed User
Longtime User
Risolto

in manifest aggiungere quanto segue

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
<supports-screens android:largeScreens="true" 
    android:normalScreens="true" 
    android:smallScreens="true" 
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

Per poi salvare lo sfondo

B4X:
Sub SetWallPaper(Bmp As Bitmap)
    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), Array As String("android.graphics.Bitmap"))    
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…