mirror of
https://github.com/KeymonSoft/Lanterna.git
synced 2026-04-20 06:09:16 +00:00
-Se agregó la opcion de enviar la base de datos por correo o whatsapp
This commit is contained in:
@@ -50,6 +50,7 @@ Sub Class_Globals
|
||||
Private CheckBox1 As CheckBox
|
||||
Private b_leyendaDescuento As Button
|
||||
Private p_leyendaDescuento As Panel
|
||||
Public Provider As FileProvider
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -147,8 +148,31 @@ Private Sub b_server_Click
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'Enviamos la base de datos por correo o Whatsapp.
|
||||
Private Sub b_envioBD_Click
|
||||
|
||||
'Hay que agregar las siguientes lineas al manifiesto:
|
||||
'AddApplicationText(<Provider android:name="android.support.v4.content.FileProvider"
|
||||
' android:authorities="$PACKAGE$.provider" android:exported="false"
|
||||
' android:grantUriPermissions="true"><meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths"/>
|
||||
' </Provider>)
|
||||
'CreateResource(xml, provider_paths,
|
||||
' <paths><external-files-path name="name" path="" /><files-path name="name" path="" /><files-path name="name" path="shared" /></paths>
|
||||
')
|
||||
Dim Provider As FileProvider
|
||||
Provider.Initialize
|
||||
Dim FileName As String = "kmt.db"
|
||||
'copy the shared file to the shared folder
|
||||
Log("xxxxxx:"&Provider.SharedFolder)
|
||||
Sleep(1000)
|
||||
File.Copy(File.DirInternal, FileName, Provider.SharedFolder, FileName)
|
||||
Dim email As Email
|
||||
email.To.Add("soporte@keymonsoft.com")
|
||||
email.Subject = "Envio Base de datos Mariana Censos"
|
||||
email.Attachments.Add(Provider.GetFileUri(FileName))
|
||||
' email.Attachments.Add(Provider.GetFileUri(FileName)) 'second attachment
|
||||
Dim in As Intent = email.GetIntent
|
||||
in.Flags = 1 'FLAG_GRANT_READ_URI_PERMISSION
|
||||
StartActivity(in)
|
||||
End Sub
|
||||
|
||||
Private Sub i_conf_Click
|
||||
|
||||
Reference in New Issue
Block a user