Frequently Asked Questions
General Questions
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.
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.
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.
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.
The submission process involves the following steps:
- Create and test your application using the SDK
- Register as a developer on the myVibe Developer Portal
- Submit your application with the required metadata (name, description, icon, screenshots)
- Pass the review process, which checks for compliance with our guidelines
- Once approved, your app will be published to the myVibe app store
For detailed instructions, please see our App Submission Guide.
Technical Questions
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.
The communication flow follows this path:
- Your micro-application calls SDK methods (e.g.,
setVibration()
) - The SDK uses
postMessage
to communicate with the parent application - The myVibe app processes the command and sends it to the device via Bluetooth
- 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.
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.
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.
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
To start developing a micro-application, follow these steps:
- Set up your development environment: Any web development setup will work (VS Code, WebStorm, etc.)
- Include the SDK: Add the SDK script to your HTML file:
<script src="https://app.myvibe.tech/sdk/myvibe-sdk.js"></script>
- Initialize the SDK:
const myVibeApp = new MyVibeSDK.App({ name: "Your App Name", version: "1.0.0", permissions: ["vibration", "patterns"] });
- Implement your application logic using the SDK APIs
- 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.
The SDK includes a device simulator that allows you to test your application without a physical device:
- Add
?simulator=true
to your application URL when testing locally - This activates a simulated device that responds to commands and generates events
- The simulator provides visual feedback for vibration intensity and pattern playback
- 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.
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.
Device disconnections are a normal part of the user experience. You should handle them gracefully:
- Register a disconnection callback:
myVibeApp.onDeviceDisconnected(device => {
console.log(`Device ${device.name} disconnected`);
updateUIForDisconnectedState();
});
- Update your UI to show the disconnected state
- Pause or stop any active patterns or operations
- Provide clear instructions for reconnecting
When the device reconnects, the onDeviceConnected
callback will fire, allowing you to restore your application state.
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
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.
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();
}
});
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.
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';
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
If your app is having trouble connecting to the device, check the following:
- 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.
- Verify that you've requested the necessary permissions (at minimum, "basic" for connection events).
- Check your event listeners to ensure they're properly set up:
myVibeApp.onDeviceConnected(device => { console.log('Connected:', device); // Your connection handling code });
- 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.
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}`);
});
If your app functions correctly during local testing but fails in the myVibe environment, check these common causes:
- Simulator Differences: The local simulator might be more forgiving than real devices. Always test with real hardware before submission.
- Path References: Ensure all resource paths (images, scripts, etc.) are relative and don't use absolute URLs.
- Origin Restrictions: The myVibe environment has stricter security policies. Avoid using techniques that might be blocked (like cross-origin requests without CORS).
- 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 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:
- Always check the initial battery level when a device connects
- Don't rely on continuous updates - updates might be infrequent
- 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);
});
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.