android

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImportanceUnspecified signifying that the user has not expressed an importance. This value is for persisting preferences, and should never be associated with an actual notification.
	ImportanceUnspecified = -1000
	// ImportanceNone a notification with no importance: shows nowhere, is blocked.
	ImportanceNone = 0
	// ImportanceMin min notification importance: only shows in the shade, below the fold.
	ImportanceMin = 1
	// ImportanceLow low notification importance: shows everywhere, but is not intrusive.
	ImportanceLow = 2
	// ImportanceDefault default notification importance: shows everywhere, allowed to makes noise, but does not visually intrude.
	ImportanceDefault = 3
	// ImportanceHigh higher notification importance: shows everywhere, allowed to makes noise and peek.
	ImportanceHigh = 4
	// ImportanceMax the highest notification importance: shows everywhere, allowed to makes noise, peek, and use full screen intents.
	ImportanceMax = 5
)
View Source
const (
	// PriorityDefault Default notification priority. If your application does not prioritize its own notifications, use this value for all notifications.
	PriorityDefault = 0
	// PriorityLow Lower notification priority, for items that are less important. The UI may choose to show these items smaller, or at a different position in the list, compared with your app's {@link #PRIORITY_DEFAULT} items.
	PriorityLow = -1
	// PriorityMin the lowest notification priority. These items might not be shown to the user except under special circumstances, such as detailed notification logs.
	PriorityMin = -2
	// PriorityHigh higher notification priority, for more important notifications or alerts. The UI may choose to show these items larger, or at a different position in notification lists, compared with your app's {@link #PRIORITY_DEFAULT} items.
	PriorityHigh = 1
	// PriorityMax the highest notification priority, for your application's most important items that require the user's prompt attention or input.
	PriorityMax = 2
)
View Source
const (
	ContentPort = "android/content/jrpc"
)
View Source
const (
	NotifyPort = "android/notify/rpc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Icon   string
	Title  string
	Intent *Intent
}

type Channel

type Channel struct {
	Id         string
	Name       string
	Importance int
}

type ContentServiceApi

type ContentServiceApi interface {
	String() string
	Info(uri string) (files *Info, err error)
	Reader(uri string, offset int64) (err error)
}

type Info

type Info struct {
	Uri  string
	Size int64
	Mime string
	Name string
}

type Intent

type Intent struct {
	Type   string
	Action string
	Uri    string
}

type Notification

type Notification struct {
	Id            int
	ChannelId     string
	ContentTitle  string
	ContentText   string
	ContentInfo   string
	Ticker        string
	SubText       string
	SmallIcon     string
	Number        int
	Ongoing       bool
	Silent        bool
	Defaults      int
	OnlyAlertOnce bool
	AutoCancel    bool
	Group         string
	GroupSummary  bool
	Priority      int
	ContentIntent *Intent
	Progress      *Progress
	Action        *Action
}

type NotifyServiceApi

type NotifyServiceApi interface {
	String() string
	Create(channel *Channel) (err error)
	Notify(notification *Notification) (err error)
}

type Progress

type Progress struct {
	Max           int
	Current       int
	Indeterminate bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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