If a folder (directory) is not existed, create it – Android Java Snippet

With this snippet, we are able to check if a folder existed in device’s storage or not. If not, then we create it.

Here is the snippet:

File directory = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/afolder");
if (! directory.exists()){


Getting boored? Why not playing a game?

Power Block

Tiki Solitaire

Pet Connect

Cake Shop

Jewels Blitz 3

Forest Match

Bike Racing


Solitaire Swift

Bubble Shooter Classic HD

Black and white snake

Leave a Reply

Your email address will not be published. Required fields are marked *