我正在编写一些nodejs应用程序。我的应用程序对一些npm模块有一些依赖。
在一个任务中,它涉及两个异步操作,两个异步操作以回调和允诺的形式出现。下面我放了一些示例代码:
// the task which should be performed after async operation
var myTask = function(){
// do something
}
// first async operation in the form of callback
cbapi(myTask)
// second async operation in the form of pr
我试图使用以下代码打开用于拍照或视频的android文件选择器或照相机:
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == PICKFILE_RESULT_CODE && Activity.RESULT_OK == resultCode) {
try {
// Get the Uri of the selected file