Android - guardar textos escritos en una web ??? android studio

 
Vista:

guardar textos escritos en una web ??? android studio

Publicado por eduardo (3 intervenciones) el 09/04/2015 01:40:00
como guardar los datos ingresados dentro de una web view los quiero guardar dentro de un txt
he intentado

OutputStreamWriter archivo = new OutputStreamWriter(openFileOutput(
"notas.txt", MainActivity.MODE_PRIVATE));
//archivo.write(webView1.getText().toString());
archivo.write(String.valueOf(webView1));
archivo.flush();
archivo.close();

y



String url ="http://stackoverflow.com/questions/27788950/how-to-save-text-from-webview-into-a-string";
WebView view=(WebView)this.findViewById(R.id.webView1);
view.getSettings().setJavaScriptEnabled(true);
view.loadUrl(url);



// 00 webView1 = [Self.webView stringByEvaluatingJavaScriptFromString:@"window.getSelection().toString()"]

//guardar en txt

try
{
OutputStreamWriter fout= new OutputStreamWriter(openFileOutput("notas.txt", Activity.MODE_PRIVATE));

fout.write(String.valueOf(webView1));
fout.flush();
fout.close();


}
catch (Exception ex)
{
// Log.e("Ficheros", "Error al escribir fichero a memoria interna");
}


pero no logro hacer que el txt dentro de la memoria interna del celular se llene con registros
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder