e-code nl-1 ol-1">
}
}
- private void startAndBindPrintService() {
- Intent intent = new Intent(App.getAppContext(), GpPrintService.class);
- App.getAppContext().startService(intent);
- conn = new PrinterServiceConnection();
- App.getAppContext().bindService(intent, conn, Context.BIND_AUTO_CREATE);
- }
// changes the title when discovery is finished
private final BroadcastReceiver mFindBlueToothReceiver = new BroadcastReceiver() {
@@ -264,12 +199,11 @@ public class PrinterSettingPresenter implements PrinterSettingContract.Presenter
public void onReceive(Context context, Intent intent) {
if (GpCom.ACTION_CONNECT_STATUS.equals(intent.getAction())) {
int type = intent.getIntExtra(GpPrintService.CONNECT_STATUS, 0);
- int id = intent.getIntExtra(GpPrintService.PRINTER_ID, 0);
Log.d(TAG, "connect status " + type);
if (type == GpDevice.STATE_CONNECTING) {
view.onPrinterStatusFetched(context.getString(R.string.connecting));
} else if (type == GpDevice.STATE_NONE) {
-
+ view.onPrinterStatusFetched(context.getString(R.string.connecting));
} else if (type == GpDevice.STATE_VALID_PRINTER) {
view.onPrinterStatusFetched(context.getString(R.string.printer_is_connected));
} else if (type == GpDevice.STATE_INVALID_PRINTER) {