Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Contributor
sunil_gulabani
Posts: 10
Registered: ‎03-21-2013
My Device: BB 8520
My Carrier: Idea Cellular
Accepted Solution

No keyboard when running Android app on BlackBerry 10 simulator

I have my first Android app running on the BB10 Dev Alpha simulator (10.0.10.261) which is running fine, other than the keyboard doesn't appear at all. My app contains code to show and hide the on-screen keyboard at appropriate times but this isn't working on the BB10 simulator (works fine on Android devices). Is this a bug with the simulator? Has anybody else had their Android keyboard show/hide properly on BB10?

Please use plain text.
Developer
ndsmyter
Posts: 648
Registered: ‎09-26-2012
My Device: Limited Edition Z10, Playbook 16GB/32GB, Dev Alpha A/B/C
My Carrier: Mobile Vikings

Re: No keyboard when running Android app on BlackBerry 10 simulator

As far as I know there were some problems in the past with showing and hiding of the keyboard in the simulator. And as far as I can remember, these problems weren't there on a real device.
So maybe you should try to get your hands on a real BB10 device, so you can test your app on it. Because I would think it will work on a real device (but I'm not completely sure though).


A like is always appreciated,
but a nomination for BB Elite even more :-)
You can also contact me on Twitter: @ndsmyter
Please use plain text.
Developer
brijmohanyadav
Posts: 45
Registered: ‎08-29-2013
My Device: Blackberry curve-9360 and Blackberry bold-9860
My Carrier: Company

Re: No keyboard when running Android app on BlackBerry 10 simulator

I have faced the same problem.

 

When i clivk on editField sometimes keyboard shows and sometime not.

 

Please suugest what is the problem.

Please use plain text.
Developer
ndsmyter
Posts: 648
Registered: ‎09-26-2012
My Device: Limited Edition Z10, Playbook 16GB/32GB, Dev Alpha A/B/C
My Carrier: Mobile Vikings

Re: No keyboard when running Android app on BlackBerry 10 simulator

brijmohanyadav, does this also occur on a real BB10 device? Or what version of the simulator are you running?


A like is always appreciated,
but a nomination for BB Elite even more :-)
You can also contact me on Twitter: @ndsmyter
Please use plain text.
Developer
brijmohanyadav
Posts: 45
Registered: ‎08-29-2013
My Device: Blackberry curve-9360 and Blackberry bold-9860
My Carrier: Company

Re: No keyboard when running Android app on BlackBerry 10 simulator

Hi,

 

I try on Blackberry Z10 device having os 10.1.0.

 

I use following code to show and hide keyboard

 

    public static void showKeyboard(final Context context,
            final EditText editText) {
        editText.postDelayed(new Runnable() {
            @Override
            public void run() {
                ((InputMethodManager) context
                        .getSystemService(Context.INPUT_METHOD_SERVICE))
                        .showSoftInput(editText,
                                InputMethodManager.SHOW_IMPLICIT);
//                InputMethodManager imm = (InputMethodManager)context.getSystemService(Context.INPUT_METHOD_SERVICE);
//                imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0);
            }
        }, 500);
    }

 
    public static void hideKeyboard(final Context context,
            final EditText editText) {
        editText.post(new Runnable() {
            @Override
            public void run() {
                InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
                imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
            }
        });
    }

 

Please suggest .

 

Thanks in advance.
   

Please use plain text.
BlackBerry Development Advisor (Retired)
jjasmann
Posts: 264
Registered: ‎01-08-2013
My Device: BlackBerry 10 Dev Alpha B
My Carrier: Bell

Re: No keyboard when running Android app on BlackBerry 10 simulator

Hey brijmohanyadav,

 

There was some problems with the Android input management framework on the older simulators.

 

Try it on the newer 10.2.1 simulator (https://developer.blackberry.com/android/tools/) or newer OS (https://developer.blackberry.com/devzone/blackberry10devalpha/devalpha_update.html) and see if you can reproduce there.

 

Cheers,

Justin Jasmann | Android Application Development Consultant
Developer Relations
developer.blackberry.com
Please use plain text.
Developer
brijmohanyadav
Posts: 45
Registered: ‎08-29-2013
My Device: Blackberry curve-9360 and Blackberry bold-9860
My Carrier: Company

Re: No keyboard when running Android app on BlackBerry 10 simulator

Thanks for your reply.
Please use plain text.