PHPackages                             nativephp/mobile-network - 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. nativephp/mobile-network

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

nativephp/mobile-network
========================

Network connectivity status plugin for NativePHP Mobile

1.0.1(3mo ago)56.9k↑245.8%3MITKotlinPHP ^8.2

Since Jan 19Pushed 3mo agoCompare

[ Source](https://github.com/NativePHP/mobile-network)[ Packagist](https://packagist.org/packages/nativephp/mobile-network)[ RSS](/packages/nativephp-mobile-network/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (2)Dependencies (2)Versions (3)Used By (0)

Network Plugin for NativePHP Mobile
===================================

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

Network connectivity status monitoring for NativePHP Mobile applications.

Overview
--------

[](#overview)

The Network API provides cross-platform network connectivity status detection, including connection type and metered status.

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

[](#installation)

```
composer require nativephp/mobile-network
```

Usage
-----

[](#usage)

### PHP (Livewire/Blade)

[](#php-livewireblade)

```
use Native\Mobile\Facades\Network;

// Get current network status
$status = Network::status();

if ($status->connected) {
    echo "Connected via: " . $status->type;

    if ($status->isExpensive) {
        echo " (metered connection)";
    }
} else {
    echo "No network connection";
}
```

### JavaScript (Vue/React/Inertia)

[](#javascript-vuereactinertia)

```
import { Network } from '#nativephp';

// Get current network status
const status = await Network.status();

if (status.connected) {
    console.log(`Connected via: ${status.type}`);

    if (status.isExpensive) {
        console.log('Warning: metered connection');
    }
} else {
    console.log('No network connection');
}
```

Response Object
---------------

[](#response-object)

The `status()` method returns an object with the following properties:

PropertyTypeDescription`connected`booleanWhether device has network connectivity`type`stringConnection type: `wifi`, `cellular`, `ethernet`, or `unknown``isExpensive`booleanWhether connection is metered (e.g., cellular data)`isConstrained`booleanWhether Low Data Mode is enabled (iOS only)Examples
--------

[](#examples)

### Conditional Data Sync

[](#conditional-data-sync)

```
use Native\Mobile\Facades\Network;

public function syncData()
{
    $status = Network::status();

    if (!$status->connected) {
        // Handle no connection
        return;
    }

    if ($status->isExpensive) {
        // On cellular - sync only essential data
        $this->syncEssentialData();
    } else {
        // On WiFi - full sync
        $this->syncAllData();
    }
}
```

### JavaScript Connection Check

[](#javascript-connection-check)

```
import { Network } from '#nativephp';

async function checkBeforeDownload() {
    const status = await Network.status();

    if (!status.connected) {
        console.log('No internet connection');
        return false;
    }

    if (status.isExpensive && status.type === 'cellular') {
        console.log('On cellular data - consider warning user');
        return false;
    }

    return true;
}
```

Platform Behavior
-----------------

[](#platform-behavior)

### Android

[](#android)

- Uses `ConnectivityManager` and `NetworkCapabilities`
- `isConstrained` is always `false` (not applicable)
- Requires `ACCESS_NETWORK_STATE` permission (added automatically)

### iOS

[](#ios)

- Uses `NWPathMonitor` from Network framework
- `isConstrained` reflects Low Data Mode setting
- No special permissions required

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance80

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70% 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 ~59 days

Total

2

Last Release

105d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9ab43d3432a80f0f41fe7015280f6024ff13fe8c2306cf114a1fbc91a4cd6f35?d=identicon)[simonhamp](/maintainers/simonhamp)

![](https://www.gravatar.com/avatar/16cc4d562d3f6f302901f1c65eb3ce819c0fb24ab2616241c605126102812ca4?d=identicon)[shanerbaner82](/maintainers/shanerbaner82)

---

Top Contributors

[![shanerbaner82](https://avatars.githubusercontent.com/u/5580860?v=4)](https://github.com/shanerbaner82 "shanerbaner82 (7 commits)")[![simonhamp](https://avatars.githubusercontent.com/u/31628?v=4)](https://github.com/simonhamp "simonhamp (3 commits)")

---

Tags

nativephpnativephp-mobilenativephp-plugin

### Embed Badge

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

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

PHPackages © 2026

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