~eliasnaur/gio

2f67feafc0a23913f467dd5bb1adbc6d0784d388 — Sebastien Binet 1 year, 13 days ago 956bb10
app/permission/camera,cmd/gogio: add support for camera permission

Signed-off-by: Sebastien Binet <s@sbinet.org>
2 files changed, 22 insertions(+), 0 deletions(-)

A app/permission/camera/main.go
M cmd/gogio/permission.go
A app/permission/camera/main.go => app/permission/camera/main.go +16 -0
@@ 0,0 1,16 @@
// SPDX-License-Identifier: Unlicense OR MIT

/*
Package camera implements permissions to access camera ardware.

Android

The following entries will be added to AndroidManifest.xml:

    <uses-permission android:name="android.permission.CAMERA"/>
    <uses-feature android:name="android.hardware.camera" android:required="false"/>

CAMERA is a "dangerous" permission. See documentation for package
gioui.org/app/permission for more information.
*/
package camera

M cmd/gogio/permission.go => cmd/gogio/permission.go +6 -0
@@ 9,6 9,9 @@ var AndroidPermissions = map[string][]string{
		"android.permission.BLUETOOTH_ADMIN",
		"android.permission.ACCESS_FINE_LOCATION",
	},
	"camera": {
		"android.permission.CAMERA",
	},
	"storage": {
		"android.permission.READ_EXTERNAL_STORAGE",
		"android.permission.WRITE_EXTERNAL_STORAGE",


@@ 21,4 24,7 @@ var AndroidFeatures = map[string][]string{
		`name="android.hardware.bluetooth"`,
		`name="android.hardware.bluetooth_le"`,
	},
	"camera": {
		`name="android.hardware.camera"`,
	},
}