Ecco il report contengono il percorso (percorso in sdcard in formato stringa)Come convertire un file in Base64?
File dir = Environment.getExternalStorageDirectory();
File yourFile = new File(dir, report);
String encodeFileToBase64Binary = encodeFileToBase64Binary(yourFile);
private static String encodeFileToBase64Binary(File fileName) throws IOException {
byte[] bytes = loadFile(fileName);
byte[] encoded = Base64.encodeBase64(bytes);
String encodedString = new String(encoded);
return encodedString;
}
nel byte [] linea codificata questo errore. Il metodo encodeBase64 (byte []) non è definito per il tipo di Base64
è la vostra domanda: che cosa dovrebbe essere usato al posto di 'encodeBase64' nel contesto Android? Hai provato http://developer.android.com/reference/android/util/Base64.html encode() API? – sandrstar