cmd/gogio: add permissions system for Android

Search for imports of the form gioui.org/app/permission/* and add
required permissions to AndroidManifest.xml.

Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>
This commit is contained in:
Greg Pomerantz
2019-11-01 13:53:01 -04:00
committed by Elias Naur
parent f418684c0e
commit af353822fa
5 changed files with 153 additions and 21 deletions
+23
View File
@@ -0,0 +1,23 @@
package main
var AndroidPermissions = map[string][]string{
"network": {
"android.permission.INTERNET",
},
"bluetooth": {
"android.permission.BLUETOOTH",
"android.permission.BLUETOOTH_ADMIN",
"android.permission.ACCESS_FINE_LOCATION",
},
"bluetooth_le": {
"android.permission.BLUETOOTH",
"android.permission.BLUETOOTH_ADMIN",
"android.permission.ACCESS_FINE_LOCATION",
},
}
var AndroidFeatures = map[string][]string{
"default": {`glEsVersion="0x00030000"`},
"bluetooth": {`name="android.hardware.bluetooth"`},
"bluetooth_le": {`name="android.hardware.bluetooth_le"`},
}