private void doRename(final String newName) {
Async.executeAsync(device, new Async.ApiProcedure<ParticleDevice>() {
@Override
public Void callApi(@NonNull ParticleDevice sparkDevice) throws ParticleCloudException, IOException {
device.setName(newName);
EventBus.getDefault().post(device);
return null;
}
@Override
public void onFailure(@NonNull ParticleCloudException exception) {
new MaterialDialog.Builder(activity)
.theme(Theme.LIGHT)
.title("Unable to rename core")
.content(exception.getBestMessage())
.positiveText("OK");
}
}).andIgnoreCallbacksIfActivityIsFinishing(activity);
}
RenameHelper.java 文件源码
java
阅读 91
收藏 0
点赞 0
评论 0
项目:photon-tinker-android
作者:
评论列表
文章目录