Comments (2)
Sometimes when i call getSessionId() return session id but in other cases return -1
Flutter doctor -v
[√] Flutter (Channel stable, 2.5.0, on Microsoft Windows [Versión 10.0.19042.1237], locale es-EC)
• Flutter version 2.5.0 at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4cc385b4b8 (13 days ago), 2021-09-07 23:01:49 -0700
• Engine revision f0826da7ef
• Dart version 2.14.0
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\tipti\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Users\tipti\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] VS Code (version 1.60.1)
• VS Code at C:\Users\tipti\AppData\Local\Programs\Microsoft VS Code
• Flutter extension can be installed from:
https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[√] Connected device (3 available)
• LM X525 (mobile) • LMX525USUKZP5D9PE6 • android-arm • Android 10 (API 29)
• Chrome (web) • chrome • web-javascript • Google Chrome 93.0.4577.82
• Edge (web) • edge • web-javascript • Microsoft Edge 93.0.961.52
• No issues found!
Amplitude Version amplitude_flutter 3.3.0
Flutter Segment flutter_segment 3.1.2
Code to call session_id implemented
static Future<int> _getAmplitudeSessionId(User user) async {
try {
final Amplitude analytics =
Amplitude.getInstance(instanceName: "client_mobile");
analytics.setUseDynamicConfig(true);
analytics.setServerUrl("https://api2.amplitude.com");
analytics.init(Flavor.amplitude, userId: "${user.userId}");
analytics.trackingSessionEvents(true);
print(await analytics.getSessionId());
return await analytics.getSessionId();
} catch (err) {
debugPrint("INITIALIZE_AMPLITUDE: $err");
return null;
}
}
from amplitude-flutter.
Hi @RicharC293. Does the issue is when you trying to get session id from amplitude_flutter the session id always be -1? Without the implementation details, we cannot find the real cause is. May I know which version of amplitude_flutter you are using and how you get the session id?
from amplitude-flutter.
Related Issues (20)
- Test Issue ticket creation in AMP
- IP and location are transmitted even though CoppaControl is activated HOT 5
- Nested event_properties maps only serialize the top level on web HOT 1
- amplitude_flutter plugin not install my .yaml file HOT 1
- Can you make your account a verified publisher?
- Build failed on iOS with 'dart:js' error HOT 2
- Amplitude is logging wrong User properties for flutter SDK HOT 8
- Unusually Long Sessions HOT 1
- DefaultTrackingOptions configuration is missing on Flutter SDK HOT 4
- Support Kotlin 1.8 HOT 5
- Same '$identify' event being sent on every app background, even after opt-out/not updating user properties
- Version Conflict for 'Amplitude' in amplitude_flutter on CodeMagic Builds
- Execution failed for task ':amplitude_flutter:compileDebugKotlin'. (Android Gradle 8) HOT 3
- Access hidden method error HOT 1
- Session Reply [Web] HOT 1
- Urgent need of a migration guide/documentation for `amplitude_flutter 4.0.0` HOT 4
- Using with encrypted db
- Only complete initialization after userId is properly set
- Missing NSPrivacyTracking in PrivacyInfo.xcprivacy HOT 4
- How to add VersionCode in amplitude events HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amplitude-flutter.