How to start the Files app to display my folder through button onClick

41 views Asked by At

Can a button in app redirecting to phone internal folder? I need to make a button that not just retrieving the data from the phone storage but literally switch the app to the phone folder.

For the button:

androidx.appcomat.widget.AppCompatButton log = findViewById(R.id.log);
log.setOnClickListener(view -> {
//code to switch the app to phone folder
});

The path that needed to be opened is /storage/emulated/0/Android/data/

Is there any reference about this? I tried to search the webs but I can only find about how to retrieve the data from folder.

//Edit If I click the button, the app switch to the folder so it would be look like this: /storage/emulated/0/Android/data/

0

There are 0 answers