Android Open Source - nextgislogger About Activity






From Project

Back to project page nextgislogger.

License

The source code is released under:

GNU General Public License

If you think the Android project nextgislogger 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

/******************************************************************************
 * Project: NextGIS Logger//from   w  ww .  java 2s .  c o m
 * Purpose: Productive data logger for Android
 * Authors: Stanislav Petriakov
 ******************************************************************************
 * Copyright  2014 NextGIS
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *****************************************************************************/
package com.nextgis.logger;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.net.Uri;
import android.os.Bundle;
import android.text.method.LinkMovementMethod;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

public class AboutActivity extends Activity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.about_activity);
    String verName, verCode;
    verName = verCode = "?";

    try {
      String pkg = getPackageName();
      verName = getPackageManager().getPackageInfo(pkg, 0).versionName;
      verCode = getPackageManager().getPackageInfo(pkg, 0).versionCode + "";
    } catch (NameNotFoundException e) {
    }

    ((TextView) findViewById(R.id.tv_about_app_ver)).setText("v. " + verName + " (rev. " + verCode + ")");
    ((TextView) findViewById(R.id.tv_about_gpl)).setMovementMethod(LinkMovementMethod.getInstance());
    ((ImageView) findViewById(R.id.iv_about_logo)).setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        Intent nextgis = new Intent("android.intent.action.VIEW", Uri.parse(getString(R.string.about_nextgis_url)));
        startActivity(nextgis);
      }
    });
  }
}




Java Source Code List

com.nextgis.logger.AboutActivity.java
com.nextgis.logger.C.java
com.nextgis.logger.CellEngine.java
com.nextgis.logger.GPSEngine.java
com.nextgis.logger.IntEditTextPreference.java
com.nextgis.logger.LoggerService.java
com.nextgis.logger.MainActivity.java
com.nextgis.logger.MarkActivity.java
com.nextgis.logger.PreferencesActivity.java
com.nextgis.logger.SensorEngine.java
com.nextgis.logger.SessionsActivity.java
com.nextgis.logger.SimpleFileChooser.java
com.nextgis.logger.WiFiEngine.java