scan barcode on GrapheneOS (Android)
Hello,
I’m using a highly secured Android system (GrapheneOS, https://grapheneos.org/) and I was unable to use the scan barcode function of Zotero until tonight.
Zotero would always issue the error that barcode scanning is not supported on my device, even though it’s a Pixel 9a running an Android 16.
Tonight, playing around with authorizations inside system settings I realized Zotero does not request access to the camera. There is also no way to add this permission. Zotero delegates this action to Google Play Services.
And by default, Google Play Services don’t have access to the camera. So I’m stuck with this alternative:
- either I let Google Play Services access to the camera, opening a large security hole in my setup (basically granting all apps that use Google Play Services access to the camera), but I can scan barcodes with Zotero
- or I don’t scan barcodes with Zotero (which is not terrible, just sad).
I wish there were a 3rd option: Zotero uses the camera without Google Play Services, and I can grant it the proper access, isolated from other apps.
Any idea why Zoter went this way, requiring Google Play Services?
Any plans to get rid of Google Play Services in a foreseeable future?
thanks
I’m using a highly secured Android system (GrapheneOS, https://grapheneos.org/) and I was unable to use the scan barcode function of Zotero until tonight.
Zotero would always issue the error that barcode scanning is not supported on my device, even though it’s a Pixel 9a running an Android 16.
Tonight, playing around with authorizations inside system settings I realized Zotero does not request access to the camera. There is also no way to add this permission. Zotero delegates this action to Google Play Services.
And by default, Google Play Services don’t have access to the camera. So I’m stuck with this alternative:
- either I let Google Play Services access to the camera, opening a large security hole in my setup (basically granting all apps that use Google Play Services access to the camera), but I can scan barcodes with Zotero
- or I don’t scan barcodes with Zotero (which is not terrible, just sad).
I wish there were a 3rd option: Zotero uses the camera without Google Play Services, and I can grant it the proper access, isolated from other apps.
Any idea why Zoter went this way, requiring Google Play Services?
Any plans to get rid of Google Play Services in a foreseeable future?
thanks
Upgrade Storage
It's true that you would need to give Google Play Services access to the camera, but it would only be used for the specific APIs that require it (e.g., the barcode scanner and the document scanner, which works the same way), and you'd get notified of camera use by Google Play Services as with any other app with that permission.
There's a lower-level API from Google we could use if we implemented the camera view ourselves, but then we specifically would need camera privileges. This API lets us avoid requesting it.
The point is not that Zotero uses only Google code-scanner API. The point is I must give Google Play Services access to the camera. Full access. Android does not allow for pick and choose here.
Once I open this door, any app that uses Google Play Services inherit that access and the problem is here.