In an application that I am developing I have a main Activity
that starts one Service
(it is a floating window, I am using StandOut library). The same application contains a class that extends InputMethodService
, I'd like to make them communicate, since I want to handle some Events
in InputMethod calling methods contained in instances of classes created inside my StandOutWindow
. I tought to use SharedPreferences
, is this a good way or are there better ways to make them communicate?
Asked
Active
Viewed 2,363 times
0

Vektor88
- 4,841
- 11
- 59
- 111
1 Answers
-1
I think you must use bindService
to communicate with your service
http://developer.android.com/guide/components/bound-services.html
To communicate with your InputMethodService
you can follow this tutorial:
http://android-developers.blogspot.com/2009/04/creating-input-method.html
And to comunicate between services
:
-
1I have tried this, but unfortunately InputMethodService has onBind declared final, so i cannot return the messenger binder. – Vektor88 Jun 13 '13 at 23:21
-
There is nothing to post, it is a simple statement. To make two service to communicate you should override the onBind method. Unfortunately, in a InputMethodService it is declared final in its interface, so it is impossible to override it. – Vektor88 Jun 14 '13 at 11:20