xxsnakerxx / react-native-flurry-analytics

React Native wrapper for Flurry Analytics
https://developer.yahoo.com/analytics/
MIT License
29 stars 26 forks source link

Android devices showing up as iPhone platform #2

Closed cyrusdg closed 8 years ago

cyrusdg commented 8 years ago

Is it possible to report events on Android to the Android platform in Flurry? Right now, all events, including Android, are showing up under the iPhone platform. I'm guessing it is because our API key is from the iPhone SDK. Is it possible to have them separate using this react native package?

xxsnakerxx commented 8 years ago

@CyrusDG you need to register android app in flurry, then you can do smth like this

import {
  Platform,
} from 'react-native';

const flurryApiKey = {
  ios: 'ios_key_here',
  android: 'android_key_here',
}

// somewhere in your app
FlurryAnalytics.startSession(flurryApiKey[Platform.OS]);
cyrusdg commented 8 years ago

Perfect -- thanks for the quickly reply!