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

2 votes
217 views
Harsh kumar srivastava asked 09-Jan-2018 in Technology by Harsh kumar srivastava

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

1 Answer

1 votes
Prateek sharma answered 10-Jan-2018 by Prateek sharma

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.