Back to project page disconnected-content-explorer-android.
The source code is released under:
MIT License
If you think the Android project disconnected-content-explorer-android 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 mil.nga.dice; //from w ww .j a v a 2 s . com import android.app.Application; import android.content.Intent; import android.os.Environment; import android.util.Log; import mil.nga.dice.report.ReportDropbox; import mil.nga.dice.report.ReportManager; import java.io.File; public class DICE extends Application { @Override public void onCreate() { super.onCreate(); File appRoot = getExternalFilesDir(null); if (appRoot == null) { throw new Error("failed to obtain app directory on external storage; " + "external storage state is " + Environment.getExternalStorageState()); } File reportsDir = new File(appRoot, "reports"); if (!reportsDir.isDirectory() && !reportsDir.mkdirs()) { throw new Error("failed to create reports directory " + reportsDir); } Log.i("DICE", "initializing DICE with reports dir " + reportsDir.getAbsolutePath()); ReportManager.initialize(this) .reportsDir(reportsDir) .finish(); startService(new Intent(this, ReportDropbox.class)); } @Override public void onTerminate() { super.onTerminate(); stopService(new Intent(this, ReportDropbox.class)); } }