Open danielickes opened 2 years ago
Running into this same issue as well. Trying to go from background-http 5.0.2 -> 6.0.0. to get around the issue of targeting Android SDK 31+ (https://github.com/NativeScript/plugins/issues/217). Have been through the docs and everything is setup correctly, including adding the init() in main.ts.
including adding the init() in main.ts.
Saved my week! Thanks! It works in my case with: "@nativescript/core": "~8.2.1", "@nativescript/angular": "^13.0.0", "@nativescript/background-http": "^6.0.0",
I had to create a Notification Channel and attach it to the request:
Sorry for the image, code was not working fine. Does that work for you?
including adding the init() in main.ts.
Saved my week! Thanks! It works in my case with: "@nativescript/core": "~8.2.1", "@nativescript/angular": "^13.0.0", "@nativescript/background-http": "^6.0.0",
I had to create a Notification Channel and attach it to the request:
Sorry for the image, code was not working fine. Does that work for you?
@Cateye82 can you let me know, whether I can resolve this in nativescript 6x or I have to upgrade to 8x for sure
As far as i remember, the version 6 doesn't need that init() and also not the "if (android.os.Build.Version...." part. So the notificationManager is not needed (skip the first 11 lines of the androidUploadFiles method).
@Cateye82 I need the changes as you mentioned above, with nativescript 6.8.0 & @nativescript/background-http: 6.0.0 version.
Now I'm getting this error "ERROR TypeError: Cannot read property 'NotificationConfig' of undefined"
Can you please let me know how to fix
Hello, after updating to newest NativeScript version, we're experiencing issues with file upload. It worked previously with NativeScript 6.
Packages:
Upload config:
When executing, we're getting following error:
Tested on multiple Android devices with android versions from 10 to 12. Not sure if iOS has the same error. Any suggestions?