Skip to content

Commit

Permalink
Add a second onboarding page
Browse files Browse the repository at this point in the history
- which explains which permissions we need
- why we need them, and
- which prompt to select
shankari committed Apr 18, 2020
1 parent 11007e0 commit 7058a0c
Showing 2 changed files with 34 additions and 4 deletions.
13 changes: 12 additions & 1 deletion www/i18n/en.json
Original file line number Diff line number Diff line change
@@ -245,17 +245,28 @@
}
},

"intro": {
"permissions": {
"locationPermExplanation-android-lt-6": "you accepted the permission during installation. You don't need to do anything now.",
"locationPermExplanation-android-gte-6": "please select 'allow'",
"locationPermExplanation-ios-lt-13": "please select 'Always allow'. This allows us to protect you even when you are not actively using the app",

This comment has been minimized.

Copy link
@asiripanich

asiripanich Apr 22, 2020

Member

@shankari protect -> detect?

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

This screen was originally created for a COVID-19 reference app. So there we were definitely protecting instead of detecting. Feel free to send a PR with suggested changes.

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

Or just edit the file here with suggested wording. One word change may not be enough.

"locationPermExplanation-ios-gte-13": "please select 'when in use' now. After a few days, you will be asked whether you want to give the app background permission. Please say 'Always Allow' at that time. This allows us to protect you even when you are not actively using the app"

This comment has been minimized.

Copy link
@asiripanich

asiripanich Apr 22, 2020

Member

@shankari why guide them to select 'when in use'. Why not tell the user to go to the phone setting of emTripLog to change that to 'Always allow'?

This comment has been minimized.

Copy link
@asiripanich

asiripanich Apr 22, 2020

Member

If they select 'when in use' then the app wouldn't be able to detect their location right?

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

Hm. I'm not sure. I assumed that it would be more burdensome to users to go into the settings and change values and I should tell them which option to select from the ones presented to them at that time. Do you have a sense of whether users will break the onboarding flow to go and change settings?

Before I released emTripLog, we tried to have people customize the UI in e-mission directly. And what we found was that people would click through the onboarding flow almost mindlessly, including when we had a screen with a giant STOP button on it.

Try and have your friends install a version that tells people to go to the settings screen and see what they do :)

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

If they select 'when in use' then the app wouldn't be able to detect their location right?

Please see e-mission/e-mission-docs#483 (comment)
It looks like when you select "When in use", it tracks in the background for some time and then re-prompts. You confirmed that was the behavior you saw too 😄 Is that not what you are seeing now?

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

Try and have your friends install a version that tells people to go to the settings screen and see what they do 😄

I'm serious about this. If people will go to the settings screen, that is the easiest choice since they don't have to reconsent later. This testing will help other e-mission users as well.

This comment has been minimized.

Copy link
@asiripanich

asiripanich Apr 22, 2020

Member

I guess I was not clear about that. That re-prompt thing will come up occasionally to remind you that you are being tracked by emTripLog. It will only show if you have chosen 'always'. 'When in use' means when you are actively using the app.

This comment has been minimized.

Copy link
@asiripanich

asiripanich Apr 22, 2020

Member

Hm. I'm not sure. I assumed that it would be more burdensome to users to go into the settings and change values and I should tell them which option to select from the ones presented to them at that time. Do you have a sense of whether users will break the onboarding flow to go and change settings?

Before I released emTripLog, we tried to have people customize the UI in e-mission directly. And what we found was that people would click through the onboarding flow almost mindlessly, including when we had a screen with a giant STOP button on it.

Try and have your friends install a version that tells people to go to the settings screen and see what they do :)

I kinda remember that there is a way to have a shortcut button prompt up to your app in Settings. That should be convenient if we can have that.

This comment has been minimized.

Copy link
@asiripanich

asiripanich Apr 22, 2020

Member

Oh and not all studies recruit participants the same way. If you are asking people to do it for free then the least hassle the better. But for our case, we emphasize to our paid-to-participate users that if you don't set the location permission of emTripLog correctly then we cannot give you reward.

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

@asiripanich in iOS versions below 13, there is an "Always" option. But in iOS 13, there is no such option in the popup. The only option is "When in use". This article that I linked to
https://engineering.q42.nl/apple-location-permission-ios13/
says

Getting consent to scan for location in the background has gotten a bit harder but in exchange, your users will enjoy more transparency regarding the locations you’ve received in iOS 13. The first notable change is that even when you call requestAlwaysAuthorization, the user will only get the ‘just now’ and ‘when in use’ options in the permission dialog. If the user grants you ‘when in use’ permission and you try to scan for location in the background, only then the user will be presented a dialog to grant the background permission.

Which I think means that users can to select "When in use" first and then then select "Always" when prompted later. But I don't have an iOS13 phone to test.

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

Oh and not all studies recruit participants the same way. If you are asking people to do it for free then the least hassle the better. But for our case, we emphasize to our paid-to-participate users that if you don't set the location permission of emTripLog correctly then we cannot give you reward.

Makes sense. Feel free to update the language to whatever works for your study setup.

This comment has been minimized.

Copy link
@asiripanich

asiripanich Apr 22, 2020

Member

@shankari in case you want to know what kind of instruction we give to our user see https://travelsurvey.taharashidi.com/.

I have written up a small section on what emTripLog's permission settings should look like.

This comment has been minimized.

Copy link
@shankari

shankari Apr 22, 2020

Author Contributor

Wow! That is super detailed! If you have that checked in somewhere, it would be great if we could adapt parts of it for the standard client_setup page (https://github.com/e-mission/e-mission-server/blob/fdc39aad12e4ed19f091f5873a4fa7067bf5d864/webapp/www/templates/client_setup.html).

You will have to adapt that for the smaller screen though because I think that screenshots on a phone might be confusing. Again, feel free to change this for your study - you can add as many screens as you want in
https://github.com/e-mission/e-mission-phone/blob/port_ui_fixes/www/templates/intro/intro.html

Just make sure to call have on-click=next() in the intermediate screens and on-click=agree() in the last one.

Then I can pull your improvements over to the master version as well.

}
},
"consent":{
"button-accept": "I accept",
"button-decline": "I refuse"
},

"updatecheck":{
"downloading-update": "Downloading UI-only update",
"extracting-update": "Extracting UI-only update",
"done": "Update done, reloading...",
"download-new-ui": "Download new UI-only update?.",
"download-not-now": "Not now",
"download-apply": "Apply"
},
"sensor_explanation":{
"button-accept": "OK",
"button-decline": "Stop"
}
}
25 changes: 22 additions & 3 deletions www/js/intro.js
Original file line number Diff line number Diff line change
@@ -18,12 +18,31 @@ angular.module('emission.intro', ['emission.splash.startprefs',
});
})

.controller('IntroCtrl', function($scope, $state, $ionicSlideBoxDelegate,
.controller('IntroCtrl', function($scope, $state, $window, $ionicSlideBoxDelegate,
$ionicPopup, $ionicHistory, ionicToast, $timeout, CommHelper, StartPrefs, $translate, $cordovaFile) {

$scope.platform = $window.device.platform;
$scope.osver = $window.device.version.split(".")[0];
if($scope.platform.toLowerCase() == "android") {
if($scope.osver < 6) {
$scope.locationPermExplanation = $translate.instant('intro.permissions.locationPermExplanation-android-lt-6');
} else {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-android-gte-6");
}
}

if($scope.platform.toLowerCase() == "ios") {
if($scope.osver < 13) {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-ios-lt-13");
} else {
$scope.locationPermExplanation = $translate.instant("intro.permissions.locationPermExplanation-ios-gte-13");
}
}
console.log("Explanation = "+$scope.locationPermExplanation);

$scope.getConsentFile = function () {
var lang = $translate.use();
$scope.consentFile = "templates/intro/consent.html";
$scope.consentFile = "templates/intro/sensor_explanation.html";
if (lang != 'en') {
var url = "www/i18n/intro/consent-" + lang + ".html";
$cordovaFile.checkFile(cordova.file.applicationDirectory, url).then( function(result){
@@ -33,7 +52,7 @@ angular.module('emission.intro', ['emission.splash.startprefs',
}, function (err) {
window.Logger.log(window.Logger.LEVEL_DEBUG,
"Consent file not found, loading english version, error is " + JSON.stringify(err));
$scope.consentFile = "templates/intro/consent.html";
$scope.consentFile = "templates/intro/sensor_explanation.html";
});
}
}

0 comments on commit 7058a0c

Please sign in to comment.