Heshan Perera
Heshan Perera

Reputation: 4620

Android: Manifest: What does the $ symbol stand for?

The following code example given for android device administrator application development receiver android:name=".app.DeviceAdminSample$DeviceAdminSampleReceiver

What does the $ symbol between "DeviceAdminSample" and "DeviceAdminSampleReceiver" mean here ? The full xml is as follows...

<activity android:name=".app.DeviceAdminSample"
                android:label="@string/activity_sample_device_admin">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.SAMPLE_CODE" />
        </intent-filter>
    </activity>
    <receiver android:name=".app.DeviceAdminSample$DeviceAdminSampleReceiver"
            android:label="@string/sample_device_admin"
            android:description="@string/sample_device_admin_description"
            android:permission="android.permission.BIND_DEVICE_ADMIN">
        <meta-data android:name="android.app.device_admin"
                android:resource="@xml/device_admin_sample" />
        <intent-filter>
            <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" />
        </intent-filter>
    </receiver>

Upvotes: 1

Views: 345

Answers (2)

Bhavin
Bhavin

Reputation: 6010

This is an example

public class DeviceAdminSample{

private String someInstanceVariable = "";

public class DeviceAdminSampleReceiveranonymous {
 //Inner Class
}
}

$ Means Inner Class.

You can refer example of $ class from Here.

Upvotes: 3

user1112699
user1112699

Reputation: 197

The DeviceAdminSampleReceiver class is an inner class in the DeviceAdminSample.

Java will compile the inner class with a $ symbol.

Upvotes: 6

Related Questions