Android Question Whatsapp Profile picture

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
Hi,
I'm using this code by Erel:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   SetWallPaper(LoadBitmap(File.DirAssets, "small_logo.png"))
End Sub

Sub Activity_Pause(UserClosed As Boolean)
 
End Sub
Sub Activity_Resume

End Sub
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
I added the permission to the mainfest file:
B4X:
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
It is worked great and fine in setting device wallpaper directly.
I want to set Whatsapp profile picture? how i do it?
In the android device: by long pressing any picture you'll got "set as" option, then a popup choice screen appear with many options set as: Wallpaper or whatsapp Profile picture etc ....

Any tricks, ideas .....
 

Hamied Abou Hulaikah

Well-Known Member
Licensed User
Longtime User
I want to use wallpaper setting , i want to use the example above to open set wallpaper popup,then manually select Whatsapp profile picture
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…