Way to disable Android system download manager notification after file download

Hi,

I am developing app that downloads pdf file in background and shows it on the screen in my app. The problem is that with every completed download I get notification on Android system status bar from Android download manager telling me thet file was downloaded. Is there any way to disable that notification?

I tried extension made by Anke DownloadToASD but as I mentioned in that topic it is not working for me (getting error from ClickZ exntension when DownloadToASD is included in my app.
https://community.appinventor.mit.edu/t/extension-to-download-a-file-to-asd-app-specific-directory-without-write-permission/19367/67?u=dawid

Adding:

<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />

to manifest file also not giving any results.

I have apk file of other application which was made in MIT app inventor and which does not have this specific permission in manifest but despite this fact it is not showing download notification. So there has to be different way of getting rid of this notification. Any ideas? :slight_smile:

How are you downloading the pdf files ? Show your blocks.

nothing special I think

Ah, you are using CustomWebView extension (nothing special :wink: ???)

Over to @vknow360

If you used the web component to download, you would not get a notification.

Ah, you're right :slight_smile:

I'm using javascript to click on the link. After clicking download is started.

So im gonna try with the web component and see the result.

EDIT:
Ok, but how do I do that? :stuck_out_tongue: The link is different each time so im not able to set one link. What is more link is somehow hidden in javasrcipt.
That's why I am using click() javascript method.

A new property named NotificationVisibility has been added in v12beta. You can try setting its value to 2 0 .

2 Likes

ok, so what should I set now in downloadDir?

with

I get:

I know I made some stupid mistake here but can't pass this problem :expressionless:

EDIT:
So as a downoad directory I used:

~/Download

and file download with successful. When NotificationVisibility was set to 2 i got:

obraz

but after selecting NotificationVisibility to 0 file finally downloaded without Android download manager notification :slight_smile:

1 Like

Try this one:
de.bodymindpower.downloadtoasd_noNotif.aix (16.7 KB)

Manifest:

Tested on Android 11+ with the APK.

Note: You must test it with the compiled app (APK), because this permission in not declared in the Manifest of the Companion APK.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.