Esempio n. 1
0
 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent intent) {
   super.onActivityResult(requestCode, resultCode, intent);
   IntentResult scanResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
   if (scanResult != null) {
     ((FormEditText) builder.getDialog().findViewById(R.id.device_code_input))
         .setText(scanResult.getContents());
   }
 }
Esempio n. 2
0
 @Override
 @SuppressWarnings("deprecation")
 protected Dialog onCreateDialog(int id) {
   switch (id) {
     case ActivateDeviceDialogBuilder.DIALOG_ID:
       builder = new ActivateDeviceDialogBuilder(this);
       return builder.getDialog();
     case ModifyDeviceDialogBuilder.DIALOG_ID:
       return new ModifyDeviceDialogBuilder(this).getDialog();
     case DeleteDeviceDialogBuilder.DIALOG_ID:
       return new DeleteDeviceDialogBuilder(this).getDialog();
   }
   return super.onCreateDialog(id);
 }