Plug-in APIs

The PDK introduces several device-specific API calls. See Palm PDK Library for instructions on using these calls, and for more information on their data types.

For more information on OpenGL and its API, see the OpenGL site. The PDK currently supports OpenGL ES 1.1 and 2.0. For more information on SDL and its API, see the SDL library home page.

The following API calls provide device-specific functionality when developing a PDK-based application.

Call Summary Description
PDL_BannerMessagesEnable Enables or disables banner messages.
PDL_CustomPauseUiEnable Enables or disables system UI for handling app reactivation.
PDL_EnableLocationTracking Activates or deactivates location tracking on the device.
PDL_GesturesEnable Enables or disables gesture area actions.
PDL_GetAppinfoValue Gets a value from the appinfo.json file.
PDL_GetCallingPath Gets the app's full path minus the app name.
PDL_GetDataFilePath Gets a location for saving app data.
PDL_GetDeviceName Gets the device name.
PDL_GetErr Returns a null terminated string containing information about the last internal PDL error.
PDL_GetHardware Returns "pre", "pixi", or "unknown" depending on the device the app is running on.
PDL_GetKeyName Gets the name of a passed key.
PDL_GetLanguage Gets the device's configured language and country.
PDL_GetLocation Gets the device's current location.
PDL_GetNetInfo Gets information about a network interface.
PDL_GetOSVersion Returns the device's webOS version.
PDL_GetPDKVersion Returns the PDK version.
PDL_GetRegionCountryCode Returns the device's two-letter country/region code.
PDL_GetRegionCountryName Returns the device's country/region name.
PDL_GetScreenMetrics Returns the device's screen metrics.
PDL_GetUniqueID Gets the device's unique ID.
PDL_Init Initialize a PDL app.
PDL_isAppLicensedForDevice Allows Plug-in apps to check if the app has been licensed for the device.
PDL_IsPlugin Indicates if app is a standalone application or a plug-in component for a JavaScript application.
PDL_LaunchBrowser Launches a web browser with a passed URL.
PDL_LaunchEmail Launches an email browser with passed subject and body fields.
PDL_NotifyMusicPlaying Notifies other apps your app is playing music.
PDL_Quit Shuts down the PDL.
PDL_RegisterFunction Registers a callback function for a service.
PDL_ScreenTimeoutEnable Enables or disables screen dimming for a fullscreen app.
PDL_SetFirewallPortStatus Opens a port on the firewall.
PDL_SetOrientation Sets orientation for pop-up alerts and banner messages.
PDL_SetTouchAggression Allows Plug-in apps to set the device's touch aggression.
PDLNet_Get_Info Deprecated. See PDL_GetNetInfo.

The following API calls allow JavaScript (JS) apps to call Plug-in app functions (see JavaScript and Plug-in Interface for more information).

Call Summary Description
PDL_CallJS In a combined JS/Plug-in app, allows the Plug-in component to call a JS function.
PDL_GetJSParamDouble Parses and returns a double value passed in a string from a JavaScript app invocation of a Plug-in app function.
PDL_GetJSParamInt Parses and returns an int value passed in a string from a JavaScript app invocation of a Plug-in app function.
PDL_GetJSParamString Parses and returns a string value passed from a JavaScript app invocation of a Plug-in app function.
PDL_GetNumJSParams Returns the number of parameters passed from a JavaScript app invocation of a Plug-in app function.
PDL_JSException From a Plug-in app function, throws an exception back to the calling JavaScript.
PDL_JSRegistrationComplete Ends registration of Plug-in app functions that a JavaScript app can invoke.
PDL_JSReply In a Plug-in app function, returns a string value to the calling JavaScript app.
PDL_ProviderReply Reply to a provider callback.
PDL_RegisterJSHandler Register a Plug-in app function that a JavaScript app can invoke.

The following API calls allow Plug-in apps to call device services with or without a callback response function.

Call Summary Description
PDL_GetParamDouble Extracts a named double parameter passed to a service callback function.
PDL_GetParamInt Extracts a named int parameter passed to a service callback function.
PDL_GetParamString Extracts a named string parameter passed to a service callback function.
PDL_ParamExists Checks if a named parameter has been passed to a service callback function.
PDL_ProviderReply Reply to a provider callback.
PDL_ServiceCall Calls a device service without a callback response.
PDL_ServiceCallWithCallback Calls a device service with a callback response function.
PDL_ServiceRegistrationComplete Completes registration of functions.
PDL_UnregisterServiceCallback

Stops a service from sending any more responses using a callback function.

The PDK comes with the following calls for playing video on the device. See SDL_cinema for instructions on using these calls and their data types.

Note:

SDL_cinema calls cannot be used on the desktop or in hybrid apps. They can only be used in full-screen PDK apps.

Call Summary Description
CIN_Init Initializes SDL cinema.
CIN_LoadCIN Loads a cinema from a URL.
CIN_Play Start cinema playback.
CIN_Pause Pauses cinema playback.
CIN_Stop Stops cinema playback.
CIN_DeInit Deinitializes SDL cinema.