Download this file

MainActivity.java    81 lines (61 with data), 2.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
package eu.alfred.bodypostureapp;
import android.content.Intent;
import android.os.Bundle;
import java.util.Map;
import eu.alfred.api.proxies.interfaces.ICadeCommand;
import eu.alfred.bodypostureapp.actions.HelpToPostureAction;
import eu.alfred.ui.AppActivity;
import eu.alfred.ui.BackToPAButton;
import eu.alfred.ui.CircleButton;
public class MainActivity extends AppActivity implements ICadeCommand {
final static String HELP_TO_POSTURE_ACTION = "HowToPostureAction";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
circleButton = (CircleButton) findViewById(R.id.voiceControlBtn);
circleButton.setOnTouchListener(new MicrophoneTouchListener());
backToPAButton = (BackToPAButton) findViewById(R.id.backControlBtn);
backToPAButton.setOnTouchListener(new BackTouchListener());
}
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
}
@Override
public void performAction(final String calledAction, final Map<String, String> map) {
switch (calledAction) {
case HELP_TO_POSTURE_ACTION:
HelpToPostureAction htpa = new HelpToPostureAction(this, cade);
htpa.performAction(calledAction, map);
break;
default:
break;
}
}
@Override
public void performWhQuery(final String calledAction, final Map<String, String> map) {
}
@Override
public void performValidity(String calledAction, Map<String, String> map) {
}
@Override
public void performEntityRecognizer(String calledAction, Map<String, String> map) {
}
@Override
public void onStart() {
super.onStart();
}
@Override
public void onStop() {
super.onStop();
}
@Override
protected void onPause() {
super.onPause();
}
@Override
public void onResume() {
super.onResume();
}
}