List of usage examples for android.app Application getString
@NonNull public final String getString(@StringRes int resId)
From source file:com.codebutler.farebot.transit.SuicaTransitData.java
/** * ????/*from w w w .j a va 2 s. c o m*/ * <pre>http:// sourceforge.jp/projects/felicalib/wiki/suica???????</pre> * @param cType * @return String ???? */ private static String getConsoleTypeName(int cType) { Application app = FareBotApplication.getInstance(); switch (cType & 0xff) { case 0x03: return app.getString(R.string.felica_terminal_fare_adjustment); case 0x04: return app.getString(R.string.felica_terminal_portable); case 0x05: return app.getString(R.string.felica_terminal_vehicle); // bus case 0x07: return app.getString(R.string.felica_terminal_ticket); case 0x08: return app.getString(R.string.felica_terminal_ticket); case 0x09: return app.getString(R.string.felica_terminal_deposit_quick_charge); case 0x12: return app.getString(R.string.felica_terminal_tvm_tokyo_monorail); case 0x13: return app.getString(R.string.felica_terminal_tvm_etc); case 0x14: return app.getString(R.string.felica_terminal_tvm_etc); case 0x15: return app.getString(R.string.felica_terminal_tvm_etc); case 0x16: return app.getString(R.string.felica_terminal_ticket_gate); case 0x17: return app.getString(R.string.felica_terminal_simple_ticket_gate); case 0x18: return app.getString(R.string.felica_terminal_booth); case 0x19: return app.getString(R.string.felica_terminal_booth_green); case 0x1a: return app.getString(R.string.felica_terminal_ticket_gate_terminal); case 0x1b: return app.getString(R.string.felica_terminal_mobile_phone); case 0x1c: return app.getString(R.string.felica_terminal_connection_adjustment); case 0x1d: return app.getString(R.string.felica_terminal_transfer_adjustment); case 0x1f: return app.getString(R.string.felica_terminal_simple_deposit); case 0x46: return "VIEW ALTTE"; case 0x48: return "VIEW ALTTE"; case 0xc7: return app.getString(R.string.felica_terminal_pos); // sales case 0xc8: return app.getString(R.string.felica_terminal_vending); // sales default: return String.format("Console 0x%s", Integer.toHexString(cType)); } }
From source file:com.codebutler.farebot.transit.SuicaTransitData.java
/** * ?????/* ww w. j a va 2 s. com*/ * <pre>http:// sourceforge.jp/projects/felicalib/wiki/suica???????</pre> * @param proc ? * @return String ????? */ private static String getProcessTypeName(int proc) { Application app = FareBotApplication.getInstance(); switch (proc & 0xff) { case 0x01: return app.getString(R.string.felica_process_fare_exit_gate); case 0x02: return app.getString(R.string.felica_process_charge); case 0x03: return app.getString(R.string.felica_process_purchase_magnetic); case 0x04: return app.getString(R.string.felica_process_fare_adjustment); case 0x05: return app.getString(R.string.felica_process_admission_payment); case 0x06: return app.getString(R.string.felica_process_booth_exit); case 0x07: return app.getString(R.string.felica_process_issue_new); case 0x08: return app.getString(R.string.felica_process_booth_deduction); case 0x0d: return app.getString(R.string.felica_process_bus_pitapa); // Bus case 0x0f: return app.getString(R.string.felica_process_bus_iruca); // Bus case 0x11: return app.getString(R.string.felica_process_reissue); case 0x13: return app.getString(R.string.felica_process_payment_shinkansen); case 0x14: return app.getString(R.string.felica_process_entry_a_autocharge); case 0x15: return app.getString(R.string.felica_process_exit_a_autocharge); case 0x1f: return app.getString(R.string.felica_process_deposit_bus); // Bus case 0x23: return app.getString(R.string.felica_process_purchase_special_ticket); // Bus case 0x46: return app.getString(R.string.felica_process_merchandise_purchase); // Sales case 0x48: return app.getString(R.string.felica_process_bonus_charge); case 0x49: return app.getString(R.string.felica_process_register_deposit); // Sales case 0x4a: return app.getString(R.string.felica_process_merchandise_cancel); // Sales case 0x4b: return app.getString(R.string.felica_process_merchandise_admission); // Sales case 0xc6: return app.getString(R.string.felica_process_merchandise_purchase_cash); // Sales case 0xcb: return app.getString(R.string.felica_process_merchandise_admission_cash); // Sales case 0x84: return app.getString(R.string.felica_process_payment_thirdparty); case 0x85: return app.getString(R.string.felica_process_admission_thirdparty); default: return String.format("Process0x%s", Integer.toHexString(proc)); } }