android - event when input is active to accept text -


I am trying to run a service in the background which is when there is an input field Then some will appear (within any app, such as SMS, Facebook etc.), but how could I have done that

  mImm = (InputMethodManager) mContext.getSystemService (context.INPUT_METHOD_SERVICE ); If (mImm.isAcceptingText ()) {Toast. Make Text (mContext, "Show Something", Toast. LNNGHHORT) Show (); }   

Trick moves in my background service, but it

You can use one, though in that case teeth should work, in which case a notification is more suitable and professional (IMO).

Toast is not showing because the reference user you use is not from the user interface thread.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -