Hello ! I use React Native SDK and library "@amplitude/analytics-react-native": "0.5.1", and it’s work fine for IOS, but have some problem with Android. When I try some event I have error like on screenshot
This code - how I initialize amplitude and call inside component . Could you please help me to find what might be wrong?
Page 1 / 1
@Gaka Happy to help!
Are you using the React Native SDK Beta, here? I can see that you are using Ampli to initialize the SDK, however, if you are using React Native Beta Ampli is not yet supported as mentioned in the documentation, here.
In order to use Ampli with React you will need to use the legacy version of the SDK, here.
Hello @eddie.gaona!
Yes, you are right, thanks a lot! The error disappear, but events from Android device still does not come to Amplitude service. Apparently this error was not the reason for not delivering events from android.
Maybe something another thing is not supported too? What might be a reason? Now I use React Native SDK legacy and library "@amplitude/react-native": "2.16.2"
Hello @Gaka sounds like you are no longer seeing the error but events are not being ingested for Android devices.
I see that you have added a source “react_native_sdk_legacy” but when I look at the tracking plan none of the events have this source. Can you add this source to your events and try again?
For example, your login event does not have any sources and in order to use Ampli you need to add sources to your events.
Hello @eddie.gaona ! Thank you for your answer! Yes, I added react_native_sdk_legacy for some events, and try it. From IOS emulator everything is fine, all events with this source I can see in Amplitude User Look-Up. But when I try the same from Android device - nothing happens. Now, with React Native SDK legacy I initialise amplitude like this code below:
function initAmplitude() { const ampInstance = Amplitude.getInstance(); return ampInstance.init(api_key); }
Maybe something else needs to be enabled? Maybe some Amplitude property's or settings ?
Hello @Gaka apologies for the delay as it was a short week!
I can see that events from the Android platform have been logged into your Amplitude account. Are you still experiencing issues on your end?
For example the event, Take step photo, has seen data ingested for the project beginning with “Development”.
Hello @eddie.gaona ! Unfortunately there is still strange behavior for android devices. My team and me tried on different physical android device - Samsung Galaxy A41 with Android OS 10 and Realme 6 with Android OS 11. And from Samsung everything work fine. I can see events from this device in Amplitude. But for some reason, I can’t send events from Realme device. We tested it on the same version of build. No error, also internet connection is stable . Maybe Amplitude have some restriction for android devices?
Facing below error Amplitude Logger Error]: Event forwarded to Hotjar API. can you suggest on this
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you're a current customer, select the domain you use to sign in with Amplitude.
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
If you're a current customer, select the domain you use to sign in with Amplitude.