public void OnIsWallpaperSupportedAndAllowed() { var isSupported = AGWallpaperManager.IsWallpaperSupported(); var isAllowed = AGWallpaperManager.IsSetWallpaperAllowed(); AGUIMisc.ShowToast(string.Format("Wallpaper supported? - {0}, set allowed? - {1}", isSupported, isAllowed)); }
public void OnSetWallpaperFromFilePath() { AGGallery.PickImageFromGallery( selectedImage => { var imageTexture2D = selectedImage.LoadTexture2D(); string msg = string.Format("{0} was loaded from gallery with size {1}x{2}", selectedImage.OriginalPath, imageTexture2D.width, imageTexture2D.height); AGUIMisc.ShowToast(msg); Debug.Log(msg); AGWallpaperManager.SetWallpaper(selectedImage.OriginalPath); // Clean up Resources.UnloadUnusedAssets(); }, errorMessage => AGUIMisc.ShowToast("Cancelled picking image from gallery: " + errorMessage)); }
public void OnCropAndSetWallpaperFromTexture() { AGWallpaperManager.ShowCropAndSetWallpaperChooser(wallpaperTexture); }
public void OnResetWallpaperToDefault() { AGWallpaperManager.Clear(); AGUIMisc.ShowToast("Wallpaper was reset to default"); }
public void OnShowLiveWallpaperChooser() { AGWallpaperManager.ShowLiveWallpaperChooser(); }
public void OnSetLockScreenWallpaperFromTexture() { var rect = new AndroidRect(0, 0, 400, 400); AGWallpaperManager.SetWallpaper(wallpaperTexture, rect, true, AGWallpaperManager.WallpaperType.Lock); }
public void OnSetWallpaperFromTexture() { AGWallpaperManager.SetWallpaper(wallpaperTexture, null, true, AGWallpaperManager.WallpaperType.System); }
public void OnSetWallpaperFromTexture() { AGWallpaperManager.SetWallpaper(wallpaperTexture); }