sense_flutter_plugin : 1.0.7import 'package:sense_flutter_plugin/sense_flutter_plugin.dart';Sense.initSDK({
"publicKey": "YOUR_PUBLIC_KEY",
"senseInfo": true,
"allowGeoLocation": false,
"tag": "HomeFlutter",
// "metaInfo" : {
// "phone" : "9xxxxxxxxx",
// "name" : "xxxxxxxxx"
// }
// 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.
});Sense.getSenseDetails()<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
tools:ignore="ProtectedPermissions"/><key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to your location to provide location-based services.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Location access is required for enhanced app functionality.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Require to get user location</string><key>LSApplicationQueriesSchemes</key>
<array>
<string>whatsapp</string>
<string>tez</string>
<string>phonepe</string>
<string>cred</string>
<string>amazon</string>
</array>-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.** { *; }
-dontwarn ai.gosense.**
-keep class ai.gosense.** {*;}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": "YOUR_PUBLIC_KEY",
"senseInfo": true,
"allowGeoLocation": false,
"tag": "HomeFlutter",
// "metaInfo" : {
// "phone" : "9xxxxxxxxx",
// "name" : "xxxxxxxxx"
// }
// 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) {
}
}
}