Package com.mku.android.salmon.drive
Class AndroidDrive
java.lang.Object
com.mku.file.VirtualDrive
com.mku.salmon.SalmonDrive
com.mku.android.salmon.drive.AndroidDrive
Implementation of a virtual drive for android.
-
Method Summary
Modifier and TypeMethodDescriptioncopyToSharedFolder(SalmonFile salmonFile) Copy file to shared folderstatic ContextGet the Android context.Get the private directory that will be used for sharing encrypted context with other apps on the android device.getRealFile(String uri, boolean isDirectory) Get the real file hosted on the android device.static voidinitialize(Context context) Initialize the Android Drive.voidFired when unlock fails.voidFired when unlock succeeds.Methods inherited from class com.mku.salmon.SalmonDrive
close, createDrive, getAuthConfigFilename, getAuthId, getBytesFromRealFile, getConfigFilename, getDefaultAuthConfigFilename, getDefaultFileChunkSize, getDriveConfig, getDriveId, getExportDir, getExportDirectoryName, getKey, getRealRoot, getRoot, getSequencer, getShareDirectoryName, getVirtualDriveDirectoryName, hasConfig, initFS, initialize, openDrive, revokeAuthorization, setAuthConfigFilename, setConfigFilename, setDefaultFileChunkSize, setExportDirectoryName, setPassword, setSequencer, setShareDirectoryName, setVirtualDriveDirectoryName
-
Method Details
-
initialize
public static void initialize(Context context) Initialize the Android Drive. This needs to run before you attempt to create or open any virtual drives.- Parameters:
context- The context
-
getContext
public static Context getContext()Get the Android context.- Returns:
- The Android context
-
getPrivateDir
Get the private directory that will be used for sharing encrypted context with other apps on the android device.- Specified by:
getPrivateDirin classVirtualDrive- Returns:
- The private directory
-
getRealFile
Get the real file hosted on the android device.- Parameters:
uri- The real file uriisDirectory- True if filepath corresponds to a directory.- Returns:
- The real file
-
onUnlockSuccess
public void onUnlockSuccess()Fired when unlock succeeds.- Specified by:
onUnlockSuccessin classVirtualDrive
-
onUnlockError
public void onUnlockError()Fired when unlock fails.- Specified by:
onUnlockErrorin classVirtualDrive
-