Dim out As OutputStream = File.OpenOutput(File.DirRootExternal,"SmartCommerce/Fatture/"& LnomeAziendaSel.Text&"/"& LnomeAziendaSel.Text&id&".pdf", False)
pdf.WriteToStream(out)
out.Close
pdf.Close
ToastMessageShow("Fattura generata con successo",True)
Dim intent As Intent
intent.Initialize(intent.ACTION_VIEW,CreateFileProviderUri(Starter.shared,LnomeAziendaSel.Text &id&".pdf"))
'intent.Initialize(intent.ACTION_VIEW,"file://"&File.Combine(File.DirRootExternal, "SmartCommerce/Fatture/"& LnomeAziendaSel.Text&"/"& LnomeAziendaSel.Text &id&".pdf"))
intent.Flags = 1
intent.SetComponent("android/com.android.internal.app.ResolverActivity")
intent.SetType("application/pdf")
StartActivity(intent)