diff --git a/gogio/androidbuild.go b/gogio/androidbuild.go
index 03951a0..0b026a9 100644
--- a/gogio/androidbuild.go
+++ b/gogio/androidbuild.go
@@ -40,15 +40,16 @@ type errWriter struct {
var exeSuffix string
type manifestData struct {
- AppID string
- Version Semver
- MinSDK int
- TargetSDK int
- Permissions []string
- Features []string
- IconSnip string
- AppName string
- Schemes []string
+ AppID string
+ Version Semver
+ MinSDK int
+ TargetSDK int
+ Permissions []string
+ Features []string
+ IconSnip string
+ AppName string
+ Schemes []string
+ PackageQueries []string
}
const (
@@ -435,15 +436,16 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe
permissions, features := getPermissions(perms)
appName := UppercaseName(bi.name)
manifestSrc := manifestData{
- AppID: bi.appID,
- Version: bi.version,
- MinSDK: minSDK,
- TargetSDK: targetSDK,
- Permissions: permissions,
- Features: features,
- IconSnip: iconSnip,
- AppName: appName,
- Schemes: bi.schemes,
+ AppID: bi.appID,
+ Version: bi.version,
+ MinSDK: minSDK,
+ TargetSDK: targetSDK,
+ Permissions: permissions,
+ Features: features,
+ IconSnip: iconSnip,
+ AppName: appName,
+ Schemes: bi.schemes,
+ PackageQueries: bi.packageQueries,
}
tmpl, err := template.New("test").Parse(
`
@@ -451,6 +453,13 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe
package="{{.AppID}}"
android:versionCode="{{.Version.VersionCode}}"
android:versionName="{{.Version}}">
+ {{if .PackageQueries}}
+
+ {{range .PackageQueries}}
+
+ {{end}}
+
+ {{end}}
{{range .Permissions}}
{{end}}{{range .Features}}
diff --git a/gogio/build_info.go b/gogio/build_info.go
index 4125681..cb19066 100644
--- a/gogio/build_info.go
+++ b/gogio/build_info.go
@@ -32,6 +32,7 @@ type buildInfo struct {
notaryPassword string
notaryTeamID string
schemes []string
+ packageQueries []string
}
type Semver struct {
@@ -80,6 +81,7 @@ func newBuildInfo(pkgPath string) (*buildInfo, error) {
notaryPassword: *notaryPass,
notaryTeamID: *notaryTeamID,
schemes: getCommaList(*schemes),
+ packageQueries: getCommaList(*pkgQueries),
}
return bi, nil
}
diff --git a/gogio/help.go b/gogio/help.go
index 778a559..e7006cd 100644
--- a/gogio/help.go
+++ b/gogio/help.go
@@ -88,4 +88,8 @@ The -schemes flag specifies a list of comma separated URI schemes that the progr
handle. For example, use -schemes yourAppName to receive a app.URLEvent for URIs
starting with yourAppName://. It is only supported on Android, iOS, macOS and Windows.
On Windows, it will restrict the program to a single instance.
+
+The -queries flag specifies a list of comma separated package names used to query other apps,
+that is useful to launch other apps and verify their presence. For example, use -queries
+com.example.otherapp to query the app with that package name. It is only necessary on Android.
`
diff --git a/gogio/main.go b/gogio/main.go
index c8dd962..bedc17b 100644
--- a/gogio/main.go
+++ b/gogio/main.go
@@ -42,6 +42,7 @@ var (
notaryPass = flag.String("notarypass", "", "specify app-specific password of the Apple ID to be used for notarization.")
notaryTeamID = flag.String("notaryteamid", "", "specify the team id to use for notarization.")
schemes = flag.String("schemes", "", "specify a list of comma separated URL schemes that the program accepts")
+ pkgQueries = flag.String("queries", "", "specify a list of comma separated package names used to query other apps on Android.")
)
func main() {