Thanks, fixed for the next version. This doesn't affect the Tier 1 Google player, but does affect exporting for Amazon or Ouya, and Tier 2. If you are using Tier 2 then you can fix this by editing AGKHelper.java and pasting the following code at the end of the file (before the last close curly bracket and after the DeleteSharedVariable function)
public static void ViewFile( Activity act, String sPath )
{
int pos = sPath.lastIndexOf('/');
String sFileName;
if ( pos >= 0 ) sFileName = sPath.substring(pos+1);
else sFileName = sPath;
// get extension
pos = sPath.lastIndexOf('.');
String sExt = "";
if ( pos >= 0 ) sExt = sPath.substring(pos+1);
File DownloadFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
File dst = new File( DownloadFolder, sFileName );
File src = new File(sPath);
//copy to external storage
try {
InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dst);
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
String sMIME = MimeTypeMap.getSingleton().getMimeTypeFromExtension(sExt);
Intent target = new Intent( Intent.ACTION_VIEW );
target.setDataAndType( Uri.fromFile(dst),sMIME );
target.setFlags( Intent.FLAG_ACTIVITY_NO_HISTORY );
try {
act.startActivity(target);
} catch (ActivityNotFoundException e) {
ShowMessage(act,"No application found for file type \"" + sExt + "\"");
}
}
public static void ShareText( Activity act, String sText )
{
Intent target = new Intent( Intent.ACTION_SEND );
target.setType( "text/plain" );
target.putExtra( Intent.EXTRA_TITLE, "Share Text" );
target.putExtra( Intent.EXTRA_TEXT, sText );
try {
act.startActivity(target);
} catch (ActivityNotFoundException e) {
ShowMessage(act,"No application found to share text");
}
}
public static void ShareImage( Activity act, String sPath )
{
int pos = sPath.lastIndexOf('/');
String sFileName;
if ( pos >= 0 ) sFileName = sPath.substring(pos+1);
else sFileName = sPath;
File DownloadFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
File dst = new File( DownloadFolder, sFileName );
File src = new File(sPath);
//copy to external storage
try {
InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dst);
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
in.close();
out.close();
} catch (IOException e) {
e.printStackTrace();
}
Intent target = new Intent( Intent.ACTION_SEND );
target.setType( "image/*" );
target.putExtra(Intent.EXTRA_TITLE, "Share Image");
target.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(dst));
try {
act.startActivity(target);
} catch (ActivityNotFoundException e) {
ShowMessage(act,"No application found to share images");
}
}