Fetch: Request Feature

Created on 19 May 2018  路  3Comments  路  Source: tonyofrancis/Fetch

So powerful download manager library bro. Thank for this library .Please add Custom Field for download object and notification for download status bro.

question

Most helpful comment

@DeevD Thanks for using Fetch. The request and download object has a tag field that you can use to add custom data on a download. Example

        final Request newRequest = new Request(url, file);
        newRequest.setGroupId(newGroupId);
        newRequest.setTag("Custom Data. You can use custom json"); // set custom data here

        fetch.enqueue(newRequest, new Func<Download>() {
            @Override
            public void call(Download download) {
                //Enqueued Successfully

                download.getTag(); //Get the custom data here
            }
        }, new Func<Error>() {
            @Override
            public void call(Error error) {
                //Error occurred when trying to enqueue.
            }
        });

As for notifications, I do not believe that Fetch should handle this. Being that notifications has to be custom to each application, it would be best for the application developer to provide the notifications. The Fetch Listener provides all the callbacks needed to show the right notification.

All 3 comments

@DeevD Thanks for using Fetch. The request and download object has a tag field that you can use to add custom data on a download. Example

        final Request newRequest = new Request(url, file);
        newRequest.setGroupId(newGroupId);
        newRequest.setTag("Custom Data. You can use custom json"); // set custom data here

        fetch.enqueue(newRequest, new Func<Download>() {
            @Override
            public void call(Download download) {
                //Enqueued Successfully

                download.getTag(); //Get the custom data here
            }
        }, new Func<Error>() {
            @Override
            public void call(Error error) {
                //Error occurred when trying to enqueue.
            }
        });

As for notifications, I do not believe that Fetch should handle this. Being that notifications has to be custom to each application, it would be best for the application developer to provide the notifications. The Fetch Listener provides all the callbacks needed to show the right notification.

thank bro can you provide sample for notification in next release version bro ?

See my previous comment. Fetch will not be implementing notifications.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

burhanaksendir picture burhanaksendir  路  3Comments

jpvs0101 picture jpvs0101  路  3Comments

MohammadFneish7 picture MohammadFneish7  路  4Comments

VitorAndrioli picture VitorAndrioli  路  4Comments

Xenolion picture Xenolion  路  4Comments