Spike SDK

The Spike SDK is a cross-platform library built on top of Apple HealthKit (iOS) and Android Health Connect (Android). It streamlines the extraction, standardization, and transmission of health data, enabling seamless integration with the SpikeAPI.

Key Features

  • Health Data Extraction
    Effortlessly access health and fitness data from Apple HealthKit and Android Health Connect.

  • Standardized Data Delivery
    Collected data is automatically formatted and sent to the SpikeAPI in a consistent, standardized structure.

  • Background Data Sync
    Supports background data delivery on both iOS and Android platforms, ensuring data synchronization with minimal user interaction.

  • Third-Party Provider Integration
    Enables direct data collection from external providers such as Garmin, Whoop, and others, directly through the SDK.

  • Samsung Health Data Integration
    Access health data from Samsung Health on Android devices with comprehensive permission management.

Platform Support

  • iOS: Apple HealthKit
  • Android: Android Health Connect, Samsung Health Data
  • Third-Party: Garmin, Whoop, and other supported providers

Samsung Health Data Integration

The SDK now supports Samsung Health Data integration on Android devices. This allows you to access health data from Samsung Health with the same ease as Health Connect.

Use Cases

Spike SDK is ideal for developers building health and wellness apps that require:

  • Unified access to health data across platforms
  • Reliable background data synchronization
  • Easy integration with wearable device data
  • Standardized data pipelines for backend processing
  • Samsung Health data access on Android devices

Logging

The SDK provides comprehensive logging capabilities to help with debugging and monitoring. To enable logging, call SpikeSDKV3.setLogCallback() with your own callback function before creating any connections:

import 'package:spike_flutter_sdk/spike_flutter_sdk.dart';

void main() async {
  // Set up logging callback to print all logs to Flutter console
  await SpikeSDKV3.setLogCallback(
    callback: (level, message) {
      print("SpikeSDKV3: ${level.toJson()} - $message");
    },
  );
  
  runApp(const MyApp());
}

This allows you to handle SDK logs however you prefer - print them to console, send them to a logging service, or process them in any other way. The callback receives the log level as a LogLevel enum (verbose, debug, warning, error) and the message.

Learn More

To get started or explore the API in detail, visit the official documentation.

Libraries

bridge/exception_handling/exception_handler
bridge/native/native_sdk_bridge_v3
connection/spike_connection_v3
connection/spike_sdk_v3
helpers/nutrition_record_helpers
helpers/nutrition_record_ingredient_utils
helpers/nutrition_record_utils
helpers/uuid_generator
model/data_v3/activity_additional_data
model/data_v3/activity_category
model/data_v3/activity_config
model/data_v3/activity_entry
model/data_v3/activity_tag
model/data_v3/activity_type
model/data_v3/background_delivery_config
model/data_v3/gender
model/data_v3/health_connect_availability_status
model/data_v3/health_connect_feature
model/data_v3/input_method
model/data_v3/integration_init_config
model/data_v3/log_level
model/data_v3/metric_type
model/data_v3/nutrition_facts_label_recognition_config
model/data_v3/nutrition_facts_label_recognition_result
model/data_v3/nutrition_record
model/data_v3/nutrition_record_analysis_mode
model/data_v3/nutrition_record_analysis_result
model/data_v3/nutrition_record_ingredient
model/data_v3/nutrition_record_status
model/data_v3/nutritional_analysis_config
model/data_v3/nutritional_field
model/data_v3/nutritional_unit
model/data_v3/provider
model/data_v3/provider_source
model/data_v3/record
model/data_v3/record_config
model/data_v3/record_source
model/data_v3/samsung_health_availability
model/data_v3/sleep_config
model/data_v3/statistic
model/data_v3/statistics_filter
model/data_v3/statistics_interval
model/data_v3/statistics_type
model/data_v3/unit
model/data_v3/user_info_response
model/data_v3/user_properties
model/exception/spike_connection_is_closed_exception
model/exception/spike_exception
model/exception/spike_invalid_credentials_exception
model/exception/spike_invalid_date_range_exception
model/exception/spike_invalid_postback_url_exception
model/exception/spike_pack_exception
model/exception/spike_permissions_not_granted_exception
model/exception/spike_server_exception
model/exception/spike_unpack_exception
spike_flutter_sdk
version