What is the difference between these two ways of setting the android:name field?
I seen both type and not sure why they are written these two different ways
one way I see often is (notice the "." between " and "Server"):
android:name=".Server"
the other way without the extra "." before the name:
android:name="Server"
sample xml
<service
android:name=".Server"
android:icon="@drawable/ic_launcher"
android:label="audioservice"
android:process=":my_process" >
</service>
<activity android:name=".DBView">
<intent-filter >
<action android:name="com.example.test.DBVIEW"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Look at this.
The name of the Service subclass that implements the service. This should be a fully qualified class name (such as, "com.example.project.RoomService"). However, as a shorthand, if the first character of the name is a period (for example, ".RoomService"), it is appended to the package name specified in the element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With