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 6866629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:12:34+00:00 2026-05-27T03:12:34+00:00

I want to access a keyboard via Bluetooth. For example : Two devices connect

  • 0

I want to access a keyboard via Bluetooth.

For example :
Two devices connect each other via Bluetooth if I open keyboard in the first device, and I want access that keyboard in another device in any edittext.

So how can I access that keyboard in another device via bluetooth in android?

  • 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-27T03:12:35+00:00Added an answer on May 27, 2026 at 3:12 am

    To detect a EditText keyboard popping up :

    Override
    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        final int proposedheight = MeasureSpec.getSize(heightMeasureSpec);
        final int actualHeight = getHeight();
    
        if (actualHeight > proposedheight){
            // Keyboard is shown
        } else {
            // Keyboard is hidden
        }
    
        super.onMeasure(widthMeasureSpec, heightMeasureSpec);
    }
    

    To capture a key event

    final EditText edittext = (EditText) findViewById(R.id.edittext);
    edittext.setOnKeyListener(new OnKeyListener() {
        public boolean onKey(View v, int keyCode, KeyEvent event) {
            // If the event is a key-down event on the "enter" button
            if (event.getAction() == KeyEvent.ACTION_DOWN) 
    
             // keycode should be sent over bluetooth. 
    
              return true;
            }
            return false;
        }
    });
    

    To inject keypresses in your Activity simply call onKeyDown() with the appropriate KeyEvent


    To open up a keyboard

    EditText editText = (EditText) findViewById(R.id.myEdit);
    InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    // only will trigger it if no physical keyboard is open
    mgr.showSoftInput(editText, InputMethodManager.SHOW_IMPLICIT);
    

    and close it :

    InputMethodManager mgr = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
    mgr.hideSoftInputFromWindow(editText.getWindowToken(), 0);
    

    If you are not interested in popping up the keyboard on the other phone, simply ignore this section. Use the good old : setText()


    Now how you form the chatting protocol by which Bluetooth sends these key events is up to you.Hint: RemoteDroid used OscMessages

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On Android devices that use soft keyboards, I want to prevent the fullscreen keyboard
i want to access each object of my dictionary Dictionary with int index. hw
I want to enable Access for assistive devices in System Preferences programmatically. But Problem
I am new in C but not in programming. I want access keyboard keys
I want to use the following code to access the state of the keyboard
I want to be able to access keyboard shortcuts even when my tab is
i have bean that contain method [void return] and want access to this bean
I want to access the call stack at runtime in a Native C++ application.
I want to access a UIImage programmatically... i.e. myImage.hidden = TRUE; etc. I can
I want to access my sql server database files in a INTEL SS4000-E storage.

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.