6

I am facing some issues in calling the Android soft keyboard from a C++ file. I have a project in C++ and I need to show and use the native soft keyboard in some screens. I am compiling all the code with NDK. Can anybody provide a suggestion on how to use the soft keyboard in a native / C++ application ? Thanks in advance for your help. Regards, Maidul

Maidul
  • 1,289
  • 16
  • 30

2 Answers2

5

1) Create a method in Java to show the virtual keyboard like this: How to show virtual keypad in an android activity

2) Write a callback from C++ to Java using the following technique: JNI - How to callback from C++ or C to Java?

Community
  • 1
  • 1
JonnyBoy
  • 1,555
  • 14
  • 24
-4

you can't use only the C++ for an Android application, you can build an app using the C++ or the C through the JNI and Java. All the Apis provided for Android are for the Java language.

user827992
  • 1,743
  • 13
  • 25
  • Hello user827992,My apps is in NDK means it is using SDK,JNI,Java and C++ and some resource file.resource file save in sd card and written in xml and access through c++. when app is running there is a page and page contains edit text.When I touch Edit Text it will open Android Native soft keyboard.Could you please have some idea. – Maidul Jul 30 '12 at 12:37
  • as per the comment above,there should be no problem in getting the soft keyboard when u r clicking over textbox. – Subrat nayak. Sep 14 '12 at 05:49