mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-26 17:53:14 +00:00
ログ追加
This commit is contained in:
parent
06a0e53639
commit
0946fa80f1
|
@ -10,6 +10,7 @@ import androidx.activity.result.contract.ActivityResultContracts;
|
||||||
import androidx.fragment.app.Fragment;
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
import android.provider.MediaStore;
|
import android.provider.MediaStore;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
|
@ -65,10 +66,15 @@ public class ScannerDataManagerStubFragment extends Fragment {
|
||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
|
|
||||||
view.findViewById(R.id.button_call_camera).setOnClickListener(v -> {
|
view.findViewById(R.id.button_call_camera).setOnClickListener(v -> {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "button_call_camera clicked");
|
||||||
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
|
||||||
if (takePictureIntent.resolveActivity(requireActivity().getPackageManager()) != null) {
|
if (takePictureIntent.resolveActivity(requireActivity().getPackageManager()) != null) {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "camera available");
|
||||||
cameraLauncher.launch(takePictureIntent);
|
cameraLauncher.launch(takePictureIntent);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Log.d("ScannerDataManagerStubFragment", "camera not available");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user