A downloadable project

Download NowName your own price

AGInternet.js -- Internet Connectivity Check & Permission Gatekeeper for RPG Maker MZ & MV

The small plugin that every online feature secretly depends on. AGInternet checks whether the player is actually connected, feeds the result straight into a Switch, and -- more importantly -- owns the INTERNET permission that AdMob, Unity Ads, AppLovin, Smart Ads, Analytics, Crash Reporting, FCM, Remote Config, IAP, and Cloud Save all need to function on Android.

No Java. No Android Studio required. Works with AG APK Builder and manual Android Studio integration alike.


Why you need this even if you never call it directly

Almost every monetization or online plugin (ads, purchases, analytics, cloud save) needs the device's INTERNET permission declared in the Android manifest. Instead of every single plugin quietly injecting its own permission block and risking duplicates or conflicts, AG APK Builder centralizes it here:

  • Enable AGInternet once in the Builder's Plugins tab.
  • Any other online-dependent plugin you enable afterwards (AdMob, IAP, Unity Ads, etc.) will automatically detect it.
  • If you forget to enable it, the build simply fails with a clear error message telling you exactly which plugin to turn on -- instead of shipping an app that silently can't reach the internet.

What it does

Feature Included
Auto-check connectivity on game start
Manual re-check via Plugin Command ("Check Internet Now")
Result mirrored into a Switch automatically (ON = online)
Native ConnectivityManager check on Android (accurate, not just navigator.onLine)
Optional in-game message if the player is offline
Script Calls -- AGInternet.isOnline() / AGInternet.checkNow()
On-screen debug overlay (connection status, color-coded)
Console debug log, toggle on/off
Works in both MZ (Plugin Command GUI) and MV (text Plugin Command)
PC / Browser safe -- falls back to navigator.onLine, no errors in editor or browser preview

How other plugins use it

You never have to call AGInternet yourself unless you want a custom "No internet" message. Other Anaryx/AG plugins (AdMob, IAP, and future online plugins) check window.AGInternet internally before attempting any network call, so ads or purchases simply won't fire instead of crashing when the player is offline.

If you do want your own offline message, it's two lines:

Plugin Command: AGInternet -- Check Internet Now
Conditional Branch: Switch 5 is OFF
  Show Text: "No internet connection. Some features may not work."
Branch End

Setup -- AG APK Builder

  1. Place AGInternet_Full_EN.js into your game's js/plugins/ folder.
  2. Enable it in RPG Maker's Plugin Manager, above any plugin that needs internet (AdMob, AGPurchase, etc.).
  3. In AG APK Builder, go to Plugins and enable Internet / Connectivity. This also unlocks the toggle for any other online-dependent plugin.
  4. Set a Switch ID in the plugin parameters if you want to read connectivity status from events (leave 0 to skip).
  5. Build APK/AAB as usual -- the INTERNET permission is injected automatically.

Setup -- Android Studio (Manual)

  1. Add <uses-permission android:name="android.permission.INTERNET"/> to AndroidManifest.xml.
  2. Implement isNetworkAvailable() on your existing AGBridge object using ConnectivityManager, annotated with @JavascriptInterface.
  3. That's it -- the plugin auto-detects the native bridge and prefers it over navigator.onLine when available.

Quick Code Reference

Basic gate before showing an ad or opening a shop

Plugin Command: AGInternet -- Check Internet Now
Conditional Branch: Switch 5 is ON
  -- go ahead and show ad / open IAP shop
Else
  -- "You need an internet connection for this."
Branch End

Script call version

if (AGInternet.checkNow()) {
  // online
}

Compatibility

  • Engine: RPG Maker MZ and MV
  • Builder: AG APK Builder (recommended) or Android Studio manual integration
  • Platform: Android (APK/AAB); silently inert on PC and browser preview
  • Required by: AGAdMob, AGPurchase, and other online-dependent AG plugins

Terms of Use

  • Free to use in personal and commercial RPG Maker MZ/MV projects
  • Allowed to use in games distributed on Google Play Store
  • Do not redistribute or reupload the plugin file
  • Do not remove the author signature inside the plugin
  • Do not claim as your own or sell the plugin itself

Feedback, Bug Reports and Support

If you experience issues, encounter bugs, or have suggestions, leave a comment on this page or contact directly.

Contact: anaryxproject@gmail.com


AGInternet.js -- part of the Anaryx Plugin ecosystem.
The permission gatekeeper behind every online feature in AG APK Builder.
Every plugin carries an integrity signature -- do not remove or alter it.
anaryx-plugin.itch.io

Published 2 days ago
StatusReleased
CategoryOther
Authoranaryx-plugin

Download

Download NowName your own price

Click download now to get access to the following files:

AGInternet_Full_EN.js 6.9 kB

Leave a comment

Log in with itch.io to leave a comment.