Fixed issue where files where not showing up when connecting phone to PC
[artf414180]
This commit is contained in:
parent
5b4eac8dfa
commit
1eb006c1fe
1 changed files with 7 additions and 3 deletions
|
|
@ -1,9 +1,11 @@
|
|||
package com.ericsson.uecontrol.gui.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.NetworkInfo;
|
||||
import android.net.Uri;
|
||||
import android.net.wifi.WifiInfo;
|
||||
import android.net.wifi.WifiManager;
|
||||
import android.preference.PreferenceManager;
|
||||
|
|
@ -46,16 +48,18 @@ public class CSVWriter {
|
|||
file = new File(
|
||||
path,
|
||||
"log_"+fileDateFormater.format(System.currentTimeMillis())+".csv");
|
||||
file.delete();
|
||||
file.getParentFile().mkdirs();
|
||||
|
||||
// Write Headings
|
||||
StringBuilder line = new StringBuilder();
|
||||
for(String header : HEADINGS){
|
||||
line.append(header).append(DELIMITER);
|
||||
}
|
||||
|
||||
file.delete();
|
||||
file.getParentFile().mkdirs();
|
||||
writeLine(line.toString());
|
||||
// Add file to Media Scanner so it shows up when phone is connected with usb
|
||||
MainActivity.getContext().sendBroadcast(
|
||||
new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(file)));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue