Thread, Asynctask or intentService for my application?

I need your opinion for my application. I am developing an application that communicates with the radio via bluetooth. The application is divided into 3 (swipe) tabs :

  • The first time I set the connect option and the connect button to connect my device to the radio.

  • In the second there is a map that shows my position (the radio can send a GPS line, I decode it using my algorithm, and I get the latitude and longitude).

  • The third one has a similar Bluetooth chat option, with which I can send / receive simple text messages on the radio.

This application should remain in the background and connected to the radio, and it should show (like SMS) in the notification area an icon that says “received message”. Therefore, I want your opinion to develop an application: should I use thread / asynctask to connect, thread / asynthesis for a card and intenservice for messages, or what do you think should be done? This is my first application in the background, last month I implemented part of my application using asynctask.

Thank you for your help.

+4
source share
1 answer

AsyncTask , / , , , .

Service , , Activity . Service, , - , , Service, ( ).

IntentService, , , Activity .

, IntentService, , , , , (AsyncTask ). , , / IntentService Activity, .

+1

All Articles