Location Permission

Allow the app to access device location services

When enabled, the app will request permission to access the user's location

JavaScript Example:

// Get current location using AppBridge
AppBridge.getLocation()
    .then(result => {
        console.log(\`Location: \${result.latitude}, \${result.longitude}\`);
        console.log(\`Accuracy: \${result.accuracy}m\`);
    })
    .catch(err => {
        console.error('Location error:', err.message);
    });

ℹ️ Uses AppBridge.getLocation() which returns a Promise with latitude, longitude, accuracy, altitude, speed, and bearing.

Camera Permission

Allow the app to access device camera

When enabled, the app will request permission to access the device camera

JavaScript Example:

// Take a photo using AppBridge
AppBridge.takePhoto()
    .then(result => {
        const img = document.createElement('img');
        img.src = 'data:image/jpeg;base64,' + result.data;
        document.body.appendChild(img);
    })
    .catch(err => {
        console.error('Camera error:', err.message);
    });

ℹ️ Uses AppBridge.takePhoto() which returns a Promise with base64-encoded image data.

Storage Permission

Allow the app to read and write files on device storage

When enabled, the app will request permission to access photos, videos, and files

JavaScript Example:

// Pick image from gallery using AppBridge
AppBridge.pickImage()
    .then(result => {
        const img = document.createElement('img');
        img.src = 'data:image/jpeg;base64,' + result.data;
        document.body.appendChild(img);
    })
    .catch(err => {
        console.error('Gallery error:', err.message);
    });

ℹ️ Uses AppBridge.pickImage() which opens the gallery picker and returns base64-encoded image data.

Microphone Permission

Allow the app to record audio using the device microphone

When enabled, the app will request permission to record audio

JavaScript Example:

// Record audio using WebRTC
navigator.mediaDevices.getUserMedia({ audio: true })
    .then(stream => {
        const recorder = new MediaRecorder(stream);
        recorder.ondataavailable = (e) => {
            console.log('Audio data:', e.data);
        };
        recorder.start();
        setTimeout(() => recorder.stop(), 5000); // Stop after 5s
    })
    .catch(err => console.error('Microphone error:', err));

ℹ️ Uses standard getUserMedia() API. Works automatically when permission is enabled.

Contacts Permission

Allow the app to access device contacts

When enabled, the app will request permission to read contact information

JavaScript Example:

// Get all contacts using AppBridge
AppBridge.getContacts()
    .then(result => {
        result.contacts.forEach(contact => {
            console.log(\`\${contact.name}: \${contact.phone}\`);
        });
    })
    .catch(err => {
        console.error('Contacts error:', err.message);
    });

ℹ️ Uses AppBridge.getContacts() which returns a Promise with an array of contact objects.

Vibrate Permission

Allow the app to control device vibration

When enabled, the app will be able to trigger device vibration for haptic feedback

JavaScript Example:

// Vibrate device using AppBridge
AppBridge.vibrate(200); // Vibrate for 200ms

// Show a toast notification
AppBridge.toast('Vibration triggered!');

ℹ️ Uses AppBridge.vibrate(ms) for haptic feedback. Duration is in milliseconds.