public class StickerLocalPackage extends java.lang.Object implements TuSdkDownloadManger.TuSdkDownloadMangerDelegate
限定符和类型 | 类和说明 |
---|---|
static interface |
StickerLocalPackage.StickerPackageDelegate
本地贴纸包委托
|
限定符和类型 | 方法和说明 |
---|---|
boolean |
addStickerGroupFile(java.io.File file,
long groupId,
java.lang.String master)
添加贴纸组
|
void |
appenDelegate(StickerLocalPackage.StickerPackageDelegate delegate)
添加下载管理器委托
|
void |
cancelDownload(long id)
取消下载贴纸
|
void |
cancelLoadImage(android.widget.ImageView posterView)
取消加载图片
|
boolean |
containsGroupId(long groupId)
是否存在包ID
|
void |
download(long id,
java.lang.String key,
java.lang.String fileId)
下载贴纸
|
org.json.JSONObject |
getAllDatas()
获取所有数据
|
java.util.List<StickerCategory> |
getCategories()
分类列表
|
java.util.List<StickerCategory> |
getCategories(java.util.List<StickerCategory> cates)
分类列表
|
StickerCategory |
getCategory(long cateId)
获取分类数据
|
java.util.List<StickerGroup> |
getSmartStickerGroups()
获取所有的动态贴纸组列表
|
java.util.List<StickerGroup> |
getSmartStickerGroups(boolean requireFaceFeature)
获取动态贴纸组列表
|
StickerData |
getSticker(long stickerId)
获取贴纸数据
|
StickerGroup |
getStickerGroup(long groupId)
获取贴纸组数据
|
static StickerLocalPackage |
init(TuSdkConfigs configs)
本地贴纸包
|
boolean |
isInited()
是否初始化完成
|
void |
loadGroupThumb(StickerGroup data,
android.widget.ImageView posterView)
加载贴纸组预览图片
|
android.graphics.Bitmap |
loadSmartStickerItem(StickerData data,
java.lang.String resName)
加载贴纸元素据
|
boolean |
loadStickerItem(StickerData data)
加载贴纸元素据
|
void |
loadThumb(StickerData data,
android.widget.ImageView posterView)
加载贴纸预览图片
|
void |
onDownloadMangerStatusChanged(TuSdkDownloadManger manager,
TuSdkDownloadItem item,
DownloadTaskStatus status)
下载状态改变
|
void |
removeDelegate(StickerLocalPackage.StickerPackageDelegate delegate)
删除下载管理器委托
|
void |
removeDownloadWithIdt(long groupId)
删除下载贴纸包
|
static StickerLocalPackage |
shared()
滤镜管理器
|
public static StickerLocalPackage shared()
public static StickerLocalPackage init(TuSdkConfigs configs)
configs
- Sdk配置public void appenDelegate(StickerLocalPackage.StickerPackageDelegate delegate)
delegate
- 下载管理器委托public void removeDelegate(StickerLocalPackage.StickerPackageDelegate delegate)
delegate
- 下载管理器委托public boolean isInited()
public java.util.List<StickerCategory> getCategories()
public java.util.List<StickerCategory> getCategories(java.util.List<StickerCategory> cates)
public StickerCategory getCategory(long cateId)
public StickerGroup getStickerGroup(long groupId)
public StickerData getSticker(long stickerId)
public boolean containsGroupId(long groupId)
groupId
- public java.util.List<StickerGroup> getSmartStickerGroups()
public java.util.List<StickerGroup> getSmartStickerGroups(boolean requireFaceFeature)
requireFaceFeature
- 是否包含依赖人脸特征的贴纸public void loadThumb(StickerData data, android.widget.ImageView posterView)
public void loadGroupThumb(StickerGroup data, android.widget.ImageView posterView)
public boolean loadStickerItem(StickerData data)
public android.graphics.Bitmap loadSmartStickerItem(StickerData data, java.lang.String resName)
public boolean addStickerGroupFile(java.io.File file, long groupId, java.lang.String master)
file
- 本地贴纸组文件groupId
- 贴纸组idmaster
- masterpublic void download(long id, java.lang.String key, java.lang.String fileId)
public void cancelDownload(long id)
public void removeDownloadWithIdt(long groupId)
public org.json.JSONObject getAllDatas()
public void cancelLoadImage(android.widget.ImageView posterView)
public void onDownloadMangerStatusChanged(TuSdkDownloadManger manager, TuSdkDownloadItem item, DownloadTaskStatus status)
onDownloadMangerStatusChanged
在接口中 TuSdkDownloadManger.TuSdkDownloadMangerDelegate
manager
- 下载管理器item
- 下载对象status
- 下载状态