Silk Mobile

Table of Contents (Homepage)

GetCurrentApplicationName

GetCurrentApplicationName()

images/images/os-icons/os_ios_150x150.png

images/images/os-icons/os_android_150x150.png

Description

This command will retrieve the name \ bundle \ package name of the application that's currently run in the foreground of the active device.

Parameters

No parameters

Note: This command will throw exception for devices which doesn't support the command.

Usage

We will use the this command to confirm that the eribank application is on the foreground.

images/download/attachments/3310123/12.jpg

Code Examples

Java Example
String str1 = client.getCurrentApplicationName();
C# Example
string str1 = client.GetCurrentApplicationName();
VBScript Example
str1 = client.GetCurrentApplicationName ( )
Report
Python Example
var1 = self.client.getCurrentApplicationName()
Perl Example
my $str1 = $client->getCurrentApplicationName();