



manager.addOnMediaKeyEventSessionChangedListener((Executor) Runnable::run,
new MediaSessionManager.OnMediaKeyEventSessionChangedListener() {
@Override
public void onMediaKeyEventSessionChanged(@NonNull String pkgName,
@Nullable MediaSession.Token token) {
Logger.tag(TAG).i("onMediaKeyEventSessionChanged pkgName: "
+ pkgName + ", MediaSession.Token: " + token);
if (!TextUtils.isEmpty(pkgName) && token == null) {
updateMediaSessionByPlayer();
}
}
});
- @Override
public void getContentByCategoryId(int categoryId) { for (ICategoryPagerCallback callback : mCallbacks) { if (callback.getCategoryId() == categoryId) { callback.onLoading(); } } Integer targetPage = pagesInfo.get(categoryId); if (targetPage == null) { targetPage = DEFAULT_PAGE; pagesInfo.put(categoryId, targetPage); } Call<HomePagerContent> task = createTask(categoryId, targetPage); task.enqueue(new Callback<HomePagerContent>() { @Override public void onResponse(Call<HomePagerContent> call, Response<HomePagerContent> response) { int code = response.code(); LogUtils.e(CategoryPagePresenterImpl.this, "CODE -->" + code); if (code == HttpURLConnection.HTTP_OK) { HomePagerContent pagerContent = response.body(); //这里把请求的数据打印出来 LogUtils.e(CategoryPagePresenterImpl.this, "pagerContent -->" + pagerContent); LogUtils.e(CategoryPagePresenterImpl.this, "getPictUrl -->" + pagerContent.getData().get(0).getPictUrl()); LogUtils.e(CategoryPagePresenterImpl.this, "getTitle -->" + pagerContent.getData().get(0).getTitle()); ////////////////// handleHomePagerContentResult(pagerContent, categoryId); } else { handleNetworkError(categoryId); } } @Override public void onFailure(Call<HomePagerContent> call, Throwable t) { LogUtils.e(CategoryPagePresenterImpl.this, "onFailure"); handleNetworkError(categoryId); } }); }
下面是请求的数据日志
这是我请求有问题还是后台的数据本来就是空的?
DataDTO{
categoryId=null, categoryName=null, clickUrl='null', commissionRate='null', couponAmount=null, couponClickUrl='null', couponEndTime='null', couponInfo=null, couponRemainCount=null, couponShareUrl='null', couponStartFee='null', couponStartTime='null', couponTotalCount=null, itemDescription='null', itemId=null, levelOneCategoryId=null, levelOneCategoryName='null', nick='null', pictUrl='null', sellerId=null, shopTitle='null', smallImages=null, title='康恩贝蓝莓叶黄素酯片黑加仑专利中老年儿童学生官方旗舰店正品', userType=null, volume=10000, zkFinalPrice='null'
}
然后有一个支付回调的paySuccess方法,需要调用这三个方法去修改信息并且处理其他信息。


1.想做一个APP,但是呢,这个APP有部分算法一般是不动的,因为更新它会涉及一些法规,(其他的内容是需要时不时更新的)所以我想什么样一个框架可以满足呢。
- 1
- 2
- 3
- 4
- 5
- 6
- 20