on-internet
← Community

How can download file in service in android

Stack Overflow ·

I want download file from server and i want download this in background such as service. My codes is : public class MainActivity extends AppCompatActivity { Button download; TextView downloadCount; ProgressBar progressBar; Future<File> downloading; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Enable global Ion logging Ion.getDefault(this).configure().setLogging("ion-sample", Log.DEBUG); setContentView(R.layout.activity_main); download = (Button) findViewById(R.id.download); downloadCount = (TextView) findViewById(R.id.download_count); pr

Comments

Sign in or sign up to comment and upvote.

No comments yet.