开发者

File handling in android

开发者 https://www.devze.com 2023-02-21 01:05 出处:网络
I have created one jar file containing classes of pure java. One of the class does file creation, writing and reading operations. I am using this jar file in android application. It is expected that t

I have created one jar file containing classes of pure java. One of the class does file creation, writing and reading operations. I am using this jar file in android application. It is expected that the files created using java apis should be located in the package of that android application. So I want to hardcode file开发者_开发百科 path while creating it such that it will get created in package of android application that uses my jar file and android application's package name is not known in advance. Package name may vary.

Please help me if any one knows about it. Thanks in advance Gauri


You can get your application dir path by using myActivity.getFilesDir().getParent() to get the folder of the activity.

0

精彩评论

暂无评论...
验证码 换一张
取 消