Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
AndroidSensorSharing
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenLicht
AndroidSensorSharing
Commits
0529cfff
Commit
0529cfff
authored
6 years ago
by
boqiren
Browse files
Options
Downloads
Patches
Plain Diff
add current lights control text view
parent
91a18eed
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mobile/src/main/java/de/tudresden/inf/st/sensorsharing/MainActivity.java
+6
-6
6 additions, 6 deletions
.../java/de/tudresden/inf/st/sensorsharing/MainActivity.java
with
6 additions
and
6 deletions
mobile/src/main/java/de/tudresden/inf/st/sensorsharing/MainActivity.java
+
6
−
6
View file @
0529cfff
...
@@ -567,20 +567,20 @@ public class MainActivity extends AppCompatActivity implements
...
@@ -567,20 +567,20 @@ public class MainActivity extends AppCompatActivity implements
@Override
@Override
public
void
messageArrived
(
String
topic
,
MqttMessage
message
)
throws
Exception
{
public
void
messageArrived
(
String
topic
,
MqttMessage
message
)
throws
Exception
{
String
status_message
=
new
String
(
message
.
getPayload
());
String
status_message
=
new
String
(
message
.
getPayload
());
TextView
textView
=
findViewById
(
R
.
id
.
room_name
);
TextView
textView1
=
findViewById
(
R
.
id
.
current_light_name
);
System
.
out
.
println
(
" Topic:\t"
+
topic
+
System
.
out
.
println
(
" Topic:\t"
+
topic
+
" Message:\t"
+
status_message
+
" QoS:\t"
+
message
.
getQos
()
);
" Message:\t"
+
status_message
+
" QoS:\t"
+
message
.
getQos
()
);
if
(
topic
.
equals
(
"in/E_Motion_Detector/state"
)
&&
status_message
.
equals
(
"OPEN"
)){
if
(
topic
.
equals
(
"in/E_Motion_Detector/state"
)
&&
status_message
.
equals
(
"OPEN"
)){
System
.
out
.
println
(
"hhhhhhh"
);
TextView
textView
=
findViewById
(
R
.
id
.
room_name
);
textView
.
setText
(
"Entrance Room"
);
textView
.
setText
(
"Entrance Room"
);
textView1
.
setText
(
"E Lights"
);
}
else
if
(
topic
.
equals
(
"in/G_Motion_Detector/state"
)
&&
status_message
.
equals
(
"OPEN"
)){
}
else
if
(
topic
.
equals
(
"in/G_Motion_Detector/state"
)
&&
status_message
.
equals
(
"OPEN"
)){
System
.
out
.
println
(
"uuuuu"
);
TextView
textView
=
findViewById
(
R
.
id
.
room_name
);
textView
.
setText
(
"Bedroom Corridor"
);
textView
.
setText
(
"Bedroom Corridor"
);
textView1
.
setText
(
"G Lights"
);
}
else
if
(
topic
.
equals
(
"in/D_Motion_Detector/state"
)
&&
status_message
.
equals
(
"OPEN"
)){
}
else
if
(
topic
.
equals
(
"in/D_Motion_Detector/state"
)
&&
status_message
.
equals
(
"OPEN"
)){
TextView
textView
=
findViewById
(
R
.
id
.
room_name
);
textView
.
setText
(
"Kitchen"
);
textView
.
setText
(
"Kitchen"
);
textView1
.
setText
(
"D Lights 1 and Lights 2"
);
}
}
SeekBar
current_seekbar
=
findViewById
(
R
.
id
.
seekBar1
);
SeekBar
current_seekbar
=
findViewById
(
R
.
id
.
seekBar1
);
current_seekbar
.
setOnSeekBarChangeListener
(
new
SeekBar
.
OnSeekBarChangeListener
()
{
current_seekbar
.
setOnSeekBarChangeListener
(
new
SeekBar
.
OnSeekBarChangeListener
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment