crownstone / crownstone-app

Mobile app for the Crownstone (Android & iOS). The apps are freely available from Google and Apple app stores. The code is based on React Native.
https://crownstone.rocks/app/
Apache License 2.0
16 stars 14 forks source link

[android] Swiping the app does not restart main process #40

Closed mrquincle closed 2 years ago

mrquincle commented 4 years ago

When swiping other apps, e.g. Telegram, the behaviour is as in the attached pictures.

What needs to be implemented is the ability to start the app from the service. There are examples on stackoverflow that all describe FLAG_ACTIVITY_NEW_TASK and where Marcil Gil also nicely explains that this is a method that is very logical to have. It's intentional behaviour to have a service being able to launch something - even on the foreground. His example is a background service that listens to incoming calls. When a call is coming in an activity has to be started. The service itself can't pick up the phone.

TLDR: Start the app from the service

AlexDM0 commented 2 years ago

@vliedel could you take a look at this?

vliedel commented 2 years ago

Closing the app by swiping it, doesn't stop the background service, so there shouldn't be a problem. I don't see a use case for us to start the app in foreground without user intent, and starting only the background service is not trivial, since we use react native.

AlexDM0 commented 2 years ago

so wontfix for now

mrquincle commented 2 years ago

I'd like also to have some explanation of what this means to the Android user.

What's expected to work when the app is closed and what does stop working? Especially, given the fact that this might have been different in the past, and might change in the future.