PHP code example of blutrixx / nativephp-device-utils
1. Go to this page and download the library: Download blutrixx/nativephp-device-utils library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
blutrixx / nativephp-device-utils example snippets
use Blutrixx\DeviceUtils\Facades\DeviceUtils;
DeviceUtils::getInsets();
DeviceUtils::pickFile('application/pdf');
DeviceUtils::copyToStorage($uri, 'invoice.pdf', 'documents');
DeviceUtils::requestPermissions(['android.permission.CAMERA'], id: $requestId);
use Blutrixx\DeviceUtils\Facades\SmartCamera;
SmartCamera::open(mode: 'scan'); // barcode/QR scanning
SmartCamera::open(mode: 'photo', quality: 'medium');
SmartCamera::close();