ExampleApp/src/com/altinn/apps/fisher/utils/Utils.java
/**
	 * This method copies the file into external memory
	 * @param fnameOut
	 * @param fnameIn
	 */
This method copies the file into external memory
@param fnameOut
@param fnameIn
This method copies the file into external memory @param fnameOut @param fnameIn
public static void copyFileInExternalMemory(String fnameOut, String fnameIn){
		 try {
			File file = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + "/"+ fnameOut);
			 if(!file.exists()){
				 FileOutputStream fos  = new FileOutputStream(file);
				 FileInputStream fis = new FileInputStream(new File(fnameIn));
				 byte[] buffer = new byte[1024];
				 int ch = -1;
				 while((ch =  fis.read(buffer)) != -1){
					 fos.write(buffer,0,ch);
				 }
				 fis.close();
				 fos.flush();
				 fos.close();
			 }
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
public static void copyFileInExternalMemory ( String fnameOut , String fnameIn ) { try { File file = new File ( Environment . getExternalStorageDirectory ( ) . getAbsolutePath ( ) + "/" + fnameOut ) ; if ( ! file . exists ( ) ) { FileOutputStream fos = new FileOutputStream ( file ) ; FileInputStream fis = new FileInputStream ( new File ( fnameIn ) ) ; byte [ ] buffer = new byte [ 1024 ] ; int ch = - 1 ; while ( ( ch = fis . read ( buffer ) ) != - 1 ) { fos . write ( buffer , 0 , ch ) ; } fis . close ( ) ; fos . flush ( ) ; fos . close ( ) ; } } catch ( FileNotFoundException e ) { e . printStackTrace ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } }
This method copies the file into external memory
 @param fnameOut
 @param fnameIn
This method copies the file into external memory @param fnameOut @param fnameIn
// TODO Auto-generated catch block // TODO Auto-generated catch block