I encountered an error using Android Studio build, so I tried to comment out the code below and successfully build successfully. Will the code below (which looks like screenshots) will have an impact on the game released? Thank you! @Andy PTServicesBridge.java //import android.R.id.content; private static Uri makeShareScreenshot() { // View rootView = PTServicesBridge.activity.getWindow().getDecorView().findViewById(android.R.id.content); // View screenView = rootView.getRootView(); // screenView.setDrawingCacheEnabled(true); // Bitmap bitmap = Bitmap.createBitmap(screenView.getDrawingCache()); // screenView.setDrawingCacheEnabled(false); // final static String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Screenshots"; // // File dir = new File(dirPath); // if (!dir.exists()) { // dir.mkdirs(); // } // // File file = new File(dirPath, "share_screenshot.png"); // try { // FileOutputStream stream = new FileOutputStream(file); // bitmap.compress(Bitmap.CompressFormat.PNG, 85, stream); // stream.flush(); // stream.close(); // } // catch (Exception e) { // //Print exception // Log.d(TAG, "Make Screenshot: Failed."); // e.printStackTrace(); // // return Uri(); // } // return Uri.fromFile(file); return null; }
Code: PTServicesBridge.java //import android.R.id.content; private static Uri makeShareScreenshot() { // View rootView = PTServicesBridge.activity.getWindow().getDecorView().findViewById(android.R.id.content); // View screenView = rootView.getRootView(); // screenView.setDrawingCacheEnabled(true); // Bitmap bitmap = Bitmap.createBitmap(screenView.getDrawingCache()); // screenView.setDrawingCacheEnabled(false); // final static String dirPath = Environment.getExternalStorageDirectory().getAbsolutePath() + "/Screenshots"; // // File dir = new File(dirPath); // if (!dir.exists()) { // dir.mkdirs(); // } // // File file = new File(dirPath, "share_screenshot.png"); // try { // FileOutputStream stream = new FileOutputStream(file); // bitmap.compress(Bitmap.CompressFormat.PNG, 85, stream); // stream.flush(); // stream.close(); // } // catch (Exception e) { // //Print exception // Log.d(TAG, "Make Screenshot: Failed."); // e.printStackTrace(); // // return Uri(); // } // return Uri.fromFile(file); return null; }