Since we can not use the file's absolute path in C++(JNI) code when we develop the android applications. So we copy the files
of assets to the SdCard. Thus we can read file by the absolute path.
We can use the AssetsCopier's static function :
public static void copyAllAssets(Context context,String destination)
Basic usage like:
AssetsCopier.copyAllAssets(this.getApplicationContext(),this.getExternalFilesDir(null).getAbsolutePath());
Note:
please replace 'package com.hqh.utils;' with your package name.
-
Notifications
You must be signed in to change notification settings - Fork 0
since we can not use the file's absolute path in C++(JNI) code when we develop the android applications. So we copy the files of assets to the SdCard
License
huqinghao/AssetsCopier
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
since we can not use the file's absolute path in C++(JNI) code when we develop the android applications. So we copy the files of assets to the SdCard
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published