Android Open Source - disconnected-content-explorer-android D I C E






From Project

Back to project page disconnected-content-explorer-android.

License

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.

Java Source Code

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));
    }

}




Java Source Code List

mil.nga.dice.DICE.java
mil.nga.dice.gridview.CustomGrid.java
mil.nga.dice.gridview.ReportGridActivity.java
mil.nga.dice.gridview.ReportGridFragment.java
mil.nga.dice.jackson.deserializer.Deserializer.java
mil.nga.dice.jackson.deserializer.FeatureDeserializer.java
mil.nga.dice.jackson.deserializer.GeometryDeserializer.java
mil.nga.dice.listview.CustomList.java
mil.nga.dice.listview.ReportListActivity.java
mil.nga.dice.listview.ReportListFragment.java
mil.nga.dice.listview.ReportListItem.java
mil.nga.dice.map.BackgroundTileProvider.java
mil.nga.dice.map.OfflineMapLoader.java
mil.nga.dice.map.OfflineMap.java
mil.nga.dice.map.ReportMapActivity.java
mil.nga.dice.map.ReportMapFragment.java
mil.nga.dice.report.NoteActivity.java
mil.nga.dice.report.NoteFragment.java
mil.nga.dice.report.ReportDetailActivity.java
mil.nga.dice.report.ReportDetailFragment.java
mil.nga.dice.report.ReportDropbox.java
mil.nga.dice.report.ReportManager.java
mil.nga.dice.report.ReportUnzipRunnable.java
mil.nga.dice.report.Report.java