Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6833015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:55:42+00:00 2026-05-26T22:55:42+00:00

I am writing a keyboard replacement app for Android, and I needed the keyboard

  • 0

I am writing a keyboard replacement app for Android, and I needed the keyboard customized enough that I need to run it in an Activity, instead of keeping it in the InputMethodService class. Here is how I call the keyboard from my InputMethodService class:

    @Override public void onStartInputView(EditorInfo attribute, boolean restarting) {
    super.onStartInputView(attribute, restarting);

    Intent intent = new Intent(this, Keyboard.class);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
    context.startActivity(intent);

}

I have now run into the problem that I can’t update the text field where the input from the keyboard should go. I tried creating a static InputConnection, in my service class, then updating it from the Activity, but nothing happens.

So I guess here is my question: I was able to find lots of info about how to send data from a Service to an Activity, but nothing about sending data from an Activity to a Service(specifically an input method service). Does anyone know how to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:55:43+00:00Added an answer on May 26, 2026 at 10:55 pm

    Use a Binder for that.

    This tutorial about music player service is a good sample http://www.helloandroid.com/tutorials/musicdroid-audio-player-part-ii

    Especially this line

    mpInterface.addSongPlaylist(file.getName());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been writing an Android app that is mainly driven by hardware keyboard input.
I am writing an application that responds to keyboard actions. To automate testing, I
I'm writing a screen saver type app that needs to stop the user from
I am writing Flash app (Flash Player 10, AS 3.0) that is full screen
I'm writing a program that needs to poll keyboard keys at specific times, and
I'm am writing a piece of software in C++ that controls the keyboard backlight
I am currently writing a keyboard driver for Windows, that provides an additional modifier
I'm writing a text widget in Java SWT that displays a user-defined keyboard shortcut,
I am writing an application in C++ using CGL/OpenGL, and need keyboard/mouse input. I
I am writing a simple app that requires a field of input via an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.