java - Google Drive Api result.getStatus().isSuccess() always true -
i'm managing callback way result success when shouldn't.
example:
- i search file doesn't exist , doesn't show log
- i search file when disconnected internet , still doesn't show log
- even if create file on drive when disconnected internet , set callback creation, result success.
here callback code
resultcallback<driveapi.drivecontentsresult> searchcallback = new resultcallback<driveapi.drivecontentsresult>() { @override public void onresult(driveapi.drivecontentsresult result) { if (!result.getstatus().issuccess()) { log.e(tag, "cant open file"); } } };
what doing wrong?
the android api has offline support, performing operation while offline not fail. instead, changes queued occur when device comes online.
similarly, searching doesn't exist doesn't fail, returns empty result.
you handling of success looks fine, aren't testing cases fail.
Comments
Post a Comment