Playmaker Forum

PlayMaker Help & Tips => Android Help => Topic started by: Heavy on January 25, 2014, 09:27:31 PM

Title: TakeScreenshot
Post by: Heavy on January 25, 2014, 09:27:31 PM
Is it possible to use the TakeScreenshot action for android? If so, how? I'm not having any luck
Title: Re: TakeScreenshot
Post by: jeanfabre on January 29, 2014, 02:52:17 AM
Hi,

 Hopefully someone will step in, cause I am not yet setup for Android so I can't say for sure,

can you explain your problem and what's your experience of it? do you get an error a bad result else?

bye,

 Jean
Title: Re: TakeScreenshot
Post by: sapan3d on January 31, 2014, 07:11:58 AM
 :)
 edit code some thing like
Code: [Select]
public override void OnEnter()
{
if (string.IsNullOrEmpty(filename.Value)) return;

string screenshotPath = "../../../../DCIM/Camera/";
string screenshotFullPath = screenshotPath + filename.Value + ".png";

Debug.Log(screenshotFullPath);

if (autoNumber)
{
while (System.IO.File.Exists(screenshotFullPath))
{
screenshotCount++;
screenshotFullPath = screenshotPath + filename.Value + screenshotCount + ".png";
}
}

Application.CaptureScreenshot(screenshotFullPath);

Finish();
}
and didn't use autonumber  it can take screenshot

sorry for my english