sense_flutter_plugin 1.0.6 copy "sense_flutter_plugin: ^1.0.6" to clipboard
sense_flutter_plugin: ^1.0.6 copied to clipboard

Sense is a device intelligence and identification tool. This tool collects a comprehensive set of attributes unique to a device or browser, forming an identity that will help businesses.

Sense - Flutter SDK #

Sense is a device intelligence and identification tool. This tool collects a comprehensive set of attributes unique to a device or browser, forming an identity that will help businesses.

Step 1 - Add Dependency in pubspec.yaml

sense_flutter_plugin : 1.0.6

Step 2 - Import Package

import 'package:sense_flutter_plugin/sense_flutter_plugin.dart';

Step 3 - Initialize SDK

Add the following line of code to initialize it with the api key you obtained from the Sense Client panel. If you don't have a api key create new one.

Sense.initSDK({
  "publicKey": "YOUR_PUBLIC_KEY",
  "senseInfo": false,
  "allowGeoLocation": false,
  "tag": "TAG_NAME",
  "sessionId" : "" //Optional used for Workflow
  "metaInfo" : {} //A collection of key-value pairs intended for storing supplementary data related to the request. The set supports up to 15 pairs, with each key and value limited to a maximum of 256 characters.
});

Step 4 - Get Device Details

Use the below code to get the Device Details

Sense.getSenseDetails()

Sample Program

Here you can find the demonstration to do the integration.

import 'package:sense_flutter_plugin/sense_flutter_plugin.dart';

class _SenseAppState extends State<SenseApp> {
  late Sense sense;
  @override
  void initState() {
    super.initState();
    _initSDK();
  }

  void _initSDK() {
    sense = Sense.initSDK({
      "publicKey": "sensepk__xxxxxxxxxx",
      "senseInfo": false,
      "allowGeoLocation": false,
      "tag": "TAG_NAME",
      "sessionId" : "" //Optional used for Workflow
      "metaInfo" : {} //A collection of key-value pairs intended for storing supplementary data related to the request. The set supports up to 15 pairs, with each key and value limited to a maximum of 256 characters.
    });
  }

  void getSenseDetails() async {
    try {
      const deviceDetails = await sense.getSenseDetails();
      print(`Sense Details: ${deviceDetails}`);
    } on PlatformException catch (e) {
      
    }
  }
}
0
likes
130
points
88
downloads

Publisher

unverified uploader

Weekly Downloads

Sense is a device intelligence and identification tool. This tool collects a comprehensive set of attributes unique to a device or browser, forming an identity that will help businesses.

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on sense_flutter_plugin

Packages that implement sense_flutter_plugin