THEOplayer / react-native-connectors

THEOplayer React Native connectors
MIT License
3 stars 4 forks source link

Using Agama, we can't set deviceType but always get 'tv' #131

Closed josefnorlin closed 3 months ago

josefnorlin commented 8 months ago

We're looking to separate our AndroidTV app from our STB AndroidTV-launcher.

Looking in the documentation it looks as we can set deviceType in the agamaConfig, but no matter what we set there we always get deviceType: 'tv'.

Looking at the code in DeviceInfo.ts:

export function getAgamaDeviceType(): AgamaDeviceType | undefined {
  return (Platform.OS === 'web') ? getAgamaDeviceTypeWeb() : getAgamaDeviceTypeNative();
}

function getAgamaDeviceTypeNative(): AgamaDeviceType | undefined {
  return Platform.isTV ? 'tv' : DetectableDeviceType.MOBILE_;
}

It looks as the reason is that if Platform.isTV we always get 'tv' as deviceType, which could correlate to our findings.

Even if we send:

{"application": "xxxxxx", "applicationVersion": "xxxxx", "config": "emp_service=https://agama.tv.telenor.se:443/report;report_interval=30;id_report_interval=240;operator_id=xxxxxxx", "deviceID": "00000000-0000-0000-0000-xxxxxxxxx", "deviceManufacturer": "xxxx", "deviceModel": "xxxxxxx", "deviceType": "media-streamer", "integration": "agama", "logLevel": "info", "userAccountID": "xxxxxxx"}

It shows up as deviceType: 'tv'

Tested on theoplayer/react-native-analytics-agama version 1.2.1

josefnorlin commented 8 months ago

These are the ones that at least should be available:

image

But we want to be able to send as 'stb' as well. Which we find nothing in the documentation limiting us to do, so if not a free text field. Our feature request would be those in the image + 'stb'.

wjoosen commented 8 months ago

Looking in the documentation it looks as we can set deviceType in the agamaConfig, but no matter what we set there we always get deviceType: 'tv'.

Which documentation suggests that this is possible? If you check the AgamaConfiguration interface, you'll see that this property is not available and thus will be disregarded if you provide it anyway.

Confusion may be caused by the AgamaPlayerConfiguration documentation of the THEOplayer Web SDK's Agama integration. This is a different integration than the react native integration you're reporting this issue for.

We'll review your feature request. In the meantime, feel free to contribute or to make changes to your fork of react-native-theoplayer-analytics if you want to speed things up.

Kind regards, Wonne

tvanlaerhoven commented 3 months ago

@josefnorlin closing this ticket for now; please reach out to us if you still see issues.