0

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?

Vektor88
  • 4,841
  • 11
  • 59
  • 111

1 Answers1

-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:

Android communication between two services

Community
  • 1
  • 1
mromer
  • 1,867
  • 1
  • 13
  • 18
  • 1
    I 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