How to debug custom keyboard in android? -



How to debug custom keyboard in android? -

i have legacy keyboard app legacy software application unfortunately needs fixed. running lot of problems debugging it.

i'm stumped @ trying find way guts of app through debugger, maybe create stub project or test harness?

here oncreate:

public class inputlanguageselection extends preferenceactivity { @override protected void oncreate(bundle icicle) { super.oncreate(icicle); // addpreferencesfromresource(r.xml.language_prefs); // settings preferences sharedpreferences sp = preferencemanager.getdefaultsharedpreferences(this); mavailablelanguages = getuniquelocales(); string selectedlanguagepref = sp.getstring(latinime.pref_selected_languages, ""); log.i(tag, "selected languages: " + selectedlanguagepref); string[] languagelist = selectedlanguagepref.split(","); // compatibility hack v1.22 , older - if selected language 5-code isn't // found in current list of available languages, seek adding 2-letter // language code. example, "en_us" no longer listed, utilize "en" instead. set<string> availablelanguages = new hashset<string>(); (int = 0; < mavailablelanguages.size(); i++) { locale locale = mavailablelanguages.get(i).locale; availablelanguages.add(get5code(locale)); } set<string> languageselections = new hashset<string>(); (int = 0; < languagelist.length; ++i) { string spec = languagelist[i]; if (availablelanguages.contains(spec)) { languageselections.add(spec); } else if (spec.length() > 2) { string lang = spec.substring(0, 2); if (availablelanguages.contains(lang)) languageselections.add(lang); } } parent = getpreferencescreen(); (int = 0; < mavailablelanguages.size(); i++) { checkboxpreference pref = new checkboxpreference(this); locale locale = mavailablelanguages.get(i).locale; pref.settitle(mavailablelanguages.get(i).label + " [" + locale.tostring() + "]"); string fivecode = get5code(locale); string language = locale.getlanguage(); boolean checked = languageselections.contains(fivecode); pref.setchecked(checked); boolean has4row = arraycontains(kbd_4_row, fivecode) || arraycontains(kbd_4_row, language); boolean has5row = arraycontains(kbd_5_row, fivecode) || arraycontains(kbd_5_row, language); list<string> summaries = new arraylist<string>(3); if (has5row) summaries.add("5-row"); if (has4row) summaries.add("4-row"); // if (hasdictionary(locale)) { // summaries.add(getresources().getstring(r.string.has_dictionary)); // } if (!summaries.isempty()) { stringbuilder summary = new stringbuilder(); (int j = 0; j < summaries.size(); ++j) { if (j > 0) summary.append(", "); summary.append(summaries.get(j)); } pref.setsummary(summary.tostring()); } parent.addpreference(pref); } }

manifest (i had add together launcher app launch in debugger. commented out lines what's in release version):

<activity android:name="inputlanguageselection" > <intent-filter> <action android:name="android.intent.action.main" /> <!--<action android:name="com.assistek.util.keyboard.input_language_selection" /> --> <category android:name="android.intent.category.launcher" /> <!-- <category android:name="android.intent.category.default" /> --> </intent-filter> </activity>

i found code debugging custom keyboard, still unable debug: here debugging service think need somehow simulate keyboard input.

android keyboard preferences

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -