background

package
v0.0.0-...-ae25ed0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2016 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package background is a GopherJS wrapper of Cordova Plugin: https://github.com/katzer/cordova-plugin-background-mode

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundMode

type BackgroundMode struct {
	*js.Object
	// To activate the background mode the app needs to be in foreground.
	Enable func() `js:"enable"`
	// Once the background mode has been disabled, the app will be paused when in background.
	Disable     func()                 `js:"disable"`
	IsEnabled   func()                 `js:"isEnabled"`
	IsActive    func()                 `js:"isActive"`
	GetDefaults func() *js.Object      `js:"getDefaults"`
	SetDefaults func(conf interface{}) `js:"setDefaults"`
	Configure   func(conf interface{}) `js:"configure"`
	// The backgroundMode.onactivate interface can be used to
	// get notified when the background mode has been activated.
	Onactivate func() `js:"onactivate"`
	// Once the mode has been deactivated the app will be paused
	// soon after the callback has been fired.
	Ondeactivate func() `js:"ondeactivate"`
	// Get informed when the background mode could not been activated
	Onfailure func(errorCode int) `js:"onfailure"`
}

func Get

func Get() *BackgroundMode

func (*BackgroundMode) Notify

func (b *BackgroundMode) Notify(title, msg string)

Jump to

Keyboard shortcuts

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