Difference between revisions of "InstalledApp Object"

From Hubitat Documentation
Jump to: navigation, search
(Added getid documentation)
 
Line 1: Line 1:
===<code>getId</code>===
 
: Returns the internal ID that represents the installed app in Hubitat.
 
  
:;Signature
+
<big>'''We're moving!''' Please visit http://docs2.hubitat.com for the latest documentation.</big>
:: <code>Long getId()</code>
 
  
:;Parameters
+
<big>
::None
+
This document is available at: http://docs2.hubitat.com/en/developer/app/installedapp-object
 
+
</big>
:;Returns
 
::The internal ID of the current app.
 
 
 
===<code>getInstallationState</code>===
 
:Returns a value indicating whether the app is currently installed or, if you are in the initial setup, that it is not.
 
 
 
:;Signature
 
:: <code>String getInstallationState()</code>
 
 
 
:;Parameters
 
::None
 
 
 
:;Returns
 
::<code>COMPLETE</code> if the app is installed, otherwise <code>INCOMPLETE</code>.
 
 
 
=== <code>getLabel</code> ===
 
:Get the current label of the installed app.
 
 
 
:;Signature
 
:: <code>String getLabel()</code>
 
 
 
:;Parameters
 
::None
 
 
 
:;Returns
 
::The current label of the installed app
 
 
 
:;Example
 
def appLabel = app.getLabel()
 
log.debug "app label is ${appLabel}"
 
 
 
=== <code>updateLabel</code> ===
 
:Update the label of the installed app
 
 
 
:;Signature
 
::void updateLabel(String label)
 
 
 
:;Parameters
 
::label - new label for installed app
 
 
 
:;Returns
 
::None
 
 
 
===<code>updateSetting</code>===
 
:Updates the value of a setting (preference) to the specified value. If the setting does not exist, this method will create it.
 
 
 
:;Signature
 
::<code>void updateSetting(String name, Long value)</code>
 
::<code>void updateSetting(String name, Boolean value)</code>
 
::<code>void updateSetting(String name, String value)</code>
 
::<code>void updateSetting(String name, Double value)</code>
 
::<code>void updateSetting(String name, Date value)</code>
 
::<code>void updateSetting(String name, List value)</code>
 
 
 
:;Parameters
 
::name - The name of the setting to update
 
::value - The value to store in the setting
 
 
 
:;Returns
 
::None
 
 
 
== <code>Additional Methods to Document</code> ==
 
void updateSetting(String name, Map options)
 
void removeSetting(String name)
 
void clearSetting(String name)
 
Long getName()
 
List<EventSubscriptionWrapper> getSubscriptions()
 

Latest revision as of 19:39, 25 September 2022

We're moving! Please visit http://docs2.hubitat.com for the latest documentation.

This document is available at: http://docs2.hubitat.com/en/developer/app/installedapp-object