Search code examples
androidtitanium-mobilewallpaper

Image saving in android mobile for setting wallpaper in titanium


I am working in titanium. I am facing an issue i.e. can I save an image taken by camera,Gallery,PhotoAlbum or from a feed of twitter feeds for setting as wallpaper in android device using titanium as a platform. I really need help cause i m stuck. Any help would be appreciated. Thanx in advance.

PS: I have done this in iPhone(ios). My working Code for ios is :

button.addEventListener('click',function(e){
var blob=largeImage.toImage();
Titanium.Media.saveToPhotoGallery(blob);       
});

Solution

  • There exists setasystemwallpaper method in api docs for setting images as wallpaper in android

    TI.Media.Android.SetasSystemWallpaper