当前位置:网站首页>Jerry's watch reads the file through the file name [chapter]

Jerry's watch reads the file through the file name [chapter]

2022-07-06 17:54:00 Rambo-Lamborghini

//WatchManager yes WatchOpImpl Subclasses of , Must be in 1.3 Good configuration sdkWatchManagerwatchManager=WatchManager.getInstance();Stringname=“ file name ”;Stringpath=“ Save the path ”;Listlist=FileBrowseManager.getInstance().getOnlineDev();if(list.size()<1){// There is no online device return;}SDCardBeansdCardBean=list.get(0);// Get the device , If there are multiple devices , Please get the corresponding equipment according to your needs intdevHandle=sdCardBean.getDevHandler();booleanunicode=false;// Whether the file name supports long file names ( Long file adoption unicode code , Short file names are used 8+3 Structural ASCII code )

GetFileByNameTask.Paramparam=newGetFileByNameTask.Param(devHandle,name,path,unicode);GetFileByNameTasktask=newGetFileByNameTask(watchManager,param);task.setListener(newTaskListener(){@OverridepublicvoidonBegin(){// Start }@OverridepublicvoidonProgress(intprogress){// Progress callback }@OverridepublicvoidonFinish(){// success }@OverridepublicvoidonError(intcode,Stringmsg){// Failure }@OverridepublicvoidonCancel(intreason){// Cancel }});task.start();

原网站

版权声明
本文为[Rambo-Lamborghini]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131304533218.html