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

xamarin froms android 9 download pause #101

Open
4 tasks
abdullam09 opened this issue Dec 8, 2018 · 9 comments
Open
4 tasks

xamarin froms android 9 download pause #101

abdullam09 opened this issue Dec 8, 2018 · 9 comments
Labels
feedback-needed The author needs to provide feedback because it's not clear what to do or how to reproduce the bug.

Comments

@abdullam09
Copy link

Hi,
issue:

  1. download file using the same code as in the example for android versions works fine, when i tried to use it in android 9 it goes form initialized to pausing and remains there

Expected behavior

it should go from initializing to running

Actual behavior

Tell us what happens instead
it remains in pause

Configuration

Platform:

  • iOS
  • [x ] Android
  • UWP
  • Other

Device:

  • Simulator
  • [ x] Real device (please specify)
    poco phone rooted and running android pie LineageOS
@matheusmelato
Copy link

I'm experiencing a similar issue.

When I try do download a file using Genymotion with Android 9, the download begins and fail. The download does not even get started

Did you have found a solution for your problem?

@SimonSimCity
Copy link
Owner

SimonSimCity commented Jan 8, 2019

@abdullam09 since you only experience it on a real device, I have no choice but to get a device where LineageOS is used. Furthermore, you're using a version which is compatible with Android 9, which (as of the time writing) is not part of an official stable release.

@matheusmelato you report this problem with a simulator. Do you also have it on a real device?

Are you both able to reproduce this using the sample project in this repository?

@SimonSimCity SimonSimCity added the feedback-needed The author needs to provide feedback because it's not clear what to do or how to reproduce the bug. label Jan 8, 2019
@tfalasco
Copy link

I am also having the same issue on a Samsung S9, Android version 9 (Pie).

The problem can temporarily be worked around by clearing data and clearing cache in the Download Manager app in the device settings. After doing so, the download does not pause. However, rebooting the phone causes the issue to recur.

@SimonSimCity
Copy link
Owner

@tfalasco as of your description, it sounds like a problem with the Android internal download-manager. Can you please check if you also get the problem when not using Xamarin Forms - e.g. when using the sample I included in the repository here?

@prenner0
Copy link

prenner0 commented Nov 5, 2019

Similar problem here with Samsung Galaxy A40 and Huawai P10 (both Android 9):
Download goes to FAILED immediately when downloading from a http URL. With https, we experience the same PAUSED state switch.
Clearing the Download Manager data does not solve the issue for us.

@SimonSimCity
Copy link
Owner

SimonSimCity commented Nov 5, 2019

@prenner0 can you confirm that it also happens using the sample application included in this repo?

@prenner0
Copy link

prenner0 commented Nov 7, 2019

Will try the example as well - temporary fix for us: Use http instead of https and allow clear text transfer. Maybe the issue is due to the security settings of the download manager.

@drewkeller
Copy link

Yes, it happens for me with the example project using the Android device emulator that Visual Studio instantiates (emulating a Pixel of some flavor). Simply updating the example project from Android 7.1 (which works) to Android 9.0 (compile and target options), causes the download to fail with HTTP error code 400.

The example is already using http (not https). Apparently beginning with Android 9.0, clear text is disallowed by default. It can be allowed by adding android:usesCleartextTraffic="true" in the Android manifest of the project. After adding that to the example project, the download was able to complete successfully (thanks @prenner0 for the note).

@SimonSimCity
Copy link
Owner

Could you please create a PR for this? I have quite little time at hand these days and am not actively involved with app development anymore. Therefore I can't guarantee to spend much time this repo in the foreseeable future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feedback-needed The author needs to provide feedback because it's not clear what to do or how to reproduce the bug.
Projects
None yet
Development

No branches or pull requests

6 participants