Closed umasdai closed 7 years ago
AFAIK This can't be done using this plugin.
You are pushing what local notifications can do, so this is not a plugin issue per se.
Ionic has things like spinners and stuff to try and provide this sort of feedback. I'd look at those.
Thanks for the reply. I have been trying to create it but I only got for it to display one of the number it catches. I've tried using the ongoing hoping that the notification will stay there and keep updating the text but it doesnt. Maybe I will try to look at spinners stuff
Also it seems by default the notification have a delay of 5 sec even when I didnt put a specific time.
Thats Android for you. There is no guarantee of immediately delivery with the current plugin.
Yeah, it seems that way. I'm just hoping somebody successfully tried something similar
It has come up before.
We have issues with Ionic and loading indicators and gave up. They never worked for us.
Really?? Well that's a bit disappointing. Still, I'll try to search for any other solution that might display a bit of the progress.
Thanks.
Hi,
I'm new to ionic 2 and i'm using file transfer plugin https://ionicframework.com/docs/native/transfer/ to upload a file in my project. Whenever i'm uploading a file there will be percentage indicator showing the file upload progress. Do you guys have any idea how I want to replicate this in the notification?
Your Environment
cordova -v
): 6.5.0cordova platform ls
):Expected Behavior
I need the notification to keep updating whenever the progress percentage increases until the upload completed to 100%
Actual Behavior
I tried and it only take some of the number and displays only that only updates when the upload completes. It doesnt updates in real time with the progress.
Steps to Reproduce
onProgress = (progressEvent: ProgressEvent) : void => { this.ngZone.run(() => { if (progressEvent.lengthComputable) { let progress = Math.round((progressEvent.loaded / progressEvent.total) * 100); this.uploadNotification(progress); } }); }
public uploadFile() { this.onGoing(); this.fileTransfer.onProgress(this.onProgress); this.fileTransfer.upload(path, url,options).then((result) => { this.localNoti.completeNoti(); },(err) => {
}) }
onGoing(){
}
uploadNotification(fileName){
}
completeNotification(){
}
Context
The onProgress() function will keep updating the value when a file is being uploaded, so I want the value updates the respectively with the notifications showing the upload progress.
Debug logs
No debug logs