I wanted to know if it was possible for an app to know if user took a photo with the Android camera and send a push notification or start the app if it is activated.
There are ~1.5 billion Android devices in use, spanning thousands of device models. These will have hundreds, if not thousands, of "Android camera apps", including pre-installed ones and ones installed by users. None have to tell third-party apps when they take a picture, and none have to publish any evidence that they took a picture. For example, they can take a picture and upload it straight to a Web server.
So, no, this is not possible in any reliable fashion.
Related
The TL;DR is I want to upload photos to a web form that aren't purely photos. In this specific case it would be an image from a Thermal Camera App that has its own physical accessory.
So this screen would list the Thermal Cam app as well.
Currently I cannot set it as the "Default Camera" application even though it does take pictures. Can I do anything to change that?
I am speaking as a tech-savvy user making educated guesses, not a developer.
Phone is a Samsung J7, Version 7.1.1 if it matters.
No
The app needs to support the Camera Intent Filters which would require the app developer to support all of the ways to pass back an image.
What can you do
Ask the publisher/developer of Thermal Camera App to support Camera Intents.
I'm making an Android app that is used as POS in some business. In order to gain attraction the app is given with the phone, an Internet line and the app. I want to restrict phone calls, whatsapp, SMS and so other. I want the phone to boot directly in my app.
I was looking into Cyanogenmod but couldn't find any information on how to do this.
I mean, isn't it my hardware?
EDIT
I'm open to use other OS.
My device is a Samsung Trend initially.
I've read that you can replace an .apk and start your own app instead of the android menu (I know the user can then change the .apk, so still, it seems the better solution, anyway I couldn't find any information on how to do this)
I'm not 100% clear what you're asking for (you're giving away an entire phone with your app!?) and you didn't mention the phone model or Android version you are using, but there are apps out there which allow you to restrict a phone's ability to run or access certain features. (To find more, just search the Google Play Store for "kiosk".)
Android 4.2 on tablets introduced multiple user accounts, which were expanded in Android 5 Lollipop to phones with "profile accounts", which can be used to restrict access to apps and services. Screen pinning is another feature you can use to lock a particular app to the screen so that it can't be removed without entering a password.
It is your hardware, and as such you can also take more extreme measures by modifying the Android frameworks directly to restrict functionality, by say, removing the dialer. But if you're actually giving away phones with your app, there's always a possibility the new owner will restore the functionality and/or replace the ROM completely.
How can I launch to the device camera, in built-in countdown mode, configure it to 10s and take a photo?
Without user interaction.
The user should not press the capture button. It should start programmatically.
Thanks.
First, the "device camera" does not necessarily have a "built-in countdown mode". There are thousands of Android device models, with dozens (if not hundreds) of pre-installed camera apps. None have to have this feature. Similarly, there are hundreds of camera apps available on the Play Store, and none of them have to have this feature.
Second, even if a camera app has this feature, there is no requirement that it expose an API for third-party developers to invoke this feature.
Third, even if a camera app has this feature and exposes an API for it, there is no standards for this API.
You are welcome to contact the developers of various camera apps and see if they have the feature and, if so, if they have an API for third-party developers to invoke it.
I have been doing some heavy research into the field of Visual Search, and I tried the technologies from Google (Goggles), Amazon (Firefly), and other vendors.
I can say that FireFly is actually the best, because its instant identification (no need to snap a photo and send it to some server for processing), plus its able to identify products accurately without having to scan their barcode, which is fascinating.
The thing is, Amazon exposed the Firefly SDK but only for their phone's Fire OS. And you can't use it for other Android development.
However, I am pretty sure this is not a hardware limitation, because Amazon has an app called Flow which runs on Android and iOS which uses the same identification technology, so I am sure any camera can be used and not just the one on the Fire phone.
Does anyone know if it's possible to use the Firefly SDK somehow on Android? I know this might be impossible without some sort of reverse engineering for FireOS, but even so at least it would be technically possible!
Thanks for your response in advance.
I am developing an Android application that places a high priority on protecting the user's data, to the point of storing nothing in persistent memory on the local device.
To further protect user data, we want to make a web-service call to our server whenever someone attempts to take a screenshot of the active application.
Solutions that I have seen so far include this snippet intended to prevent the screenshot from being taken and throwing a screenshot failure message in a Toast at the user. Another approach I was considering was listening for the combination of Volume Down and Power button that some devices use to take screenshots (though devices such as the Samsung S4 deviate from this method). My last resort was going to use a FileObserver in the location of the screenshot Gallery for changes while the app is running, but that also seems like a sub-optimal solution and introduces a Permission request that I'd rather not have. I also can't be sure of the file destination for the images.
I believe the Snapchat app is able to alert participants when a remote user attempts to take a screenshot. Do you have any suggestions on how this feature might be implemented, short of rooting the device? Non-official methods are welcome as well.
FLAG_SECURE is probably the best way to avoid screenshots in a window, but as some commenters say here it has some workarounds.
Maybe this answer solves the question about how do they do it in Snapchat to detect when a screenshot has been taken.