Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lanyusea
Created July 30, 2015 09:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lanyusea/bd98578a65f2d1e72562 to your computer and use it in GitHub Desktop.
Save lanyusea/bd98578a65f2d1e72562 to your computer and use it in GitHub Desktop.
DJIDrone.getDjiCamera().setCameraMode(mode, new DJIExecuteResultCallback(){
@Override
public void onResult(DJIError mErr)
{
// TODO Auto-generated method stub
handler.postDelayed(new Runnable() {
@Override
public void run() {
enterMultipleView();
}
},1000);
}
});
public void enterMultipleView() {
DJIDrone.getDjiCamera().enterMultiplePreviewMode(new DJIExecuteResultCallback(){
@Override
public void onResult(DJIError mErr)
{
// TODO Auto-generated method stub
handler.post(new Runnable() {
@Override
public void run() {
enterMultipleSelect();
}
});
}
});
}
//enter multiple select mode
public void enterMultipleSelect() {
DJIDrone.getDjiCamera().enterMultipleEditMode(new DJIExecuteResultCallback(){
@Override
public void onResult(DJIError mErr)
{
// TODO Auto-generated method stub
handler.postDelayed(new Runnable() {
@Override
public void run() {
selectAll();
}
},2000);
}
});
}
//select all
public void selectAll() {
DJIDrone.getDjiCamera().selectAllFiles(new DJIExecuteResultCallback(){
@Override
public void onResult(DJIError mErr)
{
// TODO Auto-generated method stub
handler.post(new Runnable() {
@Override
public void run() {
downloadAll();
}
});
}
});
}
//download all
public void downloadAll() {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
DJIDrone.getDjiCamera().downloadAllSelectedFiles("Altizure",new DJIFileDownloadCallBack() {
@Override
...
//Following is the same as the one in Demo project
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment