playMaker

Author Topic: TakeScreenshot  (Read 3352 times)

Heavy

  • Playmaker Newbie
  • *
  • Posts: 4
TakeScreenshot
« 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

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: TakeScreenshot
« Reply #1 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

sapan3d

  • Playmaker Newbie
  • *
  • Posts: 1
Re: TakeScreenshot
« Reply #2 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