PHP code example of nativephp / mobile-system

1. Go to this page and download the library: Download nativephp/mobile-system 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/ */

    

nativephp / mobile-system example snippets


use Native\Mobile\Facades\System;

// Platform detection
System::isIos();       // true on iOS
System::isAndroid();   // true on Android
System::isMobile();    // true on either platform

// Open app settings (useful when user denied permissions)
System::appSettings();

// Toggle the flashlight
System::flashlight();