1
I can save the file in my micro sd but connect the mobile device on computer through a USB file does not appear in Windows Explorer.
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
public void ExportarArquivoExterno() {
    String lstrNomeArq;
    File arq;
    byte[] dados;
    String txtSalvar = "texto do arquivo";
    try
    {
        //pega o nome do arquivo a ser gravado
        lstrNomeArq = "nomearquivo.txt";
        arq = new File("/storage/external_SD/Exportações", lstrNomeArq);
        FileOutputStream fos;
        //transforma o texto digitado em array de bytes
        dados = txtSalvar.toString().getBytes();
        fos = new FileOutputStream(arq);
        //escreve os dados e fecha o arquivo
        fos.write(dados);
        fos.flush();
        fos.close();
    } catch (Exception e) {
        //trace("Erro : " + e.getMessage());
    }        
}
Some files are not available in windows, due to access restrictions of Android itself.
– user28595
@Diegofelipe there is the possibility to change these retributions, are in the file or on android.
– Ozael Melo