android.settings.INPUT_METHOD_SETTINGS doesn't work with HTC hero -


My application has a button that sends the locale setting to the user. I do this with this code:

  startActivity (new intent (android.provider.Settings.ACTION_INPUT_METHOD_SETTINGS));  

It works fine with some devices, but with HTC Hero, I get:

  02-03 13: 59: 27.501: info / Activity Manager (69): Intent {action = android.settings.INPUT_METHOD_SETTINGS Flags = 0x10000000} 02-03 13 :: 59: 27.531: Debug / AndroidRuntime (1916): 59 :: 27.531: VM 02-03 13 Shut down Getting Started Activity Warning / dalvikvm (1916): threadid = 3: Exit with thread unexplained exception (group = 0x40013140) 02-03 13: 59: 27.531: error / AndroidRuntime (1916): uncaught handler: did not come The main throttle due to the exit happened 02-03 13:59 D: 27.611: Error / AndroidRuntime (1916): android.content.ActivityNotFoundException No activity meant to handle {action = android.settings.INPUT_METHOD_SETTINGS Flags = 0x10000000} 02-03-13: 59: 27.611: Error / AndroidRuntime ( 1916): android.app.Instrumentation.checkStartActivityResult (Instrumentation.java1529) 02-03-13: 59: 27.611: Error / AndroidRuntime (1916): android.app.Instrumentation.execStartActivity (Instrumentation.java:1499) at 02 -03 13: 59: 27.611: Error / AndroidRuntime (1916): 59 :: 27.611: Error / AndroidRuntime (1916): android.app.Activity.startActivity (Activity.java android.app.Activity.startActivityForResult (Activity.java : 2669) 02-03 13: 2713)  

Edit: Solution!

  intent = new intent (); Intent.setAction (Intent.ACTION_MAIN); ComponentName com = New element name ("com.android.settings", "com.android.settings.LanguageSettings"); Intent.setComponent (com); StartActivity;  

The previous code will work on every device :)

official By the way, you probably can not fix it HTC has clearly broken the SDK with the special Hero Firmware which you are running. You can use android.os.build to startActivity (which leads to ) to detect and disable any of the options that you are on a hero. calls (eg, the menu option is disabled that tries to open these settings).

Unauthentically, try going through that settings app manually on that screen, and take a look at LogCat output. You may be able to determine the method that can trigger the specific screen you set, if someone is present.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -