On Dec 22, 2011, at 2:58 PM, devbuzz wrote:
> If I instantiate a Service class using StartService() like this:
> 
> StartService(new Intent(this, typeof(DBT.ServiceManager)));
> 
> how do I get a reference to the class?

If DBT.ServiceManager is a type within your application (which it should be for 
`typeof` to work), then just code around it: add code to your ServiceManager 
constructor storing the Service instance into a global variable "somewhere."

If it's not a type within your application, you're out of luck: there's no way 
(afaik) to obtain an instance of the Service class, especially since it lives 
in a different process and you'd need to use IPC to communicate with it anyway. 
This is where aidl and interfaces come in...

 - Jon

_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to