MouserCat
MouserCat

Reputation: 73

Use the device's internal memory

Can I use the internal memory to store your application files there? In other words, when suddenly, the device will not SD card. In particular, I need to create there a folder where I was later going to copy your files.

Upvotes: 0

Views: 792

Answers (4)

Sandeep
Sandeep

Reputation: 2593

String path=context.getFilesDir().getAbsolutePath()+"/filename";

Upvotes: 1

PrincessLeiha
PrincessLeiha

Reputation: 3174

use:

String packagePath = "/data/"+getApplicationInfo().packageName+"/<your folder name>"

A folder will be created in the application's package. This folder will be in-accessible by other applications and hence it will be safe.

Upvotes: 1

Neha
Neha

Reputation: 39

Yes surely, you can use Internal memory for storing pupose. But as per my opinion you should not use it as in some devices has very small amount of Internal Memory.

Upvotes: 0

MAC
MAC

Reputation: 15847

path =/data/data/your.package.name/

ex: path =/data/data/com.pack1

Upvotes: 0

Related Questions