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.2(1mo ago)8485↑37.5%2MITPHPPHP ^8.2CI failing

Since Feb 18Pushed 2w 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 2d ago

READMEChangelog (3)Dependencies (15)Versions (5)Used By (0)

Screen for NativePHP Mobile
===========================

[](#screen-for-nativephp-mobile)

### Keep screens awake. Control brightness. Built for apps users stare at.

[](#keep-screens-awake-control-brightness-built-for-apps-users-stare-at)

 [ ![Laravel Version Compatibility](https://camo.githubusercontent.com/ca70718573acaa5560bbc21b77fdbac34c73db54e5d97ae7ca2c9b0e384ee966/68747470733a2f2f62616467652e6c61726176656c2e636c6f75642f62616467652f73727769657a2f6e61746976657068702d6d6f62696c652d73637265656e3f7374796c653d666c6174) ](https://packagist.org/packages/srwiez/nativephp-mobile-screen)

 [![Screen plugin on iOS](https://raw.githubusercontent.com/SRWieZ/nativephp-mobile-packages/main/art/screenshots/screen-ios.png)](https://raw.githubusercontent.com/SRWieZ/nativephp-mobile-packages/main/art/screenshots/screen-ios.png) [![Screen plugin on Android](https://raw.githubusercontent.com/SRWieZ/nativephp-mobile-packages/main/art/screenshots/screen-android.png)](https://raw.githubusercontent.com/SRWieZ/nativephp-mobile-packages/main/art/screenshots/screen-android.png)

A tiny, focused NativePHP plugin for two things mobile devs constantly need: keeping the screen on and controlling brightness. One facade, six methods, zero setup.

Why this plugin?
----------------

[](#why-this-plugin)

- **☀️ Keep the screen awake** — perfect for barcode tickets, live dashboards, kiosks and scoring apps.
- **🔆 Control brightness** — crank to 100% to scan barcodes in sunlight, dim down for dark reading rooms.
- **🪶 Dependency-free** — a single wake-lock + brightness wrapper. No bloat, no configuration.
- **📱 Works everywhere** — iOS 13+ and Android 5+ (API 21).

Features at a glance
--------------------

[](#features-at-a-glance)

FeatureAndroidiOSKeep screen awake✅✅Set brightness (0.0–1.0)✅✅Reset to system default✅✅Perfect for
-----------

[](#perfect-for)

Ticket &amp; boarding-pass apps · Barcode / QR scanners · Kiosk &amp; POS apps · Sports scoreboards · Live dashboards &amp; monitoring · E-readers

---

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\Screen;

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

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

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

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

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

// Reset to system default
Screen::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.0More NativePHP Mobile plugins
-----------------------------

[](#more-nativephp-mobile-plugins)

Building a mobile app with NativePHP? Check out the rest of the suite:

- **[Calendar](https://nativephp.com/plugins/srwiez/nativephp-mobile-calendar)** — Native calendars &amp; events from PHP, on both platforms.
- **[Contacts](https://nativephp.com/plugins/srwiez/nativephp-mobile-contacts)** — Read, create &amp; sync the device address book straight from Laravel.
- **[Screenshots](https://nativephp.com/plugins/srwiez/nativephp-mobile-screenshots)** — Lock down sensitive screens, catch capture attempts, respond instantly.

Support
-------

[](#support)

Bugs, questions, and feature requests should be reported at [github.com/SRWieZ/nativephp-mobile-screen/issues](https://github.com/SRWieZ/nativephp-mobile-screen/issues).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance94

Actively maintained with recent releases

Popularity24

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.7% 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

Every ~48 days

Total

3

Last Release

39d 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 (18 commits)")[![PovilasKorop](https://avatars.githubusercontent.com/u/1510147?v=4)](https://github.com/PovilasKorop "PovilasKorop (1 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)[illuminate/redis

The Illuminate Redis package.

8314.6M375](/packages/illuminate-redis)[illuminate/cookie

The Illuminate Cookie package.

244.6M136](/packages/illuminate-cookie)

PHPackages © 2026

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