Not able to use the constant defined in Service class which is in different package
I am implementing "Bound Services" using 开发者_开发知识库messenger. As given in "http://developer.android.com/guide/topics/fundamentals/bound-services.html", if I try accessing service.class[service is the name of the class] or service.constant in Message.obtain or bindService in my activity class, it is not recognizing service class name as a class.
Service class is in different package and the activity class is in different package.
Can anyone please help in fixing this error. Do I have to add jar file of service in build path of activity??
Thanks.
Is your service class declared as public?
Otherwise, can you give more context? How exactly do you call the service class or service constant?
精彩评论