Skip to content

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

Notifications You must be signed in to change notification settings

huqinghao/AssetsCopier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AssetsCopier

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.

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

No packages published

Languages