-
-
Save lanyusea/bd98578a65f2d1e72562 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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