Home Add activity to Manifest without extends Activity
Reply: 1

Add activity to Manifest without extends Activity

Pavel Jan
1#
Pavel Jan Published in 2018-01-12 20:46:04Z

This question already has an answer here:

  • How is an Intent Service Declared in the Android Manifest? 2 answers

I have class and I need add these class to Manifest as activity, but these class is: public class SFMusic extends Service {...}. In android Manifest: <activity android:name="SFMusic" android:screenOrientation="portrait"> </activity>

How do I add the class to Android Manifest?

CommonsWare
2#
CommonsWare Reply to 2018-01-12 20:49:52Z

Quoting the documentation for Service:

Each service class must have a corresponding <service> declaration in its package's AndroidManifest.xml.

See also the overview of services, plus the material on services in any decent Android app development book or course.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.36095 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO