I'm making a simple REST client in Android: I created a service that is responsible for the REST calls, but it needs the username and password to operate. The username and password is stored in a regular account registry, so what I want to do is to retrieve the usernama and auth token in the service.
The problem is that getAuthToken
wants to have the Activity
as the parameter, but while I'm in the service I don't have any kind of Activity
to pass. Is there a known way to deal with this issue? Or I'm doing is all wrong and I shouldn't even try to access this data from within a service?