Share via


PhoneApplicationService Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

The PhoneApplicationService class provides access to various aspects of the application’s lifetime. This includes management of the application’s idle behavior and management of the application’s state when it becomes active or inactive.

Inheritance Hierarchy

System..::.Object
  Microsoft.Phone.Shell..::.PhoneApplicationService

Namespace:  Microsoft.Phone.Shell
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

Syntax

Public Class PhoneApplicationService _
    Implements IApplicationService
public class PhoneApplicationService : IApplicationService
<PhoneApplicationService .../>

The PhoneApplicationService type exposes the following members.

Constructors

  Name Description
PhoneApplicationService Instantiates a new instance of the PhoneApplicationService class.

Top

Properties

  Name Description
ApplicationIdleDetectionMode Gets or sets whether application idle detection is enabled.
Current Gets the PhoneApplicationService object associated with the current application.
StartupMode Gets the mode in which the application was started.
State Gets the dictionary used for passing an application’s state between invocations.
UserIdleDetectionMode Gets or sets whether user idle detection is enabled.

Top

Methods

  Name Description
Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
GetType Gets the Type of the current instance. (Inherited from Object.)
MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
StartService This method is used by the underlying implementation of the PhoneApplicationService and should not be used by applications.
StopService This method is used by the underlying implementation of the PhoneApplicationService and should not be used by applications.
ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Activated Occurs when the application is being made active after previously being put into a dormant state or tombstoned.
Closing Occurs when the application is exiting.
ContractActivated Occurs when the app receives a modern contract activation.
Deactivated Occurs when the application is being deactivated.
Launching Occurs when the application is being launched.
RunningInBackground Occurs when an app begins to run in the background.

Top

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Platforms

Windows Phone

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Phone.Shell Namespace