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.
精彩评论