Back to project page roodroid.
The source code is released under:
Copyright (c) 2011, Jonathan Perichon & Lucas Gerbeaux Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"...
If you think the Android project roodroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package fr.utbm.roodroid.activity; //from ww w . j a va2 s. c o m import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; import android.app.Activity; import android.os.Bundle; import android.os.Environment; import android.util.Log; import android.widget.TextView; import fr.utbm.roodroid.ApplicationManager; import fr.utbm.roodroid.R; public class LogPage extends Activity{ TextView logView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.log); logView = (TextView)findViewById(R.id.logView); File sdcard = Environment.getExternalStorageDirectory(); File file = new File(sdcard,"/RoodroidLog.log"); StringBuilder text = new StringBuilder(); try { BufferedReader br = new BufferedReader(new FileReader(file)); String line; while ((line = br.readLine()) != null) { text.append(line); text.append('\n'); } } catch (IOException e) { e.printStackTrace(); ApplicationManager.appendLog(Log.ERROR, "Read log", "Log loading failed"); } logView.setText(text); } }