개발자 블로그

Android screenshots save location and name 본문

프로그래밍/안드로이드

Android screenshots save location and name

로이드.Roid 2017. 12. 12. 22:12

I have summarized the information related to the screenshots of the smartphone that I have checked by my phone and friends.


For reference, the source code for Android screenshots can be found at the link below.


https://github.com/aosp-mirror/platform_frameworks_base/blob/master/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java#L97



 

Device

OS Version

Directory

File name

1

 Nexus 5x

8.0

 Pictures/Screenshots 

 Screenshot_yyyyMMdd-HHmmss.png

2

 Galaxy S8

8.0

 DCIM/Screenshots Screenshot_yyyyMMdd-HHmmss.png

3

 Galaxy S6

7.0

 DCIM/Screenshots

 Screenshot_yyyyMMdd-HHmmss.png

4

 Galaxy Note5 

7.0

 DCIM/Screenshots 

 Screenshot_yyyyMMdd-HHmmss.png

5

 Galaxy S7 

6.0

 DCIM/Screenshots

 Screenshot_yyyyMMdd-HHmmss.png

6

 LG G4 

6.0

 Pictures/Screenshots 

 Screenshot_yyyy-MM-dd-HH-mm-ss.png 

7

 LG G2 

5.0

 Pictures/Screenshots

 Screenshot_yyyy-MM-dd-HH-mm-ss.png

8

 Galaxy S3 

4.4

 Pictures/Screenshots

 Screenshot_yyyy-MM-dd-HH-mm-ss.png

9

 Galaxy S2 

4.1

 Pictures/Screenshots

 Screenshot_yyyy-MM-dd-HH-mm-ss.png



The name of the folder where the screenshot is stored is the same as "Screenshots". However, the upper directory seems to be set to the "DCIM" directory for Samsung phones (except for older phones). In the source code, the parent directory is obtained through the following code.

Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);


Although the file name of the recently released LG phone is not confirmed, it seems to omit the '-' separator in each date and time field. The source code for this part is shown below.

String imageDate = new SimpleDateFormat("yyyyMMdd-HHmmss").format(new Date(mImageTime));


Comments