Can local services make method calls?
I have just began researching services in Android. What I'm trying to do is remotely call a method within my application. How I believe it will work is the service will listen for requests from the开发者_开发知识库 server in the background, then depending on the request, it will call a certain method within the application. Is this possible to do with a service? or are there better ways to do this?
I'm not asking for implementation of this, just confirmation that it could work and is the best way.
Thanks
Local service can call any functions you want inside your application.
This might not be the best application design, but this certainly will work. Local service is equivalent to any other locally created object. The difference is that service is created by Android System, not by your code.
精彩评论