あなたができることは、アクティビティでブロードキャストレシーバーを作成できることです。このコードを oncreate に記述します。実際に修正してください私は家にいるので、修正する必要があります。
BroadcastReciever broadcast_obj = new BroadcastReciever (
@overrieded
onRecieve(Intent intent) {
String action = intent.getAction();
if(action == "my_bt_action") {
//UPDATE YOUR TEXTVIEW AND DO WHATEVER WORK YOU WANT.
}
});
Now you need to register your broadcast for that just put these line in your oncreate after creating Broadcast reciever which we have just done.
registerREciever(broadcast_obj, new IntentFilter("my_bt_action");
now you need to send your broadcast when your service will perform your calculation or your task for that it is simple.
Intent intent = new Intent (getApplictionContext,"my_bt_action");
sendBroadcast(intent);
from above code you can easily communicate between your activity and service.
hope it will work.