Where will you declare your activity so the system can access it?

Asked 09-Jan-2018
Viewed 528 times

2

Where will you declare your activity so the system can access it?


1 Answer


1

You always need to declare your activity in Android Manifest file

<manifest….>
<application…>
<activity
     android:name="com.example.name.AppName"
     android:label="@string/app_name>
</activity>
</application>	
</manifest>
Since manifest file contains in the root directory of your application, it provides various information such as minimum Android API level, it also describes the various Android components such as activities, services, broadcast receivers, and content providers. It also describes all the permission needed for your app to access various services like internet, camera, or some hardware component.