Generic Windows Integration Guide

Generic Windows Integration Guide

This guide provides instructions for integrating the Fleetshare SDK into any Windows application, regardless of the programming language used.

Overview

The Generic Windows Integration method allows you to incorporate the Fleetshare SDK into your Windows application using a provided executable file. This approach is versatile and can be implemented in any programming language that supports running subprocesses.

Prerequisites

Before you begin, ensure you have:

  1. Successfully applied and been accepted into the Fleetshare SDK program.
  2. Received your API key from the EarnFM dashboard.
  3. Obtained the earnfm_sdk.exe file from the Fleetshare team.

Integration Steps

  1. Obtain the SDK Executable

    • The Fleetshare team will provide you with earnfm_sdk.exe after your application to the SDK program is approved.
    • This executable is signed with our extended validation certificate for security.
  2. Include the Executable in Your Application

    • Place the earnfm_sdk.exe file in an appropriate directory within your application’s file structure.
  3. User Consent

    • Before running the SDK, ensure you have obtained user consent for sharing their data.
  4. Execute the SDK

    • Run the SDK executable as a subprocess within your application.

    • Use the following command format:

      earnfm_sdk.exe <your_api_key>
    • Replace <your_api_key> with the API key provided by EarnFM.

  5. Subprocess Management

    • Implement appropriate subprocess management in your application to start, monitor, and stop the SDK executable as needed.

Example Implementation

Best Practices

  1. Error Handling: Implement robust error handling for scenarios where the executable might fail to start or unexpectedly terminate.

  2. User Control: Provide users with options to start and stop the bandwidth sharing process.

  3. Update Mechanism: Consider implementing a mechanism to update the SDK executable when new versions are released. As we may disable outdated versions after a certain period.