react-native-segment
react-native-segment copied to clipboard
Android support
Any roadmap plans for this to function with Android?
Definitely not perfect, but I filed a PR for Android support here: https://github.com/smore-inc/react-native-segment-io-analytics/pull/18
any updates on the android support ?
@mrharel did you check out https://github.com/smore-inc/react-native-segment-io-analytics ?
@mrharel: update, to the best of my knowledge, is that, as @kevinstumpf points out, smore-inc's version has an android PR, and that @cancan101 cleaned up my PR wonderfully: smore-inc/react-native-segment-io-analytics#26 in a way that's hopefully reasonably usable, depending on the rigor and extent of your needs.
thanks for the update. actually, since i only needed the identity i decided that it will be much simpler just to use the HTTP API using fetch to support all devices
fetch('https://api.segment.io/v1/identify',{
method: "POST",
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': 'Basic eVFQcWZwaXcwQTdueU1kdmlweDACeWo1V2NFV2RCTEs6 '
},
body: JSON.stringify(segmentData)
}).then((response) => response.json())
.then((responseData) => {
console.log(responseData);
}).catch((err)=>{
console.error(err);
});
i have to provide the context data manually (OS and version...) but other than that it is very simple.
Nice. Keepin' it simple. 👍