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

how to STOP it? #33

Open
ilya-lopukhin opened this issue Jan 28, 2021 · 7 comments
Open

how to STOP it? #33

ilya-lopukhin opened this issue Jan 28, 2021 · 7 comments

Comments

@ilya-lopukhin
Copy link

So guys, i'm a bit desperate here: i'm using it together with react-native-webrtc. The problem is i need to stop it when i swipe the app from the multitasking. On android <= 7 it stops. On higher androids it just keeps going forever. I tried forking the package and implementing the onTaskRemoved(). I tried onDestroy(). I tried declaring android:stopWithTask="true".
What i achieved is service being "stopped", notification removed, but the darn stream is still going. So no notification, no clue app is running or something, but the webrtc stream is still perfectly fine. This drives me crazy, any thoughts what i can do?
Without react-native-foreground-service at all the whole thing is closing naturally when i kill the app obviously.

@ilya-lopukhin
Copy link
Author

So guys to sum up:
On Android, i have an ability to KEEP LISTENING to the microphone and streaming audio even after killing the app. I can do this without ANY INDICATION something is running. No notification. App is not in the multitasking. Mic is being recorded. I just find this so BIZARRE from a privacy standpoint. I can do a mic spying app right now and it will run silently without user even noticing it even after he swipes my spy app from the multitasking. Can anyone explain to me what’s happening here? Should i contact any Android maintainers about this?

@mohammadrahmanian
Copy link

mohammadrahmanian commented Mar 11, 2021

I have exactly the same issue. Have you found any solution?

@louxinbo
Copy link

Same here. Did you find any solution?

@dev-apps-code
Copy link

problem still exists, anyone?

@tecnosul
Copy link

@Override
protected void onDestroy() {
  super.onDestroy();
  Intent intent = new Intent(this.getApplicationContext(), VIForegroundService.class);
  intent.setAction("com.voximplant.foregroundservice.service_stop");
}

this worked for me.

@AlexCernik
Copy link

@Override
protected void onDestroy() {
  super.onDestroy();
  Intent intent = new Intent(this.getApplicationContext(), VIForegroundService.class);
  intent.setAction("com.voximplant.foregroundservice.service_stop");
}

this worked for me.

more explanation please?

@n-ii-ma
Copy link

n-ii-ma commented Oct 17, 2022

@Override
protected void onDestroy() {
  super.onDestroy();
  Intent intent = new Intent(this.getApplicationContext(), VIForegroundService.class);
  intent.setAction("com.voximplant.foregroundservice.service_stop");
}

this worked for me.

At least provide an explanation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants