Android Open Source - wireless-battery-monitor Wireless Battery Monitor






From Project

Back to project page wireless-battery-monitor.

License

The source code is released under:

GNU General Public License

If you think the Android project wireless-battery-monitor 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

/*
* Copyright (c) 2011 Michael Spiceland/*  w  w  w. j  a va  2s.c  o m*/
*
* 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 3 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.fuzzymonkey.wirelessbatterymonitor;

import com.fuzzymonkey.wirelessbatterymonitor.activity.MainDisplayActivity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class WirelessBatteryMonitor extends Activity implements OnClickListener {
    private static final String TAG = "FUZZYMONKEY";

    /**
      * Called when the activity is first created.
      */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Button start_button = (Button) findViewById(R.id.start_button);
        start_button.setOnClickListener(this);
    }

    public void onClick(View v) {
        if (v.getId() == R.id.start_button) {
                Intent myIntent = new Intent(this, MainDisplayActivity.class);
                myIntent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
                startActivity(myIntent);
        } else {
                Log.v(TAG, "clicked unknown ID");
        }
    }
}




Java Source Code List

com.fuzzymonkey.wirelessbatterymonitor.WirelessBatteryMonitor.java
com.fuzzymonkey.wirelessbatterymonitor.activity.DeviceListActivity.java
com.fuzzymonkey.wirelessbatterymonitor.activity.MainDisplayActivity.java
com.fuzzymonkey.wirelessbatterymonitor.service.MonitorService.java
com.fuzzymonkey.wirelessbatterymonitor.view.BatteryView.java
com.fuzzymonkey.wirelessbatterymonitor.view.SpeedometerView.java