Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FetchConst should probably be public #48

Closed
jacobtabak opened this issue May 19, 2017 · 3 comments
Closed

FetchConst should probably be public #48

jacobtabak opened this issue May 19, 2017 · 3 comments

Comments

@jacobtabak
Copy link
Contributor

When you query the status of a download, you get a RequestInfo object that has a status value which is an integer that corresponds to the status codes in FetchConst. However, since FetchConst is not public, there is no way to to perform logic on the status unless the client app hard codes those values.

@tonyofrancis
Copy link
Owner

tonyofrancis commented May 19, 2017

@jacobtabak the Fetch class implements FetchConst. You can access the different statuses and error messages like so: Fetch.STATUS_DOWNLOADING or Fetch.ERROR_FILE_NOT_FOUND*. FetchService also extends FetchConst.

@jacobtabak
Copy link
Contributor Author

Hm, I don't find that very intuitive. What is the point of having those consts live anywhere other than in the place they are defined? It seems like FetchConst should be a public class and all of the members should be public static final.

@DevOfLife
Copy link

as tonyo said, the Fetch class implements FetchConst
and Fetch defined public, so don't worry about FetchConst public or not
anyone code different, i cannot see the reason of "FetchConst should be a public class"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants