nativephp/mobile-system

System-level operations for NativePHP Mobile

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:Kotlin

Type:nativephp-plugin

pkg:composer/nativephp/mobile-system

0.0.1 2026-01-03 03:40 UTC

This package is auto-updated.

Last update: 2026-01-03 04:14:35 UTC


README

System-level operations for NativePHP Mobile apps.

Overview

The System API provides access to system-level functionality like opening the app's settings page.

Installation

composer require nativephp/mobile-system

Usage

PHP (Livewire/Blade)

use Native\Mobile\Facades\System;

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

JavaScript (Vue/React/Inertia)

import { system } from '#nativephp';

// Open app settings
await system.openAppSettings();

Methods

openAppSettings(): array

Opens the app's settings screen in the device settings. This is useful when a user has denied a permission and you want to direct them to the settings to grant it.

Returns: { success: true }

Use Cases

Handling Denied Permissions

use Native\Mobile\Facades\Camera;
use Native\Mobile\Facades\System;

public function takePhoto()
{
    $result = Camera::getPhoto();

    if (isset($result['error']) && str_contains($result['error'], 'permission')) {
        // Permission denied, offer to open settings
        $this->showPermissionDialog = true;
    }
}

public function openSettings()
{
    System::openAppSettings();
}

License

MIT