Android Question intent ACTION_SEND zip file fial

Albert Lin

Member
Licensed User
Longtime User
Hello
I'm trying to send a .zip file to LineApp in my code as below, but the .zip seems broken and couldn't be opened on LineApp.
I used to send .mp3 to lineApp, it's totally ok. I was just wondering what's wrong with .zip file
Is 2.3MB zip file too big to be sent?

Thanks for help

Albert Lim

B4X:
Sub ToLineApp_ZipFile( FullName As String) 
    Dim i As Intent, u As Uri, pm As PackageManager, theApp As String, ext As String
    
    u.Parse("file://" & FullName )

    i.Initialize(i.ACTION_SEND, "")
    i.SetType("application/zip")
    i.PutExtra("android.intent.extra.STREAM",u)
    i.SetPackage("jp.naver.line.android")
    StartActivity(i)
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
What is the content of "Fullname"?
What Androidversion are you running it on?

Please note that file://-URIs are not allowed any longer since a few years (Api 24 and above (we are at 30+ as of now))

 
Last edited:
Upvote 0

Albert Lin

Member
Licensed User
Longtime User
What is the content of "Fullname"?
What Androidversion are you running it on?

Please note that file://-URIs are not allowed any longer since a few years (Api 24 and above (we are at 30+ as of now))

Fullname: File.DirRootExternal & "/__NetFlix_Word/3.zip"
Version: uses-sdk android:minSdkVersion="9" android:targetSdkVersion="22

but it is ok for File.DirRootExternal & "/__NetFlix_Word/1.mp3"
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
File.DirRootExternal
Code with File.DirRootExternal = broken code

Check the link i mentioned. You need to use Fileprovider

Version: uses-sdk android:minSdkVersion="9" android:targetSdkVersion="22
Your app is not on Playstore, right? For playstoreapps the targetsdk must be 30.
 
Upvote 1
Top