Skip to content

Network access

Web plugins request services through standard APIs such as fetch. GMP provides no direct networking API.

Connect your own service#

  1. Declare network in the Web manifest only when needed.
  2. Use HTTPS services and restrict allowed origins in the frontend deployment policy.
  3. Configure server-side CORS correctly. Opening a website in a page does not mean fetch can read its content across origins.
  4. Support request cancellation and timeouts. End tasks when the application stops or enters a state unsuitable for the request.

Separate network and hardware paths#

The phone page requests business-service data, then sends it to the glasses through display APIs or declared plugin messages. Do not treat a server address as a GMP hardware API or use Studio's installation IP as your business API.

Business networking and glasses controlThe Web page fetches its own business-service data over HTTPS, then sends display or business messages through PhoneSDK and App Bridge to the glasses over Bluetooth. Studio's installation address is only for plugin downloads.MEMOMIND / NETWORK PATHSBusiness networking and glasses controlBusiness data · Phone networkMobile Web PageDeclare networkSend a fetch requestHTTPS / CORSSet cancellation andtimeoutUse server-allowedoriginsYour businessserviceAccounts, networking, and AI servicesReturn business dataGlasses operations · App and BluetoothWeb processesreturned dataChoose a display APIOr a declaredmessage channelPhoneSDK → AppValidatecapabilities andpermissionsSend via BluetoothExecute on glassesStandard bridge orcustom GMPUpdate display /return resultStudio's LAN IP is an installation-service address. GMP Host APIs are not arbitrarynetwork-request APIs.
Business networking and glasses controlThe Web page fetches its own business-service data over HTTPS, then sends display or business messages through PhoneSDK and App Bridge to the glasses over Bluetooth. Studio's installation address is only for plugin downloads.MEMOMIND / NETWORK PATHSBusiness networking andglasses controlBusiness data · PhonenetworkMobile Web PageDeclare networkSend a fetch requestHTTPS / CORSSet cancellation andtimeoutUse server-allowed originsYour business serviceAccounts, networking, andAI servicesReturn business dataGlasses operations · Appand BluetoothWeb processes returneddataChoose a display APIOr a declared messagechannelPhoneSDK → AppValidate capabilities andpermissionsSend via BluetoothExecute on glassesStandard bridge or customGMPUpdate display / returnresultStudio's LAN IP is aninstallation-service address. GMPHost APIs are not arbitrarynetwork-request APIs.
Network services provide business data; the App–glasses link handles device operations.
< / >
Your HTTPS service ⇄ Web plugin (fetch)
                          │ PhoneSDK Bridge
                          ▼
                     App → Bluetooth → Glasses

Troubleshooting failed requests#

  • Confirm that the phone can reach the service and that the domain and certificate are correct.
  • Confirm that the current package declares network, the App has authorized it, and the page's CSP allows the origin.
  • Check server CORS responses, timeouts, and business status codes.
  • Studio networking and the App's native-container restrictions differ. Test again on the target phone.

Connect your cloud service or AI capability#

The current PhoneSDK has no general-purpose large-model, transcription, or recognition service API. Implement these features by having the Web plugin call your own service, then send results to the glasses through public display or messaging APIs.

  • Keep long-lived service keys on the server. GMP, Web JavaScript, and manifests are unsuitable for storing these credentials.
  • Keep a task ID for each long-running task, with cancellation, timeout, and status-query support. After the phone page is recreated, recover from server-side results.
  • Provide clear feedback for empty results, service unavailability, and uncertain results. Do not leave the glasses showing “Processing” indefinitely.
  • Before sending text, files, or audio to an external service, explain the purpose and destination. Send only the data needed for the current feature.

Reference files in the toolkit#

  • PhoneSDK/examples/permission-debug/plugin.js
  • PhoneSDK/packages/bridge-contract/src/permission-policy.js