We recommend running our runtime Requirements Check first before launching the Gini Capture SDK to ensure the device is capable of taking pictures of adequate quality.
Simply run GiniBank.checkCaptureRequirements()
and inspect the returned RequirementsReport
for the result:
On Android 6.0 and later the camera permission is required before checking the requirements.
final RequirementsReport report = GiniBank.checkCaptureRequirements((Context) this); if (!report.isFulfilled()) { final StringBuilder stringBuilder = new StringBuilder(); report.getRequirementReports().forEach(requirementReport -> { if (!requirementReport.isFulfilled()) { stringBuilder.append(requirementReport.getRequirementId()); stringBuilder.append(": "); stringBuilder.append(requirementReport.getDetails()); stringBuilder.append("\n"); } }); Toast.makeText(this, "Requirements not fulfilled:\n" + stringBuilder, Toast.LENGTH_LONG).show(); }