Foreground service notification missing for TorService on initial run
The notification request which is required to run foreground services comes after the initial setup of the provider. In the circumvention setup case tor-service runs without foreground permissions currently on the initial run, because of the order of the setup steps we chose. The user is doomed to watch the progress of the setup (the activity needs to stay in foreground), otherwise the service gets killed by android and the setup won't succeed, e.g. if the user switches the app in the meanwhile, just because it's boring to watch progress bars. When the user switches back to Bitmask/RiseupVPN they are again at the starting point.
- before we actually start the API communication we probably should show the notification permission screen
so the proposal would be to change the order of the setup screens from
splash screen --> provider selection --> circumvention selection --> provider setup --> notification request --> vpn permission request --> all set
to:
splash screen --> provider selection --> circumvention selection --> notification request --> provider setup --> vpn permission request --> all set
The hypothesis that the missing notification premission is the reason why a setup attempt doesn't succeed while the app is in background needs to be double-checked first though.
ping @mcnair @kwadronaut