<commit_before>package com.example.joseph.cloudbikebackend;

import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.View;

import java.util.ArrayList;

public class MainActivity extends Activity implements View.OnClickListener {
    private String TAG = "MainActivity";
    private int heartRate = 0;
    private MicrosoftBandManager microsoftBandManager;
    private BluetoothManager bluetoothManager;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        microsoftBandManager = new MicrosoftBandManager(this);
        bluetoothManager = new BluetoothManager();

//        ArrayList<String> devicesConnected = bluetoothManager.getListOfPairedDevices();
//        for(int i = 0; i < devicesConnected.size(); i++) {
//            Log.i(TAG, devicesConnected.get(i));
//        }

        new LongOperation().execute("");
    }

    @Override
    public void onClick(View v) {

    }

    private class LongOperation extends AsyncTask<String, Void, String> {
        @Override
        protected String doInBackground(String... params) {
            microsoftBandManager.connectToBand();
            microsoftBandManager.startListening();
//            bluetoothManager.setupRecieve();
//            bluetoothManager.connectInput();

            while(heartRate == 0) {
                heartRate = microsoftBandManager.getHeartRate();
            }

            while(heartRate < 80) {<commit_msg>heart rate prints all under 80<commit_after>package com.example.joseph.cloudbikebackend;

import android.os.AsyncTask;
import android.os.Bundle;
import android.app.Activity;
import android.util.Log;
import android.view.View;

import java.util.ArrayList;

public class MainActivity extends Activity implements View.OnClickListener {
    private String TAG = "MainActivity";
    private int heartRate = 0;
    private MicrosoftBandManager microsoftBandManager;
    private BluetoothManager bluetoothManager;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        microsoftBandManager = new MicrosoftBandManager(this);
        bluetoothManager = new BluetoothManager();

//        ArrayList<String> devicesConnected = bluetoothManager.getListOfPairedDevices();
//        for(int i = 0; i < devicesConnected.size(); i++) {
//            Log.i(TAG, devicesConnected.get(i));
//        }

        new LongOperation().execute("");
    }

    @Override
    public void onClick(View v) {

    }

    private class LongOperation extends AsyncTask<String, Void, String> {
        @Override
        protected String doInBackground(String... params) {
            microsoftBandManager.connectToBand();
            microsoftBandManager.startListening();
//            bluetoothManager.setupRecieve();
//            bluetoothManager.connectInput();
            
            while(heartRate < 80) {
{'fraction_non_alphanumeric': 0.09587260318492037, 'fraction_numerical': 0.0035749106272343193, 'mean_word_length': 3.0182767624020888, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5017491', 'n_tokens_mistral': 812, 'n_tokens_neox': 768, 'n_words': 177}