public class

DeviceInfoTools

extends Object
java.lang.Object
   ↳ org.opencdnunion.media.streamer.util.device.DeviceInfoTools

Class Overview

硬编即在使用金山云推流SDK时使用Android硬件编码 硬编默认需要在4.3 (18)以上系统 金山云服务器根据实际测试结果存储了一部分机型系统的硬编支持情况 可以通过该类从服务端获取当前机型是否在硬编白名单中,并且把相关信息存储在本地 建议在APK联网后调用init接口 通过getDeviceInfo可以获取到机型信息,默认硬编为不支持硬编

Summary

Nested Classes
interface DeviceInfoTools.OnRequesetDeviceInfoListener  
Constants
int REQUEST_ERROR_FAILED
int REQUEST_ERROR_PARSE_FILED
Fields
public DeviceInfoTools.OnRequesetDeviceInfoListener mRequestListener
Public Methods
DeviceInfo getDeviceInfo()
如果没有init并且也没有本地数据,返回默认信息 本地信息过期,或者未存储过本地信息,向服务器发起请求
static DeviceInfoTools getInstance()
void init(Context context)
初始化SharedPreferences,用于将信息存储在本地 若本地无数据,或者数据过期,触发向服务端请求
void sendDeviceInfoRequest(DeviceInfoTools.OnRequesetDeviceInfoListener listener, String model, String osver)
request hw encode support info frome server just for test
void unInit()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int REQUEST_ERROR_FAILED

Constant Value: -1001 (0xfffffc17)

public static final int REQUEST_ERROR_PARSE_FILED

Constant Value: -1002 (0xfffffc16)

Fields

Public Methods

public DeviceInfo getDeviceInfo ()

如果没有init并且也没有本地数据,返回默认信息 本地信息过期,或者未存储过本地信息,向服务器发起请求

public static DeviceInfoTools getInstance ()

public void init (Context context)

初始化SharedPreferences,用于将信息存储在本地 若本地无数据,或者数据过期,触发向服务端请求

Throws
IllegalArgumentException

public void sendDeviceInfoRequest (DeviceInfoTools.OnRequesetDeviceInfoListener listener, String model, String osver)

request hw encode support info frome server just for test

public void unInit ()