In my simple method in non activity class, I am using code:
mgr=(DownloadManager)mContext.getSystemService(DOWNLOAD_SERVICE);
in non activity class, my constructor looks like:
public Download23(Context context){
this.mContext=context;
}
But compilator won't accept DOWNLOAD_SERVICE string. Do you know how to solve that?
Instead you could just write
(DownloadManager)mContext.getSystemService(Context.DOWNLOAD_SERVICE);
That would compile.
DOWNLOAD_SERVICE
is a constant of Context class.
you can use
(DownloadManager)mContext.getSystemService(Context.DOWNLOAD_SERVICE);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With