Update app_api.md

This commit is contained in:
Emanuele Faranda
2021-08-20 15:39:45 +02:00
committed by GitHub
parent c497a954b6
commit af0a905f48
+4 -2
View File
@@ -58,8 +58,10 @@ The result code tells if the command succeded or not.
## User Consent
To prevent malicious apps from monitoring/hijacking the device traffic, PCAPdroid will ask for user consent every time a capture is started. If the user denies consent, then the request fails.
Consent is also asked when a stop request is received from a different app from the one which started it. Please note that AFAIK Android does not provide a consistent way to determine the source of an Intent.
This is only available via [getCallingPackage](`https://developer.android.com/reference/android/app/Activity#getCallingPackage()`) when the caller app uses `startActivityForResult` (or the equivalent `ActivityResultLauncher`).
Consent is also asked when a stop request is received from a different app from the one which started it.
Please note that AFAIK Android does not provide a consistent way to determine the source of an Intent.
This is only available via [getCallingPackage](`https://developer.android.com/reference/android/app/Activity#getCallingPackage()`) when the caller app uses `startActivityForResult` (or the equivalent `ActivityResultLauncher`). So it's adviced to always invoke the API via `startActivityForResult`.
## Capture Settings