Getting Started

Create a phone app in a separate FiveM resource using the 919PHONE SDK.

Requirements

  • amzn_smartphone installed and started first
  • ox_lib (for the template server callbacks)
  • App UI files listed in your resource files {} block

Quick start

  1. Clone or download amzn_smartphone_app_template into your resources folder.
  2. Add ensure amzn_smartphone then ensure amzn_smartphone_app_template to your server config.
  3. Restart the server.
  4. Open the phone, go to App Store, install Template App.

Register the app

From your resource client script:

exports['amzn_smartphone']:registerApp({
    id          = 'myapp',
    label       = 'My App',
    icon        = 'fa-star',
    color       = 'linear-gradient(135deg, #0a84ff 0%, #005ecb 100%)',
    category    = 'appstore', -- or 'default' if allowed in Config.AllowedDefaultApps
    ui          = 'web/index.html',
    description = 'What your app does.',
    version     = '1.0.0',
    developer   = 'Your Name',
})

Unregister when your resource stops:

exports['amzn_smartphone']:unregisterApp('myapp')

Build the UI

Your HTML runs inside an iframe hosted by the phone. The phone injects 919phone-sdk.js automatically - do not bundle it yourself.

const data = await fetchNui('getData', { id: 1 })

onNuiEvent('refresh', (payload) => {
    console.log('Live update', payload)
})

onSettingsChange((settings) => {
    document.documentElement.dataset.theme = settings.theme
})

Style with html[data-theme="dark"] and html[data-theme="light"].

Handle NUI callbacks

Use standard FiveM RegisterNUICallback in your resource client script:

RegisterNUICallback('getData', function(data, cb)
    local result = lib.callback.await('myapp:server:getData', false, data)
    cb(result)
end)

fetchNui('getData', ...) routes through the phone proxy to the resource that registered the app while the app is open.

Push messages to the UI

From client:

exports['amzn_smartphone']:sendAppMessage('myapp', 'refresh', { updated = true })

From server:

exports['amzn_smartphone']:sendAppMessage(source, 'myapp', 'refresh', { updated = true })

Messages can only be sent by the resource that registered the app.

Listen in your UI with onNuiEvent('refresh', handler).

exports['amzn_smartphone']:notify(source, {
    appId = 'myapp',
    app = 'My App',
    title = 'Update ready',
    body = 'Tap to open.',
    route = { tab = 'inbox' },
})

When the player taps the notification, the phone opens your app and delivers the route via onNuiEvent('route', ...).

Next steps

919DESIGN 919DESIGN

© 2026 919DESIGN. Premium FiveM Server Management Resources.

This website and its checkout process is owned & operated by Tebex Limited, who handle product fulfilment, billing support and refunds.