How can I make an Android app that has a callback triggered whenever the user takes a photo (or more specifically, screenshots). The screenshotting would occur when the user is not active on app (would be while other browsers or apps are open), and I couldn't find any information on how to request user permission to access all their screenshots, and how I can trigger my app callback whenever a screenshot occurs on the mobile device.
I looked at Flutter packages and articles, but none described this functionality (closest I could find to running such background processes even when the app is not open is Geolocation).
Flutter only has packages to trigger callbacks of a screenshot when the app itself is open, rather than of anything on the mobile device.
Related
A client of mine is requesting for a very specific functionality, to keep the application always active, even after the user force kills it. He wants to ensure that the users have the application active at any time while using the device on which it is installed (the devices are managed in a constrained environment).
I've done some research on it, and already enabled background services for sending the user's location, but if they force kill the app then we are unable to send locations to the server. We've seen other apps do it, but wonder how they do it.
According to https://stackoverflow.com/a/34573169/640907 it should be possible in Android. We also found https://ssaurel.medium.com/how-to-auto-restart-an-android-application-after-a-crash-or-a-force-close-error-1a361677c0ce but I don't think this will work for our use-case, as the user can close the application without "force kill" aswell..
Anyone knows how to achieve this for a Flutter application?
My app uses a background service to stay in sync with our WS and also has access to the users' camera, location, storage and phone state. It's main function is that of barcode scanning, for which I use a 3rd party library.
Recently some of my users that have my app installed on their Samsung devices have reported that they keep getting notifications from an App Permission Monitor regarding my app. It tell's them that "-the app- has been detected using Camera". As if my app is somehow using their phones' cameras while in the background.
Is there any way for me to notify the device that my app is allowed to use the camera and that notifying the user is not needed? Or to somehow not trigger this notification?
Note: I don't check for camera permission or try to access it from my background service.
I found a this article about how to disable the feature but that's on the users' end.
I'm not getting notification when user swipe the app from recent. I've notice that behavior occurs in some specific device for instance I've tested it on nexus devices and HTC devices it's working fine but when user swipe the app from the recent in huawei and some samsung devices it doesn't show notification. I mean i don't get onMessageReceived() callback
After some research I found out that in these devices when user swipe it from recent it force stop the app (the process is completely killed) and I don't get any notification. In huawei they have protected and unprotected apps and if I add the app in protected list from the setting, I start getting notification because i this case it doesn't force stop the app. and I believe in samsung they have the same thing with blacklist and whitelist apps.
I've also tried some solutions like restart the service onTaskRemoved() callbacks or make your app START_STICKY. I've also tried WakefulBroadcastReceiver but nothing is working for me.
So my question is how can i get notification even if it gets forced stop, like it's happening when swiping app from recent.
An old question, but I think it’s important to know that HUAWEI has a feature called “power-intensive app monitor “. It kills every app that runs in the background for a long time unless user gives special permissions to it.
The path to do this:
Settings -> Security & privacy -> Location services -> recent location requests: YOUR APP NAME -> Battery -> uncheck Power-intensive prompt, App launch: Manage manually: check all three positions: Auto-launch, secondary launch, run in background.
I don’t know if there's a way to do this programmatically. I think the best way is to create a sort of help activity and explain the user what to do if application won’t work.
I was developing an app for an enterprise which has given the employees an android phone, they wanna monitor every time a user tries to open any other app and send a report to a manager so I´ve developed an android service that checks every time any other app is call meaning: OnCreate, onResume, etc.(that´s done) Now they wanna check what that particular user did once he got into the other app: for example if he opened the messages(com.android.mms) , what message he sent or what he had recieve. other example: if he opened the dialer(com.android.dialer) they wanna know what phone he called. What makes it tricky for me, is that they want this for EVERY POSSIBLE APP a user can have installed in their phone.
My Question is the following: is there a way to capture this kind of information of a running app, from a service?
I appreciate any answer and I´m open to suggestions of how should i do this.
Suppose I want to start an app to run in background as soon as an event occurs in the phone.
For example:-
When I open my gallery I may want to automatically start my app which monitors my file browsing and prepares database for most recent documents, most listened song, etc and is automatically closed when I exit my gallery folder.
Whenever I open my internet browser I might want to start my app in background, which monitors how many times I visited a particular site and it automatically closes when I close the browser.
I don't think this is possible, and i'm not talking about remote launch app, but capture events of other apps like Gallery or Browser.
If this are only hipotetic examples, you should show a real examples because i think collect this type of data will be more painful problem than trigger app on an event due a lot of security reasons.