Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop the app on the remote device when the user stops it from host machine #16

Open
berkobob opened this issue Jan 19, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@berkobob
Copy link

I love your snapp_cli app, thank you. One issue, when I stop the app from my PC, the debugger disconnects but the app continues to run on the RPi. Is there a way to cleanly stop the app running? Thanks.

@payam-zahedi
Copy link
Member

Hey @berkobob
Happy to hear it is useful for you.

I will investigate about this.

I guess it's not possible from the flutter side, but maybe we can do a trick and kill the app by app ID.

I will let you know about possibilities.

@payam-zahedi payam-zahedi self-assigned this Jan 19, 2024
@berkobob
Copy link
Author

Any luck with this? I'm having to reboot the pi each time because I don't know the name (or number) of the process to kill. Thanks!

@payam-zahedi
Copy link
Member

payam-zahedi commented Jan 24, 2024

Unfortunately, I didn't manage to check this issue.

you can find the app ID with this command

app_pid=$(pgrep -f "$app_command")

app_command=/tmp/\${appName}/build/linux/arm64/debug/bundle/\${appName}

If you want to work on this you can add this line in your custom_devices.json file after the line we lauch the app

@berkobob
Copy link
Author

That works, thank you.

@payam-zahedi
Copy link
Member

@berkobob Can you share the final solution that you use?

I want add a update for it

@berkobob
Copy link
Author

I find the process ID as you showed me and then kill the process.

@payam-zahedi
Copy link
Member

Alright,

If I get it right, you did this process manually right?

You did not change the custom_devices.json file

@berkobob
Copy link
Author

No, I didn't.

@payam-zahedi
Copy link
Member

Thanks @berkobob

@payam-zahedi payam-zahedi changed the title Stopping the app on a RPi Stop the app on the remote device when the user stops it from host machine Apr 17, 2024
@payam-zahedi payam-zahedi added enhancement New feature or request good first issue Good for newcomers labels Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants