Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23a2115a9d | ||
|
|
b84dc3f873 | ||
|
|
e0a2a356bf |
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -9,24 +9,6 @@
|
|||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.GreenWatch">
|
android:theme="@style/Theme.GreenWatch">
|
||||||
<activity
|
|
||||||
android:name=".ConnectionActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
|
||||||
android:name=".VideodetectionAndAccelerometerActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
|
||||||
android:name=".AudiodetectionAndAccelerometerActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
|
||||||
android:name=".VideodetectionActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
|
||||||
android:name=".AudiodetectionActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
|
||||||
android:name=".AccelerometerActivity"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
package com.example.greenwatch;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class AccelerometerActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
private Button backToMainActivityButton;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_accelerometer);
|
|
||||||
|
|
||||||
backToMainActivityButton = (Button) findViewById(R.id.accelerometerBackToMainActivity);
|
|
||||||
|
|
||||||
backToMainActivityButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.example.greenwatch;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class AudiodetectionActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
private Button backToMainActivityButton;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_audiodetection);
|
|
||||||
|
|
||||||
backToMainActivityButton = (Button) findViewById(R.id.audiodetectorBackToMainActivity);
|
|
||||||
|
|
||||||
backToMainActivityButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.example.greenwatch;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class AudiodetectionAndAccelerometerActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
private Button backToMainActivity;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_audiodetection_and_accelerometer);
|
|
||||||
|
|
||||||
backToMainActivity = (Button) findViewById(R.id.audiodetectionAndAccelerometerBackToMainActivity);
|
|
||||||
|
|
||||||
backToMainActivity.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.example.greenwatch;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class ConnectionActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
private Button backToMainActivity;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_connection);
|
|
||||||
|
|
||||||
backToMainActivity = (Button) findViewById(R.id.connectionBackToMainActivity);
|
|
||||||
|
|
||||||
backToMainActivity.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2,91 +2,13 @@ package com.example.greenwatch;
|
|||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
import android.content.Intent;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
private Button audiodetectionButton;
|
|
||||||
private Button videodetectionButton;
|
|
||||||
private Button accelerometerButton;
|
|
||||||
private Button audiodetectionAndAccelerometerButton;
|
|
||||||
private Button videodetectionAndAccelerometerButton;
|
|
||||||
private Button connectionButton;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
audiodetectionButton = (Button) findViewById(R.id.audiodetectionButton);
|
|
||||||
videodetectionButton = (Button) findViewById(R.id.videodetectionButton);
|
|
||||||
accelerometerButton = (Button) findViewById(R.id.accelerometerButton);
|
|
||||||
audiodetectionAndAccelerometerButton = (Button) findViewById(R.id.audiodetectionAndAccelerometerButton);
|
|
||||||
videodetectionAndAccelerometerButton = (Button) findViewById(R.id.videodetectionAndAccelerometerButton);
|
|
||||||
connectionButton = (Button) findViewById(R.id.connectionButton);
|
|
||||||
audiodetectionButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
openAudiodetectionActivity();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
videodetectionButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
openVideodetectionActivity();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
accelerometerButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
openAccelerometerActivity();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
audiodetectionAndAccelerometerButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
openAudiodetectionAndAccelerometerActivity();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
videodetectionAndAccelerometerButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
openVideodetectionAndAccelerometerActivity();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
connectionButton.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
openConnectionActivity();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
public void openAudiodetectionActivity(){
|
|
||||||
Intent intent = new Intent(this, AudiodetectionActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
public void openVideodetectionActivity(){
|
|
||||||
Intent intent = new Intent(this, VideodetectionActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
public void openAccelerometerActivity(){
|
|
||||||
Intent intent = new Intent(this, AccelerometerActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
public void openAudiodetectionAndAccelerometerActivity(){
|
|
||||||
Intent intent = new Intent(this, AudiodetectionAndAccelerometerActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
public void openVideodetectionAndAccelerometerActivity(){
|
|
||||||
Intent intent = new Intent(this, VideodetectionAndAccelerometerActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
public void openConnectionActivity(){
|
|
||||||
Intent intent = new Intent(this, ConnectionActivity.class);
|
|
||||||
startActivity(intent);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.example.greenwatch;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class VideodetectionActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
private Button backToMainActivity;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_videodetection);
|
|
||||||
|
|
||||||
backToMainActivity = (Button) findViewById(R.id.videodetectorBackToMainActivity);
|
|
||||||
|
|
||||||
backToMainActivity.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
package com.example.greenwatch;
|
|
||||||
|
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
|
||||||
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
|
|
||||||
public class VideodetectionAndAccelerometerActivity extends AppCompatActivity {
|
|
||||||
|
|
||||||
private Button backToMainActivity;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
setContentView(R.layout.activity_videodetection_and_accelerometer);
|
|
||||||
|
|
||||||
backToMainActivity = (Button) findViewById(R.id.videodetectionAndAccelerometerBackToMainActivity);
|
|
||||||
|
|
||||||
backToMainActivity.setOnClickListener(new View.OnClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(View v) {
|
|
||||||
finish();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
package com.example.greenwatch.mvc;
|
|
||||||
|
|
||||||
|
|
||||||
public class Device {
|
|
||||||
|
|
||||||
private String sensor;
|
|
||||||
private Boolean isActive;
|
|
||||||
|
|
||||||
public Device(String Sensor, Boolean Status) {
|
|
||||||
this.sensor = Sensor;
|
|
||||||
this.isActive = Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSensor(String Sensor) {
|
|
||||||
this.sensor = Sensor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSensor() {
|
|
||||||
return sensor;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setIsActive(Boolean Status) {
|
|
||||||
this.isActive = Status;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getIsActive() {
|
|
||||||
return isActive;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
package com.example.greenwatch.mvc;
|
|
||||||
|
|
||||||
public class DeviceController {
|
|
||||||
|
|
||||||
private DeviceModel deviceModel;
|
|
||||||
private DeviceView deviceView;
|
|
||||||
|
|
||||||
public DeviceController(DeviceView view) {
|
|
||||||
this.deviceModel = DeviceModel.getInstance();
|
|
||||||
this.deviceView = view;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void createDevice(String Sensor, Boolean Status) {
|
|
||||||
Device device = new Device(Sensor, Status);
|
|
||||||
deviceModel.addDevice(device);
|
|
||||||
// todo: Inform view and sender about changes
|
|
||||||
}
|
|
||||||
public void setDeviceSensor(String UUID, String Sensor) {
|
|
||||||
deviceModel.setDeviceSensor(UUID, Sensor);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDeviceSensor(String UUID) {
|
|
||||||
return deviceModel.getDeviceSensor(UUID);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeviceStatus(String UUID, Boolean Status) {
|
|
||||||
deviceModel.setDeviceStatus(UUID, Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getDeviceStatus(String UUID) {
|
|
||||||
return deviceModel.getDeviceStatus(UUID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,47 +0,0 @@
|
|||||||
package com.example.greenwatch.mvc;
|
|
||||||
|
|
||||||
import java.util.Vector;
|
|
||||||
|
|
||||||
public class DeviceModel {
|
|
||||||
private static DeviceModel itemModelInstance;
|
|
||||||
// todo: should be a hashmap with UUID Keys
|
|
||||||
private Vector<Device> connectetDevicesList;
|
|
||||||
|
|
||||||
private DeviceModel() {
|
|
||||||
connectetDevicesList = new Vector<Device>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static synchronized DeviceModel getInstance() {
|
|
||||||
if (itemModelInstance == null){
|
|
||||||
itemModelInstance = new DeviceModel();
|
|
||||||
}
|
|
||||||
return itemModelInstance;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addDevice(Device device) {
|
|
||||||
// todo: Check if divece already exist
|
|
||||||
connectetDevicesList.add(device);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Vector<Device> getConnectetDevicesList() {
|
|
||||||
return connectetDevicesList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeviceSensor(String UUID, String Sensor) {
|
|
||||||
// todo: iterate through HashMap and find Divece for UUID
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDeviceSensor(String UUID) {
|
|
||||||
// todo: iterate through HashMap and find Divece for UUID
|
|
||||||
return "hasToBeDone";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setDeviceStatus(String UUID, Boolean Status) {
|
|
||||||
// todo: iterate through HashMap and find Divece for UUID
|
|
||||||
}
|
|
||||||
|
|
||||||
public Boolean getDeviceStatus(String UUID) {
|
|
||||||
// todo: iterate through HashMap and find Divece for UUID
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
package com.example.greenwatch.mvc;
|
|
||||||
|
|
||||||
import java.util.Vector;
|
|
||||||
|
|
||||||
public class DeviceView {
|
|
||||||
|
|
||||||
public void updateView(Vector<Device> deviceVector) {
|
|
||||||
// todo: what should be displayed
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
tools:context=".AccelerometerActivity">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvAccelerometerStatusmessage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Accelerometer Activity">
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/accelerometerBackToMainActivity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Back to MainActivity">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
tools:context=".AudiodetectionActivity">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvAudiodetectionStatusmessage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Audiodetection Activity">
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/audiodetectorBackToMainActivity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Back to MainActivity">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
tools:context=".AudiodetectionAndAccelerometerActivity">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvAudiodetectionAndAccelerometerStatusmessage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Audiodetection + Accelerometer Activity">
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/audiodetectionAndAccelerometerBackToMainActivity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Back to MainActivity">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
tools:context=".ConnectionActivity">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvConnectionStatusmessage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Connection Activity">
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/connectionBackToMainActivity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Back to MainActivity">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,75 +1,18 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
tools:context=".MainActivity">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvStatusmessage"
|
android:layout_width="wrap_content"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:text="Hello World!"
|
android:text="Hello World!"
|
||||||
android:layout_weight="1">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
</TextView>
|
app:layout_constraintLeft_toLeftOf="parent"
|
||||||
|
app:layout_constraintRight_toRightOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:layout_weight="1">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/audiodetectionButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Audiodetection">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/videodetectionButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Videodetection">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/accelerometerButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Accelerometer">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/audiodetectionAndAccelerometerButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Audiodetection + Accelerometer">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/videodetectionAndAccelerometerButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Videodetection + Accelerometer">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/connectionButton"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Connect to Devices">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
tools:context=".VideodetectionActivity">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvVideodetectionStatusmessage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Videodetection Activity">
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/videodetectorBackToMainActivity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Back to MainActivity">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:padding="10dp"
|
|
||||||
tools:context=".VideodetectionAndAccelerometerActivity">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tvVideodetectionAndAccelerometerStatusmessage"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Videodetection + Accelerometer Activity">
|
|
||||||
</TextView>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/videodetectionAndAccelerometerBackToMainActivity"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Back to MainActivity">
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
Reference in new issue
Block a user