I have this really annoying problem:
In my widget, i would like to change the background by code. I noticed on the Google doc than I can easily change the background
You cannot modify the background that way, due to limitations in the RemoteViews API.
RemoteViews
What you can do is choose a different layout -- one with the background you want -- when you create your RemoteViews instance for this particular update.