amplitude / amplitude-flutter Goto Github PK
View Code? Open in Web Editor NEWOfficial Amplitude Flutter SDK
Home Page: https://developers.amplitude.com/docs/flutter-setup
License: MIT License
Official Amplitude Flutter SDK
Home Page: https://developers.amplitude.com/docs/flutter-setup
License: MIT License
The API setMinTimeBetweenSessionsMillis should be exposed to the Flutter SDK.
By adding this support the Flutter SDK would be more in line with the native support. The Flutter SDK should include all functionality of the native SDK. Unofficial forks of the Amplitude Flutter SDK will lead to increased fragmentation of the ecosystem. Please consider adding this soon.
When I set up the SDK according to the documentation then the start of a user's session should be reported the same for iOS and Android.
iOS will report when a session starts/ends but android does not.
The only solution I have found is to call analytics.logEvent()
to get data showing up for android.
my_app.dart
file change the initState()
to match the getting started guide. @override
void initState() {
super.initState();
analytics = Amplitude.getInstance();
analytics.init(widget.apiKey);
analytics.setUserId("test_user");
analytics.trackingSessionEvents(true);
}
How do I report idfa or google ad id through this SDK?
I already have both reliably setup (we're using adjust as well) and available as String - but I don't know how to pass them to amplitude.
App should not crash
App is crashing
userId is passed to the parameters map instead of startNewSession
I develop my app for Android, iOS, Windows, macOS and Linux.
It would be great if you provide support for Linux.
It is currently not possible to change EventUploadThreshold with the Flutter API.
Hi! Our Flutter app Sharezone is available as an Android, iOS, Web and macOS app. We would love to see macOS support โค๏ธ
I develop my app for Android, iOS, Windows, macOS and Linux.
It would be great if you provide support for Windows.
This has been fixed in amplitude_flutter 3.4.0. Thanks.
Originally posted by @yuhao900914 in #67 (comment)
After update plugin in debug mode all works fine, but when i build release app crashed with this error
Caused by: android.view.InflateException: Binary XML file line #11 in com.android.chrome:layout/0_resource_name_obfuscated: Error inflating class
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:854)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1231)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1119)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)
at android.view.LayoutInflater.inflate(LayoutInflater.java:656)
at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
at ED1.a(chromium-TrichromeChromeGoogle.aab-stable-460606133:3)
at Cl4.b(chromium-TrichromeChromeGoogle.aab-stable-460606133:7)
at jn0.run(chromium-TrichromeChromeGoogle.aab-stable-460606133:4)
at LN.run(chromium-TrichromeChromeGoogle.aab-stable-460606133:10)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:174)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.IllegalArgumentException: ChromeColors requires a value for the com.android.chrome:attr/0_resource_name_obfuscated attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant).
at PQ1.c(chromium-TrichromeChromeGoogle.aab-stable-460606133:5)
at HV.b(chromium-TrichromeChromeGoogle.aab-stable-460606133:3)
at org.chromium.chrome.browser.compositor.CompositorView.g(chromium-TrichromeChromeGoogle.aab-stable-460606133:4)
at org.chromium.chrome.browser.compositor.CompositorView.(chromium-TrichromeChromeGoogle.aab-stable-460606133:5)
at org.chromium.chrome.browser.compositor.CompositorViewHolder.(chromium-TrichromeChromeGoogle.aab-stable-460606133:15)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
at android.view.LayoutInflater.createView(LayoutInflater.java:854)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1006)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:961)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1123)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1231)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1119)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1084)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1126)
at android.view.LayoutInflater.inflate(LayoutInflater.java:656)
at android.view.LayoutInflater.inflate(LayoutInflater.java:534)
at ED1.a(chromium-TrichromeChromeGoogle.aab-stable-460606133:3)
at Cl4.b(chromium-TrichromeChromeGoogle.aab-stable-460606133:7)
at jn0.run(chromium-TrichromeChromeGoogle.aab-stable-460606133:4)
at LN.run(chromium-TrichromeChromeGoogle.aab-stable-460606133:10)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:174)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
2021-10-01 09:18:47.948 13380-13380/? E/ocessService0:: Not starting debugger since process cannot load the jdwp agent.
2021-10-01 09:18:58.459 4461-12883/? E/memtrack: Couldn't load memtrack module
2021-10-01 09:19:31.825 2060-7208/? E/memtrack: Couldn't load memtrack module
when i remove amplitude plugin and build app all works fine
[adjust] Install
is displayed on Android & iOS
[adjust] Install
is only displayed on iOS
The root of the problem is Android Amplitude SDK, logs show:
W/com.amplitude.api.DeviceInfo( 3416): Google Play Services not available for advertising id
W/com.amplitude.api.DeviceInfo( 3416): Google Play Services SDK not found for app set id!
Seems like class com.google.android.gms.ads.identifier.AdvertisingIdClient
is not getting found in DeviceInfo.java
Followed all the instructions regarding the gradle/proguard setup.
Someone suggested a fix (not using reflection), but afaik it got dismissed dantetam/Amplitude-Android@39c70ab due to "we would have to change our tests" ๐คทโโ๏ธ
Now Adjust SDK seems to find and assign advertising id on Android just fine. My fix introduces option to set custom advertising id, this involves changes in both Android and Flutter repos:
Then I can simply use it at initialisation time and supply valid advertising id:
final amplitude = Amplitude.getInstance();
final adId = await Adjust.getGoogleAdId();
await amplitude.setCustomAdvertisingId(advertisingId);
This fixed problem we saw in our amplitude dashboard.
setUserId not work on iOS
Flutter (Channel stable, 1.22.4, on macOS 11.1 20C69 darwin-x64, locale es-419)
โข Flutter version 1.22.4
โข Framework revision 1aafb3a8b9 (8 weeks ago), 2020-11-13 09:59:28 -0800
โข Engine revision 2c956a31c0
โข Dart version 2.10.4
We are trying to implement this package for segment and amplitude integration all at the flutter level.
https://pub.dev/packages/flutter_segment
https://pub.dev/packages/flutter_segment#setting-the-options-globally
The flutter_segment package to identify the user asks me for a session_id but when trying to get this session_id with the amplitude package it always returns -1.
My question is, what would be the best practice to integrate these two packages, maybe there is any suggestion?
As far as I understand I need to identify the user to get a session Id, maybe it works in a similar way with the anonimus id that segment provides?
on iOS it's work but on Android I have this error during the build:
Compilation error. See log for more details
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 17s
Running Gradle task 'assembleDevDebug'... 18.4s
โโ Flutter Fix โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ [!] Your project requires a newer version of the Kotlin Gradle plugin. โ
โ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then update โ
โ /Users/imsangcheol/Working/TripleComma/dev/goldspoon-app/android/build.gradle: โ
โ ext.kotlin_version = '' โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Gradle task assembleDevDebug failed with exit code 1
Doctor summary (to see all details, run flutter doctor -v):
[โ] Flutter (Channel stable, 2.10.3, on macOS 12.1 21C52 darwin-arm, locale ko-KR)
[โ] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[โ] Xcode - develop for iOS and macOS (Xcode 13.2.1)
[โ] Chrome - develop for the web
[โ] Android Studio (version 2021.1)
[โ] VS Code (version 1.65.0)
[โ] Connected device (2 available)
[โ] HTTP Host Availability
Hello,
Since the current stable release of Flutter the following error is happening:
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Amplitude":
In snapshot (Podfile.lock):
Amplitude (= 5.1.0)
In Podfile:
amplitude_flutter (from `.symlinks/plugins/amplitude_flutter/ios`) was resolved to 0.0.1, which depends on
Amplitude (= 5.2.1)
You have either:
* changed the constraints of dependency `Amplitude` inside your development pod `amplitude_flutter`.
You should run `pod update Amplitude` to apply changes you've made.
Could you help me?
Your android plugin defines minSdkVersion 16. However, you include dependency on com.squareup.okhttp3:okhttp:4.2.2 which supports only Android 21+. Running on device with Android api 16 ends up with java.lang.NoClassDefFoundError: java.util.Objects exception as Objects class is not present in the OS.
I think very similarly to the issues reported. I have different error messages.
CocoaPods' output:
โณ
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Finding Podfile changes
A amplitude_flutter
- Firebase
- Flutter
- firebase_messaging
- google_sign_in
- google_sign_in_web
...
Error output from CocoaPods:
โณ
[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
flutter version
Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.5
19F101, locale en-US)
Hello, amplitude_flutter 2.0 doesn't work on ios :
pod install
Analyzing dependencies
[!] CocoaPods could not find compatible versions for pod "Amplitude":
In Podfile:
amplitude_flutter (from `.symlinks/plugins/amplitude_flutter/ios`) was resolved to 0.0.1, which depends on
Amplitude (= 5.1.0)
Specs satisfying the `Amplitude (= 5.1.0)` dependency were found, but they required a higher minimum deployment target.
"pod deintegrate"
"pod install"
"pod update"
doesn't work ! Any idea ?
Thx for your time
Hello!
Is it necessary to add com.google.android.gms:play-services-ads
to my android app?
This page says yes https://developers.amplitude.com/docs/ios-ios-advertising-id-idfa but example in this repo has no play-services-ads. Who is right?
Plugin registers without crashes when app runs in background e.g. Service handle some platform Intent and starts headless FlutterEngine that executes
Amplitude plugin registration crashes:
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference at io.flutter.plugin.common.MethodChannel.setMethodCallHandler(MethodChannel.java:119) at com.amplitude.amplitude_flutter.AmplitudeFlutterPlugin$Companion.registerWith(AmplitudeFlutterPlugin.kt:22) at com.amplitude.amplitude_flutter.AmplitudeFlutterPlugin.registerWith(Unknown Source:2)
Migrate the plugin to flutter android v2 embedding.
Don't use PluginRegistry.messenger()
. According to the docs This registrar is for Flutter's v1 embedding.
<application
android:name=".Application"
android:icon="@mipmap/ic_launcher"
...>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
GeneratedPluginRegistrant.registerWith(engine)
when an app runs in background e.g. a Service instantiates a FlutterEngine and registers plugins.Example:
package example
import android.app.IntentService
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.view.FlutterCallbackInformation
import io.flutter.view.FlutterMain
class ExampleService : IntentService("Example") {
private var backgroundChannel: MethodChannel? = null
private var backgroundFlutterEngine: FlutterEngine? = null
override fun onCreate() {
super.onCreate()
if (backgroundFlutterEngine == null) {
val callbackHandle = retrieveCallbackHandler(....)
val callbackInfo = try {
FlutterCallbackInformation.lookupCallbackInformation(callbackHandle)
} catch (e: IllegalStateException) {
null
}
if (callbackInfo != null) {
// Create a FlutterEngine which will process the events.
backgroundFlutterEngine = FlutterEngine(this.applicationContext)
GeneratedPluginRegistrant.registerWith((backgroundFlutterEngine!!)
val args = DartExecutor.DartCallback(this.applicationContext.assets, FlutterMain.findAppBundlePath(this.applicationContext)!!, callbackInfo)
// Start running callback dispatcher code in our background FlutterEngine instance.
backgroundFlutterEngine!!.dartExecutor.executeDartCallback(args)
backgroundChannel = MethodChannel(backgroundFlutterEngine!!.dartExecutor.binaryMessenger, "com.example.callback")
}
}
}
override fun onDestroy() {
super.onDestroy()
backgroundFlutterEngine?.destroy()
}
}
My team just figure out that past data can updated in spite of days ago.
When we service web page with amplitude javascript previously, this case does not happened.
So, my company asking for why this situation happening.
And we've got answered like this; ' This is flutter issue. In flutter library, event fullfil with 30 events then it goes to server. '
I think this can be a little bit critical issue.
I guess, according to that answer, we cannot see whole data with amplitude because if someone's events are less than 30, then we can't get any events with that customer.
So, I wish that amplitude flutter library enhanced as soon as possible.
Always thanks to your service :D
Flutter now supports null safety in the stable channel. Please migrate this package to null safety. You can use the dart migrate
tool.
Building plugin amplitude_flutter...
Running Gradle task 'assembleAarRelease'...
Running Gradle task 'assembleAarRelease'... Done
2,780ms
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'amplitude_flutter'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* Try:
Run with --stacktrace option to get the stack trace. Run
with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
The plugin amplitude_flutter could not be built due to
the issue above.
What went wrong:
A problem occurred configuring root project 'amplitude_flutter'.
Should build apk
Error got thrown
flutter build apk
The error occurs:
java.lang. NoSuchMethodError: Nostaticmethod user Agent()Ljava/Lang/String; in classLokhttp3
Occurs at the initialization stage of the plugin, when the init() method is called, after that the application crashes.
It is the result of incompatibility of the versions of okhttp3 in different plugins/ libraries of the project, since many other libraries use the version of the okhttp API 3.12.+.
To solve the problem, you need to build from the build file.gradle should remove an explicit reference to the version of okhttp3 4.2.2, since these different versions of the okhttp3 API are not compatible in the same project.
Xcode's output:
โณ
Writing result bundle at path:
/var/folders/wk/smm6mfxn6dd6rcv8vjtj49qr0000gn/T/flutter_tools.K1r3vy/flutter_ios_build_temp_diruJpgfh/temporary_xcresult_bundle
/Users/vitul/Documents/Software/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.8.1/ios/Classes/AmplitudeFlutterPlugin.m:2:9: fatal error: 'amplitude_flutter/amplitude_flutter-Swift.h' file not found
#import <amplitude_flutter/amplitude_flutter-Swift.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in parallel
Result bundle written to path:
/var/folders/wk/smm6mfxn6dd6rcv8vjtj49qr0000gn/T/flutter_tools.K1r3vy/flutter_ios_build_temp_diruJpgfh/temporary_xcresult_bundle
logEvent() should be worked correctly
Got exception after logEvent() function
According to the log, set context correctly in amplitude sdk can fix this issue.
Build apk with flutter 1.22.4 and invoke logEvent by amplitude.dart.
Project build with no errors.
When building for iOS, I'm getting this error:
Running pod install...
CocoaPods' output:
โณ
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `amplitude_flutter` from `.symlinks/plugins/amplitude_flutter/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: all_pods_versions_f_4_d.txt exists! Returning local because checking is only performed in repo update
CDN: trunk Relative path: Specs/f/4/d/Amplitude/8.4.0/Amplitude.podspec.json exists! Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "Amplitude":
In Podfile:
amplitude_flutter (from `.symlinks/plugins/amplitude_flutter/ios`) was resolved to 0.0.1, which depends on
Amplitude (= 8.5.0)
None of your spec sources contain a spec satisfying the dependency: `Amplitude (= 8.5.0)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:257:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
Error launching application on iPhone 13.
platform :ios, '10.0'
to your Podfile.amplitude_flutter: 3.8.0
to pubspec.yaml file.Worth mentioning that it is even failing on the provided example on the repo.
void initState() {
super.initState();
final amplitude =
Amplitude.getInstance(instanceName: 'INSTANCE_NAME');
amplitude.init('MY_API_KEY');
}
W/.amplitude_tes(17596): Accessing hidden method Lcom/android/org/conscrypt/OpenSSLSocketImpl;->setUseSessionTickets(Z)V (greylist-max-q,core-platform-api, reflection, denied)
W/OkHttp (17596): unable to load android socket classes
W/OkHttp (17596): java.lang.NoSuchMethodException: com.android.org.conscrypt.OpenSSLSocketImpl.setUseSessionTickets [boolean]
W/OkHttp (17596): at java.lang.Class.getMethod(Class.java:2072)
W/OkHttp (17596): at java.lang.Class.getDeclaredMethod(Class.java:2050)
W/OkHttp (17596): at okhttp3.internal.platform.android.AndroidSocketAdapter.<init>(AndroidSocketAdapter.kt:34)
W/OkHttp (17596): at okhttp3.internal.platform.android.StandardAndroidSocketAdapter.<init>(StandardAndroidSocketAdapter.kt:31)
W/OkHttp (17596): at okhttp3.internal.platform.android.StandardAndroidSocketAdapter$Companion.buildIfSupported(StandardAndroidSocketAdapter.kt:57)
W/OkHttp (17596): at okhttp3.internal.platform.android.StandardAndroidSocketAdapter$Companion.buildIfSupported$default(StandardAndroidSocketAdapter.kt:50)
W/OkHttp (17596): at okhttp3.internal.platform.AndroidPlatform.<init>(AndroidPlatform.kt:44)
W/OkHttp (17596): at okhttp3.internal.platform.AndroidPlatform$Companion.buildIfSupported(AndroidPlatform.kt:239)
W/OkHttp (17596): at okhttp3.internal.platform.Platform$Companion.findPlatform(Platform.kt:211)
W/OkHttp (17596): at okhttp3.internal.platform.Platform$Companion.access$findPlatform(Platform.kt:179)
W/OkHttp (17596): at okhttp3.internal.platform.Platform.<clinit>(Platform.kt:180)
W/OkHttp (17596): at okhttp3.OkHttpClient.<init>(OkHttpClient.kt:219)
W/OkHttp (17596): at okhttp3.OkHttpClient.<init>(OkHttpClient.kt:211)
W/OkHttp (17596): at com.amplitude.api.AmplitudeClient.lambda$initialize$0$AmplitudeClient(AmplitudeClient.java:287)
W/OkHttp (17596): at com.amplitude.api.-$$Lambda$AmplitudeClient$9NDt_YKBCJ8Ih0Ic4HFC4DZmSRA.run(Unknown Source:8)
W/OkHttp (17596): at android.os.Handler.handleCallback(Handler.java:938)
W/OkHttp (17596): at android.os.Handler.dispatchMessage(Handler.java:99)
W/OkHttp (17596): at android.os.Looper.loop(Looper.java:223)
SDK Version: v3.2.1
Flutter v2.2.1
not sure is here the right place to ask, but seems amplitude functionality is working properly, just wonder is there a way to avoid this error message?
How can I get the device ID with this SDK? It's possible in iOS http://amplitude.github.io/Amplitude-iOS/Classes/Amplitude.html#//api/name/getDeviceId.
Is Amplitude-Flutter free?
If not then is there any free tier term?
we have the app which has lots of event. only the events on the home page are getting reported accurately. if the user starts navigating to other screens the event start getting missed even though it is being called accurately. there is no exception related to any thing in the code. plus we have tried to run it in debug mode set to catch all exceptions and there is none.
All of the event should be reported perfectly fine.
some events don't get reported. they don't follow any specific pattern. sometime it keeps on reporting way past few screen sometimes it stops no concentrate way to reproduce that..
is there a way to turn the dubgging on for the sdk?? to check what's exactly going on there??
just start the app
navigate back and forth few screens then event will eventually be stopped and you will not see any thing on dashboard.
sometime it keeps on going and only certain events doesn't get sent.
the specific even we are consistently having issue with is "join call" event.
Hi, how are you?
Is necessary that my project be Swift compatible?
I'm facing the following error, with a brand new project.
- `amplitude_flutter` does not specify a Swift version and none of the targets (`Runner`) integrating it have the
`SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of
the targets that integrate this pod.
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:125:in
`verify_swift_pods_swift_version'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/xcode/target_validator.rb:39:in `validate!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:590:in `validate_targets'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/installer.rb:158:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Expose setOffline
via the flutter plugin
Both objective-c and Kotlin counterparts offer a method 'setOffline'.
/**
* Sets offline. If offline is true, then the SDK will not upload events to Amplitude servers;
* however, it will still log events.
*
* @param offline whether or not the SDK should be offline
* @return the AmplitudeClient
*/
public AmplitudeClient setOffline(boolean offline) {
this.offline = offline;
// Try to update to the server once offline mode is disabled.
if (!offline) {
uploadEvents();
}
return this;
}
- (void)setOffline:(BOOL)offline {
_offline = offline;
if (!_offline) {
[self uploadEvents];
}
}
Prevent uploading events to Amplitude server in special conditions.
Hi! Awesome library btw. Helps my startup stay legal, lol.
Please note, that this code crashes only on iOS, not Android.
This is the relevant code:
AmplitudeService({
@required this.apiKey,
@required this.userLocale,
@required this.resolvedLocale,
@required this.optOut,
}) {
_client = Amplitude.getInstance(instanceName: 'turnip');
_client.init(apiKey);
_client.enableCoppaControl();
_client.trackingSessionEvents(true);
_client.setOptOut(optOut);
}
void setToken(Token token) {
if (token == null) {
_client.setUserId(
null,
startNewSession: true,
);
} else {
// set user id
final userId = token?.userId;
_client.setUserId(userId);
final userRole = token?.userRole;
final subsCategory = token?.subscriptionCategory;
_client.setUserProperties({
'userRole': userRole,
'subscriptionCategory': subsCategory,
});
}
}
Here in void setToken, if token == null, _client.setUserId crashes the whole app and leaves no trace. The same thing happens even if I do not specify startNewSession: true.
If I comment out the _client.setUserId(null). Everything works as expected.
To be honest this is not the end of the world and does not dilute the data too much. But it would be handy to be able to "sign out" a user and be able to there and then start a new session.
Am I doing it wrong perhaps?
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.40 and higher.
The following dependencies do not satisfy the required version:
project ':amplitude_flutter' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.21
Add plugin to project and start it
Doctor summary (to see all details, run flutter doctor -v):
[โ] Flutter (Channel stable, 2.5.0, on macOS 11.5.1 20G80 darwin-arm, locale en-RU)
[โ] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[โ] Xcode - develop for iOS and macOS
[โ] Chrome - develop for the web
[โ] Android Studio (version 2020.3)
[โ] IntelliJ IDEA Community Edition (version 2021.2.1)
[โ] VS Code (version 1.60.1)
[โ] Connected device (2 available)
Hello
I want to remove Segment to use directly amplitude for track event analytics.
So I follow step by step the guideline to add amplitude-flutter
on iOS it's work but on Android I have this error during the build:
'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15. [ ] The class is loaded from /Users/yelkamel/.gradle/caches/transforms-2/files-2.1/69cffba187c9174af5a287de98f1cddd/jetified-kotlin-stdlib-1.5.30.jar!/kotlin/Unit.class [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (196, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15. [ +6 ms] The class is loaded from /Users/yelkamel/.gradle/caches/transforms-2/files-2.1/69cffba187c9174af5a287de98f1cddd/jetified-kotlin-stdlib-1.5.30.jar!/kotlin/Unit.class [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (200, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15. [ ] The class is loaded from /Users/yelkamel/.gradle/caches/transforms-2/files-2.1/69cffba187c9174af5a287de98f1cddd/jetified-kotlin-stdlib-1.5.30.jar!/kotlin/Unit.class [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (202, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15. [ ] The class is loaded from /Users/yelkamel/.gradle/caches/transforms-2/files-2.1/69cffba187c9174af5a287de98f1cddd/jetified-kotlin-stdlib-1.5.30.jar!/kotlin/Unit.class [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (209, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15. [ ] The class is loaded from /Users/yelkamel/.gradle/caches/transforms-2/files-2.1/69cffba187c9174af5a287de98f1cddd/jetified-kotlin-stdlib-1.5.30.jar!/kotlin/Unit.class [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (215, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15. [ ] The class is loaded from /Users/yelkamel/.gradle/caches/transforms-2/files-2.1/69cffba187c9174af5a287de98f1cddd/jetified-kotlin-stdlib-1.5.30.jar!/kotlin/Unit.class [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (218, 24): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15. [ ] The class is loaded from /Users/yelkamel/.gradle/caches/transforms-2/files-2.1/69cffba187c9174af5a287de98f1cddd/jetified-kotlin-stdlib-1.5.30.jar!/kotlin/Unit.class [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (226, 27): For-loop range must have an 'iterator()' method [ ] e: /Users/yelkamel/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.5.0/android/src/main/kotlin/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.kt: (228, 25): For-loop range must have an 'iterator()' method [ +145 ms] > Task :amplitude_flutter:compileDebugKotlin FAILED [ +96 ms] FAILURE: Build failed with an exception. [ ] * What went wrong: [ ] Execution failed for task ':amplitude_flutter:compileDebugKotlin'. [ ] > Compilation error. See log for more details [ ] * Try: [ ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. [ ] * Get more help at https://help.gradle.org [ ] BUILD FAILED in 10s [ ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. [ ] Use '--warning-mode all' to show the individual deprecation warnings. [ ] See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings [ ] 9 actionable tasks: 1 executed, 8 up-to-date [ +613 ms] Running Gradle task 'assembleDebug'... (completed in 11.4s) [+2930 ms] Exception: Gradle task assembleDebug failed with exit code 1 [ +10 ms] "flutter run" took 19,348ms. [ +14 ms] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:669:9) <asynchronous suspension> #2 FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1125:27) <asynchronous suspension> #3 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #4 CommandRunner.runCommand (package:args/command_runner.dart:209:13) <asynchronous suspension> #5 FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:288:9) <asynchronous suspension> #6 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:236:5) <asynchronous suspension> #8 run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9) <asynchronous suspension> #9 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19) <asynchronous suspension> #10 main (package:flutter_tools/executable.dart:92:3) <asynchronous suspension>
error on running pod install
CDN: trunk URL couldn't be downloaded: https://cdn.jsdelivr.net/cocoa/Specs/f/4/d/Amplitude/5.0.0/Amplitude.podspec.json Response: SSL peer certificate or SSH remote key was not OK, retries: 4
should related to May 30 incident https://status.amplitude.com/
How can we get started to use this on Flutter Web?
Hi, I'm using Amplitude on 2.0.0 version and I'm trying to log an event to my dashboard, but unsuccessful, I'd like your help.
import 'package:adam/app_config.dart';
import 'package:amplitude_flutter/amplitude.dart';
class AppAnalytics extends Amplitude {
static final AppAnalytics _analytics = AppAnalytics._internal();
AppAnalytics._internal() : super('MyCompany');
factory AppAnalytics() => _analytics;
static Future<void> start() async {
await _analytics.init(AppConfig.instance.analyticsKey);
}
static void initTrackWithUserId(String userId, {String screenName}) {
_analytics
..setUserId(userId)
..trackingSessionEvents(true)
..logEvent('acessed_$screenName');
}
static void sendEvent(String event, {Map<String, dynamic> props}) {
_analytics.logEvent(event, eventProperties: props);
}
}
I've built this Singleton class and I'm starting at main.dart calling start()
above.
I have some previous events that are logging but I'm trying to add new ones but they don't show up at Amplitude for me and I don't know what else to do, besides that, I have some questions.
What is the instanceName? It's the my project's name on Amplitude? My workspace name? Or can it be any name as I wish?
Using as a singleton is doing fine with some old events, but new ones, don't.
Am I missing something? Does the singleton is a good way to keep going?
The user profile should not show a user ID, only Amplitude ID, as setUserID was not called
User profile shows a user ID that comes from another project linked to a different app with a different bundle ID. Both projects are inside the same organization
This issue was only reproducible in iOS for me. I installed the apps from TestFlight.
You need to have two applications linked to two different projects within the same organization in Amplitude.
If Application A is uninstalled before installing B (between steps 2 and 3), then the issue doesn't happen and everything works fine
I use amplitude for my flutter project, by checking the reports we found out we can't get any analytics report from Mainland China, by checking the docs I found this:
But so far Amplitude-Flutter
do not expose this useDynamicConfig
configuration.
I try to change the iOS code but still the Amplitude.instance
still do not have any useDynamicConfig
method/props.
Is there any sulutions?
I/zygote ( 6749): at okhttp3.internal.platform.android.SocketAdapter okhttp3.internal.platform.android.ConscryptSocketAdapter.buildIfSupported() (ConscryptSocketAdapter.kt:64) I/zygote ( 6749): at void okhttp3.internal.platform.AndroidPlatform.<init>() (AndroidPlatform.kt:45) I/zygote ( 6749): at okhttp3.internal.platform.Platform okhttp3.internal.platform.AndroidPlatform$Companion.buildIfSupported() (AndroidPlatform.kt:239) I/zygote ( 6749): at okhttp3.internal.platform.Platform okhttp3.internal.platform.Platform$Companion.findPlatform() (Platform.kt:211) I/zygote ( 6749): at okhttp3.internal.platform.Platform okhttp3.internal.platform.Platform$Companion.access$findPlatform(okhttp3.internal.platform.Platform$Companion) (Platform.kt:179) I/zygote ( 6749): at void okhttp3.internal.platform.Platform.<clinit>() (Platform.kt:180) I/zygote ( 6749): at void okhttp3.OkHttpClient.<init>(okhttp3.OkHttpClient$Builder) (OkHttpClient.kt:219) I/zygote ( 6749): at void okhttp3.OkHttpClient.<init>() (OkHttpClient.kt:211) I/zygote ( 6749): at void com.amplitude.api.AmplitudeClient.lambda$initialize$0$AmplitudeClient(android.content.Context, java.lang.String, com.amplitude.api.AmplitudeClient) (AmplitudeClient.java:272) I/zygote ( 6749): at void com.amplitude.api.-$$Lambda$AmplitudeClient$9hxT9i3yp7eOymOvTMj42XcPKBs.run() (lambda:-1) I/zygote ( 6749): at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:790) I/zygote ( 6749): at void android.os.Handler.dispatchMessage(android.os.Message) (Handler.java:99) I/zygote ( 6749): at void android.os.Looper.loop() (Looper.java:164) I/zygote ( 6749): at void android.os.HandlerThread.run() (HandlerThread.java:65) I/zygote ( 6749): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.conscrypt.ConscryptHostnameVerifier" on path: DexPathList[[zip file "/data/app/**removedpath**/base.apk"],nativeLibraryDirectories=[/data/app/**omitted**/lib/x86, /data/app/**ommited**/base.apk!/lib/x86, /system/lib, /vendor/lib]]
After a fresh install in a emulator i received this error when i try to use init method
I couldn't find
After a fresh install in a emulator i received this error when i try to use init method
It's me again, I'm trying to calling setUserProperties but the app, at least on simulator, keep crashing.
class AnalyticsRepositoryImpl implements AnalyticsRepository {
final Amplitude analytic = Amplitude.getInstance(instanceName: 'Vitta');
@override
Future<void> setUserProps(Map<String, dynamic> props) async {
await analytic.setUserProperties(props);
}
}
I'm missing something? Again?
After regenerating the Podfile
file using rm ios/Podfile
, and trying to build, the build fails. This was done because the tool itself suggested it (maybe some changes to that file in latest Flutter versions).
Running pod install... 5,3s
Warning: Podfile is out of date
This can cause issues if your application depends on plugins that do not
support iOS.
See
https://flutter.dev/docs/development/packages-and-plugins/developing-packages#
plugin-platforms for details.
If you have local Podfile edits you would like to keep, see
https://github.com/flutter/flutter/issues/45197 for instructions.
To regenerate the Podfile, run:
rm ios/Podfile
Running Xcode build...
This is the related error log:
ld:
'/Users/cristianzazo/<elided>/build/ios/Release-iphoneos/Amplitude/Amplitu
de.framework/Amplitude' does not contain bitcode. You must rebuild it with
bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library
from the vendor, or disable bitcode for this target. file
'/Users/cristianzazo/<elided>/build/ios/Release-iphoneos/Amplitude/Amplitu
de.framework/Amplitude' for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
ld:
'/Users/cristianzazo/<elided>/build/ios/Release-iphoneos/Amplitude/Amplitu
de.framework/Amplitude' does not contain bitcode. You must rebuild it with
bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library
from the vendor, or disable bitcode for this target. file
'/Users/cristianzazo/<elided>/build/ios/Release-iphoneos/Amplitude/Amplitu
de.framework/Amplitude' for architecture arm64
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
[โ] Flutter (Channel master, 1.20.0-1.0.pre.132, on Mac OS X 10.15.5 19F101,
locale es-ES)
[โ] Xcode - develop for iOS and macOS (Xcode 11.5)
Build should complete without any errors from Amplitude.
[01:00:37]: โธ Generating 'Amplitude.framework.dSYM'
[01:00:37]: โธ Touching Amplitude.framework (in target 'Amplitude' from project 'Pods')
[01:00:37]: โธ Processing amplitude_flutter-Info.plist
[01:00:37]: โธ Copying amplitude_flutter-umbrella.h
[01:00:37]: โธ Copying AmplitudeFlutterPlugin.h
[01:00:37]: โธ Compiling SwiftAmplitudeFlutterPlugin.swift
[01:00:38]: โธ โ ๏ธ /Users/pal/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.8.1/ios/Classes/SwiftAmplitudeFlutterPlugin.swift:127:64: 'logRevenue(_:quantity:price:)' is deprecated: Use `logRevenueV2` and `AMPRevenue` instead
[01:00:38]: โธ Amplitude.instance(withName: instanceName).logRevenue(productIdentifier,
[01:00:38]: โธ ^
[01:00:38]: โธ โ ๏ธ /Users/pal/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.8.1/ios/Classes/SwiftAmplitudeFlutterPlugin.swift:134:64: 'logRevenue' is deprecated: Use `logRevenueV2` and `AMPRevenue` instead
[01:00:38]: โธ Amplitude.instance(withName: instanceName).logRevenue(NSNumber(value: amount))
[01:00:38]: โธ ^
[01:00:38]: โธ Compiling SwiftAmplitudeFlutterPlugin.swift
[01:00:38]: โธ โ ๏ธ /Users/pal/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.8.1/ios/Classes/SwiftAmplitudeFlutterPlugin.swift:127:64: 'logRevenue(_:quantity:price:)' is deprecated: Use `logRevenueV2` and `AMPRevenue` instead
[01:00:38]: โธ Amplitude.instance(withName: instanceName).logRevenue(productIdentifier,
[01:00:38]: โธ ^
[01:00:38]: โธ โ ๏ธ /Users/pal/.pub-cache/hosted/pub.dartlang.org/amplitude_flutter-3.8.1/ios/Classes/SwiftAmplitudeFlutterPlugin.swift:134:64: 'logRevenue' is deprecated: Use `logRevenueV2` and `AMPRevenue` instead
[01:00:38]: โธ Amplitude.instance(withName: instanceName).logRevenue(NSNumber(value: amount))
[01:00:38]: โธ ^
Stop using deprecated API and use the recommended APIs intead.
amplitude_flutter: ^3.7.0
bundle exec fastlane beta
[โ] Flutter (Channel master, 2.10.0-1.0.pre.344, on macOS 12.2 21D49 darwin-arm, locale en-SE)
โข Flutter version 2.10.0-1.0.pre.344 at /Users/pal/dev/flutter
โข Upstream repository https://github.com/flutter/flutter.git
โข Framework revision 6f079010b4 (5 hours ago), 2022-01-31 14:32:18 -0500
โข Engine revision 48ae905cb1
โข Dart version 2.17.0 (build 2.17.0-67.0.dev)
โข DevTools version 2.10.0-dev.1
[โ] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
โข Android SDK at /Users/pal/Library/Android/sdk
โข Platform android-32, build-tools 32.1.0-rc1
โข Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
โข Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7772763)
โข All Android licenses accepted.
[โ] Xcode - develop for iOS and macOS (Xcode 13.2.1)
โข Xcode at /Applications/Xcode.app/Contents/Developer
โข CocoaPods version 1.11.2
[โ] Chrome - develop for the web
โข Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[โ] Android Studio (version 2021.1)
โข Android Studio at /Applications/Android Studio.app/Contents
โข 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.11+0-b60-7772763)
[โ] VS Code (version 1.63.2)
โข VS Code at /Applications/Visual Studio Code.app/Contents
โข Flutter extension version 3.32.0
[โ] Connected device (2 available)
โข macOS (desktop) โข macos โข darwin-arm64 โข macOS 12.2 21D49 darwin-arm
โข Chrome (web) โข chrome โข web-javascript โข Google Chrome 97.0.4692.99
[โ] HTTP Host Availability
โข All required HTTP hosts are available
โข No issues found!
Is it considered an error for Amplitude? Can it function with this error, I haven't published my app yet.
For example, I have a home page. I want to record the period of time (maybe in seconds or minutes) that a user stays on this page. Is there a function to do so using amplitude? I couldn't find a related function in the document so i'm wondering if i missed some information. Thank you.
Amplitude should get initialized on Web
I get an error instead when I run the code on the web but it works on mobile
PlatformException(error, TypeError: Cannot read properties of undefined (reading 'getInstance'), null, null)
Amplitude amplitude = Amplitude.getInstance();
amplitude.init(Config.amplitudeAppId);
I understand that the usage was very low. But my company needs to support ios 9+.
Is there any reason to no support iOS 9?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.