2

In com.google.android.gms.tasks.Tasks there is a forResult method which returns a specific result for the task, how related this method to Huawei's tasks?

// return a null result task
Task<?> methodCallTask;
methodCallTask = Tasks.forResult(null);
Kevin M. Mansour
  • 2,915
  • 6
  • 18
  • 35
ccd
  • 5,788
  • 10
  • 46
  • 96

2 Answers2

0

Huawei have com.huawei.hmf.tasks.Tasks.fromResult(null);Similar to google.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
0

The HMS Tasks API reference doc is located at Common-Task (huawei.com).

The GMS Tasks API reference doc is located at Tasks | Google Play services | Google Developers.

Compared both GMS Tasks APIs and HMS Tasks APIs. It looks like they don't have the exact same API of GMS Tasks.forResult(). The closely related HMS Tasks API might be getResult(). Common-Task (huawei.com)

Kevin M. Mansour
  • 2,915
  • 6
  • 18
  • 35
Zinna
  • 1,947
  • 2
  • 5
  • 20