Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically enabling a custom keyboard

I've developed custom keyboard on android, and I want to add a button to enable my keyboard and redirect the user to the page of virtual keyboards or to page manage keyboards so that the user can just turn on my keyboard from there, for example similar to the one in "a.i.typekeyboard", kindly see the screenshot.enter image description here

enter image description here

like image 353
Khalid AL Bitar Avatar asked Sep 01 '18 07:09

Khalid AL Bitar


1 Answers

Just open input method settings activity using Intent.

Intent enableIntent = new Intent(Settings.ACTION_INPUT_METHOD_SETTINGS);
enableIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);   
this.startActivity(enableIntent);   
like image 98
Geo Avatar answered Oct 24 '22 20:10

Geo