PHPackages                             srwiez/nativephp-mobile-screen - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. srwiez/nativephp-mobile-screen

ActiveNativephp-plugin[Utility &amp; Helpers](/categories/utility)

srwiez/nativephp-mobile-screen
==============================

Screen wake lock and brightness control for NativePHP Mobile apps

v1.0.0(2mo ago)7149↓37.5%1[1 PRs](https://github.com/SRWieZ/nativephp-mobile-screen/pulls)MITPHPPHP ^8.2

Since Feb 18Pushed 2mo agoCompare

[ Source](https://github.com/SRWieZ/nativephp-mobile-screen)[ Packagist](https://packagist.org/packages/srwiez/nativephp-mobile-screen)[ RSS](/packages/srwiez-nativephp-mobile-screen/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

MobileScreen Plugin for NativePHP Mobile
========================================

[](#mobilescreen-plugin-for-nativephp-mobile)

A NativePHP plugin for screen wake lock and brightness control.

Perfect for:

- Ticketing apps displaying barcodes
- Scoring apps showing live progress
- Any app that needs to keep the screen visible

Features
--------

[](#features)

- **Keep Screen Awake** - Prevent the device from sleeping
- **Brightness Control** - Set screen brightness programmatically

Installation
------------

[](#installation)

```
# Install the package
composer require srwiez/nativephp-mobile-screen

# Publish the plugins provider (first time only)
php artisan vendor:publish --tag=nativephp-plugins-provider

# Register the plugin
php artisan native:plugin:register srwiez/nativephp-mobile-screen

# Verify registration
php artisan native:plugin:list
```

This adds `\SRWieZ\NativePHP\Mobile\Screen\MobileScreenServiceProvider::class` to your `plugins()` array.

Usage
-----

[](#usage)

### PHP (Livewire/Blade)

[](#php-livewireblade)

```
use SRWieZ\NativePHP\Mobile\Screen\Facades\MobileScreen;

// Keep screen awake
MobileScreen::keepAwake(); // true if wake lock enabled

// Allow screen to sleep
MobileScreen::allowSleep(); // true if wake lock disabled

// Check wake lock status
$isAwake = MobileScreen::isAwake(); // bool

// Set brightness (0.0 to 1.0)
$level = MobileScreen::setBrightness(1.0); // returns actual level, or false on failure

// Get current brightness
$level = MobileScreen::getBrightness(); // float or null

// Reset to system default
MobileScreen::resetBrightness(); // returns level or false on failure
```

### JavaScript (Vue/React/Inertia)

[](#javascript-vuereactinertia)

```
import { mobileScreen } from '@srwiez/nativephp-mobile-screen';

// Keep screen awake
await mobileScreen.keepAwake();

// Set maximum brightness
await mobileScreen.setBrightness(1.0);

// Reset when done
await mobileScreen.resetBrightness();
await mobileScreen.allowSleep();
```

API Reference
-------------

[](#api-reference)

MethodReturnsDescription`keepAwake(bool $enabled = true)``bool`Enable/disable screen wake lock`allowSleep()``bool`Alias for `keepAwake(false)``isAwake()``bool`Check if wake lock is active`setBrightness(float $level)``bool|float`Set brightness (0.0-1.0). Returns actual level or `false` on failure`getBrightness()``?float`Get current brightness level`resetBrightness()``bool|float`Reset to system default. Returns level or `false` on failureVersion Support
---------------

[](#version-support)

PlatformMinimum VersionAndroid5.0 (API 21)iOS13.0Support
-------

[](#support)

For questions or issues, email .

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance83

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

89d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/735894a4f6e39aa85e3d136abc9cf0be92da593d88731382384185293cbfe965?d=identicon)[SRWieZ](/maintainers/SRWieZ)

---

Top Contributors

[![SRWieZ](https://avatars.githubusercontent.com/u/1408020?v=4)](https://github.com/SRWieZ "SRWieZ (10 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/srwiez-nativephp-mobile-screen/health.svg)

```
[![Health](https://phpackages.com/badges/srwiez-nativephp-mobile-screen/health.svg)](https://phpackages.com/packages/srwiez-nativephp-mobile-screen)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9346.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[illuminate/cookie

The Illuminate Cookie package.

224.3M122](/packages/illuminate-cookie)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
