Awesome
Awesome

Reputation: 345

Passing data to activity from threaded service

How can I pass data from a threaded service to the activity that created the service?

It's a login scenario. The user enters credentials, the activity starts a service which calls an wcf service to confirm the credentials. When this is done I want the service to tell the activity that the login has succeeded/failed.

Upvotes: 1

Views: 592

Answers (1)

Vladimir Ivanov
Vladimir Ivanov

Reputation: 43098

You can simply use AsyncTask to perform the login check. It is recommended to show a dialog while performing long work, see the example with progress dialog.

Upvotes: 1

Related Questions