-Se agregó la opcion de enviar la base de datos por correo o whatsapp

This commit is contained in:
2024-04-02 12:16:39 -06:00
parent 2457e673ef
commit 24e96e7912
4 changed files with 43 additions and 19 deletions

View File

@@ -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

View File

@@ -49,23 +49,24 @@ FileGroup8=Default Group
FileGroup9=Default Group
Group=Default Group
Library1=appupdating
Library10=randomaccessfile
Library11=runtimepermissions
Library12=serial
Library13=sql
Library14=stringutils
Library15=wobblemenu
Library16=xui
Library17=javaobject
Library10=preoptimizedclv
Library11=randomaccessfile
Library12=runtimepermissions
Library13=serial
Library14=sql
Library15=stringutils
Library16=wobblemenu
Library17=xui
Library18=fileprovider
Library2=b4xpages
Library3=byteconverter
Library4=compressstrings
Library5=core
Library6=json
Library7=okhttputils2
Library8=phone
Library9=preoptimizedclv
ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="31"/>~\n~<supports-screens android:largeScreens="true" ~\n~ android:normalScreens="true" ~\n~ android:smallScreens="true" ~\n~ android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.LightTheme)~\n~'End of default text.~\n~~\n~SetApplicationAttribute(android:usesCleartextTraffic, "true")~\n~AddPermission(android.permission.BLUETOOTH_ADVERTISE)~\n~AddPermission(android.permission.BLUETOOTH_CONNECT)~\n~AddPermission(android.permission.BLUETOOTH_SCAN)~\n~SetApplicationAttribute(android:largeHeap, "true")~\n~SetApplicationAttribute(android:allowBackup, "false")~\n~SetApplicationAttribute(android:exported, "true")
Library6=javaobject
Library7=json
Library8=okhttputils2
Library9=phone
ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="31"/>~\n~<supports-screens android:largeScreens="true" ~\n~ android:normalScreens="true" ~\n~ android:smallScreens="true" ~\n~ android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.LightTheme)~\n~'End of default text.~\n~~\n~SetApplicationAttribute(android:usesCleartextTraffic, "true")~\n~AddPermission(android.permission.BLUETOOTH_ADVERTISE)~\n~AddPermission(android.permission.BLUETOOTH_CONNECT)~\n~AddPermission(android.permission.BLUETOOTH_SCAN)~\n~SetApplicationAttribute(android:largeHeap, "true")~\n~SetApplicationAttribute(android:allowBackup, "false")~\n~SetApplicationAttribute(android:exported, "true")~\n~~\n~AddApplicationText(<provider android:name="android.support.v4.content.FileProvider"~\n~ android:authorities="$PACKAGE$.provider" android:exported="false"~\n~ android:grantUriPermissions="true"><meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths"/>~\n~ </provider>)~\n~CreateResource(xml, provider_paths,~\n~ <paths><external-files-path name="name" path="" /><files-path name="name" path="" /><files-path name="name" path="shared" /></paths>~\n~)
Module1=B4XMainPage
Module2=C_Principal
Module3=DBRequestManager
@@ -75,14 +76,14 @@ Module6=numeroATexto
Module7=Starter
Module8=Subs
NumberOfFiles=24
NumberOfLibraries=17
NumberOfLibraries=18
NumberOfModules=8
Version=12.5
Version=12.8
@EndOfDesignText@
#Region Project Attributes
#ApplicationLabel: Lanterna
#VersionCode: 1
#VersionName: 4.03.29
#VersionName: 4.04.01
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False

View File

@@ -25,6 +25,6 @@ ModuleClosedNodes5=
ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=47,48
NavigationStack=C_Principal,B4XPage_Appear,277,0,Main,Activity_ActionBarHomeClick,33,0,Main,Activity_KeyPress,39,0,C_Principal,Class_Globals,123,0,Subs,traeTotalTicketActual_P,1173,6,C_Principal,b_leyendaDescuento_Click,2587,6,Visual Designer,principal.bal,-100,6,C_Principal,b_mesaCerrar_Click,1126,0,C_Principal,agregaFormaDePago,2255,0,Main,Globals,21,0
NavigationStack=Subs,Process_Globals,15,0,C_Principal,b_mesaCerrar_Click,1126,0,C_Principal,agregaFormaDePago,2255,0,Main,Globals,21,0,Visual Designer,principal.bal,-100,6,Visual Designer,login.bal,-100,2,Subs,rellenaHasta,1546,0,B4XMainPage,b_entrar_Click,129,0,B4XMainPage,b_envioBD_Click,153,2,B4XMainPage,b_server_Click,136,0
SelectedBuild=0
VisibleModules=1,7,8,2,3,6,4,5

View File

@@ -1552,7 +1552,6 @@ Sub rellenaHasta(tamano As Int) As String
Return relleno
End Sub
'CAT_GUNAPRODS, CAT_MESAS y CAT_MESEROS
'1782
'10.0.0.106