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

Not able to access OnDownloadListener Interface in kotlin #200

Open
rmbhati opened this issue Sep 20, 2022 · 1 comment
Open

Not able to access OnDownloadListener Interface in kotlin #200

rmbhati opened this issue Sep 20, 2022 · 1 comment

Comments

@rmbhati
Copy link

rmbhati commented Sep 20, 2022

JAVA code

.start(new OnDownloadListener() {
@OverRide
public void onDownloadComplete() {
buttonOne.setEnabled(false);
buttonCancelOne.setEnabled(false);
buttonOne.setText(R.string.completed);
}

                        @Override
                        public void onError(Error error) {
                            buttonOne.setText(R.string.start);
                            Toast.makeText(getApplicationContext(), getString(R.string.some_error_occurred) + " " + "1", Toast.LENGTH_SHORT).show();
                            textViewProgressOne.setText("");
                            progressBarOne.setProgress(0);
                            downloadIdOne = 0;
                            buttonCancelOne.setEnabled(false);
                            progressBarOne.setIndeterminate(false);
                            buttonOne.setEnabled(true);
                        }
                    });

Kotlin
In kotlin i am not able to access

.start(listner OnDownloadListener)

@HariAgus
Copy link

HariAgus commented Dec 15, 2022

.build()
.start(object : OnDownloadListener {

}

Try use like that's

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

2 participants