Application.CaptureScreenshot() doesn't save anything on my Android?

EDIT: I’m so sorry, I’m such a n00b. I just realised that I can simply use ADB to take a screenshot.
In case anyone has the same problem, it works like this:

But I still don’t know why my earlier approach didn’t work, so maybe someone can point it out to me?

Hi,

I’m trying to take some screenshots of my Android AR-App on different devices for the Play Store, but Application.CaptureScreenshot() doesn’t seem to do anything.

I’m using Unity 4.5.0f6 with Vuforia.
According to their website, I think my code should work. https://developer.vuforia.com/resources/dev-guide/unity-screenshots

Here is what I did:

void OnGUI(){
	if(enableScreenshot){
		if (GUI.Button(new Rect(Screen.width/2f - 200f, 0f, 200f, 200f), "", invisibleStyle)){
			Application.CaptureScreenshot("Screen" + screenshotCounter + ".png");
			Debug.Log("Screenshot " + screenshotCounter);
			screenshotCounter++;
		}
	}
}

I use logcat to debug, and it sure puts out “Screenshot0”, “Screenshot1” and so on, but no files appear on my SD card.

The app has write access to the card, and yes, there are SD cards in the device slots.

I gather the images should be in sdcard/Android/data//files, but there is no folder with my bundle id in the data folder (I guess because I don’t save anything else there).

It doesn’t work on my S3 (Android 4.3) or my Asus tablet (Android 4.2.2).

What am I doing wrong? The screenshots are difficult to fake well, because it is an augmented reality app.

Hi there, the way I do it on Android is:
First you need to add: using System.IO;

Application.CaptureScreenshot(filename);
filename being a string like: “image.png”,

Then, when I want to use the captured Texture:

string path = System.IO.Path.Combine (Application.persistentDataPath,filename);

if(File.Exists (origen)) WWW loadedImage = new WWW(“file://” +path);

Then, If you want to apply the image as a texture for example:
transform.renderer.material.mainTexture=loadedImage.texture;

I think the exact location where it saves the file may change, but you can check where exactly it is by browsing on your phone.
If this helps, please mark it AS AN ANSWER.