Skip to content

Commit 1c2ac61

Browse files
authored
PROB-1941 Smart Care apps missing Save button on iOS (SmartThingsCommunity#2737)
The definition for the page in the preferences section did not specify 'install: true', instead this was specified in the declaration for the dynamicPage. However, it seems changing the definition in the dynamic page declaration doesn't matter as in iOS it always uses the first declaration found. Fixing this issue by adding 'install: true' to the preference declaration and removing the page definition from dynamicPage.
1 parent 5d953d6 commit 1c2ac61

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

smartapps/smartthings/smart-care-daily-routine.src/smart-care-daily-routine.groovy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ definition(
3131
)
3232

3333
preferences {
34-
page(name: "configuration", title:"", content: "disclaimerPage", uninstall: true)
34+
page(name: "configuration", title:"", content: "disclaimerPage", install: true, uninstall: true)
3535
}
3636

3737
def disclaimerPage() {
@@ -60,11 +60,11 @@ def disclaimerPage() {
6060
"or use of content on the app. SMARTTHINGS INC., ITS OFFICERS, " +
6161
"EMPLOYEES AND AGENTS DO NOT ACCEPT LIABILITY HOWEVER ARISING, INCLUDING LIABILITY FOR NEGLIGENCE, " +
6262
"FOR ANY LOSS RESULTING FROM THE USE OF OR RELIANCE UPON THE INFORMATION AND/OR SERVICES AT ANY TIME."
63-
63+
6464
if (disclaimerResponse && disclaimerResponse == "I agree to these terms") {
6565
configurationPage()
6666
} else {
67-
dynamicPage(name: "configuration", nextPage:null, uninstall: true) {
67+
dynamicPage(name: "configuration") {
6868
section(disclaimerText){
6969
input "disclaimerResponse", "enum", title: "Accept terms", required: true,
7070
options: ["I agree to these terms", "I do not agree to these terms"],
@@ -75,7 +75,7 @@ def disclaimerPage() {
7575
}
7676

7777
def configurationPage(){
78-
dynamicPage(name: "configuration", install: true, uninstall:true, nextPage: "configuration") {
78+
dynamicPage(name: "configuration") {
7979
section("Who are you checking on?") {
8080
input "person1", "text", title: "Name?"
8181
}

smartapps/smartthings/smart-care-detect-motion.src/smart-care-detect-motion.groovy

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
55
* in compliance with the License. You may obtain a copy of the License at:
66
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
7+
* http://www.apache.org/licenses/LICENSE-2.0
88
*
99
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
1010
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
1111
* for the specific language governing permissions and limitations under the License.
1212
*
13-
* Elder Care: Slip & Fall
13+
* Smart Care - Detect Motion
1414
*
1515
* Author: SmartThings
1616
* Date: 2013-04-07
17-
*
17+
*
1818
*/
1919

2020
definition(
@@ -28,7 +28,7 @@ definition(
2828
pausable: true
2929
)
3030
preferences {
31-
page(name: "configuration", title:"", content: "disclaimerPage", uninstall: true)
31+
page(name: "configuration", title:"", content: "disclaimerPage", install: true, uninstall: true)
3232
}
3333

3434
def disclaimerPage() {
@@ -57,11 +57,11 @@ def disclaimerPage() {
5757
"or use of content on the app. SMARTTHINGS INC., ITS OFFICERS, " +
5858
"EMPLOYEES AND AGENTS DO NOT ACCEPT LIABILITY HOWEVER ARISING, INCLUDING LIABILITY FOR NEGLIGENCE, " +
5959
"FOR ANY LOSS RESULTING FROM THE USE OF OR RELIANCE UPON THE INFORMATION AND/OR SERVICES AT ANY TIME."
60-
60+
6161
if (disclaimerResponse && disclaimerResponse == "I agree to these terms") {
6262
configurationPage()
6363
} else {
64-
dynamicPage(name: "configuration", nextPage:null, uninstall:false) {
64+
dynamicPage(name: "configuration") {
6565
section(disclaimerText){
6666
input "disclaimerResponse", "enum", title: "Accept terms", required: true,
6767
options: ["I agree to these terms", "I do not agree to these terms"],
@@ -72,7 +72,7 @@ def disclaimerPage() {
7272
}
7373

7474
def configurationPage(){
75-
dynamicPage(name: "configuration", install: true, uninstall:true, nextPage: "configuration") {
75+
dynamicPage(name: "configuration") {
7676
section("Bedroom motion detector(s)") {
7777
input "bedroomMotion", "capability.motionSensor", multiple: true
7878
}
@@ -95,7 +95,7 @@ def configurationPage(){
9595
}
9696
}
9797
}
98-
}
98+
}
9999

100100
def installed() {
101101
log.debug "Installed with settings: ${settings}"

0 commit comments

Comments
 (0)