Reputation: 1677
First question: I know that in the Activities only view content should be implemented but is it usual to start an own service for each longer computation process?
Second question: And the communication with the service is really extensive in code. If you want to invoke a method on the service you have to realize the hole IPC-mechanism?? Or is it also possible to invoke methods on local services without using the AIDL-files?
Upvotes: 0
Views: 63
Reputation: 75645
Depending on task you want to perform consider using AsyncTask
or IntentService
. Using regular Service
should rather not suit your needs best here.
If you use regular Service
you can easily pass your data or arguments or whatever in Intent
. You do not need any IPC for this.
Upvotes: 1
Reputation: 2555
First question: you can start an AsynTask for longer computation process, service are generally used for action when application on background.
Second question: you can call any Method on your service, the use of idle make your services available for multiple applications, witch is not the case of a simple services, also, sample services runs on the same application process as your activities, witch is not the case of idle service.
Upvotes: 1