2 ms·
Semi random question: does Android have a camera API already? I.e. if WhatsApp wants to use the camera, instead of building its own camera component, could it
by oblio 4y ago
Semi random question: does Android have a camera API already?
I.e. if WhatsApp wants to use the camera, instead of building its own camera component, could it just invoke the platform camera?
The Samsung camera app has a ton of nice features and instead WhatsApp, Telegram & co just their garbage generic camera apps.
- rickdeckard 4y agoOf course Android has a camera API. It is up to the App-Developer if he wants to trigger the default camera application and get a picture returned by it, or talk directly to the camera within the app (using the Android Camera APIs). Larger Companies opt for the latter and make a own camera UI to take full control of the experience (and to be able to add features like filters etc) Google has a project for developers to help unify the experiences across different apps, but it is up to the developer whether he makes use of it or not [1] [1] https://developer.android.com/training/camerax https://developer.android.com/training/camerax
- oblio 4y agoI mean an actual API. Something where you say: open up the default camera app on the system and give me a stack of pixels at the end. Hopefully the CameraX thing you linked can be used as a base for all Android camera apps.
- daveoc64 4y agoYes. That's what a Camera Intent would do: https://developer.android.com/training/camera/camera-intents https://developer.android.com/training/camera/camera-intents This is the "I want the default camera app to take the photo for me, and I just want my app to be given an image afterwards" approach.
- oblio 4y agoLet's hope Samsung (and all the other Android phone manufacturers) adopt this by 2050 :-)
- izacus 4y agoThey adopted this in 2009, what are you going on about?
- oblio 4y agoI've just checked on my phone. Telegram, WhatsApp, Signal, Google Messages (!!!) don't use this API. Messenger Lite does, as do Google Keep and Amazon Chime (!!!). Android doing Android things ¯\_(ツ)_/¯
- daveoc64 4y ago>Telegram, WhatsApp, Signal, Google Messages (!!!) don't use this API. That's a perfectly valid choice. App developers of that size have the resources to make their own camera UI, and produce the experience they want to.
- oblio 4y agoAnd the experience they produce on Android is worse than the iOS one, because Android apps are second-rate mobile citizens.
- daveoc64 4y agoIt's the same on iOS too. Many major apps make their own camera UI, because it allows them to make a bespoke experience that actually feels like something that's part of their own app. There's always the option to use the standard camera app, but that will feel jarring to most people, as it's just not how the most popular social media apps work.
- jve 4y agoWhatsApp is the one that should adopt it.
- lawgimenez 4y agoDo you mean Camera2 API? https://developer.android.com/training/camera2 https://developer.android.com/training/camera2