package com.slothnull.android.medox;

import android.app.Activity;
import android.os.Bundle;
<<<<<<< HEAD
import android.util.Log;
import android.view.View;
import android.widget.TextView;

import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
=======
>>>>>>> parent of c78d321... Indicators class finished

public class Indicators extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_indicators);
    }
}

@@ -90,21 +90,8 @@
 le;%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
 impo
@@ -486,289 +486,2368 @@
 er;%0A
-=======%0A%3E%3E%3E%3E%3E%3E%3E parent of c78d321... Indicators class finished%0A%0Apublic class Indicators extends Activity %7B%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_indicators);%0A    %7D
+%0Apublic class Indicators extends Activity %7B%0A%0A    private static final String TAG = %22Indicators%22;%0A    public TextView pedo;%0A    public TextView heartRate;%0A    public TextView longitude;%0A    public TextView latitude;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_indicators);%0A%0A        pedo = (TextView) findViewById(R.id.textPedo);%0A        heartRate = (TextView) findViewById(R.id.textHeartRate);%0A        longitude = (TextView) findViewById(R.id.textLongitude);%0A        latitude = (TextView) findViewById(R.id.textLatitude);%0A%0A        String UID = FirebaseAuth.getInstance().getCurrentUser().getUid();%0A        DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();%0A%0A        ValueEventListener dataListener = new ValueEventListener() %7B%0A            @Override%0A            public void onDataChange(DataSnapshot dataSnapshot) %7B%0A                // Get Post object and use the values to update the UI%0A                AbstractData data = dataSnapshot.getValue(AbstractData.class);%0A                if (data != null) %7B%0A                    pedo.setText(data.pedo);%0A                    heartRate.setText(data.heartRate);%0A                    longitude.setText(data.longitude);%0A                    latitude.setText(data.latitude);%0A                    // ...%0A                %7D%0A            %7D%0A%0A            @Override%0A            public void onCancelled(DatabaseError databaseError) %7B%0A                // Getting Post failed, log a message%0A                Log.w(TAG, %22loadPost:onCancelled%22, databaseError.toException());%0A                // ...%0A            %7D%0A        %7D;%0A        mDatabase.child(%22users%22).child(UID).child(%22data%22)%0A                .addValueEventListener(dataListener);%0A        //add to list here%0A%0A    %7D%0A%0A    public void refreshData(View view)%7B //sendRefreshRequest%0A        String cmd = %22data%22;%0A        //send command to database for raspberry to fetch%0A        AbstractCommand command = new AbstractCommand(cmd);%0A        //TODO: add if (UID != null) to all classes%0A        String UID = FirebaseAuth.getInstance().getCurrentUser().getUid();%0A        DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference()%0A                .child(%22users%22).child(UID).child(%22watchCommand%22).push();%0A        mDatabase.setValue(command);%0A    %7D%0A
 %0A%7D%0A

Revert "removing conflicts"