[DISCONTINUED] Extension to download a file to ASD (app-specific directory) without WRITE permission

It is a WordPress download link, nothing fancy, like: https://www.domain.com/?product=MTMsNDg1OT/doc.pdf or https://www.domain.com/?product=MjA0MzUsNDc/audio.mp3

Try to download a file using the Web component using the same link. I think you will have the same problem. If so, it is WordPress related.

So try Google Drive or your own server.

Thanks @Taifun & @Anke!
I found my mistake: the WP site has protected access by password, and the cookie is not saved after the first access. As a result, the 4.2k file is an HTML file of the protected page info!

Sorry for the noise here, and thanks again, @Anke, for this absolutely useful extension!

By the way, if you have any idea how to save the protected access cookie, I'd appreciate it. :wink:

I have created the APK successfully.
When try to run this APK file is crashed.
Everything worked successfully with version nb197d.

Can I resolved this problem.

Does the previous version of the app work OK ?

What did you change in the app in your latest version that builds, (installs ?) but crashes when you run it?

Is this all being tested on the same device?

Any extensions ?

Does the previous version of the app work OK ?

  • Yes it's working fine

What did you change in the app in your latest version that builds, (installs ?) but crashes when you run it?

  • I haven't changed anything. I wanted to compile it with the new google requirements.

Is this all being tested on the same device?

  • I nave make test in tri deferent devices.

Any extensions ?

  • I can give you project to make a test.

To find out what's going on use logcat

Taifun

How to get a logcat outpuröt is described in detail in my previous link
What you are providing does not help at all

Taifun

Alternatively, install a crash log viewer on your phone and post the logs here.

adb logcat *:E >crash.txt

crash.txt (238.2 KB)

here are the relevant parts from logcat

08-20 21:06:17.165 27909 27909 E AndroidRuntime: Process: appinventor.ai_bioanalizer_com.Analizer, PID: 27909
08-20 21:06:17.165 27909 27909 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{appinventor.ai_bioanalizer_com.Analizer/appinventor.ai_bioanalizer_com.Analizer.Screen1}: java.lang.SecurityException: appinventor.ai_bioanalizer_com.Analizer: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts

it looks like you are using an extension, which not has been updated to SDK 34
and more from logcat

08-20 21:06:17.165 27909 27909 E AndroidRuntime: Caused by: java.lang.SecurityException: appinventor.ai_bioanalizer_com.Analizer: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.os.Parcel.createExceptionOrNull(Parcel.java:3087)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.os.Parcel.createException(Parcel.java:3071)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:3054)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.os.Parcel.readException(Parcel.java:2996)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1868)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.app.ContextImpl.registerReceiver(ContextImpl.java:1804)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:765)
08-20 21:06:17.165 27909 27909 E AndroidRuntime: at de.bodymindpower.downloadtoasd.DownloadToASD.(DownloadToASD.java:58)

@Anke please check your extension

Taifun

I have post here for problems with DownloadToASD.

I upload v4. Make APK and all is OK.

After few days I see V2 . Here is picture from Extension
image.

Upload new Version 4.
image

After few days I see V2 .

Now I make APK, but program is crashed.

So what's the problem?

Did you already update the extension to follow the sdk34 behavioral changes?

Taifun

No, I don't think it's necessary.

Let me respectfully disagree
From the stackoverflow link

As discussed at Google I/O 2023, registering receivers with intention using the RECEIVER_EXPORTED / RECEIVER_NOT_EXPORTED flag was introduced as part of Android 13 and is now a requirement for apps running on Android 14 or higher (U+).

If you do not implement this, the system will throw a security exception.

Taifun

1 Like

Well, I think I won't continue to adapt my extensions to these idiotic targetSdkVersion restrictions. I've done that long and often enough. Now it's someone else's turn. There are a number of good alternatives to my extension.

Fortunately, I have nothing to do with this ridiculous annual SDK circus on iOS.

Alternative extensions

Taken from the extensions directory App Inventor Extensions | Pura Vida Apps