Set up the app on a new phone
A customer installs the app on a new phone, or opens it from an invite link, and signs in or signs up. The app explains why it wants notifications and location, then shows the phone's own prompt for each; the customer can skip either one. If location is denied, the app explains how to turn it on and can send the customer to the phone's Settings app.
What UJN shows here Point at a note to see its part of the drawing
The source (34 lines)
app-permissions.puml
@startujnrender { direction: down; arrow_spacing: 24 }journey APP_SETUP "Set up the app on a new phone"description: "Sign in, then ask for notifications and location; the user can skip either"unique_id_friendly: app_setup start from_home { description: "Opened after install" }start from_invite { type: deep-link; description: "Invite link"; route: /invite/:code }ref sign_in { journey: SIGNIN; title: "Sign in or sign up" }view notify_ask { title: "Get order updates"; description: "Why we send notifications"; route: /setup/notifications }action notify_os { type: permission; title: "Allow notifications"; description: "Either answer goes on" }view location_ask { title: "Find places near you"; description: "Why we use location"; route: /setup/location }action location_os { type: permission; title: "Allow location" }view location_off { title: "Location is off"; description: "How to turn it on later"; route: /setup/location-off }handoff phone_settings { title: "Phone settings"; channel: phone settings }view all_set { title: "All set"; route: /setup/done }end ready { type: success; description: "On the home screen" } from_home --> sign_infrom_invite --> sign_in { payload: [invite_code] }sign_in ..> notify_ask : signed innotify_ask --> notify_os : [Turn on]notify_ask --> location_ask : [Not now]notify_os --> location_asklocation_ask --> location_os : [Turn on]location_os --> all_set : allowedlocation_os -x-> location_off : deniedlocation_ask --> all_set : [Not now]location_off --> phone_settings : [Open Settings]location_off --> all_set : [Not now]phone_settings ..> all_set : [Turn location on]phone_settings .x.> location_off : [Leave it off]all_set -right-> ready : [Start using the app]@endujn