Developer Access

Please enter the developer password to access the SDK

Frequently Asked Questions

General Questions

What is the myVibe SDK?

The myVibe SDK (Software Development Kit) is a set of tools and APIs that enable third-party developers to create micro-applications for the myVibe platform. These micro-applications run within the myVibe app environment on iOS and Android devices.

The SDK provides a secure and standardized way to interact with smart sex toys through the myVibe app, without requiring direct Bluetooth access or knowledge of the underlying hardware protocols.

What types of applications can I build with the SDK?

You can build a variety of micro-applications using the SDK, including:

  • Custom control interfaces for devices
  • Pattern creation and management tools
  • Interactive games that control device behavior
  • Media-synchronized experiences (e.g., synchronized with music or video)
  • Partner control applications for remote interaction
  • Therapeutic or wellness applications

The API provides control over vibration intensity, patterns, and other device features while maintaining user privacy and security.

Is the SDK free to use?

Yes, the myVibe SDK is free to use for development purposes. There are no licensing fees for creating applications.

However, if you plan to distribute your application through the myVibe platform, there may be a revenue-sharing model for paid applications. Free applications can be submitted at no cost.

For more details on the commercial aspects, please refer to our App Submission Guide.

What devices are supported by the SDK?

The SDK supports all devices that are compatible with the myVibe app. This includes a wide range of Bluetooth-enabled smart sex toys from various manufacturers.

The main advantage of the SDK is that you don't need to worry about specific device compatibility. The myVibe app handles the device-specific protocols, and your application communicates with the app rather than directly with the devices.

Device capabilities (such as multiple motors, pressure sensors, etc.) are exposed through the SDK's device information API, allowing you to adapt your application based on the connected device.

How do I submit my application to the myVibe platform?

The submission process involves the following steps:

  1. Create and test your application using the SDK
  2. Register as a developer on the myVibe Developer Portal
  3. Submit your application with the required metadata (name, description, icon, screenshots)
  4. Pass the review process, which checks for compliance with our guidelines
  5. Once approved, your app will be published to the myVibe app store

For detailed instructions, please see our App Submission Guide.

Technical Questions

What programming languages and technologies are used?

The myVibe SDK micro-applications are built using standard web technologies:

  • HTML/CSS - For building the user interface
  • JavaScript - For application logic and SDK integration

You can also use modern web frameworks like React, Vue, or Angular for building your application.

The applications run within an iframe inside the myVibe app's WebView, which means they are essentially web applications with a special bridge to communicate with the parent app and the connected devices.

How does communication with the device work?

The communication flow follows this path:

  1. Your micro-application calls SDK methods (e.g., setVibration())
  2. The SDK uses postMessage to communicate with the parent application
  3. The myVibe app processes the command and sends it to the device via Bluetooth
  4. Device responses and events flow back through the same channel

This architecture ensures security by not giving micro-applications direct access to Bluetooth APIs or device communication protocols.

The SDK handles all the complexity of device communication, allowing you to focus on creating a great user experience without worrying about Bluetooth protocols or device-specific details.

What are the performance considerations for pattern design?

When designing vibration patterns, consider these performance guidelines:

  • Minimum Step Duration: Use a minimum of 100ms for each step. Going below this may result in unpredictable behavior due to communication latency.
  • Pattern Complexity: While there's no hard limit on the number of steps, very complex patterns (over 100 steps) may consume more memory.
  • Transitions: For smooth intensity transitions, use smaller increments (e.g., changing intensity by 10% per step rather than jumping directly from 0% to 100%).
  • Battery Impact: Complex patterns with frequent high-intensity vibrations will drain the device battery faster.

The SDK optimizes pattern transmission to the device, but being mindful of these considerations will help ensure a better user experience.

Is there a size limit for micro-applications?

Yes, there are some size constraints to consider:

  • The total size of your application (HTML, CSS, JS, images) should be under 5MB.
  • Initial load time should be optimized - aim for under 3 seconds on a typical device.
  • Applications should be responsive and work well on various screen sizes, from phone to tablet.

Large assets should be optimized before inclusion. Consider using modern image formats like WebP for better compression, and minify your JavaScript and CSS files.

Can I use external libraries or APIs in my micro-application?

Yes, you can use external JavaScript libraries in your micro-application, with some limitations:

  • All external libraries must be included with your application submission or loaded from a CDN over HTTPS.
  • External API calls are permitted but must use HTTPS and comply with our privacy policy.
  • Libraries that attempt to access device features outside the SDK's scope (camera, microphone, etc.) may not function correctly in the application sandbox.

For optimal performance, only include the libraries you absolutely need and consider using lightweight alternatives.

Development Questions

How do I get started with development?

To start developing a micro-application, follow these steps:

  1. Set up your development environment: Any web development setup will work (VS Code, WebStorm, etc.)
  2. Include the SDK: Add the SDK script to your HTML file:
    <script src="https://app.myvibe.tech/sdk/myvibe-sdk.js"></script>
  3. Initialize the SDK:
    const myVibeApp = new MyVibeSDK.App({
        name: "Your App Name",
        version: "1.0.0",
        permissions: ["vibration", "patterns"]
    });
  4. Implement your application logic using the SDK APIs
  5. Test your application using the testing tools provided

Check out our example applications to see complete implementations. The documentation provides in-depth guides on all features.

How do I test my application without a physical device?

The SDK includes a device simulator that allows you to test your application without a physical device:

  1. Add ?simulator=true to your application URL when testing locally
  2. This activates a simulated device that responds to commands and generates events
  3. The simulator provides visual feedback for vibration intensity and pattern playback
  4. You can simulate device connection/disconnection and battery level changes
// Example of adding simulator parameter to URL
http://localhost:8080/my-app/?simulator=true

For final testing, we recommend using a real device to ensure compatibility.

Can I persist data between sessions?

Yes, you can store data between sessions using browser storage mechanisms:

  • localStorage: For storing persistent data like user preferences or saved patterns
  • sessionStorage: For temporary data that's cleared when the app is closed

Example of storing and retrieving a pattern:

// Save a pattern
const pattern = {
    name: "My Pattern",
    steps: [
        { intensity: 50, duration: 500 },
        { intensity: 0, duration: 300 }
    ],
    repeat: 3
};
localStorage.setItem('savedPattern', JSON.stringify(pattern));

// Retrieve the pattern
const savedPattern = JSON.parse(localStorage.getItem('savedPattern'));

Keep in mind that storage is limited to the usual browser constraints (typically 5-10MB) and is specific to your micro-application's domain.

How do I handle device disconnections?

Device disconnections are a normal part of the user experience. You should handle them gracefully:

  1. Register a disconnection callback:
myVibeApp.onDeviceDisconnected(device => {
    console.log(`Device ${device.name} disconnected`);
    updateUIForDisconnectedState();
});
  1. Update your UI to show the disconnected state
  2. Pause or stop any active patterns or operations
  3. Provide clear instructions for reconnecting

When the device reconnects, the onDeviceConnected callback will fire, allowing you to restore your application state.

How do I debug my application?

You can debug your micro-application using the following methods:

  • Local Development: Use your browser's developer tools when running locally.
  • SDK Debug Mode: Add ?debug=true to your URL to enable detailed SDK logging.
  • Console Forwarding: When testing within the myVibe app, logs are forwarded to our developer console:
// Enable debug mode
const myVibeApp = new MyVibeSDK.App({
    name: "Your App Name",
    version: "1.0.0",
    permissions: ["vibration", "patterns"],
    debug: true  // Enables detailed logging
});

The myVibe Developer Tools extension (available for Chrome and Firefox) provides additional debugging capabilities when testing your application in a desktop browser.

Integration Questions

How do micro-applications appear in the myVibe app?

Micro-applications are integrated into the myVibe app in the following ways:

  • They appear in the "Apps" section of the myVibe application
  • Each app has its own icon, name, and description
  • When launched, the app opens in a full-screen iframe within the main app
  • Users can install/uninstall apps from the app gallery

Your app submission package should include assets like icons and screenshots to ensure proper display in the app gallery.

Can my app run in the background?

Micro-applications run within the myVibe app environment and follow its lifecycle:

  • When a user switches to another micro-application, your app is paused
  • When the myVibe app goes to the background, all micro-applications are paused
  • Any active patterns will continue to run on the device until completed

Your app should handle pausing gracefully. Save any important state when the app's visibility changes, and be prepared to resume operation when the app becomes active again.

// Handle visibility changes
document.addEventListener('visibilitychange', () => {
    if (document.hidden) {
        // App is going to background, save state
        saveCurrentState();
    } else {
        // App is becoming visible again
        restoreState();
    }
});
How do permissions work?

Permissions in the myVibe SDK determine what features your app can access:

  • Permissions are declared when initializing the SDK
  • Users are informed about required permissions during installation
  • The SDK enforces permissions at runtime
// Request specific permissions
const myVibeApp = new MyVibeSDK.App({
    name: "Your App Name",
    permissions: ["vibration", "patterns", "storage"]
});

You can check if a specific permission is available using the hasPermission() method:

if (myVibeApp.hasPermission('patterns')) {
    // Show pattern controls
} else {
    // Hide pattern controls or show alternative UI
}

Always request only the permissions your app actually needs. This improves security and user trust.

Can multiple micro-applications control a device simultaneously?

No, only one micro-application can actively control a device at a time:

  • When a user switches to a different micro-application, control is transferred to the new app
  • The previous app's commands are stopped (including any running patterns)
  • This prevents conflicts and ensures a clear user experience

If your application needs to hand off control to another app, you should explicitly stop any active commands before redirecting the user.

// Clean up before redirecting to another app
myVibeApp.stopVibration();
// Now redirect
window.location.href = 'myvibe://open-app/another-app-id';
Can my app communicate with other micro-applications?

Direct communication between micro-applications is not supported for security reasons.

However, you have a few options for creating workflows that span multiple apps:

  • Use URL parameters to pass limited data when launching another app
  • Store data in localStorage with a shared key format that other apps can access (if they're from the same developer)
  • Use a backend service that both apps can connect to (requires the network permission)
// Example of launching another app with parameters
// (Only works for apps from the same developer)
window.location.href = 'myvibe://open-app/pattern-player?patternId=123';

Troubleshooting

My app can't connect to the device

If your app is having trouble connecting to the device, check the following:

  1. Make sure the device is already connected to the myVibe app before your micro-application launches. The SDK doesn't handle the initial device connection.
  2. Verify that you've requested the necessary permissions (at minimum, "basic" for connection events).
  3. Check your event listeners to ensure they're properly set up:
    myVibeApp.onDeviceConnected(device => {
        console.log('Connected:', device);
        // Your connection handling code
    });
  4. Try calling getDeviceInfo() to see if a device is already connected when your app initializes.

Remember that device connection is handled by the parent app. Your micro-application is notified of connection events but doesn't directly establish the connection.

Patterns are not working as expected

If your patterns aren't working correctly, consider these common issues:

  • Pattern Structure: Ensure your pattern object has the correct format:
    const pattern = {
        name: "My Pattern",
        steps: [
            { intensity: 50, duration: 500 },
            { intensity: 0, duration: 300 }
        ],
        repeat: 3
    };
  • Step Duration: Each step should have a duration of at least 100ms for reliable execution.
  • Permission Check: Verify that your app has the "patterns" permission.
  • Device Support: Some older devices might have limitations in pattern support. Check getDeviceInfo().features to see if pattern support is available.

For debugging, you can log the pattern execution:

myVibeApp.onPatternComplete(pattern => {
    console.log(`Pattern complete: ${pattern.name}`);
});
My app works locally but not in the myVibe app

If your app functions correctly during local testing but fails in the myVibe environment, check these common causes:

  1. Simulator Differences: The local simulator might be more forgiving than real devices. Always test with real hardware before submission.
  2. Path References: Ensure all resource paths (images, scripts, etc.) are relative and don't use absolute URLs.
  3. Origin Restrictions: The myVibe environment has stricter security policies. Avoid using techniques that might be blocked (like cross-origin requests without CORS).
  4. Console Access: Enable SDK debugging to see detailed error messages:
    const myVibeApp = new MyVibeSDK.App({
        name: "Your App Name",
        debug: true
    });

Always test your application in the myVibe testing environment before submission to catch integration issues early.

Battery level reporting is inconsistent

Battery level reporting can vary depending on the device model and firmware:

  • Not all devices report battery levels at the same frequency
  • Some devices only report when levels cross certain thresholds (e.g., 75%, 50%, 25%)
  • Battery reporting may be delayed during active vibration

Best practices for battery handling:

  1. Always check the initial battery level when a device connects
  2. Don't rely on continuous updates - updates might be infrequent
  3. Always handle the low battery event to warn users
// Initial battery check
const deviceInfo = myVibeApp.getDeviceInfo();
if (deviceInfo) {
    updateBatteryDisplay(deviceInfo.batteryLevel);
}

// Listen for low battery warnings
myVibeApp.onBatteryLow(level => {
    showLowBatteryWarning(level);
});
My app was rejected during submission

If your app was rejected during the submission process, check these common reasons:

  • Performance Issues: Apps must load quickly and operate smoothly
  • Privacy Concerns: Unwarranted data collection or external API calls without proper disclosures
  • Quality Standards: UI/UX issues, crashes, or poor design
  • Content Policy Violations: Content that violates our guidelines
  • Metadata Problems: Missing or inadequate descriptions, icons, or screenshots

The rejection notification should include specific feedback about the issues found. Address each point and resubmit your application.

Our App Submission Guide contains detailed information about requirements and best practices to help you avoid common rejection reasons.