BoxSymbol Clock.png
This is an archive.
See the new ClickWiki at https://clickwiki.github.io. This version is just an archive for the purposes of migrating content to the new structure.


Jump to: navigation, search

Android object

Icon Android object.png
Author Clickteam
Status Released
Release Date 2006
Last Updated {{{LastUpdated}}}
Available for Multimedia Fusion 2 Standard Multimedia Fusion Developer 2 Clickteam Fusion 2.5 Standard Clickteam Fusion 2.5 Developer
Supported Runtimes Android Runtime
License Free
Attributes Official extension or is supported by Clickteam.
Download
Includes Examples ?
Includes Help Files Yes
Links
Downloadable via the Extension Manager
Part of the Android Exporter
Alternates

The Android object contains specific functions for the Android devices.

Conditions

Device has a GPU?

This condition is true if the device has a GPU (graphic processor unit). Note: although applications created with Clickteam Fusion 2.5 run on devices without GPU, graphical applications are very slow on these devices.

User is roaming

This condition is true when the user is roaming.

Network is connected?

This condition is true when the device is connected to the network.
Important: you must select the ACCESS_NETWORK_STATE permission in the properties of the application, otherwise this function won't work or will crash.

Bluetooth is enabled?

This condition is true when Bluetooth is enabled on the device.
Important: you must select the BLUETOOTH permission in the properties of the application otherwise this function won't work or will crash.

Device is rooted?

This condition attempts to detect if the device has been rooted. Note that this may not work on all devices or with different rooting methods.

Device is plugged in?

These conditions are true when the device is plugged into any power source, an AC adapter or an USB port.

Battery is charging / discharging / full?

These conditions allow you to test the status of the battery.

On incoming intent

This condition is true when the application receives a specific intent. Parameter = action name.

On any incoming intent

This condition is true when the application receives any intent.

On back button pressed?

This condition works only if you select the "Disable default back button behavior" option in the properties of the application. In this case, it's triggered when the user presses the back button.

On menu button pressed?

This condition is triggered when the user presses the menu button just before the application is sent to the background.

Is back button down?

This condition is true when the back button is down.

Is menu button down?

This condition is true when the menu button is down.

Read button state

This condition is true when a button is pressed. Parameter = key code (the list of available key codes is available in the Android documentation)

On options menu item selected

This condition is triggered when a specific item of the Options menu is selected by the user. Parameter = identifier of the menu item.

On any options menu item selected

This condition is triggered when any item of the Options menu is selected by the user. You can retrieve the identifier of the menu item with the MenuItem$ expression.

Actions

Log functions

These functions allow you to write to the system log, viewable with DDMS. The different actions are for different levels of verbosity, where "error" is the most important and "verbose" is the least (this affects how they show up in the console - log messages may be filtered by levels of verbosity).

Sleep prevention

Allows you to prevent or allow the device to enter sleep mode.

Open URL

Opens an URL in the browser.

Intent (outgoing) / Start intent

Allows you to start an Intent. An intent is an abstract description of an operation to be performed. This could be, for example, something like "android.intent.action.DIAL" with the parameter "tel:123" to dial the number "123". There are a lot of possible Intents in Android. Look at the documentation of the Android SDK for more information: http://developer.android.com/reference/android/content/Intent.html

Intent (outgoing) / Start intent with chooser

Allows you to start an intent with a chooser dialog where necessary.

Sometimes there is more than one application available to receive an intent (for example, multiple e-mail clients may be installed). When this is the case, the user will be presented with the chooser dialog.

Intent (outgoing) / Add category

Gives additional information about the action to execute. For more information, see the Intent documentation.

Intent (outgoing) / Add extra data

These actions allow you to add extra data to the intent. For example, when starting an intent to send an e-mail, it may be useful to include the subject and body. Parameters = data name and value.

Intent (incoming) / Subscribe to action

Allows your application to receive specific incoming intents, causing the "On incoming intent" condition to fire. Parameter = action name.

Intent (incoming) / Unsubscribe from action

Cancels a subscription for a specific incoming intent. Parameter = action name.

Vibrate

Vibrates the device. Parameter = duration in milliseconds.
Important: you must select the VIBRATE permission in the properties of the application otherwise using this action will result in the application being force closed.

Expressions

GPU name

GPU_Name$("Android")

Returns the name of the GPU (graphic processor unit) on the device, if any.


GPU vendor

GPU_Vendor$("Android")

Returns the name of the vendor of the GPU (graphic processor unit) on the device, if any.


Phone unique ID

PhoneID$("Android")

Returns the unique identifier of the phone.


Network operator name

Operator$("Android")

Returns the name of the network operator.


Device unique ID

DeviceID$("Android")

Returns a unique identifier for the device. Although this works for all devices, the ID is specific to Clickteam Fusion 2.5 and not a standard identifier.


Battery charge percentage

BatteryPercentage("Android")

Returns the current percentage of charge of the battery between 0 and 100.


Screen width

 ScreenWidth("Android")

This expression returns the width of the screen.


Screen height

ScreenHeight("Android")

This expression returns the height of the screen.


Renderer type

Renderer$("Android")

This expression returns the name of the renderer (OpenGL ES 1.1 or 2.0).


Ad height

AdHeight("Android")

This expression returns the height of the currently displayed ad, if any. If no ad is displayed, 0 will be returned.


Get data storage directory

DataStorageDirectory$("Android")

Returns the pathname of the data storage directory, used for storing small, persistent files (such as saves or settings).


Temp directory

TempPath$("Android")

Returns the pathname of the temp directory.


External storage directory

ExternalStorageDirectory$("Android")

Returns the pathname of the external storage directory, used for storing larger files. On a typical phone, this is likely to be the SD card.


Runtime / Runtime version

RuntimeVersion$("Android")

Returns the version of the runtime code.


Runtime / Application title

AppTitle$("Android")

Returns the title of the application.


Runtime / Application package name

PackageName$("Android")

Returns the package name of the application.


Runtime / Application version

AppVersion$("Android")

Returns the version of the application specified in the Version Name option in the Android properties of the application.


Intent (incoming) / Action

IntentAction$("Android")

Returns the action name of the incoming intent.


Intent (incoming) / Data

IntentData$("Android")

Returns the data parameter of the incoming intent.


Intent (incoming) / Extra data (by key) / String

IntentExtra_String$("Android", "data_name")

Returns an extra string parameter for the incoming intent. Parameter = name of extra data.


Intent (incoming) / Extra data (by key) / Boolean

IntentExtra_Boolean("Android", "data_name")

Returns an extra boolean parameter for the incoming intent. Parameter = name of extra data.


Intent (incoming) / Extra data (by key) / Integer

IntentExtra_Long("Android", "data_name")

Returns an extra integer parameter for the incoming intent. Parameter = name of extra data.


Selected options menu item

MenuItem$("Android")

Returns the identifier of the selected item in the Options menu.


Contributors to this page

Advaith (100.0%)