manifest

package
v1.6.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 4 Imported by: 8 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package manifest supports reading and changing the android manifest xml file.

Index

Constants

View Source
const (
	// ActionMain is the action treated as the main entry point, which does not
	// expect to receive data.
	ActionMain = "android.intent.action.MAIN"

	// CategoryInfo provides information about the package it is in; typically
	// used if a package does not contain a CATEGORY_LAUNCHER to provide a
	// front-door to the user without having to be shown in the all apps list.
	CategoryInfo = "android.intent.category.INFO"

	// CategoryLauncher means the action should be displayed in the top-level
	// launcher.
	CategoryLauncher = "android.intent.category.LAUNCHER"

	ErrNoActivityFound = fault.Const("No suitable activity found")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Name string `xml:"name,attr"`
}

Action represents an action of an IntentFilter.

type Activity

type Activity struct {
	Name          string         `xml:"name,attr"`
	IntentFilters []IntentFilter `xml:"intent-filter"`
}

Activity represents an activity declared in an Application.

type Application

type Application struct {
	Activities []Activity `xml:"activity"`
	Debuggable bool       `xml:"debuggable,attr"`
}

Application represents an application declared in an APK.

type Category

type Category struct {
	Name string `xml:"name,attr"`
}

Category represents the category of an IntentFilter.

type Feature

type Feature struct {
	Name        string `xml:"name,attr"`
	Required    bool   `xml:"required,attr"`
	GlEsVersion string `xml:"glEsVersion,attr"`
}

Feature represents a feature used by an APK.

type IntentFilter

type IntentFilter struct {
	Action     Action     `xml:"action"`
	Categories []Category `xml:"category"`
}

IntentFilter represents an intent filter declared in an Activity.

type Manifest

type Manifest struct {
	Package     string       `xml:"package,attr"`
	VersionCode int          `xml:"versionCode,attr"`
	VersionName string       `xml:"versionName,attr"`
	Application Application  `xml:"application"`
	Features    []Feature    `xml:"uses-feature"`
	Permissions []Permission `xml:"uses-permission"`
}

Manifest represents an APK's AndroidManifest.xml file.

func Parse

func Parse(ctx context.Context, s string) (Manifest, error)

Parse parses the AndroidManifest XML string.

func (Manifest) MainActivity

func (m Manifest) MainActivity(ctx context.Context) (activity, action string, err error)

type Permission

type Permission struct {
	Name string `xml:"name,attr"`
}

Permission represents a permission used by an APK.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL